AZ-104 Question 140
Single answerYou are an Azure Administrator responsible for a multi-tier application hosted in Azure. One of your Windows VMs, which uses a managed disk and a public IP address, needs to be moved to a new resource group within the same subscription. Which action ensures the VM is successfully moved along with its dependencies?
- A
Use the 'Move to another resource group' option in the Azure portal and include the VM, its network interface, public IP, and managed disk in the same move operation
- B
Detach the VM’s managed disk within Azure portal, attach it to a placeholder VM in the new resource group, and then reattach it to the original VM
- C
Export the managed disk as a VHD, upload it to the new resource group’s storage account, and then create a new VM using that VHD
- D
Run a CLI command to move only the VM resource and separately re-create its public IP and managed disk in the new resource group
Show answer and explanation
Correct answer: A
Explanation
When moving a VM to another resource group, you must include all dependent resources (like its managed disk, network interface, and public IP). The Azure portal's 'Move to another resource group' feature allows you to select the VM and its related resources in a single operation, preserving the original configuration and minimizing downtime.
- A. Correct.
Including all dependent resources in a single move operation preserves existing configurations and ensures the VM is functional after the move
- B. Incorrect.
Simply detaching and reattaching the disk can interrupt the configuration and requires extra steps to preserve the network interface and public IP
- C. Incorrect.
Exporting the disk and creating a new VM is more complex, leading to potential reconfiguration issues and downtime
- D. Incorrect.
Moving only the VM resource without its dependencies prevents the VM from functioning properly after the move