Managed Object - HostProfileManager

Property of
ServiceContent
Extends
ProfileManager
See also
AnswerFile, AnswerFileCreateSpec, AnswerFileStatusResult, ApplyProfile, HostConfigSpec, HostProfileManagerConfigTaskList, HostSystem, Profile, ProfileDeferredPolicyOptionParameter, ProfileMetadata, ProfileProfileStructure
Since
vSphere API 4.0


Managed Object Description

The HostProfileManager provides access to a list of HostProfiles and it defines methods to manipulate profiles and AnswerFiles.

Properties

Name Type Description
None
Properties inherited from ProfileManager
profile

Methods

Methods defined in this Managed Object
ApplyHostConfig_Task, CheckAnswerFileStatus_Task, CreateDefaultProfile, ExportAnswerFile_Task, GenerateConfigTaskList, QueryAnswerFileStatus, QueryHostProfileMetadata, QueryProfileStructure, RetrieveAnswerFile, UpdateAnswerFile_Task
Methods inherited from ProfileManager
CreateProfile, FindAssociatedProfile, QueryPolicyMetadata

ApplyHostConfig_Task

Apply the configuration to the host. If you specify any user input, the configuration will be saved in the AnswerFile associated with the host. If there is no answer file, the Profile Engine will create one.
Required Privileges
Dynamic - See discussion above

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
hostManagedObjectReference
to a HostSystem

Host to be updated. User must have sufficient credentials and privileges to satisfy the contents of the configSpec.
configSpecHostConfigSpec

Set of configuration changes to be applied to the host. The changes are returned by the HostProfile.ExecuteHostProfile method in the ProfileExecuteResult.configSpec property.
userInput*ProfileDeferredPolicyOptionParameter[]

Additional host-specific data to be applied to the host. This data is the complete list of deferred parameters verified by the HostProfile.ExecuteHostProfile method, contained in the ProfileExecuteResult object returned by the method.

Since vSphere API 5.0
*Need not be set

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
HostConfigFailedThrown if the ESX Server cannot apply the configuration changes.
InvalidStateThrown if the host is not in maintenance mode and the configuration specification requires it.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



CheckAnswerFileStatus_Task

Check the validity of the answer files for the specified hosts. The Profile Engine uses the profile associated with a host to check the answer file.
Required Privileges
System.View
Since
vSphere API 5.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
hostManagedObjectReference[]
to a HostSystem[]

Set of hosts for which the answer file status will be checked.

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation. If the task is successful, the Task.info.result property contains a list of AnswerFileStatusResult objects.

Faults

Type Description
InvalidProfileReferenceHostThrown if the reference host associated with the profile is incompatible or there is no reference host for the profile.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



CreateDefaultProfile

Create a default subprofile of a given type (for example, a VirtualSwitchProfile). After you create the subprofile, you can add it to a configuration specification and update the host profile:
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
profileTypexsd:string

Type of profile to create. The profile types are system-defined (ApplyProfile.profileTypeName).
profileTypeName*xsd:string

If specified, the method returns a profile object containing data for the named profile. The type name does not have to be system-defined. A user-defined profile can include various dynamically-defined profiles.

Since vSphere API 5.0
profile*ManagedObjectReference
to a Profile

Base profile used during the operation.

Since vSphere API 5.0
*Need not be set

Return Value

Type Description
ApplyProfileDerived subprofile of type profileType.

Faults

Type Description
InvalidArgumentThrown if either the profileType or profileTypeName is incorrect.
InvalidProfileReferenceHostThrown if the reference host associated with the profile is incompatible or there is no reference host for the profile.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



ExportAnswerFile_Task

Export a host's answer file into a serialized form. The method returns a string that contains only the list of user input options. See AnswerFile.userInput.
Required Privileges
Profile.Export
Since
vSphere API 5.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
hostManagedObjectReference
to a HostSystem

Host with which the answer file is associated.

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation. If the task is successful, the Task.info.result property is a string that contains a serialized form of the answer file.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.



GenerateConfigTaskList

Generate a list of configuration tasks that will be performed on the host during HostProfile application.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
configSpecHostConfigSpec

ConfigSpec which was proposed by ExecuteHostProfile method.
hostManagedObjectReference
to a HostSystem

Host on which the HostProfile application needs to be carried out.

Return Value

Type Description
HostProfileManagerConfigTaskListList of Configuration tasks.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



QueryAnswerFileStatus

Returns the status of the answer files associated with specified hosts. This method returns the most recent status determined by CheckAnswerFileStatus_Task. See HostProfileManagerAnswerFileStatus for valid values.
Required Privileges
System.View
Since
vSphere API 5.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
hostManagedObjectReference[]
to a HostSystem[]

The hosts the answer file is associated with.

Return Value

Type Description
AnswerFileStatusResult[]List of answer file status objects.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



QueryHostProfileMetadata

Retrieve the metadata for a set of profiles.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
profileName*xsd:string[]

Names of the profiles for which metadata is requested. If not set, the method returns metadata for all the profiles.
profile*ManagedObjectReference
to a Profile

Base profile whose context needs to be used during the operation

Since vSphere API 5.0
*Need not be set

Return Value

Type Description
ProfileMetadata[]List of profile metadata objects.

Faults

Type Description
InvalidArgumentThrown if profileName parameter is invalid.
InvalidProfileReferenceHostThrown if the reference host associated with the profile is incompatible or there is no reference host for the profile.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



QueryProfileStructure

Get information about the structure of the profile.
Required Privileges
System.View
Since
vSphere API 5.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
profile*ManagedObjectReference
to a Profile

Base profile whose context needs to be used during the operation

Since vSphere API 5.0
*Need not be set

Return Value

Type Description
ProfileProfileStructureThe profile structure.

Faults

Type Description
InvalidProfileReferenceHostThrown if the reference host associated with the profile is incompatible or there is no reference host for the profile.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RetrieveAnswerFile

Returns the answer file associated with a particular host.
Required Privileges
System.View
Since
vSphere API 5.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
hostManagedObjectReference
to a HostSystem

Host with which the answer file is associated.

Return Value

Type Description
AnswerFileAnswer file object will be returned if it exists.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



UpdateAnswerFile_Task

Update the AnswerFile for the specified host. If there is no answer file associated with the host, the Profile Engine uses the answer file configuration specification to create a new one.
Required Privileges
Profile.Edit
Since
vSphere API 5.0

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the HostProfileManager used to make the method call.
hostManagedObjectReference
to a HostSystem

Host with which the answer file is associated.
configSpecAnswerFileCreateSpec

Host-specific configuration data. If the configuration specification does not contain any host-specific user input (configSpec.userInput), the method does not perform any operation on the answer file.

Return Value

Type Description
ManagedObjectReference
to a Task
This method returns a Task object with which to monitor the operation.

Faults

Type Description
AnswerFileUpdateFailedThrown if the answer file could not be updated.
InvalidArgumentThrown if the input parameteres are incorrect.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.