VMware VS4-ENT-PL-A Setup Guide - Page 172
Assign license keys, with the, vSphere Web Client, LicenseDataManager, PowerCLI, Procedure
View all VMware VS4-ENT-PL-A manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 172 highlights
vSphere Installation and Setup Assigning license keys through the vSphere Web Client and assigning licensing by using PowerCLI cmdlets function differently. Assign license keys with the vSphere Web Client You can assign license keys to a host when you add the host to the vCenter Server system or when the host is managed by a vCenter Server system. Assign license keys with LicenseDataManager PowerCLI You can specify a set of license keys to be added to a set of hosts. The license keys are added to the vCenter Server database. Each time a host is added to the vCenter Server system or reconnects to the vCenter Server system, the host is assigned a license key. A license key that is assigned through the PowerCLI is treated as a default license key. When an unlicensed host is added or reconnected, it is assigned the default license key. If a host is already licensed, it keeps its license key. Procedure 1 Connect to the vCenter Server system you want to use and bind the associated license manager to a variable. Connect-VIServer -Server 192.XXX.X.XX -User username -Password password $licenseDataManager = Get-LicenseDataManager 2 Run a cmdlet that retrieves the datacenter in which the hosts for which you want to use the bulk licensing feature are located. $hostContainer = Get-Datacenter -Name Datacenter-X 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. 3 Create a new LicenseData object and a LicenseKeyEntry object with associated type ID and license key. $licenseData = New-Object VMware.VimAutomation.License.Types.LicenseData $licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry $licenseKeyEntry.TypeId = "vmware-vsphere" $licenseKeyEntry.LicenseKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" 4 Associate the LicenseKeys attribute of the LicenseData object you created in step 3 with the LicenseKeyEntry object. $licenseData.LicenseKeys += $licenseKeyEntry 5 Update the license data for the data center with the LicenseData object and verify that the license is associated with the host container. $licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData) $licenseDataManager.QueryAssociatedLicenseData($hostContainer.Uid) 6 Provision one or more hosts with Auto Deploy and assign them to the data center or to the cluster that you assigned the license data to. 7 You can use the vSphere Web Client to verify that the host is successfully assigned to the default license XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. All hosts that you assigned to the data center are now licensed automatically. 172 VMware, Inc.