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:
cd ~ wget https://gist.githubusercontent.com/martin-denizet/8001574/raw/7171832e50853abaa73bfda5441677a10631add9/xs_autostart.sh chmod +x xs_autostart.sh crontab -e
Add @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.
Sorry, it didnt work for me. (Xenserver 6.1)
Hi Lula,
Thank you for the feedback. I’ll double check the article for mistakes.
What happens? The VM just doesn’t start? Any error in the log?
Cheers,