move gnome-boxes image to another host Leave a reply
Let’s answer a few questions before we move:
Q: where does gnome-boxes store images? ~/.local/share/gnome-boxes/images
Q: Are there other directories I need to backup? ~/.config/libvirt ~/.config/gnome-boxes
If you do not have any existing gnome-boxes images on your new host, please copy these three directories to your new host. It just works!
If you have existing images at your new host, do NOT directly copy these directories to your new hosts. Otherwise, you will overwrite your existing images and configurations.
Let’s assume the image you want to move is: ~/.local/share/gnome-boxes/images/win10
so there is a config file corresponding to this image: ~/.config/libvirt/qemu/win10.xml
Step 1: copy the above two files to the new host
Step 2: find the correct uuid for your image in: ~/.config/libvirt/qemu/win10.xml
Step 3: open qemu session file: ~/.config/gnome-boxes/sources/'QEMU Session' (I think this file is used to display the sessions at gnome-box main window when you open the application)
you will see something like:
[display A-B-C] last-seen-name=Microsoft Windows 10 uuid=X-Y-Z access-last-time=1234567890 access-ntimes=1 access-total-time=1
append the corresponding session information with the same uuid to new host at: ~/.config/gnome-boxes/sources/'QEMU Session'
Step 4: restart gnome-boxes and you will see your old VM image
References
[https://www.debugpoint.com/2020/06/move-virtual-machine-image-another-host/]
[https://ask.fedoraproject.org/en/question/29704/how-do-i-move-a-virtual-machine-in-gnome-boxes-to-another-host]