1.6 KiB
1.6 KiB
title | visible |
---|---|
xe CLI | true |
[toc]
VM Operations
Show running VMs
[shroot]
xe vm-list power-state=running
[/shroot]
Show only the names of running VMs
[shroot]
xe vm-list power-state=running | grep "name-label"
[/shroot]
Poweroff all VMs currently running
[shroot]
xe vm-shutdown --multiple power-state=running
[/shroot]
Start VM
[shroot]
xe vm-start uuid={VM UUID}
[/shroot]
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=$(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.
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}