Shutdown guests on powerfailure.
Hi,
When power fails, the UPS (nut) save the state of all aktive guests. This takes a lot of time. Is it possible to make nut do a normal shutdown instead ? Regards. |
Which software does nut use on the host when the power fails?
Which virtualisation software is used to run the guests? |
We use Cent OS 6.2 with KVM.
Here are the config-files. I think it's Netwatch, not 100% sure. ’root@nyborg ~¸# cd /etc ’root@nyborg etc¸# cd ups ’root@nyborg ups¸# ls -l total 40 -rwxrwxrwx 1 nobody root 157 Jan 30 14:42 notify.sh -rw-r----- 1 root nut 1413 Aug 5 2011 nut.conf -rw-r----- 1 root nut 3738 Nov 24 12:08 ups.conf -rw-r----- 1 root nut 2589 Nov 24 13:29 upsd.conf -rw-r----- 1 root nut 2271 Nov 24 12:12 upsd.users -rw-r----- 1 root nut 12308 Dec 2 15:03 upsmon.conf -rw-r----- 1 root nut 3891 Aug 5 2011 upssched.conf ’root@-nyborg ups¸# ’root@-nyborg ups¸# |
The UPS-software is nut !
|
According to the upsmon.conf man page, SHUTDOWNCMD command can be used to configure a command for upsmon to run when the system needs to be brought down. That command could be a script which shuts down the VMs and then shuts down the host.
IDK KVM so cannot advise on the command(s) to shut down the VMs. If netsearching dosn't give you a solution, it might be worth a new thread, asking how to shut down KVM VMs programatically. |
Non-default shutdown
We had the same problem with nut waiting until the battery had about 2 minutes life left in it. This corrupted the VM's because they needed time to save their state to the disk.
The approach of using a Non-default shutdown worked for us. Check this out http://linuxman.wikispaces.com/NUT and scroll down to the Non-default shutdown section. |
Thanks :-)
I'll test it. |
All times are GMT -5. The time now is 02:00 AM. |