How to Install and Use GNOME Boxes to Create Virtual Machines

4 min


This quick tutorial explains the steps to install and use GNOME Boxes and create virtual machines, and with some tips and troubleshooting as well.

Virtualization is a process of running a virtual instance (rather than actual) with an abstracted layer of hardware. In popular terms, it allows you to install and run multiple operating systems (Linux, Windows) simultaneously. 

A Virtual machine is a simulated operating system that runs on top of another operating system and uses the same hardware, storage space with the host machine. Although, you can control how much shared memory or space can be allocated to virtual machines. 

There is multiple software available to create virtual machines, e.g. Virtual Box, KVM, Hyper-V, VM Ware player, and GNOME Boxes.

But honestly, most of them are complex to use and sometimes not stable enough. GNOME Boxes is another free and open-source software that is very easy to use and makes it simple for you to create, manage virtual machines by abstracting lots of options.

Install GNOME Boxes

If you are running Fedora with GNOME Spin, you should already have it installed. However, for Ubuntu, Linux Mint, Kubuntu, and other distributions you can simply run below to install it in your system.

sudo apt install gnome-boxes

Create Virtual Machine using GNOME Boxes

Launch GNOME Boxes from the application menu. To create a virtual machine you need an image (*.ISO) of the operating system which you want to virtualize. You can download any operating system iso images from the official download page of the distributions. For this guide, I am using Pop! OS which is a great Linux distribution.

After you launch, click on the “+” icon at the top to start.

Create Virtual Machine
Create Virtual Machine

In the next window, you can choose already available downloads or you can select your iso file as OS source. Click on the “Operating system image file” and choose your iso file.

Assign the memory and storage space of your virtual machine. Remember, your virtual machine would take the memory and storage from your host system. So try not to assign as max. For example, in the below image – I have assigned 2GB memory for the virtual machine (guest) from the total 8GB memory of the host system. Similarly, choose minimum storage space as well if you want to just test any OS. But if you are creating a virtual machine for servers or serious work, be logical how much space or memory you want to assign. Another important thing to remember that the storage disk space which you allow will be blocked permanently unless you delete the virtual machine. So, you won’t get that much of disk space as free even if your virtual machine doesn’t use the entire allocated space. 

Allocate resources for your virtual machine
Allocate resources for your virtual machine

Continue with the installation. In the partition window, you should be seeing one harddisk and partition which is the virtual machine disk space. Don’t worry, you can play around with this partition and it will not impact your physical disk partitions or any data on your actual host system. Follow the same /root partition while installing Linux, and continue.

Virtual machine partition
Virtual machine partition

After you complete the installation, you should be seeing your new operating system in the virtual machine. In the GNOME Boxes, you should see an entry to the system. You can click once to boot your virtual machine. 

You can power off the virtual machine by using your virtual machine operating system’s internal shutdown option.

If you want you can delete the virtual machine by choosing the context menu option.

Context menu in installed virtual machine
Context menu in installed virtual machine

You can also check how much memory, CPU your virtual machine is using from the properties window. Note that you can adjust the memory as well of your existing virtual machines using properties.

System properties
System properties

Troubleshooting

Resolution problem in virtual machines

If your virtual machine is having low resolution which is incompatible with your host system, then you have to install the below items. Open up terminal in the guest system (not in the host system) and run below commands.

For Ubuntu-based distributions

sudo apt install spice-vdagent spice-webdavd 

For Fedora

sudo dnf install spice-vdagent spice-webdavd 

These two packages help to determine proper resolutions, copy/paste between host and guest, sharing files via public folders, etc. 

Once installed, reboot the guest system; Or you can log off and re-login once after reboot, you should be seeing the proper resolution.

Boxes don’t start a virtual machine in Ubuntu 18.04 based distributions

If you are creating a virtual machine in Boxes 3.34 then you should know that there was a bug that caused your virtual machine to fail to start. To fix that you have to follow some additional steps. Remember these are not required for the latest Boxes 3.36.

Open a terminal window and run below command to change the qemu config file

sudo gedit /etc/modprobe.d/qemu-system-x86.conf

Add the below line in the above file and save.

group=kvm

Now, run below command to add your username to the KVM group.

sudo usermod -a -G kvm <your account name>

If you still facing issues with virtual machines with GNOME Boxes, let me know using the comment box below. 


We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

9 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
9
0
Would love your thoughts, please comment.x
()
x