@Sample(name="host-profile-manager",
description="demonstrates HostProfileManager and ProfileComplainceManager \n\nNOTE: this command may place a host into maintenance mode which will require VMs on the host to be suspended.\n\nCommand:\n\nCreate hostprofile given profileSourceHost (host system), profileAttachEntity (host system), profileAttachEntityType (host system)\n\nApplies config after attaching hostprofile to host system and check for compliance run.bat com.vmware.host.HostProfileManager --url [webserviceurl] --username [username] --password [password] --sourcehostname [host name] --entityname [host name] --entitytype HostSystem Create hostprofile given profileSourceHost (host system), profileAttachEntity (cluster computer resource), profileAttachEntityType (cluster compute resource)\n\nAttaches hostprofile to all hosts in cluster and checks for compliance \n\nrun.bat com.vmware.host.HostProfileManager --url [webserviceurl]--username [username] --password [password] --sourcehostname [host name] \n\n--entityname [Cluster] --entitytype ClusterComputeResource")
public class HostProfileManager
extends ConnectedVimServiceBase
This sample demonstrates HostProfileManager and ProfileComplainceManager Parameters: url [required] : url of the web service username [required] : username for the authentication password [required] : password for the authentication sourcehostname [required] : Name of the host entityname [required] : Attached Entity Name entitytype [required] : Attached Entity Type Command Line: Create hostprofile given profileSourceHost (host system) profileAttachEntity (host system), profileAttachEntityType (host system) Applies config after attaching hostprofile to host system and check for compliance"); run.bat com.vmware.host.HostProfileManager --url [webserviceurl]"); --username [username] --password [password] --sourcehostname [host name] --entityname [host name] --entitytype HostSystem Create hostprofile given profileSourceHost (host system), profileAttachEntity (cluster computer resource), profileAttachEntityType (cluster compute resource) Attaches hostprofile to all hosts in cluster and checks for compliance run.bat com.vmware.host.HostProfileManager --url [webserviceurl] --username [username] --password [password] --sourcehostname [host name] --entityname [Cluster] --entitytype ClusterComputeResource
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
HostProfileManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
exitMaintenanceMode(com.vmware.vim25.ManagedObjectReference attachHostMoref) |
void |
powerOnSuspendedGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref) |
void |
run() |
void |
setAttachEntityName(java.lang.String attachEntityName) |
void |
setAttachEntityType(java.lang.String attachEntityType) |
void |
setCreateHostEntityName(java.lang.String createHostEntityName) |
void |
suspendPoweredOnGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="sourcehostname",
description="Name of the host")
public void setCreateHostEntityName(java.lang.String createHostEntityName)
@Option(name="entityname",
description="Attached Entity Name")
public void setAttachEntityName(java.lang.String attachEntityName)
@Option(name="entitytype",
description="Attached Entity Type, example: HostSystem or ClusterComputeResource")
public void setAttachEntityType(java.lang.String attachEntityType)
public void exitMaintenanceMode(com.vmware.vim25.ManagedObjectReference attachHostMoref)
throws com.vmware.vim25.InvalidStateFaultMsg,
com.vmware.vim25.RuntimeFaultFaultMsg,
com.vmware.vim25.TimedoutFaultMsg,
com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.InvalidCollectorVersionFaultMsg
com.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.TimedoutFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgpublic void powerOnSuspendedGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref)
throws com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.RuntimeFaultFaultMsg
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgpublic void suspendPoweredOnGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref)
throws com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.RuntimeFaultFaultMsg
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg@Action
public void run()
throws com.vmware.vim25.DuplicateNameFaultMsg,
com.vmware.vim25.RuntimeFaultFaultMsg,
com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.InvalidCollectorVersionFaultMsg,
java.rmi.RemoteException,
com.vmware.vim25.HostConfigFailedFaultMsg,
com.vmware.vim25.InvalidStateFaultMsg,
com.vmware.vim25.TimedoutFaultMsg
com.vmware.vim25.DuplicateNameFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgjava.rmi.RemoteExceptioncom.vmware.vim25.HostConfigFailedFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.TimedoutFaultMsg