Move Azure Virtual Machine to a Different Host Immediately | Exam AZ-104: Microsoft Azure Administrator | Microsoft

Move Azure Virtual Machine to a Different Host Immediately

Question

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure virtual machine named VM1. VM1 was deployed by using a custom Azure Resource Manager template named ARM1.json.

You receive a notification that VM1 will be affected by maintenance.

You need to move VM1 to a different host immediately.

Solution: From the Overview blade, you move the virtual machine to a different subscription.

Does this meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

B

You would need to redeploy the VM.

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/redeploy-to-new-node

No, the provided solution does not meet the goal of moving VM1 to a different host immediately. Moving a virtual machine to a different subscription does not result in it being moved to a different host.

To move a virtual machine to a different host, you can use either of the following methods:

  1. Azure Portal:
  • Stop the virtual machine.
  • Navigate to the virtual machine blade in the Azure portal.
  • Select the "Disks" option from the left-hand menu.
  • Select each disk that is attached to the virtual machine and click "Export".
  • Create a new storage account in the same region as the current virtual machine.
  • Create a new virtual machine using the exported disks and selecting a new host.
  1. PowerShell:
  • Stop the virtual machine.
  • Use the "Get-AzVM" command to retrieve information about the virtual machine.
  • Use the "New-AzResourceGroupDeployment" command with the "-mode Complete" parameter to deploy the virtual machine to a new resource group and a new host.
  • Start the virtual machine after the deployment is complete.

Note that moving a virtual machine to a new host may result in some downtime and it's recommended to take a backup or snapshot of the VM before performing any such operation.