VMware Cloud Community
romatlo
Enthusiast
Enthusiast
Jump to solution

Deploying W2K8R2 from template and activated?

Hello,

I am deploying a W2K8R2 SP1 VM from template in vcenter 5.0 U1 to ESXi 5 U1 using a OS customization including our volume license product ID.

Checking to see if anyone has a tip for having the VM already activated after deployed from template?

Even though I have the product ID populated in the customization spec, it is not activated and clicking the Activate now option prompts to change the product key (as if were not carried over from customization spec).

I would have posted this under vcenter, but do not have access to that forum for some reason.

Thanks,

romatlo

0 Kudos
1 Solution

Accepted Solutions
ssoliman02
Enthusiast
Enthusiast
Jump to solution

this command, in the batch file, made it quite / silent:  cscript //B slmgr.vbs /ato

View solution in original post

0 Kudos
13 Replies
MKguy
Virtuoso
Virtuoso
Jump to solution

Windows 2008 R2 (and R1 too) does not provide product key entering/activation on installing/sysprepping the OS. Whatever you enter on the product key page of the customization specification is irrelvant for the OS and ignored during sysprep.

The PowerCLI help of the New-OSCustomizationSpec cmdlet explains the options and how they apply pretty well:

-ProductKey <String>
       Specify the MS product key. If the guest OS version is earlier than Vista, this parameter is required in order to make the customization unattended. For Vista or later, the OS customization is unattended no matter if the ProductKey parameter is set.

   -LicenseMode <LicenseMode>
       Specify the license mode of the Windows 2000/2003 guest operating system. The valid values are Perseat, Perserver, and Notspecified. If Perserver is set, use the -LicenseMaxConnection parameter to define the maximum number of connections. This parameter applies only to Windows operating systems.

I'm not a Windows licensing pro, but I'd guess if you have an MAK-key, you can use that in your template (pre-activated template) or if you have a central KMS-server, make sure the deployed VMs can reach and resolve it via it's SRV record.

nslookup

>set q=SRV

> _vlmcs._tcp.domain.local
Server:  dc.domain.local
Address:  10.1.1.1

_vlmcs._tcp.domain.local        SRV service location:
          priority       = 0
          weight         = 0
          port           = 1688
          svr hostname   = kms.domain.local
kms.domain.local        internet address = 10.1.2.10

-- http://alpacapowered.wordpress.com
romatlo
Enthusiast
Enthusiast
Jump to solution

Thanks MKguy for the feedback.

Yes, it is a MAK B product key.  I did include it in my VM and activated it (before converting it to a template).

If I enter the product key after deploying a VM, it activates over the internet fine.

Sounds like your suggestions are for W2K3?

I will check that out...

Trying to figure out what to do with W2K8R2 since sysprep is all built in.

Where should I input my product key if not in the customization spec in vcenter?

0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

Where should I input my product key if not in the customization spec in vcenter?

I didn't suggest anything really, like I quoted, the customization specs, or rather the Windows sysprep processes since 2008, does not process activation keys at all.

But what you should be able to do is adding a RunOnce command to the customization spec, which will be executed by the guest after sysprep.

Seems like it's as easy as adding slmgr.vbs /ipk <MultipleActivationKey> to the RunOnce list as per http://technet.microsoft.com/en-us/library/ff793438.aspx.

-- http://alpacapowered.wordpress.com
romatlo
Enthusiast
Enthusiast
Jump to solution

Excellent suggestion!!

I will try it and report shortly.

0 Kudos
romatlo
Enthusiast
Enthusiast
Jump to solution

Looks like that worked!  Thanks!

The only thing kind of annoying is the activation prompt that is displayed and must click ok to move on.

I've attached a pic of that prompt.

This will definitely save me some time when deploying W2K8R2 VMs from template.

Unless anyone has a comment regarding how to supress this OK prompt, I will close this thread as answered.

Thanks again!

romatlo

0 Kudos
romatlo
Enthusiast
Enthusiast
Jump to solution

Thanks!

0 Kudos
ssoliman02
Enthusiast
Enthusiast
Jump to solution

romatlo, did you ever figure out how to supress the "OK" prompt?  having the same issue...

thank you,

sherif

0 Kudos
romatlo
Enthusiast
Enthusiast
Jump to solution

No, but you got me searching again.  Smiley Happy

I found this...will give it a try.

http://serverfault.com/questions/287400/slmgr-vbs-supress-dialog

0 Kudos
romatlo
Enthusiast
Enthusiast
Jump to solution

Putting 'start slmgs.vbs /ato' in the custom spec manager of vcenter did not work.

Did not even activate at all!

Maybe if I call a batch file with that in it...or something.

Til now I've been living with it...

0 Kudos
ssoliman02
Enthusiast
Enthusiast
Jump to solution

i was able to get it to work

i created a batch file in the templete, under c:\temp\lic.bat

in the bat file i added following line:  slmgr.vbs /ato

in the customization spec i included our license and a run once of the bat file c:\temp\lic.bat

windows registered and activated.  but still have to click "ok" on the prompt...

0 Kudos
ssoliman02
Enthusiast
Enthusiast
Jump to solution

still searching for a silent option...

0 Kudos
ssoliman02
Enthusiast
Enthusiast
Jump to solution

this command, in the batch file, made it quite / silent:  cscript //B slmgr.vbs /ato

0 Kudos
romatlo
Enthusiast
Enthusiast
Jump to solution

Thanks for sharing!!  I marked it Correct.I will have to give it a try. 

0 Kudos