Severity : Medium
Description:
...
This control ensures that accelerated networking is enable for Azure virtual machines. Accelerated Networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance. The Accelerated Networking benefits the site recovery for Azure virtual machines that are failed over to a different Azure region.
Remediation Steps:
Perform following to enable accelerated networking for virtual machines :
Enable accelerated networking on existing VMs using Azure PowerShell
Stop or deallocate the VM or, if an availability set, all the VMs in the set
Stop-AzVM -ResourceGroup <resource group> -Name <vm name>
Enable accelerated networking on the NIC of VM
$nic = Get-AzNetworkInterface -ResourceGroupName <resource group> -Name <NIC Name>
$nic.EnableAcceleratedNetworking = $true
$nic | Set-AzNetworkInterface
Restart VM or, if in an availability set, all the VMs in the set
Start-AzVM -ResourceGroup <resource group> -Name <vm name>
Enable accelerated networking on existing VMs scale set using Azure PowerShell
Stop or deallocate the VM or, if an availability set, all the VMs in the set
Stop-AzVMss -ResourceGroup <resource group> -VMScaleSetName <scale set name>
Enable accelerated networking on the NIC of VM
$vmss = Get-AzVmss -ResourceGroupName <resource group> -VMScaleSetName <scale set name>
$vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[0].EnableAcceleratedNetworking = $true
Update-AzVMss -ResourceGroup <resource group> `-VMScaleSetName <scale set name>` -VirtualMachineScaleSet $vmss
Set the applied updates to automatic so that the changes are immediately applied
vmss.UpgradePolicy.Mode = "Automatic"
Update-AzVMss -ResourceGroup <resource group> `-VMScaleSetName <scale set name>` -VirtualMachineScaleSet $vmss
Restart the scale set
Start-AzVMss -ResourceGroup <resource group> -VMScaleSetName <scale set name>
Enable accelerated networking When creating VMs
Login to Azure Portal usingĀ https://portal.azure.com.
Navigate to Virtual machines.
Click +Create. Then select +Virtual machine.
On the VM tab, Select Networking.
Under Network information, next to Accelerated networking label, select Enable.
Important:
To enable accelerated networking, the virtual machines must be of supported size.
The VM must be a supported Azure Gallery image (and kernel version for Linux)
All VMs in an availability set or a virtual machine
...
scale set must be stopped or deallocated before you enable accelerated networking on any NIC.
Reference: