VMware

Datacenter Namespace

The Datacenter namespace provides commands to manage datacenters in the vCenter Server.

List of commands:



Create Command

dcli com vmware vcenter datacenter create

Description

Create a new datacenter in the vCenter inventory

Options

Option Name Type Required Description
name string Yes The name of the datacenter to be created.
folder string No Datacenter folder in which the new datacenter should be created. When clients pass a value of this class as a parameter, the option must be an identifier for the resource type: Folder. When commands return a value of this class as a output, the option will be an identifier for the resource type: Folder. This option is currently required. In the future, if this option is unset, the system will attempt to choose a suitable folder for the datacenter; if a folder cannot be chosen, the datacenter creation operation will fail.

Example

dcli com vmware vcenter datacenter create --name testString


Delete Command

dcli com vmware vcenter datacenter delete

Description

Delete an empty datacenter from the vCenter Server

Options

Option Name Type Required Description
datacenter string Yes Identifier of the datacenter to be deleted. The parameter must be an identifier for the resource type: Datacenter.
force bool No If true, delete the datacenter even if it is not empty. If unset a ResourceInUse error will be reported if the datacenter is not empty. This is the equivalent of passing the value false.

Example

dcli com vmware vcenter datacenter delete --datacenter testId


List Command

dcli com vmware vcenter datacenter list

Description

Returns information about at most 1000 visible (subject to permission checks) datacenters in vCenter matching the Datacenter.FilterSpec.

Options

Option Name Type Required Description
datacenters string No Identifiers of datacenters that can match the filter. When clients pass a value of this class as a parameter, the option must contain identifiers for the resource type: Datacenter. When commands return a value of this class as a output, the option will contain identifiers for the resource type: Datacenter. If unset or empty, datacenters with any identifier match the filter.
names string No Names that datacenters must have to match the filter (see Datacenter.Info.name). If unset or empty, datacenters with any name match the filter.
folders string No Folders that must contain the datacenters for the datacenter to match the filter. When clients pass a value of this class as a parameter, the option must contain identifiers for the resource type: Folder. When commands return a value of this class as a output, the option will contain identifiers for the resource type: Folder. If unset or empty, datacenters in any folder match the filter.

Example

dcli com vmware vcenter datacenter list


Get Command

dcli com vmware vcenter datacenter get

Description

Retrieves information about the datacenter corresponding to datacenter.

Options

Option Name Type Required Description
datacenter string Yes Identifier of the datacenter. The parameter must be an identifier for the resource type: Datacenter.

Example

dcli com vmware vcenter datacenter get --datacenter testId