AQEMU: A GUI for QEMU


by Patrick G Horneker (phorneker)

In previous articles on QEMU, I have shown you command line options for controlling QEMU.  There are a number of utilities (downloadable from Synaptic) that provide a graphical interface for controlling of QEMU.

AQEMU is the subject of this article, and is a fully functional application that makes using QEMU easier.

To install AQEMU, launch Synaptic (and be sure to update PCLinuxOS first using the Reload, Mark All Upgrades, Apply method).  This package is the first entry (as of this writing) in the Emulators section of Synaptic.  Double click on aqemu to select the package (and any dependencies), then click on Apply in the toolbar to install AQEMU.

Once installed, AQEMU can be launched by selecting More Applications -> Emulators -> AQEMU from the system menu.  When you launch AQEMU for the first time, the following will appear:

Click on Next here as there really is nothing to select (unless you want to use AQEMU in another language).

A hidden folder was created in your home directory called .aqemu.  This folder is where virtual machines are created and maintained by AQEMU.

While running QEMU with a command line, you can control disk devices by accessing the QEMU command line.  To access that command line, press Alt-2.  To return to the virtual machine while running the command line, press Alt-1.  For these commands, hold down the Alt key and type either 1 or 2 on the typewriter portion of the keyboard, not the numeric keypad.

AQEMU makes this easier by providing a Device Manager.  Click on Use Device Manager to enable this feature.  You may also enable this feature later while running AQEMU.

The embedded VNC display is not fully functional at this time, so I do not recommend selecting this option.

Click on Next to get to the next screen.

Here, we click on Search to allow AQEMU to find any implementations of QEMU.

Obviously, both QEMU and KVM are available when we installed QEMU itself from Synaptic.  KVM stands for Keyboard, Video and Mouse and requires a special kernel driver that directly accesses the named devices.  (Unfortunately, the KVM driver here does not work if you also have VirtualBox installed because of the drivers from VirtualBox conflict with KVM.)

Also, the developers of AQEMU need a lesson in proper grammar as we can see with the messages.  These messages should read:

        Found QEMU in /usr/bin, version:  QEMU 0.12.x

instead of Finded QEMU in /usr/bin... as displayed above.

Now, AQEMU is ready to use.  Click on Finish to begin.

This poorly worded message tells us that we need to select default versions of QEMU and KVM to use for running virtual machines from within AQEMU.

If you ask me, this message should have been worded to read “No default QEMU emulator has been selected!”

Finally, we get to the main window where virtual machines are created (and a correctly worded message telling us to create a new virtual machine).  Note, the settings that were discussed in earlier articles are available in easy to find tabs shown in the window.

Now, let us select the default emulators AQEMU will use for running QEMU.

From the top menu, select File -> Advanced Settings to choose the default emulators.

For each entry select the entry, then click on Use Default to use the emulator binaries.  

Click on OK to select the installed binaries so AQEMU can use the emulator binaries with virtual machines.

General Settings

Selecting File -> General Settings pulls up a list of options we can use with AQEMU.

Here is where we can enable the device manager controls that were discussed earlier in this article.  These controls can be included within the virtual machine window itself, or in a separate window.

AQEMU supports only x86 and x86-64 architectures for virtual machines.  There are templates containing presets for virtual machines running Linux 2.0, 2.4 and 2.6 (32-bit and 64-bit), FreeBSD (4 and later), Windows (Versions 2000, XP, Vista, and 7)  and Mac OS-X (32-bit only).

The File menu allows us to create or convert disk images, just as we can with the qemu-img command.

The Run First Run Wizard is used to reset AQEMU if for some reason things get botched up while running AQEMU.

The VM menu is the “meat and potatoes” of what you can do with AQEMU.  Most every function you can access in AQEMU is launched from this menu.

When you launch AQEMU the first time, there are no virtual machines setup.  What we need to do is to add a new virtual machine.  The New VM menu comes with three submenu items, namely one to load a virtual machine from a virtual machine configuration file, one to create a new virtual machine, and the Wizard.  The latter is the easiest way to create a new QEMU virtual machine.  You can also activate the Wizard by holding down the Control key and typing W.

Obviously, we want to click on Next to get started.

Most of us will want to choose the default option (Typical) which configures the virtual machine with common options.  Selecting Custom allows you to customize the virtual machine created by AQEMU.

For PCLinuxOS, I recommend selecting QEMU for full x86 machine emulation.

Here is where we create the configuration file for the virtual machine.  AQEMU uses configuration files (called templates) so the virtual machine will be properly configured when it comes to networking, disk images and hardware.

