Preview: Deploy VMs to proximity placement groups using Azure CLI

To get VMs as close as possible, achieving the lowest possible latency, you should deploy them within a proximity placement group.

A proximity placement group is a logical grouping used to make sure that Azure compute resources are physically located close to each other. Proximity placement groups are useful for workloads where low latency is a requirement.

Important

Proximity Placement Groups is currently in public preview. This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

Proximity placement groups are not available in these regions during the preview: Japan East, Australia East and India Central.

Create the proximity placement group

Create a proximity placement group using az ppg create.

az group create --name myPPGGroup --location westus
az ppg create \
   -n myPPG \
   -g myPPGGroup \
   -l westus \
   -t standard 

List proximity placement groups

You can list all of your proximity placement groups using az ppg list.

az ppg list -o table

Create a VM

Create a VM within the proximity placement group using new az vm.

az vm create \
   -n myVM \
   -g myPPGGroup \
   --image UbuntuLTS \
   --ppg myPPG  \
   --generate-ssh-keys \
   --size Standard_D1_v2  \
   -l westus

You can see the VM in the proximity placement group using az ppg show.

az ppg show --name myppg --resource-group myppggroup --query "virtualMachines"

Availability Sets

You can also create an availability set in your proximity placement group. Use the same --ppg parameter with az vm availability-set create to create an availability set and all of the VMs in the availability set will also be created in the same proximity placement group.

Scale sets

You can also create a scale set in your proximity placement group. Use the same --ppg parameter with az vmss create to create a scale set and all of the instances will be created in the same proximity placement group.

Next steps

Learn more about the Azure CLI commands for proximity placement groups.