Difference between revisions of "Reset ESXi Trial License"

From Comprofix
Jump to: navigation, search
(Created page with "__FORCETOC__ 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 acc...")
 
(No difference)

Latest revision as of 13:56, 16 July 2018


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.

Manual

  • 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/reset.sh
  • Copy the following script
#!/bin/sh
## 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/reset.sh
  • Update CRON
/bin/echo "* * 59 * * /vmfs/volumes/<Storage_Name/reset.sh" >> /var/spool/cron/crontabs/root
kill $(cat /var/run/crond.pid)
crond
  • Add the following above the 'exit 0' line of 'etc/rc.local.d/local.sh' to regenerate the job as ESXi clears the crontab on reboot
/bin/kill $(cat /var/run/crond.pid)
/bin/echo "* * 59 * * /vmfs/volumes/<Storage_Name/reset.sh" >> /var/spool/cron/crontabs/root
crond