I have a Windows EC2 AMI and instance in Virginia but want to migrate it to Oregon. My guess is an instance migration may be impossible since it's live but at least an AMI+EBS volume transfer would help!
Also, I know this has been asked before, but none of the answers apply as of late 2011.
Old solution 1,2 @ Is it possible to move an AWS EC2 AMI from one region to another region and if so how?. Problem: Solution 1 requires ElastiFox which is not supported anymore (doesn't work on any firefox since 3.6). Solution 2 is linux only
Old solution3 @ Amazon EC2 migration from one region to the other. Problem: Requires ElastiFox which is now unsupported/incompatible
'Partial' solution4 @ http://blog.taggesell.de/index.php?/archives/85-Amazon-EC2-How-to-migrate-an-EBS-backed-image-from-US-to-EU-or-wherever.html. Problem: This works 'outside' the AWS system by creating an image and then sending it over as a stream. Also it's not clear how the stream is protected against corruption (eg. packet loss etc). Edit: netcat is over TCP/IP, so it's reliable transport. It's still good to have windows check the disk upon bootup.
Hmmm, no responses, so I went ahead and tried a variant of solution 4. The original solution as-is failed because of
So I'll document what worked for me.
Setting it up
We're going to use Linux to copy the Windows volume, byte-for-byte across the network. It's actually very simple, I've just given detailed instructions to assist newbies.
1. Backup your Windows EBS volume at the source region
2. Create a Linux instance in your source region, in same zone I used Ubuntu, (search for "ubuntu/images" AMIs). Alternatively go to http://alestic.com/ and you'll find links to the latest official Ubuntu AMIs on the top. I used AMI ami-20f97410 as reference.
sudo apt-get install cpipe
3. Create a blank EBS volume at your destination region
4. Create a Linux instance in your destination region, in same zone Read the above section (#2) about the Linux instance. Again make sure the Linux and Windows volume zones are the same within the destination zone. My Ubuntu 11.10 32bit 'server' t1.micro instance was hitting 80% CPU during this disk write operation.
Start the copy process
1. Destination Log into the Linux EC2 instance and enter
2. Source Log into the Linux EC2 instance and enter
note : More new/current kernels will use /dev/xvdf for the Windows volume. Older kernels refer to it as /dev/sdf
note2 netcat is sometimes aliased to nc, in case you're using another Linux distro. cpipe just gives your feedback about progress and tranfer rates. netcat runs over TCP/IP, so it's robust against dropped/corrupt packets. You'd still want to perform a windows disk check on the destination once the transfer completes.
3. Wait I was getting an exact 3.00MB/sec (Mbytes, not Mbits) throughout this operation from the east to west coast. My 30GB image took 2hours, 50 minutes.
4. Create new Windows EC2 instance We have a volume but a EC2 instance/machine is needed to actually boot anything. If go use the AWS console GUI to go volume->snapshot->AMI, AWS incorrectly creates a Linux (?!?) VM that doesn't boot because the EC2 configuration is now garbage. We work around that by
5. Cleanup Remember that you've ONLY done the following
If you terminate the above, it's gone forever, no AMI to relaunch it. So, I would highly recommend
Conclusion It's a LONG writeup, but I left no details for newbies. The above worked 100% for me migrating from US-East (Virginia) to US-West (Oregon). I'm in CA and did this to bring the VM closer to me without hitting northern CA's higher charges.