You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This article tells how to enable the Start/Stop VMs during off-hours feature for your Azure VMs.
4
4
services: automation
5
5
ms.subservice: process-automation
6
-
ms.date: 04/01/2020
6
+
ms.date: 05/18/2021
7
7
ms.topic: conceptual
8
8
---
9
9
@@ -15,12 +15,12 @@ Perform the steps in this topic in sequence to enable the Start/Stop VMs during
15
15
>To use this feature with classic VMs, you need a Classic Run As account, which is not created by default. See [Create a Classic Run As account](automation-create-standalone-account.md#create-a-classic-run-as-account).
16
16
>
17
17
18
-
## Create resources for the feature
18
+
## Enable and configure
19
19
20
20
1. Sign in to the Azure [portal](https://portal.azure.com).
21
21
2. Search for and select **Automation Accounts**.
22
-
3. On the Automation Accounts page, select your Automation account from the list.
23
-
4. From the Automation account, select **Start/Stop VM** under **Related Resources**. From here, you can click **Learn more about and enable the solution**. If you already have the feature deployed, you can click **Manage the solution** and finding it in the list.
22
+
3. On the **Automation Accounts** page, select your Automation account from the list.
23
+
4. From the Automation account, select **Start/Stop VM** under **Related Resources**. From here, you can click **Learn more about and enable the solution**. If you already have the feature deployed, you can click **Manage the solution** and find it in the list.
24
24
25
25

26
26
@@ -31,74 +31,52 @@ Perform the steps in this topic in sequence to enable the Start/Stop VMs during
With the resource created, the Add Solution page appears. You're prompted to configure the feature before you can import it into your Automation subscription. See [Configure Start/Stop VMs during off-hours](automation-solution-vm-management-config.md).
34
+
With the resource created, the Add Solution page appears. You're prompted to configure the feature before you can import it into your Automation account.
1. On the Add Solution page, select **Workspace**. Select a Log Analytics workspace that's linked to the Azure subscription used by the Automation account.
43
-
44
-
2. If you don't have a workspace, select **Create New Workspace**. On the Log Analytics workspace page, perform the following steps:
45
-
46
-
- Specify a name for the new Log Analytics workspace, such as **ContosoLAWorkspace**.
47
-
- Select a **Subscription** to link to by selecting from the dropdown list, if the default selected is not appropriate.
48
-
- For **Resource Group**, you can create a new resource group or select an existing one.
49
-
- Select a **Location**.
50
-
- Select a **Pricing tier**. Choose the **Per GB (Standalone)** option. Azure Monitor logs have updated [pricing](https://azure.microsoft.com/pricing/details/log-analytics/) and the Per GB tier is the only option.
38
+
6. On the **Add Solution** page, select **Workspace**. Select an existing Log Analytics workspace from the list. If there isn't an Automation account in the same supported region as the workspace, you can create a new Automation account in the next step.
51
39
52
40
> [!NOTE]
53
41
> When enabling features, only certain regions are supported for linking a Log Analytics workspace and an Automation account. For a list of the supported mapping pairs, see [Region mapping for Automation account and Log Analytics workspace](how-to/region-mappings.md).
54
42
55
-
3. After providing the required information on the Log Analytics workspace page, click **Create**. You can track its progress under **Notifications** from the menu, which returns you to the Add Solution page when done.
56
-
57
-
## Add Automation account
58
-
59
-
Access the Add Solution page again and select **Automation account**. You can select an existing Automation account that not already linked to a Log Analytics workspace. If you're creating a new Log Analytics workspace, you can create a new Automation account to associate with it. Select an existing Automation account or click **Create an Automation account**, and on the Add Automation account page, provide the the name of the Automation account in the **Name** field.
60
-
61
-
All other options are automatically populated, based on the Log Analytics workspace selected. You can't modify these options. An Azure Run As account is the default authentication method for the runbooks included with the feature.
62
-
63
-
After you click **OK**, the configuration options are validated and the Automation account is created. You can track its progress under **Notifications** from the menu.
43
+
7. On the **Add Solution page** if there isn't an Automation account available in the supported region as the workspace, select **Automation account**. You can create a new Automation account to associate with it by selecting **Create an Automation account**, and on the **Add Automation account** page, provide the the name of the Automation account in the **Name** field.
64
44
65
-
## Define feature parameters
45
+
All other options are automatically populated, based on the Log Analytics workspace selected. You can't modify these options. An Azure Run As account is the default authentication method for the runbooks included with the feature.
46
+
47
+
After you click **OK**, the configuration options are validated and the Automation account is created. You can track its progress under **Notifications** from the menu.
66
48
67
-
1. On the Add Solution page, select **Configuration**. The Parameters page appears.
49
+
8. On the Add Solution page, select **Configure parameters**. The **Parameters** page appears.
68
50
69
51

70
52
71
-
2. Specify a value for the **Target ResourceGroup Names** field. The field defines group names that contain VMs for the feature to manage. You can enter more than one name and separate the names using commas (values are not case-sensitive). Using a wildcard is supported if you want to target VMs in all resource groups in the subscription. The values are stored in the `External_Start_ResourceGroupNames` and `External_Stop_ResourceGroupNames` variables.
53
+
9. Specify a value for the **Target ResourceGroup Names** field. The field defines group names that contain VMs for the feature to manage. You can enter more than one name and separate the names using commas (values are not case-sensitive). Using a wildcard is supported if you want to target VMs in all resource groups in the subscription. The values are stored in the `External_Start_ResourceGroupNames` and `External_Stop_ResourceGroupNames` variables.
72
54
73
55
> [!IMPORTANT]
74
56
> The default value for **Target ResourceGroup Names** is a *****. This setting targets all VMs in a subscription. If you don't want the feature to target all the VMs in your subscription, you must provide a list of resource group names before selecting a schedule.
75
57
76
-
3. Specify a value for the **VM Exclude List (string)** field. This value is the name of one or more virtual machines from the target resource group. You can enter more than one name and separate the names using commas (values are not case-sensitive). Using a wildcard is supported. This value is stored in the `External_ExcludeVMNames` variable.
58
+
10. Specify a value for the **VM Exclude List (string)** field. This value is the name of one or more virtual machines from the target resource group. You can enter more than one name and separate the names using commas (values are not case-sensitive). Using a wildcard is supported. This value is stored in the `External_ExcludeVMNames` variable.
77
59
78
-
4. Use the **Schedule** field to select a schedule for VM management by the feature. Select a start date and time for your schedule, to create a recurring daily schedule starting at the chosen time. Selecting a different region is not available. To configure the schedule to your specific time zone after configuring the feature, see [Modify the startup and shutdown schedules](automation-solution-vm-management-config.md#modify-the-startup-and-shutdown-schedules).
60
+
11. Use the **Schedule** field to select a schedule for VM management by the feature. Select a start date and time for your schedule to create a recurring daily schedule starting at the chosen time. Selecting a different region is not available. To configure the schedule to your specific time zone after configuring the feature, see [Modify the startup and shutdown schedules](automation-solution-vm-management-config.md#modify-the-startup-and-shutdown-schedules).
79
61
80
-
5. To receive email notifications from an [action group](../azure-monitor/alerts/action-groups.md), accept the default value of **Yes** in the **Email notifications** field, and provide a valid email address. If you select **No** but decide at a later date that you want to receive email notifications, you can update the action group that is created with valid email addresses separated by commas.
81
-
82
-
6. Enable the following alert rules:
62
+
12. To receive email notifications from an [action group](../azure-monitor/alerts/action-groups.md), accept the default value of **Yes** in the **Email notifications** field, and provide a valid email address. If you select **No** but decide at a later date that you want to receive email notifications, you can update the action group that is created with valid email addresses separated by commas. The following alert rules are created in the subscription:
83
63
84
64
-`AutoStop_VM_Child`
85
65
-`Scheduled_StartStop_Parent`
86
66
-`Sequenced_StartStop_Parent`
87
67
88
-
## Create alerts
89
-
90
-
Start/Stop VMs during off-hours doesn't include a predefined set of alerts. Review [Create log alerts with Azure Monitor](../azure-monitor/alerts/alerts-log.md) to learn how to create job failed alerts to support your DevOps or operational processes and procedures.
91
-
92
-
## Deploy the feature
68
+
13. After you have configured the initial settings required for the feature, click **OK** to close the **Parameters** page.
93
69
94
-
1. After you have configured the initial settings required for the feature, click **OK** to close the Parameters page.
95
-
96
-
2. Click **Create**. After all settings are validated, the feature deploys to your subscription. This process can take several seconds to finish, and you can track its progress under **Notifications** from the menu.
70
+
14. Click **Create**. After all settings are validated, the feature deploys to your subscription. This process can take several seconds to finish, and you can track its progress under **Notifications** from the menu.
97
71
98
72
> [!NOTE]
99
73
> If you have an Azure Cloud Solution Provider (Azure CSP) subscription, after deployment is complete, in your Automation account, go to **Variables** under **Shared Resources** and set the [External_EnableClassicVMs](automation-solution-vm-management.md#variables) variable to **False**. This stops the solution from looking for Classic VM resources.
100
74
75
+
## Create alerts
76
+
77
+
Start/Stop VMs during off-hours doesn't include a predefined set of Automation job alerts. Review [Forward job data to Azure Monitor Logs](automation-manage-send-joblogs-log-analytics.md#azure-monitor-log-records) to learn about log data forwarded from the Automation account related to the runbook job results and how to create job failed alerts to support your DevOps or operational processes and procedures.
78
+
101
79
## Next steps
102
80
103
81
* To set up the feature, see [Configure Stop/Start VMs during off-hours](automation-solution-vm-management-config.md).
104
-
* To resolve feature errors, see [Troubleshoot Start/Stop VMs during off-hours issues](troubleshoot/start-stop-vm.md).
82
+
* To resolve feature errors, see [Troubleshoot Start/Stop VMs during off-hours issues](troubleshoot/start-stop-vm.md).
description: This article describes the Start/Stop VMs during off-hours feature, which starts or stops VMs on a schedule and proactively monitor them from Azure Monitor Logs.
The Start/Stop VMs during off-hours feature start or stops enabled Azure VMs. It starts or stops machines on user-defined schedules, provides insights through Azure Monitor logs, and sends optional emails by using [action groups](../azure-monitor/alerts/action-groups.md). The feature can be enabled on both Azure Resource Manager and classic VMs for most scenarios.
14
14
15
+
> [!NOTE]
16
+
> Before you install this version, we would like you to know about the [next version](https://github.com/microsoft/startstopv2-deployments), which is in preview right now. This new version (V2) offers all the same functionality as this one, but is designed to take advantage of newer technology in Azure. It adds some of the commonly requested features from customers, such as multi-subscription support from a single Start/Stop instance.
17
+
15
18
This feature uses [Start-AzVm](/powershell/module/az.compute/start-azvm) cmdlet to start VMs. It uses [Stop-AzVM](/powershell/module/az.compute/stop-azvm) for stopping VMs.
16
19
17
20
> [!NOTE]
@@ -31,14 +34,11 @@ The following are limitations with the current feature:
31
34
- It manages VMs in any region, but can only be used in the same subscription as your Azure Automation account.
32
35
- It is available in Azure and Azure Government for any region that supports a Log Analytics workspace, an Azure Automation account, and alerts. Azure Government regions currently don't support email functionality.
33
36
34
-
> [!NOTE]
35
-
> Before you install this version, we would like you to know about the [next version](https://github.com/microsoft/startstopv2-deployments), which is in preview right now. This new version (V2) offers all the same functionality as this one, but is designed to take advantage of newer technology in Azure. It adds some of the commonly requested features from customers, such as multi-subscription support from a single Start/Stop instance.
36
-
37
37
## Prerequisites
38
38
39
39
- The runbooks for the Start/Stop VMs during off hours feature work with an [Azure Run As account](./automation-security-overview.md#run-as-accounts). The Run As account is the preferred authentication method because it uses certificate authentication instead of a password that might expire or change frequently.
40
40
41
-
- An [Azure Monitor Log Analytics workspace](../azure-monitor/logs/design-logs-deployment.md) that stores the runbook job logs and job stream results in a workspace to query and analyze. The Automation account can be linked to a new or existing Log Analytics workspace, and both resources need to be in the same resource group.
41
+
- An [Azure Monitor Log Analytics workspace](../azure-monitor/logs/design-logs-deployment.md) that stores the runbook job logs and job stream results in a workspace to query and analyze. The Automation account and Log Analytics workspace need to be in the same subscription and supported region. The workspace needs to already exist, you cannot create a new workspace during deployment of this feature.
42
42
43
43
We recommend that you use a separate Automation account for working with VMs enabled for the Start/Stop VMs during off-hours feature. Azure module versions are frequently upgraded, and their parameters might change. The feature isn't upgraded on the same cadence and it might not work with newer versions of the cmdlets that it uses. Before importing the updated modules into your production Automation account(s), we recommend you import them into a test Automation account to verify there aren't any compatibility issues.
44
44
@@ -75,7 +75,7 @@ To enable VMs for the Start/Stop VMs during off-hours feature using an existing
75
75
76
76
### Permissions for new Automation account and new Log Analytics workspace
77
77
78
-
You can enable VMs for the Start/Stop VMs during off-hours feature using a new Automation account and Log Analytics workspace. In this case, you need the permissions defined in the preceding section as well as the permissions defined in this section. You also require the following roles:
78
+
You can enable VMs for the Start/Stop VMs during off-hours feature using a new Automation account and Log Analytics workspace. In this case, you need the permissions defined in the previous section and the permissions defined in this section. You also require the following roles:
79
79
80
80
- Co-Administrator on subscription. This role is required to create the Classic Run As account if you are going to manage classic VMs. [Classic Run As accounts](automation-create-standalone-account.md#create-a-classic-run-as-account) are no longer created by default.
81
81
- Membership in the [Azure AD](../active-directory/roles/permissions-reference.md) Application Developer role. For more information on configuring Run As Accounts, see [Permissions to configure Run As accounts](automation-security-overview.md#permissions).
@@ -95,7 +95,7 @@ You can enable VMs for the Start/Stop VMs during off-hours feature using a new A
95
95
96
96
## Components
97
97
98
-
The Start/Stop VMs during off-hours feature include preconfigured runbooks, schedules, and integration with Azure Monitor logs. You can use these elements to tailor the startup and shutdown of your VMs to suit your business needs.
98
+
The Start/Stop VMs during off-hours feature include preconfigured runbooks, schedules, and integration with Azure Monitor Logs. You can use these elements to tailor the startup and shutdown of your VMs to suit your business needs.
0 commit comments