Replacing VirtualBox with QEMU and aqemu

August 7, 2016, 10:17 pm blog-header-image

I use virtual machines a lot when documenting how software works. Until recently my choice has been VirtualBox, but I've been wanting to try the newer virtualization technology built into modern Linux systems called KVM. VirtualBox is pretty nice, but Oracle makes it impossible to run macOS née OS X using it. While I don't frequently need to test out Macintosh related things, I do sometimes and I don't feel the need to buy a whole computer for the pleasure.

I was hoping to use something libvirt based, but I am not finding an easy way to running a virtual machine off of an external drive. Since my primary drive is to get a virtual machine running not learn how to use libvirt, I looked for other options. I am guessing libvirt and the tools around it are too complicated and complex for running only a few occasional virtual machines.

I've used QEMU in the past, but haven't given a try in a while. Armed with a new graphical frontend called aqemu (I am using version 0.9.2) I was able to create a virtual machine for Ubuntu GNOME 16.04. While I am comfortable with the command line, I find using non-console GUI easier to use when I am trying to discover things and tinker. aqemu has a very nice option for an administrative interface: it shows you the qemu command line arguments it uses.

aqemu with qemu arguments

The text can be copied from the graphical interface and used from the command line or from a script you are writing to manage your virtual machines.

/usr/bin/qemu-system-x86_64 \
    -monitor stdio \
    -vga qxl \
    -machine accel=kvm \
    -m 2048 \
    -cdrom /run/media/snassar/disk/ISO/ubuntu-gnome-16.04-desktop-amd64.iso \
    -hda /run/media/snassar/disk/VM/UbuntuGnome/UbuntuGnome.qcow2 \
    -boot order=dc,menu=on \
    -net nic,vlan=0 \
    -net user,vlan=0 \
    -rtc base=localtime \
    -name "Linux" \
    -spice port=5930,disable-ticketing

There are things that are easier to do with VirtualBox than aqemu/qemu like having a button or menu for taking screenshots, but I'll explore the options for QEMU and the relative ease in another post.

Previous Post