Home > Hyper-V, Windows Server > Setting up a Test Infrastructure with Hyper-V

Setting up a Test Infrastructure with Hyper-V


The end goal of this is to have a test domain with a test virtual network to facilitate testing with SCCM, SCOM, SCSM, etc. which should mirror your production infrastructure as much as possible including AV, etc.  My assumption is that you know how to install Windows Server 2008 R2 and that you know how to install and configure domain services, name DNS, and DHCP.

  1. Get a physical box with at least 8GB RAM, plenty of storage (ideally 500GB+) and a multi-core processor at minimum (ideally this would be a server class box with 16GB+ and multiple processors)
  2. Unless you already have a build or imaging process for Windows Server 2008 R2 Enterprise download or locate the .ISO from your license agreement (burn one to physical media and keep the .ISO in a network location)
  3. Install Windows Server 2008 R2 on the physical box (this is x64 only)
  4. Once Windows is installed add the Hyper-V role
  5. Once the installation is complete open Hyper-V and verify that the local device is selected
    image
  6. In the “Actions” pane select “Virtual Network Manager”
    image
  7. Select “Private” and click “Add”
    image
  8. Provide a name and click “Apply”
    image
  9. Select “New” from the Actions pane on the right of the window (this will be our domain controller)
    image
  10. Click “Next”
    image
  11. Give your VM a name and click “Next”
    image
  12. Specify how much RAM and click “Next”
    image
  13. Specify the test virtual network created earlier and click “Next”
    image
  14. Specify how where the virtual disk should be stored and what size (I only provided 20GB because all this will server is domain services) and click “Next”
  15. image
  16. Specify the location of the Windows Server 2008 R2 .ISO file (again unless you have a build imaging process for this OS) and click “Next”
    image
  17. Click on “Finish”
    image
  18. Double click on the VM in from the “Virtual Machines” list and install Windows Server 2008 R2
  19. After the install is complete rename the server to something like TESTDC01 and reboot
  20. Add the “Active Directory Domain Services” role
  21. Upon completion click on the Window Button, type DCPROMO, and then use wizard to install a new domain in a new forest (i.e. MYTEST.COM) and DNS and then reboot
  22. Provide the NIC on the test virtual network a static IP address from within the OS (i.e. 192.168.1.100)
  23. Install DHCP with a small scope (i.e. 192.168.1.101 to 192.168.1.110)
  24. So we still have to activate Windows and access files on the production network but do not want to have DHCP, DNS, or anything else hit the production network and do accomplish this we will add another virtual NIC
  25. Power down the VM
  26. Click on “File” and then “Settings”
    image
  27. Click on “Add Hardware” on the left of the window and then select “Network Adapter” and click “Add”
    image
  28. From the pull down menu select “Local Area Connection – Virtual Network” and then click on “OK”
    image
  29. Power the VM back on and you should now have access to the production network/Internet and if you open the DHCP console you will still only see that there are bindings with the test virtual network and not the new virtual NIC
  30. You can now create other VM’s with the NIC pointed to the test virtual network and join them to the test domain to create a test infrastructure (you may want to disable IE ESC for Admins)
    image
Advertisements
Categories: Hyper-V, Windows Server
  1. Shiva
    April 5, 2012 at 7:20 pm

    How did you get “Local Area Connection – Virtual Network” in Step 28 without adding it in Virtual Network Manager. I am confused. Please help. Thanks

    • April 7, 2012 at 10:16 am

      This was a while back and I cannot remember if I had already done that with Virtual Network Manager. Sorry for the confusion!

  2. Matt Dover
    January 14, 2011 at 3:53 pm

    Worked great! Thanks!

  3. Matt Dover
    January 14, 2011 at 2:44 pm

    Can the physical box live inside my production domain or do I need to keep it separate?

    • January 15, 2011 at 9:17 am

      It can if you do the proper work to keep it separate from any production network (i.e. VLAN, do not have the environment plugged into a production network, etc.). There are ways but be very careful – especially if you have DHCP in the mix. I suggest keeping it all virtual if possible and using the virtual networks. Less worry on your end.

  4. January 8, 2011 at 9:19 pm

    Step doesnt work…

    second VM is not able to see domain controller…

    • January 9, 2011 at 11:28 am

      Are the VM’s on the same virtual network?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: