wiki-grav/pages/02.linux/xcp-ng/xe-cli/default.en.md
2023-07-30 11:39:26 +02:00

1.4 KiB

title visible
xe CLI true

[toc]

VM Operations

Show running VMs

xe vm-list --multiple power-state=running

Poweroff all VMs currently running

xe vm-shutdown --multiple power-state=running

Start VM

xe vm-start uuid={VM UUID}

Host reboot procedure

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:
[shroot]

xe host-disable host={hostname}

[/shroot]

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 [shroot]

xe host-reboot|host-shutdown host={hostname}

[/shroot]

(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.

XCP-ng documentation

Snapshot management

TODO

VM Limits

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}

TODO Memory limits