4.8 Ubuntu Azure CLI VM

20220614

I usually have a single resource group for my VM and the VM and resource group have the same name. Hence the examples below use a resource group and VM named aidev.

To list the resource details:

az resource list --name aidev

To list the virtual machines within the subscription:

az vm list --output table --show-details

To start a virtual machine:

az vm start --resource-group aidev --name aidev

To deallocate a virtual machine:

az vm deallocate --resource-group aidev --name aidev

Note that the stop command of az provides the following message:

About to power off the specified VM...
It will continue to be billed. To deallocate a VM, run: az vm deallocate.

The VM continues to be billed. Unlike in the web based portal where Stop does deallocate the resources. So be sure to deallocate (rather than stop) to avoid billing.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0