Building an EC2 AMI
I want to minimally make note of an interesting article containing some detail on how to build and maintain an Amazon AWS EC2 AMI.
How to port your OS to EC2, written by Colin Percival of FreeBSD and Tarsnap fame and maintainer of the FreeBSD AMI.
Before we can talk about building images, there are some things you need:
- Your OS needs to run on x86 hardware. 64-bit ("amd64", "x86-64") is ideal, but I've managed to run 32-bit FreeBSD on "64-bit" EC2 instances so at least in some cases that's not strictly necessary.
- You almost certainly want to have drivers for Xen block devices (for all of the pre-Nitro EC2 instances) or for NVMe disks (for the most recent EC2 instances). Theoretically you could make do without these since there's some ATA emulation available for bootstrapping, but if you want to do any disk I/O after the kernel finishes booting you'll want to have a disk driver.
- Similarly, you need support for the Xen network interface (older instances), Intel 10 GbE SR-IOV networking (some newer but pre-Nitro instances), or Amazon's "ENA" network adapters (on Nitro instances), unless you plan on having instances which don't communicate over the network. The ENA driver is probably the hardest thing to port, since as far as I know there's no way to get your hands on the hardware directly, and it's very difficult to do any debugging in EC2 without having a working network.
- Finally, the obvious: You need to have an AWS account, and appropriate API access keys.
Looks like these are the barriers:
Xen block device driver (search for
- Intel 10 GbE SR-IOV network driver
- Xen network driver
- Xen block device driver (search for
So this is probably a ways off but it could be an interesting achievement nonetheless.