How to backup the qemu kvm img files that are block files

kvm-virtualizationqemu

I inherited a pair/cluster of Ubuntu 10.04 servers running DRBD and QEMU/KVM and I want to backup the img files but they appear to be block files on the DRBD fs and I'm not sure how I can back them up. I tried to use the qemu snapshot command; it replies: qemu-img: "Could not create snapshot 'rhea_snapshot': -95 (Operation not supported)" the img files are in /dev/mapper folder.

Here is an example:

brw-rw—- 1 root disk 251, 12 2013-03-20 10:55 vg00-server1.img

Best Answer

Two options, stop or pause the VM and:

  1. dd the image into a raw file, if you use the raw format
  2. use qemu-img convert to copy the disk image into any format file