May 27 2011

Tip for building a private domain controller for Lab Management with Network Isolation

Category: IT Related | .NetRory Primrose @ 08:02

There are obvious benefits by using Lab Management for testing your software. It is a fantastic environment for test teams to test the software written by a development team.

The requirement I had with my test labs was that I need to use domain controlled security within the test lab as this is what is used in production. I also do not want any impact on the development or production domains. The solution is to use a domain controller (DC) within the lab environment rather than reference the domain hosting the lab environment.

Having a test DC means that it needs to be isolated from the hosting network. This avoids AD, DNS and DHCP conflicts between the development and test networks. Lab management can be configured for network isolation to get around this problem. This means that the private DC will have a network connection that is private to the lab, while all the other machines in the lab will have one NIC for the private lab network and a second NIC for access out to the hosting environment. This setup can be seen in the SCVMM network diagram below with the machine at the top of the diagram being the private DC.

image

The problem I had for several weeks was that the private DC lost its Windows activation when it was stored into the VMM library for deployment out to a lab environment. You are restricted to phone activation in this case because once the stored VM is put into a lab with network isolation there is no internet support for automatic activation on the DC. This then needs to be done every time you deploy a lab environment.  

I followed the MSDN article steps that describe how to create a private DC for labs but there was nothing specific about how to handle this scenario. The step in question is at the bottom of the article where it says:

6. Shut down the virtual machine, and store it in the SCVMM library.

    a. Do not turn off the Active Directory VM. You have to shut it down correctly.

    b. Do not generalize the Active Directory VM, either by running Sysprep or by storing the virtual machine as a template in SCVMM.

I followed this step to the letter and stored my DC in the VMM library for use in labs. This was the step that caused the VM to lose its Windows activation. I happened to stumble across the solution to this problem as I had to rebuild the test DC yesterday. The answer is to clone the DC rather than store it.

image

The Clone wizard provides the option of where to place the clone VM. You want to select Store the virtual machine in the library.

image

The private DC can be deployed out to a lab environment now that it is stored in the library. The Windows activation is retained using this technique so the private DC should be ready for immediate use in the lab.

Tags:

Comments (4) -

1.
Sage Sage United States says:

Thanks for posting this - I have a web server on 2003 R2 that has been losing its activation every time I deploy it as part of an environment.  Cloning rather than storing in the library seems to have solved the problem.  It would be good to know why this particular VM, rather than any of the others in the same environment (even one on the same OS and with the same role), had the issue.

2.
David Gardiner David Gardiner Australia says:

Just had the same problem. Will try your suggestion out.

thanks,
-dave

3.
David Gardiner David Gardiner Australia says:

Just deployed an environment with a cloned AD server VM that had been activated. Sadly, it didn't stay activated :-( There's some instructions here which might work to activate the AD machine within the lab - blogs.msdn.com/.../...-management-walkthrough.aspx
  
  -dave

4.
Rory Primrose Rory Primrose Australia says:

Thanks Dave. Sadly this is turning into death by a thousand steps where the steps required are not consistent for each persons scenario. Hopefully this will get better in vNext.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading