Azure CLI で Ubuntu のVMを起動/削除する
Azure CLI で Ubuntu のVMを起動/削除する手順を解説します。
サブスクリプションの指定(省略可)
az account set --subscription "******-******-******-******"
リソースグループの作成
az group create^
--name vm_resource_group^
--location japaneast
Ubuntu VM の起動
az vm create --location japaneast^
--resource-group vm_resource_group^
--name ubuntu-vm^
--image Canonical:0001-com-ubuntu-server-jammy:22_04-lts-gen2:latest^
--size Standard_B1ms^
--public-ip-address public_ip_01^
--public-ip-sku Standard^
--data-disk-delete-option Delete^
--os-disk-delete-option Delete^
--nic-delete-option Delete^
--nsg nsg_01^
--vnet-name vnet_01^
--priority Regular^
--nsg-rule SSH^
--admin-username admin01^
--admin-password SampleVM!123