Update 2015/07/11: Tested on XenServer 6.5
In XenServer 6, there is no options to start automatically VMs or vApps which is a problem in at least these 3 circumstances:
- Your infrastructure went down (power failure?) and everything needs to be restarted
- You need to instruct someone not qualified to restart the hypervisor
- You have a test server that you frequently turn on and off
Raido consulting came up with a script to allow admins to autostart VMs and vApps, you can read their orignal post.
I compacted their script which instructions to make it easier to install:
chmod +x xs_autostart.sh
@reboot /root/xs_autostart.sh to the crontab, save and you’re done!
Autostart for VMs
Now add the autostart tag to the VMs you wish to see started when the hypervisor starts.
Autostart for vApps
Now write autostart in the description of the vApps you wish to see started when the hypervisor starts.