title | description | services | ms.subservice | ms.date | ms.topic |
---|---|---|---|---|---|
Remove Azure Automation Start/Stop VMs during off-hours overview |
This article describes how to remove the Start/Stop VMs during off-hours feature and unlink an Automation account from the Log Analytics workspace. |
automation |
process-automation |
04/15/2021 |
conceptual |
After you enable the Start/Stop VMs during off-hours feature to manage the running state of your Azure VMs, you may decide to stop using it. Removing this feature can be done using one of the following methods based on the supported deployment models:
- Delete the resource group containing the Automation account and linked Azure Monitor Log Analytics workspace, each dedicated to support this feature.
- Unlink the Log Analytics workspace from the Automation account and delete the Automation account dedicated for this feature.
- Delete the feature from an Automation account and linked workspace that are supporting other management and monitoring objectives.
Deleting this feature only removes the associated runbooks, it doesn't delete the schedules or variables that were created during deployment or any custom-defined ones created after.
Note
Before proceeding, verify there aren't any Resource Manager locks applied at the subscription, resource group, or resource which prevents accidental deletion or modification of critical resources. When you deploy the Start/Stop VMs during off-hours solution, it sets the lock level to CanNotDelete against several dependent resources in the Automation account (specifically its runbooks and variables). Any locks need to be removed before you can delete the Automation account.
To delete the resource group, follow the steps outlined in the Azure Resource Manager resource group and resource deletion article.
To delete your Automation account dedicated to Start/Stop VMs during off-hours, perform the following steps.
-
Sign in to Azure at https://portal.azure.com.
-
Navigate to your Automation account, and select Linked workspace under Related resources.
-
Select Go to workspace.
-
Click Solutions under General.
-
On the Solutions page, select Start-Stop-VM[Workspace].
-
On the VMManagementSolution[Workspace] page, select Delete from the menu.
-
While the information is verified and the feature is deleted, you can track the progress under Notifications, chosen from the menu. You're returned to the Solutions page after the removal process.
There are two options for unlinking the Log Analytics workspace from your Automation account. You can perform this process from the Automation account or from the linked workspace.
To unlink from your Automation account, perform the following steps.
-
In the Azure portal, select Automation Accounts.
-
Open your Automation account and select Linked workspace under Related Resources on the left.
-
On the Unlink workspace page, select Unlink workspace and respond to prompts.
While it attempts to unlink the Log Analytics workspace, you can track the progress under Notifications from the menu.
To unlink from the workspace, perform the following steps.
-
In the Azure portal, select Log Analytics workspaces.
-
From the workspace, select Automation Account under Related Resources.
-
On the Automation Account page, select Unlink account and respond to prompts.
While it attempts to unlink the Automation account, you can track the progress under Notifications from the menu.
-
In the Azure portal, select Automation Accounts.
-
Open your Automation account and select Delete from the menu.
While the information is verified and the account is deleted, you can track the progress under Notifications, chosen from the menu.
To delete Start/Stop VMs during off-hours from your Automation account, perform the following steps. The Automation account and Log Analytics workspace aren't deleted as part of this process. If you don't want to keep the Log Analytics workspace, you must manually delete it. For more information about deleting your workspace, see Delete and recover Azure Log Analytics workspace.
-
Navigate to your Automation account, and select Linked workspace under Related resources.
-
Select Go to workspace.
-
Click Solutions under General.
-
On the Solutions page, select Start-Stop-VM[Workspace].
-
On the VMManagementSolution[Workspace] page, select Delete from the menu.
-
In the Delete Solution window, confirm that you want to delete the feature.
-
While the information is verified and the feature is deleted, you can track the progress under Notifications, chosen from the menu. You're returned to the Solutions page after the removal process.
-
If you don't want to keep the resources created by the feature or by you afterwards (such as, variables, schedules, etc.), you have to manually delete them from the account.
To re-enable this feature, see Enable Start/Stop during off-hours.