By default, when you install ESXi, it will be set to a 60-day evaluation license. This license provides the same features as the vSphere Enterprise Plus license, but with limited usage time.
You can register for a free license of ESXi 7 here: but after that will be limited features for the free version.
Therefore, the best way to use the premium features of ESXi forever is to reset the expiry date of the trial license.
After 60 days expires, ESXi will give an error “Your evaluation license for ESXi has expired.” Open virtual machines will continue to work, but if you turn it off, it will not be able to open again.

Here’s how to reset the trial period so you can use ESXi forever without feature restrictions. This method can be applied to both ESXi 6 and ESXi 7.
Note: For experimental and destructive purposes only. If you use it for business purposes, you need to buy a license from VMWare.
1. Enable SSH
Access the Host item in the left menu, select Actions -> Services -> Enable Secure Shell (SSH) to allow access to the ESXi host via SSH.

2. Reset copyright
SSH access to the ESXi host and execute the following commands
Remove existing license (expired)
rm -r /etc/vmware/license.cfg
Copy the trial license (available on the host) instead
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
Restart the ESXi . service
/etc/init.d/vpxa restart
Access to ESXi again, the trial license has been reset to 60 days.

3. Configure automatic reset
I will configure the system to automatically run the above scripts every 30 days, no more manual manipulation.
Create files reset-license.sh
and save it in your datastore.
cd /vmfs/volumes/datastore1/
vi reset-license.sh
You need a replacement datastore1
with the corresponding datastore name on the host in use.
ESXi not available nano
to edit the file, it is mandatory to use vi
. How to use vi: press i to start editing mode, paste in the content below. Then click next Esc
:
w
q
and Enter
to save and exit
#!/bin/sh
## remove license
echo 'Removing License'
rm -r /etc/vmware/license.cfg
## get a new trial license
echo 'Copying new license'
cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
## restart services
echo 'Restarting VPXA'
/etc/init.d/vpxa restart
Set execute permission for file reset-license.sh
and test run
chmod +x reset-license.sh
./reset-license.sh
Next, create cron to run automatically on the 1st of every month
/bin/echo "* * 1 * * /vmfs/volumes/datastore1/reset-eval.sh" >> /var/spool/cron/crontabs/root
kill $(cat /var/run/crond.pid)
crond
Because ESXi will automatically reset the cron file every time it boots, it is necessary to edit the file /etc/rc.local.d/local.sh
and add the following before the line exit 0
at the bottom.
/bin/kill $(cat /var/run/crond.pid)
/bin/echo "* * 1 * * /vmfs/volumes/datastore1/reset-license.sh" >> /var/spool/cron/crontabs/root
crond
It is done. ESXi will always work in trial mode, with the full features of the Enterprise version for you to freely research and play.
If my article has been beneficial in providing valuable information and knowledge, don’t hesitate to express your gratitude through a kind message or a virtual shout-out. Your encouragement will drive me to continue sharing informative content. And, if you’re feeling generous, a donation would be greatly appreciated as it would further motivate me to keep writing. Thank you for taking the time to read!