Quoted directly by Aaron from:
“This guide will give you the steps needed to reset the license file so that you can apply the evaluation license back to your ESXi host.
WARNING: This is for education/informational testing/development purposes only, and should not be used on a production server.
To reset your expired ESX 4.x, ESXi 4.x, ESXi 5.x or ESXi 6.x 60 day evaluation license:
- Login to the HOST via SSH or Shell
- Remove /etc/vmware/license.cfg
- Copy /etc/vmware/.#license.cfg to /etc/vmware/license.cfg
- Restart the vpxa service
Or simply copy the code below and paste it into your SSH session.
rm -r /etc/vmware/license.cfg
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
Then open the “Licensed Features” option in the configuration tab of the ESXi host through the vSphere Client.
Click on “Edit” in the top right of the “Licensed Features” page
Once the “Assign License” window opens you will see two options. There will be a category for “Evaluation Mode” and Assigned License. Click on the “(No License Key)” option and then click “OK”. This will set the host back to “evaluation” mode and will give you access to all features for 60-days!”
*Update* This works if the current trial licensed hasn’t expired yet. If it has already expired, ether it be existing trial or an alternative license type, the above trick doesn’t seem to work. When navigating to the license area of the host afterwards it expects you to enter a key. (I didn’t test actually putting in all 0’s which might just be the field text indicator and not actually filled). but it wouldn’t let me proceed. In this case a host reboot might be required by following these commands instead:
rm /etc/vmware/vmware.lic rm /etc/vmware/license.cfg reboot
This worked and I was able to spin up my VMs on the host again.