networking - Windows 8 host can't access hyper-v guest

03
2013-08
  • Voyager529

    My laptop running Windows 8 Pro RTM with 12GB of RAM also serves as an "ant farm" where I was testing out a set of Linux appliances. I had three virtual switches: one that shared my wireless adapter, one that shared the wired adapter, and one for the internal network. An Endian VM routed traffic between the external connections and the internal ones, and provided DHCP services to the VMs that were running. I was able to successfully use Opera and Filezilla on my laptop to get to all of the browser based and SSH services (e.g. Webmin on the LAMP appliance I was working with), and all was well.

    In other words, my wireless adapter (say, 10.10.0.24/24) would provide external access to the Endian (192.168.5.1/24), which would in turn route traffic between the Wordpress appliance (192.168.5.2), the outside world (e.g. themes and updates from Wordpress.com), and my laptop itself.

    One day recently, for no discernible reason, traffic stopped flowing betweem my laptop and the guests. I killed the Endian and rebuilt it, no dice. I was only able to configure it from a guest internally (where I did enable DHCP, DNS, etc.). None of the other VMs were accessible from the host, either, only from within the guest network.

    DHCP Guard is off. Router Advertisement Guard is off. Endian is successfully leasing IP addresses to guests. The internal switch is explicitly an 'internal', not a 'private' one. Neither the Endian nor any other VM on the virtual LAN will respond to a ping direct from my laptop. The Endian, along with the rest of the servers, however, can successfully get to the internet.

    How do I restore communication between my laptop and the virtual machines it contains?

  • Answers
  • voyager529

    Solved my own issue: While I swore that the Endian box was configured with DHCP enabled, it wasn't. Thus, the bridge adapter between the host and the guest LAN wasn't leasing an IP address, because there was no one to lease it from. I static IP'd a guest box and enabled DHCP on the Endian. The host can now successfully talk to the virtual machines.


  • Related Question

    network adapter - Windows 8 Hyper-V - how to give VM internet access?
  • Graham Clark

    I've got Windows 8 Pro on my home machine. I want to have a Windows 7 Professional VM running under Hyper-V, and I want the VM to have full internet access. My physical machine has a wireless network adapter I use to connect to a router.

    Here's what I've done so far:

    • In Hyper-V Manager, I've created a new External Virtual Switch, which is connected to my wireless network adapter. If I look in Windows 8's Network Connections page, I can see it's created a virtual ethernet adapter and a network bridge, and my wireless adapter is now bridged.

    • I've created a Windows 7 VM, and in the Hyper-V settings I've set it to use the virtual switch.

    When I log into the VM, I have a network, but it's "unidentified" and has no internet access. What am I missing? Is it something to do with the "VLAN identification" settings? I'm not quite sure what these are about.


    This question was a Super User Question of the Week.
    Read the blog entry for more details or contribute to the blog yourself


  • Related Answers
  • KronoS

    In order to get the VM connected to the internet you have to tie it to the Ethernet/Wireless NIC Card. In order to do this you have to create a "Virtual Switch".

    1. Open your Hyper-V Manager
    2. Select Action --> Virtual Switch Manager

      Accessing the VM Switch Manager

    3. Select External and then Create Virtual Switch

      Virtual Switch Manager

    4. Give the Switch a Name and then select the External Controller you use to connect to the internet (Ethernet, or Wireless NIC, etc,.)

      VM Switch Properties

    5. Select Apply and then OK

    6. Right click on the Virtual Machine you want to connect and select Settings

      VM Settings

    7. Under the Network Adapter Setting select the newly created Virtual Switch

    Connecting the Switch to the VM

    This should enable the connection you use to connect to the internet to be accessible to the VM

  • Canadian Luke

    I had to disable and then re-enable the Allow management operating system to share this network adapter under the Virtual Switch Manager.

    If this isn't checked the host machine will not be able to use the chosen adapter. It had been checked in my case, for some reason I had to flip it back and forth again.

  • Mike Walsh

    Another trick as detailed in this question Windows 8 Hyper-V network not working on host is that this may not work over wireless... re did the setting several times nothing - set up an ethernet adapter - worked straight away. [quick edit to say of course I'd set up separate virtual switches for the two physical adapters...]

  • random

    In my case, while the VM was running I changed the virtual Switch settings to “Not Connected” and then back to my newly created virtual switch. Worked.