Deploy and manage Azure compute resources for Microsoft Azure Administrator (AZ-104)

This page covers the Deploy and manage Azure compute resources domain of the Microsoft Azure Administrator (AZ-104) certification. Master Cybersecurity offers 123 practice questions in this domain, drawn from the same content we use across our timed exam simulations. Below are five sample questions with full answer explanations.

Sample Practice Questions

  1. Question 1

    You are planning to deploy an Ubuntu Server virtual machine to your company's Azure subscription. You are required to implement a custom deployment that includes adding a particular trusted root certification authority (CA). Which of the following should you use to create the virtual machine?
    1. A. The New-AzureRmVm cmdlet.
    2. B. The New-AzVM cmdlet.
    3. C. The Create-AzVM cmdlet.
    4. D. The az vm create command.
    Explanation

    The correct answer is: D. The az vm create command..

    To inject a custom trusted root certification authority into an Ubuntu VM at provisioning time, you typically pass cloud-init data via the custom-data parameter when you create the VM. Among the listed options only the cross-platform Azure CLI command az vm create accepts a cloud-init file via --custom-data and is the documented, current way to perform this kind of custom deployment on Linux. The legacy New-AzureRmVm cmdlet belongs to the deprecated AzureRM PowerShell module that has been retired in favour of the Az module. The New-AzVM cmdlet exists but is less convenient than the CLI for cloud-init plus Linux scenarios and is not the standard recommendation for this case. Create-AzVM is not a real cmdlet name in the Az module, so it is invalid outright, leaving az vm create as the working choice.

  2. Question 2

    Your company has three virtual machines (VMs) that are included in an availability set. You try to resize one of the VMs, which returns an allocation failure message. It is imperative that the VM is resized. Which of the following actions should you take?
    1. A. You should only stop one of the VMs.
    2. B. You should stop two of the VMs.
    3. C. You should stop all three VMs.
    4. D. You should remove the necessary VM from the availability set.
    Explanation

    The correct answer is: C. You should stop all three VMs..

    Stopping (deallocating) all three VMs is the right action because resize operations within an availability set that need a SKU not currently available on the existing cluster require the entire availability set to be deallocated first; doing so releases the set from its current cluster and lets the platform re-pin every VM, on the next start, to a cluster that supports the new size. If you only stop one or two VMs the remaining running VMs keep the availability set anchored to the original cluster, and the resize will continue to return an allocation failure. Removing the VM from the availability set is not allowed once a VM has been created within one, so that option is not even technically possible without recreating the VM. Stopping just one or two VMs solves nothing because the cluster constraint is per-availability-set, not per-VM. The only path that actually frees the set so the platform can place every VM on a cluster offering the larger size is to deallocate VM1, VM2, and VM3 together, then start them again.

  3. Question 3

    You have an Azure virtual machine (VM) that has a single data disk. You have been tasked with attaching this data disk to another Azure VM. You need to make sure that your strategy allows for the virtual machines to be offline for the least amount of time possible. Which of the following is the action you should take FIRST ?
    1. A. Stop the VM that includes the data disk.
    2. B. Stop the VM that the data disk must be attached to.
    3. C. Detach the data disk.
    4. D. Delete the VM that includes the data disk.
    Explanation

    The correct answer is: C. Detach the data disk..

    A managed data disk can be detached from a running owner VM as a live hot-detach operation, which does not require that VM to stop. So the very first action that minimises downtime is to detach the data disk; once it is no longer in use by the original VM it can be reassigned. After detaching, you attach it to the target VM, which on most current Azure VM sizes is also a hot-attach and does not need the target stopped either. Stopping the original VM before detaching is unnecessary and adds avoidable outage time, and stopping the target VM is even less justified because attaching a data disk to a running VM is supported. Deleting the original VM is destructive and discards configuration and the OS disk you do not want to lose, so detach is the minimal-impact first step.

  4. Question 4

    Your company has an Azure subscription. You need to deploy a number of Azure virtual machines (VMs) using Azure Resource Manager (ARM) templates. You have been informed that the VMs will be included in a single availability set. You are required to make sure that the ARM template you configure allows for as many VMs as possible to remain accessible in the event of fabric failure or maintenance. Which of the following is the value that you should configure for the platformFaultDomainCount property?
    1. A. 10
    2. B. 30
    3. C. Min Value
    4. D. Max Value
    Explanation

    The correct answer is: D. Max Value.

    Inside an Availability Set, virtual machines are spread across fault domains and update domains to keep instances available when a physical rack fails or when host updates are rolling through. The more fault domains the set spans, the smaller the blast radius of any single rack-level failure, so to maximise the number of VMs that remain reachable during a fabric event you want platformFaultDomainCount set as high as the region allows. The proper template value to express that is the maximum supported by the region rather than a fixed numeric literal. A fixed value of 10 is rejected by the platform because Availability Sets currently support at most three fault domains in most regions, and 30 is similarly invalid. Min Value sets the count to the lowest supported value, which is one fault domain and gives no rack-level isolation, achieving the opposite of the goal.

  5. Question 5

    Your company has an Azure subscription. You need to deploy a number of Azure virtual machines (VMs) using Azure Resource Manager (ARM) templates. You have been informed that the VMs will be included in a single availability set. You are required to make sure that the ARM template you configure allows for as many VMs as possible to remain accessible in the event of fabric failure or maintenance. Which of the following is the value that you should configure for the platformUpdateDomainCount property?
    1. A. 10
    2. B. 20
    3. C. 30
    4. D. 40
    Explanation

    The correct answer is: B. 20.

    20 is the correct value because an Azure availability set's platformUpdateDomainCount property accepts a maximum of 20 update domains, and choosing the maximum value spreads the VMs across as many distinct update batches as possible. When the Azure platform performs planned maintenance, it walks update domains one at a time, so the more update domains you have the smaller the percentage of VMs taken offline together and the more VMs that remain accessible during each step. A value of 10 is not maximal and leaves capacity on the table; 30 and 40 simply exceed the platform maximum and would be rejected at deployment. To minimize concurrent impact during fabric maintenance or rolling updates, you set platformUpdateDomainCount to 20, the maximum supported. Fault domain count is a separate property used to protect against unplanned hardware failures.

Other Microsoft Azure Administrator (AZ-104) domains

Practice all 123 Deploy and manage Azure compute resources questions · Browse Microsoft Azure Administrator (AZ-104)