XenServer: APC Smart Shutdown
– Connect the APC UPS to a non virtualized machine
– Install PowerChute
– Install XenCenter
– Create a default.cmd file (attached) which points to a batch file in the XenCenter directory
– Create a shutdown.bat file (attached) which shutdowns appropriate services, and then shuts down the xen servers, then the host.
– In the PowerChute console, configure it to run the default.cmd file on the power event
default.bat file:
xe.exe -s 192.168.1.10 -u root -pw P@ssword vm-shutdown vm=”SBS01″
xe.exe -s 192.168.1.10 -u root -pw P@ssword host-disable host=”XEN-HOST1″
xe.exe -s 192.168.1.10 -u root -pw P@ssword host-shutdown host=”XEN-HOST1″
default.cmd file:
@echo on
C:\Program Files\Citrix\XenCenter\shutdown.bat