Skip to content

Commit 9641065

Browse files
committed
edits
1 parent 0642f7f commit 9641065

File tree

4 files changed

+161
-151
lines changed

4 files changed

+161
-151
lines changed

articles/virtual-network/accelerated-networking-overview.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ The following diagram illustrates how two VMs communicate with and without Accel
2121

2222
![Screenshot that shows communication between Azure VMs with and without Accelerated Networking.](./media/create-vm-accelerated-networking/accelerated-networking.png)
2323

24-
Without Accelerated Networking, all networking traffic in and out of the VM traverses the host and the virtual switch. The virtual switch provides all policy enforcement to network traffic. Policies include network security groups, access control lists, isolation, and other network virtualized services. To learn more about virtual switches, see [Hyper-V Virtual Switch](/windows-server/virtualization/hyper-v-virtual-switch/hyper-v-virtual-switch).
24+
**Without Accelerated Networking**, all networking traffic in and out of the VM traverses the host and the virtual switch. The virtual switch provides all policy enforcement to network traffic. Policies include network security groups, access control lists, isolation, and other network virtualized services. To learn more about virtual switches, see [Hyper-V Virtual Switch](/windows-server/virtualization/hyper-v-virtual-switch/hyper-v-virtual-switch).
2525

26-
With Accelerated Networking, network traffic that arrives at the VM's network interface (NIC) forwards directly to the VM. Accelerated Networking offloads all network policies that the virtual switch applied, and applies them in hardware. Because hardware applies policy, the NIC can forward network traffic directly to the VM. The NIC bypasses the host and the virtual switch, while it maintains all the policy it applied in the host.
26+
**With Accelerated Networking**, network traffic that arrives at the VM's network interface (NIC) forwards directly to the VM. Accelerated Networking offloads all network policies that the virtual switch applied, and applies them in hardware. Because hardware applies policy, the NIC can forward network traffic directly to the VM. The NIC bypasses the host and the virtual switch, while it maintains all the policy it applied in the host.
2727

2828
## Benefits
2929

3030
Accelerated Networking has the following benefits:
3131

3232
- **Lower latency and higher packets per second (pps).** Removing the virtual switch from the data path eliminates the time packets spend in the host for policy processing, and increases the number of packets that the VM can process.
3333

34-
- **Reduced jitter.** Virtual switch processing depends on the amount of policy to apply and the workload of the CPU that does the processing. Offloading policy enforcement to the hardware removes that variability by delivering packets directly to the VM. Offloading also removes the host-to-VM communication, all software interrupts, and all context switches.
34+
- **Reduced jitter.** Virtual switch processing time depends on the amount of policy to apply and the workload of the CPU that does the processing. Offloading policy enforcement to the hardware removes that variability by delivering packets directly to the VM. Offloading also removes the host-to-VM communication, all software interrupts, and all context switches.
3535

3636
- **Decreased CPU utilization.** Bypassing the virtual switch in the host leads to less CPU utilization for processing network traffic.
3737

@@ -78,9 +78,9 @@ The following Linux and FreeBSD distributions from the Azure Gallery support Acc
7878

7979
- Most general-purpose and compute-optimized VM instance sizes with two or more vCPUs support Accelerated Networking. On instances that support hyperthreading, VM instances with four or more vCPUs support Accelerated Networking.
8080

81-
- The individual [VM sizes documentation](../virtual-machines/sizes.md) indicates whether the VM supports Accelerated Networking.
81+
- To check whether a VM size supports Accelerated Networking, see [Sizes for virtual machines in Azure](../virtual-machines/sizes.md).
8282

