I am going to retire an old libvirt + KVM server, but I need to preserve the VMs. Unfortunately, the network is down and I cannot create connections to the system.
Is there any way to export the VMs using virsh
or any other utility?
Clarification: I need disks and everything. I will deploy machines to another server.
Best Answer
If you need to backup your vm configuration using virsh you can use the following command
If you need to move your vm to other server, you can dump your vm config and transfer the xml, if you are using files as backend storage for your vm you can copy the files to other server using scp or rsync, when you copied the disk files of the vm, you can try to start the vm with
virsh define /tmp/myvm.xml && virsh start myvm