Skip to content

Commit 4c8eb76

Browse files
committed
add windows machine
1 parent edf6638 commit 4c8eb76

File tree

3 files changed

+102
-25
lines changed

3 files changed

+102
-25
lines changed

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

Lines changed: 86 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
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.
44
services: virtual-network
55
author: asudbring
66
manager: gedegrac
@@ -12,9 +12,9 @@ ms.date: 03/20/2023
1212
ms.author: allensu
1313
ms.custom: fasttrack-edit, devx-track-azurecli
1414
---
15-
# Use Azure CLI to create a Linux VM with Accelerated Networking
15+
# Use Azure CLI to create a VM with Accelerated Networking
1616

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.
1818

1919
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).
2020

@@ -27,17 +27,17 @@ To use Azure PowerShell to create a Windows VM with Accelerated Networking enabl
2727

2828
## Create a VM with Accelerated Networking
2929

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.
3131

3232
### Create a virtual network
3333

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).
3535

3636
```azurecli
3737
az group create --name <myResourceGroup> --location <myAzureRegion>
3838
```
3939

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:
4141

4242
```azurecli
4343
az network vnet create \
@@ -50,15 +50,34 @@ In the following examples, replace the example parameters such as `<myResourceGr
5050

5151
### Create a network security group
5252

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).
5454

5555
```azurecli
5656
az network nsg create \
5757
--resource-group <myResourceGroup> \
5858
--name <myNsg>
5959
```
6060

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)
6281

6382
```azurecli
6483
az network nsg rule create \
@@ -75,17 +94,18 @@ In the following examples, replace the example parameters such as `<myResourceGr
7594
--destination-port-range 22
7695
```
7796

97+
---
7898
### Create a network interface with Accelerated Networking
7999

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.
81101

82102
```azurecli
83103
az network public-ip create \
84104
--name <myPublicIp> \
85105
--resource-group <myResourceGroup>
86106
```
87107

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.
89109

90110
```azurecli
91111
az network nic create \
@@ -100,7 +120,24 @@ In the following examples, replace the example parameters such as `<myResourceGr
100120

101121
### Create a VM and attach the NIC
102122

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)
104141

105142
The following example creates a VM with the UbuntuLTS OS image and a size that supports Accelerated Networking, Standard_DS4_v2.
106143

@@ -115,6 +152,8 @@ az vm create \
115152
--nics <myNic>
116153
```
117154

155+
---
156+
118157
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.
119158

120159
```output
@@ -132,6 +171,39 @@ After the VM is created, you get output similar to the following example. Take n
132171

133172
## Confirm that accelerated networking is enabled
134173

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+
![Mellanox ConnectX-3 Virtual Function Ethernet Adapter, new network adapter for accelerated networking, Device Manager](./media/create-vm-accelerated-networking/device-manager.png)
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+
135207
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.
136208

137209
```bash
@@ -177,6 +249,8 @@ You must run an application over the synthetic NIC to guarantee that the applica
177249

178250
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).
179251

252+
---
253+
180254
<a name="enable-accelerated-networking-on-existing-vms"></a>
181255
## Manage Accelerated Networking on existing VMs
182256

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Use PowerShell to create a Windows VM with Accelerated Networking
2+
title: Use PowerShell to create a VM with Accelerated Networking
33
description: Use Azure PowerShell to create and manage Windows virtual machines that have Accelerated Networking enabled for improved network performance.
44
services: virtual-network
55
author: asudbring
@@ -13,13 +13,13 @@ ms.date: 03/20/2023
1313
ms.author: allensu
1414
---
1515

16-
# Use Azure PowerShell to create a Windows VM with Accelerated Networking
16+
# Use Azure PowerShell to create a VM with Accelerated Networking
1717

1818
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.
1919

2020
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).
2121

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).
2323

2424
## Prerequisites
2525

@@ -31,7 +31,7 @@ To use Azure CLI to create a Linux VM with Accelerated Networking enabled, see [
3131

3232
## Create a VM with Accelerated Networking
3333

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.
3535

3636
### Create a virtual network
3737

@@ -135,7 +135,7 @@ In the following examples, replace the example parameters such as `<myResourceGr
135135
$vmConfig = New-AzVMConfig -VMName "<myVm>" -VMSize "Standard_DS4_v2"
136136
```
137137

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 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:
139139

140140
```azurepowershell
141141
$vmConfig = Set-AzVMOperatingSystem -VM $vmConfig `
@@ -231,7 +231,7 @@ You can enable Accelerated Networking on an existing VM. The VM must meet the fo
231231
Start-AzVM -ResourceGroup "<myResourceGroup>" -Name "<myVM>"
232232
```
233233

234-
### Virtual Machine Scale Sets
234+
### Enable Accelerated Networking on Virtual Machine Scale Sets
235235

236236
Azure Virtual Machine Scale Sets is slightly different but follows the same workflow.
237237

articles/virtual-network/virtual-network-network-interface.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@ A VM you create in the Azure portal has one NIC with default settings. You can c
2020

2121
# [Portal](#tab/azure-portal)
2222

23-
To run the procedures in this article, you need the following prerequisites:
23+
You need the following prerequisites:
2424

2525
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2626
- 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.
2827

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.
3033

3134
# [Azure CLI](#tab/azure-cli)
3235

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:
3437

3538
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
3639
- 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
4548

4649
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).
4750

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.
4952

5053
# [PowerShell](#tab/azure-powershell)
5154

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:
5356

5457
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
5558
- 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
6467

6568
Then run `Connect-AzAccount` to connect to Azure. For more information, see [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
6669

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.
6871

6972
---
7073

0 commit comments

Comments
 (0)