Renan Rangel crunching technology for breakfast


XenServer auto_poweron script

Posted by Renan Rangel

In the past, it was possible to set which XenServer VMs would auto start during boot with the host server. Since the 6.x version, this can no longer be set in the GUI and you must use command line to do the same thing (How to Setup XenServer 6.x to Auto-Start Virtual Machines).

I created a script that will help you set the VMs you want to auto start. Remember that first you have to enable your pool to autostart VMs like this:

# get pool uuid with "xe pool-list"
xe pool-param-set uuid=<pool_uuid> other-config:auto_poweron=true

After that, you can download and execute the script on your XenServer host like this:

# list all VMs and if they are set to auto start :
# set a VM to auto start on boot:
perl <vmname> <true|false>

Get the script from the Gist below. You can move it to your $PATH and rename it to your liking:

Tagged as: , 2 Comments