Home VCAP-DCA 5 Auto Deploy and Bulk Licensing

Auto Deploy and Bulk Licensing

by admin

There are a couple of ways in which you can assign license keys to hosts that you can provisioned with Auto Deploy. You can use the traditional method of assigning licenses using vCenter, or you can use PowerCLI to add a pre-defined set of license keys to the vCenter database. When a host is connected to vCenter it will automatically be assigned a license.

The process using PowerCLI is as follows:

1. Connect to vCenter:

Connect-VIServer -Server vCenterAddress -User username -Password password

2. Point at the license server and datacenter for bulk licensing:

$licenseDataManager = Get-LicenseDataManager

$hostContainer = Get-DataCenter -Name DataCenterName

license1

3. Add a new license:

$licenseData = New-Object VMware.VimAutomation.License.Types.LicenseDate

$licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry

license2

$licenseKeyEntry.TypeId = “vmware-vsphere”

$licenseKeyEntry.LicenseKey = “XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

$licenseData.LicenseKeys += $licenseKeyEntry

4. Update the License Data:

$licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData)

$licenseDataManager.QueryAssociatedLicenseData($hostContainer.Uid)

license3

Now, when your Auto Deploy provisioned hosts  connect to vCenter, they should pick up a license automatically.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More