7

We currently have our own servers that have multiple KVM guests. If we ever decide to move to the Amazon EC2, would it possible to simply copy the VM image over or would I need to begin reconfiguring a new VM again on the cloud?

(It might sound silly but I'm still in the process of getting a grasp on the all the virtualisation/cloud stuff)

BenMorel
  • 4,215
  • 10
  • 53
  • 81
Mridang Agarwalla
  • 307
  • 2
  • 6
  • 15
  • I have created a video to show how to import KVM and XEN VM to Amazon EC2 http://fosshelp.blogspot.in/2013/06/how-to-import-kvm-virtual-machine-to.html – Saju Jun 22 '13 at 19:53

3 Answers3

2

since you can import RAW images, you just need to make sure your guests are using raw. if they aren't RAW, you can use qemu-img convert to convert the images to RAW. This conversion will remove any snapshot chain you may have created using qcow2

dyasny
  • 18,482
  • 6
  • 48
  • 63
  • 1
    I don't think this is right. EC2 images need to be running a Xen kernel. Also they use different device names, so fstab entries would need to be changed, maybe a few other things. – Jeremy May 11 '12 at 01:42
  • Yeah, some hacking will have to take place, but running a Xen kernel shouldn't be necessary when PV isn't used IMO. Should be good enough to boot the VM up and replace the kernel and whatever else. – dyasny May 11 '12 at 06:08
  • We have no choice about using paravirtual. HVM is only available for windows and cluster compute. – Jeremy May 12 '12 at 03:34
  • Actually, if EC2 can import RAW images, it probably means the import process inserts the right drivers into the image. Haven't tried it, though, just assuming it's the same as virt-v2v, which makes sense (at least to me) – dyasny May 12 '12 at 06:50
  • @Mridang Agarwalla did you ever get this to work? I've tried it this weekend and import request never completes for me, stays in Pending status forever. – Jeremy May 14 '12 at 02:11
  • Actually, the VM Import utility is not supported at all for Linux: http://aws.amazon.com/ec2/faqs/#What_operating_systems_can_I_import – Jeremy May 14 '12 at 02:33
  • Was anybody successful in such import? – Suncatcher Feb 08 '17 at 14:37
  • If you have invested in the creation of “golden” Linux images suitable for your on-premises environment, I have some good news for you. We have extended our popular VM Import/Export feature with support for multiple Linux distributions and virtualization formats. You can import the golden images that you currently run in VMware, Xen, and Microsoft Hyper-V environments and launch the resulting AMIs (Amazon Machine Images). You can also export Linux images, just like you can do with Windows instances today. https://aws.amazon.com/blogs/aws/vm-import-export-for-linux/ – Ashish Karpe Aug 07 '17 at 05:22
0

According to Amazon this is not possible: http://aws.amazon.com/en/ec2/faqs/#What_virtual_machine_file_formats_can_I_import

mailq
  • 16,882
  • 2
  • 36
  • 66
  • Hi maliq, if it does allow you to import vmdk images, can't I simply convert my KVM qcow2 image to a VMWare vmdk image using `qemu-img convert` — http://linux.die.net/man/1/qemu-img — and then import it? – Mridang Agarwalla Aug 26 '11 at 08:23
  • You can do whatever you want. If it is possible then it is worth a try. – mailq Aug 26 '11 at 08:25
0

This software claims to import KVM guests. But Windows only guests as it seems. http://cloudscraper.migrate2iaas.com/ec2download

Vld
  • 1
  • Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – slm Aug 28 '13 at 21:29