Renan Rangel crunching technology for breakfast

28Jul/150

XenServer auto_poweron script

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:

1
2
# 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:

1
2
3
4
# list all VMs and if they are set to auto start :
perl xenserver_poweron.pl
# set a VM to auto start on boot:
perl xenserver_poweron.pl <vmname> <true|false>

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

Posted by Renan Rangel

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.