Managing Licenses with
LicenseManager
When you want to perform tasks in the
vSphere environment, you must have licenses to do so. Licensing applies to ESXi
hosts, vCenter Server, and special features such as VMware HA or VMware
vMotion.
The
vSphere Datacenter Administration
Guide
explains how to manage ESXi and vCenter Server licenses using the
vSphere Client, and gives background information about license keys, license
inventory, and related topics.
You can also manage licenses using the
LicenseManager
and
LicenseAssignmentManager
managed
objects. You use
LicenseManager
to explicitly
manage the pool of available licenses on ESXi systems released before vSphere
4.0. You use
LicenseAssignmentManager
,
available through the
LicenseManager.licenseAssignmentManager
property, to manage assignment of licenses to entities in the vCenter Server
inventory. You can retrieve information, add licenses, and remove licenses.
Retrieve
Information
- Retrieve theLicenseManager.evaluationandLicenseManager.licensesproperties to obtain information on evaluation licenses and full licenses.
- CallLicenseManager.DecodeLicenseto decode license information. The call returns aLicenseManagerLicenseInfodata object, which encapsulates information about the license.
- CallLicenseAssignmentManager.QueryAssignedLicensesfor information about assigned licenses.
Add Licenses
- CallLicenseManager.AddLicense, passing in a license key, to add a license to the inventory of available licenses.
- CallLicenseAssignmentManager.UpdateAssignedLicense, passing in a license key, to update the licenses for an entity, for example, a host system.
Remove
Licenses
- CallLicenseAssignmentManager.RemoveAssignedLicenseto remove all licenses from an entity, passing in an entity to remove licenses from. You can then assign those licenses to other entities.
- CallLicenseManager.RemoveLicense, passing in a license key, to remove a license from the inventory of available licenses.