Microsoft Certified: Azure Administrator AssociateDeploy and manage Azure compute resourcesMedium
You are tasked with deploying an Azure Virtual Machine (VM) that must have a specific set of software pre-installed and configured, including a custom database client and a monitoring agent. This VM will be part of a larger application environment, and similar VMs will be deployed frequently. Which method should you use to ensure consistent and efficient deployment of these VMs?
- AUtilize Azure Automation State Configuration
- BCreate a custom VM image and deploy VMs from it
- CUse a custom Azure Resource Manager (ARM) template with PowerShell scripts
- DManually install software after VM creation
Show answer & explanationAnswer & explanation
Correct answer: B. Create a custom VM image and deploy VMs from it
Creating a custom VM image with all necessary software pre-installed is the most efficient and consistent method for frequently deploying VMs with identical configurations. This eliminates post-deployment manual steps.
Why the other options are wrong
- A. Azure Automation State Configuration (DSC) helps manage configuration drift post-deployment but doesn't streamline the initial deployment of pre-installed software as efficiently as a custom image.
- C. While ARM templates can deploy VMs and PowerShell scripts can automate installation, a custom image pre-bakes the software, making deployment faster and more consistent than running scripts post-deployment.
- D. Manually installing software is inefficient and prone to errors, especially for frequent deployments.
Azure Custom VM Image
A snapshot of a virtual hard disk (VHD) that includes the operating system, data disks, and all pre-installed software and configurations, used to create new VMs.
- Ensures consistent VM deployments
- Reduces deployment time
- Can be generalized (Sysprep for Windows, waagent for Linux)
- Stored in a Shared Image Gallery for sharing and versioning
Memory trick: Imagine a VM Factory, building replicas.