IMPORTANT: These steps are meant for use on most Arch, systemd based distrobutions. Please take care and backup your system and files you've edited before progressing. Better safe than sorry.
-
Update packages for distrobution. Typically on arch based systems you can run
pacman -Syu --noconfirmwith sudo privilidges to do this. -
Install grub.
-
Edit
/etc/defaults/grub(Make sure to back this file up beforehand) -
Look for the line option named
GRUB_CMDLINE_LINUX_DEFAULTand prepend the following depending on what CPU make you have:- Intel:
intel_iommu=on iommu=pt iommu=1 video=efifb:off - AMD:
amd_iommu=on iommu=pt iommu=1 video=efifb:off
- Intel:
-
Run
sudo update-gruborsudo grub-mkconfigto regenerate your/boot/grub/grub.conffile. Make sure to reboot your system to apply the changes. -
Install the necessary packages with your package manager/AUR helper. With paru, you can run the following command:
paru -Sy --noconfirm --cleanafter kvmtool-git libvirt bridge-utils virt-manager ovmf-git
-
Edit/create the config located at
/etc/libvirt/libvirtd.confand uncomment these lines:unix_sock_group = "libvirt" unix_sock_rw_perms = "0770"... or if the config variable does not exist, just append it to the end of the file.
-
Set these values yourself somewhere at the end of the config:
log_filters = "1:qemu" log_outputs="1:file:/var/log/libvirt/libvirtd.log"
When you've uncommented and/or added these lines, save and close the file.
-
Run the following command to add yourself to the
libvirtgroup:sudo usermod -a -G libvirt $(whoami) # Or explicitly supply your username by replacing `$(whoami)`
-
Start and enable the
libvirtddaemon:
sudo systemctl enable libvirtd
sudo systemctl start libvirtd- Add config values to the
/etc/libvirt/qemu.conf:
user = "YOUR USERNAME"
group = "YOUR GROUP WHICH IS PROBABLY THE SAME AS YOUR USERNAME"- Restart the
libvirtddaemon:
sudo systemctl restart libvirtd- Add yourself to the
kvmandlibvirtgroups:
sudo usermod -aG kvm $(whoami)
sudo usermod -aG libvirt $(whoami)- Reboot.
- Open
virt-managerand create a new virtual machine.
- Give it half of your CPU cores
- 4 GB of ram is a decent amount
- Make sure to check
Copy host CPU configurationunder theCPUssettings tab - DO NOT use UEFI (use SATA not IDE)