113
-u username
-pw password
-pwf password file
-p port
-s server
Example: On a remote XenServer host:
xe vm-list -u <myuser> -pw <mypassword> -s <hostname>
Arguments are also taken from the environment variable XE_EXTRA_ARGS, in the form of comma-separated
key/value pairs. For example, in order to enter commands on one XenServer host that are run on a remote
XenServer host, you could do the following:
export XE_EXTRA_ARGS="server=jeffbeck,port=443,username=root,password=pass"
This command means that you will not need to specify the remote XenServer host parameters anymore, in each
xe command you execute.
Using the XE_EXTRA_ARGS environment variable also enables tab completion of xe commands when issued
against a remote XenServer host, which is disabled by default.
Special Characters and Syntax
To specify argument/value pairs on the xe command line, write:
argument=value
Unless the value includes spaces, do not use quotes. There should be no whitespace in between the argument
name, the equals sign (=), and the value. Any argument not conforming to this format will be ignored.
For values containing spaces, write:
argument="value with spaces"
If you use the CLI while logged into a XenServer host, commands have a tab completion feature similar to that
in the standard Linux bash shell. If you type, for example xe vm-l and then press the TAB key, the rest of the
command will be displayed when it is unambiguous. If more than one command begins with vm-l, pressing TAB
a second time will list the possibilities. This is particularly useful when specifying object UUIDs in commands.
Note:
When executing commands on a remote XenServer host, tab completion does not normally
work. However if you put the server, username, and password in an environment variable
called XE_EXTRA_ARGS on the machine from which you are entering the commands, tab
completion is enabled. See the section called “Basic xe Syntax” for details.
Command Types
Broadly speaking, the CLI commands can be split in two halves: Low-level commands concerned with listing and
parameter manipulation of API objects, and higher level commands for interacting with VMs or hosts in a more
abstract level. The low-level commands are:
• <class>-list