Downgrade / Remove vRA License

I recently had the requirement to remove an existing vRealize Suite Enterprise key from vRealize Automation 7.3.1 and replace it with a vRealize Suite Advanced key. When you try to replace the license key from the VAMI, you will receive an error stating that you cannot downgrade license keys "Unable to downgrade existing license edition". To replace the license you must do the following. Note, this is 100% not supported by VMware so use it at your own risk and always do it first in a test environment, and always ensure you have backups.

Begin by performing a backup/snapshot of each server (vRA appliances & IaaS Windows servers) as well as performing a backup of the database manually. Creating a snapshot of the vRA environment is easily performed through vRealize Lifecycle Manager. Note, the DB server is not snapshotted and must be backed up manually.

Connect to the Windows DB server and confirm that no licenses exist in the DB by running the following command

1SELECT * FROM [dbo].[LicenseKeys]

If this returns no records, skip the following steps and proceed with removing the license from the vRA appliance

Removing existing license key from the IaaS DB

If the previous command returned values, the run the following command to backup the existing table into a new table (dbo.LicenseKeys_backup)

1SELECT * INTO SELECT * INTO dbo.LicenseKeys_backup FROM dbo.LicenseKeys FROM dbo.LicenseKeys

Remove the license keys by running the below command

1DELETE * FROM dbo.LicenseKeys

If you need to restore the deleted license keys, run the below command

1INSERT INTO LicenseKeys (SerialNumber) SELECT SerialNumber FROM LicenseKeys_backup WHERE NOT EXISTS (SELECT SerialNumber FROM LicenseKeys WHERE SerialNumber = LicenseKeys_backup.SerialNumber)

Remove existing license from vRA vPostgres DB

If you have a clustered setup, perform these step on one appliance only as the databases are synced. You can always connect to each instance and validate the data is consistent.

Connect to the vRA appliance over SSH (using PuTTy) as the root user and stop the vRA service

1/etc/init.d/vcac-server stop

Switch to the postgres user to ensure you have permissions to perform the database operations

1su - postgres

Change directory to the application

1cd /opt/vmware/vpostgres/current/bin

Run the application psql to alter the vPostgres database

1./psql

Connect to the vcac database

1\c vcac

Check the entries in the vPostgres database

1select * from embeddedlicenseentry;

Delete all of the entries in the table

1delete from embeddedlicenseentry;

Exit the application

1\q

Switch back to the root user

1sudo su -

Start the vRealize Appliance service

1/etc/init.d/vcac-server start

Once the vRA service has started, the VAMI (port 5480) page will show no license key installed. You can now add your downgraded license and submit it. Once this is completed, I always perform a complete restart of the vRA environment (DB/IaaS/vRA) to ensure that the next time the application starts up we know that we haven't caused an issue.

comments powered by Disqus