Search

Method powerOnVM_Task(VcHostSystem host)

Powers on this virtual machine. If the virtual machine is suspended, this method resumes execution from the suspend point.

When powering on a virtual machine in a cluster, the system might implicitly or due to the host argument, do an implicit relocation of the virtual machine to another host. Hence, errors related to this relocation can be thrown. If the cluster is a DRS cluster, DRS will be invoked if the virtual machine can be automatically placed by DRS (see VcDrsBehavior). Because this method does not return a DRS VcClusterRecommendation, no vmotion nor host power operations will be done as part of a DRS-facilitated power on. To have DRS consider such operations use VcDatacenter. As of vSphere API 5.1, use of this method with vCenter Server is deprecated; use VcDatacenter instead.

If this virtual machine is a fault tolerant primary virtual machine, its secondary virtual machines will be started on system-selected hosts. If the virtual machines are in a VMware DRS enabled cluster, then DRS will be invoked to obtain placements for the secondaries but no vmotion nor host power operations will be considered for these power ons.

Returns

VcTask

Arguments

Name Type Description
host VcHostSystem (optional) The host where the virtual machine is to be powered on. If no host is specified, the current associated host is used. This field must specify a host that is part of the same compute resource that the virtual machine is currently associated with. If this host is not compatible, the current host association is used.