Search

Method addHost_Task(VcHostConnectSpec spec, boolean asConnected, VcResourcePool resourcePool, String license)

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.

In addition to the Host.Inventory.AddHostToCluster and Resource.AssignVMToPool privileges, it requires System.View privilege on the VM folder that the VMs of the host will be placed on.

Returns

VcTask

Arguments

Name Type Description
spec VcHostConnectSpec Specifies the host name, port, and password for the host to be added.
asConnected boolean Flag to specify whether or not the host should be connected immediately after it is added. The host will not be added if a connection attempt is made and fails.
resourcePool VcResourcePool the resource pool for the root resource pool from the host.
license String Provide a licenseKey or licenseKeyType. See <a href="VcLicenseManager.html">VcLicenseManager</a>