$ sudo xbps-install -S virt-manager libvirt qemu openbsd-netcat dnsmasq vde2 bridge-utils
$ sudo usermod -aG kvm <username>
$ modprobe kvm-<your CPU>
For AMD use kvm-amd & for Intel use kvm-intel .
$ sudo usermod -a -G libvirt <username>
$ sudo vim /etc/libvirt/libvirtd.conf
- Uncomment this lines.
- listen_tls = 0
- unix_sock_group = "libvirt"
- unix_sock_ro_perms = "0777"
- unix_sock_rw_perms = "0770"
- unix_sock_dir = "/run/libvirt"
- auto_unix_ro = "polkit" >>> auto_unix_ro = "none"
- auto_unix_rw = "polkit" >>> auto-unix_rw = "none"
Save and exit.
$ sudo vim /etc/libvirt/libvirt.conf
- Uncomment.
- uri_default = "qemu:///system"
Save and exit.
$ sudo vim /etc/libvirt/qemu.conf
Go to line 519.
- Uncomment line 519 and 523.
- user = "your username"
- group = "libvirt"
-
$ sudo ln -s /etc/sv/libvirtd /var/service/
-
$ sudo ln -s /etc/sv/virtlogd /var/service/
-
$ sudo reboot
- Download an ISO.
- Create a virtual machine.
If you have DHCPCD for network, you need to change it up to NetworkManager. Just to be able to connect via ssh to the virtual machine.
$ sudo xbps-install -S NetworkManager
$ sudo sv down dhcpcd
$ sudo rm /var/service/dhcpcd
$ sudo ln -s /etc/sv/NetworkManager /var/service/
$ sudo ln -s /etc/sv/dbus /var/service/
$ sudo reboot