Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

How to create a virtual machine with DevTest Labs

DevTest Labs has a number of key automation capabilities to offer. Let's take a look at how you can create a VM in your lab with Artefacts.

In this article, we’ll explore the automation capabilities that DevTest Labs enables.

We will go through the workflow of creating a virtual machine within a DevTest lab, and generate ARM templates that you can use to create a pipeline for provisioning infrastructure deployment.

Deploying and Configuring with Artefacts

You can create a VM in your lab with artefacts:

  1. Sign in to the Azure portal.
  2. Select More Services.
  3. Select DevTest Labs.
  4. Select the lab in which you wish to create a VM.
  5. On the lab’s Overview blade, select +Virtual Machine.
  6. Choose a base for the VM.
  7. Enter a username that will be granted administrator privileges on the virtual machine. Follow a naming convention that helps you identify the machines easily within the labs. For example, –. Or, if you’re creating the machines to be used as a workstation, follow the convention –.
  8. Enter a password in the text field labelled Type a value.
  9. Select Virtual machine size, and select one of the predefined items that specify the processor cores, RAM size, and the hard drive size of the VM.
  10. Select Virtual network, and select the desired virtual network.
  11. Select Subnet, and select subnet.
  12. If the lab policy is set to allow public IP addresses for the selected subnet, specify whether you want the IP address to be public by selecting either Yes or No. Otherwise, this option is disabled and selected as No.
  13. Select Artefacts, and from the list of artefacts, select and configure the artefacts that you want to add to the base image.
  14. To save the Azure Resource Manager template for the VM to reuse and deploy new VMs with PowerShell, on the Virtual machine blade, select View ARM Template.
  15. The View ARM Template blade gives you the ARM template that can be used to programmatically create this virtual machine with the Azure APIs by using Azure CLI or PowerShell.

The actual ARM template to provision the virtual machine selecting the setting that you’ve just been selecting has been created for you. This enables you to automate the provisioning of DevTest VMs within your DevTest Labs, instead of from the Azure portal.

This article is from the free online

Microsoft Future Ready: DevOps Development, Implementation and Azure Automation

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now