Show running VMs
xe vm-list power-state=running
Show only the names of running VMs
xe vm-list power-state=running | grep "name-label"
Poweroff all VMs currently running
xe vm-shutdown --multiple power-state=running
Start VM
xe vm-start uuid={VM UUID}
Disable the host so that no new VM can be started on this host and so that the rest of the pool knows that the host was disabled on purpose. From command line:
xe host-disable host=$(hostname)
Migrate the VMs running on the host to other hosts in the pool, or shut them down.
Reboot or shutdown. Can be done from XO, or from command line
xe host-reboot host=$(hostname)
(After a reboot or host startup) Move VMs back to the host if appropriate. There is no need to re-enable the host: it is done automatically when it starts.
TODO
Check current limits
xe vm-param-get uuid={VM UUID} param-name={PARAMETER}
Parameters:
VCPUs-max: Maximum number of CPU cores
VCPUs-at-startup: Number of CPU cores initially assigned
Set Limits
xe vm-param-set uuid={VM UUID} {PARAMETER}={VALUE}