Configure Bulk Licensing

Bulk Licensing Feature of vSphere is especially useful when ESXi servers are deployed by AutoDeploy. As there is not option to specify the license key via Host Profile, Administrator must manually attach license to ESXi Servers.

Bulk Licensing allows administrator to use pre-defined license keys to ESXi server automatically including AutoDeployed ESXi server.

Configure Bulk Licensing

  1. Make sure that you have License available in vCenter Server
    image
  2. To configure Bulk Licensing, you need to use PowerCLI. Connect to vCenter Server using PowerCLI then bind the associated license manager to a variable.
    PowerCLI C:> Connect-VIServer -Server vc.vm.lab
    Name                           Port  User
    ----                           ----  ----
    vc.vm.lab                      443   VMAdministrator
    PowerCLI C:> $licenseDataManager = Get-LicenseDataManager
  3. Run a cmdlet that retrieves the datacenter in which the hosts for which you want to use the bulk licensing feature are located.
    You can also run a cmdlet that retrieves a cluster to use bulk licensing for all hosts in a cluster, or retrieves a folder to use bulk licensing for all hosts in a folder. In this demonstration, I will be using my Cluster as a host containing object, so that I can use different licences for each Cluster.

    PowerCLI C:> $hostContainer = Get-Cluster -Name AutoDeploy_Cluster
  4. Create a new LicenseData object and a LicenseKeyEntry object with associated type ID and license key.
    PowerCLI C:> $licenseData = New-Object VMware.VimAutomation.License.Types.LicenseData
    PowerCLI C:> $licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry
    PowerCLI C:> $licenseKeyEntry.TypeId = "vmware-vsphere"
    PowerCLI C:> $licenseKeyEntry.LicenseKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX"
  5. Associate the LicenseKeys attribute of the LicenseData object you created in step 3 with the LicenseKeyEntry object.
    PowerCLI C:> $licenseData.LicenseKeys += $licenseKeyEntry
  6. Update the license data for the data center with the LicenseData object
    PowerCLI C:> $licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData)
  7. Verify that the license is associated with the host container.
    PowerCLI C:> $licenseDataManager.QueryAssociatedLicenseData($hostContainer.Uid)
    LicenseKeys
    -----------
    {vmware-vsphere: XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX}
    PowerCLI C:>

Verifying Bulk Licensing Operation

  1. I have prepared a ESXi Server for AutoDeploy
    image
  2. AutoDeploy Completes.
    image
  3. See the Host Summary via Hosts and Clusters View.
    image
  4. Go to Configuration > Licensed features to see the correct license is assigned to the host automatically.
    image
   Send article as PDF   

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: