Forrest logo
back to the az tool

az-vm:tldr:4881d

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

The command "az vm restart" is used to restart a virtual machine in Azure. Here's the breakdown of the command and its parameters:

  • "az" is the primary command to interact with Azure resources in the Azure CLI (Command-Line Interface).
  • "vm restart" is the sub-command specifically used to restart a virtual machine.
  • "--resource-group" specifies the resource group that the virtual machine belongs to. The value of "${rg}" is a placeholder for the actual name of the resource group.
  • "--name" specifies the name of the virtual machine to be restarted. The value of "${vm_name}" is a placeholder for the actual name of the virtual machine.

Essentially, this command restarts a virtual machine in Azure that is identified by the specified resource group and virtual machine name. Note that you need to provide the actual resource group and virtual machine names when executing this command.

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