A SERVICE OF

logo

143
Example: On the local XenServer host:
xe vm-list
Example: On the remote XenServer host:
xe vm-list -user <username> -password <password> -server <hostname>
Shorthand syntax is also available for remote connection arguments:
-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 examplexe vm-land 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-