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-virtual-machine-accelerated-networking.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -374,7 +374,11 @@ Accelerated networking is enabled in the portal during virtual machine creation.
374
374
Use [New-AzNetworkInterface](/powershell/module/az.Network/New-azNetworkInterface) to create a network interface (NIC) with Accelerated Networking enabled, and assign the public IP address to the NIC.
@@ -471,6 +475,9 @@ Use [Get-Credential](/powershell/module/microsoft.powershell.security/get-creden
471
475
$cred = Get-Credential
472
476
```
473
477
478
+
> [!NOTE]
479
+
> A username is required for the VM. The password is optional and won't be used if set. SSH key configuration is recommended for Linux VMs.
480
+
474
481
Use [New-AzVMConfig](/powershell/module/az.compute/new-azvmconfig) to define a VM with a VM size that supports accelerated networking, as listed in [Windows Accelerated Networking](https://azure.microsoft.com/updates/accelerated-networking-in-expanded-preview). For a list of all Windows VM sizes and characteristics, see [Windows VM sizes](/azure/virtual-machines/sizes).
Use [New-AzVM](/powershell/module/az.compute/new-azvm) to create the VM with Accelerated Networking enabled.
528
+
Use [New-AzVM](/powershell/module/az.compute/new-azvm) to create the VM with Accelerated Networking enabled. The command will generate SSH keys for the virtual machine for login. Make note of the location of the private key. The private key is needed in later steps for connecting to the virtual machine with Azure Bastion.
522
529
523
530
```azurepowershell
524
531
$vmParams = @{
525
532
VM = $vmConfig
526
533
ResourceGroupName = "test-rg"
527
534
Location = "eastus2"
535
+
SshKeyName = "ssh-key"
528
536
}
529
-
New-AzVM @vmParams
537
+
New-AzVM @vmParams -GenerateSshKey
530
538
```
531
539
532
540
### [CLI](#tab/cli)
533
541
534
542
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. Ensure you select a VM size and distribution 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](/azure/virtual-machines/sizes).
535
543
536
544
537
-
The following example creates a VM with a size that supports Accelerated Networking, Standard_DS4_v2.
545
+
The following example creates a VM with a size that supports Accelerated Networking, Standard_DS4_v2. The command will generate SSH keys for the virtual machine for login. Make note of the location of the private key. The private key is needed in later steps for connecting to the virtual machine with Azure Bastion.
1. On the VM's **Overview** page, select**Connect**then**Connect via Bastion**.
589
597
590
-
1. Enter the username and password you used when you created the VM, and then select **Connect**.
598
+
1. In the Bastion connection screen, change **Authentication Type** to **SSH Private Key from Local File**.
599
+
600
+
1. Enter the **Username** that you used when creating the virtual machine. In this example, the user is named **azureuser**, replace with the username you created.
601
+
602
+
1. In **Local File**, selectthe folder icon and browse to the private key file that was generated when you created the VM. The private key file is typically named `id_rsa` or `id_rsa.pem`.
603
+
604
+
1. Select **Connect**.
591
605
592
606
1. A new browser window opens with the Bastion connection to your VM.
0 commit comments