How to install QEMU/KVM on Arch Linux
1. Check if you have virtualization support enabled
` grep -Ec '(vmx|svm)' /proc/cpuinfo
If you obtain a number greater than 0, virtualization is active
'vmx' is a flag for intel processor, 'svm' is a flag for amd processor
2. Apply update on your system
`sudo pacman -Svyu`
(optional: install archlinux-keyring packages to update repository keys)
2. Install the following packages:
`sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 ebtables iptables-nft
nftables bridge-utils ovmf swtpm openbsd-netcat demicode libguestfs`
This execute a command to install packages. First, you must select a provider to
qemu package:
:: Repository extra
1) qemu-base 2) qemu-desktop 3) qemu-full
3. Configure the following files to activate some functionalities and permissions
- In this file: /etc/libvirt/libvirtd.conf, uncomment this lines:
# unix_sock_group = "libvirt"
# unix_sock_rw_perms = "0770"
(for uncomment the lines, remove the '#' character before the permission,
also, saving the file will request a superuser permission)
- In this file: /etc/libvirt/qemu.conf, uncomment and add your username in this
lines:
# user = "yourusername"
# group = "yourusername"
4. The next step is add your user to group that drive virt and kvm, i.e.:
`sudo usermod -aG kvm,libvirt $(whoami)`
(whoami is a command that show what is your username)
5. Confirm the change on this group with this command:
`newgrp libvirt`
6. Enable, start and show the status of the libvirt service using this commands:
```sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
sudo systemctl status libvirtd.service
```
(in the last command, the result must show anything like "active running")
7. To allow to use the network configuration, you must activate the config using
this command:
`sudo virsh net-autostart default`
(It shows an alert to point that command executed succesfully)
8. Finally, execute this command to reboot system:
`sudo reboot`
or graphically go to Start Menu and select logout/shutdown buttons,
and select the "reboot" option