Share via


Hosting test labs containing mobile clients with Windows Server 2012 Hyper-V

You can add support for mobile clients, such as smartphones or tablets, to test lab environments by adding wireless access points (APs) as bridged devices to the physical Corpnet and Internet (optional) subnets. The following figure shows this configuration (click on it for a larger version).

See TLG mini-module: Mobile Client Support for Test Lab Guides for more information.

Because the wireless APs are physical devices, you must use either physical 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 mobility support for the Corpnet and Internet subnets 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 five computers (DC1, APP1, CLIENT1, EDGE1, and INET1) are virtual machines running on the Hyper-V server.
  • The Corpnet subnet is implemented as both a physical switch and as a Hyper-V external virtual switch.
    • DC1, APP1, and EDGE1 are connected to an external virtual switch configured to use the network adapter on the Hyper-V server that is connected to the physical switch for the Corpnet subnet.
    • The wireless AP that is configured to advertise the Corpnet SSID is connected to the physical switch for the Corpnet subnet.
  • The Internet subnet is implemented as both a physical switch and as a Hyper-V external virtual switch.
    • EDGE1 and INET1 are connected to an external virtual switch configured to use the network adapter on the Hyper-V server that is connected to the physical switch for the Internet subnet.
    • The wireless AP that is configured to advertise the Corpnet SSID is connected to the physical switch for the Internet subnet.
  • CLIENT1 can be connected to either the Corpnet or Internet virtual switches.
  • The Hyper-V server has three physical network adapters:
    • One adapter connects to your organization intranet and the Internet. You can use this connection to connect a test lab computer to the real Internet, for example to install software or updates. For more information, see How do I get my base configuration computers on the Internet?
    • One adapter connects to the physical Corpnet subnet.
    • One adapter connects to the physical Internet subnet.

Note  Although the Hyper-V server is connected to both subnets, it is not acting as a router between the Corpnet and Internet subnets. That is the function of EDGE1, if configured in a TLG other than the Base Configuration.

To build out the Corpnet subnet in Windows Server 2012 Hyper-V, do the following:

  1. Create a new virtual machine named DC1 that is connected to the external virtual switch corresponding to the network adapter connected to the Corpnet physical subnet. For the steps to do this, see Creating a new virtual machine.
  2. Create a new virtual machine named APP1 that is connected to the external virtual switch corresponding to the network adapter connected to the Corpnet physical subnet.
  3. Create a new virtual machine named CLIENT1 that is connected to the external virtual switch corresponding to the network adapter connected to the Corpnet physical subnet.
  4. 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 commands 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. ExternalSwitchConnectedToCorpnetSubnet is the name of the Hyper-V external virtual switch corresponding to the network adapter connected to the Corpnet physical subnet. Enter each command on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

New-VM –Name DC1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName <ExternalSwitchConnectedToCorpnetSubnet>
New-VM –Name APP1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName <ExternalSwitchConnectedToCorpnetSubnet>
New-VM –Name CLIENT1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName <ExternalSwitchConnectedToCorpnetSubnet>

To build out the Internet subnet in Windows Server 2012 Hyper-V, do the following:

  1. Create a new virtual machine named EDGE1 that is connected to the external virtual switch corresponding to the network adapter connected to the Corpnet physical subnet. For the steps to do this, see Creating a new virtual machine.
  2. Add a network adapter to EDGE1 that is connected to the external virtual switch corresponding to the network adapter connected to the Internet physical subnet. For the steps to do this, see Adding a network adapter to a new virtual machine.
  3. Create a new virtual machine named INET1 that is connected to the external virtual switch corresponding to the network adapter connected to the Internet physical subnet.
  4. 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 commands 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. ExternalSwitchConnectedToInternetSubnet is the name of the Hyper-V external virtual switch corresponding to the network adapter connected to the Internet physical subnet. Enter each command on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.

New-VM –Name EDGE1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName <ExternalSwitchConnectedToCorpnetSubnet>
Add-VMNetworkAdapter –VMName EDGE1 –SwitchName <ExternalSwitchConnectedToInternetSubnet>
New-VM –Name INET1 –MemoryStartupBytes <MemorySize> -NewVHDSizeBytes <DiskSize> –SwitchName <ExternalSwitchConnectedToInternetSubnet>

Next, add the wireless APs to the Corpnet and Internet subnets as described in TLG mini-module: Mobile Client Support for Test Lab Guides.

For additional information about configuring test labs with Windows Server 2012 Hyper-V, 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.