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

 

How to Boot a XenServer VM into Recovery Mode

Recovery Mode can be helpful if you need to do certain task like operate on the VM with the disk unmounted or you need to reset a root password.

All of the following is done through XenCenter

To boot the VM into recovery mode all you have to do is

  1. Shutdown the VM
  2. Insert boot media i.e. (DVD, cd, iso image, etc.) into DVD Drive 1:
  3. Start VM in Recovery Mode.  In the main menu click on VM –> Start/Shut Down –> Start in Recovery Mode

When the VM boots up it will boot off of whatever is in DVD Drive 1.

 

 

XenServer Unable to Import OVF

Check to see if you have an import template.

In the Main Menu click “View” and check “Hidden Objects”, in the Server View you should see a Template named something like “XenServer Transfer VM 6.2.0-123456c (hidden)”

If you don’t have one, then run the following command on the XenServer to create a template.

/opt/xensource/packages/files/transfer-vm/install-transfer-vm.sh

If the command fails double check that you have a default storage repository selected and try again.

Once the template is created import the OVF.