KVM virtualization with Qemu and Aqemu
Down in the Kernel
KVM and Qemu provide a fast and powerful alternative to VirtualBox for virtualization in Linux.
Linux users often equate virtualization with VirtualBox, a versatile virtualization app that Oracle has maintained for several years [1]. VirtualBox is a favorite with both beginners and power users because of its convenient installation and simple configuration.
With all the recent attention to VirtualBox, many users don't realize that a fully developed virtualization alternative is already built into the Linux kernel. Kernel-based Virtual Machine (KVM) has been part of the kernel since Linux 2.6.20 and is developed by a team at Red Hat [2]. Combining KVM with the Qemu hypervisor system and the Aqemu graphical interface can lead to greater flexibility and significantly faster virtual machines (VMs) than a solution based around VirtualBox.
Operating Principle
KVM is actually a kernel module that acts as an operating system interface and, therefore, relies on a virtualization environment. Qemu [3], which is available in all major distributions, adds the necessary application-level virtualization features and is the perfect complement to KVM.
KVM/Qemu requires a CPU that supports hardware virtualization. If you use a computer with an Intel processor, you can enter the following command:
grep --color vmx /proc/cpuinfo
to find out whether the processor supports Intel VT. The color
option highlights the vmx
flag. If you have a computer with an AMD processor, the command sequence is similar:
grep --color svm /proc/cpuinfo
If you do not see the appropriate flags, and you suspect the CPU really does support hardware virtualization, take a look at the BIOS settings. Some BIOS versions let you switch the virtualization function on and off manually.
See your distribution's package manager for information on how to install Qemu. When you set up the KVM/Qemu duo, you should also install the Spice protocol and the QXL graphic driver, or else the system will only emulate an ancient Cirrus graphic card that does not support usable screen output on high-resolution monitors. Both components are also available in the repositories of all major distributions.
Aqemu [4] is a graphical environment for managing VMs. The Aqemu software is based on the Qt libraries and is strongly adapted to Oracle's VirtualBox. Aqemu is usually found in the repositories, so you can set it up along with the dependencies using the package manager. Also, the application is available for download at SourceForge [5].
First Steps
When you first launch Aqemu, a dialog guides you through the setup. In the course of the setup, the software scans the system for the active versions of KVM and Qemu and displays them in a table. If one of the two packages is missing, you need to check the installation.
After configuring all parameters, the routine jumps to the main window, which is very like VirtualBox: After creating the VM, on the left, you will find names listed in a table. On the right, Aqemu shows the settings in several dialogs, each grouped into tabs. Above is a horizontal bar with buttons for quick selection of the most important functions. A menu arranged horizontally at the top of the window rounds off the elements of the application.
Settings
Aqemu displays the complete KVM/Qemu instruction set and combines it with the elements of a graphical interface. The dialogs for setting the parameters are extensive. You can find several configuration options in the File menu under the General Settings and Advanced Settings submenus. The basic settings let you set the path for the VMs and configure some options for the appearance of the program.
In addition, you can define a default template if necessary. The default template gives you specifications for creating VMs in the individual dialogs, although you can adjust these settings retroactively.
In the Advanced Settings menu, you can tweak settings for hardware emulation and specify the path to the log files. In Advanced Settings | Information in Info Tab, you can activate further options for display as needed (Figure 1).
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
-
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.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.