Installation guide

Chapter 28. The xm command quick reference
The xm command can manage the Xen hypervisor. Most operations can be performed with the libvirt
tools, virt - man ag er application or the virsh command. The xm command does not have the error
checking capacity of the libvirt tools and should not be used for tasks the libvirt tools support.
There are a few operations which currently can not be performed using virt -man ag er. Some options
for other Xen implementations of the xm command do not work in Red Hat Enterprise Linux 5. The list
below provides an overview of command options available and unavailable.
Warning
It is advised to use virsh or virt-manager instead of xm. The xm command does not handle
error checking or configuration file errors very well and mistakes can lead to system instability
or errors in virtual machines. Editing Xen configuration files manually is dangerous and
should be avoided. Use this chapter at your own risk.
Basic man ag emen t o p t io n s
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(MiB) VCPUs State Time(s)
Domain-0 0 520 2 r----- 1275.5
r5b2-mySQL01 13 500 1 -b---- 16.1
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 [-p] DomainName/ID: resume the state, and the execution of the domain. If the -p
option is used, the domain will not be unpaused after restoring it.
xm migrate
Reso u rce man ag emen t o p t io n s
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
292