Reset ESXi Trial License

From Comprofix
Jump to: navigation, search

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.


  • Turn on SSH and log in to the host.
  • Remove the current license
rm -rf /etc/vmware/vmware.lic
rm -rf /etc/vmwaare/license.cfg
  • Copy over the new evaluation license, which is already on the host
cp -rf /etc/vmware/.#vmware.lic /etc/vmware/vmware.lic
cp -rf /etc/vmware/.#license.cfg /etc/vmware/license.cfg
  • Restart ESXi services
/etc/init.d/vpxa restart

Update via CRON

  • Create script accessible on your host. Folder such as /vmfs/volumes/<Storage_Name/
vi /vmfs/volumes/<Storage_Name/
  • Copy the following script
## remove license
echo 'Removing License'
rm -r /etc/vmware/license.cfg
rm -r /etc/vmware/vmware.lic
## get a new trial license
echo 'Copying new license'
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
cp /etc/vmware/.#vmware.lic /etc/vmware/vmware.lic
## restart services
echo 'Restarting VPXA'
/etc/init.d/vpxa restart
  • Make the script executable
chmod +x /vmfs/volumes/<Storage_Name/
  • Update CRON
/bin/echo "* * 59 * * /vmfs/volumes/<Storage_Name/" >> /var/spool/cron/crontabs/root
kill $(cat /var/run/
  • Add the following above the 'exit 0' line of 'etc/rc.local.d/' to regenerate the job as ESXi clears the crontab on reboot
/bin/kill $(cat /var/run/
/bin/echo "* * 59 * * /vmfs/volumes/<Storage_Name/" >> /var/spool/cron/crontabs/root