Skip to content

Commit 7c11427

Browse files
committed
fixes
1 parent dbe665c commit 7c11427

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

articles/virtual-network/create-virtual-machine-accelerated-networking.md

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -465,72 +465,6 @@ Accelerated networking is enabled in the portal during virtual machine creation.
465465

466466
### [PowerShell](#tab/powershell)
467467

468-
1. Use [Get-Credential](/powershell/module/microsoft.powershell.security/get-credential) to set a user name and password for the VM and store them in the `$cred` variable.
469-
470-
```azurepowershell
471-
$cred = Get-Credential
472-
```
473-
474-
1. 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).
475-
476-
```azurepowershell
477-
$vmConfigParams = @{
478-
VMName = "vm-1"
479-
VMSize = "Standard_DS4_v2"
480-
}
481-
$vmConfig = New-AzVMConfig @vmConfigParams
482-
```
483-
484-
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 Ubuntu Server virtual machine:
485-
486-
```azurepowershell
487-
$osParams = @{
488-
VM = $vmConfig
489-
ComputerName = "vm-1"
490-
Credential = $cred
491-
ProvisionVMAgent = $true
492-
EnableAutoUpdate = $true
493-
}
494-
$vmConfig = Set-AzVMOperatingSystem @osParams -Linux
495-
496-
$imageParams = @{
497-
VM = $vmConfig
498-
PublisherName = "Canonical"
499-
Offer = "ubuntu-24_04-lts"
500-
Skus = "server"
501-
Version = "latest"
502-
}
503-
$vmConfig = Set-AzVMSourceImage @imageParams
504-
```
505-
506-
1. Use [Add-AzVMNetworkInterface](/powershell/module/az.compute/add-azvmnetworkinterface) to attach the NIC that you previously created to the VM.
507-
508-
```azurepowershell
509-
# Get the network interface object
510-
$nicParams = @{
511-
ResourceGroupName = "test-rg"
512-
Name = "nic-1"
513-
}
514-
$nic = Get-AzNetworkInterface @nicParams
515-
516-
$vmConfigParams = @{
517-
VM = $vmConfig
518-
Id = $nic.Id
519-
}
520-
$vmConfig = Add-AzVMNetworkInterface @vmConfigParams
521-
```
522-
523-
1. Use [New-AzVM](/powershell/module/az.compute/new-azvm) to create the VM with Accelerated Networking enabled.
524-
525-
```azurepowershell
526-
$vmParams = @{
527-
VM = $vmConfig
528-
ResourceGroupName = "test-rg"
529-
Location = "eastus2"
530-
}
531-
New-AzVM @vmParams
532-
```
533-
534468
### [CLI](#tab/cli)
535469

536470
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](/azure/virtual-machines/sizes).

0 commit comments

Comments
 (0)