Xen XE Commands

by bluemedora_editor on May 25, 2011

The xapi toolstack includes a powerful command-line interface (“xe”) which talks to both hosts and Resource Pools over https, invoking XenAPI operations over XMLRPC. Commands may be issued both from within domain zero (xe is on the $PATH by default) and from remote hosts.

For users of the bash shell extensive tab completion is available, greatly increasing usability. Please refer to the “Xen Cloud Platform Administrator Guide”, chapter 8 on page 123 for more information and details on each of the xe commands.

Basic xe Syntax

When run from domain zero:

xe <command-name> <argument=value>*

When run from another host:

xe –s <host> -u <username> -pw <password> <command-name> <argument=value>*

Note: With any command, hitting the “Tab” key on a keyboard will list out any options available for a particular command as well as complete command syntax. Values containing spaces should be enclosed with double-quotes.

Common Commands

List CD/ISO

#xe cd-list

Power on VM

#xe vm-start vm=<target VM name>

Mount an ISO

# xe vm-cd-insert cd-name=<name of ISO or CD> vm=<target VM name>

Show list of VMs on host

#xe vm-list

List SRs
# xe sr-list

Delete/Destroy VM on host

# xe vm-destroy uuid=<UUID of target VM>

Create Storage Repository

#xe sr-create name-label=<name> physical-size=<size> type=<type> content-
 type=<content_type> device-config:<config_name>=<value> [host-uuid=<Xen Cloud 
 Platform host UUID>] [shared=<true | false>]

Destroy Storage Repository

#xe sr-destroy uuid=<sr_uuid>

Common Host (Xen Cloud Platform host) Commands

List Host in Pool

#xe host-list

Enable a Xen Cloud Platform Host

#xe host-enable [<host-selector>=<host_selector_value>...]

Reboot a Xen Cloud Platform Host

#xe host-reboot [<host-selector>=<host_selector_value>...]

Shutdown a Xen Cloud Platform Host

#xe host-shutdown [<host-selector>=<host_selector_value>...]

 

Get started

Try BindPlane for free. No credit card required.

Sign up
True Visibility
BindPlane for VMware vRealize Operations

True Visibility allows cloud management teams to use VMware vRealize’s powerful machine learning and capacity planning engine across their entire hybrid cloud environment.

Azure Monitor...everything
BindPlane for Microsoft Azure Monitor

Make Azure Monitor your first-pane-of-glass across your entire multi-cloud, multi-database or hybrid platform environment.

Thank you for contacting us. Your information was received. We'll be in touch shortly.