Turn on SSH and login to the host. (Click here if you need a guide)
Commands to run
Remove the current license
rm -r /etc/vmware/license.cfg
Copy over the new evaluation license, which is already on the host
Copy over the new evaluation license, which is already on the host
Restart ESXi services
/etc/init.d/vpxa restart
You may need to restart the hostd service if you struggle to power on the VMs. Usually, this happens when the license has expired. If it’s still not letting you boot the servers, reboot the Host.
*You may need to restart the hostd service if you struggle to power on the VMS. Usually, this happens when the license has expired.*
*If it's still not letting you boot the servers, reboot the Host.*
Confirm the new license under Host > Manage > Licensing and make sure the Eval license is now reset.
Example script in bash below:- Reset-Eval-Script.sh
#!/bin/sh
## Remove the License
echo 'Removing License'
rm -r /etc/vmware/license.cfg
## Copy the trial license File
echo 'Copying new license'
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
## Restart Services
echo 'Restarting VPXA Service'
/etc/init.d/vpxa restart
## Optional
## Restart hostd Service
## echo 'Restarting Hostd Service'
## /etc/init.d/hostd restart
Test the script and make sure it works (remember to chmod +x)
chmod +x Reset-Eval-Script.sh
./Reset-Eval-Script.sh
If anyone can figure out how to set up a cron job to run every 59 days, then please let me know.