Yahoo
Advertisement
Advertisement
Advertisement
Advertisement

I've used Linux for 6 years—this is the simplest way to run virtual machines

GNOME Boxes surrounded by several virtual machine screenshots.
GNOME Boxes surrounded by several virtual machine screenshots.

Before moving to Linux, I mostly just used VirtualBox on Windows to run virtual machines. It's available on Linux too, so I kept using it until I found out QEMU/KVM gives you much better performance. Setting QEMU up, though, was a confusing nightmare as a beginner because it's an advanced command-line tool. This is what I should have done instead.

Running virtual machines on Linux feels confusing, but doesn't have to be

The easy-peasy way to your first virtual machine

QEMU/KVM are two pieces of software that handle all virtualization on Linux. QEMU (Quick Emulator) is the emulator where virtual machines run. KVM (Kernel-based Virtual Machine) is a component built into the Linux kernel that lets a virtual machine talk to your processor directly. Typically, with other virtualization software, there's an extra layer of translation involved to reach the CPU. QEMU/KVM don't have that overhead, so it performs better.

The only issue is that QEMU is a complicated CLI tool. Unless you can read tons of dense documentation and learn to use its command flags, QEMU is a non-starter. That's why I stuck with VirtualBox. At least until I found out QEMU has GUI front-ends that make it easy to use.

Running a virtual machine using command-line QEMU.

The first is Virtual Machine Manager orvirt-manager, which lets you use QEMU/KVM without interacting with the terminal. It looks and feels a lot like VirtualBox. It still has a little bit of a learning curve. Plus, you need some know-how to install and set it up correctly. Even then you might run into dependency issues or conflicts. I've gone down that rabbit hole, and all I can say is whoever named it "dependency hell" was spot on.

Creating a new VM instance using Virtual Machine Manager on Linux.

So, whilevirt-managerdoes simplify things a great deal, it is still not a "just works" app. That's what GNOME Boxes is for.

Advertisement
Advertisement

GNOME Boxes is as simple as it gets. It comes as a single Flatpak package with all the right dependencies built right in. You can get a virtual machine up and running in just a few seconds. And it really just works.

QEMU and virt-manager are perfect for running niche or legacy operating systems like this Unix VM or this Windows clone I tried. If you just want a plug-and-play VM system for mainstream operating systems, GNOME Boxes is exactly what you want.

Installing GNOME Boxes

Just grab the Flatpak

The GNOME Boxes app is available in the official Linux repos for most distributions, but I'd recommend against using those. I tried installing it with APT , using the install-recommends flag, but it kept giving me this error. Apparently, there was some dependency version conflict, which I tried fixing for half an hour to no avail.

GNOME Boxes installed with APT keeps throwing errors.

Eventually, I gave up and installed the Flatpak version. Flatpaks are universal Linux packages that run on any distro or configuration. Typically, I'm not a fan of Flatpaks , but even the developer recommends using the Flatpak version of GNOME Boxes.

Installing GNOME Boxes as a Flatpak package.

If you want to avoid Flatpaks at all cost, you can try installing GNOME Boxes with the default package manager. For APT, you can run the following command.

Some Linux distros have the GNOME Boxes app preinstalled. You can check if yours does by looking up "Boxes" in the app search menu.

You can get a virtual machine running in two clicks

Downloading the operating system is included in the count

Typically, you need to find an installer image for your target operating system and point the VM software at it. GNOME Boxes simplifies that step too. Just click the "+" icon in the corner and click "Download." You'll see a list of operating systems you can search through and download with one click.

Launching Boxes from the application launcher menu.

If your target operating system isn't on the list or if you want to use the .iso image installer, you can click the "+" button and select "Choose from file." Boxes will intelligently allocate RAM and CPU cores for the new VM (which you can tweak at this step.) Then just click "Create" and the virtual machine should boot up right away.

Running an Arch Linux virtual machine using Boxes.
Advertisement
Advertisement

It has a beautiful and simple UI. One of my usual gripes with VM apps is how they handle moving the cursor between the host OS and the VM. You either have to press a button to capture or release the mouse or there is a noticeable stutter if it's automatic. GNOME Boxes automatically captures and releases the cursor in a way that feels smooth and seamless.

Created a new snapshot for the Zorin OS VM.

In a similar vein, it automatically adjusts the resolution and display size. To share files with the virtual machine, you can set up a shared folder. You can also drag-and-drop files directly.

You can also create what are called "snapshots." They let you create perfect clones or snapshots of your virtual machine , down to the position of the desktop shortcuts. For example, if you wanted to test malware, you could create a snapshot, run your tests, and then boot back into the snapshot.


I've never seen a more beginner-friendly VM app

Running virtual machines on Linux can feel confusing or intimidating at first if you've never used QEMU systems before. GNOME Boxes makes it perfectly simple and easy—easier than VirtualBox even.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: