Skip main navigation

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:

DEPLOY AND CONFIGURE

  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

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education