Forrest logo
back to the az tool

az-vm:tldr:e34df

az-vm: Deallocate a Virtual Machine.
$ az vm deallocate --resource-group ${rg} --name ${vm_name}
try on your machine

The command "az vm deallocate" is used in the Azure CLI to deallocate (stop) a virtual machine. Here is what each part of the command means:

  • "az": It is the Azure CLI command-line tool.
  • "vm deallocate": This is the specific command to deallocate a virtual machine.
  • "--resource-group ${rg}": This flag specifies the resource group where the virtual machine exists. The "${rg}" is a variable that should be replaced with the actual resource group name.
  • "--name ${vm_name}": This flag specifies the name of the virtual machine you want to deallocate. "${vm_name}" is a variable that should be replaced with the actual name of the virtual machine you wish to stop.

In summary, this command is used to stop (deallocate) a virtual machine in Azure, by providing the resource group and the virtual machine name as parameters.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the az tool