Add or Update your vSphere or ESXi license key through the terminal

December 4, 2013

If you are like me and you forgot to input your vSphere or ESXi license key before it expired not to fear! It is possible to update the license key through the terminal.

The license is stored in a plain text file at /etc/vmware/vmware.lic. To edit it from the terminal type in:

vi /etc/vmware/vmware.lic

Erase the code that is in there and put in yours.

Now the hard part, getting it to apply. It seems that restarting the management service should do it, but this has changed between versions of vSphere and ESXi. I simply rebooted the host machine and everything worked fine. It can be accomplished with the shutdown.sh command.