Auto Start VM after XenServer reboot

SSH or gain command line access to XenServer

List VM UUID’s

Locate the UUID’s of the VM’s you want to start

# xe vm-list
uuid ( RO)           : 521be58a-3495-ea29-02a0-85ffcda06583
     name-label ( RW): CentOS 7
    power-state ( RO): running

Enable auto start

Change the UUID to the UUID of the vm you want to start automatically on server boot

xe pool-param-set uuid=521be58a-3495-ea29-02a0-85ffcda06583  other-config:auto_poweron=true

Print parameter settings

The following print if the poweron is turned on. Change out the UUID for the UUID of your VM.

xe vm-param-list uuid=521be58a-3495-ea29-02a0-85ffcda06583 | grep -i poweron | cut -d";" -f1

Example output

                      other-config (MRW): auto_poweron: true

https://support.citrix.com/article/CTX133910

XenServer Commands

List, unplug, or destroy PBD storage repository

xe pbd-list
xe pbd-unplug uuid=[UUID for VM]
xe sr-destroy uuid=[UUID for VM]

List, unplug, or destroy storage repository.

xe sr-list
xe sr-unplug uuid=[UUID for VM]
xe sr-destroy uuid=[UUID for VM]

List VM’s

xe vm-list

Shutdown VM

xe vm-shutdown uuid=[UUID for VM]

Force shutdown VM

xe vm-shutdown -–force uuid=[UUID for VM]

List Task

xe task-list

Cancel Task

xe task-cancel uuid=[task uuid]

 

External Links

http://www.queryadmin.com/801/useful-storage-repository-commands-xenserver/
https://www.serveroperations.net/citrix/shutdown-a-hung-vm-on-xenserver