Tuesday, July 14, 2015

Reset ESXi VMware Evaluation license to 60 days.

Today my lab evalaution license was end with 0 days remaining; I found good way to reset your VMware licence evaluation mode back to 60 days so you can use it for more 60 days & reset again after 60 days.
now there is no need to format / reinstall your ESXi & vCenter to reset your licence.

Note: I will not suggest this to use in your production environment but you can use it for your lab.

here are the steps below:

Reset licence on ESXi host:

A) For ESX 4  & ESXi 4 , 5
  1. Login to the TSM through SSH or Shell
  2. Remove the following two files:
  3. /etc/vmware/vmware.lic
  4. /etc/vmware/license.cfg
  5. Reboot server
use below command to do the task
# m -f /etc/vmware/vmware.lic /etc/vmware/license.cfg

#reboot

B) For ESXi 5.1, 5.5 & 6

For ESXi 5.1 and ESXi 5.5, you may need to continually remove the license files as the server reboots for this to work.  The following should do this quite nicely:
--------------------------------------------------------------------------------------------------
rm -f /etc/vmware/vmware.lic /etc/vmware/license.cfg
reboot ; while true ; do
    rm -f /etc/vmware/vmware.lic /etc/vmware/license.cfg
done

An alternative shows that restarting the services should works just as well as rebooting the server: 
# For ESXi 5.0
rm -f /etc/vmware/vmware.lic /etc/vmware/license.cfg
services.sh restart
# For ESXi 5.1
rm -r /etc/vmware/license.cfg
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
/etc/init.d/vpxa restart

The alternative also shows a method for resetting the trial license while connected to vCenter server.  I still think removing and re-adding the ESXi server is cleaner.


Update: 25/08/2015

use below command for 5.1

rm -r /etc/vmware/license.cfg
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
/etc/init.d/vpxa restart
Reset ESXi Licence
Rated 4.9/5 based on 892 reviews