Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've a Windows EC2 instance running in one region and need to move it to another region (Tokyo and Singapore in this case).

Is that even possible? What potential problems do I need to watch out for? (I found http://stackoverflow.com/questions/2181849/ec2-instance-cloning which is describing how to do it, but appears to assume Linux instances, and to assume the same data centre. Is it possible to move my keys across to another region?)

I tried something similar with a Windows instance a few months ago, just trying to clone it in the same data centre, but I couldn't get it working quickly, so I had to give up and just create a fresh instance at that time. This time I've got a bit of breathing space, and want to research how to do it properly!

Root Device Type: ebs

Block Devices: sda1 xvdf

(both are ebs, "attached", and have Delete on termination set to "no"; sda1 is the root device)

The AMI is described as "Unavailable" (then an ami number).

share|improve this question
    
This open source project appears to have scripts to move snapshots between regions, and even Windows AMIs. rubyforge.org/projects/cloudyscripts (I'm just posting this as a comment, as I've not personally tried it, and from my shallow look it seems a bit hacky/fragile.) –  Darren Cook Dec 12 '12 at 5:33
add comment

2 Answers

have you tried this very recent feature: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html?ref_=pe_2170_27415460

I think it does just what you need. I tried to upload an image, but my reputation isn't high enough yet.

share|improve this answer
1  
Thanks, that does look useful for copying linux images to another region. (See my answer regarding Windows: Amazon explicitly say you cannot launch a copied AMI.) –  Darren Cook Dec 22 '12 at 8:24
    
Darren, i think after you copy the snapshot from one region to another, you'd just need to create a standard Windows instance and connect the copied AMI to it. Have you tried it this way? –  blpsilva Dec 24 '12 at 15:57
    
Thanks for the idea. No, I've not tried, but I'd be delighted to hear from someone who has done it with Windows and, say, blogged about it. Fortunately the need to setup Windows machines doesn't come round that often for me, so it might be a few months before I personally get chance to try it. –  Darren Cook Dec 24 '12 at 17:26
    
Hi Darren, this last tip I gave you was from my company's Infrastructure Manager. He's done it several times, from what he told me. But he's an introspective dude who doesn't have a blog :) Please try it, I think it'll work. –  blpsilva Dec 24 '12 at 19:32
add comment
up vote 1 down vote accepted

According to http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/Using_LaunchingInstaceFromSnapshot.html

Registering a snapshot works only for Linux/UNIX AMIs; although you can register a snapshot to create a Windows AMI, the AMI isn't launchable.

So, it looks like the cloning part is impossible for Windows, irregardless of same or different region. (Naturally I'd be delighted if someone knows different!)

Regarding moving from region to region, for Linux, this page shows a tool to do that (but the AMI image must be moved to S3 first). http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-MigrateImage.html

UPDATE: Regarding MigrateImage, I can't work out how to move the EBS snapshot image to S3, and vice versa. Also, https://forums.aws.amazon.com/thread.jspa?threadID=99335 says moving snapshot images to other regions cannot be done (as of Jul 2012).

Mar'13 UPDATE: Amazon have announced Amazon Machine Image Copy which allows copying AMIs from one region to another. The FAQ explicitly says you can copy Windows images (so presumably they will run!): http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html

share|improve this answer
3  
It is not possible to register an AMI from a Windows snapshot. Instead, launch a new Windows instance, stop it and swap the root volume with one created from your snapshot. –  Matt Houser Jan 2 '13 at 0:49
1  
Thanks @MattHouser, it worked!! See also stackoverflow.com/a/6379272/841830 for more details on how to do that. –  Darren Cook Jun 7 '13 at 5:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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