Virt-manager: Difference between revisions

From NixOS Wiki
imported>Replaycoding
m Add semicolon to end of line
imported>Zaechus
m Minor grammar and formatting changes
Line 15: Line 15:


<pre>
<pre>
File in the menu bar -> Add connection
File (in the menu bar) -> Add connection


HyperVisor = QEMU/KVM
HyperVisor = QEMU/KVM
Line 27: Line 27:
<code>authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'</code>
<code>authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'</code>


To resolve, We would have to add user in the <code>libvirtd</code> group.
To resolve, add the user to the <code>libvirtd</code> group.


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
{
{
users.users.<myuser>.extraGroups = [ "libvirtd" ];
  users.users.<myuser>.extraGroups = [ "libvirtd" ];
}
}
</syntaxhighlight>
</syntaxhighlight>
You will only need to do this once


[[Category:Virtualization]]
[[Category:Virtualization]]

Revision as of 16:10, 6 May 2022

Installation

NixOS

virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [ virt-manager ];

You will get a warning when you open it for the first time

Could not detect a default hypervisor. Make sure the appropriate virtualization packages containing kvm, qemu, libvirt, etc. are installed and that libvirtd is running.

To resolve

File (in the menu bar) -> Add connection

HyperVisor = QEMU/KVM
Autoconnect = checkmark

Connect

You can get the following error :

authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'

To resolve, add the user to the libvirtd group.

{
  users.users.<myuser>.extraGroups = [ "libvirtd" ];
}