Hosting the DirectAccess Single Server test lab with Windows Server 2012 Hyper-V
The DirectAccess Single Server Setup with Mixed IPv4 and IPv6 in Windows Server 2012 test lab consists of seven separate computers on three subnets:
- The Corpnet subnet contains the DC1, APP1, APP2, and EDGE1 computers
- The Internet subnet contains the INET1, EDGE1, and NAT1 computers
- The Homenet subnet contains the NAT1 computer
The CLIENT1 computer can connect to any of the three subnets. The following figure shows the DirectAccess Single Server Setup with Mixed IPv4 and IPv6 test lab (click on it for a larger version).
This figure shows the computers and their connections to the subnets using a hub or switch. You can implement this configuration using physical computers and switches, virtual computers and switches, or a combination of physical and virtual components.
If you are using Windows Server 2012 and the Hyper-V server role for your virtualization solution, you can configure the DirectAccess Single Server Setup with Mixed IPv4 and IPv6 test lab in Hyper-V on a single server as shown in the following figure (click on it for a larger version):
The key elements of this configuration are the following:
- All seven computers (DC1, APP1, APP2, CLIENT1, EDGE1, INET1, and NAT1) are virtual machines running on the Hyper-V server.
- The Corpnet subnet is implemented as the Corpnet virtual switch.
- DC1, APP1, APP2, and EDGE1 are connected to the Corpnet virtual switch.
- The Internet subnet is implemented as the Internet virtual switch.
- EDGE1, INET1, and NAT1 are connected to the Internet virtual switch.
- The Homenet subnet is implemented as the Homenet virtual switch.
- NAT1 is connected to the Homenet virtual switch.
- CLIENT1 can be connected to the Corpnet, Internet, or Homenet virtual switches.
- The Hyper-V server has at least one physical network adapter that connects to your organization intranet and the Internet. You can use this connection to connect a test lab computer to the real Internet (rather than the Internet subnet), for example to install software or updates. For more information, see How do I get my base configuration computers on the Internet?
To build out the Corpnet subnet in Windows Server 2012 Hyper-V, do the following:
- Create a private virtual switch named Corpnet. For the steps to do this, see Creating a new virtual switch.
- Create a new virtual machine named DC1 that is connected to the Corpnet virtual switch. For the steps to do this, see Creating a new virtual machine.
- Create a new virtual machine named APP1 that is connected to the Corpnet virtual switch.
- Create a new virtual machine named APP2 that is connected to the Corpnet virtual switch.
- Create a new virtual machine named CLIENT1 that is connected to the Corpnet virtual switch.
- Follow the instructions in the “Steps for Configuring the Corpnet Subnet” section of the Test Lab Guide: Windows Server 2012 Base Configuration. To install Windows Server 2012 or Windows 8 on a virtual machine, see Installing an operating system on a new virtual machine.
Windows PowerShell commands |
The following Windows PowerShell cmdlet or cmdlets perform the same function as steps 1-5 of the preceding procedure. You must supply values for the –MemoryStartupBytes and -NewVHDSizeBytes parameters for each virtual machine. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints. New-VmSwitch -Name Corpnet -SwitchType Private New-VM –Name DC1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Corpnet New-VM –Name APP1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Corpnet New-VM –Name APP2 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Corpnet New-VM –Name CLIENT1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Corpnet |
To build out the Internet subnet in Windows Server 2012 Hyper-V, do the following:
- Create a private virtual switch named Internet.
- Create a new virtual machine named EDGE1 that is connected to the Corpnet virtual switch.
- Add a network adapter to EDGE1 that is connected to the Internet virtual switch. For the steps to do this, see Adding a network adapter to a new virtual machine.
- Create a new virtual machine named INET1 that is connected to the Internet virtual switch.
- Follow the instructions in the “Steps for Configuring the Internet Subnet” section of the Test Lab Guide: Windows Server 2012 Base Configuration.
Windows PowerShell commands |
The following Windows PowerShell cmdlet or cmdlets perform the same function as steps 1-4 of the preceding procedure. You must supply values for the –MemoryStartupBytes and -NewVHDSizeBytes parameters for each virtual machine. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints. New-VmSwitch -Name Internet -SwitchType Private New-VM –Name EDGE1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Corpnet Add-VMNetworkAdapter –VMName EDGE1 –SwitchName Internet New-VM –Name INET1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Internet |
To build out the Homenet subnet in Windows Server 2012 Hyper-V, do the following:
- Create a private virtual switch named Homenet.
- Create a new virtual machine named NAT1 that is connected to the Internet virtual switch.
- Add a network adapter to NAT1 that is connected to the Homenet virtual switch.
- Follow the instructions in the Test Lab Guide Mini-Module: Homenet Subnet for Windows Server 2012.
Windows PowerShell commands |
The following Windows PowerShell cmdlet or cmdlets perform the same function as steps 1-3 of the preceding procedure. You must supply values for the –MemoryStartupBytes and -NewVHDSizeBytes parameters for each virtual machine. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints. New-VmSwitch -Name Homenet -SwitchType Private New-VM –Name NAT1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName Internet Add-VMNetworkAdapter –VMName NAT1 –SwitchName Homenet |
For additional Hyper-V test lab configuration articles, see
Hosting Test Lab Guide Environments in Windows Server 2012 Hyper-V.
For more information, see Test Lab Guides.
For the latest developments in the Test Lab Guides initiative, see the Microsoft Test Lab Guides blog.