Reset VMware ESXi 4.1 Trial License Period

To reset the VMware ESXi 4.1 trial license period without re-installing your host, do the following:

  • At the console; login
  • Enable Local Tech Support Mode
  • Press Alt-F1 to get to the login prompt
  • Login as root
  • cd /etc/vmware
  • rm-r vmware.lic
  • rm-r license.cfg
  • reboot
  • services.sh -restart (thanks esxi)
  • If you have this ESXi host in a cluster, remove it and then add it again using a Evaluation Mode
Now you can enjoy another 60 days of full featured evaluation!

About Yuri de Jager
Technology Addict

50 Responses to Reset VMware ESXi 4.1 Trial License Period

  1. esxi says:

    reboot is not needed! “services.sh -restart” is enough

  2. Anthony says:

    do you know of a way to reset the vCenter Server Agent license?

  3. venkat says:

    Nice one !!!

  4. esxi says:

    also works on esxi 5

    • carl says:

      I followed this procedure and the vmware.lic file never re-created on ESXi 5.1 I’m at a lose now because now vSphere Client says License Period Expired. However the VMs are still running and accessible but I’m afraid to reboot the host. Also one minor point for 5.1 there is now – in front of restart… It’s just services.sh restart. Does it matter that I did this from the SSH terminal rather than the console using F1? Please help

      • carl says:

        DuH…. should have read further down for 5.1 swap services.sh for reboot exit

        Thanks all..

        Carl

  5. Dan says:

    If the server is managed by vCenter, discconnect it before the remove/restart and connect it afterwards. That will retain all the VMID whereas a Delete/Add assigns all new.

  6. Dan says:

    MODERATOR! Please add the missing ‘f’ in character 2 of my comment. Thanks.

  7. Yuri de Jager says:

    Done Dan.

  8. Piet56 says:

    Can anyone confirm if this method also works on vSphere 5? I don’t want to upgrade from 4.1 to 5 and not be able to reset the license…

  9. Dale says:

    I had to make these changes to your commands

    ■Login as root
    ■cd /etc/vmware
    ■rm -r vmware.lic
    ■rm -r license.cfg
    ■services.sh restart

    outcome was great, thanks!!!

  10. Rich says:

    Thank You Yuri.

    Much easier than resetting it from the DCUI and rebooting

  11. Matt says:

    Thank you so much for this post. I can confirm this works in ESXi 5.0, with slight changes as Dale mentioned above. I am already $5,600 deep in lab gear for my home office, and obviously cannot justify the cost of a vSphere Essentials Plus license simply for training purposes ($5,619 for the Essentials Plus license at the time of this post).

    VMware, if you’re listening, I’d be more than happy to pay for something similar to a MS TechNet subscription. Offering a product of this nature would go a long way to keep the support of those of us who are implementing your products. I have two options: restart my trial period in order to continue learning and supporting VMware, or switch to Hyper-V which is already included in my TechNet subscription.

    I really want to stick with VMware 🙂

  12. Trevor says:

    I did an mv rather than rm on the files, and the restart parameter did not take a leading hyphen. But it did work. Thanks!

  13. TedRxpn says:

    works like a charm!!! Just to add to this, if you are unsure of where “services.sh” is located simply do a “cd /sbin/”. you’ll find it in there

  14. JP says:

    Seems broken on 5.1

  15. JH says:

    Confirmed doesn’t work in 5.1 The .lic file is there but it looks to “remember” elsewhere.
    My setup of 5.1 was upgrade from 5.0. Trying a fresh install using the ” save datastore” option.

  16. JH says:

    Found a interesting twist to this. If you reset the license as described above on a 5.1 while 5.1 is n trial mode it says it is expired when you reconnect…but if you upgrade (save data) the same setup with 5.0 it retains the 5.1 core code and goes back into trial mode. 🙂

    • JH says:

      One correction…the server boots up in 5.0 core (check running image in properties) and if you upgrade back to 5.1 you have 5.1 trial again. The console shows 5.1 but image it is running is 5.0. I would suggest NOT doing this on a production server. 🙂

      • Spurs says:

        I would not have upgraded to 5.1 if I new this would happen. I have a Home Lab with vCenter and need to revert back to 5.0 Will I lose all my settings and configurations? I really need this to study for the VCP exam.

        How do I revert back to 5.0 without losing everything?

  17. JH says:

    Rerun the latest 5.0 setup and select upgrade and select save VMFS. It will save you data store and settings.
    I had not converted any of the data stores to the new format in 5.1 so when I downgraded it did with no issues.

  18. KST says:

    It worked for me in 5.1. However I needed to reboot the host.

  19. sstollingsSteve says:

    With 5.1 I did the following:

    ■Login as root
    ■cd /etc/vmware
    ■rm -r vmware.lic
    ■rm -r license.cfg
    ■reboot

    did not restart services, just reboot. Worked Great!

    • davalpi says:

      This worked for me too.
      I have ESXi v 5.0.0U1 (ESXi 5.0 Update 1 – 2012-03-15)
      Remeber to gracefully shutdown all VMs into EXSi before using this.

  20. Mark says:

    This worked for me as well
    Add an exit command at the end after the reboot command and the reboot is automatic

  21. anonymous says:

    worked for me on 5.1 with service.sh restart

  22. anonymous says:

    don’t work on 5.1, also, you don’t need to restart all services, just vpxa and hostd, no need to reboot, delete the 2 files on a <= 5.0, restart vpxa and hostd, then copy the license.cfg from 5.0 to 5.1 and restart vpxa and hostd, i've made some script for automate the process, cheers…

  23. Anony Mous says:

    This method used for ESXi 4.1 and ESXi 5.0 does not work on ESXi 5.1 if it is a fresh install.

    After trying it, the license.cfg file is recreated, but not with the propper keys. The vmware.lic file is not recreated. After vSphere reconnects, message shows license has expired.

    To work around this:

    Using PuTTY, extended the trial on an ESXi 5.0 machine as described in this blog.
    Did not delete the vmware.lic file on the ESXi 5.1 machine.
    Edited the license.cfg file using vi editor on ESXi 5.1 machine.
    Copy contents from 5.0 –> 5.1 license.cfg file.
    Restart ESXi 5.1 with services.sh restart.

    The trial expiration date on the ESXi 5.1 machine is not the same as the ESXi 5.0 machine.

    • gcballard says:

      I’d like to confirm that “Anony Mous'” method works. I did delete the vmware.lic before I tried his method though before I read that he said not to.

      I did use an ESX 5.0 host to generate a new vmware.lic license.cfg file
      I used winscp to copy the vmware.lic file to the 5.1 server (since I deleted it earlier)
      I then opened the license.cfg file on the 5.1 server and pasted the contents from the 5.0 license.cfg host in it.
      services.sh restart and it allowed me to add it to vcenter.

      Feel free to reply to this as I have subscribed to follow-up comments.

      • gcballard says:

        This works just as well and is much easier:

        If your ESX server is connected to a vCenter server, please remove the ESX server first.
        Once the steps above are completed, you can add it back to the vCenter server.

        rm -r /etc/vmware/license.cfg
        cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
        /etc/init.d/vpxa restart

  24. theshiz says:

    Just reinstall 5.1 in a VM in , then copy the vmware.lic and license.cfg files or content from reinstalled box to the box you want to “renew” the trial period on. Then run /sbin/services.sh restart vpxa and viola! I did not have to restart the hostd process, because restarting vpxa did that for me. Depending on the virtual hardware assigned to the virtual machine, a fresh install of ESXi 5.1 should be pretty quick (takes about 3 minutes). The entire process takes less than 5 minutes. Not bad for a relatively perpetual license for ESXi with all the trimmings…

  25. Yash says:

    Worked in 5.1 with reboot option
    restarting the services did not make any difference

  26. Anony Mous says:

    If somebody has time and would like to try this, please post results:

    – Set the clock on your ESXi 5.0 host to a year (or more) in the future
    – Reset the trial license per Yuri
    – Set the clock back to today

    Is the trial expiration more than 60 days? If so, please post contents of the license.cfg file.

    • Jothibasu says:

      it worked for me
      1.Stop all VM running in Esxi
      2.log in to Esxi , set clock to 1 year before
      esxcli system time set -d 28 -H 12 -m 05 -M 12 -y 2016
      esxcli hardware clock set -d 28 -H 12 -m 06 -M 12 -y 2016
      3.■Login as root
      ■cd /etc/vmware
      ■rm -r vmware.lic
      ■rm -r license.cfg
      4.set clock to current
      esxcli system time set -d 17 -H 12 -m 05 -M 01 -y 2018
      esxcli hardware clock set -d 17 -H 12 -m 06 -M 01 -y 2018
      5.reboot (esxi)
      you will gain 60 days licesnes

  27. A says:

    Also worked for me on 5.1 (upgrade over 5.0), but had to NOT restart services and just reboot – thank you for another 60 days!

  28. Sam A. says:

    The 60 days is not just continuous 60 days. It’s usage time. If you use one day and shutdown the host and turn on after a week, then it shows 59 days left.

  29. Sponge Bob says:

    Also worked for me with a Dell version 5.1 A01with the immediate reboot method.

    I tried the first the services.sh restart but the result was an expired message the I deleted again the license.cfg (vmware.lic was not re-created) and rebooted. Result: back to 60 day trial.

  30. Lam says:

    Does this work on Vsphere 4.0 version?

  31. Patrick says:

    Tried the following commands for ESXi 5.1 build 1065491 and 1117900

    rm -r /etc/vmware/license.cfg
    cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg
    /etc/init.d/vpxa restart

  32. Adam says:

    Works in v5. Thanks so much, awesome post. Took 2mins. Very happy. ;)))

  33. lools says:

    Patrick’s method works fine on a native 5.1 install (build 799733 updated to 1157734). No need to reinstall a 5.1 in order to extract licenses files. Usefull & great !

  34. esxi learning says:

    * patrick’s method worked for me also but I was on lools build.
    Thank you for sharing

  35. Sam says:

    That resets the Eval Cycle to 60 days…& shows expiry after 60 days from that day but If i create a VM & try to power it on, it says License key has expired, please install a valid license to use this product.

  36. some notes – the #license.cfg has a hidden flag, you don’t see in putty or any other ssh shell

    Anyway I copied it directly at the esxi console and it didn’t work on my whitebox, but I installed another esxi 5.1 in VMware workstation and copied the two files via SCP from the virtual to the physical box. My build is 799733 of Esxi 5.1

  37. and it seems that the “simple” way only works while the trial is still running but I missed the last day and tried all the other stuff.

  38. Joe says:

    Not true. My trial ended several weeks back, and I just renewed it.
    Still works like a charm on 5.5 build 2068190

Leave a reply to esxi Cancel reply