Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

GitHub Enterprise ships as an Open Virtualisation Appliance and File; it's intended to be dropped into existing virtualization setup like VMWare, VirtualBox, etc.

I'd like to run it inside of the AWS EC2 cloud (Github doesn't provide an AMI currently).

I've read around the subject and it seems like AWS EC2's VMImport tool only supports Windows VMs, currently.

I wonder if there exists a step-by-step guide to exporting an OVA/OVF appliance into an EC2 instance, so I can create an AMI of it and go from there? I've tried to follow this guide but I don't know how to follow steps 1-3, honestly; GHE only gives me limited ssh access to the instance, and I'm not sure what to look for or how to look for it. GHE seems to ship on an Ubuntu base distribution.

(I'm still quite a beginner-level linux sysadmin; I come from a Windows development background, but am quite capable of learning quickly.)

share|improve this question

2 Answers 2

It does appear that you can import an OVA/OVF using the ec2-import-image command:

Documentation from Amazon

Relevant text:

You can import VMware ESX VMDK images, Citrix Xen VHD images and Microsoft Hyper-V VHD images for Microsoft Windows Server 2003 R2 and 2008 R1 and R2. You can export previously imported EC2 instances to VMware ESX VMDK, VMware ESX OVA, Microsoft Hyper-V VHD or Citrix Xen VHD file formats. We plan to support import for additional operating systems, versions and virtualization infrastructure products in the future.

Just check to make sure that you're running the latest version of your AWS toolkits and you should be fine. You'd want to select the "Raw" format for -f and make sure that the other flags are correct. I have no experience with the github enterprise VM, so I can't get into specifics, but, with a little bit of poking, you should be fine.

ec2-import-instance DISK_IMAGE_FILENAME -t INSTANCETYPE -f FORMAT -a ARCHITECTURE-SYSTEM -b S3_BUCKET_NAME -o OWNER -w SECRETKEY

ec2-import-instance command reference

share|improve this answer
1  
At present, ec2-import-image only supports importing images that have Windows guest-OS', so, while useful, this doesn't help my specific case (Ubuntu OVF as mentioned, albeit only in passing) :-( –  Peter Mounce Oct 23 '12 at 22:10
    
Read closely - it says you can EXPORT to OVA, but only import VMDK –  Peter H. Mar 20 '13 at 1:54
    
You can import Linux instances via ec2-import-instance to this date. –  josten Dec 27 '13 at 16:01

I believe an OVA is just a tar file. You should be able to just extract the contained files with tar. Then you can get the vmdk image file. You should be able to convert that to a raw image with qemu-img.

The trick after that will be mounting up the raw image in a loopback device. You may need to to use kpartx to pull that off if the image is partitioned. You'll need to ensure the kernel on the image has support for the xen net device. I believe that the kernel config option is CONFIG_XEN_NETDEV_FRONTEND. If the GitHub image is based on Ubuntu, you'll find the kernel config at /boot/config-SOME_KERNEL_VERSION. If you're lucky, the kernel config will include that option. If you aren't lucky, you'll need to compile a custom kernel.

Also, you'll need to make sure the image has the files that would be needed by pvgrub to boot the image. This means that you'll need a grub1 compatible config at /boot/grub/menu.lst.

After doing all that, you'll have to upload and AMI using the right AKI for pvgrub. See this AWS doc for more info on that.

All in all, this will be a pretty difficult if the kernel isn't already built a way that supports the xen net devices. Good luck.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.