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
-
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.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs