Hyper-V VM can't connect to internet

Answered Hyper-V VM can't connect to internet

  • Sunday, January 20, 2013 2:31 AM
     
     

    How can I connect my VM to the internet?

    I have Hyper V installed on Windows 8 pro machine with 1 NIC, a Broadcom NetXtreme Gigabet Ethernet adaptor. The  VM is running Wk2008R2 and can't get internet access. The machine picks up a 169.254 address and has no default gateway.

    I created a virtual external switch and connected it to the Broadcom NetXtreme adaptor. Then connected the network adaptor on my VM to this virtual switch. On my physical host ICS is turned on for the original network connection and the new Ethernet vSwitch now has all the settings originally bound to that adaptor.

    What am I doing wrong? I have tried everything and followed all the advice I can find but still I can't get my VM to connect to the internet (host internet is fine). Can someone please advise??


    • Edited by asks2012 Sunday, January 20, 2013 2:31 AM
    •  

All Replies

  • Sunday, January 20, 2013 3:17 AM
     
     

    How is the internet presented to the host machine?

    Wireless? Wired?

    Setting up ICS isn't usually a requirement to serve up the internet to your VMs unless your using a cell modem or something similar.

    See the below link for more info.

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/01/08/understanding-networking-with-hyper-v.aspx

    Cheers!

  • Sunday, January 20, 2013 11:25 AM
     
     

    I agree with Andy. You have to consider your virtual machine as an ordinary computer. If you use a Lan or WLan, you have to use the same technology on your VM.

    Regards


    Best Regards Don't forget to mark it as answer if it helps

  • Sunday, January 20, 2013 5:00 PM
     
     

    In order to get Internet connection with ICS, take the following considerations:

    1. Switch Internal Type (connection between VMs and your Windows 8)
    2. Internal Switch creates a virtual adapter called vEthernet
    3. Setup TPC/IP for this virtual adaptar as a 192.168.137.1/255.255.255.0 (default for ICS)
    4. Configure ICS in Broadcom Adapter with vEthernet as network connection
    5. In VM configure a virtual net adaptor connected to Internal Switch, and voilà...

    Now you have Internet in your VM.

    Regards,

  • Sunday, January 20, 2013 6:44 PM
     
     

    Hi,

    I advise you to do the following which is easier :

    • Create an external virtual network
    • Bind it to your physical Wireless card
    • Click on OK
    • Assign your virtual network to your VM
    • and that's it ...

    In Windows Server 2012, the wireless card is now supported in the fact that you can assign it to a virtual network. That was not possible with Windows Server 2008 R2. If you want, I wrote a post on that subject but in french. You can just see the pictures if you want ...
    http://danstoncloud.com/blogs/david_lachari/archive/2012/11/08/le-wifi-est-d-233-sormais-support-233-sur-hyper-v-version-windows-server-2012.aspx

    Cheers,


    David LACHARI
    MVP Virtual Machine - VCP et VTSP vSphere 4.1
    Blog DansTonCloud
    Auteur du livre Hyper-v v2 sous Windows Server 2008 R2

  • Sunday, January 20, 2013 10:03 PM
     
     

    It's a wired connection, Ethernet cable through a broadband router/modem.

    Although I've turned on ICS, It does work without ICS but I still don't have internet on my virtual machine and still pick up the APIPA address.

  • Sunday, January 20, 2013 10:06 PM
     
     

    David - But that's exactly what I did and the VM gets a 169.254 address with no default gateway and no internet. If I create another VM the same way, that also gets the APIPA address and both machines can ping each other but they can't get internet?

    I'm confused as i'm already following the advice above??


    • Edited by asks2012 Monday, January 21, 2013 9:02 PM
    •  
  • Sunday, January 20, 2013 10:11 PM
     
     
    I've turned off ICS and it makes no difference to anything!! The IP address of the VM is still the same and host internet isn't affected but the VM still has no internet..
  • Sunday, January 20, 2013 10:16 PM
     
     

    Do you have DHCP enabled on your router? Is your host machine has a manually assigned IP address, or does it get it automagically?

    Also, please post the settings of your external vSwitch.

  • Sunday, January 20, 2013 10:45 PM
     
     

    Yes DHCP is enabled on my router and the host machine gets an address automatically. The vEthernet adaptor now has all the addresses, bindings and protocols that were associated with the physical NIC. I can't post images of the vSwitch but it's external, connected to the physical NIC and 'allow management operating system to share this network adaptor' is ticked.


    • Edited by asks2012 Sunday, January 20, 2013 10:47 PM
    •  
  • Monday, January 21, 2013 2:27 PM
     
     
    Could you please post an ipconfig /all of your VM and your host?  Do you happen to have a VLAN tag associated with this VM's network settings?

    .:|:.:|:. tim

  • Monday, January 21, 2013 7:45 PM
     
     

    No VLAN tags and enable virtual LAN identification for management operating system is unticked on the external vswitch properties.

    Ipconfig for the VM gives.


    Ethernet adapter Local Area Connection:

       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapte
       Physical Address. . . . . . . . . : 00-15-5D-1F-1B-00
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Link-local IPv6 Address . . . . . : fe80::8dd4:f0e0:c1b:a82b%11(Pref
       Autoconfiguration IPv4 Address. . : 169.254.168.43(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.0.0
       Default Gateway . . . . . . . . . :
       DHCPv6 IAID . . . . . . . . . . . : 234886493
       DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-18-8C-DC-83-00-15-5D

       DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                           fec0:0:0:ffff::2%1
                                           fec0:0:0:ffff::3%1
       NetBIOS over Tcpip. . . . . . . . : Enabled

    Tunnel adapter isatap.{F8C46274-E360-4AA3-980A-4A6746E304B9}:

       Media State . . . . . . . . . . . : Media disconnected
       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Microsoft ISATAP Adapter
       Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
       DHCP Enabled. . . . . . . . . . . : No
       Autoconfiguration Enabled . . . . : Yes

  • Monday, January 21, 2013 7:58 PM
     
     

    For the host :

    Ethernet adapter vEthernet (New Virtual Switch):

       Connection-specific DNS Suffix  . :
       Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
       Physical Address. . . . . . . . . : 62-21-50-1A-B8-D1
       DHCP Enabled. . . . . . . . . . . : Yes
       Autoconfiguration Enabled . . . . : Yes
       Link-local IPv6 Address . . . . . : fe80::6111:fe8f:8f9:26c5%22(Preferred)
       IPv4 Address. . . . . . . . . . . : 92.234.x.x(Preferred)
       Subnet Mask . . . . . . . . . . . : 255.255.252.0
       Lease Obtained. . . . . . . . . . : 20 January 2013 02:12:36
       Lease Expires . . . . . . . . . . : 25 January 2013 17:27:32
       Default Gateway . . . . . . . . . : 92.234.x.x
       DHCP Server . . . . . . . . . . . : 62.253.x.x
       DHCPv6 IAID . . . . . . . . . . . : 375664976
       DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-18-82-89-C9-64-31-50-3A-B8-D4

       DNS Servers . . . . . . . . . . . : 194.168.4.100
                                           194.168.8.100
       NetBIOS over Tcpip. . . . . . . . : Enabled

  • Monday, January 21, 2013 7:59 PM
     
     

    Try to disable the IPv6 stack using this KB
    http://support.microsoft.com/kb/929852 

    Restart your virtual machine and check if you can surf on Internet ... 


    David LACHARI
    MVP Virtual Machine - VCP et VTSP vSphere 4.1
    Blog DansTonCloud
    Auteur du livre Hyper-v v2 sous Windows Server 2008 R2

  • Monday, January 21, 2013 8:20 PM
     
     
    I've unbound IPV6 from both the host vEthernet adaptor and the VM network adaptor..rebooted both machines and still no change and no internet in my VM :(
  • Tuesday, January 22, 2013 12:57 AM
     
     

    Have you tried blowing away your currently defined virtual switches and recreating them?  Sometimes all the playing around trying to find the issue screws up some things you might not have thought you were messing with.

    Are you sure you have Windows 8 drivers for the NIC?


    .:|:.:|:. tim

  • Tuesday, January 22, 2013 1:37 AM
     
     

    Make sure you network box has DHCP enabled and is acting as the DHCP server

    next makes sure your hypervisor can connect

    then simply use the network box to supply the entire network including virtual machines


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews

  • Tuesday, January 22, 2013 10:05 AM
    Moderator
     
     

    Hi asks2012,


    Firstly, would you please let us know the network environment. Is it home or domain?


    Meanwhile, from your post, it seems that your host gets public IP configuration from a public DHCP Server. If it is a home router, would you please let us know more details about the configuration of the router.


    Also, if we assign a static IP address within the same IP range of your host for the VM, will it have Internet access?


    Hope this helps.


    Jeremy Wu
    TechNet Community Support

  • Wednesday, January 23, 2013 12:38 AM
     
     

    Tim - Yes tried that..even tried removing the entire Hyper V role and reinstalling but the same problem occurs.

    All drivers are most up to date. I only installed w8 about 3 weeks ago.

  • Wednesday, January 23, 2013 12:47 AM
     
     

    can i get machine specs for the hardware machine at issue


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews

  • Wednesday, January 23, 2013 12:57 AM
     
     

    Hi Jeremy - Network profile is private. It is a home router configured with dhcp and a broadband wired cable connection.

    I tried the static IP on the VM and it makes no difference. Still no internet :(

    All I want is the VM to pick up a private IP address range so I can install AD and have a test network. This happened automatically when I used VMware workstation to create a VM on the same PC. But after uninstalling that and installing Hyper-V it just doesn't seem to work. It's very frustrating and if I can't find a solution i'll go back to VMware.


    • Edited by asks2012 Wednesday, January 23, 2013 12:57 AM
    •  
  • Wednesday, January 23, 2013 1:07 AM
     
     

    ad works better if you are using a bunch of servers, for a small home office its better to use a single server 


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews

  • Wednesday, January 23, 2013 1:20 AM
     
     
    The host is a HP Z400 with 10GB RAM and Windows8 Pro x64 Intel Xeon CPU 2.4 GHz
  • Wednesday, January 23, 2013 1:50 AM
     
     

    HP is reasonably good, and your CPU is OK. The problem is your limited in RAM for running more than a couple of virtual servers.


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews

  • Wednesday, January 23, 2013 6:40 AM
    Moderator
     
     Answered

    Hi asks2012,


    Thanks for your reply.


    In general, if it is a home router, with default configurations, we should get private IPv4 IP addresses, such as 192.168.0.2 or 192.168.1.2.


    However, from the ipconfig /all, it indicates that we get an public IP address and you have two DHCP Servers (194.168.4.100 and 192.168.8.100) available. With a single home router, we should have only one DHCP Server in the list. Therefore, I suspect that your PC connects to a modem instead of a router. If so, this may be the cause of the issue. If not, would you please let us the model and configuration of the router, especially, what is the IP range?


    Hope this helps.


    Jeremy Wu
    TechNet Community Support

  • Wednesday, January 23, 2013 10:10 PM
     
     

    Hi Jeremy - Yes it is a modem that is connected to the pc via Ethernet cable. I had exactly the same modem and set up when I created VM's in VMware workstation with internet access. Why does this cause issues with Hyper-V? Thanks for your help so far.

  • Thursday, January 24, 2013 11:43 PM
     
     

    Has anyone been able to come up with a solution to this? I'd really appreciate the help!

  • Friday, January 25, 2013 1:48 AM
     
     Answered

    So after re-revewing the thread and seeing that your running with no router and plugging directly into the modem, I've tested the below link with a similar setup and it worked for me.

    The key is: you have to set Internet connection sharing back up and reconfigure your vSwitch as type "internal" and then you should be good.

    See the below link.

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx

  • Friday, January 25, 2013 1:58 AM
     
     Answered

    If you are connected to the internet directly via a cable or ADSL modem, you are advantaged in buying a wireless router even if you are not using the WiFi feature.

    These are inexpensive and I suggest Cisco which is more sophisticated compared to rival equipment I have seen. Models with 1000BASE-T are better choice, the slower obsolete 100BASE-T models are too slow.

    I use a Cisco corporate box but the consumer versions are just as good. My box simply has more ports on it.


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews

  • Friday, January 25, 2013 3:50 AM
    Moderator
     
     Answered

    Hi asks2012,


    Thanks for your reply.


    Due to the host connects to a modem directly, I also assume that we need to double click the Broadband Connection before we could get the Internet access.


    Also, with Hyper-V external switch, we can treat the VM as another physical machine (Networking point of view), and in general, ISP does not allow a single account to be logged on different devices with same time.


    According to the above, I would like to suggest the following:


    1. Add to wireless router to your home network, it can make all devices get Internet access much easier.


    2. Remove the External virtual switch and create an Internal Virtual Switch. Check “Allow other Network users to connect through this computer’s Internet connection” in your physical adapter. Assign a static IP address for the Internal Virtual adapter, no gateway, no DNS, such as 192.168.1.1/24. In your VM, assign a static IP within the same range.


    Reference: TechNet Thread: help with lab


    However, method one is recommended.


    By the way, if you would like to setup a domain controller, according to best practices, please assign static TCP/IP configurations for it.


    Hope this helps.


    Jeremy Wu
    TechNet Community Support

  • Saturday, January 26, 2013 12:09 AM
     
     

    Hi guys,

    Creating the internal virtual switch works but I have only 1 VM. If I need another VM would I need to create another switch? Or can I use 1 internal switch with more than 1 VM?

    Thanks for all your help so far, it really is appreciated :)

  • Saturday, January 26, 2013 12:48 AM
     
     Answered

    Glad to hear creating the vSwitch as type internal resolved the issue.

    You could do more than 1 VM on the same switch. Just make sure to attach it to that vSwitch and you should be good to go.

    Cheers!

  • Saturday, January 26, 2013 12:52 AM
     
     Answered

    Hi guys,

    Creating the internal virtual switch works but I have only 1 VM. If I need another VM would I need to create another switch? Or can I use 1 internal switch with more than 1 VM?

    Thanks for all your help so far, it really is appreciated :)

    even a consumer wifi box can handle 100 virtual machines easy. My corporate box can handle a class A subnet so it can do millions.

    gigabit ethernet does have its limitation, that why 10GBASE-T is on the market at > $10,000 for a network box


    Windows MVP, XP, Vista, 7 and 8. More people have climbed Everest than having 3 MVP's on the wall.

    Hardcore Games, Legendary is the only Way to Play

    Developer | Windows IT | Chess | Economics | Vegan Advocate | PC Reviews

  • Monday, January 28, 2013 2:16 AM
    Moderator
     
     Answered

    Hi asks2012,


    You can attach all  your VMs to this Internal virtual switch.


    Hope this helps.


    Jeremy Wu
    TechNet Community Support