Skip to main content

Deploying a VM Using an ARM Template in Azure

Hands-On Lab

 

Photo of Chad Crowell

Chad Crowell

DevOps Training Architect II in Content

Length

00:30:00

Difficulty

Beginner

This hands-on lab teaches you to create a VM using an ARM template. An ARM template is useful because you can deploy resources as many times as necessary. You can also reuse templates or modify them to include multiple resources in the same template.

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 a VM Using an ARM Template in Azure

Introduction

This hands-on lab teaches you to create a VM using an ARM template. An ARM template is useful because you can deploy resources as many times as necessary. You can also reuse templates or modify them to include multiple resources in the same template.

Note: Use West US as the location for this lab.

Solution

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

Find and Review the ARM Template

  1. Go directly to the template at: https://azure.microsoft.com/en-us/resources/templates/101-vm-tags/

  2. Log in to Azure Portal with the credentials provided from the lab page.

  3. Click Edit template.

Deploy the ARM Template

  1. Click the top variables option under Resources. In the code frame on the right-hand side, change the following variables to these values.

    "vmName": "win-server",
    "virtualNetworkName": "app-vnet",
  2. Click Save.

  3. Click the Resource group box and select the only available resource group.

  4. Enter a username and password in the Admin Username and Admin Password boxes respectively.

  5. In the Dns Label Prefix, enter win-server-ip.

  6. Click the combo box for Window OS Version and select Windows Datacenter 2019.

  7. Update the Department Name to Finance.

  8. Update the Application Name to fin-app.

  9. Update the Created By to YOUR_NAME.

  10. Change Vm Size from Standard_D2_V3 to Standard_B1s.

  11. Click the checkbox at the bottom agreeing to the terms and conditions.

  12. Click Purchase.

Verify the VM is Started and Tags are Applied

  1. After deployment is successful, click Virtual machines in the left-hand menu.

  2. Click win-server.

  3. Click Tags. Verify the tags you entered during the previous task.

  4. Click Virtual networks in the left-hand menu.

  5. Click app-vnet.

  6. Click Subnets and verify the subnet was created as expected.

Conclusion

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