Michael Hill
mdhillca@gmail.com 2018
Write the configuration of a box to a file to back it up or move it.
Fran Dieguez
frandieguez@gnome.org 2018-2023.

# Respaldar e mover a súa caixa

Two components are required to back up or move a box: the image file, and the configuration of the box saved as an XML file. Saving the configuration requires the virsh command from the libvirt or libvirt-client package.

Unha xanela de terminal escriba

virsh dumpxml Nome > Nome.xml

where Name is the Boxes name, or domain, of your box. To list the domains seen by Boxes, type

virsh -c qemu:///session list --all

Copy the .xml file you just created to your backup or temporary storage location.

Copy the image file to your backup or temporary storage location. It will be a file with the domain name of your box and ending in .qcow2, located in ~/.local/share/gnome-boxes/images/.

# Restaurar unha caixa

The saved box can be installed into Boxes on a new host machine, or on the original machine as part of a disaster recovery scenario.

Saír de Caixas.

Copy the .qcow2 image file from your backup or temporary storage location into the ~/.local/share/gnome-boxes/images/ directory in the new location.

In a terminal window, navigate to the directory or device containing the .xml file you stored. Type

virsh define Nome.xml

onde Nome é o dominio da súa caixa.

Iniciar Caixas.