Graphical desktop front ends for KVM and Qemu
Zoo Keeper
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).
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.
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.
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).
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.
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).
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.
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).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.