How to migrate AWS EC2 instances back to a local VMware or Proxmox environment?

Learn how to migrate AWS EC2 instances back to VMware or Proxmox with free command-line methods, see their limits, and find a simpler way with Vinchin Backup & Recovery.

Free Download
for VM, OS, DB, File, NAS, etc.
richard-yang

Updated by Richard Yang on 2026/11/24

Table of contents
  • Introduction

  • Before you start: plan your AWS EC2 migration

  • Three free methods at a glance

  • Method 1: Export with AWS VM Import/Export

  • Method 2: Migrate with snapshot, coldsnap and qemu-img

  • Method 3: Convert with virt-v2v (Proxmox only)

  • Where free AWS EC2 migration methods fall short

  • Validate the VM and cut over

  • A simpler AWS EC2 migration with Vinchin Backup & Recovery

  • Final thoughts

Introduction

Cloud bills that keep climbing, data-residency rules, latency to on-premises systems and a wish to get more from hardware you already own are the usual reasons teams bring workloads home. If you are wondering how to migrate AWS EC2 instances to a local VMware or Proxmox environment, the honest answer is that AWS gives you no one-click path back: you have to export the disk, convert it, import it and fix the guest so it boots on a hypervisor.

This guide walks through that AWS EC2 migration with free and open-source tools, with the command lines for each step. It covers Windows and Linux instances, and it shows how to move an instance to VMware (aws ec2 to vmware) or to Proxmox VE (aws ec2 to proxmox). After the three manual methods, we explain where they fall short and show how we handle the same job with Vinchin Backup & Recovery.

Before you start: plan your AWS EC2 migration

A little preparation saves most of the failed boots. Work through this list for each instance before you pick a method.

  • Check the OS. Know whether the guest is Windows or Linux, BIOS or UEFI, and which kernel or Windows build it runs. A hypervisor only boots a disk if the guest has the right storage and network drivers.

  • Take a safety copy. Create an AMI or an EBS snapshot first. Every method below starts from a copy, but you want a rollback point.

  • Size the transfer. Note disk sizes and your bandwidth. A 500 GB disk over a 100 Mbps link needs roughly 11 hours of pure transfer, and AWS data-transfer-out charges apply.

  • Prepare a Linux workstation. The commands below run on a Linux jump host that can reach both AWS and your datacenter. Install the AWS CLI, qemu-utils and, for Proxmox, libguestfs-tools.

  • Pick a cutover window. The instance keeps running while you copy a snapshot, so changes made after the snapshot are not in the copy. Stop or quiesce the application before the final copy.

If you also move physical servers, our P2V to Proxmox guide covers the same driver issues from the other direction.

Three free methods at a glance

No single manual method fits every instance. This table shows where each one works.

MethodTargetsBest forMain catch
1. AWS VM Import/ExportVMware, Hyper-V, Citrix (OVA, VMDK, VHD)Small single-disk Linux instancesStrict eligibility rules; many instances cannot be exported
2. Snapshot + coldsnap + qemu-imgVMware, ProxmoxAlmost any instance, Windows or LinuxFully manual; guest drivers are your job
3. virt-v2vProxmox (KVM) onlyInjecting VirtIO drivers during conversionNeeds a local disk image and a Linux conversion host

Method 1: Export with AWS VM Import/Export

AWS offers a native export for EC2 instances, so it is the first thing most teams try. It is also the most restricted option. Per the AWS VM Import/Export limits, you cannot export:

  • Windows or SQL Server instances, or any instance created from an AWS Marketplace image

  • An instance with encrypted EBS snapshots or instance store volumes

  • An instance with more than one virtual disk or more than one network interface

  • Volumes larger than 1 TiB

The destination bucket must be in the same account and cannot use SSE-KMS encryption. In practice, this method suits a small single-disk Linux instance.

Step 1. Create the export task. Replace the instance ID and bucket with your own:

aws ec2 create-instance-export-task \
    --description "web01 export" \
    --instance-id i-1234567890abcdef0 \
    --target-environment vmware \
    --export-to-s3-task DiskImageFormat=vmdk,ContainerFormat=ova,S3Bucket=my-export-
