Friday, February 1, 2013

VMware lab - Reset trials vCenter & ESXi

Just a very simple way to reset the 60-day eval licenses for a VMware home lab.

On the ESXi hosts
1) Open a shell to each host
2) Delete /etc/vmware/vmware.lic & license.cfg
3) restart services



For vCenter
1) Create a DSN to your local SQL Express instance that holds your vCenter DB.
2) Uninstall virtual center
3) Re-install virtual center and point to your DSN making sure not to overwrite.

With this method, I have been able to refresh my 4.1 and 5.0 hosts.  Have not confirmed if this works for 5.1 first.

Sources
http://shanseworld.blogspot.com/2009/12/vcenter-reinstallation-after-60-days.html
http://yuridejager.wordpress.com/2011/07/18/reset-vmware-esxi-4-1-trial-license-period/


9 comments:

  1. Hi, Thank you for your post this is no longer valid for esx 5.1. here what you can do

    Perform a fresh install of ESXi 5.1 in a virtual machine (choose your poison for hypervisor – I use VirtualBox)
    Copy the /etc/vmware/license.cfg and /etc/vmware/vmware.lic files or contents of the files from the fresh install you just performed to the existing ESXi 5.1 host
    /sbin/services.sh restart vpxa

    ReplyDelete
  2. Procedure is still O.K for 5.1 but you have to delete vmware.lic then licence.cfg and type reboot. Just after, delete again licence.cfg that is recreated periodically until you loose the ssh connection. (constantly type up-arrow to recall rm licence.cfg and enter up your ssh session dies)

    ReplyDelete
  3. Works 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

    ReplyDelete
  4. Thank you SO MUCH Patrick! Worked like a charm on build 799733, except that I needed to restart all services with:

    services.sh restart

    ReplyDelete
  5. Ran the configs and it added one day looking in the licensed features.

    ReplyDelete
  6. This works for me on 5.5. Thanks

    ReplyDelete
  7. Confirmed that this works on ESXi 6.0, 2494585.

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

    ReplyDelete
  8. Hi,

    It's nice to hear this works on ESXi 6.0

    Does services restart stop your VM's ?

    Is it also and idea to run this by cron every 60 days ? I don' know if anyone tested this.

    Thanks.

    ReplyDelete
    Replies
    1. Yamakasi,

      If you set this to run via Cron, I would suggest every month (say, on the 1st) for simplicity's sake.

      Delete