I attended the Silicon Valley VMUG yesterday and there was an interesting question that was brought up at the end of Joe Sarabia's Software Defined Datacenter session (which was great BTW, folks stayed past the end and this was during lunch!). The question from the attendee was how to export an Amazon EC2 Instance and run that on an vSphere ESXi host? Joe's answer was that there is not a tool from VMware but there should be some 3rd party tools out there that could help with this task.
This was not something I had really thought about before since I do not use Amazon EC2 and of course that perked my curiosity. I assumed importing and exporting Instances to and from Amazon EC2 would be just as easy as it is on VMware vSphere. To export a VM in vSphere, you simply select the VM and then Export which can be outputted to either an OVF or OVA format.
After a quick search on Amazon's EC2 website, I found that you can export an EC2 Instance by using EC2 API Tools. So I went ahead and deployed both a Linux and Windows Instance and ran through the installation of the EC2 API Tools on my Mac OS X system at home. I tried to export the Linux Instance and it threw an error saying not supported which I thought was odd and then tried the Windows Instance and it threw another interesting error:
Client.NotExportable: Only imported instances can be exported.
My initial thought was that I must have done something wrong. I dug a bit more into Amazon's documentation which was not very easy to find and finally found the Exporting EC2 Instance documentation. It turns out there are a few "caveats" if you want to export an EC2 Instance:
Only the following operating systems are supported:
- Windows Server 2003 R2 (Standard, Enterprise, and Datacenter)
- Windows Server 2008 (Standard, Enterprise, and Datacenter)
- Windows Server 2008 R2 (Standard, Enterprise, and Datacenter)
This meant that you could not export any of your Linux Instances. In addition, these Instances must be uploaded by the user initially for them to be eligible for export. I also found there were several other export limitations:
- You cannot export Amazon Elastic Block Store (Amazon EBS) data volumes.
- You cannot export an instance that has more than one virtual disk.
-
You cannot export an instance that has more than one network interface.
I was actually quite surprised to see how difficult and restrictive Amazon has made it for exporting their EC2 Instances, I really thought it would have been just as easy as it is on VMware vSphere. I also came across this VMware KB 1018015 which provides an alternative to the EC2 API Tools, which has you install VMware Converter on the Windows system to export the EC2 Instance.
Mathew Lodge says
I met some of the folks from the AWS Import/Export team at VMworld last year. The restriction is there in order to comply with Microsoft Windows licensing (you can only import/export Windows VMs to/from EC2).
William Lam says
That's what I figured Matthew, thanks for confirming. Though I would have expected that the Linux Instances to be supported, but that's not the case. I'm not sure what their logic is there. Anyhow, not as easy as I had hoped ...
Morne Smith says
William...simple....Amazon wants to tie you into their echo system!
Kattrap says
Last time I checked you can only import Windows server as well.
AWS would probably say that it's better (performance/ less troublehshooting) to create an EC2 from their AMI and move the userdata to the new EC2.
Same as the rest of us would probably say when moving between any two hypervisor stacks.
William Lam says
I actually disagree with your last statement. I think moving a VM is much easier than just moving the data, especially when you can easily export it into a common standard such as OVF/OVA and import that into other hypervisors including vSphere, Hyper-V, etc.
Anonymous says
Hi Guys,
After lot of efforts & RND i managed to get below error while exporting an EC2 instance.
Client.NotExportable: Only imported instances can be exported
If we interpret this message it means "You could only export the instances that have been imported earlier”
So it's a compulsion that any Instance must be uploaded by the user initially for them to be eligible for export.
Also is this really an export limitation or the restriction is there in order to comply with Microsoft Windows licensing model which is you can only import/export Windows VMs to/from EC2.
I also found there were several other export limitations:
You cannot export Amazon Elastic Block Store (Amazon EBS) data volumes.
You cannot export an instance that has more than one virtual disk.
You cannot export an instance that has more than one network interface.
Could someone from Amazon please confirm the same?
Anonymous says
Himanshu@Cloud_baby
Hi Guys,
After lot of efforts & RND i managed to get below error while exporting an EC2 instance.
Client.NotExportable: Only imported instances can be exported
If we interpret this message it means "You could only export the instances that have been imported earlier”
So it's a compulsion that any Instance must be uploaded by the user initially for them to be eligible for export.
Also is this really an export limitation or the restriction is there in order to comply with Microsoft Windows licensing model which is you can only import/export Windows VMs to/from EC2.
I also found there were several other export limitations:
You cannot export Amazon Elastic Block Store (Amazon EBS) data volumes.
You cannot export an instance that has more than one virtual disk.
You cannot export an instance that has more than one network interface.
Could someone from Amazon please confirm the same?
Matjaž Antloga says
After some thinking don't see any real problem here, at least for smaller setups
Windows: use Converter
Linux: setup new machine then scp everything needed over WAN
downtime in both cases.
linux example: http://serverfault.com/questions/239138/migrating-from-one-dedicated-linux-server-to-another
Matjaž, https://twitter.com/balkancloud
Felipe Pasa says
Amazon sucks! i dont agree with this limitations
WHY NOT???? i only want to copy my Centos Machine to another server!
create a disk image is a basic function on my point of view.
sory about my english. is very poor
vrtigo1 says
I found this article while googling in hopes that someone has come up with a better method of exporting EC2 instances to VMware in the year or so since I have last done it. Using converter does work however I had to alter some of the storage drivers after exporting the EC2 instance in order to get it to boot in Workstation/ESXi. Overall it is pretty simple although it is a very manual process.
Beware_Cloud_Lock-in says
Beware! That's Cloud-Lockin
archangelwu says
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html
Exporting instances and volumes is subject to the following limitations:
You cannot export Amazon Elastic Block Store (Amazon EBS) data volumes.
You cannot export an instance that has more than one virtual disk.
You cannot export an instance that has more than one network interface.
You cannot export an instance from Amazon EC2 unless you previously imported it into Amazon EC2 from another virtualization environment.
karan says
Can you please provide any link or URL for exporting ec2 instance to OVF/OVA.
Thanks in advance.
fourthgrademathclub says
This is pretty rotten. Are there any other services besides amazon that might provide this ability? I'm thinking of moving off.