You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-network/create-vm-accelerated-networking-cli.md
+86-12Lines changed: 86 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Use Azure CLI to create a Linux VM with Accelerated Networking
3
-
description: Use Azure CLI to create and manage Linux virtual machines that have Accelerated Networking enabled for improved network performance.
2
+
title: Use Azure CLI to create a Windows or Linux VM with Accelerated Networking
3
+
description: Use Azure CLI to create and manage virtual machines that have Accelerated Networking enabled for improved network performance.
4
4
services: virtual-network
5
5
author: asudbring
6
6
manager: gedegrac
@@ -12,9 +12,9 @@ ms.date: 03/20/2023
12
12
ms.author: allensu
13
13
ms.custom: fasttrack-edit, devx-track-azurecli
14
14
---
15
-
# Use Azure CLI to create a Linux VM with Accelerated Networking
15
+
# Use Azure CLI to create a VM with Accelerated Networking
16
16
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.
17
+
This article describes how to create a Linux or Windows 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.
18
18
19
19
You can also create a VM with Accelerated Networking enabled by using the [Azure portal](quick-create-portal.md). For more information about managing Accelerated Networking on VMs through the Azure portal, see [Manage Accelerated Networking through the portal](#manage-accelerated-networking-through-the-portal).
20
20
@@ -27,17 +27,17 @@ To use Azure PowerShell to create a Windows VM with Accelerated Networking enabl
27
27
28
28
## Create a VM with Accelerated Networking
29
29
30
-
In the following examples, replace the example parameters such as `<myResourceGroup>`, `<myNic>`, and `<myVm>` with your own values.
30
+
In the following examples, you can replace the example parameters such as `<myResourceGroup>`, `<myNic>`, and `<myVm>` with your own values.
31
31
32
32
### Create a virtual network
33
33
34
-
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).
34
+
1. Use [az group create](/cli/azure/group#az-group-create) to create a resource group to contain the resources. Be sure to select a supported Windows or Linux region as listed in [Windows and Linux Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview).
35
35
36
36
```azurecli
37
37
az group create --name <myResourceGroup> --location <myAzureRegion>
38
38
```
39
39
40
-
1. Use [az network vnet create](/cli/azure/network/vnet) to create a virtual network with one subnet in the resource group:
40
+
1. Use [az network vnet create](/cli/azure/network/vnet#az-network-vnet-create) to create a virtual network with one subnet in the resource group:
41
41
42
42
```azurecli
43
43
az network vnet create \
@@ -50,15 +50,34 @@ In the following examples, replace the example parameters such as `<myResourceGr
50
50
51
51
### Create a network security group
52
52
53
-
1. Use [az network nsg create](/cli/azure/network/nsg) to create a network security group (NSG).
53
+
1. Use [az network nsg create](/cli/azure/network/nsg#az-network-nsg-create) to create a network security group (NSG).
54
54
55
55
```azurecli
56
56
az network nsg create \
57
57
--resource-group <myResourceGroup> \
58
58
--name <myNsg>
59
59
```
60
60
61
-
1. The NSG contains several default rules, one of which disables all inbound access from the internet. Use [az network nsg rule create](/cli/azure/network/nsg/rule) to open a port to allow secure shell (SSH) access to the VM.
61
+
1. The NSG contains several default rules, one of which disables all inbound access from the internet. Use [az network nsg rule create](/cli/azure/network/nsg/rule#az-network-nsg-rule-create) to open a port to allow remote desktop protocol (RDP) or secure shell (SSH) access to the VM.
62
+
63
+
# [Windows](#tab/windows)
64
+
65
+
```azurecli
66
+
az network nsg rule create \
67
+
--resource-group <myResourceGroup> \
68
+
--nsg-name <myNsg> \
69
+
--name Allow-RDP-Internet \
70
+
--access Allow \
71
+
--protocol Tcp \
72
+
--direction Inbound \
73
+
--priority 100 \
74
+
--source-address-prefix Internet \
75
+
--source-port-range "*" \
76
+
--destination-address-prefix "*" \
77
+
--destination-port-range 3389
78
+
```
79
+
80
+
# [Linux](#tab/linux)
62
81
63
82
```azurecli
64
83
az network nsg rule create \
@@ -75,17 +94,18 @@ In the following examples, replace the example parameters such as `<myResourceGr
75
94
--destination-port-range 22
76
95
```
77
96
97
+
---
78
98
### Create a network interface with Accelerated Networking
79
99
80
-
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.
100
+
1. Use [az network public-ip create](/cli/azure/network/public-ip#az-network-public-ip-create) 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.
81
101
82
102
```azurecli
83
103
az network public-ip create \
84
104
--name <myPublicIp> \
85
105
--resource-group <myResourceGroup>
86
106
```
87
107
88
-
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.
108
+
1. Use [az network nic create](/cli/azure/network/nic#az-network-nic-create) 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.
89
109
90
110
```azurecli
91
111
az network nic create \
@@ -100,7 +120,24 @@ In the following examples, replace the example parameters such as `<myResourceGr
100
120
101
121
### Create a VM and attach the NIC
102
122
103
-
Use [az vm create](/cli/azure/vm) to create the VM, and use the `--nics` option to attach the NIC you created. Make sure to select a VM size and distribution that's listed in [Linux Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview). For a list of all VM sizes and characteristics, see [Linux VM sizes](../virtual-machines/sizes.md?toc=%2fazure%2fvirtual-network%2ftoc.json).
123
+
Use [az vm create](/cli/azure/vm#az-vm-create) to create the VM, and use the `--nics` option to attach the NIC you created. Make sure to select a VM size and distribution that's listed in [[Windows and Linux Accelerated Networking]](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview). For a list of all VM sizes and characteristics, see [Sizes for virtual machines in Azure](../virtual-machines/sizes.md).
124
+
125
+
# [Windows](#tab/windows)
126
+
127
+
The following example creates a Windows Server 2019 Datacenter VM with a size that supports Accelerated Networking, Standard_DS4_v2.
128
+
129
+
```azurecli
130
+
az vm create \
131
+
--resource-group <myResourceGroup> \
132
+
--name <myVm> \
133
+
--image Win2019Datacenter \
134
+
--size Standard_DS4_v2 \
135
+
--admin-username <myAdminUser> \
136
+
--admin-password <myAdminPassword> \
137
+
--nics <myNic>
138
+
```
139
+
140
+
# [Linux](#tab/linux)
104
141
105
142
The following example creates a VM with the UbuntuLTS OS image and a size that supports Accelerated Networking, Standard_DS4_v2.
106
143
@@ -115,6 +152,8 @@ az vm create \
115
152
--nics <myNic>
116
153
```
117
154
155
+
---
156
+
118
157
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.
119
158
120
159
```output
@@ -132,6 +171,39 @@ After the VM is created, you get output similar to the following example. Take n
132
171
133
172
## Confirm that accelerated networking is enabled
134
173
174
+
# [Windows](#tab/windows)
175
+
176
+
Once you create the VM in Azure, connect to the VM and confirm that the Ethernet controller is installed in Windows.
177
+
178
+
1. In the [Azure portal](https://portal.azure.com), search for and select *virtual machines*.
179
+
180
+
1. On the **Virtual machines** page, select your new VM.
181
+
182
+
1. On the VM's **Overview** page, select **Connect**.
183
+
184
+
1. On the **Connect** screen, select **Native RDP**.
185
+
186
+
1. On the **Native RDP** screen, select **Download RDP file**.
187
+
188
+
1. Open the downloaded RDP file, and then sign in with the credentials you entered when you created the VM.
189
+
190
+
1. On the remote VM, right-click **Start** and select **Device Manager**.
191
+
192
+
1. In the **Device Manager** window, expand the **Network adapters** node.
193
+
194
+
1. Confirm that the **Mellanox ConnectX-4 Lx Virtual Ethernet Adapter** appears, as shown in the following image:
195
+
196
+

197
+
198
+
The presence of the adapter confirms that Accelerated Networking is enabled for your VM.
199
+
200
+
> [!NOTE]
201
+
> If the Mellanox adapter fails to start, open an administrator command prompt on the remote VM and enter the following command:
202
+
>
203
+
> `netsh int tcp set global rss = enabled`
204
+
205
+
# [Linux](#tab/linux)
206
+
135
207
1. Use the following command to create an SSH session with the VM. Replace `<myPublicIp>` with the public IP address assigned to the VM you created, and replace `<myAdminUser>` with the `--admin-username` you specified when you created the VM.
136
208
137
209
```bash
@@ -177,6 +249,8 @@ You must run an application over the synthetic NIC to guarantee that the applica
177
249
178
250
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).
Copy file name to clipboardExpand all lines: articles/virtual-network/create-vm-accelerated-networking-powershell.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Use PowerShell to create a Windows VM with Accelerated Networking
2
+
title: Use PowerShell to create a VM with Accelerated Networking
3
3
description: Use Azure PowerShell to create and manage Windows virtual machines that have Accelerated Networking enabled for improved network performance.
4
4
services: virtual-network
5
5
author: asudbring
@@ -13,13 +13,13 @@ ms.date: 03/20/2023
13
13
ms.author: allensu
14
14
---
15
15
16
-
# Use Azure PowerShell to create a Windows VM with Accelerated Networking
16
+
# Use Azure PowerShell to create a VM with Accelerated Networking
17
17
18
18
This article describes how to use Azure PowerShell to create a Windows virtual machine (VM) with Accelerated Networking (AccelNet) enabled. The article also discusses how to enable and manage Accelerated Networking on existing VMs.
19
19
20
20
You can also create a VM with Accelerated Networking enabled by using the [Azure portal](quick-create-portal.md). For more information about managing Accelerated Networking on VMs through the Azure portal, see [Manage Accelerated Networking through the portal](#manage-accelerated-networking-through-the-portal).
21
21
22
-
To use Azure CLI to create a Linux VM with Accelerated Networking enabled, see [Use Azure CLI to create a Linux VM with Accelerated Networking](create-vm-accelerated-networking-cli.md).
22
+
To use Azure CLI to create a Linux or Windows VM with Accelerated Networking enabled, see [Use Azure CLI to create a VM with Accelerated Networking](create-vm-accelerated-networking-cli.md).
23
23
24
24
## Prerequisites
25
25
@@ -31,7 +31,7 @@ To use Azure CLI to create a Linux VM with Accelerated Networking enabled, see [
31
31
32
32
## Create a VM with Accelerated Networking
33
33
34
-
In the following examples, replace the example parameters such as `<myResourceGroup>`, `<myNic>`, and `<myVm>` with your own values.
34
+
In the following examples, you can replace the example parameters such as `<myResourceGroup>`, `<myNic>`, and `<myVm>` with your own values.
35
35
36
36
### Create a virtual network
37
37
@@ -135,7 +135,7 @@ In the following examples, replace the example parameters such as `<myResourceGr
1. Use [Set-AzVMOperatingSystem](/powershell/module/az.compute/set-azvmoperatingsystem) and [Set-AzVMSourceImage](/powershell/module/az.compute/set-azvmsourceimage) to create the rest of the VM configuration. The following example creates a Windows Server 2019 VM:
138
+
1. Use [Set-AzVMOperatingSystem](/powershell/module/az.compute/set-azvmoperatingsystem) and [Set-AzVMSourceImage](/powershell/module/az.compute/set-azvmsourceimage) to create the rest of the VM configuration. The following example creates a Windows Server 2019 Datacenter VM:
Copy file name to clipboardExpand all lines: articles/virtual-network/virtual-network-network-interface.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,17 +20,20 @@ A VM you create in the Azure portal has one NIC with default settings. You can c
20
20
21
21
# [Portal](#tab/azure-portal)
22
22
23
-
To run the procedures in this article, you need the following prerequisites:
23
+
You need the following prerequisites:
24
24
25
25
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
26
26
- An existing Azure virtual network. To create one, see [Quickstart: Create a virtual network by using the Azure portal](quick-create-portal.md).
27
-
- To run the following procedures, sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
28
27
29
-
In the procedures, you can replace the example names with your own values.
28
+
To run the procedures in this article:
29
+
30
+
- Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
31
+
32
+
- Replace the placeholders in the examples with your own values.
30
33
31
34
# [Azure CLI](#tab/azure-cli)
32
35
33
-
To run the examples in this article, you need the following prerequisites:
36
+
To run the commands in this article, you need the following prerequisites:
34
37
35
38
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
36
39
- An existing Azure virtual network. To create one, see [Quickstart: Create a virtual network by using Azure CLI](quick-create-cli.md).
@@ -45,11 +48,11 @@ You can run the commands either in the [Azure Cloud Shell](/azure/cloud-shell/ov
45
48
46
49
Run [az login](/cli/azure/reference-index#az-login) to connect to Azure. For more information, see [Sign in with Azure CLI](/cli/azure/authenticate-azure-cli).
47
50
48
-
In the following code examples, you can replace the example placeholder names with your own values.
51
+
In the following procedures, you can replace the example placeholder names with your own values.
49
52
50
53
# [PowerShell](#tab/azure-powershell)
51
54
52
-
To run the procedures in this article, you need the following prerequisites:
55
+
To run the commands in this article, you need the following prerequisites:
53
56
54
57
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
55
58
- An existing Azure virtual network. To create one, see [Quickstart: Create a virtual network by using Azure PowerShell](quick-create-powershell.md).
@@ -64,7 +67,7 @@ You can run the commands either in the [Azure Cloud Shell](/azure/cloud-shell/ov
64
67
65
68
Then run `Connect-AzAccount` to connect to Azure. For more information, see [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
66
69
67
-
In the following code examples, you can replace the example placeholder names with your own values.
70
+
In the following procedures, you can replace the example placeholder names with your own values.
0 commit comments