Skip to content

Commit 0fe0400

Browse files
committed
edits
1 parent 8855fd2 commit 0fe0400

6 files changed

+46
-13
lines changed

articles/devtest-labs/deploy-nested-template-environments.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,28 @@ ms.date: 04/02/2025
1010
#customer intent: As a DevTest labs user, I want to learn about using nested templates to deploy environments so I can take advantage of their testing, reuse, and readability benefits.
1111
---
1212

13-
# DevTest Labs environments with nested templates
13+
# Nested templates in DevTest Labs environments
1414

15-
Azure DevTest Labs environments contain multiple infrastructure-as-a-service (IaaS) virtual machines (VMs) with platform-as-a-service (PaaS) resources installed. You can provision the PaaS and IaaS resources by using Azure Resource Manager (ARM) templates. This article shows an example of nesting templates to deploy an Azure DevTest Labs environment.
15+
Azure DevTest Labs *environments* consist of multiple infrastructure-as-a-service (IaaS) virtual machines (VMs) with platform-as-a-service (PaaS) resources installed. You can provision these PaaS and IaaS resources by using Azure Resource Manager (ARM) templates.
1616

17-
A *nested deployment* runs secondary ARM templates from within a main template. Decomposing a deployment into a set of targeted, purpose-specific templates provides testing, reuse, and readability benefits. For general information about nested templates, including code samples, see [Use linked and nested templates when deploying Azure resources](/azure/azure-resource-manager/templates/linked-templates).
17+
A *nested deployment* runs secondary ARM templates from within a main template. This article shows an example of using nested templates to deploy a DevTest Labs environment.
1818

19-
In DevTest Labs, you can store ARM templates in a Git repository that you link to a lab. When you use a linked repository template to create a new DevTest Labs environment, the deployment copies the template files into the lab's Azure Storage container.
19+
Decomposing a deployment into a set of targeted, purpose-specific templates provides testing, reuse, and readability benefits. For general information about nested templates, including code samples, see [Use linked and nested templates when deploying Azure resources](/azure/azure-resource-manager/templates/linked-templates).
2020

2121
[!INCLUDE [direct-azure-deployment-environments](includes/direct-azure-deployment-environments.md)]
2222

2323
## Nested template deployment with Visual Studio
2424

25+
In DevTest Labs, you can store ARM templates in a Git repository that you link to a lab. When you use a linked repository template to create a new DevTest Labs environment, the deployment copies the template files into the lab's Azure Storage container.
26+
2527
The Azure Resource Group project template in Visual Studio makes it easy to develop and debug nested templates. When you add a nested template file to the lab repository and add nested template code to the main *azuredeploy.json* template file, Visual Studio automatically takes the following actions:
2628

2729
- Adds a subfolder for the secondary template and parameters files, and copies the subfolder to the lab storage container.
2830
- Adds variables for the nested template folder and files to the `variables` section of the main template file.
2931
- Adds the `_artifactsLocation` and `_artifactsLocationSasToken` parameters to the main template file.
3032
- Inserts the location and Shared Access Signature (SaS) token into the parameters file.
3133

32-
In the following nested template example, the Git repository folder has a subfolder, *nestedtemplates*, that contains the nested template files *NestOne.json* and *NestOne.parameters.json*. You can add more nested template subfolders, but at only one level of nesting.
34+
The following nested template example shows a Git repository folder with a subfolder, *nestedtemplates*, that contains the nested template files *NestOne.json* and *NestOne.parameters.json*. You can add more than one nested template subfolder, but at only one level of nesting.
3335

3436
:::image type="content" source="media/deploy-nested-template-environments/visual-studio-project-structure.png" alt-text="Screenshot that shows the nested template project structure in Visual Studio.":::
3537

articles/devtest-labs/devtest-lab-create-custom-image-from-vhd-using-powershell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.custom: devx-track-azurepowershell, UpdateFrequency2
1010
#customer intent: As a lab administrator, I want to create custom images from VHD files, so I can make the custom images available to lab users as bases for creating lab VMs.
1111
---
1212

13-
# Create a custom image from a VHD file with PowerShell
13+
# Create a custom image from a VHD file by using Azure PowerShell
1414

1515
[!INCLUDE [devtest-lab-create-custom-image-from-vhd-selector](../../includes/devtest-lab-create-custom-image-from-vhd-selector.md)]
1616

articles/devtest-labs/devtest-lab-create-custom-image-from-vm-using-portal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ To create a custom image from a lab VM, take the following steps:
3838
- **I have already generalized this virtual machine**
3939
- **Generalize this virtual machine** (for Windows: **(Run sysprep)** or for Linux: **(Run deprovision)**)
4040

