Hyper-V External network switch kills my host's network performance

56,181

Solution 1

The VMQ trick was useful to me a few months ago, before the March 2018 Windows update had been applied at work. After that update and perhaps some other smaller updates, I started having intermittent network performance problems again while I had a VM actively running.

Experimentally, I tried something other than the normal network bridge: I enabled Internet Connection Sharing on my NIC, sharing to an internal virtual network switch ("vEthernet (nat) 2"). So far so good - no noticeable impact on the host and the VM now has full speed Internet access as well.

enter image description here

Solution 2

For those having trouble with Mr. Raspberry's answer:

The network adapter name recognized by the *-VMNetworkAdapter commands are different than what is displayed in Windows. You must first list the available network adapters with Get-VMNetworkAdapter -ManagementOS and Get-VMNetworkAdapter * to get the adapter names that the command will recognize.

The fix for me was to modify the adapter within the VM, rather than on the management OS (i.e. without the -ManagementOS option).

Solution 3

For me before i do anything else, after creating the switch in Hyper-V manager restart the machine resets everything. Now I see same speed both ends.

Solution 4

I confirm having this issue on windows 10 1903. What worked for me was the internal switch workaround . Connecting to External Switch with physical card share would kill my host internet and obvious the vm won't get any.

Therefore here are the steps:

1)In hyper-v -> Virtual Switch Manager, create a new Internal Switch and on connection type , select Internal Network

2)From host control panel , go to Network and Internet\Network Connections -> right click on your host network card -> properties . Then move to Sharing tab and check mark "Allow other network users ..." then select the Internal Network switch that was created in the previous step

3)Go to your virtual machine settings and select the internal network adapter

Enjoy your internet on your vm . Microsoft get your techs in order and fix this issue.

Cheers !

Solution 5

Try to disable VMQ

To disable VMQ on a virtual switch, use the Set-VMNetworkAdapter PowerShell cmdlet as follows:

Set-VMNetworkAdapter –ManagementOS -Name <VirtualNetworkAdapterName> -VmqWeight 0

To disable VMQ on a physical network adapter, uncheck the appropriate box in the Advanced tab of the network adapter's properties page.

To change the MAC address of a virtual switch, either modify it in Hyper-V Manager or by using one of the following Set-VMNetworkAdapter PowerShell cmdlets:

  • Using a static MAC address:

    Set-VMNetworkAdapter –ManagementOS -Name <VirtualNetworkAdapterName> -StaticMacAddress <MacAddress>

  • Using a dynamic MAC address:

    Set-VMNetworkAdapter –ManagementOS -Name <VirtualNetworkAdapterName> -DynamicMacAddress

Source: http://www.dell.com/support/article/us/en/19/sln132131/windows-server--slow-network-performance-on-hyper-v-virtual-machines-with-virtual-machine-queue--vmq--enabled?lang=en

Share:
56,181

Related videos on Youtube

Maris B.
Author by

Maris B.

I love software development! ;)

Updated on September 18, 2022

Comments

  • Maris B.
    Maris B. over 1 year

    I have Windows 10 fully updated. I do the following:

    1. Testing internet speed - 70 Mbps up / 70 Mpbs down
    2. Hyper-V Manager
    3. Virtual Switch Manager
    4. Create Virtual Switch - External
    5. Testing internet speed - 50 Mpbs up / 0.1 Mbps down
    6. Remove virtual switch
    7. Testing internet speed - 70 Mbps up / 70 Mpbs down

    I have not created any virtual machines yet. The host network performance is degraded. The host has "Realtek PCIe GBE Family Controller".

    The only fix I found in internet is for Broadcom cards -- to disable "Large Send Offload" in Adapters properties, but unfortunately this does not help.

  • Maris B.
    Maris B. over 6 years
    Unfortunately command Set-VMNetworkAdapter does not work for me. I tried to use network adapter name from Control panel, from Hyper-V, also tried to rename, with double quotes, also w/o. But I always get the same error: Set-VMNetworkAdapter : No network adapter was found with the given criteria. (PowerShell run as admin also does not help)
  • VRPF
    VRPF almost 6 years
    I think this worked for me after a restart. I am running minikube on hyper-v and my host machines uses wifi. When after creating the virtual switch to share the host network, my internet was basically 1/10 of the expected. Applied the Powershell command and did not work. Restarted and it worked.
  • Klemen Slavič
    Klemen Slavič over 5 years
    I've tried this approach, but it seems I end up with the same problem after the latest update (Win 10 Pro 64 update 1809). A couple of days ago, any external network, or a bridged internal network, causes the same slowdown.
  • iceflow19
    iceflow19 over 5 years
    @KlemenSlavič I haven't upgraded to 1809 yet but in general I heard its steaming pile of bugs. So I wouldn't doubt that it may break this. Thanks for the heads up.
  • Aubrey Robertson
    Aubrey Robertson over 5 years
    @MarisB. did you run Powershell as an administrator?
  • Maris B.
    Maris B. over 5 years
    @AubreyRobertson - yes, As Administrator
  • Mike
    Mike about 5 years
    This whole issue is super annoying, but alas this does work. Thanks.
  • Ashwin Prabhu
    Ashwin Prabhu almost 5 years
    That worked for me too and I ended up here searching for "allow management operating system " string to understand why it slows down network access... Still a mystery although I know how to fix this now.
  • Ashwin Prabhu
    Ashwin Prabhu almost 5 years
    altaro.com/hyper-v/the-hyper-v-virtual-switch-explained-part‌​-1 Explains the overheads of sharing network adapter
  • David Ching
    David Ching over 4 years
    Strangely this worked for me too. First I created the external switch and used my host for awhile, noticed the slow-down. Deleted it and created an internal switch and turned Internet sharing on. This worked except then the VM was behind a NAT and I needed it not to be. Deleted the internal switch, turned off Internet sharing again, created a new external switch and immediately rebooted the host. Then everything was fine!
  • Homr Zodyssey
    Homr Zodyssey over 3 years
    I was getting 200Mbps down 17Mbps up. I created the switch, and it went to 0.18 Mbps down and 17 Mpbs up. I removed the switch, back to 200 Mbps down. I updated my "Intel(R) Wireless AC" driver, and it fixed the problem. Now I get 200 Mbps down with the switch enabled.
  • Paddre
    Paddre about 3 years
    Worked for me, too. Thanks a lot :-)
  • coderworks
    coderworks over 2 years
    This, incidentally, seemed to have been a factor in the slowness on my machine. Besides that VMQ issue mentioned above. Even after uninstalling Hyper-V I got the speeds measured through fast.com on 5GHz Wifi at 460 Kbps. Now after switching to 2.4GHz it clocks at 68 Mbps.