locked
Using second wireless network for client Hyper-V VMs RRS feed

  • Question

  • Hello all,

    I have a question concerning client Hyper-V on Win8.1 Pro Preview and wirelessly connecting only the VMs. I'm a student at a university and the university wired Ethernet network only allows 2 devices to be registered per student. So for me, those 2 would be the host OS and my Xbox, which leaves no room for any of my VMs. I need a way to connect my VMs to the wireless network (which has no such limitations) mostly for programming assignments using Linux.

    I'm thinking of buying a wireless NIC for my desktop and using that as a second external switch that the VMs will use for connectivity. The host will use the first external switch that currently exists. However, I'm not sure how I can keep the host on the wired LAN while also installing a wireless NIC only for the VMs. Do I install the NIC, make it an external switch without host access, then join the network? Or do I join the network first then set it up as a virtual switch? Can client versions of Windows handle multiple simultaneous NICs?

    Also, would the host even need an external switch in this case? I have one since I set up the VMs at home where all machines can use the wired NIC.

    Friday, September 6, 2013 3:37 AM

Answers

  • That's a bit tricky with Hyper-V.  I should say before I list out the steps to get a NAT-like solution to your problem that Oracle Virtual Box has NAT support that would do the job your looking for quite easily, in fact the situation you described is its default network setting.  Virtual Box is free and supports Linux guest OSs so, unless you are practicing using Hyper-V, I would suggest using that.

    To make a NAT-like network using Hyper-V first create an internal virtual switch with your Wireless NIC.  In the Actions pane of Hyper-V Manager click on Virtual Switch Manager.  Select New Virtual Switch and make sure the connection type is set to internal.

    Next you have to share a connection with the between you wireless NIC and you virtualized switch.  Go to Control Panel | Network and Sharing Center, then click 'Change Adapter Settings' in the left pane.

    Now right-click your Wireless NIC adapter and select properties, go to the sharing tab and select Allow other network users to connect through this computer's Internet connection and select your virtualized switch.

    After all that you just go to the settings of your virtual machine, then add new hardware and install your virtual switch into the virtual machine.

    This process essentially shared your connection with your NIC so it takes on a static outward address of whatever your host's IP Address and then assigns your virtual machines IP Addresses through DHCP.

    Again, I should say if you download and install Oracle Virtual Box this will be the default setting and there is really no other configurations you have to go through.

    Let me know if you have any problems.


    Remember to select 'Mark as Answer' for any reply that provided a solution

    • Proposed as answer by CurtisJTrobaugh Friday, September 6, 2013 6:44 AM
    • Marked as answer by The_D0lph1n Friday, September 13, 2013 7:33 PM
    Friday, September 6, 2013 6:44 AM

