Virt-manager: Difference between revisions

Remove 23.11pre options.
Removed section about fixing "Could not detect a default hypervisor" on first startup, as it's no longer relevant.
Line 11: Line 11:
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
programs.virt-manager.enable = true;
</syntaxhighlight>
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>