VM to EC2 Migration Lessons

The following are a few lessons learned about migrating a VM to EC2 in the past 2 weeks. These notes are particular to dealing with an Ubuntu VirtualBox image. Hopefully they will provide some tips/guidance to others who are undertaking the same task.

1. Transforming a VM image on OSX can be very cumbersome / impossible. This is annoying to me as my default development environment is OSX.

For one, OSX cannot mount the ext4 file system in read/write mode. The default Ubuntu file system is currently ext4. EC2izing requires minimally modifying  the image’s fstab to conform to EC2’s mount points. As such, one of the Desktop-to-EC2 steps is mounting the image and writing a new fstab within it. There is the ext4fuse, a Fuse plugin, however this only allows supports read operations. From what I’ve read, there is a lack of ext4 support in Windows as well. A work-around for this is to mount the image file within a Linux VM, but the amount of work to organize this from a tool running on the host OS doesn’t seem worth the effort.

Another hurdle is Amazon only makes the AMI tools which bundle and push image available as RPMs. Fortunately, there is a rpm Darwin port and well documented steps to install the tools on OSX [http://verveguy.blogspot.com/2007/02/installing-ec2-tools-on-mac-osx.html].

For now though, I’m doing all my work within Ubuntu.

2. Make sure your images have SSHd installed!

I wasted a good number of hours trying to determine why an otherwise properly configured EC2 instance was not ssh-able. I had deployed a vanilla Ubuntu Server image, but could not connect. After fruitlessly toying with security group settings, I checked the image once again locally on VirtualBox, and sure enough OpenSSH was not installed. When installing Ubuntu Server, installing OpenSSH is an option that I simply overlooked. Without ssh, the instance is essentially useless.

Advertisements

About Chris Willmore

Software Engineering Master's Student at Tartu University

Trackbacks/Pingbacks

  1. Research group digest – ulno.net - March 18, 2011

    […] VM to EC2 Migration Lessons The following are a few lessons learned about migrating a VM to EC2 in the past 2 weeks. These notes are particular to dealing with an Ubuntu VirtualBox image. Hopefully they will provide some tips/guidance to others who are undertaking the same task. 1. Transforming a VM image on OSX can be very cumbersome / […] […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: