locked
Install and configure Hyper V for VDI RRS feed

  • Question

  • 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

    Friday, November 7, 2014 7:32 PM

Answers

All replies

  • 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


    • Edited by JasonJohnson9 Friday, November 7, 2014 9:32 PM
    • Proposed as answer by Elton_Ji Monday, November 17, 2014 6:37 AM
    • Unproposed as answer by Elton_Ji Wednesday, November 19, 2014 9:34 AM
    Friday, November 7, 2014 9:30 PM
  • 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.

    . : | : . : | : . tim

    • Proposed as answer by Elton_Ji Monday, November 17, 2014 6:38 AM
    • Marked as answer by Mr555 Thursday, November 20, 2014 5:17 PM
    Saturday, November 8, 2014 12:09 AM
  • 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

    Saturday, November 8, 2014 7:20 PM
  • Thank you
    Saturday, November 8, 2014 7:21 PM
  • 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.

    Monday, November 10, 2014 2:59 PM
  • 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


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

    • Proposed as answer by Elton_Ji Monday, November 17, 2014 6:37 AM
    • Unproposed as answer by Elton_Ji Wednesday, November 19, 2014 9:34 AM
    • Marked as answer by Mr555 Thursday, November 20, 2014 5:17 PM
    Tuesday, November 11, 2014 9:05 AM
  • Thank you for the information

    In my environment I have 6 Nic

    At the beginning I have already create cluster teaming with the 2 Nic .

    These 2 Nic associate with 2 vlan design for management and live migration traffic

    I have complete  the following task in my test environment

    Create a new ClusterTeaming for the following Ethernet adaptor

    New-NetLbfoTeam -name ClusterTeam -TeamMembers "Ethernet","Ethernet 2","Ethernet 3","Ethernet 5"

    Create Cluster Switch for Hyper-V

    New-VMSwitch "ClusterSwitch" -MinimumBandwidthMode weight -NetAdapterName "ClusterTeam" -AllowManagementOS 0

    Set-VMSwitch "ClusterSwitch" -DefaultFlowMinimumBandwidthWeight 20

    I have the following question hopefully you can help.

    In Hyper V I have created a new Vm and installed with 2012R2.  

    During the Virtual Machine setup All I can see is Cluster Switch is this correct ?

    The only way I can get the VM to access the external network is by Enable VLAN ID and specify the vlan number. ? So for each VM I create I have to specify a VLAN ID.

    We have 20 different vlan associate with the clusterswitch can you create a different label to represent different vlan id then assign to the vm ?  

    I try to create switch with the following error

    PS C:\Windows\system32> New-VMSwitch "MgmtClusterSwitch" -MinimumBandwidthMode weight -NetAdapterName "MgmtClusterTeam"
    -AllowManagementOS 0
    New-VMSwitch : A parameter is invalid. Windows cannot find a network adapter using the specified NetAdapterName. To
    specify an adapter using its InterfaceDescription, use the NetAdapterInterfaceDescription parameter. To get a list of
    the network adapters on this host, use the Get-NetAdapter cmdlet.
    At line:1 char:1
    + New-VMSwitch "MgmtClusterSwitch" -MinimumBandwidthMode weight -NetAdapterName "M ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [New-VMSwitch], VirtualizationInvalidArgumentException
        + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVMSwitchCommand

    Tuesday, November 18, 2014 12:43 AM