Wednesday 30 December 2015

Reset ESXi 6 Evaluation License

https://calvin.me/reset-esxi-evaluation-license/

*For testing and educational purposes only*
The ESXi 6 evaluation license is valid for 60 days and a free one can be obtained from VMware at anytime. Resetting the evaluation license provides continual access to all the features available, and most importantly for me, full compatibility with the ESXi Embedded Host Client.

Commands

Note: Running these commands will cause ESXi to appear offline/down. For example, my UPS virtual machine connected to my actual UPS began shutting down VMs because it believed ESXi ran into a problem. Shut down those VMs firstly before running this command then bring them back up later.
Turn on SSH and log in to the host.
Remove the current license
Copy over the new evaluation license, which is already on the host
Restart ESXi services
Confirm the new license

Automatic Script

The commands above can be run automatic to keep your ESXi license reset on a set schedule using cron.
I have also created a script which powers off and on a VM of your choice (such as a UPS agent) in case it shuts down the host.
First create the script (reset-eval.sh) somewhere accessible to ESXi. I chose to put in my ZFS0 datastore (/vmfs/volumes/ZFS0/reset.eval)
This alternative script shutsdown any VM called ‘ups-agent’. You may edit that line to your VM’s name
Test the script and make sure it works (remember to chmod +x)
Add the script to the crontab to make it run on a set schedule (mine is set at 6:05am each day). For each 59 days do ‘* * 59 * *’
Finally add the following to the end of ‘/etc/rc.local.d/local.sh’ to regenerate the job as ESXi clears the crontab on reboot


No comments:

Post a Comment