By default, we can install a Linux distribution with a 2.6 kernel.  Of course, there are other operating systems that can run on an x86 processor.  AQEMU contains templates for:

  1. Linux 2.6 32-bit
  2. Linux 2.6 64-bit
  3. Linux 2.0
  4. Linux 2.4
  5. FreeBSD Versions 4, 7 and 8
  6. Mac OS-X for Intel
  7. Windows 2000
  8. Windows XP, Vista and 7 (32 and 64-bit editions)
  9. Windows 9.x

The inclusion of a template for Mac OS-X is controversial at best as there is no guarantee that Mac OS-X will work on QEMU at all.  Even if it did, the end user license states that Mac OS-X is to be installed only on Macintosh systems, and hence the use of Mac OS-X here would violate Apple’s license agreement.

The Generate VM option allows us to create a new template for the virtual machine.  Here, we can create virtual machines for all hardware platforms supported by QEMU itself.

There are two parameters we can select from drop down menus.  The first sets the processor type the emulated machine will implement.  Release Date is used to tell AQEMU which generation of machine you wish to emulate.

For our first virtual machine, we shall use Linux 2.6 with the typical setting.  For a Linux 2.6 machine, the machine type is a 32-bit x86 machine built between 2005 and 2010.

By default, AQEMU allocates a virtual disk for our new virtual machine.  We can change the size of the disk.  The virtual disk is created, but no space is allocated to the disk until we format it from AQEMU.

Of course, we will need to enable networking to run Linux.

...and that is all there is to it.  We have created a new virtual machine using AQEMU.

Now, the details of our new virtual machine appear in the main window of AQEMU.  We have a 32-bit x86 machine with 256MB of system RAM, an unformatted hard drive, and a network adapter.  As configured, the virtual machine will attempt to boot Linux from a CD/DVD image, which has not been defined just yet!

Any changes to the virtual machine configuration do not take effect until we click on Apply.

We click on the General tab and get the following:

The audio card emulated here is the Esoniq (Creative Labs) ES1370, though we can change this to a Creative Sound Blaster 16, a Gravis Ultrasound GF1, or an Intel 82801AA based audio board.

If you have sufficient memory in your system, you can also increase the amount of memory allocated to QEMU.  For modern Linux distributions such as PCLinuxOS, you will need to have at least 512MB of memory allocated.

The HDD tab shows the current configuration of virtual hard drive images.  Click on Format to allocate disk space.  It is there you will need to specify how much memory to allocate to the virtual disk.

The CD/DVD/Floppy tab is where we assign a CD/DVD image for QEMU to boot Linux from.

Click on CD/DVD-ROM and then click on All Settings.

Here, we can specify parameters to use with the emulated CD/DVD-ROM drive.

File:  This is the name of the disk image or actual device name (such as /dev/cdrom or /dev/sr0).

Interface:  This is the type of disk controller interface to emulate.  By default, the disk controller is an ATAPI/IDE interface.  We can also change this to a SCSI interface is we wish.  (Some early CD-ROM drives connected through a SCSI controller rather than a IDE controller.)

Index:  If an IDE interface is used, this indicates the controller number (starting with the number 0 as opposed to starting with the number 1.)

Bus:  If we are using a SCSI interface, we must specify the bus and unit numbers (also starting each with the number 0).

Media:  Since we are using a CD/DVD image, we need to specify CD-ROM instead of disk, hence telling QEMU that this is a read-only device rather than a read/write device.

Boot:  Select this to allow QEMU to boot from the CD/DVD image.

Let us close this dialog box.  Now, when we open the drop down menu, we get a listing of device names representing physical CD/DVD devices.  This is useful when we plan to use a physical CD/DVD-ROM containing the operating system.  To the right is a button that opens a file chooser where we can select a CD/DVD image file.

For an example, let us use pclinuxos-kde-fullmonty-2012-09.iso, which is the disk image for the Full Monty edition of PCLinuxOS (the latest available as of this writing).

Click on All Settings to set parameters.

Next, click on All Settings, then click on Boot, and select on, then click on Interface and select ide, then click on Media and select CD-ROM, finally click on OK to tell QEMU to boot Full Monty at startup.

Next, we select the Network tab.

The default network card emulated for QEMU is Intel’s E1000 adapter.  PCLinuxOS supports all the network cards emulated by QEMU, so we can select any adapter from the following:

Next, we select a connection type.  For this, we shall choose User Mode Network Stack.

The button to the right of the MAC Address generates a random address assigned to the emulated network card.  This is the hardware address used by the guest operating system to configure its networking services.

Be sure to click on Apply to make the configuration current.  We are now ready to launch our virtual machine.  Hold down Control and press S to launch QEMU.

We have just setup a virtual machine using a graphical interface.  AQEMU is one of the easiest (and most intuitive) ways to run virtual machines with QEMU.