About the Post

Author Information

Chris is a Software Engineering Master's student at Tartu University, with a Enterprise specialization. He has industry experience developing and operating massively scaled web applications.

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.

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