bits release in progress

XCP or XenServer

At work we moved from xm (xend) to xe (XCP or XenServer), and i struggled to find useful informations on it (see the resources at the bottom of the page).

Here are some scripts i made to help me with the maintenance in the command line interface.

Theses are all tested with Xen Cloud Platform 1.6; might work with other versions.


VDI mount (and ummount)

You can download my vdi-mount and vdi-umount scripts; their usage is straighforward:

  • vdi-mount < vm-uuid | vdi-uuid | vm-name > attempt to mount the VDI in the DOM0
  • access your VDI filesystem (by default in /mnt/tmp); you possibly will have to mount the other partitions if your VDI is partitionned
  • vdi-umount < vdi-uuid-as-returned-by-vdi-mount >
CLI helpers

Put somewhere and source it; the following commands will be made available:

Print a VDI UUID by it's mountpoint.
Take a VM name or VM UUID and print a VM UUID.
Print a VBD UUID by it's VDI.
Print a device by it's VBD UUID.
Print a VNC port of a VM.
Print the VDI UUID(s) of a VM.
Print the VM UUID of a VDI.

Errors and solutions

message Unix.Unix_error(63, "connect", "")
Error Connection refused (calling connect )
Error Failed to find a valid default SR for the Pool. Please provide an sr-name-label or sr-uuid parameter.
xe pool-param-set uuid=<tab> default-SR=<tab>
The SR operation cannot be performed because a device underlying the SR is in use by the host.
In my case a vgremove of the unwanted VG was enougth.