PDA

View Full Version : KVM how to Shutdown Guest when host shutdown / Reboot



bhrt60
09-Mar-2014, 10:58
I've just started using KVM

how do I configure Guests to gracefully shutdown when Host is shutdown or rebooted ?

Magic31
09-Mar-2014, 13:03
I've just started using KVM

how do I configure Guests to gracefully shutdown when Host is shutdown or rebooted ?

Simply enable the libvirt-guests deamon. That should gracefully handle guests stopping and starting during a host reboot.

Note that by default this will run scripts to suspend running guests and resume them when the KVM host is booted.
To change the behavior to doing a full guest shutdown, change the ON_SHUTDOWN parameter in /usr/lib(64)/libvirt/libvirt-guests.sh from suspend to shutdown (all small case).

Cheers,
Willem