Host Profile Manager Create Default Profile
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:
- Call the
CreateDefaultProfile
method. - Create a HostProfileCompleteConfigSpec object.
- Copy the existing profile from the host configuration information (HostProfile.config.applyProfile) to the configuration specification.
- Add the new subprofile to the configuration specification. For example, if you create a
VirtualSwitchProfile
, you would add it to the list of virtual switches in the network profile for the configuration specification (NetworkProfile.vswitch[]). - Call HostProfile.UpdateHostProfile to save the new subprofile.
Required privileges: System.View
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case HostProfileManager/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"profileType": "string",
"profileTypeName": "string",
"profile": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
Type of profile to create. The profile types are system-defined (ApplyProfile.ApplyProfile.profileTypeName).
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.
Derived subprofile of type profileType
.
{
"_typeName": "string",
"enabled": false,
"policy": [
{
"_typeName": "string",
"id": "string",
"policyOption": {
"_typeName": "string",
"id": "string",
"parameter": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
]
}
}
],
"profileTypeName": "string",
"profileVersion": "string",
"property": [
"ProfileApplyProfileProperty Object"
],
"favorite": false,
"toBeMerged": false,
"toReplaceWith": false,
"toBeDeleted": false,
"copyEnableStatus": false,
"hidden": false
}
Indicates whether the profile is enabled.
The list of policies comprising the profile.
A ProfilePolicy stores one or more configuration data values in a PolicyOption. The policy option is one of the configuration options from the ProfilePolicyMetadata.ProfilePolicyMetadata.possibleOption list.
Identifies the profile type.
Profile engine version.
List of subprofiles for this profile.
This list can change depending on which profile plug-ins are available in the system. Subprofiles can be nested to arbitrary depths to represent host capabilities.
Indicates whether this profile is marked as "favorite".
Indicates whether this profile is marked as to-be-merged.
Indicates whether the selected array elements, with the current as one of them, replace the profile array in the target host profile.
Indicates whether this profile is marked as to-be-deleted.
Indicates that the member variable enabled
of this profile will be copied from source profile to target profiles at host profile composition.
Indicates whether this profile will be displayed or not.