Managed Object - ClusterComputeResource

Returned by
CreateCluster, CreateClusterEx
Extends
ComputeResource
See also
ClusterActionHistory, ClusterConfigInfo, ClusterConfigSpec, ClusterDrsMigration, ClusterDrsRecommendation, ClusterHostRecommendation, ClusterRecommendation, HostConnectSpec, HostSystem, ResourcePool, VirtualMachine


Managed Object Description

Represents a cluster of HostSystem objects as a unified compute resource for virtual machines. This type is instantiated using the Folder.createCluster method.

Properties

Name Type Description
actionHistory*ClusterActionHistory[]

The set of actions that have been performed recently.

Since VI API 2.5
configurationClusterConfigInfoDeprecated. As of VI API 2.5, use configurationEx.

Configuration of the cluster.
drsRecommendation*ClusterDrsRecommendation[]Deprecated. As of VI API 2.5, use recommendation.

If DRS is enabled, this returns the set of recommended migrations from the DRS module. The current set of recommendations may be empty, since there may be no recommended migrations at this time, or it is possible that DRS is not enabled.
migrationHistory*ClusterDrsMigration[]

The set of migration decisions that have recently been performed.

This list is populated only when DRS is in automatic mode.

recommendation* PClusterRecommendation[]

Returns the list of recommended actions for the cluster. It is possible that the current set of recommendations may be empty, either due to not having any running dynamic recommendation generation module, or since there may be no recommended actions at this time.

Since VI API 2.5
Properties inherited from ComputeResource
configurationEx, datastore, environmentBrowser, host, network, resourcePool, summary
Properties inherited from ManagedEntity
configIssue, configStatus, customValue, declaredAlarmState, disabledMethod, effectiveRole, name, overallStatus, parent, permission, recentTask, triggeredAlarmState
Properties inherited from ExtensibleManagedObject
availableField, value
*May not be presentP Required privilege: System.Read

Methods

Methods defined in this Managed Object
AddHost_Task, ApplyRecommendation, MoveHostInto_Task, MoveInto_Task, RecommendHostsForVm, ReconfigureCluster_Task, RefreshRecommendation
Methods inherited from ComputeResource
ReconfigureComputeResource_Task
Methods inherited from ManagedEntity
Destroy_Task, Reload, Rename_Task
Methods inherited from ExtensibleManagedObject
setCustomValue

AddHost_Task

Adds a host to the cluster. The hostname must be either an IP address, such as 192.168.0.1, or a DNS resolvable name. DNS names may be fully qualified names, such as host1.domain1.com, or a short name such as host1, providing host1 resolves to host1.domain1.com. The system uses DNS to resolve short names to fully qualified names. If the cluster supports nested resource pools and the user specifies the optional ResourcePool argument, then the host's root resource pool becomes the specified resource pool. The stand-alone host resource hierarchy is imported into the new nested resource pool.

If the cluster does not support nested resource pools, then the stand-alone host resource hierarchy is discarded and all virtual machines on the host are put under the cluster's root resource pool.

Required Privileges
Host.Inventory.AddHostToCluster

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.
specHostConnectSpec

Specifies the host name, port, and password for the host to be added.
asConnectedxsd:boolean

Flag to specify whether or not the host should be connected immediately after it is added. If the host is to be connected immediately after it is added, but the the connection fails, then an exception is thrown.
resourcePool*ManagedObjectReference
to a ResourcePool

the resource pool for the root resource pool from the host.
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the newly added HostSystem upon success.

Faults

Type Description
AgentInstallFailedThrown if there is an error installing the VirtualCenter agent on the host.
AlreadyBeingManagedThrown if the host is already being managed by a VirtualCenter server.
AlreadyConnectedThrown if asConnected is true and the host is already connected to VirtualCenter.
HostConnectFaultThrown if an error occurred when connecting to a host. Typically, a more specific subclass, such as AlreadyBeingManaged, is thrown.
InvalidLoginThrown if "addConnected" is specified but authentication with the new host fails.
NoHostThrown if the host cannot be contacted.
NotEnoughLicensesThrown if no licenses are available to add this host.
NotSupportedHostThrown if the host is running a software version that does not support clustering features. It may still be possible to add the host as a stand-alone host.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
SSLVerifyFaultThrown if the host certificate could not be authenticated
TooManyHostsThrown if no additional hosts can be added to the cluster.

Show WSDL type definition



ApplyRecommendation

Applies a recommendation from the drsRecommendation or the recommendation list. Each recommendation can be applied only once.

resource.applyRecommendation privilege is required if the recommendation is DRS migration or power management recommendations.

Required Privileges
Dynamic - See discussion above

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.
keyxsd:string

The key field of the DrsRecommendation or Recommendation.

Return Value

Type Description
None

Faults

Type Description
InvalidArgumentThrown if the specified key refers to a non-existent or an already executed recommendation.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



MoveHostInto_Task

Moves an existing host into a cluster. The host must be part of the same datacenter, and if the host is part of a cluster, the host must be in maintenance mode.

If the host is a stand-alone host, the stand-alone ComputeResource is removed as part of this operation.

All virtual machines associated with the host, regardless of whether or not they are running, are moved with the host into the cluster. If there are virtual machines that should not be moved, then migrate those virtual machines off the host before initiating this operation.

