Virt-manager: Difference between revisions

Vater (talk | contribs)
mNo edit summary
Phobos (talk | contribs)
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The [https://virt-manager.org/ virt-manager] ([[wikipedia:en:{{PAGENAME}}]]) 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).
[https://virt-manager.org/ Virt-manager] (a.k.a. Virtual Machine Manager) is a GUI application for managing local and remote virtual machines through [[libvirt]]. It primarily targets KVM VMs, but also manages Xen and LXC (Linux Containers).


== Requisites ==
== Prequisites ==
Even though Virt-manager (using the KVM hypervisor) is able to take advantage of virtualisation capabilities without any UEFI/BIOS configuration, best performances demand that host have Vt-x and Vt-d (Intel) or AMD-V and AMD-Vi (AMD) enabled. These settings can usually be found under the UEFI/BIOS settings.
Though Virt-manager (using the KVM hypervisor) is able to take advantage of virtualisation capabilities without any UEFI/BIOS configuration, best performance demands that the host have Vt-x and Vt-d (Intel) or AMD-V and AMD-Vi (AMD) enabled.  
 
These settings can usually be found under the UEFI/BIOS settings.


== Installation ==
== Installation ==
In your configuration file add:
{{File|3=virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}{{Note|<br/><br /><code>authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'</code>


=== NixOS ===
To resolve, add your user to the libvirtd group:
 
<syntaxhighlight lang="nix">
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
</syntaxhighlight>
 
You may get the following error:
 
<code>authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'</code>
 
To resolve, add the user to the <code>libvirtd</code> group:


<syntaxhighlight lang="nix">
{{File|3={
{
   users.users.<myuser>.extraGroups = [ "libvirtd" ];
   users.users.<myuser>.extraGroups = [ "libvirtd" ];
}
}|name=/etc/nixos/configuration.nix|lang=nix}}|leading=After rebuild, you may get the following error:}}
</syntaxhighlight>


=== Networking ===
=== Networking ===
The default network starts off as being inactive, you must enable it before it is accessible.
To use the default libvirt network, you will need to install the <code>dnsmasq</code> package. This is required for DNS and DCHP functionality within the network:
This can be done by running the following command (may require sudo):  


<code>virsh net-start default</code>
{{File|3=environment.systemPackages = with pkgs; [
  dnsmasq
];|name=/etc/nixos/configuration.nix|lang=nix}}


Or autostart:
The default network starts off inactive, you must enable it before it is accessible. This can be done by running the following command: <syntaxhighlight lang="console"># virsh net-start default</syntaxhighlight>And if you would like to enable it automatically at boot:<syntaxhighlight lang="console">
# virsh net-autostart default
</syntaxhighlight>By default, this will enable a virtual network bridge under the name <code>virbr0</code>.


<code>virsh net-autostart default</code>
=== Display ===
 
The default video may not allow different resolutions and is limited. It is recommended to use Virtio instead.
By default this will enable the <code>virbr0</code> virtual network bridge.


=== Display ===
For information on how to use Virtio with your VM's, [https://wiki.libvirt.org/Virtio.html you can read up on Virtio on the libvirt wiki].
The default Video may not allow different resolutions, `Virtio` will allow for more.


=== Shared folders ===
=== Shared folders ===