

VM export for EC2 - gtaylor
http://aws.typepad.com/aws/2012/05/vm-export-for-ec2.html

======
shykes
This is a useful tool, but spinning it as a victory against vendor lock-in is
disingenuous. VM formats are well-documented and do not constitute a barrier
to migration by any stretch of the imagination.

I would love to hear more about the real barrier to migration: the cost and
latency hit of cross-cloud network communication. Who cares if you can move
your app server to VMWare, if it needs low-latency access to 10TB of data
sitting in amazon-us-east?

~~~
rwmj
I helped to write virt-v2v[1], and one difficulty is changing the kernel
config / Windows registry config / drivers / etc so the guest can be booted on
another hypervisor (Amazon is Xen-based, VMware and KVM are completely
different and need different drivers). You have to delve into the filesystem
using libguestfs, and make some pretty complex changes.

As you say, the other difficulty is copying gigabytes of data across clouds.
My colleague at Red Hat wrote snap[2] which can turn Linux guests into digests
(basically a base distro name and list of packages and list of config
changes), so this can be reduced massively. We're currently extending this
work to support Windows and more Linux guest types.

[1] <http://libguestfs.org/virt-v2v>

[2] <http://mo.morsi.org/blog/node/347>

------
aychedee
Let's hope they support Linux exports soon then. This solves another problem
as well, which is easily moving images around availability zones.

~~~
cperciva
_moving images around availability zones_

Presumably you mean _regions_ here? Within any one region, you can use an AMI
in any of the availability zones.

~~~
aychedee
Whoops, yes of course. That's what I meant. Moving images between regions is
currently a pain.

~~~
cperciva
Agreed. Every time I publish a new FreeBSD AMI I spin up 7 instances and run a
bunch of "dd | ssh | dd" to send the bits out to the right places.

At this point I have the entire process scripted, and it's _still_ painful.

------
VanillaCoder
I'm a little unclear on the specifics of actually running a foreign VM on EC2
and vide versa. Don't AMIs usually contain special provisions for running on
Amazon's infrastructure?

------
newhouseb
This is awesome - what would be the remaining use case/advantage for using an
AMI when you can now snapshot to more widely supported formats and import
them?

Edit: Oh, this is windows only, significantly less exciting. I wonder why
linux isn't supported?

~~~
cperciva
_I wonder why linux isn't supported?_

Linux runs on EC2 via Xen/PV, which is a kernel-hypervisor interface not
provided by other (non-Xen) virtualization systems. Exporting linux AMIs would
require reaching inside your filesystem and modifying your kernel, which is
far outside of the scope of anything Amazon would want to do (both in terms of
"really complicated" and "liable to accidentally break things"). The same
applies to importing images, of course.

[I don't work for Amazon and I don't speak for Amazon. The above is
speculation based on information published by Amazon about EC2.]

~~~
ajross
It's not really complicated. If you have, say, a RHEL 6.2 image booting on EC2
you can take the same root filesystem and boot it with a kernel from any other
RHEL 6.2 installation with some editing of the grub configuration.

But you're right that Amazon isn't really interested in doing that work for
you. Linux people who really need this are no doubt already doing it.

~~~
cperciva
Sure, but if you're running a custom kernel you'd need to run a custom non-PV
kernel. And there's no remotely sane way for Amazon to figure out what
customizations people have made to their kernels.

------
cpg
How about making it easier to get the sources of the packages (for Linux) so
that things are easy to test locally?

Last time I checked (admittedly a little while ago), one had to do API calls
through some convoluted way.

I was tempted to script it.

------
h84ru3a
I'd like to see the dependence on PV-Grub lifted.

Maybe Amzn is just not too skilled working with various bootloaders?

~~~
cperciva
What's wrong with PV-grub?

~~~
h84ru3a
Nothing, if you like GRUB. What if I don't want to use GRUB and I just want to
use the OS's native bootloader?

~~~
cperciva
Then don't use paravirtualized Xen. Other boot loaders don't understand
Xen/PV.

~~~
h84ru3a
Does "other boot loaders" include NetBSD 5's bootloader?

~~~
cperciva
I believe so, yes. It certainly includes FreeBSD's bootloader.

