Saturday, 4 January 2020

Moving Azure VM to different Vnet.


Question No. 1: You have an Azure subscription named Subscription1. Subscription1 contains the resources in the following table: 
VNet1 is in RG1. VNet2 is in RG2. There is no connectivity between VNet1 and VNet2. An administrator named Admin1 creates an Azure virtual machine VM1 in RG1. VM1 uses a disk named Disk1 and connects to VNet1. Admin1 then installs a custom application in VM1. You need to move the custom application to VNet2. The solution must minimize administrative effort. Which two actions should you perform? To answer, select the appropriate options in the answer area. 

NOTE: Each correct selection is worth one point.
A) First Action:
  • Create a network interface in RG2
  • Detach a network interface
  • Delete VM1
  • Move a network interface to RG2
 B) Second Action:
  • Attach a network interface
  • Create a network interface in RG2
  • Create a new virtual machine
  • Move VM1 to RG2

#############################
Explanation:
 
Being an Azure Administrator sometimes I need to move my VMs to different Vnet. Directly we cant migrate our VMs to other Vnets for that purpose we need to delete that particular VM and than recreate in other Vnet with existing virtual disks and configuration.  Although it is in three easy steps;
  1. Shutdown your VM
  2. Delete the VM (keep save its virtual Hard disks)
  3. Create a new VM in target Vnet with original virtual Hard disks
But it is complex task as we need to keep track of virtual hard disk, vNics and IP configuration etc.  We can perform this task with help of Azure Recovery Services Vault. Following are the steps;

  1. Create Recovery Services Vault in the same region as in VM.
  2. After setting up Recovery Services Vault start manual backup of the VM.
  3. Stop and de allocate the VM you need to migrate to other Vnet.
  4. Ensure that target Vnet is ready to migrate your VM.
  5. Restore the backed up VM to the target Vnet.

No comments:

Post a Comment