XenServer: APC Smart Shutdown

If you have the network modules for your APC Smart-UPS then you can use the embedded soft to perform a smart shutdown. However this method permits you to shutdown all virtual machines and the virtual host with a single serial cable attached to a physical server

–          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