Virt-manager: Difference between revisions

Nebu (talk | contribs)
add section on wayland
Klinger (talk | contribs)
Added link to virt-manager. Expanded the description (made it more specific)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Virt-manager is a GUI for managing local and remote virtual machines.
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 7: Line 7:


=== NixOS ===
=== NixOS ===
Before 23.11:
<syntaxhighlight lang="nix">
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
environment.systemPackages = with pkgs; [ virt-manager ];
</syntaxhighlight>


After 23.11:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
programs.virt-manager.enable = true;
</syntaxhighlight>
See [https://github.com/NixOS/nixpkgs/pull/261474 relevant merge request]
You will get a warning when you open it for the first time:
<code>Could not detect a default hypervisor. Make sure the appropriate QEMU/KVM virtualization packages are installed to manage virtualization on this host.
A virtualization connection can be manually added via File->Add Connection</code>
To resolve:
<pre>
File (in the menu bar) -> Add connection
HyperVisor = QEMU/KVM
Autoconnect = checkmark
Connect
</pre>
The same can also be achieved declaratively by setting the corresponding dconf settings with home-manager. If you want to do this instead of the imperative configuration described above, add the following snippet to your home-manager configuration:
<syntaxhighlight lang="nix">
dconf.settings = {
  "org/virt-manager/virt-manager/connections" = {
    autoconnect = ["qemu:///system"];
    uris = ["qemu:///system"];
  };
};
</syntaxhighlight>
</syntaxhighlight>