Restart Azure VM
Last updated
Last updated
The Restart VM action is designed to restart a specific virtual machine in Azure. By using the context of the current state, this action fetches an Azure access token and issues a restart command to the specified VM. The action ensures that the VM is restarted successfully and provides feedback on the process.
By default, this Action is disabled and when enabled will appear for all resources that have resource type azurerm_virtual_machine
. If you want to display this action only for certain resources, please check display criteria.
This action requires the following variables as Workspace Variables or Global Variables in the Workspace Organization:
ARM_CLIENT_ID
: The Azure Client ID used for authentication.
ARM_CLIENT_SECRET
: The Azure Client Secret used for authentication.
ARM_TENANT_ID
: The Azure Tenant ID associated with your subscription.
ARM_SUBSCRIPTION_ID
: The Azure Subscription ID where the VM is located.
The Client ID should have at least Virtual Machine Contributor access on the VM or resource group.
Navigate to the Workspace Overview
or the Visual State
and click on a resource name.
In the Resource Drawer, click the "Restart" button.
The VM will be restarted, and a success or error message will be displayed.