Graphical desktop front ends for KVM and Qemu

Zoo Keeper

© Lead Image © Yang Chao, 123RF.com

© Lead Image © Yang Chao, 123RF.com

Author(s):

If you want to care for a zoo full of exotic KVM guest systems on your desktop, you could use a little help from a graphical front end.

Virtual work environments exploit the power of modern multicore processors by efficiently virtualizing complete operating systems and their services. The kernel-integrated Kernel-based Virtual Machine (KVM) [1] is a useful alternative to partly proprietary virtualization software from Oracle (VirtualBox [2]) or VMware (VMware Workstation [3]). The matching kernel module has been around since Linux 2.6.20, and Red Hat has managed it since 2008.

The advantage of KVM compared to the third-party solutions by Oracle and VMware is its high execution speed and resource-friendly work approach. One disadvantage is the somewhat complex configuration of these kernel-based virtual machines.

A number of graphical tools help reduce the administration costs for compute clusters and servers that manage multiple virtual guests. Examples include oVirt [4] and Proxmox VE [5]. A web interface, which requires some serious configuration work on the part of the admin, is often used as a GUI. But industrial-strength tools like oVirt and Proxmox VE are overkill for simple virtual desktop environments.

A smaller and lighter class of graphical tools help users manage KVM systems on the desktop. Some of these tools receive very poor maintenance and thus are not really viable for Linux production environments (see the box "Not Rated"). But a few of the more well-maintained virtualization managers for KVM offer some significant benefits: Thanks to their low latency and high execution speed, the guests managed with these tools perform well for time-critical applications. And because virtual machines can emulate different processor architectures, developers can develop their programs on a single platform and then test them for many different architectures.

Not Rated

Miscellaneous desktop GUIs for the KVM and QEMU duo abound in the Linux universe. Many of them, including GKVM [6], Qemulaunch [7], or Qemulator are no longer developed and maintained, so that the applications often do not run on current distributions, or at least only with incommensurate effort.

QtEmu [8] is not well maintained; the packages for several distributions have included unresolved bugs for years.

Other programs such as Qemu Manager [9], which emerged from Qemulaunch, is not localized in English and is thus difficult for users in the English-speaking world to come to grips with. The very young, but interesting Kimchi [10] is currently difficult to install on most distributions and is also still very much under active development. However, Linux Magazine has tested most of these programs, including the somewhat ancient live distribution VirtLive [11].

At the end of the day, we only picked the programs that we were able to install without any problems using the test distributions Linux Mint 18 (Sarah), Open Mandriva LX 3.0, Ubuntu 16.04 LTS (Xenial Xerus), Rosa Desktop R8, and openSUSE Tumbleweed, and which provide reliable service there.

Complete operating systems can be tested directly from the ISO image and without an intermediate step involving external mass storage. Adventurous users or admins can now test new operating system versions with little effort using the KVM system.

Requirements

KVM requires a processor-implemented hardware virtualization. The following command on Linux tells you if your system supports this feature:

grep -E "vmx|svm" /proc/cpuinfo

One of the two flags should appear in the output. If both are missing, you may only need to enable hardware virtualization in the BIOS. Using lsmod | grep "kvm" shows whether the system loads the kernel modules correctly. Depending on the processor the results should include the two lines kvm and kvm_intel (for Intel VT) or kvm_amd (for AMD-V).

As a further precondition, you need to install the Qemu virtualization environment [12] as KVM is used only as an interface of the operating system kernel. Qemu is available in the software archives of virtually all leading Linux distributions; users can easily install it with the respective package management tools.

Additionally the QXL graphics driver and the Spice Protocol [13] should be running on the host system because the team of KVM and Qemu only emulates an ancient Cirrus video card by default. This emulation and its VGA counterpart do not support a contemporary screen resolution of the virtual system. Spice also transfers audio data, allowing users to view movies in the virtual machines.

Integrating these into the Linux system via the command line not only proves cumbersome due to the extensive command syntax, but it is also a disadvantage if you often use different virtual systems. At this point, the graphical KVM management tools enter the game.

Aqemu

