Ertürk Online

aut non tentaris aut perfice…

Negative number of days in ESXi host license expiry warning

Published by

on

We were handed over a set of ESXis which were outdated and out of support. First thing first, after checking the compatibility I asked my colleagues to upgrade them from v6 to v7. I assigned their upgraded v7 license key. All went fine. We were back from our vacation and I saw this bizarre warning on some of the ESXis’ summary tab:

"Your host license expires in -10 days. The host will disconnect from vCenter Server when its license expires."

Negative number of days. There is always a first time for everything. I checked the licenses in vCenter and all were looking fine both in vCenter and ESXi views. It was time to enable SSH and dive into the CLI:

[root@esxi:~] vim-cmd vimsvc/license --show
[200] Sending request for installed licenses...
[200] Complete, result is:
serial: 00000-00000-00000-00000-00000
...

For some reason actual key was not there but all zeros. I assume it was reporting fine during the evaluation period isolated within the OS. From vCenter perspective all was fine and it didn’t drop the management connection. Removing from inventory and re-adding it would be a hassle so I fixed it easily with the one liner since I was already on the console:

[root@esxi:~] vim-cmd vimsvc/license --set=ENTER-YOURA-CTUAL-LICEN-SEKEY
...
[200] Command Complete.
Result: Success

A second query shows the correct key, removing the expiry date in the console. Expiry warning in the vCenter disappears soon. If not, it does after a browser refresh.

Leave a comment

Design a site like this with WordPress.com
Get started