41-
[Sysprep](/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview) for Windows or [deprovision] for Linux create generalized images that have user profiles and other VM-specific settings removed. If you don't run sysprep or deprovision, the custom image creates exact copies of the machine that can run in isolated networks. For more information, see [Generalize a VM](/azure/virtual-machines/generalize).
41+
[Sysprep](/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview) for Windows or [deprovision](/azure/virtual-machines/generalize#linux) for Linux create generalized images that have user profiles and other VM-specific settings removed. If you don't run sysprep or deprovision, the custom image creates exact copies of the machine that can run in isolated networks. For more information, see [Generalize a VM](/azure/virtual-machines/generalize).
4242

4343
If you want sysprep or deprovision to be run on the VM when creating the custom image, choose **Generalize this virtual machine**. Running sysprep or deprovision when you create the custom image makes the existing VM unusable.
4444

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Azure DevTest Labs supports changing the size of a lab virtual machine (VM), bas
1717

1818
To resize a VM, you must be a lab administrator or an owner of the VM. If the lab sets an [allowed VM sizes](devtest-lab-set-lab-policy.md#set-allowed-virtual-machine-sizes) policy, you can resize the VM only to sizes that the policy permits.
1919

20-
The VM must be stopped before you resize it. To stop a VM, disconnect from it, and select **Stop** on the top toolbar of the VM's **Overview** page in the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040).
20+
To avoid losing work, stop the VM before you resize it. To stop a VM, disconnect from it, and select **Stop** on the top toolbar of the VM's **Overview** page in the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040).
2121

2222
:::image type="content" source="./media/devtest-lab-resize-vm/stop-vm.png" alt-text="Screenshot that shows selecting Stop on the Overview page for a VM.":::
2323

@@ -31,7 +31,10 @@ To resize a VM:
3131

3232
You can check the status of the resize operation in the **Notifications** window.
3333

34-
:::image type="content" source="./media/devtest-lab-resize-vm/resize-status.png" alt-text="Screenshot of the Notifications window that shows resizing status.":::
34+
:::image type="content" source="./media/devtest-lab-resize-vm/resize-status.png" alt-text="Screenshot of the Notifications window that shows resizing status.":::
35+
36+
>[!NOTE]
37+
>If the resize operation fails with an error that **Resizing virtual machines with shared IP configuration is not supported**, you need to add and associate a Public IP address to the VM. For more information, see [Associate a public IP address to a virtual machine](/azure/virtual-network/ip-services/associate-public-ip-address-vm).
3538
3639
When the resize finishes, you can start the VM by selecting **Start** from the VM **Overview** page top toolbar, and then connect to the VM by selecting **Connect** in the toolbar.
3740

-2.9 KB
Loading

articles/devtest-labs/quickstarts/create-lab-windows-vm-terraform.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,31 @@ Create the following files in your Terraform directory. Make sure the directory
5151

5252
## Initialize Terraform
5353

54-
[!INCLUDE [terraform-init.md](../includes/terraform-init.md)]
54+
Run [terraform init](https://www.terraform.io/docs/commands/init.html) to initialize the Terraform deployment. This command downloads the Azure provider required to manage your Azure resources. The `-upgrade` parameter upgrades the provider plugins to the newest supported version.
55+
56+
```console
57+
terraform init -upgrade
58+
```
5559

5660
## Create the Terraform execution plan
5761

58-
[!INCLUDE [terraform-plan.md](../includes/terraform-plan.md)]
62+
Run [terraform plan](https://www.terraform.io/docs/commands/plan.html) to create an execution plan. The `terraform plan` command creates an execution plan, but doesn't execute it. Instead, it determines what actions are necessary to create the configuration specified in your configuration files.
63+
64+
This pattern allows you to verify whether the execution plan matches your expectations before making any changes to actual resources. Use the optional `-out` parameter to specify an output file for the plan named `main.tfplan`. You can review the file to ensure that the plan is exactly what to apply.
65+
66+
```console
67+
terraform plan -out main.tfplan
68+
```
5969

6070
## Apply the Terraform execution plan
6171

62-
[!INCLUDE [terraform-apply-plan.md](../includes/terraform-apply-plan.md)]
72+
Run [terraform apply](https://www.terraform.io/docs/commands/apply.html) to apply the execution plan to your cloud infrastructure. The example `terraform apply` command assumes you previously ran `terraform plan -out main.tfplan`.
73+
74+
If you specify a different filename for the `-out` parameter in `terraform_plan`, use that filename in the call to `terraform apply`. If you don't use the `-out` parameter in `terraform_plan`, call `terraform apply` without any parameters.
75+
76+
```console
77+
terraform apply main.tfplan
78+
```
6379

6480
## Verify the results
6581

@@ -73,7 +89,19 @@ az lab vm list --resource-group $resource_group_name --lab-name $lab_name
7389

7490
## Clean up resources
7591

76-
[!INCLUDE [terraform-plan-destroy.md](../includes/terraform-plan-destroy.md)]
92+
When you no longer need the resources Terraform created, take the following steps to remove them:
93+
94+
1. Run [terraform plan](https://www.terraform.io/docs/commands/plan.html) with the `destroy` flag. The `terraform plan` command creates the execution plan but doesn't execute it. The `-out` parameter specifies an output file for the plan named `main.destroy.tfplan`.
95+
96+
```console
97+
terraform plan -destroy -out main.destroy.tfplan
98+
```
99+
100+
1. Run [terraform apply](https://www.terraform.io/docs/commands/apply.html) to apply the execution plan specified in the `main.destroy.tfplan` file.
101+
102+
```console
103+
terraform apply main.destroy.tfplan
104+
```
77105

78106
## Next step
79107

0 commit comments

Comments
 (0)