Scripting Object - VcHostProfileManager

Scripting-object corresponding to
HostProfileManager
Attribute of
VcServiceContent

Scripting Object Description

The {@link vim.profile.host.ProfileManager} provides access to a list of {@link vim.profile.host.HostProfile}s and it defines methods to manipulate profiles and {@link vim.profile.host.AnswerFile}s.

Attributes

Name Type Description
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
profileVcProfile []

@since vSphere API 4.0
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
supportedCustomizationFormatsVcExtendedElementDescription []

@since vim legacy version
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, applyEntitiesConfig_Task, applyHostConfig_Task, checkAnswerFileStatus_Task, compositeHostProfile_Task, createDefaultProfile, createProfile, createTrigger, exportAnswerFile_Task, exportHostProfileCustomizations_Task, findAssociatedProfile, generateConfigTaskList, generateHostConfigTaskSpec_Task, generateHostProfileTaskList_Task, hostProfileQueryMetadata, importHostProfileCustomizations_Task, queryAnswerFileStatus, queryHostProfileCategoryMetadata, queryHostProfileComponentMetadata, queryHostProfileMetadata, queryPolicyMetadata, queryProfileStructure, retrieveAnswerFile, retrieveAnswerFileForProfile, retrieveHostCustomizations, retrieveHostCustomizationsForProfile, updateAnswerFile_Task, updateHostCustomizations_Task, validateAnswerFile, validateHostCustomizations, validateHostProfileComposition_Task

findAssociatedProfile

Get the profile(s) to which this entity is associated. The list of profiles will only include profiles known to this profileManager. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcManagedEntity


Return Value

Type Description
VcProfile []

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

hostProfileQueryMetadata

Retrieve profile metadata, profile component metadata, profile category metadata, and policy metadata of all profiles for a given set of profile managed objects. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcProfile []

arg1String []


Return Value

Type Description
VcHostProfileManagerHostProfileMetadata []

queryHostProfileMetadata

Retrieve the metadata for a set of profiles. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String []

arg1VcProfile


Return Value

Type Description
VcProfileMetadata []

importHostProfileCustomizations_Task

Imports host customization data from the supplied {@link vim.profile.host.ProfileManager.CustomizationData}. Any newly generated answer file object and the persistent version will be a merge of the host customization data in the parameter customizationData and the existing host customization data: the empty fields in the parameter customizationData don't overwrite the old values. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcHostProfilesCustomizationData

arg1Boolean

arg2Boolean

arg3VcProfile

arg4VcManagedEntity []


Return Value

Type Description
VcTask

exportHostProfileCustomizations_Task

Export a host customization data into a specified format. The method returns a {@link vim.profile.host.ProfileManager.CustomizationData} object containing the customization data. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcManagedEntity []

arg1String


Return Value

Type Description
VcTask

applyHostConfig_Task

Apply the configuration to the host. If you specify any user input, the configuration will be saved in the {@link vim.profile.host.AnswerFile} associated with the host. If there is no answer file, the Profile Engine will create one. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcHostSystem

arg1VcHostConfigSpec

arg2VcProfileDeferredPolicyOptionParameter []


Return Value

Type Description
VcTask

queryAnswerFileStatus

