Upload licenses into AVI using curl command.
search cancel

Upload licenses into AVI using curl command.

book

Article ID: 391178

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

When the requirement is to migrate from cloud services licenses to on-prem licenses, then we would not be able to add the licenses via the UI. The licenses can be added via an API call. 

Resolution

For this case scenarios we have the following workaround which can be used, all that we need is the following:

1. Local admin user and password of the controller.

2. The serial key of the license


We can use the following curl:

curl -k -X PUT -u admin:'<admin password>' -H "Content-Type: application/json" \
-d '{"license_tier":"ENTERPRISE", "serial_key":"<License Key>"}' \
https://<controller IP>/api/license

 

Just change the following parameters:

<admin password> 

change this for the admin password without the <>

 

<License Key>

change this for the actual license key without the <>

 

<controller IP>

change this for the controller IP without the <>

 

Steps:

1. Log into the controller CLI, gain root access with sudo -s and enter your admin password.

2. Use the curl provided above with the changes required for your environment

 

This is an example:

You can see at the bottom there is a successful confirmation, to further check that you can use the following command from the shell:

show license

 

After that you can switch to enterprise tier if needed or if already running enterprise tier you should also see the license from the UI: