VMware Cloud Community
tonyEPi
Contributor
Contributor

Custom sysprep answer file Server 2008R2

I'm trying to set up some Win Server 2008R2 templates for our vCloud Director environment. But for this to be a viable option i need to customize some settings that the customize guest OS removes. Is there any way to make the customize guest OS use a custom sysprep answer file? Or any other way to specify certain settings, like product key?

Reply
0 Kudos
9 Replies
peterdabr
Hot Shot
Hot Shot

Hi,

You can use 'Guest OS Customization' tab in properties of VM in vApp(Template) and provide customization script there. It'd need to be a windows batch file.

With regards to the product key, you can add it to the script by using 'slmgr' command to apply license key to the guest (MAK keys) or deploy KMS VM on the network reachable by guests and modify the script to set guests with the IP address of the KMS server on the network (only if guests do not share the same domain and KMS cannot be looked up through Active Directory or through the same SRV record in the same domain)

This is the link to KB article referencing customization script in vCD: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=102661...

Peter D.

Reply
0 Kudos
tonyEPi
Contributor
Contributor

Thanks for the tip I will try this, though this will only help me with vApps deployed on organizations external networks, since the internal networks doesn't have internet connectivity. Is noone using activated windows machines in their vCloud environments?

Do you simply not configure organizations with internal networks?

Noticed that this is not an option since vCloud shows the script when looking at the properties on the VM hence showing our serial number to vCloud organizations...

Why did they remove the unattend.xml customization that you could do up to server 2003?

Reply
0 Kudos
qc4vmware
Virtuoso
Virtuoso

I am thinking you could possibly add a blocking task and an Orchestrator workflow to assist.  If you create a listener in Orchestrator that watches for vApp instantiation you could bring the vApp up on a network that has connectivity so it can activate then modify the vApp configuration and switch the network it sits on and re-ip.

Reply
0 Kudos
jordan57
Enthusiast
Enthusiast

I had setup an Orchestrator workflow that would look at the VM being cloned/deployed to get the OS version. Then the workflow had OS keys in it for the different versions and would feed in the proper key.

You should be able to accomplish what you need by using Orchestrator.

Blog: http://www.virtualizetips.com Twitter = @bsuhr
tonyEPi
Contributor
Contributor

I think orchestrator might be the solution here. I have set it up and its running fine. But I have no experience with orchestrator and how to get it to accomplish my goals here. Anyone who can point me in the right direction?

Reply
0 Kudos
lamw
Community Manager
Community Manager

Just out of curiosity, why would a custom post script not work for you where the logic is added to figure out the OS and apply the correct key?

Reply
0 Kudos
tonyEPi
Contributor
Contributor

Because the servers will not be used only by internal services, hence we don't want do expose our product keys anywhere, as you do with the custom scripts. Maybe I can do a workaround where I call a script on a external resource, but since not all networks have internet connectivity or is connected to our internal networks, this isn't really an option either.

Reply
0 Kudos
lamw
Community Manager
Community Manager

gotcha. Yep one workaround would be for the custom script on the VM as part of the "post" that would call out to a well known system to update it's keys. Another option as suggested is to trap the operation via blocking task or if you're deploying using vCO and then add some logic to provide the keys to the VM. You could even use Custom Properties and set it at the VM level before powering it on and then having a "post" script which will read this value in and set itself.

Reply
0 Kudos
qc4vmware
Virtuoso
Virtuoso

Hey Tony.  I am relatively new to Orchestrator as well.  I have found there is actually quite a bit of good information to get you started.  I would say quite a bit of how quickly you feel productive will be determined by your past experience as a programmer.  Assuming you have a done some development work or are familiar with shell scripting and that sort of thing it won't take you too long to come up to speed.

I'd suggest starting with the new book by Cody Bunch.  It is a really good introduction to Orchestrator as a product.  I think you can get through it in a week if you have the time to dedicate a a couple of hours a day to it.  After or in tandem I would recommend reading through the VMware documentation as well which is also pretty good.  The vcoteam.info website has a ton of great articles and samples on it as well as links to other blogs that focus on vCO.  You will also want to get up to speed on JavaScript as this is the scripting engine that they use.  The more proficient you are with JavaScript the quicker you'll be able to complete the more complex stuff.  You can of course make calls out to external scripts and programs and there is even a powershell plugin but i have found those options more of a hoop to jump through and prefer to complete as much within the confines of Orchestrator as is possible.  I would also suggest familiarizing yourself with the vSphere API since the scriptable objects within orchestrator map pretty much directly to the api flow so being familiar with the class types and relationships will prove very valuable.  A couple of awesome tools for familiarizing yourself with the api are the managed object browser and the ONYX virtual appliance.

Good luck and have fun!

Reply
0 Kudos