|
2 | 2 | title: Add an artifact to a VM
|
3 | 3 | description: Learn how to add an artifact to a virtual machine in a lab in Azure DevTest Labs.
|
4 | 4 | ms.topic: how-to
|
5 |
| -ms.date: 01/04/2022 |
| 5 | +ms.date: 01/11/2022 |
6 | 6 | ms.custom: devx-track-azurepowershell
|
7 | 7 | ---
|
8 | 8 |
|
9 | 9 | # Add artifacts to DevTest Labs VMs
|
10 | 10 |
|
11 |
| -You can add *artifacts* to Azure DevTest Labs virtual machines (VMs). DevTest Labs artifacts specify actions to take to provision a VM, such as running Windows PowerShell scripts, running Bash commands, or installing software. You can use parameters to customize the artifacts for your own needs. |
| 11 | +This article describes how to add *artifacts* to Azure DevTest Labs virtual machines (VMs). Artifacts specify actions to take to provision a VM, such as running Windows PowerShell scripts, running Bash commands, or installing software. You can use parameters to customize the artifacts for your own needs. |
12 | 12 |
|
13 | 13 | DevTest Labs artifacts can come from the [public DevTest Labs Git repository](https://github.com/Azure/azure-devtestlab/tree/master/Artifacts) or from private Git repositories. To create your own custom artifacts and store them in a repository, see [Create custom artifacts](devtest-lab-artifact-author.md). To add your artifact repository to a lab so lab users can access the custom artifacts, see [Add an artifact repository to your lab](add-artifact-repository.md).
|
14 | 14 |
|
15 |
| -This article describes how to add available artifacts to VMs by using the Azure portal or Azure PowerShell. |
| 15 | +DevTest Labs lab owners can specify mandatory artifacts to be installed on all lab VMs at creation. For more information, see [Specify mandatory artifacts for DevTest Labs VMs](devtest-lab-mandatory-artifacts). You can't change or remove mandatory artifacts at VM creation time, but you can add any available individual artifacts. This article describes how to add available artifacts to VMs by using the Azure portal or Azure PowerShell. |
16 | 16 |
|
17 | 17 | ## Add artifacts to VMs from the Azure portal
|
18 | 18 |
|
19 |
| -1. In the [Azure portal](https://go.microsoft.com/fwlink/p/?LinkID=525040), go to the lab that has the VM you want to add artifacts to. |
20 |
| -1. On the lab **Overview** page, under **My virtual machines**, select the VM you want to add artifacts to. |
21 |
| -1. On the VM page, select **Artifacts** in the top menu bar or left navigation. |
22 |
| -1. On the **Artifacts** page, select **Apply artifacts**. |
23 |
| -1. On the **Add artifacts** page, select the arrow next to each artifact you want to add to the VM. Artifact actions execute in the order you add them to the VM. |
24 |
| -1. On each **Add artifact** pane, enter any required and optional parameter values, and then select **OK**. |
25 |
| -1. When you're done adding artifacts, select **Install**. |
| 19 | +You can add artifacts during VM creation, or add artifacts to existing lab VMs. |
26 | 20 |
|
27 |
| -After the artifacts install, they appear on the VM's **Artifacts** page. |
| 21 | +To add artifacts during VM creation: |
28 | 22 |
|
29 |
| -<!-- After you add artifacts, you can modify them or change the order they run in. |
| 23 | +1. On the lab's home page, select **Add**. |
| 24 | +1. On the **Choose a base** page, select the type of VM you want. |
| 25 | +1. On the **Create lab resource** screen, select **Add or Remove Artifacts**. |
| 26 | +1. On the **Add artifacts** page, select the arrow next to each artifact you want to add to the VM. |
| 27 | +1. On each **Add artifact** pane, enter any required and optional parameter values, and then select **OK**. The artifact appears under **Selected artifacts**, and the number of configured artifacts updates. |
30 | 28 |
|
31 |
| -### View or modify artifacts |
| 29 | +  |
32 | 30 |
|
33 |
| -To view installed artifacts, select **Artifacts** from the top menu bar on the VM's **Overview** page. |
| 31 | +1. You can change the artifact after adding them. |
34 | 32 |
|
35 |
| -To modify an artifact, select it from the list on the **Artifacts** page. |
36 |
| -1. On the **Add artifact** pane, make any needed changes, and select **OK** to close the **Add artifact** pane. |
| 33 | + - By default, artifacts install in the order you add them. To rearrange the order, select the ellipsis **...** next to the artifact in the **Selected artifacts** list, and select **Move up**, **Move down**, **Move to top**, or **Move to bottom**. |
| 34 | + - To edit the artifact's parameters, select **Edit** to reopen the **Add artifact** pane. |
| 35 | + - To delete the artifact from the **Selected artifacts** list, select **Delete**. |
37 | 36 |
|
38 |
| -### Change the order to run artifacts |
| 37 | +1. When you're done adding and arranging artifacts, select **OK**. |
| 38 | +1. The **Create lab resource** screen shows the number of artifacts added. To add, edit, rearrange, or delete the artifacts before you create the VM, select **Add or Remove Artifacts** again. |
39 | 39 |
|
40 |
| -By default, artifact actions execute in the order you added them to the VM. To change the order in which the artifacts are run. |
| 40 | +After you create the VM, the installed artifacts appear on the VM's **Artifacts** page. To see details about each artifact's installation, select the artifact name. |
41 | 41 |
|
42 |
| -1. At the top of the **Apply artifacts** pane, select the link indicating the number of artifacts that have been added to the VM. |
43 |
| - |
44 |
| -  |
45 |
| -1. On the **Selected artifacts** pane, drag and drop the artifacts into the desired order. If you have trouble dragging the artifact, make sure that you are dragging from the left side of the artifact. |
46 |
| -1. Select **OK** when done. --> |
| 42 | +To install more artifacts on the existing VM: |
| 43 | + |
| 44 | +1. From the VM's **Artifacts** page, select **Apply artifacts**. |
| 45 | + |
| 46 | +  |
| 47 | + |
| 48 | +1. On the **Add artifacts** page, select and configure artifacts the same as for a new VM. |
| 49 | +1. When you're done adding artifacts, select **Install**. The artifacts install on the VM immediately. |
47 | 50 |
|
48 | 51 | ## Add artifacts to VMs by using Azure PowerShell
|
49 | 52 |
|
@@ -149,7 +152,7 @@ if ($virtualMachine -ne $null) {
|
149 | 152 |
|
150 | 153 | ## Next steps
|
151 | 154 |
|
152 |
| -- [Specify mandatory artifacts for your lab](devtest-lab-mandatory-artifacts.md) |
| 155 | +- [Specify mandatory artifacts](devtest-lab-mandatory-artifacts.md) |
153 | 156 | - [Create custom artifacts](devtest-lab-artifact-author.md)
|
154 | 157 | - [Add an artifact repository to a lab](devtest-lab-artifact-author.md)
|
155 | 158 | - [Diagnose artifact failures](devtest-lab-troubleshoot-artifact-failure.md)
|
0 commit comments