Move Virtual Machine Image to Another Host Using GNOME Boxes

2 min


This guide explains the steps you need to move Virtual Machine Image to Another Host Using GNOME Boxes.

GNOME Boxes is a virtualization utility created by the GNOME project. This utility works as a front end for libvirt. libvirt is an open-source API, daemon, and management tool for managing platform virtualization. It supports different virtualization technologies such as KVM, Xen, VMware ESXi, QEMU, etc.

If you want to create virtual machines using GNOME Boxes, refer to this guide.

In this tutorial, I will explain how you can move any Virtual Machine image file (which is already created and running using GNOME Boxes) to a different host and run it.

This way you do not need to re-install the virtual machine from the operating system anymore. Moreover, it is portable and you can carry your virtual machine image in a USB stick.

How to Move Virtual Machine Image to Another Host Using GNOME Boxes

I hope you have already had a virtual machine created in GNOME Boxes; if not check out this guide.

  • GNOME Boxes and libvert uses below directories for the virtual machine images and configurations. You need to carefully take backups of each as mentioned below.
  • GNOME Boxes keeps the physical image of the virtual machine (this is usually in the size of GB) in the below path. For each of your virtual machines, you will find an image there.
~/.local/share/gnome-boxes/images/

Machine Images
Machine Images
  • Copy the image file to your new host’s path: ~/.local/share/gnome-boxes/images/
  • Copy the libvirt configuration XML from the below path to your new host’s same location.
~/.config/libvirt/qemu/
Image XML
Image XML
  • In the above path, you should be seeing separate xml files for each of your virtual machines. Copy the one you need.

  • Open the below file in your current system.
~/.config/gnome-boxes/sources/'QEMU Session'
  • Copy the section (from “[display” … to end of this section) which belongs to your virtual machine. You can easily find it using the name (see below – ‘last seen name’).
QEMU Session File
QEMU Session File
  • Open the same above file in the other host machine and append the copied content at the end. Save the file.
  • Close all applications including GNOME Boxes in the new host machine.

Open GNOME Boxes now and you should see your virtual machine moved with its contents in your new host.

You can now have a portable virtual machines which you can easily carry and move around. Remember, the target machine should have GNOME Boxes installed to make this work.


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.

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