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.

Solution

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

Find and Review the ARM Template

  1. Click on All resources from the left-hand menu. Verify the only resources are a single storage account.

  2. Click Create a resource from the left-hand menu.

  3. In the search box, enter template deployment and run a search.

  4. On the Microsoft Template deployment window, click Create.

  5. Click Create a Windows virtual machine.

  6. Click Edit template.

  7. Click Quickstart template at the top of the window.

  8. Search for the template 101-vm-tags and select it.

  9. Click OK.

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",
    "vmSize": "Standard_B1s",
    "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 2012-R2-Datacenter.

  7. Update the Department Name to Finance.

  8. Update the Application Name to fin-app.

  9. Update the Created By to YOUR_NAME.

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

  2. 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!