Aqemu [14] based on the Qt libraries is visually strongly geared to the VirtualBox environment from Oracle. Users can use Aqemu out the box without training. However, an installation wizard appears when first called to prompt you for your choice of locale (Figure 1).

Figure 1: Aqemu: German localization is not complete.

Then the program window appears (Figure 2). It is divided into three parts: At the top, there is a small horizontal menubar and below it a buttonbar with commonly used functions. On the left, a vertical list area enumerates the installed virtual guest systems. To its right, like in VirtualBox, there is an area that displays the settings for the individual virtual machines in seven tabs.

Figure 2: The splash window in Aqemu seems rather spartan, but it is also uncluttered.

Pressing the green + button at the top left lets you define a new virtual machine; an ISO image can serve as a template. After assigning a name, you can move on to configure very detailed settings for the virtualized hardware. This not only relates to the processor type and the hardware architecture, but also the memory, the emulated sound card, the drives, and the network connectivity. You can also set up serial, parallel, and USB interfaces here. Advanced users will quickly understand the options as they are similar to those in VirtualBox (Figure 3) in terms of appearance.

Figure 3: The configuration options for the virtual machine in Aqemu are very extensive. This might seem familiar to VirtualBox users.

Beginners can turn to the Wizard for help. You can launch the Wizard via the buttonbar; it then guides you with a couple of dialog boxes to a new virtual machine, by automatically assigning many basic settings. However, some manual work is required after the automatic configuration. The Wizard does not set up your keyboard layout, and it does not modify the boot order. This can mean that the virtual machine is not fully operational.

In the General tab of the Settings menu, look for Boot priority; check that the boot media are in the correct order and check the device list in the Device Manager tab. You may need to modify these. The routine always creates a virtual hard disk here, but does not ask for the path to it when booting an ISO image. You can add this manually to the device list: Add CD/DVD-ROM (Figure 4).

Figure 4: Booting from an ISO image is no problem for Aqemu as long as the user specifies the path manually.

Once the configuration is complete, press the Start button (with the small triangle) to boot it. This will boot the virtual system in a separate, automatically scaling window; a scaled-down preview function as offered by VirtualBox is not available.

In a direct comparison with Oracle's software, the sheer pace at which the KVM machine runs is striking. Regardless of the size of the virtual machine and its desktop environment the KVM-based Aqemu achieved a speed that nearly matched that of a dedicated system in our lab.

One special feature in Aqemu is the option to adjust the hardware architecture with a mouse click. Below General | Computer Type, Aqemu offers a large number of supported hardware architectures, ranging from ARM-based systems, through Power PC and Sparc computers to 64-bit Intel PCs.

Sometimes virtual machines require you to tweak individual settings to achieve superior performance with the virtual environment. This applies in particular to the RAM and CPU usage presets, which the Setup Wizard rarely sets up adequately. Aqemu's very detailed options make it possible to test the run-time behavior of an operating system in a virtual machine with different hardware emulations. The software even emulates an Intel 80486 processor and supports older sound and video cards, which are suitable for experiments.

If required, users can define alternative images on external disks, to start a virtual machine. Thanks to the support for serial and parallel ports, you can still use older printer models with the IEEE 1284 interface. The trio of KVM, Qemu, and Aqemu is thus especially recommended as a solid platform in heterogeneous infrastructures.

Virtual Machine Manager

The Virtual Machine Manager (VMM) [15] acts as a graphical add-on for KVM like Aqemu, but also supports the Xen virtualization software, as well as LXC containers. The software can also be found in the repositories of most major distributions. In addition to the option for GTK+-based interfaces, there is also a version for Qt work environments.

After completing the installation, you will find a corresponding entry in the System Management menu that takes you to a very spartan interface. As VMM requires multiple prerequisites for correct operation, the software first checks at startup time whether all requirements are met and indicates missing packages or maybe that the virtualization daemon has not yet been launched. If there are no warnings, the software is ready for use.

