I want to backup kvm virtual machines and copy machine's images another path or usb disk? How to copy " qemu raw images"?
How to copy qemu raw images
backupkvmqemu
backupkvmqemu
I want to backup kvm virtual machines and copy machine's images another path or usb disk? How to copy " qemu raw images"?
Best Answer
Copy kvm virtual machines is not complicated: First, you need to shutdown the virtual machine, then you need to find the disk image where the virtual machine is stored and finally copy it to another place (
cp /path/to/disk_image /new_path/
).If the virtual machine is stored on its own partition, use
dd if=/dev/PARTITION of=/path/to/backup/backup.img bs=1M
or useddrescue /dev/PARTITION /path/to/backup/backup.img
.The virtual machine images could be stored in different formats. Usually, the
qcow2
-format is used. To get theraw
format, you can useqemu-img convert
.