An Easy Way to Set Up Virtual Machines in Linux


GNOME, a popular Linux desktop environment, comes with many default apps. The GNOME desktop’s suite of built-in apps can cover a desktop user’s everyday needs.

Among GNOME’s apps is Boxes, a virtualization tool that lets Linux users emulate other operating systems. With this app, you’ll be able to get virtual machines working right out of the box.

What Is GNOME Boxes?

Flathub GNOME Boxes webpage

Boxes is an easy-to-use virtualization tool built for the GNOME desktop environment. Apps like Boxes allow users to run virtual machines or emulated operating systems, within their desktops.

Boxes is very useful if you’re a distro hopper who wants to try out other Linux-based distributions. You can also use Boxes to set up a Windows virtual machine if you’ve just made the switch to Linux, but still have some tasks that you need to do on Windows.

GNOME Boxes in particular is a graphical implementation of the open-source virtual machine emulator QEMU. QEMU serves as a great alternative to other popular virtualization apps like VirtualBox and VMware. QEMU’s free, open-source, and cross-platform nature helps make it a reliable virtualization tool.

GNOME’s VM tool may remind you of a similar app called virt-manager. While both are graphical VM apps based on QEMU, Boxes prefers the ease of use over virt-manager’s many customization options.

virt-manager is great for power users who want to get the most performance out of their VMs. Meanwhile, Boxes is perfect for newer virtual machine users. It’s also great for those who want to emulate operating systems without any fuss.

GNOME Boxes also features a sleek GNOME-based user interface. Both are just two of many more QEMU-based VM emulators.

Boxes is built into GNOME-based Linux distributions like Fedora. If your distro doesn’t come with Boxes, then it should be available on your distro’s official repositories. To install Boxes this way, use one of these commands:

For Debian/Ubuntu users:

 sudo apt install gnome-boxes 

For Fedora users:

 sudo dnf install gnome-boxes 

For Arch users:

 sudo pacman -S gnome-boxes 

You can also install Boxes through Flatpak. Note that while the Flatpak version tends to receive fast updates, it lacks the feature to let virtual machines access USB drives.

Download: Boxes

How to Set Up Virtual Machines With Boxes

GNOME Boxes main window

Setting up a virtual machine on GNOME Boxes is a simple affair. The main window of the Boxes app is where you can open, create, close, and delete virtual machines. To create a new virtual machine on Boxes, click the Plus button in the top-left corner of the screen.

GNOME Boxes Create a Virtual Machine window

In the Create a Virtual Machine window, Boxes will prompt you to select an OS to virtualize. Boxes will detect any OS disk images that are on your file system. You can also manually look for a disk image file. Boxes also gives users the option to download an OS disk image from the app.

We’ll be using Ubuntu to test out the app, but any operating system will work on Boxes.

GNOME Boxes Express Installation window

Once you’ve selected an OS, you can begin setting up your virtual machine. Click Express Install if you want Boxes to streamline the OS install process for you. You’ll need to preset the home user on your virtual machine with an express installation. Note that this feature may not work across all operating systems.

When you’re done, click Next to proceed.

GNOME-Boxes Review and Create window

Before creating your virtual machine, you can set how much RAM and disk space you want to allocate to the VM. You can also opt to have EFI instead of legacy BIOS on your virtual machine. Click Create to begin creating your own virtual machine.

Ubuntu 22.04 LTS virtual machine installation on GNOME Boxes

Once the VM boots up, you’ll need to install the OS if you opted out of an Express Installation.

If you’re following this guide by setting up an Ubuntu VM of your own, then most of the steps of our Ubuntu installation guide will apply.

Once you’ve installed the OS on your virtual machine, you can use the VM as if it were a separate desktop. You can test and play around with the virtual machine to suit your needs.

Click the Arrow button in the top-left corner at any time to return to Boxes’ main window. If you did not shut down your VM while doing this, it will continue to run in the background. You can also shut down the operating system within the VM to save your work.

In the main window, you can force shutdown, clone, delete, and reconfigure your VMs. Cloning virtual machines is useful for testing out different changes to a base virtual environment. You can also open the virtual machine in a new window. With Boxes, you can run two or more virtual machines at the same time—if your computer can handle it.

GNOME Boxes Ubuntu virtual machine preferences

In the Preferences window, Boxes gives virtual machine users more custom options.

You can adjust your VM’s allocated CPU cores, RAM, and disk space. On non-Flatpak versions of Boxes, you can redirect your USB devices to mount on your virtual machine instead of your host desktop. You can even share folders and files between your VMs and your main desktop.

Snapshots are an important tool for any virtual machine user. They allow users to revert any unwanted changes on their virtual machine. The feature works like System Restore on Windows or Timeshift on Linux.

To use Boxes’ snapshots feature, click the Snapshots tab in the Preferences window. There, you will be able to create a snapshot and restore it as needed.

Boxes has even more hidden features like remote desktop control and clipboard sharing. The GNOME Wiki covers these and more of Boxes’ features.

Easy Virtualization Out of the Box With GNOME Boxes

GNOME Boxes delivers on its promise of emulating operating systems without any fuss. It has a straightforward setup process and a modern user interface. Boxes is perfect for any Linux user wanting to get into the world of virtual machines.

Virtualization is a major part of the Linux ecosystem. Understanding VMs is essential for any Linux user that wants to get the most out of their desktops.


Source link

Leave a Reply

%d bloggers like this: