[sheepdog-users] sheepdog snapshot & qemu-ga
Liu Yuan
namei.unix at gmail.com
Tue May 27 11:40:43 CEST 2014
On Tue, May 27, 2014 at 10:33:54AM +0200, Valerio Pachera wrote:
> 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
This is nice howto. Could you please add this to our wiki on github? Then more
users can learn about it.
Thanks
Yuan
More information about the sheepdog-users
mailing list