From Whonix
Jump to navigation Jump to search


If you are using Fedora, click on Expand on the right.

Check System Requirements

As KVM requires a CPU with virtualization extensions, check whether the system has either Intel VT or AMD-V. If the following command prints nothing, the system does not support the relevant virtualization extensions.

egrep '^flags.*(vmx|svm)' /proc/cpuinfo

Install Dependencies

To install mandatory and default packages in the virtualization group, run.

sudo dnf install @virtualization

Alternatively, to install the mandatory, default, and optional packages, run.

sudo dnf group install --with-optional virtualization

After package installation, start the libvirtd service.

sudo systemctl start libvirtd

To start the service on boot, run.

sudo systemctl enable libvirtd

Verify the KVM kernel modules loaded properly. If this command lists kvm_intel or kvm_amd, KVM is properly configured.

lsmod | grep kvm

Edit the libvirtd Configuration

System administration is limited to the root user by default. To enable a regular user, run the following commands.

Open the /etc/libvirt/libvirtd.conf file for editing.

sudo nano /etc/libvirt/libvirtd.conf

Set the domain socket group ownership to libvirt.

unix_sock_group = "libvirt"

Adjust the Unix socket permissions for the R/W socket.

unix_sock_rw_perms = "0770"

Save and exit.

To administer libvirt as a regular user, add the user to the libvirt group.[1]

sudo usermod -a -G libvirt $(whoami)

You must log out and log in to apply the changes.

  1. Otherwise the sudo password is required every time virtual-manager is started.