Scripting Object - VcLicenseManager

Scripting-object corresponding to
LicenseManager
Attribute of
VcHostConfigManager, VcSdkConnection, VcServiceContent

Scripting Object Description

This managed object type controls entitlements for a given VMware platform. VMware platforms include VirtualCenter, ESX Server, VMware Server, Workstation and Player. Entitlements define what software capabilities this host may use.

Entitlements are identified by a short string 'key'. Keys can represent either a particular edition (Full, Starter) or a particular feature/function (featureKey) (backup, nas). An edition implies zero one or more functions which are express, denied or optional. For example a 'Full' edition includes 'iscsi' function but a Starter edition might disallow it.

Which edition a given VMware platform uses can be defined at any time. Generally this is done right after first install and boot as installation software may not set it. For editions that are similar in nature, any future changes to edition type will only impact future requests for functionality. Current functionality is left unaffected. The same is true for optional functions enabled/disabled after some period of time. For dissimilar editions, such transitions may require entering maintenance mode first else an exception of InvalidState will be thrown.

To specify the edition type and any optional functions, use updateLicense for ESX Server and addLicense follow by LicenseAssingmentManager.updateAssignedLicense for VirtualCenter.

When an edition is specified for a given host, the cost of that edition (how many licenses are needed) is determined. The cost is computed using the license's CostUnit value multiplied by the number of units activated. For example, when a VMware platform is set to an edition which uses a 'cpuPackage' on a two socket server, two licenses would be needed to successfully install that edition.

Here is a diagram of the unit costs supported by this API and their relationships.

   +------------------------------+   +--------+      +-------+
   | +-----------+ +-----------+  |   | Server |      |  Host |
   | |           | |           |  |   +--------+      +-------+
   | |  cpuCore  | |   cpuCore |  |                   +-------+
   | +-----------+ +-----------+  |   +--------+      |  Host |
   |                  cpuPackage  |   |  VM    |      +-------+
   +------------------------------+   +--------+
  

Attributes

Name Type Description
diagnosticsVcLicenseDiagnostics

@since VI API 2.5
evaluationVcLicenseManagerEvaluationInfo

@since vSphere API 4.0
featureInfoVcLicenseFeatureInfo []

@since VI API 2.5
idString

@since Unknown
licenseAssignmentManagerVcLicenseAssignmentManager

@since vSphere API 4.0
licensedEditionString

@since VI API 2.5
licensesVcLicenseManagerLicenseInfo []

@since vSphere API 4.0
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
sourceVcLicenseSource

@since VI API 2.5
sourceAvailableBoolean

@since VI API 2.5
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, activateRemoteHardEnforcement, addLicense, checkLicenseFeature, configureLicenseSource, createTrigger, decodeLicense, disableFeature, enableFeature, queryLicenseDataManager, queryLicenseSourceAvailability, queryLicenseUsage, querySupportedFeatures, removeLicense, removeLicenseLabel, setLicenseEdition, updateLicense, updateLicenseLabel

queryLicenseUsage

Returns the license usage. The license usage is a list of supported features and the number of licenses that have been reserved.

PLATFORM Specific Notes: VirtualCenter - Empty string returns the usage of non-host specific features. Must specify managed host to query. ESX Server - Host argument ignored. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem


Return Value

Type Description
VcLicenseUsageInfo

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

configureLicenseSource

Allows for reconfiguration of the License Manager license source.

This changes the licensing source to be either served or local. Before changing the license source location, the API checks the number of licenses available at the new potential source to ensure there are at least as many licenses there as have been issued by the current source. If there are an equal or greater number of licenses at the new source, all licenses on the current source are released and then reacquired from the new source. If there are not enough licenses available on the new source to reissue all licenses, the operation fails.

This is used to configure the license source on an individual host.

PLATFORM Specific Notes: VirtualCenter - only supports a served source. the host parameter is mandatory. ESX Server - the host parameter is optional.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem

arg1VcLicenseSource


Return Value

Type Description
None

queryLicenseSourceAvailability

Queries the current license source for total and available licenses available for each feature known to this system. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem


Return Value

Type Description
VcLicenseAvailabilityInfo []

querySupportedFeatures

Queries the current license source for a list of available licenses that can be licensed from this system. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem


Return Value

Type Description
VcLicenseFeatureInfo []

removeLicenseLabel

Removed a license's label. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String

arg1String


Return Value

Type Description
None

disableFeature

Release licenses for an optional feature.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem

arg1String


Return Value

Type Description
Boolean

updateLicenseLabel

Update a license's label. It creates a label entry if the labelKey doesn't already exist @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String

arg1String

arg2String


Return Value

Type Description
None

removeLicense

Remove license from the available set. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String


Return Value

Type Description
None

updateLicense

Updates the available licenses to the one provided in licenseKey. This is the same as removing all the licenses using {@link LicenseManager#removeLicense} and adding licenseKey using {@link LicenseManager#addLicense} If the optional parameter labels is specify this is the same as calling updateLicense without the optioal parameter and calling updateLabel for each pair in the labels array. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String

arg1VcKeyValue []


Return Value

Type Description
VcLicenseManagerLicenseInfo

addLicense

Adds a license to the inventory of available licenses. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String

arg1VcKeyValue []


Return Value

Type Description
VcLicenseManagerLicenseInfo

checkLicenseFeature

Returns whether or not a given feature is enabled.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem

arg1String


Return Value

Type Description
Boolean

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

activateRemoteHardEnforcement

This method moves the host into state for which VM powerOn and vMotion operations are allowed only if intiated through vCenter for a specified time interval. The host automatically reverts to it's normal state if this method is not invoked again within the specified time interval thus providing a heartbeat like interface This method will be called periodically by vCenter to keep the host in the described state when a specific hard enforcement license is set in vCenter. It would be allowed for this method to be invoked from vCenter only. This method is not relevant on vCenter. @since vSphere API 5.0

Parameters

NameTypeDescription
arg0Number


Return Value

Type Description
None

enableFeature

Enable a feature that has an optional state.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem

arg1String


Return Value

Type Description
Boolean

setLicenseEdition

Defines the product's license edition. The edition defines which product license the server requires. This, in turn, determines the core set of functionality provided by the product and the additional features that can be licensed.

To determine what featureKey the current platform will accept, use querySourceAvailablity() at runtime, or consult the documentation for the current platform.

@since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostSystem

arg1String


Return Value

Type Description
None

queryLicenseDataManager

This method gives access to the {@link LicenseDataManager} @since vSphere API 5.0

Parameters

NameTypeDescription
None

Return Value

Type Description
VcLicenseDataManager

decodeLicense

Decodes licensing information on the license specified. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0String


Return Value

Type Description
VcLicenseManagerLicenseInfo