Ubuntu20.04 VM network doesn't seem to be working with SR-IOV enabled VSwitch

Shubham Chaudhary 1 Reputation point
2022-08-31T23:47:55.517+00:00

We are running Ubuntu-20.04 guest on Windows server 2022 Hper-V with SR-IOV enabled. On the Network status of the ubuntu 20.04 guest we see - OK(SR-IOV active). but inside VM there's no network connectivity, and we can't seem to ping gateway etc.

Via dmesg we see that VF is active and is assigned to the VM. (log: hv_netsvc eth0: Data path switched to VF: enp40752s1.)

Tried disabling Virtual Machine Queue on VM network adapter settings, but that didn't seem to work either.

Host network adapter is Broadcom NX-E 10g Base-T. Ubuntu 20.04 guest Kernel version: 5.15.0.1017-azure ( linux-azure tools installed )

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,125 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,122 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,538 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,351 Reputation points
    2022-09-02T07:45:42.26+00:00

    Hello there,

    Disable the firewall, and then test the result. If the problem is resolved, verify the firewall settings, and then re-enable the firewall.

    Use Network Watcher IP Flow Verify and NSG Flow Logging to determine whether there is a Network Security Group (NSG) or User-Defined Route (UDR) that is interfering with traffic flow.

    Try some additional Troubleshooting from this link https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-troubleshoot-connectivity-problem-between-vms

    ------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

  2. risolis 8,701 Reputation points
    2022-09-03T01:30:55.71+00:00

    Hello @Shubham Chaudhary

    Thank you for your heads up.

    I can not deny that this brought my attention so, I started looking for the accurate step to solve this and I found the next information as shown down below:

     ifconfig displays “RUNNING” flag when the cable is not connected.  
    This is a known issue in the Linux operating system stack.  
    Workaround  
    Use “ip link show” to display the “Oper status” value.  
    2. In certain SKEWs of controllers, PING is not working when attempting to bridge the  
    1G or 10G ports to the virtual machines when SR-IOV is enabled for 10G ports in the  
    BIOS.  
    This issue occurs due to limitations of the virtual Ethernet bridge. All transmitted  
    broadcast packets are looped back by the controller. This affects the functionality of the  
    Linux bridge, as it appears as if the same ARP broadcast packets are received on two  
    different interfaces.  
    Driver for Linux Release Notes 10  
    P011044-01A Rev. A  
    Workaround  
    a) Set the aging of the bridge to 0 using the following command:  
    “brctl setageing <bridge> 0”  
    This causes the bridge to behave like a hub and flood the packet to all the ports  
    (except the one on which the packet arrived) every time. This may impact  
    performance. If you have only two interfaces on this bridge (one NIC interface and  
    virbr0-nic), there is no performance impact.  
    b) Another option may be to use the MacVTap interface to the guest instead of the  
    bridge interface.   
    

    For further info about that please direct yourself to this link >>> https://docs.broadcom.com/doc/12356080

    I hope this can be a great help to address this concern soon : )

    Have a good one!

    Cheers,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.