Package com.vmware.host
Class HostProfileManager
- java.lang.Object
-
- com.vmware.connection.ConnectedVimServiceBase
-
- com.vmware.host.HostProfileManager
-
@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 ConnectedVimServiceBaseThis 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vmware.connection.ConnectedVimServiceBase
ConnectedVimServiceBase.ConnectionException
-
-
Field Summary
-
Fields inherited from class com.vmware.connection.ConnectedVimServiceBase
PROP_ME_NAME, SVC_INST_NAME
-
-
Constructor Summary
Constructors Constructor Description HostProfileManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexitMaintenanceMode(com.vmware.vim25.ManagedObjectReference attachHostMoref)voidpowerOnSuspendedGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref)voidrun()voidsetAttachEntityName(java.lang.String attachEntityName)voidsetAttachEntityType(java.lang.String attachEntityType)voidsetCreateHostEntityName(java.lang.String createHostEntityName)voidsuspendPoweredOnGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref)-
Methods inherited from class com.vmware.connection.ConnectedVimServiceBase
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection
-
-
-
-
Method Detail
-
setCreateHostEntityName
@Option(name="sourcehostname", description="Name of the host") public void setCreateHostEntityName(java.lang.String createHostEntityName)
-
setAttachEntityName
@Option(name="entityname", description="Attached Entity Name") public void setAttachEntityName(java.lang.String attachEntityName)
-
setAttachEntityType
@Option(name="entitytype", description="Attached Entity Type, example: HostSystem or ClusterComputeResource") public void setAttachEntityType(java.lang.String attachEntityType)
-
exitMaintenanceMode
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- Throws:
com.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.TimedoutFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsg
-
powerOnSuspendedGuestVMs
public void powerOnSuspendedGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
suspendPoweredOnGuestVMs
public void suspendPoweredOnGuestVMs(com.vmware.vim25.ManagedObjectReference attachHostMoref) throws com.vmware.vim25.InvalidPropertyFaultMsg, com.vmware.vim25.RuntimeFaultFaultMsg- Throws:
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsg
-
run
@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- Throws:
com.vmware.vim25.DuplicateNameFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgjava.rmi.RemoteExceptioncom.vmware.vim25.HostConfigFailedFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.TimedoutFaultMsg
-
-