If you have created a VM without Accelerated Networking, it is possible to enable this feature on an existing VM. The VM must support Accelerated Networking by meeting the following prerequisites that are also outlined above:
- The VM must be a supported size for Accelerated Networking
- The VM must be a supported Azure Gallery image (and kernel version for Linux)
- All individual VMs or VMs in an availability set must be stopped/deallocated before enabling Accelerated Networking on any NIC
For more information, please see the Azure documentation.
Individual VMs and VMs in an availability set
First stop/deallocate the VM or, if an Availability Set, all the VMs in the Set:
Azure CLI
az vm deallocate \ --resource-group myResourceGroup \ --name myVM
Important, please note, if your VM was created individually, without an availability set, you only need to stop/deallocate the individual VM to enable Accelerated Networking. If your VM was created with an availability set, all VMs contained in the availability set will need to be stopped/deallocated before enabling Accelerated Networking on any of the NICs.
Once stopped, enable Accelerated Networking on the NIC of your VM:
Azure CLI
az network nic update \ --name myNic \ --resource-group myResourceGroup \ --accelerated-networking true
Restart your VM or, if in an Availability Set, all the VMs in the Set and confirm that Accelerated Networking is enabled:
Azure CLI
az vm start --resource-group myResourceGroup \ --name myVM
After the restart, the Mellanox VF (Virtual Function) device will be exposed to the VM.