Tuesday 7 February 2012

Autostart Xenserver VMs


When using the free edition of XenServer 6.0, you’ll want to do a few things such as enabling Auto Start / Auto Boot / Auto Power On.  For some reason this feature was removed from the “Free” version in 6.0, so lets go ahead and set this up.
First your going to want to get the UUID of the VM’s you wish to enable auto start on as well as the UUID of the pool these VM’s reside in.
To get the list of the pool’s on your XenServer type:
xe pool-list
Copy the UUID of the pool, in my case there ist just one pool. Then issue the following command, and replace the UUID with your pools UUID.
xe pool-param-set uuid=UUID other-config:auto_poweron=true
Then, at the command prompt of your XenServer type:
xe vm-list
You should get a full list of the VM’s on the server, along with their name and UUID. Copy the UUID of the VM you wish to enable autostart then issue the command below, again replacing the UUID with the UUID of the VM you wish to auto start.
To Auto Start your Pool (replace UUID with the UUID of your Pool):
xe pool-param-set uuid=UUID other-config:auto_poweron=true
To Auto Start your VM (replace the UUID with the UUID of your VM):
xe vm-param-set uuid=UUID other-config:auto_poweron=true
xe vm-param-set uuid=UUID other-config:auto_poweron=true
And thats it, the next time you ever need to power cycle your main server, the Xen instances should power up automatically.