If the host is a stand-alone host, the cluster supports nested resource pools, and the user specifies the optional resourcePool argument, then the stand-alone host's root resource pool becomes the specified resource pool and the stand-alone host resource hierarchy is imported into the new nested resource pool. If the cluster does not support nested resource pools or the resourcePool argument is not specified, then the stand-alone host resource hierarchy is ignored.

Required Privileges
Host.Inventory.EditCluster

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.
host PManagedObjectReference
to a HostSystem

The list of hosts to move into the cluster.
resourcePool*ManagedObjectReference
to a ResourcePool

The resource pool to match the root resource pool of stand-alone hosts. This argument has no effect if the host is part of a cluster.
*Need not be set P Required privilege: Host.Inventory.MoveHost

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
InvalidArgumentThrown if the host is not a part of the same datacenter as the cluster or if the specified resource pool is not part of the cluster or if the source and destination clusters are the same.
InvalidStateThrown if a host is already part of a cluster and is not in maintenance mode.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TooManyHostsThrown if no additional hosts can be added to the cluster.

Show WSDL type definition



MoveInto_Task

Moves an existing host into a cluster. The host must be part of the same datacenter, and if the host is part of a cluster, the host must be in maintenance mode.

If the host is part of a stand-alone ComputeResource, then the stand-alone ComputeResource is removed as part of this operation.

All virtual machines associated with a host, regardless of whether or not they are running, are moved with the host into the cluster. If there are virtual machines that should not be moved, then migrate those virtual machines off the host before initiating this operation.

For stand-alone hosts, the host resource pool hierarchy is discarded in this call. To preserve a host resource pools from a stand-alone host, call moveHostInt, specifying an optional resource pool. This operation is transactional only with respect to each individual host. Hosts in the set are moved sequentially and are committed, one at a time. If a failure is detected, then the method terminates with an exception. Since hosts are moved one at a time, if this operation fails while in the process of moving multiple hosts, some hosts are left unmoved.

In addition to the privileges mentioned, the user must also hold Host.Inventory.EditCluster on the host's source ComputeResource object.

Required Privileges
Host.Inventory.EditCluster

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.
host PManagedObjectReference[]
to a HostSystem[]

The list of hosts to move into the cluster.
P Required privilege: Host.Inventory.MoveHost

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
DuplicateNameThrown if the host is already in the cluster
InvalidArgumentThrown if one of the hosts is not part of the same datacenter as the cluster.
InvalidStateThrown if a host is already part of a cluster and is not in maintenance mode.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.
TooManyHostsThrown if no additional hosts can be added to the cluster.

Show WSDL type definition



RecommendHostsForVm

Deprecated. As of VI API 2.5, use PowerOnMultiVM_Task. RecommendHostsForVm cannot make any recommendations if DRS cannot find the specified host in the cluster. With PowerOnMultiVM_Task, DRS attempts to migrate virtual machines and power on hosts in standby mode, given the same conditions.

Gets a recommendation for where to power on, resume, revert from powered-off state to powered on state, or to migrate a specific virtual machine. If no host is found, an empty list is returned.

The type of operation is implied by the state of the virtual machine. Returned hosts are intended for power-on or resume if the virtual machine is powered-off or suspended. However, if the virtual machine is powered-on, the request is assumed to be for migrating a virtual machine into a DRS enabled cluster. In that case, the ResourcePool argument should be specified and the ResourcePool and the virtual machine cannot be in the same cluster.

Required Privileges
System.Read

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.
vmManagedObjectReference
to a VirtualMachine

Specifies the virtual machine for which the user is requesting a recommendations.
pool*ManagedObjectReference
to a ResourcePool

Specifies the ResourcePool into which the virtual machine is to be migrated. If the virtual machine is powered-on, this argument must be specified and it is relevant only when the virtual machine is powered-on. This ResourcePool cannot be in the same cluster as the virtual machine.
*Need not be set

Return Value

Type Description
ClusterHostRecommendation[]An array of HostRecommendation ordered by their rating.

Faults

Type Description
InvalidArgumentThrown if the virtual machine is powered on and the optional ResourcePool argument is either not specified or is in the same cluster as the virtual machine.
NotSupportedThrown if DRS is not enabled.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



ReconfigureCluster_Task

Deprecated. As of VI API 2.5, use ReconfigureComputeResource_Task.

Reconfigures a cluster.
Required Privileges
Host.Inventory.EditCluster

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.
specClusterConfigSpec

A set of configuration changes to apply to the cluster. The specification can be a complete set of changes or a partial set of changes, applied incrementally.
modifyxsd:boolean

Flag to specify whether the specification ("spec") should be applied incrementally. If "modify" is false and the operation succeeds, then the configuration of the cluster matches the specification exactly; in this case any unset portions of the specification will result in unset or default portions of the configuration.

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RefreshRecommendation

Make DRS invoke again and return a new list of recommendations. Concurrent "refresh" requests may be combined together and trigger only one DRS invocation.

The recommendations generated is stored at recommendation.

Required Privileges
Host.Inventory.EditCluster
Since
VI API 2.5

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ClusterComputeResource used to make the method call.

Return Value

Type Description
None

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition