You plan to deploy several Azure virtual machines that will run Windows Server 2019 in a virtual machine scale set by using an Azure Resource Manager template.
You need to ensure that NGINX is available on all the virtual machines after they are deployed.
What should you use?
Click on the arrows to vote for the correct answer
A. B. C. D.B
Azure virtual machine extensions are small packages that run post-deployment configuration and automation on Azure virtual machines.
In the following example, the Azure CLI is used to deploy a custom script extension to an existing virtual machine, which installs a Nginx webserver. az vm extension set \
--resource-group myResourceGroup \
--vm-name myVM --name customScript \
--publisher Microsoft.Azure.Extensions \
--settings '{"commandToExecute": "apt-get install -y nginx"}
Note:
There are several versions of this question in the exam. The question has two correct answers:
1. a Desired State Configuration (DSC) extension
2. Azure Custom Script Extension
The question can have other incorrect answer options, including the following:
-> the Publish-AzVMDscConfiguration cmdlet
-> Azure Application Insights
https://docs.microsoft.com/en-us/azure/architecture/framework/devops/automation-configurationThe correct answer to the question is B. A Desired State Configuration (DSC) extension.
Explanation:
Azure Resource Manager (ARM) templates are used to deploy infrastructure-as-code resources in Azure. These templates are written in JSON and can be used to automate the deployment of virtual machines, virtual networks, and other resources.
To ensure that NGINX is available on all the virtual machines after they are deployed, we need to use a mechanism that can configure the VMs as per our requirements. The Desired State Configuration (DSC) is a feature in Windows Server that enables us to configure and manage the state of a machine automatically. DSC can be used to install, configure, and manage software on virtual machines. In this case, we need to use the DSC extension to install NGINX on the virtual machines.
The DSC extension is available in Azure and can be used to configure the virtual machines as per our requirements. To use the DSC extension, we need to create a DSC configuration script that will install NGINX on the virtual machines. Once the script is created, we can specify the script in the ARM template, which will deploy the virtual machines and apply the DSC configuration.
Option A, Deployment Center in Azure App Service, is not applicable in this scenario as it is used to deploy web applications to Azure App Service.
Option C, the New-AzConfigurationAssignment cmdlet, is used to create a new configuration assignment, which is used to assign a configuration to a resource.
Option D, a Microsoft Intune device configuration profile, is used to configure policies on devices managed by Microsoft Intune. It is not applicable in this scenario as we are deploying virtual machines in Azure.