bucket,S3Prefix=web01

Step 2. Wait for the task to finish. The State field moves from active to completed:

aws ec2 describe-export-tasks --export-task-ids export-i-xxxxxxxx

Step 3. Download the image from S3:

aws s3 cp s3://my-export-bucket/web01/ ./web01-export/ --recursive

Step 4. Import it on site.

  • VMware: in the vSphere Client, right-click a host or cluster, choose Deploy OVF Template, and select the OVA.

  • Proxmox: extract the OVA with tar -xvf, then create the VM from the OVF. The VM ID and storage name are yours to choose: qm importovf 100 web01.ovf local-lvm.

After the import, check the NIC model and boot order before you power the VM on.

Method 2: Migrate with snapshot, coldsnap and qemu-img

This is the most flexible free route, because it works for Windows and Linux and has no AWS export restrictions. You snapshot the EBS volume, download the snapshot as a raw image with coldsnap, convert it with qemu-img and import it into your hypervisor. Repeat for each volume of the instance.

Step 1. Snapshot the volume and wait for it:

aws ec2 create-snapshot --volume-id vol-0abc123def456789 --description "web01 migration"
aws ec2 wait snapshot-completed --snapshot-ids snap-0abc123def456789

Step 2. Download the snapshot to a raw image:

coldsnap download snap-0abc123def456789 web01.img

Step 3. Import to VMware. Convert the raw image to VMDK, copy it to an ESXi datastore, then clone it into an ESXi-compatible disk from the ESXi shell:

qemu-img convert -f raw -O vmdk web01.img web01.vmdk
vmkfstools -i /vmfs/volumes/datastore1/import/web01.vmdk \    
/vmfs/volumes/datastore1/web01/web01.vmdk -d thin

In the vSphere Client, create a new VM without a disk, then add an Existing hard disk that points at the cloned VMDK. For a Windows guest, choose a controller Windows can boot from, such as LSI Logic SAS, until you install VMware Tools.

Step 4. Import to Proxmox. Create an empty VM, import the raw image, attach the disk and set the boot order:

qm create 101 --name web01 --memory 4096 --cores 2 --net0 virtio,bridge=vmbr0
qm disk import 101 web01.img local-lvm
qm set 101 --scsihw virtio-scsi-single --scsi0 local-lvm:vm-101-disk-0
qm set 101 --boot order=scsi0

If the EC2 instance booted with UEFI, add --bios ovmf and an EFI disk when you create the VM. For Windows, attach the disk as SATA or IDE first, boot once, install the VirtIO drivers from the virtio-win ISO, and only then switch to VirtIO SCSI. The Proxmox migration guide explains the same Windows caveat.

If you are also moving VMs from VMware to Proxmox in the same project, see our VMware to Proxmox migration guide.

Method 3: Convert with virt-v2v (Proxmox only)

This method applies to Proxmox VE only, because virt-v2v prepares guests to run on KVM. It is worth the extra step for Windows, where the biggest problem after import is a missing storage driver. virt-v2v can pre-install VirtIO drivers into the disk image before you boot it.

Use the raw image from Method 2 as input. Install virt-v2v and the virtio-win package on the conversion host, create an output directory, then run:

mkdir -p /var/tmp/web01
virt-v2v -i disk web01.img -o local -os /var/tmp/web01 --block-driver virtio-scsi

virt-v2v writes the converted disk to /var/tmp/web01/web01-sda and a libvirt XML file next to it. Import that disk into Proxmox with the same qm disk import and qm set commands shown in Method 2.

The tool has limits you should know about:

  • For Linux guests it does not install new kernels or drivers. It only warns you when virtio support is missing, so check this before you convert.

  • It cannot convert a Windows guest whose system disk is a Dynamic Disk, or one that has Fast Startup enabled or is hibernated.

  • It does not move the data for you. You still need the snapshot download from Method 2.

Where free AWS EC2 migration methods fall short

The commands above work, and many admins use them for a handful of instances. The trouble starts when the project grows beyond that.

LimitationWhat it means in practice
Narrow eligibilityVM Import/Export rejects Windows, Marketplace images, multi-disk and multi-NIC instances, and volumes over 1 TiB
One disk at a timeSnapshots, downloads and conversions are separate runs per volume, and each one needs a script and a check
No incremental copyEvery attempt downloads the full disk, so a failed or repeated run repeats the whole transfer
Manual driver workWindows needs VirtIO or controller changes, and Linux needs the right initramfs, or the VM stops at boot
Downtime tied to copy timeThe data is only consistent if you stop the source, so the outage lasts as long as the final copy
No central trackingThere is no job history, schedule or alert; you keep the notes and the scripts
Scratch space and skillsYou need a large Linux staging host, plus AWS, QEMU and hypervisor know-how on one person

These gaps explain why teams that move more than a few instances look for a tool that handles the conversion and the drivers for them. Our cloud-to-virtual migration page describes that approach, and our comparison of Hyper-V, Proxmox and XCP-ng migration helps if you have not yet chosen the target platform.

Validate the VM and cut over

Whichever method you use, test the VM on an isolated network before you switch users to it.

  • Boot and log in. Open the console, confirm the OS starts cleanly and check the event log or journalctl for storage and driver errors.

  • Fix the network. The NIC is new hardware, so reconfigure the IP address, gateway and DNS. On Linux, check that interface names in the network config still match.

  • Install guest tools. Add VMware Tools or open-vm-tools on VMware, or the QEMU guest agent and VirtIO drivers on Proxmox. Remove AWS-specific agents you no longer need.

  • Test the application. Run a real transaction, not only a ping, and compare results with the instance still running in AWS.

  • Cut over. Stop the source instance, take a final snapshot and repeat the copy, point DNS or the load balancer at the new VM, and keep the EC2 instance stopped, not terminated, for a few days as a fallback.

If the final copy takes hours, plan the cutover for a maintenance window.

A simpler AWS EC2 migration with Vinchin Backup & Recovery

We built Vinchin Backup & Recovery so that moving an instance out of AWS is a restore job, not a conversion project. We back up the EC2 instance, then restore any restore point to a VMware host, without the export bucket, image conversion and manual import steps. The same flow also works when the target is Proxmox VE. Here we use VMware as the example:

Before you begin. Add both the source EC2 instance and the target VMware host to Vinchin Backup & Recovery, and create a backup of the instance first. Our EC2 backup tutorial shows how.

Step 1. Select the restore point. 

Select AWS EC2 instance

Step 2. Choose the VMware host as the destination. Pick the target ESXi host or the VMware environment that will run the VM.

Select a VMware host as destination

Step 3. Set the restore strategies. Adjust the options if you need to, or click Next to keep the defaults.

Select strategies

Step 4. Submit the job. Review the settings and submit the job.

Submit the job

Because the migration runs from a backup, it reuses the same repository you rely on for protection. Our cross-platform recovery capability restores a backup to a different platform, so the same approach covers other moves too, such as Proxmox to VMware or a VMware to Proxmox migration.

Compared with the manual methods, you do not need an export bucket, a staging host or command-line conversion, and the whole job runs from one console.

Ready to bring your EC2 workloads back on-premises? Start our 60-day free trial to run your first EC2 migration in your own environment, or contact our team to discuss your migration plan.

Download Free TrialFor Multi Hypervisors ↖        
* Free Secure Download

Final thoughts

An AWS EC2 migration back on premises is a routine task once you know how to migrate AWS EC2 instances step by step. AWS VM Import/Export works only for a narrow set of Linux instances. The snapshot, coldsnap and qemu-img route covers almost everything but needs careful scripting and driver fixes. virt-v2v helps Windows guests land on Proxmox. For a few instances, those free methods are enough. For a larger move, a backup-based migration is easier to repeat and to check.

Ready to try it on your own instances? Start a full-featured 60-day free trial of Vinchin Backup & Recovery and run your first EC2 to VMware or Proxmox migration. Our engineers are available to help if you run into questions during testing.

Share on:

Categories: VM Migration