Autostart a XEN VM
Leave a commentSeptember 10, 2015 by aubreykloppers
2+2 steps:
- Get the POOL MASTER: xe pool-list
- Set the autostart on the POOL: xe pool-param-set uuid=<POOL> other-config:auto_poweron=true
- Get the VM: xe vm-list
- 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:
- Get the HDD: fdisk -l
- 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…