Autostart a XEN VM

Leave a comment

September 10, 2015 by aubreykloppers

2+2 steps:

  1. Get the POOL MASTER: xe pool-list
  2. Set the autostart on the POOL: xe pool-param-set uuid=<POOL> other-config:auto_poweron=true
  3. Get the VM: xe vm-list
  4. Set the autostart on the VM: xe vm-param-set uuid=<VM> other-config:auto_poweron=true

easy-peasy!

UPDATE: Apparantly the above only works on licenced releases, on free releases the easiest way is to use vApp.

HINT: Right-click on the VM and choose ADD vApp…

Howto use vApp:

1. Create vApp
2. Choose vms to vApp
3. Choose boot order and delays between starts
4. To get uuid of vApp use:

xe appliance-list name-label="name-vapp"

5. Edit rc.local file to start vApp:

echo "sleep 40" >> /etc/rc.local
echo "xe appliance-start uuid=uuid-vapp" >> /etc/rc.local

That seems to be it…

Adding additional HDD:

  1. Get the HDD: fdisk -l
  2. Set the disk: xe sr-create name-label=”Disk1″ shared=false device-config:device=/dev/sdb type=lvm

In this example I am using /dev/sdb…

Leave a comment

counter for wordpress