XenServer Administrator's Guide 4.1.0
Command line interface
95
The VM or VMs on which this operation should be performed are selected via the standard selection mech-
anism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the be-
ginning of this section.
5.4.22.13. vm-disk-list
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 or VMs on which this operation should be performed are selected via the standard selection mech-
anism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the be-
ginning of this section.
5.4.22.14. vm-disk-remove
vm-disk-remove device=integer label of disk [ vm-selector=vm selector value...]
Remove a disk from the specified VMs and destroy it.
The VM or VMs on which this operation should be performed are selected via the standard selection mech-
anism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the be-
ginning of this section.
5.4.22.15. vm-export
vm-export filename=export_filename [metadata=true | false ] [ 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.
If the metadata parameter is [true], then the disks are not exported, and only the VM metadata is written
to the output file. This is intended to be used when the underlying storage is transferred through other
mechanisms, and permits the VM information to be recreated (see Section 5.4.22.16, “vm-import”).
The VM or VMs on which this operation should be performed are selected via the standard selection mech-
anism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the be-
ginning of this section.
5.4.22.16. vm-import
vm-import filename=export_filename [metadata=true | false ] [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 destination 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.










