You can reboot and shut down managed and standalone hosts. The ShutdownHost_Task method is not supported on all hosts. Check the host capability shutdownSupported.You can call both methods with a force parameter, which specifies whether to reboot hosts even when virtual machines are running or other operations are in progress on the host. If you set the parameter to false, hosts are rebooted only when they are in maintenance mode.
■ ShutdownHost_Task – Shuts down a host. If connected directly to the host, the client never receives an indicator of success in the returned task, but temporarily loses connection to the host. If the method does not succeed, an error is returned.
■ RebootHost_Task – Reboots a host. If the command is successful, then the host has been rebooted. Clients connected directly to the host do not receive an indication of success in the returned task, but temporarily lose connection to the host. If the method does not succeed, an error is returned.Standby is a power state in which the host does not support provisioning or power on of virtual machines. VMware power management module might evacuate and put a host in standby mode to save power. The host can be powered up remotely by using PowerUpHostFromStandBy_Task.
■ PowerDownHostToStandBy_Task – Puts the host in standby mode, a mode in which the host is in a standby state from which it can be powered up remotely. The command is only supported on hosts on which the host capability standbySupported is true.Calling this method does not directly initiate any operations to evacuate or power down powered-on virtual machines. However, if VMware DRS is enabled, the vCenter Server migrates powered-off virtual machines or recommends migration to a different host, depending on the automation level. If the host is part of a cluster and the task is issued with a vCenter Server target with the method’s evacuatePoweredOffVms parameter set to true, the task does not succeed unless all the powered-off virtual machines are reregistered to other hosts.
■ PowerUpHostFromStandBy_Task – Takes the host out of standby mode. If the command is successful, the host wakes up and starts sending heartbeats. This method might be called automatically by VMware DRS to add capacity to a cluster, if the host is not in maintenance mode.
■ QueryHostConnectionInfo – Returns a HostConnectInfo object, which is the same object that the Datacenter.QueryConnectionInfo returns. The information in this object can be used by a connection wizard, like the wizard used in the vSphere Client.
■ DisconnectHost_Task – Disconnects from a host and instructs the vCenter Server system to stop sending heartbeats to the host.
■ ReconnectHost_Task – Reconnects a host to the vCenter Server system. This process reinstalls agents and reconfigures the host, if it has gotten out of sync with the server. The reconnection process checks for the correct set of licenses and for the number of CPUs on the host, ensures the correct set of agents is installed, and ensures that networks and datastores are discovered and registered with the vCenter Server system.