Skip to content

Commit a78ff44

Browse files
author
Cynthia Nottingham
committed
Move into PPG
1 parent db69c91 commit a78ff44

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

articles/virtual-machines/windows/proximity-placement-groups.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
---
2-
title: Use proximity placement groups for Windows VMs
3-
description: Learn about creating and using proximity placement groups for Windows virtual machines in Azure.
4-
services: virtual-machines-windows
5-
author: cynthn
6-
manager: gwallace
7-
ms.service: virtual-machines-windows
2+
title: "PowerShell: Use proximity placement groups"
3+
description: Learn about creating and using proximity placement groups using Azure PowerShell.
4+
services: virtual-machines
5+
ms.service: virtual-machines
86

97
ms.topic: article
108
ms.tgt_pltfrm: vm-windows
119
ms.workload: infrastructure-services
12-
ms.date: 10/30/2019
10+
ms.date: 01/24/2020
1311
ms.author: cynthn
14-
12+
#pmcontact: zivr
1513
---
1614

1715
# Deploy VMs to proximity placement groups using PowerShell
@@ -68,6 +66,18 @@ Get-AzProximityPlacementGroup -ResourceId $ppg.Id |
6866
Format-Table -Property VirtualMachines -Wrap
6967
```
7068

69+
## Existing VM
70+
71+
You can also add an existing VM to a proximity placement group. You need to stop\deallocate the VM first, then update the VM and restart.
72+
73+
```azurepowershell-interactive
74+
Stop-AzVM -Name myVM -ResourceGroupName myResourceGroup
75+
$ppg = Get-AzProximityPlacementGroup -ResourceGroupName myPPGResourceGroup -Name myPPG
76+
$vm = Get-AzVM -ResourceGroupName myResourceGroup -Name myVM
77+
Update-AzVM -VM $vm -ResourceGroupName $vm.ResourceGroupName -ProximityPlacementGroupId $ppg.Id
78+
Restart-AzVM -Name myVM -ResourceGroupName myResourceGroup
79+
```
80+
7181
## Availability Sets
7282
You can also create an availability set in your proximity placement group. Use the same `-ProximityPlacementGroup` parameter with the [New-AzAvailabilitySet](/powershell/module/az.compute/new-azavailabilityset) cmdlet to create an availability set and all of the VMs created in the availability set will also be created in the same proximity placement group.
7383

0 commit comments

Comments
 (0)