Virt-manager: Difference between revisions

Networking: Comment about documentation issue
Added an explanation on how to config Virt-manager to be able to share folders with guest VM.
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The [https://virt-manager.org/ virt-manager] application is a GUI for managing local and remote virtual machines through libvirt. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers).
The [https://virt-manager.org/ virt-manager] application is a GUI for managing local and remote virtual machines through [[libvirt]]. It primarily targets KVM VMs, but also manages Xen and LXC (linux containers).


== Requisites ==
== Requisites ==
Line 27: Line 27:
=== Networking ===
=== Networking ===
The default network starts off as being inactive, you must enable it before it is accessible.
The default network starts off as being inactive, you must enable it before it is accessible.
This can be done by running the following command:  
This can be done by running the following command (may require sudo):  


<code>virsh net-start default</code>
<code>virsh net-start default</code>
Line 37: Line 37:
By default this will enable the <code>virbr0</code> virtual network bridge.
By default this will enable the <code>virbr0</code> virtual network bridge.


Sorry - this seems out of date. 2024 July 10<syntaxhighlight lang="bash">
=== Display ===
[das@t14:~/nixos/t14]$ virsh net-autostart default
The default Video may not allow different resolutions, `Virtio` will allow for more.
error: failed to get network 'default'
 
error: Network not found: no network with matching name 'default'
=== Shared folders ===
To be able to share a folder with a guest, you will need 'virtiofsd'. The recommended way to solve this problem is now to add <code>pkgs.virtiofsd</code> to <code>virtualisation.libvirtd.qemu.vhostUserPackages</code>:
 
<syntaxhighlight lang="nix">
virtualisation.libvirtd = {
  enable = true;
  qemu.vhostUserPackages = with pkgs; [ virtiofsd ];
};
</syntaxhighlight>
</syntaxhighlight>
===Display===
The default Video may not allow different resolutions, `Virtio` will allow for more.


===Windows Guest===
===Windows Guest===
Line 55: Line 59:
{
{
   services.qemuGuest.enable = true;
   services.qemuGuest.enable = true;
  services.spice-vdagentd.enable = true;  # enable copy and paste between host and guest
}
}
</syntaxhighlight>
</syntaxhighlight>