Skip to main content

Deploying Azure Templates

Hands-On Lab

 

Photo of Michael Christian

Michael Christian

Course Development Director in Content

Length

00:30:00

Difficulty

Intermediate

In this hands-on lab we use the Azure Portal to modify the QuickStart template to add an additional data disk prior to deployment. We will then deploy this template and examine the that the changes we made were successfully deployed.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Deploying Azure Templates

Introduction

This hands-on lab explains Azure templates in great detail. The Azure Portal is used to build a custom virtual machine by modifying the quickstart template to add an additional data disk using a JSON Azure Resouce Manager template. In addition, we modify the parameters to simplify data entry for building this virtual machine.

Access the Azure Portal

  1. Log in to the Azure Portal using the credentials provided on the lab instructions page.

Edit the Template Parameters

  1. Click Create a resource.

  2. Enter "template" in the search box and click Template deployment (deploy using custom templates).

  3. Click Create.

  4. Click Create a Windows virtual machine.

  5. Use the combox box next to Resource group to select the provided resource group.

  6. Click Edit template.

  7. Find the section for "dataDisks" (around line 195) and update it to the following. Remember to indent "dataDisks" so it lines up with "osDisk".

    "dataDisks" [
        {
            "diskSizeGB": 1023,
            "lun": 0,
            "createOption": "Empty"
        },
        {
            "diskSizeGB": 1023,
            "lun": 1,
            "createOption": "Empty"
        }
    ]
  8. Find the section for "vmSize" (around line 39). Update the "defaultValue" parameter to have a value of "Standard_A1_V2", with the quotation marks.

  9. Click Save.

  1. Click Edit parameters.

  2. Under "adminUsername", update the "value" to "localadmin", with the quotation marks.

  3. Under "dnsLabelPrefix", update the "value" to a unique value. One recommendation is "vm1446aaadd" where aaa is replaces with your initials and dd is replaced with a date.

  4. Under "vmSize", update the "value" to "Standard_A1_V2", with the quotation marks.

  5. Click Save.

Purchase the VM

  1. Enter a password.

  2. Check the I agree to the terms and conditions above box.

  3. Click Purchase.

Verify the Changes

  1. Click the bell at the top of the window to see the status of the deployment.

  2. Click the status to pull up the virtual machine.

  3. Once the deployment is complete, click Home.

  4. Click All resources.

  5. Click SimpleWinVm

  6. Under Settings, click Disks.

  7. Verify the existence of two disks.

Conclusion

Congratulations, you've completed this hands-on lab!