XenServer 6.x: Set a guest VM to Autostart on boot

A new virtualization product, new issues.
I started to look into XenServer. http://xenserver.org/
Please note do not go for the new Creedence (6.4 Beta) because there is no upgrade path afterwards.
It actually looks and performs promising. However one downturn is, there is only a native Xen-Management tool named XenCenter which is solely for Windows. Seriously….
But there is hope. Another project named XOA or Xen-Orchestra https://xen-orchestra.com/
It’s an appliance to be imported as a VM guest which offers a nice and useable webgui.
Now there is no direct way in XenServer to make a VM to autostart when booting a single host or a XEN Cluster, but I’d like to have the appliance available when booting the XenServer.
This is based on https://support.citrix.com/article/CTX133910 which tells you why it may interfere with any HA setup Here we go.
To make a Guest VM autostart in XenServer do the following:
Login to the XenServer Host as root.
Firstly we need to allow the XenServer host or cluster to allow autostart for the particular pool in which our VM is.
In my setup there is only one Pool but you may have more than one.
Get the UUID of the Pool in which you have the VM which you like to autostart.
To get the list of the pools on your XenServer, run “xe pool-list”
# xe pool-list
uuid ( RO) : 566bc117-484e-03c8-c1de-709271d752bc
name-label ( RW):
name-description ( RW):
master ( RO): 3f6db05d-bef6-4f9f-a2f3-a01f1786f60d
default-SR ( RW): 93fb619c-5520-97dc-4195-48fb172a89d1
Then use the following to set the pool or server to allow auto-start:
xe pool-param-set uuid=UUID other-config:auto_poweron=true
Note: Replacing UUID with the UUID of the XenServer or pool. Example in my case:
xe pool-param-set uuid=566bc117-484e-03c8-c1de-709271d752bc other-config:auto_poweron=true
Now I set the VM Guest to autostart: Get the UUID of the VM guest.
# xe vm-list uuid ( RO) : 6a570e70-3cad-449a-8ee7-fff5340930c0 name-label ( RW): Control domain on host: xenserver00.local power-state ( RO): running uuid ( RO) : b91f1956-7f60-7527-ed63-01726c08aa07 name-label ( RW): CentOS 6 (64-bit) template power-state ( RO): halted uuid ( RO) : 9114826b-d629-b40c-7c86-72c979ec33c6 name-label ( RW): Citrix XCM Virtual Appliance power-state ( RO): halted uuid ( RO) : 5e085aa9-c8d6-d7aa-2a45-02069bc04684 name-label ( RW): XOA power-state ( RO): halted
Im interested in the XOA VM so I use the following to set the XOA to autostart.
xe vm-param-set uuid=UUID other-config:auto_poweron=true
example:
xe vm-param-set uuid=5e085aa9-c8d6-d7aa-2a45-02069bc04684 other-config:auto_poweron=true
That’ll do the job to start the XOA VM when the XenServer boots up.
Happy “virtualizing” with XEN
Nice article 🙂
With latest XOA (3.6), you can set up this easily with HA in now, see this post: https://xen-orchestra.com/blog/xenserver-and-vm-high-availability/
Cool didn’t notice that. I actually just redeployed the 3.6 basic yesterday. Thanks for letting me know.