After configuring the virtual machine with virt-manager
, you might want to export the XML settings for backup via version control or external copy. To do that, we use the virsh
export XML command.
First, determine the VM name. It is the one that you input.
Now open up a terminal and perform the export. Here's an example:
$ VMNAME='win7'
$ sudo virsh dumpxml "$VMNAME" > ./"${VMNAME}.xml"
This creates the local XML file for future backup alongside with the virtual hard disk.
That's all about exporting the XML.