az-vm

Manage virtual machines in Azure.

TLDR

List details of available Virtual Machines

$ az vm list
copy

Create an UbuntuServer 18.04 LTS Virtual Machine and generate ssh keys

$ az vm create --resource-group [rg] --name [vm_name] --image [Canonical:UbuntuServer:18.04-LTS:latest] --admin-user [azureuser] --generate-ssh-keys
copy

Stop a Virtual Machine

$ az vm stop --resource-group [rg] --name [vm_name]
copy

Deallocate a Virtual Machine

$ az vm deallocate --resource-group [rg] --name [vm_name]
copy

Start a Virtual Machine

$ az vm start --resource-group [rg] --name [vm_name]
copy

Restart a Virtual Machine

$ az vm restart --resource-group [rg] --name [vm_name]
copy

List VM images available in the Azure Marketplace

$ az vm image list
copy

Copied to clipboard
realt