1

I have a kvm guest machine on raw disk that I would like to clone so that I could restore it to another kvm host machine on lvm with drbd. I need to do this without any or as little downtime as possible. All the hosts are on Debian Wheezy.

What is the best possible way to achieve the above?

Thank you all in advance.

Kay
  • 11
  • 2

2 Answers2

0

Use qemu-img convert with in and output formats as raw, to copy the image from anywhere to anywhere, be it a file or a block device. Another option is dd or cpio but qemu-img is the preferred utility to manipulating VM disk images

dyasny
  • 18,802
  • 6
  • 49
  • 64
0

If you can't tolerate any long downtime, consider using KVM live migration feature: it can be used to provision a second host with the required VM image, then move the running in-memory image on that second host, all without significant downtime (some seconds at most).

shodanshok
  • 47,711
  • 7
  • 111
  • 180