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.
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"
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.
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.
Learn more about the Azure CLI commands for proximity placement groups.