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 --noconfirm
with 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_DEFAULT
and 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-grub
orsudo grub-mkconfig
to regenerate your/boot/grub/grub.conf
file. 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.conf
and 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
libvirt
group:sudo usermod -a -G libvirt $(whoami) # Or explicitly supply your username by replacing `$(whoami)`
-
Start and enable the
libvirtd
daemon:
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
libvirtd
daemon:
sudo systemctl restart libvirtd
- Add yourself to the
kvm
andlibvirt
groups:
sudo usermod -aG kvm $(whoami)
sudo usermod -aG libvirt $(whoami)
- Reboot.
- Open
virt-manager
and 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 configuration
under theCPUs
settings tab - DO NOT use UEFI (use SATA not IDE)