How to Disable Azure Accelerated Networking
Azure Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance. This high-performance path bypasses the host from the datapath, reducing latency, jitter, and CPU utilization, for use with the most demanding network workloads on supported VM types. Now if the azure accelarated networking is enabled you can’t resize the VM, and you will get the following error.
To disable Azure Azure Accelarated Networking you need to run the below script. Please note that this is not possible from Azure Portal.
$nic = Get-AzNetworkInterface -ResourceGroupName "AZWHYAZURE-PROD-RG" -Name "AZWA002-NIC"
$nic.EnableAcceleratedNetworking = $false
$nic | Set-AzNetworkInterface
Now once it’s disabled you can run the following script to change the size of the VM.
$resourceGroup = " AZWHYAZURE-PROD-RG "
$vmName1 = "AZRUKSWA002"
$vm1 = Get-AzVM -ResourceGroupName $resourceGroup -VMName $vmName1
$vm1.HardwareProfile.VmSize = "Standard_B4ms"
Update-AzVM -VM $vm1 -ResourceGroupName $resourceGroup
You should be able to view the following success result once it’s updated.