Skip to content

Commit 05d15f2

Browse files
committed
review cx
1 parent a81f69d commit 05d15f2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

articles/devtest-labs/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
href: devtest-lab-store-secrets-in-key-vault.md
140140
- name: Attach and detach data disks
141141
href: devtest-lab-attach-detach-data-disk.md
142-
- name: Start VMs using Automation runbooks
142+
- name: Define start order for lab VMs
143143
href: start-machines-use-automation-runbooks.md
144144
- name: Import virtual machines from another lab
145145
href: import-virtual-machines-from-another-lab.md

articles/devtest-labs/devtest-lab-vm-powershell.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Create a lab virtual machine by using Azure PowerShell
33
description: Learn how to use Azure PowerShell to create and manage virtual machines in Azure DevTest Labs.
44
ms.topic: how-to
5-
ms.date: 03/16/2022
5+
ms.date: 03/17/2022
66
ms.custom: devx-track-azurepowershell
77
---
88

@@ -112,7 +112,7 @@ Save the preceding script in a file named *Create-LabVirtualMachine.ps1*. Run th
112112

113113
This section shows how to get the specific properties for the type of VM you want to create. You can get the properties from an Azure Resource Manager (ARM) template in the Azure portal, or by calling the DevTest Labs Azure REST API.
114114

115-
### Get VM properties from the Azure portal
115+
### Use the Azure portal to get VM properties
116116

117117
Creating a VM in the Azure portal generates an Azure Resource Manager (ARM) template that shows the VM's properties. Once you choose a VM base, you can see the ARM template and get the properties without actually creating the VM. This method is the easiest way to get the JSON VM description if you don't already have a lab VM of that type.
118118

@@ -167,7 +167,7 @@ Creating a VM in the Azure portal generates an Azure Resource Manager (ARM) temp
167167

168168

169169

170-
### Get VM properties by using the DevTest Labs Azure REST API
170+
### Use the DevTest Labs Azure REST API to get VM properties
171171

172172
You can also call the DevTest Labs REST API to get the properties of existing lab VMs. You can use those properties to create more lab VMs of the same types.
173173

articles/devtest-labs/start-machines-use-automation-runbooks.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: Start machines in sequence with an Azure Automation runbook
2+
title: Define VM start order with Azure Automation
33
description: Learn how to start virtual machines in a specific order by using Azure Automation runbooks in Azure DevTest Labs.
44
ms.topic: how-to
5-
ms.date: 03/15/2022
5+
ms.date: 03/17/2022
66
ms.custom: devx-track-azurepowershell
77
---
88

9-
# Start DevTest Labs VMs in sequence with an Azure Automation runbook
9+
# Define the startup order for DevTest Lab VMs with Azure Automation
1010

1111
This article explains how to start up DevTest Labs virtual machines (VMs) in a specific order by using a PowerShell runbook in Azure Automation. The PowerShell script uses tags on lab VMs, so you can change the startup order without having to change the script.
1212

1313
The DevTest Labs [autostart](devtest-lab-set-lab-policy.md#set-autostart) feature can configure lab VMs to start automatically at a specified time. However, sometimes you might want lab VMs to start in a specific sequence. For example, if a jumpbox VM in a lab is the access point to the other VMs, the jumpbox VM must start before the other VMs.
1414

1515
## Prerequisites
1616

17-
- Apply the tag **StartupOrder** to all lab VMs with an appropriate startup value, 0 through 10. Designate any machines that don't need starting as -1.
17+
- [Create and apply a tag](devtest-lab-add-tag.md) called **StartupOrder** to all lab VMs with an appropriate startup value, 0 through 10. Designate any machines that don't need starting as -1.
1818

1919
- Create an Azure Automation account by following instructions in [Create a standalone Azure Automation account](/azure/automation/automation-create-standalone-account). Choose the **Run As Accounts** option when you create the account.
2020

@@ -24,7 +24,7 @@ The DevTest Labs [autostart](devtest-lab-set-lab-policy.md#set-autostart) featur
2424
1. On the **Runbooks** page, select **Create a runbook**.
2525
1. Follow the instructions in [Create an Automation PowerShell runbook using managed identity](../automation/learn/powershell-runbook-managed-identity.md) to create a PowerShell runbook. Populate the runbook with the following PowerShell script.
2626

27-
### PowerShell script
27+
## Prepare the PowerShell script
2828

2929
The following script takes the subscription name and the lab name as parameters. The script gets all the VMs in the lab and parses their tag information to create a list of VM names and their startup order. The script walks through the list in order and starts the VMs.
3030

@@ -128,7 +128,7 @@ While ($current -le 10) {
128128
}
129129
```
130130

131-
## Alternatives
131+
## Run the PowerShell script
132132

133133
- To run this script daily, [create a schedule](../automation/shared-resources/schedules.md#create-a-schedule) in the Automation Account, and [link the schedule to the runbook](../automation/shared-resources/schedules.md#link-a-schedule-to-a-runbook).
134134

0 commit comments

Comments
 (0)