## Install Azure Storage Explorer - Windows install ```powershell winget install --id=Microsoft.Azure.StorageExplorer -e ``` - MacOS install ```bash brew install --cask microsoft-azure-storage-explorer ``` - Manuel install can be downloaded from [Azure Storage Explorer – cloud storage management | Microsoft Azure](https://azure.microsoft.com/en-us/products/storage/storage-explorer/) - Once you have installed Storage Explorer and added your subscriptions, it should look something like this: ![[Pasted image 20240821180619.png]] ## Start disk copy > [!WARNING] Warning!!! > **Before proceeding with the VM migration process, make sure the target VM is stopped** - The first step in Storage Explorer is to navigate to the disk that is associated with the VM that will be migrated. In this case, the source disk is located in the **“mydev-rg**” Resource Group under the Visual Studio Enterprise subscription. Once there, select the disk to be copied and then click on the “Copy” button as seen below. ![[Pasted image 20240821180858.png]] - Next, navigate to the resource group in the target tenant that will contain the new VM. In this case, I’m choosing the **“migrate-rg”** Resource Group under the **“richardburrs”** subscription. Again, this subscription is in a different tenant. Click the “Paste” button at the top of the window pane on the right, as seen below. ![[Pasted image 20240821180931.png]] - A window will open to provide information for the disk that will be copied. Fill out the information for the disk name, region, availability zones and type. Once you’re done, click “Paste”. ![[Pasted image 20240821180952.png| 500]] - he process of moving or pasting the disk will start. As you can see below, there’s a progress indicator that shows the transfer rate and percentage complete. The transfer is very fast and increases over time. For example, this disk is 127 GB and took approximately 5 minutes to copy. The reason for the fast copying is because this process is being done on the Azure backbone. ![[Pasted image 20240821181012.png]] - Once the copy is complete, the disk will appear in the new location as you can see below. ![[Pasted image 20240821181034.png]] ## Create Virtual Machine\ - The final step is create a new VM using the migrated disk. To accomplish this task, log into the Azure portal using the account associated with the target tenant. Next, search for Disks and then select the one that was migrated. Click on the button at the top of Disk page that says “Create VM” to bring up the VM creation page. ![[Pasted image 20240821181147.png]] - If you’ve never create a VM in the Azure portal, here are two Microsoft docs that explain how to create a [Windows VM](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal) and [Linux VM](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal). I won’t outline all of the steps of creating the VM. However, make sure that the image field shows the disk. It will place it there for you, as you can see below. ![[Pasted image 20240821181210.png]] - Also, you won’t get an option to create a username and password if one was created previously. The credentials will be detected in the user accounts store on the disk. Once you’ve completed all of the configuration steps, create the VM to complete the process. Any installed applications and stored data on the source VM will be available on the newly created VM. - This example involved a VM with a single disk. If there’s an additional data disk attached to the original VM, the process in general will be the same. In that case, you will copy and paste both the O/S and data disk in Azure Storage Explorer. You will then create the new VM with the O/S disk and attach the existing data disk under the “Disks” section in the VM creation wizard. ## Troubleshooting - The subscription is not registered to use namespace `Microsoft.Compute` - Check under the Subscription>Resource providers. Ensure the `Microsoft.Compute` provider is registered ## Sources [Move an Azure VM to Another Tenant – DaRaw Techie](https://darawtechie.com/2021/07/19/move-an-azure-vm-to-another-tenant/) [The subscription is not registered to use namespace Microsoft.Storage - Microsoft Q&A](https://learn.microsoft.com/en-us/answers/questions/1239876/the-subscription-is-not-registered-to-use-namespac)