Microsoft Certified: Azure Administrator AssociateDeploy and manage Azure compute resourcesMedium
You need to automate the deployment of several Azure virtual machines (VMs) that will host a web application. Each VM requires the same operating system, specific software installations, and a unique hostname. You want to ensure consistency and minimize manual configuration.
- AUse an Azure Resource Manager (ARM) template to define the VM, and a PowerShell Desired State Configuration (DSC) extension to install software and set the hostname.
- BCreate a custom Azure Marketplace image that includes the OS and software, then deploy VMs from it, manually updating hostnames.
- CManually deploy each VM from a standard Azure image, then use Azure CLI to install software and configure the hostname.
- DPre-install the OS and software on an on-premises VM, then use Azure Migrate to move it to Azure as a managed disk.
Show answer & explanationAnswer & explanation
Correct answer: A. Use an Azure Resource Manager (ARM) template to define the VM, and a PowerShell Desired State Configuration (DSC) extension to install software and set the hostname.
ARM templates provide a declarative way to deploy VMs consistently. PowerShell DSC, delivered via a VM extension, allows for automated, idempotent configuration of software and settings (like hostnames) after the VM is provisioned, ensuring consistency and handling unique hostnames dynamically.
Why the other options are wrong
- B. Custom images are good for pre-installed software but require manual updates for changes and don't easily handle unique hostnames dynamically.
- C. Manual deployment and separate CLI commands are less efficient and consistent than a single declarative template with DSC.
- D. Azure Migrate is for migrating existing workloads, not for automating the deployment of new, consistent VMs from scratch.
PowerShell Desired State Configuration (DSC) Extension
An Azure VM extension that allows you to apply PowerShell Desired State Configuration (DSC) configurations to Windows VMs, enabling consistent and automated software installation and system configuration.
- Uses configuration scripts to define desired state.
- Ensures idempotency (running multiple times yields same result).
- Can be used for software installation, service configuration, and more.
- Delivered via the Azure VM extension mechanism.
Memory trick: DSC Designs Consistent Configs.