Welcome to Delicate template
Just another WordPress site

XenServer VM Autostart

junio 12th, 2012 | Posted by cristiansan in CLI | XenServer

For check if the VM on XenServer have Auto-run configured, do this…

Check your VM List with this instruction:

# xe vm-list

For list the advanced options for one VM, do:

# xe vm-params-list uuid=[uuid-VM)

Enable auto-power on at XenServer…

# xe pool-list

# xe pool-param-list

ENABLE: xe pool-paran-set uuid=UUID POOL other-config:auto_poweron=true

# xe pool-param-list

Now is momento for actívate auto-run on VMs:

# xe vm-params-set uuid=[uuid-VM] other-config:auto_poweron=true

and check if is correct configurated:

# xe vm-params-list uuid[uuid-VM]

Others way to do this…

XenServer is based on CentOS OS. Like a Linux SO, have all advantatges that permit Linux SO. Linux, has a file called /etc/rc.local which runs at the end of all the multi-user boot levels, and which you can therefore put stuff in

You can call a script on rc.local to run intructions on startup, or you can créate a Start Script for run intructions on diferents init levels.

For do this, you can do, for exemple…

Create a script with Vim…

# vim run_start_vm.sh

And create the script with next lines:


export PATH=/opt/xensource/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin 

sleep 30

xe vm-start uuid=<uuid_VM_ForStart>

sleep 15

xe vm-start uuid=<uuid_VM_ForStart>

sleep 15

Save and exit, and put permisions for run this script:

# chmod 777 run_start_vm.sh

 And call the script from rc.local. Edit rc.local on etc/rc.d and call with complete Path the Script for run VMs.

NOTE: This last information is only informative and is not the best method for do this.  Use the XE command for do. Other information is only with educative.

UPDATE: On XS6.0 You don’t need do this. Use vApp for auto-run VMs on the environment.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *