Autostart VM Xenserver 6.0

VM auto start feature

I was a little puzzled on how I could set up my License Server VPX appliance to auto start on booting my XenServer, but I figured it was now set with the vApp features and settings. However the GUI did not offer a select box to enable the auto start feature at the Start Options in the General Properties of the VM. I did not configure HA as it is not necessary right now for my Homelab environment. I just made the assumption that creating and configuring the vApp would enable the auto start feature all the same. And turned off the Homelab servers to test it when I would boot my servers the next day.

 

Unfortunately for me, it wasn’t that easy this time. As Bill Carovano explains in this post on the Citrix Forums, so design decisions changed the auto start feature availability. As it interfered with the HA, DR and Pool upgrade functionality it was opted out for the XenServer 6 release.

 

Alternative configuration

For me it still is a very useful feature to ensure my Citrix License Server is automatically started when my XenServer is booted, so luckily for me Bill also gave the right commands to enable the feature with the CLI and have the perfect setup back for my Homelab

You first have to enable the auto power on feature at pool level, before being able to configure it for each VM individually.

* Find the uuid of the Pool:

[root@ ~]# xe pool-list
uuid ( RO) : [uuid-pool]
name-label ( RW): [pool-name]
name-description ( RW): [pool-desc]
master ( RO): [uuid-xs]
default-SR ( RW): [uuid-sr]

Which returns the following values:

  • uuid-pool: A unique identifier for the Pool.
  • pool-name: The name given to the Pool.
  • pool-desc: The description set for the Pool.
  • uuid-xs: The unique identifier of the XenServer that currently is the Pool Master.
  • uuid-sr: The unique identifier for the default Storage Repository configured for the Pool.

 

* Enable the auto power on feature at pool level:

[root@ ~]# xe pool-param-set uuid=[uuid-pool] other-config:auto_poweron=true

Which uses the following additional syntax:

  • uuid-pool: A unique identifier for the Pool.

 

* Find the uuid of the VM:

The quicky way to find the uuid of your VM is to run the vm-list command. This does however give you an overview of all VMs, so if you have alot of VMs defined, try to narrow it done with the name-label parameter (which is case sensitive). With the uuid known for the VM, you can easily enable the auto start feature.

[root@ ~]# xe vm-list
uuid ( RO) : [uuid-vm]
name-label ( RW): [vm-name]
power-state ( RO): [vm-power]

Which returns the following values:

  • uuid-vm: A unique identifier for the Virtual Machine.
  • vm-name: The name given to the Virtual Machine.
  • vm-power: Shows the power state the VM is currently in (running, halted).

 

* Enable the auto power on feature for the specified VM:

[root@ ~]# xe vm-param-set uuid=[uuid-vm] other-config:auto_poweron=true

Which uses the following additional syntax:

  • uuid-vm: A unique identifier for the Virtual Machine.

Crédito : http://www.virtues.it/2011/10/xenserver6-vm-auto-start-feature/

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *