Critical Battery Action
I'm toying with the built in UPS support in Server 2008 (basically like having a laptop with battery), and did a test, when the critical battery level was reached, the shutdown was almost instant. Normally my server takes 3 minutes or so to shut down, but this was like desktop, mouse switched to hourgass, and then server powered off, no shutdown screens or anything. Upon reboot I was asked for a reason for the unexpected shutdown so it doesn't appear to have been graceful in any way. I have a RAID card with write cache enabled and no battery (sincethe PC is UPS protected), and it didn't complain of lost data upon reboot as it normally would, but that may have just been lucky, the shutdown was at like 2am and it very well could have been mostly idle.Is this some "critical rapid shutdown" feature or a bug? I really want graceful shutdown, or at the very least to have it signal the raid card to commit unwritten data, which it may have done here, but no way to be sure.Server 2008 x64 Enterprise.APC UPS via USBActually, looking in the detailed logs for my RAID card, it does appear that the OS signaled it that it was shutting down. So I guess this must be some sort of fast shutdown, but I can't imagine it is managing to gracefully shutdown Exchange 2007 and everything else in a matter of a few seconds, but maybe it commits important database stuff then signals immediate stop of services or something.Also, I'm wondering if there is any way to enable any sort of logging for battery/power events? Switched to battery, switched to AC Power, shutting down, etc. Noting shows in event log now that I can see, figure there may be some debugging/higher logging level available somewhere.
July 13th, 2009 7:00am
Hi, Thank you for posting here. Im afraid this is a known issue with Vista/Windows Server 2008. If you set Critical Battery Action to Shut Down, it will not work properly to shut down system. Error 6008 was recorded in Event log. Product Team has investigated this issue. But solution is not available currently due to the complexity of involved system components. This should be fixed in Windows 7/Windows Server 2008 R2. Sorry for the inconvenience this has brought. I suggest you change the Critical Battery Action to Sleep or Hibernate to avoid unexpected shut down. Thanks.This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 14th, 2009 5:15am
Hi,Thank you for posting here. Im afraid this is a known issue with Vista/Windows Server 2008. If you set Critical Battery Action to Shut Down, it will not work properly to shut down system. Error 6008 was recorded in Event log. Product Team has investigated this issue. But solution is not available currently due to the complexity of involved system components. This should be fixed in Windows 7/Windows Server 2008 R2. Sorry for the inconvenience this has brought.I suggest you change the Critical Battery Action to Sleep or Hibernate to avoid unexpected shut down.Thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
My server 2008 doesn't list sleep or hibernate as options. I know there is a hidden way to enable hibernate support but honestly I'd prefer it just shutdown cleanly, as I don't believe either sleep or hybernate would gracefully shut down they hyper-V VMs? I'm not sure if sleep should be there or not, I'd kind of suspect not on a server OS? Using the APC software for the UPS had the same symptom on shutdown I believe so it must use the same mechanism to shut down.Would using the "low battery action" make any difference? Probably not. I guess I need to find some 3rd party program to run a script upon low battery or something....That's a pretty big bug since many people use UPSs on their servers? I sure hope pricing for R2 reflects the fact that it fixes bugs that won't be fixed in 2008...
July 15th, 2009 10:44pm
Hi, Thank you for your reply. I understand you wouldnt like to enable hibernation instead. If you would like to, you may refer to the "Sleep" section of the article below to enable Sleep. http://support.microsoft.com/kb/947036 There is no report that "low battery action" didnt operate correctly; you can test it. Also, this problem has been fixed in Windows Server 2008 R2. Thanks. This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2009 11:11am
I think with "Sleep" it is still bad if power is lost so that probably won't help. I'll try the low battery action as "shut down" and see if that works, would seem odd that that works but not the critical one? We'll see.
July 16th, 2009 8:52pm
Hi, Thank you for update. If there is anything else we can do for you, please let us know. Thanks. This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2009 4:58am
Hi Mervyn,Is this a registered problem? Could you point me to kb article or notice that it is fixed in R2? Thanks!
September 15th, 2009 10:24am
I use the following VBS script to gracefully shutdown W2008 when battery level goes beyond threshold:set wmi = GetObject("winmgmts:{impersonationLevel=impersonate,(Shutdown)}!\\.\root\cimv2")set batteryColl = wmi.ExecQuery("select * from Win32_Battery")set osColl = wmi.ExecQuery("select * from Win32_OperatingSystem")
while truefor each battery in batteryCollbattery.Refresh_if battery.batteryStatus = 1 and battery.EstimatedChargeRemaining <= 5 thenfor each os in osCollos.Win32Shutdown 5nextend ifnextwscript.Sleep 15000wendHere, batteryStatus = 1 is 'Discharging' and EstimatedChargeRemaining is the charge level to check.Systemwide critical level should be set even lower so there is time to shutdown gracefully before it triggers.You should have SE_SHUTDOWN_NAME privilege (you likely do on a laptop).Add the script to Startup menu folder or schedule a task.Enjoy!
Free Windows Admin Tool Kit Click here and download it now
September 15th, 2009 12:56pm