First, use File | New virtual machine to create a virtualized system. A wizard helps you do this in five steps (Figure 5). In VMM, like in the other two graphical front ends, it first asks you for the source media, the RAM size, and the number of processor cores. It also sets up a virtual hard disk with a variable selectable size. If you have created drives with other virtual environments, you can use these with VMM.

Figure 5: VMM makes it easy for users to create a new virtual machine, as a wizard provides support.

To fine-tune the virtual system, your best bet is to check the Edit configuration prior to installing option. Clicking on Finished bottom right takes you to a clear-cut configuration dialog similar to that of VirtualBox (Figure 6).

Figure 6: In VMM, too, the user can adjust the virtual system if desired.

At this point, you can set up the emulated hardware of the virtual guest system in great detail, without requiring additional packages and extensions. When you are done, click Start installation top left. After creating the guest machine, it immediately launches in a separate window.

The main screen displays the list of virtual guests and graphically highlights active VMs. A load chart on the right in the window clearly shows whether a specific guest system is busy. A permanent full load is also indicative of incorrect settings.

You can control the virtual machine through the horizontal buttonbar at the top of the program window. Pressing the icon on the left creates a new guest system. VMM provides additional statistical data on the host and the guest system: If you want to adjust the configuration as the performance is slow, you first need to enable a host system load display in the View | Chart menu. A column Host CPU load on the right in the main window displays CPU usage in near real time.

To change a configuration, you can tweak the many options accessible via Open | Views | Details. On the left, a vertical list view displays the hardware components of the system. If you click on it, you are shown the associated options on the right in each case. You can use this to retroactively tune, for example, the memory size and the processor performance.

Selecting Boot options solves a fairly annoying phenomenon: If you opt for an ISO image as a bootable disk, VMM does not use the ISO image as the boot medium after a reboot, but attempts to start from the empty virtual hard disk. To resolve this error, you need to press the Add device button bottom left and add a new second IDE-CD-ROM-2 drive. The CD-ROM device that you need to create in the window that appears adds a Select or create custom storage option to the guest system.

You also need to explicitly enable the new drive as the first boot medium and confirm your choice by pressing Apply at the bottom right (Figure 7). The virtual machine now starts from the ISO image.

Figure 7: In VMM, integrating an ISO image is a somewhat complicated process.

VMM enables simultaneous operation of several guest systems with limited hardware resources. The load indicators are then displayed in parallel. Selecting Show details of the virtual appliances, at top left on the screen of the active virtual machine, and Performance shows you the CPU load, RAM usage, and disk and network throughput in a graphical display. The displays are useful for troubleshooting (Figure 8).

Figure 8: Two virtual desktops running simultaneously on a Linux Mint host and displaying their CPU and RAM usage.

Jqemu

The Jqemu [16] software is based on Java, as the name suggests. Your advantage: It works across platforms and offers the same interface everywhere. Jqemu is not too picky on Linux and can use either Oracle's Java environment or the free OpenJDK runtime.

The application is available from the website as a prebuilt (32- and 64-bit) package and can be used immediately after unpacking the zip archive. To do so, launch a terminal by typing:

java -jar jqemu.jar

You do not need administrative privileges for this. If you want to add Jqemu to the menu structure of the host operating system, you will need to do this manually.

After starting, Jqemu shows the user a clearly arranged window with three areas: Various settings and options are available in the top horizontal menubar; the buttonbar below takes you to the most important functions. The list window on the left displays one or more virtual machines.

A large configuration area waits for the virtual machines in the right pane of the program window. Multiple horizontal tabs divide the area into groups. The settings are initially modeled on those of Qemu: Jqemu suggests assigning a no longer quite state-of-art 128MB RAM to each newly created virtual machine – this is not enough for most virtual systems. The other options need some attention: For 64-bit and 64-bit ISOs, you must select the correct Qemu binary file as Jqemu assumes the 32-bit version by default.

Jqemu provides similarly extensive options to the other subjects when it comes to configuring the guest systems. But Jqemu arranges them in a more confusing way than Aqemu or VMM.

Because the software does not have a help function, some settings cause confusion: For example, the Network gives you the ability to configure network access. This is not necessary in some cases, as the guest systems automatically set this up and Internet access is available without further intervention.

