Skip to content

Commit 1983f74

Browse files
authored
Merge pull request #296913 from v-thepet/dtl6
Freshness Edit: Azure DevTest Labs Set #3 (-1)
2 parents 767b8ea + 003d3e3 commit 1983f74

16 files changed

+202
-198
lines changed

articles/devtest-labs/add-artifact-vm.md

Lines changed: 51 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,86 @@
11
---
2-
title: Add an artifact to a VM
3-
description: Learn how to add an artifact to a virtual machine in a lab in Azure DevTest Labs.
2+
title: Add artifacts to VMs
3+
description: Learn how to add or configure artifacts on lab virtual machines (VM) in Azure DevTest Labs by using the Azure portal or Azure PowerShell.
44
ms.topic: how-to
55
ms.author: rosemalcolm
66
author: RoseHJM
7-
ms.date: 09/30/2023
7+
ms.date: 03/26/2025
88
ms.custom: devx-track-azurepowershell, UpdateFrequency2
9+
10+
#customer intent: As a lab user, I want to add artifacts to my VMs so I can use them to run scripts or commands, install tools or applications, or take other actions on my VMs.
911
---
1012

1113
# Add artifacts to DevTest Labs VMs
1214

13-
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.
15+
This article describes how to add *artifacts* to Azure DevTest Labs virtual machines (VMs) by using the Azure portal or Azure PowerShell. Artifacts are tools, actions, or software you can add to lab VMs. For example, artifacts can run Windows PowerShell scripts or Bash commands, install tools or applications, or take other actions like joining a domain.
16+
17+
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. Lab users can [create their own custom artifacts](devtest-lab-artifact-author.md) and store them in a repository, and use parameters to customize existing artifacts for their own needs.
18+
19+
A lab administrator can [add artifact repositories to a lab](add-artifact-repository.md) so all lab users can access them. Lab administrators can also [specify mandatory artifacts to be installed on all lab VMs](devtest-lab-mandatory-artifacts.md) at creation. Lab users can't change or remove mandatory artifacts at VM creation time, but they can add and configure other available artifacts at or after VM creation time.
20+
21+
## Prerequisites
22+
23+
# [Azure portal](#tab/portal)
24+
25+
- User access to a lab in DevTest Labs.
1426

15-
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).
27+
# [Azure PowerShell](#tab/PowerShell)
1628

17-
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.md).
29+
- User access to a lab in DevTest Labs.
30+
- Azure PowerShell. You can either:
31+
- [Use Azure Cloud Shell](/azure/cloud-shell/quickstart). Be sure to select the **PowerShell** environment.
32+
- [Install Azure PowerShell](/powershell/azure/install-azure-powershell) to use on a physical or virtual machine. If necessary, run `Update-Module -Name Az` to update your installation.
1833

19-
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.
34+
---
2035

21-
## Add artifacts to VMs from the Azure portal
36+
## Add artifacts to VMs
2237

23-
You can add artifacts during VM creation, or add artifacts to existing lab VMs.
38+
# [Azure portal](#tab/portal)
39+
<a name="add-artifacts-to-vms-from-the-azure-portal"></a>
40+
You can use the Azure portal to add artifacts during VM creation or to add artifacts to an existing lab VM.
2441

25-
To add artifacts during VM creation:
42+
### Add artifacts during VM creation
2643

2744
1. On the lab's home page, select **Add**.
2845
1. On the **Choose a base** page, select the type of VM you want.
29-
1. On the **Create lab resource** screen, select **Add or Remove Artifacts**.
46+
1. On the **Create lab resource** screen, fill out the **Basic Settings** tab according to the instructions at [Create lab VMs in Azure DevTest Labs](devtest-lab-add-vm.md).
47+
1. At the bottom of the **Basic Settings** tab, select **Add or Remove Artifacts**.
3048
1. On the **Add artifacts** page, select the arrow next to each artifact you want to add to the VM.
31-
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.
49+
1. On each **Add artifact** pane, enter any required and optional parameter values, and then select **OK**. The artifact appears under **Selected artifacts** on the **Add artifacts** page, and the number of configured artifacts updates.
50+
51+
:::image type="content" source="./media/add-artifact-vm/devtestlab-add-artifacts-blade-selected-artifacts.png" alt-text="Screenshot that shows adding artifacts.":::
3252

33-
:::image type="content" source="./media/add-artifact-vm/devtestlab-add-artifacts-blade-selected-artifacts.png" alt-text="Screenshot that shows adding artifacts on the Add artifacts pane.":::
53+
1. 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**.
3454

