Associate Virtual Machines to Cost Centers in Azure | Exam AZ-100

Associate Virtual Machines to Cost Centers

Question

You have an Azure subscription that contains a resource group named RG1. RG1 contains 100 virtual machines.

Your company has three cost centers named Manufacturing, Sales, and Finance.

You need to associate each virtual machine to a specific cost center.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C

https://docs.microsoft.com/en-us/azure/billing/billing-getting-started https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-using-tags

The correct answer is C. Assign tags to the virtual machines.

Explanation: Azure tags are name-value pairs that can be assigned to Azure resources to logically organize and categorize them. Tags provide a way to apply metadata to resources and can be used for a variety of purposes such as cost management, access control, and resource management.

To associate each virtual machine to a specific cost center, you can assign a tag to each virtual machine with the name of the cost center and its corresponding value. For example, you can assign a tag with the name "CostCenter" and the value "Manufacturing" to all virtual machines that belong to the Manufacturing cost center.

To assign tags to virtual machines in Azure, you can follow these steps:

  1. In the Azure portal, go to the Resource group that contains the virtual machines (RG1 in this case).
  2. Select all the virtual machines that you want to tag.
  3. Click on the "Tags" option in the menu bar.
  4. Click on the "+ Tag" button to add a new tag.
  5. Enter the name and value of the tag (e.g., CostCenter and Manufacturing).
  6. Click on the "Save" button to apply the tag to the selected virtual machines.

Once you have assigned tags to the virtual machines, you can use Azure cost management tools to view and manage costs by cost center, as well as use Azure policies to enforce tagging requirements for compliance and governance purposes.