Create KVM Virtual Machines on Linux with GNOME Boxes

Leveraging KVM Virtualization on Linux
For Linux users, the need for external virtualization applications such as VirtualBox and VMware can often be bypassed. KVM (Kernel-based Virtual Machine) represents an integrated, open-source virtualization solution directly within the Linux kernel itself.
A graphical interface, GNOME Boxes, simplifies the utilization of KVM, offering a streamlined experience for users.
KVM vs. Virt-Manager
Previously, we suggested employing Virt-Manager for the creation of KVM virtual machines. However, GNOME Boxes distinguishes itself as a more accessible tool.
Boxes is specifically engineered for typical desktop users, contrasting with Virt-Manager’s focus on system administrators. Its usability extends beyond the GNOME desktop environment; it can function across various desktop interfaces.
The design philosophy behind Boxes prioritizes ease of use, making virtualization more approachable for a wider audience.
Despite its name, GNOME Boxes isn’t limited to the GNOME desktop environment. It’s adaptable and can be successfully implemented on other desktop environments as well.
Hardware Virtualization is a Necessity: Intel VT-x or AMD-V
For context, this process leverages QEMU, which in turn utilizes KVM – the Kernel-based Virtual Machine – to deliver virtualization with hardware acceleration.
The KVM system fundamentally depends on the presence of either Intel VT-x or AMD-V, which are hardware virtualization extensions. Users with Intel processors may need to access their computer’s BIOS or UEFI firmware settings to activate Intel VT-x.
What Happens Without Hardware Support?
If your system lacks these necessary hardware virtualization features, KVM will be unable to function. In such cases, alternative virtualization solutions like VirtualBox or VMware should be considered.
Gnome Boxes will notify you if your hardware does not support the required KVM extensions when you attempt to establish a new virtual machine.
Essentially, the application relies on these extensions for optimal performance and functionality.
Installing GNOME Boxes
This guide details the installation process for GNOME Boxes. It is related to installing KVM and creating virtual machines on Ubuntu.
Installation Procedure
GNOME Boxes is typically included in the software repositories of most Linux distributions. This is due to its integration with the GNOME desktop environment.
To install, navigate to your distribution’s package manager or software installer. Then, simply search for "Boxes" and proceed with the installation.
During installation, Boxes will automatically acquire any necessary dependencies. Consequently, no additional configuration steps are generally needed.
Comparison with Virt-Manager
While powerful, Boxes doesn't entirely supersede Virt-Manager. Virt-Manager provides a more extensive feature set for advanced users.
Specifically, Virt-Manager allows for greater customization of virtual machine settings. It also supports the creation and restoration of virtual machine snapshots.
If these advanced capabilities are required, installing Virt-Manager is recommended instead.
Boxes offers a streamlined experience for basic virtual machine needs.
Consider your requirements when choosing between GNOME Boxes and Virt-Manager.
Establishing and Initiating Virtual Machines
To begin, activate the Boxes application through your system’s menus or by executing the command gnome-boxes. Initially, the Boxes window appears relatively empty. This is because the primary view will ultimately display a listing of the virtual machines you establish.
Select the "New" button to initiate the setup of a new virtual machine.

GNOME Boxes presents an introductory overview, clarifying its capability to construct local virtual machines operating on your computer or virtual machines hosted on a remote server.
Proceed through the wizard, specifying an ISO file from which to install the virtual machine. Linux ISOs can be downloaded for virtualization purposes, and Windows ISO files are also obtainable from Microsoft – provided a valid Windows product key is available.
Similar to other virtualization platforms, Boxes automatically identifies the operating system contained within the provided ISO file and suggests appropriate default configurations. Generally, clicking "Continue" and progressing through the wizard, accepting the default settings, will result in a well-configured virtual machine for your system.

The "Customize" button, located on the Review screen, enables adjustments to a limited number of straightforward settings, including the amount of memory to be allocated to the virtual machine. For more in-depth configuration options, Virt-Manager is the recommended alternative to Boxes.

Now, simply click Create to generate the virtual machine and initiate its first boot sequence using the installation media. Complete the operating system installation process within the virtual machine environment.
Upon reopening Boxes, a list of your installed virtual machines will be visible, allowing for rapid launching of each.

Boxes may not fulfill the needs of all users. More sophisticated functionalities leveraging QEMU-KVM are available within Virt-Manager. Additional features might necessitate the use of VirtualBox or VMware, which represent more refined and mature applications boasting a wealth of user-friendly features.
These include hardware driver packages such as VirtualBox Guest Additions and VMware Tools, designed to further enhance virtual machine graphics performance and enable functionalities like access to USB devices connected to your host PC from within the virtual machine.
However, if your requirements center around fundamental virtualization capabilities within a streamlined application – one that utilizes Linux’s native KVM features and other open-source components – consider giving Boxes (or its more comprehensive counterpart, Virt-Manager) a trial. Continued improvements to the underlying open-source virtualization software promise to enhance its power, flexibility, and speed.