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

Laurent Léonard laurent at open-minds.org
Tue Nov 2 13:34:36 UTC 2010


Le mardi 02 novembre 2010 13:57:00, Tomasz Chmielewski a écrit :
> On 02.11.2010 13:28, Zdenek Styblik wrote:
> 
> (...)
> 
> >> What are the ways to automate guest shutdown or save/resume state of the
> >> guests upon host shutdown/reboot?
> > 
> > I don't know the correct answer, but what pop-ed up in my head instantly
> > was...
> > 
> > How about to write a shell script, which is going to be called
> 
> Well, write your own shell script is always a possibility.
> 
> But it's hard for me to believe that with a complex solution like virsh
> / libvirt, where almost all aspects of running virtual guests are
> covered, I'm the first person to ask about such basic functionality ;)
> 
> 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.

-- 
Laurent Léonard




More information about the virt-tools-list mailing list