All replies

  • That's a bit tricky with Hyper-V.  I should say before I list out the steps to get a NAT-like solution to your problem that Oracle Virtual Box has NAT support that would do the job your looking for quite easily, in fact the situation you described is its default network setting.  Virtual Box is free and supports Linux guest OSs so, unless you are practicing using Hyper-V, I would suggest using that.

    To make a NAT-like network using Hyper-V first create an internal virtual switch with your Wireless NIC.  In the Actions pane of Hyper-V Manager click on Virtual Switch Manager.  Select New Virtual Switch and make sure the connection type is set to internal.

    Next you have to share a connection with the between you wireless NIC and you virtualized switch.  Go to Control Panel | Network and Sharing Center, then click 'Change Adapter Settings' in the left pane.

    Now right-click your Wireless NIC adapter and select properties, go to the sharing tab and select Allow other network users to connect through this computer's Internet connection and select your virtualized switch.

    After all that you just go to the settings of your virtual machine, then add new hardware and install your virtual switch into the virtual machine.

    This process essentially shared your connection with your NIC so it takes on a static outward address of whatever your host's IP Address and then assigns your virtual machines IP Addresses through DHCP.

    Again, I should say if you download and install Oracle Virtual Box this will be the default setting and there is really no other configurations you have to go through.

    Let me know if you have any problems.


    Remember to select 'Mark as Answer' for any reply that provided a solution

    • Proposed as answer by CurtisJTrobaugh Friday, September 6, 2013 6:44 AM
    • Marked as answer by The_D0lph1n Friday, September 13, 2013 7:33 PM
    Friday, September 6, 2013 6:44 AM
  • Ok, thanks for the instructions. I haven't started this little project yet, so I can't verify if those steps work for me. However, client Hyper-V automatically creates a bridge for wireless NICs (source). Also, I'm not looking for NAT and for wireless I don't think that's needed. The school wireless network doesn't have any limits on how many devices can connect per student so using NAT to hide my VM IPs isn't needed. Additionally the school would know if I was using NAT. The main concern is separating the wireless connection (dedicated to serving the VMs) from the wired connection used by the host. Is there a way to say, "Connect the wireless NIC to the wireless network but keep internet connectivity through the wired LAN"?
    Friday, September 6, 2013 6:43 PM
  • Ahh, that's right. check out this post.  This should explain the problem and offer a workable solution.

    Hi,

    I remember some articles mentioned Windows Hyper-V does not allow you to bind a wireless network adapter to a virtual machine.

    Since the virtual switch in Hyper-V is a “layer-2 switch,” which means that it switches (i.e. determines the route a certain Ethernet packet takes) using the MAC addresses that uniquely identify each (physical and virtual) network adapter card. The MAC address of the source and destination machines are sent in each Ethernet packet and a layer-2 switch uses this to determine where it should send the incoming packet. An external virtual switch is connected to the external world through the physical NIC. Ethernet packets from a VM destined for a machine in the external world are sent out through this physical NIC. This means that the physical NIC must be able to carry the traffic from all the VMs connected to this virtual switch, thus implying that the packets flowing through the physical NIC will contain multiple MAC addresses (one for each VM’s virtual NIC). This is supported on wired physical NICs (by putting the NIC in promiscuous mode), but not supported on wireless NICs since the wireless channel established by the WiFi NIC and its access point only allows Ethernet packets with the WiFi NIC’s MAC address and nothing else. In other words, Hyper-V couldn’t use WiFi NICs for an external switch if we continued to use the current virtual switch architecture.

    To work around this limitation, you can use Microsoft Bridging solution. Create an Internal network, name it “External”, system will create a Virtual Network adapter for it. Create Network Bridge between your WiFi NIC and the Virtual External Network adapter. Assign External network for your VMs, so they have internet connection.

    For more information please refer to following MS articles:

    Bringing Hyper-V to “Windows 8”
    http://blogs.msdn.com/b/b8/archive/2011/09/07/bringing-hyper-v-to-windows-8.aspx
    Hyper-V: How to Run Hyper-V on a Laptop
    http://social.technet.microsoft.com/wiki/contents/articles/185.hyper-v-how-to-run-hyper-v-on-a-laptop-en-us.aspx
    Configuring Virtual Networks
    http://technet.microsoft.com/en-us/library/cc816585(v=WS.10).aspx

    Hope this helps!

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Lawrence

    TechNet Community Support

    source:  http://social.technet.microsoft.com/Forums/windowsserver/en-US/d9fb7866-0fbc-4c06-b8ea-df3c35c75c74/windows-8-hyperv-bridged-wifi-issues-when-creating-virtual-machines

    Remember to select 'Mark as Answer' for any reply that provided a solution

    Friday, September 6, 2013 7:22 PM
  • Thanks for your help. It appears as if the advertised automatic bridging in client Hyper-V isn't working as intended. The virtual switch manager would always fail while creating the external switch. So I used the method posted as the answer and it's working fine now.
    Friday, September 13, 2013 7:35 PM
  • thanks for the heads up :)

    many thanks

    Friday, April 25, 2014 5:17 PM
  • This fixed my issue.  I created an internal Virtual network adapter.  Then I shared my host's network adapter with it.  Then I started my virtual system with Hyper-V and was able to connect to the internet.  My issue was every time I created a External virtual adapter my computer would Blue screen with this error 

    DPC_WATCHDOG_VIOLATION

    Thank you for posting your solution.

    Sunday, January 25, 2015 7:13 AM