You can make a host a managed host by adding it to the vCenter Server system. You can later disconnect and reconnect the host, for example, to refresh the agents.
You can use the following methods, which are only supported if you access the host through a vCenter Server system.
- 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.
Client applications can change the IP address and port of the host when doing a reconnect operation. This can be useful if the client wants to preserve existing metadata, such as statistics, alarms, and privileges, even though the host is changing its IP address.