New Question
0

Is it possible to pass a new Win Server 2k16 serial key as argument when creating a VM?

asked 2018-01-29 21:20:31 +0200

mfontes-ciandt gravatar image

So, I'm creating a series of scripts to mess around with VMs...creation, deletion etc.

One of the things I must do is to pass a [valid] Windows Server 2k12 and 2k16 serial number during the VM initialization.

Right now, I'm at the point where I'm creating a new ISO image on a Ubuntu env., configuring a Windows VM to have this ISO as a CD-ROM, and when I start the VM - which has Cloudbase Init installed in it - it is able to successfully run cloudbase-init. Log is below.

The thing is...I can see at the log that "WindowsLicensingPlugin" executes and all, but....I've bee searching ALL over the internet and found no evidence whatsoever that it's possible to somehow use WindowsLicensingPlugin to inform a new License key and set it on the Win VM.

Any thoughts would be greatly appreciated. Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2018-01-30 08:26:37 +0200

avladu gravatar image

Hello,

The "WindowsLicensingPlugin" does not have the option to configure it at boot time with a serial key.

You can use the custom script (OpenStack feature) feature to send in a script with the code to license the Windows vm at boot time and that will be executed by Cloudbase-init. But by doing that you will expose the serial key in the metadata which can be accessed by everyone who uses the machine.

Cloudbase-Init has the feature the feature of using the KMS and AVMA known keys, is properly set (but in this case you require a KMS server to be existent in your environment or an AVMA compliant Microsoft subscription. More info here:
https://technet.microsoft.com/en-us/l...
https://docs.microsoft.com/en-us/prev...
Cloudbase-Init example configuration:

[DEFAULT]
activate_windows=True
set_kms_product_key=True
kms_host="kmshost:1688"
#or
set_avma_product_key=True

Another common workflow is to pre-activate the image on creation using a MAK (Multiple Activation Key). More info here:
https://technet.microsoft.com/en-us/l...
You can achieve this by using the image creation tool:
https://github.com/cloudbase/windows-...

Thank you,
Adrian Vladu

edit flag offensive delete link more

Comments

Hi @aviadu, thanks for replying! Can you tell of any pros and cons of using each solution? (KMS, AVMA and MAK) KMS seemed odd. There's the threshold of 25...so if we have fewer than 25 VMs, it wouldn't activate? Also, we'd only have Win2012 and 2016 servers as VMs, and I didn't see them listed.

mfontes-ciandt gravatar imagemfontes-ciandt ( 2018-01-30 14:09:23 +0200 )edit

Also, AVMA seemed to have a special kind of contract with MS as a pre-req. I'd have to check if that's possible over here. Which would leave to use MAK as the most viable candidate for now...still, I'd like to hear from you if possible about cool and bad stuff about each solution. Thanks again!

mfontes-ciandt gravatar imagemfontes-ciandt ( 2018-01-30 14:10:50 +0200 )edit

Windows licensing itself is not trivial, and the best option would be to ask your Microsoft Windows License supplier what are your best options in your case. From my experience, customers choose MAK for simplicity, KMS for large deployments.

avladu gravatar imageavladu ( 2018-02-05 14:50:23 +0200 )edit
0

answered 2018-01-29 22:19:32 +0200

mfontes-ciandt gravatar image

Well actually the full log is pretty big. Please let me know if any particular section would be helpful.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-01-29 21:20:31 +0200

Seen: 2,716 times

Last updated: Jan 30 '18