[sheepdog-users] sheepdog snapshot & qemu-ga

Valerio Pachera sirio81 at gmail.com
Tue May 27 10:33:54 CEST 2014


This is a non interactive procedure to freeze the guest vdi before taking
the snapshot and unfreeze it right after.

The guest must run qemu-ga.
It's possible to run it also on windows guest, but I didn't tested it yet.
The host must run qemu 0.16 or higher.

Host side:
run guest with options
-chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \
-device virtio-serial \
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

Guest side
qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 &

Host side
echo '{"execute":"guest-fsfreeze-freeze"}' | socat
unix-connect:/tmp/qga.sock -
dog vdi snapshot yourvdi
echo '{"execute":"guest-fsfreeze-thaw"}' | socat unix-connect:/tmp/qga.sock
-

You can check the status any time by
echo '{"execute":"guest-fsfreeze-status"}' | socat
unix-connect:/tmp/qga.sock -

It's possible to use tcp connection instead of socat.
I didn't try yet.

References
http://wiki.qemu.org/Features/Snapshots#Snapshot_command_flow
http://wiki.qemu.org/Features/QAPI/GuestAgent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog-users/attachments/20140527/23258c0f/attachment-0004.html>


More information about the sheepdog-users mailing list