Are you in need of a KVM virtual machine in Ubuntu but don’t know where to start? As it turns out, the Gnome Boxes app makes setting up a KVM virtual machine in Ubuntu a breeze. In this guide, we’ll show you how to do it!
How to create a KVM virtual machine in Ubuntu – Gnome Boxes
The easiest and fastest way to create a KVM virtual machine on Ubuntu is with the Gnome Boxes tool. This program takes the headaches out of setting up a KVM environment on Linux by doing pretty much everything for the user.
That said, the Gnome Boxes application, while excellent, does not come pre-installed on Ubuntu. So, before we go over how to create anything with the app, we’ll need to go over how to install it on Ubuntu.
Install via Ubuntu Software
If you’re a typical Ubuntu User, you might prefer to install software through the Ubuntu Software app rather than dealing with the terminal. To install Boxes through Ubuntu Software, do the following.
First, launch Ubuntu Software by pressing Win, searching for “Ubuntu Software,” and opening the app with the orange shopping bag icon. Once it is open, find the search box in the upper-left-hand corner, and click on it with the mouse.
In the search box, type “Gnome Boxes” and press the Enter key. The Gnome Boxes app should be the first result in the search. Click on it with the mouse to access its software page.
On the Gnome Boxes software page, find the “Install” button and click on it with the mouse to start installing Boxes onto Ubuntu. It should only take a couple of seconds.
Install via Terminal
If you use Ubuntu and love the terminal, you can quickly get the Gnome Boxes application up and running with the command line. To start, open up a terminal window on the Ubuntu desktop by pressing Ctrl + Alt + T on the keyboard or by searching for “Terminal” in the app menu.
Once the terminal window is open and ready to go, use the apt install command to install the “gnome-boxes” package on your computer. This installation will only take a couple of seconds to complete.
sudo apt install gnome-boxes
Install via Flatpak
Gnome Boxes is also available as a Flatpak package in the Flathub app store. So, if you prefer Flatpak to what is included with Ubuntu, you can quickly get it working. To start, you’ll need to install the Flatpak runtime on Ubuntu.
To install the Flatpak runtime, follow this guide on the subject. When you’ve finished configuring the Flatpak runtime for Ubuntu, you will need to enable the Flathub app store using the command below.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Finally, you can install the Gnome Boxes app from the Flathub app store by making use of the following flatpak install command.
sudo flatpak install flathub org.gnome.Boxes
How to create a KVM virtual machine in Ubuntu – Setting up the VM
First, open up Gnome Boxes on the Ubuntu desktop. Once it is open, press the + symbol in the left-hand corner. By pressing this button, the “Create a Virtual Machine” menu will appear.
In this menu, locate the “Featured Downloads” menu. In this area, you can download Red Hat Enterprise Linux, Fedora, as well as Fedora Silverblue. Alternatively, if you wish to download a different OS, find “Select an OS Source” and choose the “Operating System Download” option to download any OS directly to Gnome Boxes.
When you’ve made your download choice, Gnome Boxes will show you a download bar. It’ll then attempt to download the software to your computer. Keep in mind that this download will take some time, as most OSes are a few gigabytes in size.
After the download process is complete, a “Review and Create” window will appear. In this window, Gnome Boxes will display a default configuration for your KVM virtual machine in Ubuntu. Find and click on the “Create” button to make the VM.
Once the “Create” button has been selected, your KVM virtual machine will instantly startup. From here, you will need to go through the installation process to install the KVM virtual machine OS to the Gnome Boxes.
When the installation is complete, reboot it. After it reboots, feel free to shut it down.
How to create a KVM virtual machine in Ubuntu – Accessing your VM
From here, any time you wish to access the virtual machine, simply click on it in Gnome Boxes to start it up. When you click on the virtual machine icon in Gnome Boxes, it will start up and be ready to use.
If you need to access other features in the virtual machine, click on the menu next to the minimize button. It reveals many useful features that can add to the KVM virtual machine experience.