title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Add a VM to a lab in Azure DevTest Labs | Microsoft Docs |
Learn how to add a virtual machine to a lab in Azure DevTest Labs |
devtest-lab,virtual-machines |
na |
tomarcher |
douge |
devtest-lab |
na |
na |
na |
article |
02/24/2017 |
tarcher |
If you have already created your first VM, you likely did so from a pre-loaded marketplace image. Now, if you want to add subsequent VMs to your lab, you can also choose a base that is either a custom image or a formula. This tutorial walks you through using the Azure portal to add a VM to a lab in DevTest Labs.
This article also shows you how to manage the artifacts for a VM in your lab.
-
Sign in to the Azure portal.
-
Select More Services, and then select DevTest Labs from the list.
-
From the list of labs, select the lab in which you want to create the VM.
-
On the lab's Overview blade, select + Add.
-
On the Choose a base blade, select a base for the VM.
-
On the Virtual machine blade, enter a name for the new virtual machine in the Virtual machine name text box.
-
Enter a User Name that is granted administrator privileges on the virtual machine.
-
If you want to use a password stored in your secret store, select Use a saved secret, and specify a key value that corresponds to your secret (password). Otherwise, enter a password in the text field labeled Type a value.
-
The Virtual machine disk type determines which storage disk type is allowed for the virtual machines in the lab.
-
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 to create.
-
Select Artifacts and - from the list of artifacts - select and configure the artifacts that you want to add to the base image. Note: If you're new to DevTest Labs or configuring artifacts, refer to the Add an existing artifact to a VM section, and then return here when finished.
-
Select Advanced settings to configure the VM's network options and expiration options.
To set an expiration option, choose the calendar icon to specify a date on which the VM will be automatically deleted. By default, the VM will never expire.
-
If you want to view or copy the Azure Resource Manager template, refer to the Save Azure Resource Manager template section, and return here when finished.
-
Select Create to add the specified VM to the lab.
-
The lab blade displays the status of the VM's creation - first as Creating, then as Running after the VM has been started.
Note
Add a claimable VM shows you how to make the VM claimable so that it is available for use by any user in the lab.
While creating a VM, you can add existing artifacts. Each lab includes artifacts from the Public DevTest Labs Artifact Repository as well as artifacts that you've created and added to your own Artifact Repository.
- Azure DevTest Labs artifacts let you specify actions that are performed when the VM is provisioned, such as running Windows PowerShell scripts, running Bash commands, and installing software.
- Artifact parameters let you customize the artifact for your particular scenario
To discover how to create artifacts, see the article, Learn how to author your own artifacts for use with DevTest Labs.
- Sign in to the Azure portal.
- Select More Services, and then select DevTest Labs from the list.
- From the list of labs, select the lab containing the VM with which you want to work.
- Select My virtual machines.
- Select the desired VM.
- Select Artifacts.
- Select Apply artifacts.
- On the Apply artifacts blade, select the artifact you wish to add to the VM.
- On the Add artifact blade, enter the required parameter values and any optional parameters that you need.
- Select Add to add the artifact and return to the Apply artifacts blade.
- Continue adding artifacts as needed for your VM.
- Once you've added your artifacts, you can change the order in which the artifacts are run. You can also go back to view or modify an artifact.
- When you're done adding artifacts, select Apply
By default, the actions of the artifacts are executed in the order in which they are added to the VM. The following steps illustrate how to change the order in which the artifacts are run.
-
At the top of the Apply artifacts blade, select the link indicating the number of artifacts that have been added to the VM.
-
On the Selected artifacts blade, drag and drop the artifacts into the desired order. Note: If you have trouble dragging the artifact, make sure that you are dragging from the left side of the artifact.
-
Select OK when done.
The following steps illustrate how to view or modify the parameters of an artifact:
-
At the top of the Apply artifacts blade, select the link indicating the number of artifacts that have been added to the VM.
-
On the Selected artifacts blade, select the artifact that you want to view or edit.
-
On the Add artifact blade, make any needed changes, and select OK to close the Add artifact blade.
-
Select OK to close the Selected artifacts blade.
An Azure Resource Manager template provides a declarative way to define a repeatable deployment. The following steps explain how to save the Azure Resource Manager template for the VM being created. Once saved, you can use the Azure Resource Manager template to deploy new VMs with Azure PowerShell.
- On the Virtual machine blade, select View ARM Template.
- On the View Azure Resource Manager template blade, select the template text.
- Copy the selected text to the clipboard.
- Select OK to close the View Azure Resource Manager Template blade.
- Open a text editor.
- Paste in the template text from the clipboard.
- Save the file for later use.
[!INCLUDE devtest-lab-try-it-out]
- Once the VM has been created, you can connect to the VM by selecting Connect on the VM's blade.
- Learn how to create custom artifacts for your DevTest Labs VM.
- Explore the DevTest Labs Azure Resource Manager QuickStart template gallery.