AZ-104 · Question #107
AZ-104 Question #107: Real Exam Question with Answer & Explanation
To perform a custom deployment of an Ubuntu Server VM, including adding a trusted root CA during deployment, you should use a cloud-init script (Cloud-init.txt) and deploy it via the Azure CLI's 'az vm create' command.
Question
Hotspot Question You have an Azure subscription named Subscription1. You plan to deploy an Ubuntu Server virtual machine named VM1 to Subscription1. You need to perform a custom deployment of the virtual machine. A specific trusted root certification authority (CA) must be added during the deployment. What should you do? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Answer:
Options
- __typehotspot
- variantdropdown
Explanation
To perform a custom deployment of an Ubuntu Server VM, including adding a trusted root CA during deployment, you should use a cloud-init script (Cloud-init.txt) and deploy it via the Azure CLI's 'az vm create' command.
Approach. The question requires a custom deployment for an Ubuntu Server virtual machine, specifically to add a trusted root certification authority (CA) during deployment. For Linux virtual machines in Azure, the standard and most flexible mechanism for custom provisioning and running scripts during initial boot is cloud-init. Therefore, 'Cloud-init.txt' is the correct file to create.
To deploy a virtual machine with a cloud-init script, command-line tools like the Azure CLI or Azure PowerShell are typically used. The 'az vm create' command (Azure CLI) supports the --custom-data or --cloud-init-file parameter, allowing you to pass the content of your cloud-init script directly during the VM creation process. This enables the VM to execute the script, which can include commands to add a trusted root CA, upon its first boot. Thus, 'The az vm create command' is a correct and common tool for this purpose.
Common mistakes.
- common_mistake. 1. Choosing 'Unattend.xml' or 'Autounattend.conf': These files are primarily used for unattended installations and customizations of Windows operating systems. They are not applicable to Ubuntu Server or other Linux distributions.
- Choosing 'Answer.ini': This is a generic INI file format and not a recognized standard for VM provisioning in Azure, neither for Windows nor Linux.
- Choosing 'The Azure portal' for deployment: While the Azure portal does offer an option to provide custom data (including cloud-init scripts) during VM creation, for highly 'custom deployment' scenarios involving specific script execution and file manipulations like adding a CA, command-line tools such as Azure CLI or Azure PowerShell are generally preferred for their automation capabilities, repeatability, and direct control. The question implies a programmatic or script-driven approach, which aligns better with CLI/PowerShell.
- Choosing 'The New-AzureRmVm cmdlet': While 'New-AzureRmVm' (Azure PowerShell) is also a valid tool to deploy an Azure VM with a cloud-init script (using the
-CustomDataparameter), the question expects a single correct selection among the given options for the 'Tool to use'. Both CLI and PowerShell cmdlets are technically capable, but 'az vm create' is a perfectly valid and commonly used option for Linux VM deployments.
Concept tested. The core concepts tested are: 1. Customizing Linux Virtual Machines in Azure during deployment using cloud-init. 2. Understanding the appropriate tools (Azure CLI/PowerShell) for deploying VMs with custom configurations. 3. Differentiating between Linux and Windows VM provisioning mechanisms (cloud-init vs. Unattend.xml). 4. The ability to perform initial configuration tasks like adding trusted root CAs during VM creation.
Topics
Community Discussion
No community discussion yet for this question.