The graphics and audio settings need special attention. An incorrect graphics setup or faulty audio options can cause the virtual machine to freeze during startup. Some documentation would be useful here, particularly for newcomers (Figure 9).

Figure 9: The configuration settings for the available drives require special attention in Jqemu.

To use an ISO image as a bootable disk, the Jqemu user has to modify several options. In the General tab, look for the Boot entry and enable the CD-ROM option. Then, in the same dialog, enter the path to the ISO image for the CD-ROM entry below the Disks section.

Increasing the memory size in Memory is also advised. Although Slim Linux distributions like Minux or Slitaz will run easily with the default 128MB, all of the well-known Linux systems need at least 1GB memory in the virtual machine. You will also want to go to the Advanced tab and increase the number of processor cores in the Simulate an SMP system option, as the larger distributions often run faster on multiple-core systems.

The Options menu, which you can access via the buttonbar, defines the supported processor architectures. In the QEMU PC field of the Dependencies section, you can define the path to the Qemu binary files, including the actual emulation file. The Qemu files typically reside in the /usr/bin/ directory. You can then select the required emulation from a small file manager (Figure 10).

Figure 10: You can choose the hardware architecture manually in Jqemu.

If you do not just want to run live systems operate on your virtual machines, but actually install the systems, you need to enter the path information for the drives to use in General | Discs. Unlike Aqemu, Jqemu does not automatically create the disks, but expects you to point the way here. You can use the Tools | Images | Create menu to create a disc image of any size, selecting from a large number of image formats as you do so. This will ensure that images work with other software packages. Jqemu is the only single application that also supports the VDI format, which Oracle's VirtualBox uses as the default format for virtual machines.

If the hardware supports this, Jqemu also allows the simultaneous operation of multiple virtual machines on a host. It packages them – like the other candidates – in dedicated instances of Qemu. They are thus completely isolated from each other. In contrast to other solutions, however, the admin has to manually shut down the individual virtual machines in their respective windows on exiting – centralized switching via ACPI commands, such as in VirtualBox, is missing.

The user does not see an overview of the resource consumption of open machines, unlike with VMM. Jqemu is thus less of a central control instrument for virtual machines and merely a graphical front end and configuration interface for Qemu.

Jqemu also provides a log function that helps you find and resolve errors in the configuration of a virtual machine. But you first need to enable logging manually. To do so, go to the Debug/Expert tab and enable the option Output log items to /tmp/qemu.log. Using the Log Items option, you can then define the content you want to log, to keep the logfiles understandable.

In the Kernel Image and Kernel command line input lines, you can also select a special kernel image in case of problems or pass some parameters in to the kernel at startup time, to ensure reliable operation even of more exotic systems.

In Practice

In practical use on various Linux distributions, the three graphical front ends showed no compatibility issues with a team made up of KVM and QEMU. However, the working speed varied enormously: With Jqemu, significant effort was required to run the operating system at a reasonable speed on multiple Linux guest systems. The Java application was also the slowest to launch.

Aqemu impressed as the most complete candidate despite very extensive setting options: The program supports virtually all virtual systems without time-consuming manual work and does so without any noticeable loss of speed. Additionally, the GUI – which visually strongly resembles Oracle's VirtualBox – was the easiest to use.

Both Aqemu and VMM impressed with their efficient use of the host computer's resources: For example, we were able to simultaneously run multiple virtual machines with just 4GB RAM and 4 Core i5 processors in our lab without revealing any bottlenecks in terms of resource allocation.

Conclusions

As a dynamic duo, KVM and Qemu with a graphical front end offer various benefits in comparison with VirtualBox on the desktop, assuming that you choose the right front end. Aqemu offered the best performance on all tested Linux distributions and installing the virtual machine required very little input and clicking.

VMM is a viable alternative to Aqemu without any negatives. Jqemu plays to its strengths in heterogeneous environments, where admins want to launch the same interface on the virtual machine in spite of different host computers with different operating systems. But to achieve this, administrators have to plan for considerably more configuration overhead for each virtual system than with Aqemu and VMM.