How to Expire ESXi License immediately

VMware has evaluation license for ESXi servers. After 60 days, it expires and you have to apply a paid or free license to continue. Technically, there is a trick to reset the evaluation key by deleting two files (/etc/vmware/vmware.lic and /etc/vmware/license.cfg) and rebooting the server. It’s of course not complying with VMwrae license terms. Under some circumstances like training lab, it may be OK. Make sure to consult VMware on this if you are not working for VMware. But wait – if you are working for VMware, do you need evaluation license? In his reply to my tweet, Duncan mentioned he never saw license expiration.

Anyway, I got into a different problem a few days ago. How to expire my evaluation license immediately? You don’t want to sit down and wait for 60 days. It may be a good excuse for not working hard. :)

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

It’s such a corner case that most people don’t care about. For myself, I have vExpert license thanks to VMware. I wish it does not expire but it does every year. I need a test bed with license expired for development and testing of a project that integrates with VMware. I want to alert users that the evaluation license has expired before moving any further work which would eventually fail. As a good principle of user experience, fail it fast if it’s going to fail anyway. Good for VMware license sales.

That’s being said, let’s see how to solve this problem. The first thought I had and most people suggested is to change the ESX clock. It’s now July and setting the new time to October should be good enough to expire the evaluation license.

~ # esxcli system time set -M 10
~ # date
Mon Oct 12 10:43:52 UTC 2014

I was wrong on this. If I check out the MOB, the new expiration date actually moves to December. The engineers at VMware are smart enough to take care of this easy hack that works in most operation systems.

The ESXi license expiration date is not based on absolute time, but time left before expiration date is tracked.

Then, I start to observe how the two files change over the time with vi and MOB. Here are some findings.

1. The /etc/vmware/vmware.lic does not change over the time. Its content is always: 00000-00000-00000-00000-00000. As long it’s evaluation, its content remains as such. When a real license is applied on this ESXi, it changes to a real license number with same format.

2. The /etc/vmware/license.cfg changes every 5 minutes. If you use MOB, the expirationMinutes value jumps like 5, 10, 15… The real value is encoded or encrypted in the license.cfg file. Although it’s not clear on the details, it’s for sure not BASE64 encoded.

Without the details on how the hashed string is constructed, it’s not possible to change the real value. So it got stuck.

Inspired by a reply from shogan85, I randomly changed the value of within the . Then magic happened, the evaluation license expired right away. You can find it out from the vSphere API or simply MOB.

Logically it makes sense. If ESXi detects changes it cannot understand, it thinks it’s intentionally changed and therefore expires the license immediately.

This entry was posted in Virtualization and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. guru
    Posted June 10, 2015 at 12:08 pm | Permalink

    Is this works on ESXi 6.O?

  2. luka
    Posted June 11, 2015 at 2:43 am | Permalink

    Is possible to reset evaluation license also on ESXi 6?

  3. doom
    Posted July 8, 2015 at 2:59 pm | Permalink

    Is this works on ESXi 6.O? If NOT do you have any workaround for ESXi 6.O?

  4. Brad
    Posted July 16, 2015 at 3:19 pm | Permalink

    Putty into host and run these commands. Only for a development environment.

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

  5. Posted July 19, 2015 at 10:41 am | Permalink

    Thanks for sharing Brad!

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.