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
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.