首先,创建一个资源组:

az group create --name <name> --location <location>

然后,创建虚拟机:

az vm create \
  --resource-group <name> \
  --name <name> \
  --image Debian \
  --admin-user <username> \
  --admin-password <password> \
  --authentication-type password \
  --os-disk-size-gb 64 \
  --public-ip-address-allocation static \
  --public-ip-sku Standard \
  --size <server size>

屏幕截图2022-09-16下午3.322