Install and configure Hyper V for VDI

Hi Everyone

I am trying to setup a POC lab using Hyper-V to demonstrate use case for VDI

I do understand you need to have 2012R2 connection brokers and RDSH servers as part of the VDI deployment.

Coming from a vmware background I have much to learn in this area. I have 4 HS22 blades installed with 2012R2 Datacentre and configured teaming for the management Network. All 4 2012R2 host presented with shared storage from our SAN. On each host there are 6 NIC . 2 is for management / migration ?? and the rest of the 4 Nic is for the VM data network

On the management Teaming Nic, I have setup 2 NIC in independent mode with load balancing Dynamic. The second nic is set as Standby Adapter.

Before I enable the Hyper V role , I would like to find out the best practice for setting up 2012R2 HyperV for VDI ? Do I need a seprate migration network or use the same management teaming Nic ? And Where do use specify in hyper to use this network for vm migration between host.

In Vsphere we use port group to assign different Vlan for each VMs. You can have multiple Port groups (with vlan id)  belongs to a vsphere distributed V switch. Host can be part of the distribute vswitch.

My understanding you have to manually enter the vlan id on each separate vm, there is no drop box to choose the vlan 

is there any way we can achieve the similar result in Hyper V. 

we do have license to use VMM

Many thanks

November 7th, 2014 3:02pm

Here's an example of how I set up my networking for VDI using 2 hosts and a 10Gb connection.  This configuration creates the team, the virtual switch with bandwidth mode, adds the different logical networks, sets the VLANs, and assigns the bandwidth priority for each. You dont see a VLAN associated with the VM Traffic adapter because the switch ports include the VM Traffic Native VLAN for that network.

This is a fairly common setup for sharing the different networks over a 10GB pipe.  Also, you don't see our storage network in there due to the way our FCoE is configured.  Our FCoE configuration is a separate 10GB connection that uses the switch to prioritize the bandwidth.

PS C:\Users\Administrator> New-NetLbfoTeam -name ClusterTeam -TeamMembers "Ethernet 2","Ethernet 6","Ethernet 8","Ethernet 9"

PS C:\Users\Administrator> New-VMSwitch "ClusterSwitch" -MinimumBandwidthMode weight -NetAdapterName "ClusterTeam" -AllowManagementOS 0

PS C:\Users\Administrator> Set-VMSwitch "ClusterSwitch" -DefaultFlowMinimumBandwidthWeight 20


PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "VM Traffic" -SwitchName "ClusterSwitch"
PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "Management" -SwitchName "ClusterSwitch"
PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "Live Migration" -SwitchName "ClusterSwitch"
PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "Cluster" -SwitchName "ClusterSwitch"

PS C:\Users\Administrator> Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Management" -Access -VlanId 153

PS C:\Users\Administrator> Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Live Migration" -Access -VlanId 13
PS C:\Users\Administrator> Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Cluster" -Access -VlanId 12
PS C:\Users\Administrator>
PS C:\Users\Administrator>
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "VM Traffic" -MinimumBandwidthWeight 40
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "Management" -MinimumBandwidthWeight 20
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "Live Migration" -MinimumBandwidthWeight 20
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "Cluster" -MinimumBandwidthWeight 20


Free Windows Admin Tool Kit Click here and download it now
November 7th, 2014 5:00pm

You also might want to take a look at this - https://gallery.technet.microsoft.com/Virtual-Desktop-Infrastruct-28836fa6  It automates the deployment of a demo environment.  Contains a lot of good stuff to copy as you move farther along.
November 7th, 2014 7:39pm

Here's an example of how I set up my networking for VDI using 2 hosts and a 10Gb connection.  This configuration creates the team, the virtual switch with bandwidth mode, adds the different logical networks, sets the VLANs, and assigns the bandwidth priority for each. You dont see a VLAN associated with the VM Traffic adapter because the switch ports include the VM Traffic Native VLAN for that network.

This is a fairly common setup for sharing the different networks over a 10GB pipe.  Also, you don't see our storage network in there due to the way our FCoE is configured.  Our FCoE configuration is a separate 10GB connection that uses the switch to prioritize the bandwidth.

PS C:\Users\Administrator> New-NetLbfoTeam -name ClusterTeam -TeamMembers "Ethernet 2","Ethernet 6","Ethernet 8","Ethernet 9"

PS C:\Users\Administrator> New-VMSwitch "ClusterSwitch" -MinimumBandwidthMode weight -NetAdapterName "ClusterTeam" -AllowManagementOS 0

PS C:\Users\Administrator> Set-VMSwitch "ClusterSwitch" -DefaultFlowMinimumBandwidthWeight 20


PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "VM Traffic" -SwitchName "ClusterSwitch"
PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "Management" -SwitchName "ClusterSwitch"
PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "Live Migration" -SwitchName "ClusterSwitch"
PS C:\Users\Administrator> Add-VMNetworkAdapter -ManagementOS -name "Cluster" -SwitchName "ClusterSwitch"

PS C:\Users\Administrator> Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Management" -Access -VlanId 153

PS C:\Users\Administrator> Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Live Migration" -Access -VlanId 13
PS C:\Users\Administrator> Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Cluster" -Access -VlanId 12
PS C:\Users\Administrator>
PS C:\Users\Administrator>
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "VM Traffic" -MinimumBandwidthWeight 40
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "Management" -MinimumBandwidthWeight 20
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "Live Migration" -MinimumBandwidthWeight 20
PS C:\Users\Administrator> Set-VMNetworkAdapter -ManagementOS -name "Cluster" -MinimumBandwidthWeight 20


Free Windows Admin Tool Kit Click here and download it now
November 8th, 2014 12:30am

You'll need to enable the hyper-v role before configuring the virtual switch. You can chose to create the virtual switch during the role enable I believe, however I normally create it after using either powershell or hyper-v manager.

Once the cluster is configured and running, you can use failover cluster manager, right click on Networks, and assign your live migration network.

November 10th, 2014 10:27am

Hi Jason

Thanks for sharing your experience with me

My understanding is you  

1. Create team

2. Create vswitch

3. You add 4 virtual network adapter  "vm traffic , live migration , live migration, cluster"  

4. You setup the vlan to each virtual network adapter .

Did you created the vswitch and virtual network adapter before or after enabled hyper V role ? From memory it will ask you to create the vswitch during the setup of hyper V

How does the VM know to use  "live migration" adaptor to move the vm between hyper V host or use vm traffic adaptor for accessing the external network . where do you configure this option. In vsphere you tick the box from the switch configuration to specify to use for vmotion "live migration"  or management traffic .

Many thanks

Free Windows Admin Tool Kit Click here and download it now
November 10th, 2014 2:48pm

Thank you
November 10th, 2014 2:48pm

Hi Mr555,

>>Did you created the vswitch and virtual network adapter before or after enabled hyper V role ? From memory it will ask you to create the vswitch during the setup of hyper V

Based on my understanding ,in your case the flow is   "create NIC teaming" --> "enable hyper-v role" --> configure hyper-v network .

As Jason mentioned this command created virtual switch after creating NIC teaming :

PS C:\Users\Administrator> New-VMSwitch "ClusterSwitch" -MinimumBandwidthMode weight -NetAdapterName "ClusterTeam" -AllowManagementOS 0

>>How does the VM know to use  "live migration" adaptor to move the vm between hyper V host or use vm traffic adaptor for accessing the external network

This configuration you can find it in hyper-v setting :

Best Regards

Elton Ji

Free Windows Admin Tool Kit Click here and download it now
November 11th, 2014 4:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics