0

I would like to migrate an Ubuntu VM from google cloud platform(GCP) to Azure. I did a lot of research but couldn't find an easy way to do it.

One approach mentioned creating an image of the GCP VM, downloading and uploading it to Azure and then creating a new VM on Azure using that image. I was able to create the GCP image but after that, I couldn't find a way to upload it to Azure and create a new VM there using that image.

Can you please help on how to do it? Or if you have any other way to migrate from GCP to Azure please suggest that.

Thank you in advance!

  • Any update in this case? – Nancy Xiong Oct 8 '18 at 5:27
  • Thank you for the solution! But it still did not work, I gave up on this and did a manual copy of the important files from GCP to Azure. What happened is, I was able to create a VHD file. The size of VHD was around 400GB. But when I tried to upload it to blob in Azure storage it failed midway at around ~170GB. I tried uploading it multiple times, but every time it failed midway. – shantanuSpark Oct 8 '18 at 19:02
  • You can manually upload VHD files to Azure blob, this process might take a long time depending on your network connection and the location of your Azure storage account. You can also try other options like azcopy or powershell to upload your files. – Nancy Xiong Oct 9 '18 at 4:14
0

I was able to create the GCP image but after that, I couldn't find a way to upload it to Azure and create a new VM there using that image.

The VHDX format is not supported in Azure, only fixed VHD. You can convert the disk to VHD format using Hyper-V Manager or the convert-vhd cmdlet.

You can manually upload these VHD files to your blob in an Azure storage account or use the Add-AzureRmVhd cmdlet. You need to create a container and grab the URL needed to upload the VHD disk.

Then you will need to create an Azure image from that VHD disk. So set the source image using the ID of the managed VM image:

$vm = Set-AzureRmVMSourceImage -VM $vm -Id $image.Id

You can read the documentation for more details to create a managed image from the uploaded VHD and create a new Azure VM from the image.

You also can get more reference from this blog: Migrate On-Premises VHD files to Azure

0

You can use Azure Site Recovery (ASR) to migrate a VM from On Prem or from another cloud service provider to Azure. While we don't have the documented steps for GCP, we do have the steps required for AWS and while I have never used GCP the steps should be similar. If I have time in the coming weeks I will try to document the steps from GCP to Azure using ASR.

https://docs.microsoft.com/en-us/azure/site-recovery/migrate-tutorial-aws-azure

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.