35-
1. You can change the artifacts after adding them.
55+
- To edit an artifact's parameters after you add it, select the pencil icon or select **...** next to the artifact and select **Edit** to reopen the artifact pane.
3656

37-
- 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**.
38-
- To edit the artifact's parameters, select **Edit** to reopen the **Add artifact** pane.
39-
- To delete the artifact from the **Selected artifacts** list, select **Delete**.
57+
- To delete an artifact from the **Selected artifacts** list, select **...** and then select **Delete**.
4058

41-
1. When you're done adding and arranging artifacts, select **OK**.
42-
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.
59+
1. When you're done adding, arranging, and configuring artifacts, select **OK** on the **Add artifacts** page.
60+
1. The **Artifacts** section of 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.
61+
1. Optionally configure any **Advanced Settings** or **Tags**, and then select **Create** and **Create** again at the bottom of the screen to create the VM with added artifacts.
4362

4463
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.
4564

46-
To install artifacts on an existing VM:
65+
### Add artifacts to an existing VM
4766

4867
1. From the lab's home page, select the VM from the **My virtual machines** list.
49-
1. On the VM page, select **Artifacts** in the top menu bar or left navigation.
68+
1. On the VM page, select **Artifacts** in the top menu bar or under **Operations** in the left navigation.
5069
1. On the **Artifacts** page, select **Apply artifacts**.
5170

52-
:::image type="content" source="./media/add-artifact-vm/artifacts.png" alt-text="Screenshot that shows Artifacts pane for an existing V M.":::
71+
:::image type="content" source="./media/add-artifact-vm/artifacts.png" alt-text="Screenshot that shows the Artifacts pane for an existing VM.":::
5372

54-
1. On the **Add artifacts** page, select and configure artifacts the same as for a new VM.
73+
1. On the **Add artifacts** page, select and configure artifacts the same way as for a new VM.
5574
1. When you're done adding artifacts, select **Install**. The artifacts install on the VM immediately.
5675

57-
## Add artifacts to VMs by using Azure PowerShell
76+
# [Azure PowerShell](#tab/PowerShell)
5877

59-
[!INCLUDE [updated-for-az](~/reusable-content/ce-skilling/azure/includes/updated-for-az.md)]
78+
If necessary, sign in to your Azure account by using the [Connect-AzAccount](/powershell/module/Az.Accounts/Connect-AzAccount) cmdlet. If you have multiple Azure subscriptions, use `Set-AzContext -SubscriptionId "<SubscriptionId>"` and provide the subscription ID you want to use.
6079

61-
The following PowerShell script applies an artifact to a VM by using the [Invoke-AzResourceAction](/powershell/module/az.resources/invoke-azresourceaction) cmdlet.
80+
Run the following PowerShell script to apply an artifact to a VM by using the [Invoke-AzResourceAction](/powershell/module/az.resources/invoke-azresourceaction) cmdlet. Provide the information the script calls for when prompted.
6281

6382
```powershell
64-
#Requires -Module Az.Resources
65-
66-
param
67-
(
83+
param (
6884
[Parameter(Mandatory=$true, HelpMessage="The ID of the subscription that contains the lab")]
6985
[string] $SubscriptionId,
7086
[Parameter(Mandatory=$true, HelpMessage="The name of the lab that has the VM")]
@@ -107,15 +123,12 @@ $template = Get-AzResource -ResourceGroupName $resourceGroupName `
107123
if ($template -eq $null) { throw "Unable to find template $ArtifactName in lab $DevTestLabName." }
108124
109125
# Find the VM in Azure
110-
$FullVMId = "/subscriptions/$SubscriptionId/resourceGroups/$resourceGroupName`
111-
/providers/Microsoft.DevTestLab/labs/$DevTestLabName/virtualmachines/$virtualMachineName"
126+
$FullVMId = "/subscriptions/$SubscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.DevTestLab/labs/$DevTestLabName/virtualmachines/$virtualMachineName"
112127
113128
$virtualMachine = Get-AzResource -ResourceId $FullVMId
114129
115130
# Generate the artifact id
116-
$FullArtifactId = "/subscriptions/$SubscriptionId/resourceGroups/$resourceGroupName`
117-
/providers/Microsoft.DevTestLab/labs/$DevTestLabName/artifactSources/$($repository.Name)`
118-
/artifacts/$($template.Name)"
131+
$FullArtifactId = "/subscriptions/$SubscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.DevTestLab/labs/$DevTestLabName/artifactSources/$($repository.Name)/artifacts/$($template.Name)"
119132
120133
# Handle the input parameters to pass through
121134
$artifactParameters = @()
@@ -153,10 +166,11 @@ if ($virtualMachine -ne $null) {
153166
} else {
154167
Write-Error "##[error]$VirtualMachine was not found in the DevTest Lab, unable to apply the artifact"
155168
}
156-
157169
```
158170