Returns the status of the answer files associated with specified hosts. This method returns the most recent status determined by {@link vim.profile.host.ProfileManager#checkAnswerFileStatus}. See {@link ProfileManager.AnswerFileStatus} for valid values. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcHostSystem []


Return Value

Type Description
VcAnswerFileStatusResult []

createProfile

Create a profile from the specified CreateSpec. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcProfileCreateSpec


Return Value

Type Description
VcProfile

createDefaultProfile

Create a default subprofile of a given type (for example, a {@link vim.profile.host.VirtualSwitchProfile}). After you create the subprofile, you can add it to a configuration specification and update the host profile:
@since vSphere API 4.0

Parameters

NameTypeDescription
arg0String

arg1String

arg2VcProfile


Return Value

Type Description
VcApplyProfile

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. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcHostSystem []


Return Value

Type Description
VcTask

retrieveHostCustomizations

This is the batch version of vim.profile.host.ProfileManager@retrieveAnswerFile. Returns a map that contains the hosts and their answer file data objects. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcHostSystem []


Return Value

Type Description
VcStructuredCustomizations []

validateHostProfileComposition_Task

Validates the proposed host profile composition. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcProfile

arg1VcProfile []

arg2VcHostApplyProfile

arg3VcHostApplyProfile

arg4VcHostApplyProfile

arg5VcHostApplyProfile

arg6Boolean


Return Value

Type Description
VcTask

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

retrieveHostCustomizationsForProfile

This is the batch version of vim.profile.host.ProfileManager@retrieveAnswerFileForProfile. Returns a map that contains the hosts and their answer files associated with these hosts, augmented with whatever answer file values are required for the supplied host profile. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcHostSystem []

arg1VcHostApplyProfile


Return Value

Type Description
VcStructuredCustomizations []

compositeHostProfile_Task

Composes (merge, replace, delete, disable) the selected configurations into the target host profiles. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcProfile

arg1VcProfile []

arg2VcHostApplyProfile

arg3VcHostApplyProfile

arg4VcHostApplyProfile

arg5VcHostApplyProfile


Return Value

Type Description
VcTask

applyEntitiesConfig_Task

The task for applying host configuration on a list of hosts. This is the batch version of applyHostConfiguration. The implementation of this method will: When a host is in a DRS cluster but doesn't satisfy the state requirement such as that the host is not in the required maintenance mode, this method uses DRS feature to put the host into maintenance mode. This method will apply a host profile to a stateful host or stateless host; or apply a host profile to a stateless host by reboot. After a host is reboot, a check compliance is done to update the latest compliance status. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcApplyHostProfileConfigurationSpec []


Return Value

Type Description
VcTask

queryPolicyMetadata

Get the Metadata information for the policyNames. PolicyNames are available with the defaultProfile obtained by invoking the method createDefaultProfile. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String []

arg1VcProfile


Return Value

Type Description
VcProfilePolicyMetadata []

validateHostCustomizations

This is the batch version of vim.profile.host.ProfileManager@validateAnswerFile. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcHostProfileManagerHostToConfigSpecMap []

arg1VcHostApplyProfile


Return Value

Type Description
VcAnswerFileValidationResultMap []

updateHostCustomizations_Task

This is the batch version of vim.profile.host.ProfileManager@updateAnswerFile. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcHostProfileManagerHostToConfigSpecMap []


Return Value

Type Description
VcTask

queryHostProfileCategoryMetadata

Retrieve the metadata for a set of profile categories. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0String []

arg1VcProfile


Return Value

Type Description
VcProfileCategoryMetadata []

generateHostProfileTaskList_Task

Generate a list of configuration tasks that will be performed on the host during HostProfile application. This differs from the {@link vim.profile.host.ProfileManager#generateConfigTaskList} method in that it returns a task to monitor the progress of the operation. @since vSphere API 5.5

Parameters

NameTypeDescription
arg0VcHostConfigSpec

arg1VcHostSystem


Return Value

Type Description
VcTask

updateAnswerFile_Task

Update the {@link vim.profile.host.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. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcHostSystem

arg1VcAnswerFileCreateSpec


Return Value

Type Description
VcTask

retrieveAnswerFile

Returns the answer file associated with a particular host. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcHostSystem


Return Value

Type Description
VcAnswerFile

generateHostConfigTaskSpec_Task

This method generates {@link ApplyHostConfigSpec} data object for each host which can be passed as input to {@link vim.profile.host.ProfileManager#applyEntitiesConfiguration} to configure that host. For each host, this method goes through two stages, {@link vim.profile.host.HostProfile#execute} stage {@link vim.profile.host.ProfileManager#generateTaskList} stage. If the {@link vim.profile.host.HostProfile#execute} stage completes successfully then the method invokes the {@link vim.profile.host.ProfileManager#generateTaskList} stage to generate the list of configuration tasks that are needed to configure the host. This method will return a task to monitor the progress of the operation. @since vSphere API 6.5

Parameters

NameTypeDescription
arg0VcStructuredCustomizations []


Return Value

Type Description
VcTask

generateConfigTaskList

Generate a list of configuration tasks that will be performed on the host during HostProfile application. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcHostConfigSpec

arg1VcHostSystem


Return Value

Type Description
VcHostProfileManagerConfigTaskList

validateAnswerFile

Validate the {@link vim.profile.host.AnswerFile} for the specified host. This differs from the {@link ProfileManager}.{@link ProfileManager#updateAnswerFile} method in that the verification checks will be run, but the answer file itself will not be saved. A subsequent call to {@link ProfileManager}.{@link ProfileManager#updateAnswerFile} will still be required to save the host profile. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0VcHostSystem

arg1VcAnswerFileCreateSpec

arg2VcHostApplyProfile


Return Value

Type Description
VcAnswerFileValidationResult

queryProfileStructure

Get information about the structure of the profile. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcProfile


Return Value

Type Description
VcProfileProfileStructure

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 {@link vim.profile.host.AnswerFile}.{@link vim.profile.host.AnswerFile#userInput}. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0VcHostSystem


Return Value

Type Description
VcTask

queryHostProfileComponentMetadata

Retrieve the metadata for a set of profile components. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0String []

arg1VcProfile


Return Value

Type Description
VcProfileComponentMetadata []

retrieveAnswerFileForProfile

Returns the answer file associated with a particular host, augmented with whatever answer file values are required for the supplied host profile. @since vSphere API 5.1

Parameters

NameTypeDescription
arg0VcHostSystem

arg1VcHostApplyProfile


Return Value

Type Description
VcAnswerFile