3

Assume a KVM/QEMU VM, which uses qcow/qcow2 as the image format for virtual disks. Backup is (to be) done on the VM host.

As far as my current understanding goes is that while we can create backups from the vm right out of the box using snapshots (with LVM, for example), these backups are merely crash-consistent, which is really not appropiate IMHO. Also, upon closer inspection, a lot of the tools and scripts currently floating around are doing exactly that - so either the authors were lazy or missed some fundamentals, or I'm completely wrong about the whole show.

My current solution is to call fsfreeze (or use the device-mapper) in the vm, prior taking the snapshot on the host.

However, how do I do this elegantly from the host? Using the virtio channel, speaking to qemu-ga or using QMP; they all seem to be in their infancy, highly asynchronous, and furthermore, it seems nothing is guaranteed to come through.

Am I really required to manually log into the VM's? Are there no tools handling this properly already existing ? (There are a lot of features proposed for QEMU, but I couldn't find any [decent] doc's on implemented features relating to this).

3

What you are talking about is a function of the QEMU Guest Agent, or qemu-ga in short. Please take a look at https://wiki.qemu.org/Features/GuestAgent

3
  • I already knew about it, however, as described above it doesn't seem really stable to me (also refer to git.qemu.org/…). Do you have any experience using it? – Roman Jul 9 '13 at 7:07
  • Your answer led me into the right direction. After reading much more, I'm now convinced that it's stable and the right way to do. – Roman Jul 9 '13 at 8:46
  • glad you found it useful. qemu-ga is the officially correct way of doing this, although you could of course write something of your own – dyasny Jul 9 '13 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.