A Windows VM must run a bootstrap script during provisioning to install a monitoring agent and write configuration files. The administrator does not want to log in interactively, and the script must be runnable again after the VM is rebuilt. Which two Azure compute components should be used? Select two.
Trap 1: Boot diagnostics
Boot diagnostics is a telemetry and troubleshooting feature that captures serial console output and screenshots to help diagnose why a VM failed to boot. It does not have any capacity to execute scripts or modify the virtual machine's configuration. While it uses the VM Agent to collect data, it is purely observational and cannot run a provisioning script.
Trap 2: Availability zone
An availability zone is a physically separate location within an Azure region that provides resiliency by isolating a VM from datacenter outages. Choosing a zone affects the VM's placement and availability, but it has no bearing on running initialization scripts or any post-deployment configuration logic. It is an infrastructure resilience setting, not a provisioning or scripting mechanism.
Trap 3: Ephemeral OS disk
An ephemeral OS disk places the virtual hard disk on the local node storage instead of Azure Storage, causing the disk to be deleted when the VM is deallocated. This affects persistence and IO performance but does not include any functionality to run scripts or automate setup. It is a storage deployment choice, unrelated to executing a bootstrap script during provisioning.
- A
Azure VM Agent
The Azure VM Agent (WindowsAzure Guest Agent) is the core runtime that runs inside the VM and is responsible for managing extension execution, reporting VM health, and handling provisioning actions for Azure. Without this agent, Azure cannot deliver or run any extensions, including the Custom Script Extension, so it is an essential prerequisite for running a bootstrap script during provisioning. It enables secure communication between the VM and the Azure fabric controller, allowing the platform to execute scripts and configurations on the instance.
- B
Custom Script Extension
The Custom Script Extension is the actual component that downloads and executes the bootstrap script on the VM. It runs within the VM Agent environment and can copy files from Azure Storage or a public URL, then invoke the script during deployment or on an existing VM. This extension is the direct mechanism that performs the initialization tasks, making it a correct answer alongside the VM Agent.
- C
Boot diagnostics
Why wrong: Boot diagnostics is a telemetry and troubleshooting feature that captures serial console output and screenshots to help diagnose why a VM failed to boot. It does not have any capacity to execute scripts or modify the virtual machine's configuration. While it uses the VM Agent to collect data, it is purely observational and cannot run a provisioning script.
- D
Availability zone
Why wrong: An availability zone is a physically separate location within an Azure region that provides resiliency by isolating a VM from datacenter outages. Choosing a zone affects the VM's placement and availability, but it has no bearing on running initialization scripts or any post-deployment configuration logic. It is an infrastructure resilience setting, not a provisioning or scripting mechanism.
- E
Ephemeral OS disk
Why wrong: An ephemeral OS disk places the virtual hard disk on the local node storage instead of Azure Storage, causing the disk to be deleted when the VM is deallocated. This affects persistence and IO performance but does not include any functionality to run scripts or automate setup. It is a storage deployment choice, unrelated to executing a bootstrap script during provisioning.