xm command quick reference

xm command quick reference

Basic management options

The following are basic and commonly used xm commands:

xm help [–long]: view available options and help text.

use the xm list command to list active domains:

# xm list
Name ID Mem VCPUs State Time(s)
1741_drackodb2 1 12000 4 -b—- 19949.9
175_drackodbdev1 12 8000 3 -b—- 14883.8
1807_drackoprod1 21 18000 8 -b—- 68267.1
Domain-0

xm create [-c] DomainName/ID: start a virtual machine. If the -c option is used, the start up process will attach to the guest’s console.

xm console DomainName/ID: attach to a virtual machine’s console.

xm destroy DomainName/ID: terminates a virtual machine , similar to a power off.

xm reboot DomainName/ID: reboot a virtual machine, runs through the normal system shut down and start up process.

xm shutdown DomainName/ID: shut down a virtual machine, runs a normal system shut down procedure.

xm pause

xm unpause

xm save

xm restore

xm migrate

Resource management options

Use the following xm commands to manage resources:

xm mem-set

use the xm vcpu-list to list virtualized CPU affinities:

# xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
1741_drackodb2 1 0 21 -b- 6738.3 any cpu
1741_drackodb2 1 1 22 -b- 4899.6 any cpu
1741_drackodb2 1 2 20 -b- 4188.6 any cpu
1741_drackodb2 1 3 20 -b- 4118.4 any cpu
175_drackodbdev1 12 0 19 -b- 6624.8 any cpu
175_drackodbdev1 12 1 18 -b- 4214.2 any cpu
175_drackodbdev1 12 2 13 -b- 4038.7 any cpu
1807_drackoprod1 21 0 15 -b- 10531.6 any cpu
1807_drackoprod1 21 1 16 -b- 5632.0 any cpu
1807_drackoprod1 21 2 9 -b- 5636.9 any cpu
1807_drackoprod1 21 3 1 -b- 9478.2 any cpu
1807_drackoprod1 21 4 2 -b- 9311.5 any cpu
1807_drackoprod1 21 5 22 -b- 9225.9 any cpu
1807_drackoprod1 21 6 0 -b- 9284.2 any cpu
1807_drackoprod1 21 7 2 -b- 9149.1 any cpu

xm vcpu-pin

xm vcpu-set

use the xm sched-credit command to display scheduler parameters for a given domain:

# xm sched-credit -d 0
{‘cap’: 0, ‘weight’: 256}
# xm sched-credit -d 13
{‘cap’: 25, ‘weight’: 256}

Monitoring and troubleshooting options

Use the following xm commands for monitoring and troubleshooting:

xm top

xm dmesg

xm info

xm log

use the xm uptime to display the uptime of guests and hosts:

# xm uptime
Name ID Uptime
1741_drackodb2 1 6 days, 12:19:16
175_drackodbdev1 12 6 days, 9:28:55
1807_drackoprod1 21 6 days, 7:22:40
Domain-0 0 6 days, 12:26:08

xm sysrq

xm dump-core

xm rename

xm domid

xm domname

Currently unsupported options

The xm vnet-list is currently unsupported, and produces no usable output.

#xm vnet-list
Status
ErrorDescription

Leave a Reply

Your email address will not be published. Required fields are marked *