XenServer 6 autostart VMs and vApps on boot

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:

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.

Add tags

Easy as checking a checkbox

Autostart for vApps

Now write autostart in the description of the vApps you wish to see started when the hypervisor starts.

Get vApps to start automatically

Get vApps to start automatically

Complete script on GitHub

2 Comments

  1. Lula July 25, 2014 10:43 pm  Reply

    Sorry, it didnt work for me. (Xenserver 6.1)

    • Martin DENIZET August 8, 2014 6:44 pm  Reply

      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,

Leave a Reply