MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

Cannot seems to be able to confirm that accelerated networking is enabled #60667

Closed wjia7 closed 4 years ago

wjia7 commented 4 years ago

I have a scenario where I have successfully enabled the network accelerator on CentOS VM I have created by following the steps from https://docs.microsoft.com/en-us/azure/virtual-network/create-vm-accelerated-networking-cli#confirm-that-accelerated-networking-is-enabled However, even though I could see from VM's NIC that it got Accelerated Networking in ON state. I could not verify the accelerated networking through using either the 'lspci' or the 'ethtool -S eth0 | grep vf' from the document. Both return negative results. I am still seeing $ lspci 00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03) 00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01) 00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) 00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02) 00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA $ ethtool -S eth0 | grep vf no stats available

Is there anything else I can do to verify that the Accelerated Networking is running on my VM?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

GitaraniSharma-MSFT commented 4 years ago

@wjia7, thank you for your question. We will investigate and update the thread shortly.

GitaraniSharma-MSFT commented 4 years ago

@wjia7, I replicated the steps and created a Linux (centos 8.2.2004) VM with Accelerated Networking enabled and then did a SSH to it using it's Public IP and ran both the commands 'lspci' and 'ethtool -S eth0 | grep vf_' and was able to get the expected output as below:

[azureuser@Gita-CentOS ~]$ lspci 0000:00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03) 0000:00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01) 0000:00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01) 0000:00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02) 0000:00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA 812c:00:02.0 Ethernet controller: Mellanox Technologies MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function]

[azureuser@Gita-CentOS ~]$ ethtool -S eth0 | grep vf_ vf_rx_packets: 5737 vf_rx_bytes: 19949380 vf_tx_packets: 37870 vf_tx_bytes: 7865710 vf_tx_dropped: 0

Could you try to disable and re-enable the Accelerated Networking on your VM via Azure Portal/CLI/PowerShell and run the commands again? If that doesn't help, please share the OS version and size of the VM that you are using, so that we can try to reproduce it and see if there are any issues with it.

wjia7 commented 4 years ago

Is there a way to quickly disable and re-enable the Accelerated Networking on my VM via Azure Portal?

GitaraniSharma-MSFT commented 4 years ago

@wjia7 , apologies for the confusion. You cannot enable/disable accelerated networking on an existing VM via Azure portal (portal only works while new VM creation) but it can be done via Azure CLI/PowerShell. You need to first stop the VM from portal and make sure that it is in stopped/decommissioned state. Make a note of the name of the NIC and run the below commands:

Azure CLI: To disable: az network nic update --name --resource-group --accelerated-networking false To enable: az network nic update --name --resource-group --accelerated-networking true

Azure PowerShell: To disable: $nic = Get-AzNetworkInterface -ResourceGroupName "myResourceGroup" -Name "myNic" $nic.EnableAcceleratedNetworking = $false $nic | Set-AzNetworkInterface To enable: $nic = Get-AzNetworkInterface -ResourceGroupName "myResourceGroup" -Name "myNic" $nic.EnableAcceleratedNetworking = $true $nic | Set-AzNetworkInterface

NOTE : You need to stop the VM before running these commands to make sure the functionality is not affected. The commands will run successfully even without stopping the VM, but the functionality will not be applied.

wjia7 commented 4 years ago

problem solved. the CentOS version I was using was too old. once updated it to 7.8 it worked.