159-
## Next steps
171+
---
172+
173+
## Related content
160174

161175
- [Specify mandatory artifacts](devtest-lab-mandatory-artifacts.md)
162176
- [Create custom artifacts](devtest-lab-artifact-author.md)
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
---
2-
title: Connect to lab virtual machines through Browser connect
3-
description: Learn how to connect to lab virtual machines (VMs) through a browser if Browser connect is enabled for the lab.
2+
title: Connect to lab VMs through a browser
3+
description: Learn how to connect to Azure DevTest Labs virtual machines (VMs) through an internet browser if Bastion is enabled for the lab.
44
ms.topic: how-to
55
ms.author: rosemalcolm
66
author: RoseHJM
7-
ms.date: 09/30/2023
7+
ms.date: 03/26/2023
88
ms.custom: UpdateFrequency2
9+
10+
#customer intent: As a lab user, I want to connect to Bastion-enabled lab VMs through my browser, so I can connect securely without using public IP addresses or exposing RDP or SSH ports to the internet.
911
---
1012

11-
# Connect to DevTest Labs VMs through a browser with Azure Bastion
13+
# Connect to lab VMs through a browser via Azure Bastion
1214

13-
This article describes how to connect to DevTest Labs virtual machines (VMs) through a browser by using [Azure Bastion](../bastion/index.yml). Azure Bastion provides secure remote desktop protocol (RDP) or secure shell (SSH) access without using public IP addresses or exposing RDP or SSH ports to the internet.
15+
This article describes how to connect to your DevTest Labs virtual machine (VM) through a browser by using [Azure Bastion](/azure/bastion/index). Bastion provides secure remote desktop protocol (RDP) or secure shell (SSH) access without using public IP addresses or exposing RDP or SSH ports to the internet.
1416

1517
> [!IMPORTANT]
16-
> The VM's lab must be in a [Bastion-configured virtual network](enable-browser-connection-lab-virtual-machines.md#option-1-connect-a-lab-to-an-azure-bastion-enabled-virtual-network) and have [Browser connect enabled](enable-browser-connection-lab-virtual-machines.md#connect-to-lab-vms-through-azure-bastion). For more information, see [Enable browser connection to DevTest Labs VMs with Azure Bastion](enable-browser-connection-lab-virtual-machines.md).
18+
> The VM must be in an Azure Bastion-configured virtual network in a lab that has Bastion connections enabled. For more information, see [Enable browser connection to DevTest Labs VMs with Azure Bastion](enable-browser-connection-lab-virtual-machines.md).
1719
1820
To connect to a lab VM through a browser:
1921

2022
1. In the [Azure portal](https://portal.azure.com), search for and select **DevTest Labs**.
21-
2223
1. On the **DevTest Labs** page, select your lab.
23-
24-
1. On the lab's **Overview** page, select the VM you want to connect to from the list under **My virtual machines**.
25-
26-
1. On the VM's **Overview** page, from the top menu, select **Browser connect**.
27-
28-
1. In the **Browser connect** pane, enter the username and password for the VM, and select whether you want the VM to open in a new browser window.
29-
24+
1. On the lab's **Overview** page, select the VM you want to connect to from **My virtual machines**.
25+
1. On the VM's **Overview** page, from the top menu, select **Connect** > **Connect via Bastion**.
26+
1. In the **Connect via Bastion** pane, enter the username and password for the VM, and select whether you want the VM to open in a new browser window.
3027
1. Select **Connect**.
3128

32-
:::image type="content" source="./media/connect-virtual-machine-through-browser/lab-vm-browser-connect.png" alt-text="Screenshot of the V M Overview screen with the Browser connect button highlighted.":::
29+
:::image type="content" source="./media/connect-virtual-machine-through-browser/lab-vm-browser-connect.png" alt-text="Screenshot of the VM Overview screen with the Browser connect button highlighted.":::
3330

3431
> [!NOTE]
35-
> If you don't see **Browser connect** on the VM's top menu, the lab isn't set up for Browser connect. You can select **Connect** to connect via [RDP](connect-windows-virtual-machine.md) or [SSH](connect-linux-virtual-machine.md).
32+
> If you don't see **Connect via Bastion** on the VM's top menu, the lab isn't set up for Azure Bastion. You can select **Connect** to connect via [RDP](connect-windows-virtual-machine.md) or [SSH](connect-linux-virtual-machine.md).
3633

0 commit comments

Comments
 (0)