Nikhil Goud
Nikhil Goud

Reputation: 584

Migrate EC2 from AWS to Azure

We have a requirement to Migrate EC2 instance of AWS to Azure as VM, have been trying to implement the same from this source, unable to complete the process. Tried and stuck on Protection Group.

I'm looking in these other links

Migrating a VM from EC2 to Azure at 300 Mbps For this I'm able to create VM in Classis portal but unable connect to it only port 80 is active all other ports are not working See the Inline image where all ports are enabled

Migrate virtual machines in Amazon Web Services (AWS) to Azure with Azure Site Recovery

https://learn.microsoft.com/en-us/azure/site-recovery/site-recovery-vmware-to-azure

https://aws.amazon.com/ec2/vm-import/ on trying this I'm getting this unresolved EC2 API export to S3 ACL issue

Can anyone suggest me a workflow on how to implement this?

Upvotes: 0

Views: 5816

Answers (2)

SadiqhAhmed-MSFT
SadiqhAhmed-MSFT

Reputation: 171

There are multiple ways to migrate machines.

Azure Migrate: Server Migration is one tool that lets you do that and is the recommended way to rehost x86 machines to Azure. You can treat the EC2 instance (AWS VM) as though it were a Physical machine and migrate it to Azure as long as the Operating System on the machine is supported by the Physical Server Migration flow (also check the kernel version to ensure it is supported) https://learn.microsoft.com/en-us/azure/migrate/tutorial-migrate-physical-virtual-machines

enter image description here

That being said, EC2 VMs may have some changes that you’ll need to make before migrating them, or it may cause issues once in Azure. For example if they are using cloudinit for VM provisioning, you may want to disable cloudinit on the VM before replicating it because the provisioning steps performed by cloudinit on the VM maybe AWS specific and wont be valid after the migration to Azure. The other thing to note is if the VM is a PV VM (para-virtualized) and not a HVM VM you may not be able to run it as is because paravirtualized VMs use a custom boot sequence in AWS (you may be able to get over this challenge by installing GRUB 2 on the VM and building grub)

The recommendation, if you are using this approach, is to always perform a test migration first to test the process.

Upvotes: 0

Nikhil Goud
Nikhil Goud

Reputation: 584

I achieved this by downloading AWS EC2 VHD to an Hyper-V enabled machine on-premises.

Following are the steps.

  • Create VM from VHD and Remove AWS related software.
  • Open Hyper-V manager and create VM from the downloaded VHD.
  • Log in to the VM and uninstalled AWS related services from control panel (AWS Drivers, EC2configService, AWS Tools for Windows, AWS SSM Agent)
  • All these changes were affected on the VHD.
  • Upload the converted VHD to Azure Storage (using the Azure PowerShell cmdlets)
  • Create av Azure VM-Image from that VHD in Classic Azure Portal
  • Create an Azure VM using the new Image.
  • Created a classic VM in Azure portal.
  • For creating a VM under Resource manager, created VHD of newly migrated VM and using that created a new VM in azure portal.

Mention any workflow other than this.

Upvotes: 2

Related Questions