SOLVED

Move virtual machine between different accounts

Copper Contributor

Hello guys!
Do you know if it is possible to move a virtual machine to another Azure account?

15 Replies
best response confirmed by VinĂ­cius Barreto (Copper Contributor)
Solution
Hi, There is no direct way to migrate a vm from One Account to an other, of we speack about separate subscription from different owner. There a to possible ways - Grant the user of One subscription rights in the other subscription so that this user is able to use both subscription. Than you can move a vm and all relaxed resources to the other subscription. The other way is to just move the vhd-files from one storage account to an other by using e.g. Azcopy. In this case you only need the Security Information of the Storage account. But After the copy you have to rebuild the vm. Regards Niels

How,

 

Can you share steps how to do so? I am trying to share a subscription but nothing is happening.

 

Thanks in advance. 

Thank you!

Are you able to understad what to do?

Thanks for the links. 

Thanks for posting a great ariticle:thumbs_up::thumbs_up:

If the both subscriptions are in same tenant you can migrate VMs between subscriptions. 

 

Use following doc 

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/move-vm

 

If you want to move resources between two tenents then you have to use alternative method. We can use Azure Storage explore to copy VHDs from one SA to other SA in different tenant. Then using PowerShell or Azure CLI script we can create a VM from that VHD. 

Thanks for very helpful information

What about Linux VMs. Does the same process replicate linux VMs too?

Hello, I have not tested this procedure with Linux VMs, but I recommend that you do a test and if you can not find it, I believe you can find the most appropriate procedure in the same place where the procedure I recommended for Windows VMs is.
Good luck and sucess!

@Niels OpheyDoes this work for real? 

Yes, it is possible to move a virtual machine (VM) from one Azure account to another, but it involves a process called "Azure Cross-Subscription Move" or "Azure VM Migration." This process allows you to transfer resources, including virtual machines, from one Azure subscription to another, which can be helpful in scenarios such as organizational restructuring, billing changes, or mergers and acquisitions.

Here's an overview of how you can perform a cross-subscription move for a virtual machine:

Prerequisites:

  1. Azure Subscription Access: You need access to both the source (current) Azure subscription and the target (destination) Azure subscription.

  2. Resource Group: The VM you want to move should be located within a resource group. You cannot move individual resources between resource groups; you need to move the entire resource group.

  3. Resource Dependencies: Ensure that all resources associated with the VM, such as virtual networks, storage accounts, and network security groups, are within the same resource group or can be moved together.

Steps to Move a Virtual Machine:

  1. Prepare the Source and Target Subscriptions:

    • Ensure that you have the necessary permissions in both the source and target subscriptions.
  2. Create a Snapshot or Backup (Recommended):

    • It's a best practice to create a snapshot or backup of your VM before initiating the move to ensure data integrity.
  3. Initiate the Move:

    • In the Azure portal, navigate to the source subscription.
    • Select the resource group containing the VM you want to move.
    • Click "Move" in the toolbar, then select "Move to another subscription."
    • Follow the prompts to select the target subscription and resource group.
  4. Review and Confirm:

    • Review the resources to be moved and confirm the move operation.
  5. Monitor Progress:

    • The move process can take some time to complete, depending on the size and complexity of the resources being moved. You can monitor the progress in the Azure portal.
  6. Validation and Testing:

    • After the move is complete, thoroughly validate the VM and its associated resources in the target subscription to ensure everything is functioning correctly.
  7. Update DNS and Connectivity:

    • If your VM relies on DNS records or connectivity configurations, update them to reflect the new subscription and resource group.
  8. Post-Move Cleanup:

    • In the source subscription, you can choose to delete the resource group (if it no longer serves a purpose) or keep it for reference.

Please note the following considerations:

  • Resource Dependencies: Ensure that all resources associated with the VM can be moved together. If any dependencies cannot be moved, you may need to recreate them in the target subscription.

  • IP Addresses: VMs with public IP addresses may require reconfiguration of DNS records or reassignment of public IPs in the target subscription.

  • Data Transfer Costs: Be aware of potential data transfer costs associated with moving resources between subscriptions, especially if data needs to be transferred between regions.

  • Resource Locks: Ensure that there are no resource locks in place that could prevent the move operation.

  • Resource Limits: Be aware of resource limits and quotas in the target subscription to accommodate the new resources.

Before proceeding with a cross-subscription move, it's recommended to thoroughly plan and understand the implications of the move, especially in production environments, to minimize disruption and ensure a smooth transition.

1 best response

Accepted Solutions
best response confirmed by VinĂ­cius Barreto (Copper Contributor)
Solution
Hi, There is no direct way to migrate a vm from One Account to an other, of we speack about separate subscription from different owner. There a to possible ways - Grant the user of One subscription rights in the other subscription so that this user is able to use both subscription. Than you can move a vm and all relaxed resources to the other subscription. The other way is to just move the vhd-files from one storage account to an other by using e.g. Azcopy. In this case you only need the Security Information of the Storage account. But After the copy you have to rebuild the vm. Regards Niels

View solution in original post