83-
- You can directly query the list of VM SKUs that support Accelerated Networking by using the Azure CLI [az vm list-skus](/cli/azure/vm#az-vm-list-skus) command. Although NC and NV sizes appear in the command output, those sizes don't support Accelerated Networking. Enabling Accelerated Networking on NC or NV VMs has no effect.
83+
- You can directly query the list of VM SKUs that support Accelerated Networking by using the Azure CLI [az vm list-skus](/cli/azure/vm#az-vm-list-skus) command.
8484

8585
```azurecli-interactive
8686
az vm list-skus \
@@ -91,9 +91,11 @@ The following Linux and FreeBSD distributions from the Azure Gallery support Acc
9191
--output table
9292
```
9393

94-
### Custom or Azure compute gallery images
94+
Although NC and NV sizes appear in the command output, those sizes don't support Accelerated Networking. Enabling Accelerated Networking on NC or NV VMs has no effect.
9595

96-
If you use a custom image that supports Accelerated Networking, make sure you have the required drivers to work with Mellanox ConnectX-3, ConnectX-4 Lx, and ConnectX-5 NICs on Azure. Accelerated Networking also requires network configurations that exempt configuring the virtual functions on mlx4_en and mlx5_core drivers. Images that have cloud-init >=19.4 have networking correctly configured to support Accelerated Networking during provisioning.
96+
### Custom VM images
97+
98+
If you use a custom image that supports Accelerated Networking, make sure you have the required drivers to work with Mellanox ConnectX-3, ConnectX-4 Lx, and ConnectX-5 NICs on Azure. Accelerated Networking also requires network configurations that exempt configuration of the virtual functions on the mlx4_en and mlx5_core drivers. Images with cloud-init version 19.4 or greater have networking correctly configured to support Accelerated Networking during provisioning.
9799

98100
The following example shows a sample configuration drop-in for `NetworkManager` on RHEL or CentOS:
99101

articles/virtual-network/create-vm-accelerated-networking-cli.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Use Azure CLI to create a Linux VM with Accelerated Networking
3-
description: Learn how to use Azure CLI to create and manage Linux virtual machines with Accelerated Networking enabled.
3+
description: Learn how to use Azure CLI to create and manage Linux virtual machines that have Accelerated Networking enabled.
44
services: virtual-network
55
author: asudbring
66
manager: gedegrac
@@ -14,14 +14,13 @@ ms.custom: fasttrack-edit, devx-track-azurecli
1414
---
1515
# Use Azure CLI to create a Linux VM with Accelerated Networking
1616

17-
This article provides steps to create a Linux virtual machine (VM) with Accelerated Networking (AccelNet) by using the Azure command-line interface, Azure CLI. The article also discusses application binding requirements, and how to enable and manage Accelerated Networking on existing VMs.
17+
This article describes how to create a Linux virtual machine (VM) with Accelerated Networking (AccelNet) enabled by using the Azure command-line interface, Azure CLI. The article also discusses application binding requirements, and how to enable and manage Accelerated Networking on existing VMs.
1818

19-
You can also create a VM with Accelerated Networking by using the [Azure portal](../virtual-machines/linux/quick-create-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json) or [Azure PowerShell](../virtual-network/create-vm-accelerated-networking-powershell.md).
19+
You can also create a Linux VM with Accelerated Networking enabled by using the [Azure portal](../virtual-machines/linux/quick-create-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json) or [Azure PowerShell](../virtual-network/create-vm-accelerated-networking-powershell.md). To manage Accelerated Networking on VMs by using the Azure portal, see [Portal management].
2020

2121
## Prerequisites
2222

2323
- An Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
24-
2524
- The latest version of [Azure CLI installed](/cli/azure/install-azure-cli). Sign in to Azure by using the [az login](/cli/azure/reference-index#az-login) command.
2625

2726
## Create a VM with Accelerated Networking
@@ -30,7 +29,7 @@ In the following examples, replace the example parameters such as `<myResourceGr
3029

3130
### Create a virtual network
3231

33-
1. Use [az group create](/cli/azure/group) to create a resource group to contain the resources. Be sure to select a supported Linux region listed in [Linux Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview).
32+
1. Use [az group create](/cli/azure/group) to create a resource group to contain the resources. Be sure to select a supported Linux region as listed in [Linux Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview).
3433

3534
```azurecli
3635
az group create --name <myResourceGroup> --location <myAzureRegion>
@@ -76,15 +75,15 @@ In the following examples, replace the example parameters such as `<myResourceGr
7675

7776
### Create a network interface with Accelerated Networking
7877

79-
1. Use [az network public-ip create](/cli/azure/network/public-ip) to create a public IP address. The VM doesn't need a public IP address if you don't access it from the internet, but you need the public IP to complete the steps for this article.
78+
1. Use [az network public-ip create](/cli/azure/network/public-ip) to create a public IP address. A VM doesn't need a public IP address if you don't access it from the internet, but you need the public IP to complete the steps for this article.
8079

8180
```azurecli
8281
az network public-ip create \
8382
--name <myPublicIp> \
8483
--resource-group <myResourceGroup>
8584
```
8685

87-
1. Use [az network nic create](/cli/azure/network/nic) to create a network interface (NIC) with Accelerated Networking enabled. The following example creates a network interface in the subnet of the virtual network, and associates the NSG to the NIC.
86+
1. Use [az network nic create](/cli/azure/network/nic) to create a network interface (NIC) with Accelerated Networking enabled. The following example creates a NIC in the subnet of the virtual network, and associates the NSG to the NIC.
8887

8988
```azurecli
9089
az network nic create \
@@ -114,7 +113,7 @@ az vm create \
114113
--nics <myNic>
115114
```
116115

117-
When the VM is created, you get output similar to the following example. Take note of the `publicIpAddress`, which you use to access the VM in later steps.
116+
After the VM is created, you get output similar to the following example. Take note of the `publicIpAddress`, which you use to access the VM in later steps.
118117

119118
```output
120119
{
@@ -147,7 +146,7 @@ When the VM is created, you get output similar to the following example. Take no
147146
> [!NOTE]
148147
> Other kernel versions may be supported. For an updated list, see the compatibility tables for each distribution at [Supported Linux and FreeBSD virtual machines for Hyper-V](/windows-server/virtualization/hyper-v/supported-linux-and-freebsd-virtual-machines-for-hyper-v-on-windows), and confirm that SR-IOV is supported. You can find more details in the release notes for [Linux Integration Services for Hyper-V and Azure](https://www.microsoft.com/download/details.aspx?id=55106). *
149148
150-
1. Use the `lspci` command to confirm that the Mellanox VF device is exposed to the VM. The returned output is similar to the following example:
149+
1. Use the `lspci` command to confirm that the Mellanox VF device is exposed to the VM. The returned output should be similar to the following example:
151150

152151
```output
153152
0000:00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
@@ -170,18 +169,20 @@ When the VM is created, you get output similar to the following example. Take no
170169

171170
## Handle dynamic binding and revocation of virtual function
172171

173-
Binding to the synthetic NIC that's exposed in the VM is a mandatory requirement for all applications that take advantage of Accelerated Networking. If an application runs directly over the VF NIC, it doesn't receive all packets that are destined to the VM, because some packets show up over the synthetic interface. Run an application over the synthetic NIC to guarantee that the application receives all packets that are destined to it. Binding to the synthetic NIC also ensures that the application keeps running even if the VF is revoked during host servicing.
172+
Binding to the synthetic NIC that's exposed in the VM is a mandatory requirement for all applications that take advantage of Accelerated Networking. If an application runs directly over the VF NIC, it doesn't receive all packets that are destined to the VM, because some packets show up over the synthetic interface.
173+
174+
You must run an application over the synthetic NIC to guarantee that the application receives all packets that are destined to it. Binding to the synthetic NIC also ensures that the application keeps running even if the VF is revoked during host servicing.
174175

175176
For more information about application binding requirements, see [How Accelerated Networking works in Linux and FreeBSD VMs](./accelerated-networking-how-it-works.md#application-usage).
176177

177178
<a name="enable-accelerated-networking-on-existing-vms"></a>
178179
## Manage Accelerated Networking on existing VMs
179180

180-
It's possible to enable Accelerated Networking on an existing VM that doesn't have this feature. The VM must meet the following requirements to support Accelerated Networking:
181+
It's possible to enable Accelerated Networking on an existing VM. The VM must meet the following requirements to support Accelerated Networking:
181182

182183
- Be a supported size for Accelerated Networking.
183184
- Be a supported Azure Marketplace image and kernel version for Linux.
184-
- Be stopped or deallocated before you can enable Accelerated Networking on any NIC. This requirement applies to all individual VMs or VMs in an availability set or Azure Virtual Machine Scale Set.
185+
- Be stopped or deallocated before you can enable Accelerated Networking on any NIC. This requirement applies to all individual VMs or VMs in an availability set or Azure Virtual Machine Scale Sets.
185186

186187
### Enable Accelerated Networking on individual VMs or VMs in availability sets
187188

@@ -193,7 +194,7 @@ It's possible to enable Accelerated Networking on an existing VM that doesn't ha
193194
--name <myVm>
194195
```
195196

196-
If you created your VM individually without an availability set, you must stop or deallocate only the individual VM to enable Accelerated Networking. If you created your VM with an availability set, you must stop or deallocate all VMs in the set before you enable Accelerated Networking on any of the NICs.
197+
If you created your VM individually without an availability set, you must stop or deallocate only the individual VM to enable Accelerated Networking. If you created your VM with an availability set, you must stop or deallocate all VMs in the set before you can enable Accelerated Networking on any of the NICs.
197198

198199
1. Once the VM is stopped, enable Accelerated Networking on the NIC of your VM.
199200

@@ -204,7 +205,7 @@ It's possible to enable Accelerated Networking on an existing VM that doesn't ha
204205
--accelerated-networking true
205206
```
206207

207-
1. Restart your VM, or all the VMs in the availability set, and confirm that Accelerated Networking is enabled.
208+
1. Restart your VM, or all the VMs in the availability set, and [confirm that Accelerated Networking is enabled](#confirm-that-accelerated-networking-is-enabled).
208209

209210
```azurecli
210211
az vm start --resource-group <myResourceGroup> \
@@ -219,8 +220,8 @@ Azure Virtual Machine Scale Sets is slightly different but follows the same work
219220

220221
```azurecli
221222
az vmss deallocate \
222-
--name myvmss \
223-
--resource-group myrg
223+
--name <myVmss> \
224+
--resource-group <myResourceGroup>
224225
```
225226

226227
1. Once the VMs are stopped, update the Accelerated Networking property under the network interface.
@@ -254,26 +255,25 @@ Once you restart and the upgrades finish, the VF appears inside VMs that use a s
254255

255256
VMs with Accelerated Networking enabled can be resized only to sizes that also support Accelerated Networking. You can't resize a VM with Accelerated Networking to a VM instance that doesn't support Accelerated Networking by using the resize operation. Instead, use the following process to resize these VMs:
256257

257-
1. Stop and deallocate the VM or all the VMs in the availability set or Virtual Machine Scale Set.
258-
1. Disable Accelerated Networking on the NIC of the VM or all the VMs in the availability set or Virtual Machine Scale Set.
258+
1. Stop and deallocate the VM or all the VMs in the availability set or Virtual Machine Scale Sets.
259+
1. Disable Accelerated Networking on the NIC of the VM or all the VMs in the availability set or Virtual Machine Scale Sets.
259260
1. Move the VM or VMs to a new size that doesn't support Accelerated Networking, and restart them.
260261

261-
## Portal creation
262-
263-
You can also create a VM with Accelerated Networking by using the [Azure portal](../virtual-machines/linux/quick-create-portal.md?toc=%2fazure%2fvirtual-network%2ftoc.json).
264-
265-
- When you create a VM in the Azure portal that uses a [supported operating system](./accelerated-networking-overview.md#supported-operating-systems) and [VM size](./accelerated-networking-overview.md#supported-vm-instances), the **Enable accelerated networking** checkbox on the **Networking** tab of the **Create a virtual machine** screen is automatically selected. If Accelerated Networking isn't supported, the checkbox isn't selected, and a message explains the reason.
262+
### Manage Accelerated Networking through the portal
266263

267-
- You can enable only Azure Marketplace-supported operating systems through the portal. To create a VM with a custom OS image that supports Accelerated Networking, you must use Azure CLI or PowerShell.
264+
When you [create a VM in the Azure portal](/azure/virtual-machines/linux/quick-create-portal) that uses a [supported operating system](./accelerated-networking-overview.md#supported-operating-systems) and [VM size](./accelerated-networking-overview.md#supported-vm-instances), the **Enable accelerated networking** checkbox on the **Networking** tab of the **Create a virtual machine** screen is automatically selected. If Accelerated Networking isn't supported, the checkbox isn't selected, and a message explains the reason.
268265

269-
- The Accelerated Networking setting in the portal shows the user-selected state. Accelerated Networking allows choosing **Disabled** even if the VM size requires Accelerated Networking. VM sizes that require Accelerated Networking enable Accelerated Networking at runtime regardless of the user setting in the portal.
266+
>[!NOTE]
267+
>- You can enable Accelerated Networking during portal VM creation only for Azure Marketplace supported operating systems. To create and enable Accelerated Networking for a VM with a custom OS image, you must use Azure CLI or PowerShell.
268+
>
269+
>- The Accelerated Networking setting in the portal shows the user-selected state. Accelerated Networking allows choosing **Disabled** in the portal even if the VM size requires Accelerated Networking. VM sizes that require Accelerated Networking enable Accelerated Networking at runtime regardless of the user setting in the portal.
270270
271-
- To enable or disable Accelerated Networking for an existing VM through the Azure portal:
271+
To enable or disable Accelerated Networking for an existing VM through the Azure portal:
272272

273-
1. From the portal page for the VM, select **Networking** from the left menu.
274-
1. On the **Networking** page, select the **Network Interface**.
275-
1. At the top of the NIC **Overview** page, select **Edit accelerated networking**.
276-
1. Select **Automatic**, **Enabled**, or **Disabled**, and then select **Save**.
273+
1. From the portal page for the VM, select **Networking** from the left menu.
274+
1. On the **Networking** page, select the **Network Interface**.
275+
1. At the top of the NIC **Overview** page, select **Edit accelerated networking**.
276+
1. Select **Automatic**, **Enabled**, or **Disabled**, and then select **Save**.
277277

278278
## Next steps
279279

0 commit comments

Comments
 (0)