Skip to content

Commit abe51b1

Browse files
authored
Merge pull request #277041 from GitHubber17/250699-b
Freshness 250699 - Azure DevTest Labs
2 parents ff96a13 + 9d13cfe commit abe51b1

File tree

73 files changed

+479
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+479
-276
lines changed

articles/devtest-labs/configure-shared-image-gallery.md

Lines changed: 131 additions & 49 deletions
Large diffs are not rendered by default.

articles/devtest-labs/devtest-lab-add-claimable-vm.md

Lines changed: 104 additions & 57 deletions
Large diffs are not rendered by default.

articles/devtest-labs/devtest-lab-comparing-vm-base-image-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom: UpdateFrequency2
1515

1616
In Azure DevTest Labs, both [custom images](devtest-lab-create-template.md) and [formulas](devtest-lab-manage-formulas.md) can be used as bases for [creating new lab virtual machines (VMs)](devtest-lab-add-vm.md). The key distinction between custom images and formulas is that a custom image is simply an image based on a virtual hard drive (VHD). A formula is an image based on a VHD that also includes preconfigured settings. These settings can include VM size, virtual network, subnet, and artifacts. Preconfigured settings are set up with default values that you can override when you create the VM.
1717

18-
In this article, you learn the pros and cons of using custom images versus formulas. You can also read [Create a custom image from a VM](devtest-lab-create-custom-image-from-vm-using-portal.md) and [Create a formula from a VM](devtest-lab-manage-formulas.md#create-a-formula-from-a-vm) for more details.
18+
In this article, you learn the pros and cons of using custom images versus formulas. You can also read [Create a custom image from a VM](devtest-lab-create-custom-image-from-vm-using-portal.md) and [Create a formula from a VM](devtest-lab-manage-formulas.md#create-formula-from-existing-vm) for more details.
1919

2020
## Custom image benefits
2121

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,86 @@
11
---
22
title: Track costs associated with a lab in Azure DevTest Labs
3-
description: This article provides information on how to track the cost of your lab through Azure Cost Management.
3+
description: Track the cost of your lab through Microsoft Cost Management with custom tags, tag inheritance, and filtered views.
44
ms.topic: how-to
55
ms.author: rosemalcolm
66
author: RoseHJM
7-
ms.date: 03/28/2024
7+
ms.date: 06/03/2024
88
ms.custom: UpdateFrequency2
9+
10+
#customer intent: As a developer, I want to use Microsoft Cost Management to track and manage the costs associated with my DevTest Labs resources.
911
---
1012

1113
# Track costs associated with a lab in Azure DevTest Labs
12-
This article provides information on how to track the cost of your lab through [Azure Cost Management](../cost-management-billing/cost-management-billing-overview.md) by applying tags to the lab to filter costs. DevTest Labs may create more resource groups for resources related to the lab (depending on the features used and the settings of the lab). For this reason, it’s often not straightforward to get a view of the total costs for a lab just by looking at Resource Groups. To create a single view of costs per lab, tags are used.
1314

14-
## Steps to Leverage Cost Management for DevTest Labs
15+
This article provides information on how to track the cost of your lab through [Microsoft Cost Management](../cost-management-billing/cost-management-billing-overview.md) by applying tags to the lab to filter costs.
16+
17+
DevTest Labs can create extra resource groups for resources related to your lab. The number of resource groups created depends on the features used by the lab and their settings. Because of the extra resource groups, it's often not straightforward to get a view of the total costs for your lab just by looking at **Resource groups** in the Azure portal. To create a single view of costs per lab in the Azure portal, you can use resource group **Tags**.
18+
19+
## Apply Cost Management for DevTest Labs
20+
21+
The process for using cost management for DevTest Labs involves four steps:
22+
23+
1. Create tags and enable tag inheritance in the Azure portal.
24+
1. Apply the tags to your DevTest Labs resources.
25+
1. Provide permissions to allow users to view their resource costs.
26+
1. Use Microsoft Cost Management to view and filter costs for your DevTest Labs resources, based on your tags.
27+
28+
You might create tags to allow users to track billed charges by cost center, business unit, team project, and so on.
1529

16-
These are the steps needed to use cost management for DevTest Labs. More details are captured in the following sections.
17-
1. Enable tag inheritance for costs.
18-
1. Apply tags to the DevTest Labs (cost center, business unit, etc.).
19-
1. Provide permissions to allow users to view costs.
20-
1. Use Azure Cost Management for viewing/filtering costs for DevTest Labs, based on the tags.
30+
The details for these steps are described in the following sections.
2131

22-
## Step 1: Enable Tag Inheritance for Tags on Resource Groups
32+
## Create tags and enable tag inheritance
2333

24-
When DevTest Labs creates [environments](devtest-lab-create-environment-from-arm.md), they are each placed in their own resource group. For billing purposes, you must enable tag inheritance to ensure that the lab tags flow down from the resource group to the resources.
34+
When DevTest Labs creates [environments](devtest-lab-create-environment-from-arm.md), it places each environment in its own resource group. For billing purposes, you must enable tag inheritance to ensure the lab tag definitions flow down from the resource group to the resources.
2535

2636
You can enable tag inheritance through billing properties or through Azure Policies. The billing properties method is the easiest and fastest to configure. However, it might affect billing reporting for other resources in the same subscription.
2737

28-
- [Group and allocate costs using tag inheritance](../cost-management-billing/costs/enable-tag-inheritance.md)
38+
The following articles describe how to create tags and enable tag inheritance:
39+
40+
- [Group and allocate costs by using tag inheritance](../cost-management-billing/costs/enable-tag-inheritance.md)
2941
- [Use the "Inherit a tag from the resource group" Azure Policy](../azure-resource-manager/management/tag-policies.md)
3042

31-
If updated correctly using the billing properties method, you see that Tag Inheritance now shows **Enabled**:
43+
If the lab is updated correctly by using the billing properties method, you see **Tag inheritance** is **Enabled**:
3244

33-
:::image type="content" source="./media/devtest-lab-configure-cost-management/tag-inheritance.png" alt-text="Screenshot that shows Tag Inheritance is enabled.":::
45+
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tag-inheritance.png" alt-text="Screenshot that shows Tag Inheritance is Enabled for cost management in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/devtest-tag-inheritance-large.png":::
3446

35-
## Step 2: Apply Tags to DevTest Labs
47+
## Apply tags to DevTest Labs
3648

37-
DevTest Labs automatically propagates tags applied at the lab level to the resources that are created by the lab. This includes virtual machines (tags are applied to the billable resources) and environments (tags are applied to the resource group for the environment). Follow the steps in this article to apply tags to your labs: [Add tags to a lab](devtest-lab-add-tag.md).
49+
DevTest Labs automatically propagates tags applied at the lab level to resources created by the lab. For virtual machines, tags are applied to the billable resources. For environments, tags are applied to the resource group for the environment. To apply tags to your labs, follow the steps in [Add tags to a lab](devtest-lab-add-tag.md).
3850

39-
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tags.png" alt-text="Screenshot that shows tags in DevTest Labs in the Azure portal.":::
51+
:::image type="content" source="./media/devtest-lab-configure-cost-management/devtest-tags.png" alt-text="Screenshot that shows tags added for a DevTest Labs resource in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/devtest-tags-large.png":::
4052

4153
> [!NOTE]
42-
> It’s important to remember that tags are propagated for any resources created _after_ the tag has been applied to the lab. If there are _existing resources_ that must be updated with the new tags, there's a script available to propagate the new/updated tags correctly. If you have existing resources and want to apply the lab tags, use the [Update-DevTestLabsTags script located in the DevTest Labs GitHub Repo](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts/UpdateDtlTags).
54+
> After you apply a new tag to your lab, the tag is automatically applied to new lab resources when they're created. If you want to apply a new or updated tag to existing resources, you can use a script to propagate the tag correctly. Use the [Update-DevTestLabsTags script](https://github.com/Azure/azure-devtestlab/tree/master/samples/DevTestLabs/Scripts/UpdateDtlTags) located in the DevTest Labs GitHub repository.
55+
56+
## Provide permissions to view costs
57+
58+
DevTest Labs users don't automatically have permission to view costs for their resources by using Cost Management. To add the permissions, follow the instructions in [enable users to view billing information](../cost-management-billing/costs/assign-access-acm-data.md#assign-billing-account-scope-access). Assign the _Billing Reader_ permission to users at the subscription level, if they don't already have permissions that include Billing Reader access.
59+
60+
For more information, see [Manage access to Azure billing - Microsoft Cost Management](../cost-management-billing/manage/manage-billing-access.md).
61+
62+
## View and filter costs
4363

44-
## Step 3: Provide permissions to allow users to view costs
64+
After DevTest Labs is configured to provide the lab-specific information for Microsoft Cost Management, you're ready to get started with [Cost Management reporting - Azure - Microsoft Cost Management](../cost-management-billing/costs/reporting-get-started.md). You can visualize the costs in the Azure portal, download cost reporting information, or use Power BI to visualize the costs.
4565

46-
DevTest Labs users don’t automatically have permission to view costs for their resources via Cost Management. There's one more step to [enable users to view billing information](../cost-management-billing/costs/assign-access-acm-data.md#assign-billing-account-scope-access). Assign the _Billing Reader_ permission to users at the subscription level, if they don’t already have permissions that include Billing Reader access. More information is found here on managing access to billing information: [Manage access to Azure billing - Microsoft Cost Management.](../cost-management-billing/manage/manage-billing-access.md)
66+
For a quick view of costs per lab, following these steps:
4767

48-
## Step 4: Use Azure Cost Management for viewing and filtering costs for DevTest Labs
68+
1. In the [Azure portal](https://portal.azure.com), go to your lab, and select a resource group that has tags.
4969

50-
Now that DevTest Labs is configured to provide the lab-specific information for Cost Management, start here on Cost Management Reporting to view costs: Get started with [Cost Management reporting - Azure - Microsoft Cost Management](../cost-management-billing/costs/reporting-get-started.md). You can visualize the costs in the Azure portal, download cost reporting information, or use Power BI to visualize the costs.
70+
1. On the left menu, expand **Cost Management**, and select **Cost analysis**.
5171

52-
For a quick view of costs per lab, see the following steps:
72+
1. In the **Cost analysis** page, expand the **View** dropdown list, and select **Daily Costs**:
5373

54-
1. Select **Cost Management** and then on **Cost analysis**
55-
2. Select **Daily Costs**
74+
:::image type="content" source="./media/devtest-lab-configure-cost-management/daily-costs.png" alt-text="Screenshot that shows how to view daily costs for resources in the Azure portal." lightbox="./media/devtest-lab-configure-cost-management/daily-costs-large.png":::
5675

57-
:::image type="content" source="./media/devtest-lab-configure-cost-management/daily-costs.png" alt-text="Screenshot that shows the daily costs card.":::
76+
1. On the **Cost Analysis** page, expand the **Group By** filter, select **Tag**, and then select one of your applied tags:
5877

59-
3. On the **Custom: Cost Analysis** page, select the **Group By** filter, choose **Tag** and then the Tag Name (like "CostCenter") to group by. Refer to the [documentation on group and filter options in Cost Management](../cost-management-billing/costs/group-filter.md) for more details.
78+
:::image type="content" source="./media/devtest-lab-configure-cost-management/group-by-tag.png" border="false" alt-text="Screenshot that shows how to change the Group by filter to show cost details based on applied tags.":::
6079

61-
The resulting view shows costs in the subscription grouped by the tag (which is grouping by the lab & its resources).
80+
The updated view shows costs in the subscription grouped by the tag according to the lab its resources. For more information, see the [documentation on group and filter options in Cost Management](../cost-management-billing/costs/group-filter.md).
6281

6382
## Related content
6483

65-
- [Define lab policies](devtest-lab-set-lab-policy.md). Learn how to set the various policies used to govern how your lab and its virtual machines (VMs) are used.
66-
- [Create custom image](devtest-lab-create-template.md). When you create a virtual machine (VM), you specify a base. The base can be either a custom image or a Marketplace image. This article describes how to create a custom image from a virtual hard disk (VHD) file.
67-
- [Configure Marketplace images](devtest-lab-configure-marketplace-images.md). DevTest Labs supports creating VMs based on Azure Marketplace images. This article illustrates how to specify Azure Marketplace images you can use when creating VMs in a lab.
68-
- [Create a VM in a lab](devtest-lab-add-vm.md). This article illustrates how to create a VM from a custom or Marketplace base image, and work with artifacts in the VM.
84+
- [Use tags to organize your Azure resources and management hierarchy](/azure/azure-resource-manager/management/tag-resources)
85+
- Review the [resource naming and tagging decision guide - Cost management and optimization](/azure/cloud-adoption-framework/ready/azure-best-practices/resource-naming-and-tagging-decision-guide)
86+
- [Define DevTest Labs policies](devtest-lab-set-lab-policy.md)

0 commit comments

Comments
 (0)