[libvirt] Startup/Shutdown scripts for KVM Machines in Debian (libvirt)

Hermann Himmelbauer dusty at qwer.tk
Wed Nov 10 16:42:43 UTC 2010


Am Mittwoch 10 November 2010 16:19:41 schrieb Guido Günther:
> On Wed, Nov 10, 2010 at 10:35:40AM +0200, Avi Kivity wrote:
> > On 11/10/2010 10:01 AM, Hermann Himmelbauer wrote:
> > >Hi,
> > >I manage my KVM machines via libvirt and wonder if there are any init.d
> > >scripts for automatically starting up and shutting down virtual machines
> > >during boot/shutdown of the host?
> > >
> > >Writing this for myself seems to be not that simple, as when shutting
> > > down, the system has somehow to wait until all machines are halted (not
> > > responding guests have to be destroyed etc.), and I don't really know
> > > how to accomplish this.
> > >
> > >My host system is Debian Lenny, is there anything available?
> > >Perhaps libvirt offers something I'm unaware of?
> >
> > I think it does.  Copying the libvirt mailing list.
>
> There's a script
>
> /usr/share/doc/libvirt-bin/examples/libvirt-suspendonreboot
>
> in Debian but I think Laurent is currently working on switching this to
> the upstream libvirt-guest script which will then be installed by
> default.

First of all - thanks a lot for your help! Suspending the guest is even better 
than stopping it.

But I think that the simple "autostart" in virsh will suffice for my situation 
for now, and I'll wait until this makes it way into upstream.

Thanks!

Best Regards,
Hermann

-- 
hermann at qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7




More information about the libvir-list mailing list