Working with VMs and KVM on Arch Linux

· 197 words · 1 minute read

I found that I needed a fresh Windows install to test some documentation against. I've not managed VMs on Linux in a long time. The last time I did this I used VirtualBox and QEMU.

Dependencies

I'll be using QEMU and `virt-manager` [0]. The documentation says to install the following packages: virt-manager, qemu-desktop, dnsmasq and iptables-nft. I found later on that I also needed some utilities for managing VMs (I ran out of space and needed to expand one of the virtual drives.)

sudo pacman -S virt-manager qemu-desktop dns-masq iptables-nft guestfs-tools

Setup

Per the docs, we init a systemd service so that virt-manager has something to hook up to.

  sudo systemctl enable libvirtd.service && sudo systemctl start libvirtd.service

The docs say this will hook into LXC, but my instance of virt-manager found my QEMU executable right away. There's something going on in the background that could make for trouble later on.

Exec and Usage

This is pretty straight forward. virt-manager is a GUI app and isn't very different from VirtualBox. I found I needed to restart my computer before the client NAT network worked.

Links