Adding License to VMware Server 2 via scripting command?
Posted
by andyt25
on Server Fault
See other posts from Server Fault
or by andyt25
Published on 2010-03-15T16:30:55Z
Indexed on
2010/03/15
16:40 UTC
Read the original article
Hit count: 455
Hi all,
I recently discovered the vimsvc/license command in vmware-vim-cmd and was trying to use that to automatically add my license key to a fresh vmware installation.
vmware-vim-cmd -H hostip -O portnumber vimsvc/license --source file '/path/to/plaintext-file-that-contains-my-license-key.txt'
plaintext-file-that-contains-my-license-key.txt contains my key in XXXXX-XXXXX-XXXXX-XXXXX format, I've also tried it with an extra carriage return at the end.
Adding the key that way doesn't work, however. I always get the following error message:
[200] Reading local file: /path/to/plaintext-file-that-contains-my-license-key.txt [200] Size of file is 24 bytes. returned were XXXXX-XXXXX-XXXXX-XXXXX
[200] Changing license source to: file:/path/to/plaintext-file-that-contains-my-license-key.txt [500] Caught unexpected exception Type: N5Vmomi5Fault17NotEnoughLicenses9ExceptionE what() =vmodl.fault.NotEnoughLicenses GetMsg() = There are not enough licenses installed to perform the operation.
It's kinda silly to require a license to be able to add a license, don't you think? ;-)
So how do I go about and add the key via script? I would like to avoid any interaction as I have the rest of the install fully scripted and non-interactive.
Kind Regards, Stefan
© Server Fault or respective owner