-
Install Azure CLI Tools
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
-
Login
az login
// List location: az account list-locations
// List VM sizes: az vm list-sizes --location eastus --output table
az group create --name myResourceGroup --location eastus
az vm create \
--resource-group myResourceGroup \
--name myVM \
--image UbuntuLTS \
--admin-username azureuser \
--generate-ssh-keys
Create with a specific size
az vm create \
--resource-group myResourceGroupVM \
--name myVM3 \
--image UbuntuLTS \
--size Standard_F4s \
--generate-ssh-keys
Notes: --generate-ssh-keys has then in the local ~/.ssh
#Steps
- Get loacations from json file (manually remove unsupported locations)
- Iterate