5.4. xe command referenceThis section provides a reference to the xe commands. They are grouped by objects that the commands address, and listed alphabetically. Commands for working with physical CD/DVD drives on XenServer Hosts. CDs have the following parameters: cd-list [params=param1,param2,...] [parameter=parameter value...]
List the CDs and ISOs (CD image files) on the XenServer Host or pool, filtering on the optional argument params. If the optional argument params is used, the value of params is a string containing a list of parameters of this object that you want to display. Alternatively, you can use the keyword all to show all parameters. If params is not used, the returned list shows a default subset of all available parameters. Optional arguments can be any number of the parameters listed at the beginning of this section. String arguments do not take wildcards. Commands for working with consoles. The console objects can be listed with the standard object listing command (xe console-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Consoles have the following parameters: Commands for working with events. Event classes are listed in the following table: event-wait class=class name [param-name=param-value]
Block other commands from executing until an object exists that satisfies the conditions given on the command line. The class name can be any of the classes listed at the beginning of this section, and the parameters can be any of those listed in the CLI command class-param-list. 5.4.4. Host (XenServer Host) commandsCommands for interacting with XenServer Hosts. XenServer Hosts are the physical servers running XenServer software. They have VMs running on them under the control of a special privileged Virtual Machine, known as the control domain or domain 0. The XenServer Host objects can be listed with the standard object listing command (
xe host-list,
xe host-cpu-list, and
xe host-crashdump-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Several of the commands listed here have a common mechanism for selecting one or more XenServer Hosts on which to perform the operation. The simplest is by supplying the argument host=uuid or name-label. XenServer Hosts can also be specified by filtering the full list of hosts on the values of fields. For example, specifying enabled=true will select all XenServer Hosts whose enabled field is equal to true. Where multiple XenServer Hosts are matching, and the operation can be performed on multiple XenServer Hosts, the option --multiple must be specified to perform the operation. The full list of parameters that can be matched is described at the beginning of this section, and can be obtained by the command xe host-list params=all. If no parameters to select XenServer Hosts are given, the operation will be performed on all XenServer Hosts. XenServer Hosts have the following parameters: XenServer Hosts contain some other objects that also have parameter lists. CPUs on XenServer Hosts have the following parameters: Crash dumps on XenServer Hosts have the following parameters: host-backup file-name=backup filename [host-selector=host-selector value...]
Download a backup of the control domain of the specified XenServer Host to the machine that the command is invoked from, and saving it there as a file with the name file-name. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). CautionWhile the xe host-backup command will work if executed on the local host (that is, without a specific hostname specified), do not use it this way. Doing so would fill up the control domain partition with the backup file, which would be a bad thing. The command should only be used from a remote off-host machine where you have space to hold the backup file. 5.4.4.3. host-bugreport-uploadhost-bugreport-upload [host-selector=host-selector value...] [url=destination_url] [http-proxy=http-proxy-name]
Generate a fresh bug report (via xen-bugtool, with all optional files included) and upload to XenSource Support ftp site or other location. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). Optional parameters are http-proxy: use specified http proxy, and url: upload to this destination url. If optional parameters are not used, no proxy server is identified and the destination will be the default XenSource Support ftp site. 5.4.4.4. host-crashdump-destroyhost-crashdump-destroy uuid=crashdump UUID
Delete a host crashdump specified by its UUID from the XenServer Host. 5.4.4.5. host-crashdump-uploadhost-crashdump-upload uuid=crashdump UUID [url=destination URL] [http-proxy=HTTP proxy name]
Upload a crashdump to the XenSource Support ftp site or other location. If optional parameters are not used, no proxy server is identified and the destination will be default XenSource Support ftp site. Optional parameters are http-proxy: use specified http proxy, and url: upload to this destination url. host-disable [host-selector=host selector value...]
Disables specified XenServer Hosts, which prevents any new VMs from starting on them. This prepares the XenServer Hosts to be shut down or rebooted. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). host-dmesg [host-selector=host selector value...]
Get a Xen dmesg (the output of the kernel ring buffer) from specified XenServer Hosts. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). host-enable [host-selector=host selector value...]
Enables the specified XenServer Hosts, which allows new VMs to be started on them. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). host-forget uuid=XenServer Host UUID
The xapi agent forgets about the specified XenServer Host without contacting it explicitly. TipThis command is useful if the XenServer Host to "forget" is dead; however, if the XenServer Host is live and part of the pool, you should use xe pool-eject instead. 5.4.4.10. host-license-addhost-license-add license-file=path/license_filename [host-uuid=XenServer Host UUID]
Parses a local license file and adds it to the specified XenServer Host. 5.4.4.11. host-license-viewhost-license-view [host-uuid=XenServer Host UUID]
Displays the contents of the XenServer Host license. 5.4.4.12. host-logs-downloadhost-logs-download [file-name=logfile_name] [host-selector=host selector value...]
Download a copy of the logs of the specified XenServer Hosts. The copy is saved by default in a timestamped file named hostname-yyyy-mm-ddThh:mm:ssZ.tar.gz. You can specify a different filename using the optional parameter file-name. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). CautionWhile the xe host-logs-download command will work if executed on the local host (that is, without a specific hostname specified), do not use it this way. Doing so will clutter the control domain partition with the copy of the logs, which would be a bad thing. The command should only be used from a remote off-host machine where you have space to hold the copy of the logs. host-reboot [host-selector=host selector value...]
Reboot the specified XenServer Hosts. The specified XenServer Hosts must be disabled first using the xe host-disable command, otherwise a "HOST_IN_USE" error message is displayed. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). If the specified XenServer Hosts are members of a pool, the loss of connectivity on shutdown will be handled and the pool will recover when the XenServer Hosts returns. If you shut down a slave, other slaves and the master will continue to function. If you shut down the master, the pool will be out of action until the master is rebooted and back on line, at which point the slaves will reconnect and synchronize with the master, or until you make one of the slaves into the master. host-restore [file-name=backup_filename] [host-selector=host selector value...]
Restore a backup named file-name of the XenServer Host control software. Note that the use of the word "restore" here does not mean a full restore in the usual sense, it merely means that the compressed backup file has been uncompressed and unpacked onto the secondary partition. After you've done a xe host-restore, you have to boot the Install CD and use its "restore secondary partition to primary partition" option. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). host-shutdown [host-selector=host selector value...]
Shut down the specified XenServer Hosts. The specified XenServer Hosts must be disabled first using the xe host-disable command, otherwise a "HOST_IN_USE" error message is displayed. The host(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.4.1, “Host selectors”). If the specified XenServer Hosts are members of a pool, the loss of connectivity on shutdown will be handled and the pool will recover when the XenServer Hosts returns. If you shut down a slave, other slaves and the master will continue to function. If you shut down the master, the pool will be out of action until the master is rebooted and back on line, at which point the slaves will reconnect and synchronize with the master, or until you make one of the slaves into the master. Commands for working with logs. List the keys of all of the logging subsystems. Reopen all loggers. Use this for rotating log files. log-set-output output=nil | stderr | file:filename | syslog:sysloglocation [key=key] [level= debug | info | warning | error]
Set the output of the specified logger. Log messages are filtered by the subsystem in which they originated and the log level of the message. For example, debug logging messages from the storage manager can be sent to a file via the following command: xe log-set-output key=sm level=debug output=file:/tmp/sm.log The optional parameter key specifies the particular logging subsystem. If this parameter is not set, it will default to all logging subsystems. The optional parameter level specifies the logging level. Valid values are debug, info, warning or error. Commands for working with networks. The network objects can be listed with the standard object listing command (xe network-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Networks have the following parameters: network-create name-label=name for network [name-description=descriptive text]
Creates a new network. network-destroy uuid=network UUID
Destroys an existing network. Commands for working with XenServer host patches. The patch objects can be listed with the standard object listing command (xe patch-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Patches have the following parameters: patch-apply uuid=patch file UUID
Apply the specified patch file. patch-destroy uuid=patch file UUID
Delete a specified patch file. patch-upload file-name=patch filename
Upload a specified patch file to the XenServer Host. This prepares a patch to be applied. Commands for working with PBDs (Physical Block Devices). These are the software objects through which the XenServer Host accesses Storage Repositories (SRs). The PBD objects can be listed with the standard object listing command (xe pbd-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. PBDs have the following parameters: pbd-create host-uuid=UUID of XenServer Host sr-uuid=UUID of SR [device-config-key=corresponding value...]
NoteThe syntax device-config-key=value for setting key-value pairs in the device config field will be changed in future versions of XenServer to be consistent with the syntax of the pbd-param-set cli command: device-config:key=value. The current syntax will still be allowed for backward compatibility.
Create a new PBD on a XenServer Host. The read-only device-config parameter can only be set on creation as in the following example: To add a mapping of 'path' -> '/tmp', the command line should contain the argument device-config-path=/tmp For a full list of supported device-config key/value pairs on each SR type see chapter Chapter 4, Storage. pbd-destroy uuid=UUID of PBD
Destroy the specified PBD. pbd-plug uuid=UUID of PBD
Attempts to plug in the PBD to the XenServer Host. If this succeeds, the referenced SR (and the VDIs contained within) should then become visible to the XenServer Host. pbd-unplug uuid=UUID of PBD
Attempts to unplug the PBD from the XenServer Host. Commands for working with PIFs (Physical network interfaces). The PIF objects can be listed with the standard object listing command (xe pif-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. PIFs have the following parameters: Commands for working with pools. A pool is a aggregate of one or more XenServer Hosts. A pool uses one or more shared Storage Repositories so that the VMs running on one XenServer Host in the pool can be migrated in near-real time (while still running, without needing to be shut down and brought back up) to another XenServer Host in the pool. Each XenServer Host is really a pool consisting of a single member by default. When a XenServer Host is joined to a pool, it is designated as a slave, and the pool it has joined becomes the master for the pool. The singleton pool object can be listed with the standard object listing command (xe pool-list), and its parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Pools have the following parameters: pool-eject host-uuid=UUID of XenServer Host to eject
Instruct the specified XenServer Host to leave an existing pool. 5.4.10.2. pool-emergency-reset-masterpool-emergency-reset-master master-address=address of the pool's master XenServer Host
Instruct a slave XenServer Host to reset its master address. 5.4.10.3. pool-emergency-transition-to-masterpool-emergency-transition-to-master
Instruct a slave XenServer Host to become the pool master. This command is only accepted by the XenServer Host if it has transitioned to emergency mode, meaning it is a slave in a pool whose master has disappeared from the network and could not be contacted for some number of retries. Note that this command may cause the password of the host to reset if it has been modified since joining the pool (see Section 5.4.15, “User commands”). pool-join master-address=address of the pool's master XenServer Host master-username=username for the pool's master XenServer Host master-password=password for the pool's master XenServer Host
Instruct a XenServer Host to join an existing pool. 5.4.10.5. pool-recover-slavesInstruct the pool master to try and reset the master address of all slaves currently running in emergency mode. This is typically used after pool-emergency-transition-to-master has been used to set one of the slaves as the new master. 5.4.10.6. pool-dump-databasepool-dump-database file-name=filename to dump database into (on client)
Download a copy of the entire pool database and dump it into a file on the client. 5.4.10.7. pool-restore-databasepool-restore-database file-name=filename to restore from (on client)
Upload a database backup (created with "pool-dump-database") to a pool. On receiving the upload, the master will restart itself with the new database. 5.4.11. Storage Manager commandsCommands for controlling Storage Manager plugins. The storage manager objects can be listed with the standard object listing command (xe sm-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. SMs have the following parameters: Commands for controlling SRs (Storage Repositories). The SR objects can be listed with the standard object listing command (xe sr-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. SRs have the following parameters: sr-create name-label=name physical-size=size type=type content-type=content-type device-config-config_name=value [host-uuid=XenServer Host UUID] [shared=true | false]
Makes an SR on the disk, introduces it into the database, and creates a PBD attaching the SR to a XenServer Host. If shared is set to true, a PBD is created for each XenServer Host in the pool; if shared is not specified or set to false, a PBD is created only for the XenServer Host specified with host-uuid. The device-config parameters differ depending on the device type. NoteThe syntax device-config-key=value for setting key-value pairs in the device config field will be changed in future versions of XenServer to be consistent with the syntax of the pbd-param-set cli command: device-config:key=value. The current syntax will still be allowed for backward compatibility.
Destroys the specified SR on the XenServer Host. The xapi agent forgets about a specified SR on the XenServer Host, meaning that the SR is detached and you cannot access VDIs on it, but it remains intact on the source media (the data is not lost). sr-introduce name-label=name physical-size=physical size type=type content-type=content-type uuid=SR UUID
Just places an SR record into the database. The device-config parameters can be specified by e.g. device-config-device=/dev/sdb1. NoteThis command is never used in normal operation. It is an advanced operation which might be useful if an SR needs to be reconfigured as shared after the fact, or to help recover from various failure scenarios. Force an SR scan, syncing the xapi database with VDIs present in the underlying storage substrate. Commands for working with long-running asynchronous tasks. These are tasks such as starting, stopping, and suspending a Virtual Machine, which are typically made up of a set of other atomic subtasks that together accomplish the requested operation. The task objects can be listed with the standard object listing command (xe task-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Tasks have the following parameters: task-cancel [uuid=Task UUID]
Direct the specified Task to cancel and return. 5.4.14. Template commandsCommands for working with VM templates. Templates are essentially VMs with the is_a_template parameter set to true. A template is a "gold image" that contains all the various configuration settings to instantiate a specific VM. XenServer ships with a base set of Templates, which range from generic "raw" VMs that can boot an OS vendor installation CD (RHEL, CentOS, SLES, Windows) to complete pre-configured OS instances (Debian Etch and Sarge). With XenServer you can create VMs, configure them in standard forms for your particular needs, and save a copy of it as a Template for future use in deployment. The template objects can be listed with the standard object listing command (xe template-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. Templates have the following parameters: 5.4.15.1. user-password-changeuser-password-change old=old_password new=new_password
Changes the logged-in user's password. In a pool, this command only changes the master host's password. This will only make a difference if a slave host is subsequently transitioned to become a master via the pool-emergency-transition-to-master command (see Section 5.4.10.3, “pool-emergency-transition-to-master”), in which case the slave's old password (as recorded in /etc/passwd) will become active. Commands for working with VBDs (Virtual Block Devices). A VBD is a software object that connects a VM to the VDI, which represents the contents of the virtual disk. The VBD has the attributes which tie the VDI to the VM (is it bootable, its read/write metrics, and so on), while the VDI has the information on the physical attributes of the virtual disk (which type of SR, whether the disk is shareable, whether the media is read/write or read only, and so on). The VBD objects can be listed with the standard object listing command (xe vbd-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. VBDs have the following parameters: vbd-create vm-uuid=UUID of the VM device=device value vdi-uuid=UUID of the VDI the VBD will connect to [bootable=true] [type=Disk | CD] [mode=RW | RO]
Create a new VBD on a VM. Appropriate values for the device field are listed in the parameter allowed-VBD-devices on the specified VM. Before any VBDs exist there, the allowable values are integers from 0-15. If the type is Disk, vdi-uuid is required. Mode can be RO or RW for a Disk. If the type is CD, vdi-uuid is optional; if no VDI is specified, an empty VBD will be created for the CD. Mode must be RO for a CD. vbd-destroy uuid=UUID of VBD
Destroy the specified VBD. vbd-eject uuid=UUID of VBD
Remove the media from the drive represented by a VBD. This command only works if the media is of a removable type (a physical CD or an ISO); otherwise an error message "VBD_NOT_REMOVABLE_MEDIA" is returned. vbd-insert uuid=UUID of VBD vdi-uuid=UUID of VDI containing media
Insert new media into the drive represented by a VBD. This command only works if the media is of a removeable type (a physical CD or an ISO); otherwise an error message "VBD_NOT_REMOVABLE_MEDIA" is returned. vbd-plug uuid=UUID of VBD
Attempt to attach the VBD while the VM is in the running state. vbd-unplug uuid=UUID of VBD
Attempts to detach the VBD from the VM while it is in the running state. Commands for working with VDIs (Virtual Disk Images). A VDI is a software object that represents the contents of the virtual disk seen by a VM, as opposed to the VBD, which is a connector object that ties a VM to the VDI. The VDI has the information on the physical attributes of the virtual disk (which type of SR, whether the disk is shareable, whether the media is read/write or read only, and so on), while the VBD has the attributes which tie the VDI to the VM (is it bootable, its read/write metrics, and so on). The VDI objects can be listed with the standard object listing command (xe vdi-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. VDIs have the following parameters: vdi-copy uuid=UUID of the VDI sr-uuid=UUID of the SR to where you want to copy the VDI
Copy a VDI to a specified SR. vdi-create sr-uuid=UUID of the SR where you want to create the VDI name-label=name for the VDI type=system | user | suspend | crashdump virtual-size=size of virtual disk, in bytes
Create a VDI. NoteSR types that support sparse allocation of disks (i.e. Local VHD and NFS SR types) do not enforce virtual allocation of disks. Users should therefore take great care when over-allocating virtual disk space on an SR. If an over-allocated SR does become full, disk space must be made available either on the SR target substrate or by deleting unused VDIs in the SR.
vdi-destroy uuid=UUID of VDI
Destroy the specified VDI. NoteIn the case of Local VHD and NFS SR types, disk space is not immediately released on vdi-destroy, but periodically during an sr-scan. Users that need to force deleted disk space to be made available should call sr-scan manually.
vdi-import uuid=UUID of VDI filename=filename of raw VDI
Import a raw VDI. vdi-resize uuid=VDI UUID disk-size=new size for disk
Resize the VDI specified by UUID. vdi-unlock uuid=UUID of VDI to unlock [force=true]
Attempts to unlock the specified VDIs. If force=true is passed to the command, it will force the unlocking operation. Commands for working with VIFs (Virtual network interfaces). The VIF objects can be listed with the standard object listing command (xe vif-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. VIFs have the following parameters: vif-create vm-uuid=UUID of the VM device=see below vdi-uuid=UUID of the VDI the VBD will connect to [mac=MAC address if VIF] [type=type of VBD: Disk or CD] [mode=mode of VBD: RW or RO]
Create a new VBD on a VM. Appropriate values for the device field are listed in the parameter allowed-VIF-devices on the specified VM. Before any VIFs exist there, the allowable values are integers from 0-15. The mac parameter is the standard MAC address in the form aa:bb:cc:dd:ee:ff. If you leave it unspecified, a random MAC address will be created. You can also explicitly set a random MAC address by specifying mac=random. vif-destroy uuid=UUID of VIF
Destroy a VIF. vif-plug uuid=UUID of VIF
Attempt to attach the VIF while the VM is in the running state. vif-unplug uuid=UUID of VIF
Attempts to detach the VIF from the VM while it is in the running state. Commands for working with VLANs (virtual networks). To list and edit virtual interfaces, refer to the PIF commands, which have a VLAN parameter to signal that they have an associated virtual network (see Section 5.4.9, “PIF commands”). vlan-create pif-uuid=UUID of PIF vlan=VLAN tag network-uuid=UUID of network
Create a new VLAN on a XenServer Host. vlan-destroy uuid=UUID of PIF mapped to VLAN
Destroy a VLAN. Requires the UUID of the PIF that represents the VLAN. Commands for controlling VMs and their attributes. Several of the commands listed here have a common mechanism for selecting one or more VMs on which to perform the operation. The simplest way is by supplying the argument vm=name or uuid. VMs can also be specified by filtering the full list of VMs on the values of fields. For example, specifying power-state=halted will select all VMs whose power-state parameter is equal to halted. Where multiple VMs are matching, the option --multiple must be specified to perform the operation. The full list of parameters that can be matched is described at the beginning of this section, and can be obtained by the command xe vm-list params=all. If no parameters to select VMs are given, the operation will be performed on all VMs. The VMs objects can be listed with the standard object listing command (xe vm-list), and the parameters manipulated with the standard parameter commands. See Section 5.3.2, “Low-level param commands” for details. VMs have the following parameters: vm-cd-add cd-name=name of new CD device=integer value of an available VBD [vm-selector=vm selector value...]
Add a new virtual CD to the selected VM. The device parameter should be selected from the value of the allowed-VBD-devices parameter of the VM. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-cd-eject [vm-selector=vm selector value...]
Eject a CD from the virtual CD drive. This command will only work if there is one and only one CD attached to the VM. When there are two or more CDs, please use the command xe vbd-eject and specify the UUID of the VBD. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-cd-insert cd-name=name of CD [vm-selector=vm selector value...]
Insert a CD into the virtual CD drive. This command will only work if there is one and only one empty CD device attached to the VM. When there are two or more empty CD devices, please use the command xe vbd-insert and specify the UUIDs of the VBD and of the VDI to insert. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-cd-list [vbd-params] [vdi-params] [vm-selector=vm selector value...]
Lists CDs attached to the specified VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). You can also select which VBD and VDI parameters to list. vm-cd-remove cd-name=name of cd [vm-selector=vm selector value...]
Remove a virtual CD from the specified VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-clone new-name-label=name for clone [new-name-description=description for clone] [vm-selector=vm selector value...]
Clone an existing VM, using storage-level fast disk clone operation where available. Specify the name and the optional description for the resulting cloned VM using the new-name-label and new-name-description arguments. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-copy new-name-label=name for copy [new-name-description=description for copy] [ sr-uuid=UUID of SR] [vm-selector=vm selector value...]
Copy an existing VM, but without using storage-level fast disk clone operation (even if this is available). The disk images of the copied VM are guaranteed to be "full images" - that is, not part of a copy-on-write (CoW) chain. Specify the name and the optional description for the resulting copied VM using the new-name-label and new-name-description arguments. Specify the destination SR for the resulting copied VM using the sr-uuid. If this parameter is not specified, the destination is the same SR that the original VM is in. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). 5.4.20.9. vm-crashdump-listvm-crashdump-list [vm-selector=vm selector value...]
List crashdumps associated with the specified VMs. If the optional argument params is used, the value of params is a string containing a list of parameters of this object that you want to display. Alternatively, you can use the keyword all to show all parameters. If params is not used, the returned list shows a default subset of all available parameters. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-create name-label=name for VM [name-description=description string for VM]
Create a new VM with default parameters. Despite its suggestive name, this command does not leave you with a running or runnable VM -- it really creates a template. The resultant UUID must be used as the template-uuid argument passed to the vm-install command. This is an advanced command and should not normally be used to install VMs. Instead, use the pre-defined templates and the vm-install command to instantiate new VMs. vm-destroy uuid=UUID of VM
Destroy the specified VM. This leaves the storage associated with the VM intact. To delete storage as well, use xe vm-uninstall. vm-disk-add disk-size=size_of_disk_to_add device=uuid_of_device [vm-selector=vm selector value...]
Add a new disk to the specified VMs. The device field should be selected from the value of the allowed-VBD-devices parameter of the VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-disk-list [vbd-params] [vdi-params] [vm-selector=vm selector value...]
Lists disks attached to the specified VMs. The vbd-params and vdi-params parameters control the fields of the respective objects to output and should be given as a comma-separated list, or the special key all for the complete list. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). 5.4.20.14. vm-disk-removevm-disk-remove device=integer label of disk [vm-selector=vm selector value...]
Remove a disk from the specified VMs and destroy it. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-export filename=export_filename [vm-selector=vm selector value...]
Export the specified VMs (including disk images) to a file on the local machine. Specify the filename to export the VM into using the filename parameter. By convention, the filename should have a .xva extension. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-import filename=export_filename [preserve=true | false] [sr-uuid=destination SR UUID]
Import a VM from a previously-exported file. If preserve is set to true, the MAC address of the original VM will be preserved. The sr-uuid determines the default SR to import the VM into, and is the default SR if not specified. The [filename] parameter can also point to an XVA-format VM, which is the legacy export format from XenServer 3.2 and is used by some third-party vendors to provide virtual appliances. This format uses a directory to store the VM data, so set [filename] to the root directory of the XVA export and not an actual file. Subsequent exports of the imported legacy guest will automatically be upgraded to the new filename-based format, which stores much more data about the configuration of the VM. NoteThe older directory-based XVA format does not fully preserve all the VM attributes. In particular, imported VMs will not have any virtual network interfaces attached by default. If networking is required, create one using vif-create and vif-plug. vm-install new-name-label=name [ template-uuid=UUID of desired template | [template=UUID or name of desired template]] [ sr-uuid=SR UUID | sr-name-label=name of SR ]
Install a VM from a template. Specify the template name using either the template-uuid or template argument. Specify an SR other than the default SR using either the sr-uuid or sr-name-label argument. vm-migrate [[host-uuid=destination XenServer Host UUID] | [host=name or UUID of destination XenServer Host]] [vm-selector=vm selector value...] [live=true | false]
Migrate the specified VMs between physical hosts. The host parameter can be either the name or the UUID of the XenServer Host. By default, the VM will be suspended, migrated, and resumed on the other host. The live parameter activates XenMotion and keeps the VM running while performing the migration, thus minimizing VM downtime to less than a second. In some circumstances such as extremely memory-heavy workloads in the VM, XenMotion automatically falls back into the default mode and suspends the VM for a brief period of time before completing the memory transfer. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-reboot [vm-selector=vm selector value...] [force=true]
Reboot the specified VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). Use the force argument to cause an ungraceful shutdown, akin to pulling the plug on a physical server. 5.4.20.20. vm-reset-powerstatevm-reset-powerstate [vm-selector=vm selector value...] {force=true}
The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). This is an advanced command only to be used when a slave host in a pool goes down. You can use this command to force the pool master to reset the power-state of the VMs to be "halted". Essentially this forces the lock on the VM and its disks so it can be subsequently started on another pool host. This call requires the force flag to be specified, and fails if it is not on the command-line. vm-resume [vm-selector=vm selector value...] [force=true | false] [on=XenServer Host UUID]
Resume the specified VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). If the VM is on a shared SR in a pool of hosts, use the on argument to specify which host in the pool on which to start it. By default the system will determine an appropriate host, which might be any of the members of the pool. vm-shutdown [vm-selector=vm selector value...] [force=true | false]
Shut down the specified VM. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). Use the force argument to cause an ungraceful shutdown, akin to pulling the plug on a physical server. vm-start [vm-selector=vm selector value...] [force=true | false] [on=XenServer Host UUID] [--multiple]
Start the specified VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). If the VMs are on a shared SR in a pool of hosts, use the on argument to specify which host in the pool on which to start the VMs. By default the system will determine an appropriate host, which might be any of the members of the pool. vm-suspend [vm-selector=vm selector value...]
Suspend the specified VM. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-uninstall [vm-selector=vm selector value...] [force=true | false]
Uninstall a VM, destroying its disks (those VDIs that are marked RW and connected to this VM only) as well as its metadata record. To simply destroy the VM metadata, use xe vm-destroy. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). 5.4.20.26. vm-vcpu-hotplugvm-vcpu-hotplug new-vcpus=new vCPU count [vm-selector=vm selector value...]
Dynamically adjust the number of vCPUs available to a running VM. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). vm-vif-list [vm-selector=vm selector value...]
Lists the VIFs from the specified VMs. The VM(s) on which this operation should be performed are selected via the standard selection mechanism (see Section 5.4.20.1, “VM selectors”). Note that the selectors operate on the VM records when filtering, and not on the VIF values. |