[virt-tools-list] shutdown / save guest state on host shutdown / reboot?

Eric Blake eblake at redhat.com
Tue Nov 2 17:04:49 UTC 2010

On 11/02/2010 07:34 AM, Laurent Léonard wrote:
>> Or? What are other people on this list using to stop or save guest state
>> graciously when the host reboots / halts?
>> Maybe there is some solution already? Custom scripts? If everyone is
>> using custom scripts, maybe it's time to show some code and start
>> building on that?
> Here is the script that we provide with libvirt Debian package:
> http://git.debian.org/?p=pkg-libvirt/libvirt.git;a=blob;f=debian/libvirt-
> suspendonreboot;h=088527fb0e3d54f583da430eab468d6472a660c1;hb=HEAD
> It uses virsh and works fine, but an integrated feature in libvirt (to be 
> compatible with/like the autoboot feature that already exists) should be 
> welcome.

Libvirt 0.8.3 and newer provide the managedsave feature, which is
_exactly_ what you are supposed to be using to get this behavior of
saving all guest state on host shutdown, then resuming the guest from
that same state on next host boot.  Upstream libvirt includes the
libvirt-guests init script for Fedora-based systems; you may want to
compare your debian script against the fedora version and post that for
upstream inclusion (it seems to me that the only reason that upstream
libvirt does not currently include non-fedora solutions is that no one
has yet proposed any patches for inclusion).

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20101102/516b0f3a/attachment.sig>

More information about the virt-tools-list mailing list