FreeBSD on EC2 FAQ

In the week since I announced the availability of FreeBSD on EC2 I've been hearing some questions many times; in the interest of my spending less time replying to emails (and more time fixing bugs and writing code), I figured I'd answer some of these questions publicly here.

How do I get started with FreeBSD on EC2?

Read Amazon's EC2 Getting Started Guide. When you get to the 'Choose an AMI' step, click on the 'My AMIs' tab, select 'Public Images' from the 'Viewing:' drop-down box, and then enter an AMI # from the FreeBSD on EC2 status page into the box. Then select the AMI which is shown.

When will a FreeBSD 8.x AMI be available?

Soon. I merged a long list of fixes to stable/8 earlier today and I'll be building an AMI for 8.2-RC1.

What's the deal with these 'lock order reversal' messages I keep seeing?

FreeBSD contains a system called 'WITNESS' which detects bugs which could result in deadlocks. It also produces false positives from time to time.

There are three lock order reversals which are very commonly seen and appear to be harmless:

  1. The ufs lock in vfs_mount.c vs. the devfs lock in vfs_subr.c.
  2. The bufwait lock in vfs_bio.c vs. the dirhash lock in ufs_dirhash.c.
  3. The ufs lock in vfs_subr.c vs. the bufwait lock in ffs_softdep.c.

If the lock order reversal you're seeing is one of these, just ignore it. Otherwise please file a PR (especially if you see the letters 'vm' somewhere, since that makes it more likely to be related to the Xen code).

I managed to trigger a FreeBSD kernel panic; now what?

Start by checking the FreeBSD on EC2 status page to see if it is a known bug. If it isn't, please look in /var/crash for files named info.X and core.txt.X. Please keep these somewhere safe (i.e., if you're going to kill the EC2 instance, download them first).

Submit a PR, including the contents of the info file and (if one exists) the backtrace from the core.txt file. Then send me an email so that I can take a look at the PR.

Why doesn't ZFS / pf / anything else loaded as a kernel module work?

I didn't ship a full set of kernel modules on the AMI I built. Most modules are irrelevant (e.g., drivers for devices which don't exist in a paravirtualized world), but I'll add the rest back into a future AMI.

What about other BSDs?

I'm hoping that NetBSD will be available soon. The NetBSD Xen code [EDIT: at least, the paravirtualized code — I haven't looked at their HVM support] is in a much better state than FreeBSD's Xen code, and I had actually expected to announce a NetBSD AMI first; but we ran into a problem a few months ago which I'm working with a NetBSD developer to fix.

I have no idea if OpenBSD or DragonFlyBSD have any Xen support, but if they do I'd be happy to work with their developers to get them into EC2.

What about other clouds?

I'd be happy to work with other cloud vendors to help them support FreeBSD, especially if they can pay for my time.

Who paid for this work?

I didn't get paid for this. (Or, depending on your point of view, Tarsnap users paid for this work.) Amazon provided me with some AWS credits to pay for the instances I launched while testing the code, but that's all.

A while back I asked people if they could put money towards hiring someone to work on the FreeBSD Xen code, but in the end I just did the work myself.

Where can we send money to support this?

If anyone wants to give me money, I certainly won't object. I can't honestly say that it would result in me getting anything done which I wouldn't do eventually anyway; but money can certainly influence the relative priorities of various tasks.

Alternatively, I'd be very happy to see more people donate to the FreeBSD Foundation, since they're still $140k away from hitting their fundraising target for 2010 — and if you write "please support work on FreeBSD/Xen" in the comments box, there's a good chance that it will somehow end up helping with EC2.

Posted at 2010-12-20 22:50 | Permanent link | Comments

Announcing FreeBSD on EC2

One of my largest complaints about Amazon EC2 ever since it launched has been my inability to run FreeBSD on it. Judging from the feedback I received to two earlier blog posts, I haven't been alone. The problems keeping FreeBSD out of EC2 have always been more FreeBSD-related than Amazon-related, however, and over the past month I've been hacking away at FreeBSD's Xen code, to the point where I can say something I've been waiting to say for a long time: FreeBSD now runs on Amazon EC2.

There are some caveats to this. First, at the moment only FreeBSD 9.0-CURRENT can run under EC2; I haven't merged bug fixes back to the stable branches. Second, at the moment FreeBSD only runs on t1.micro instances, for reasons I can't discuss (NDA) but hope will be resolved soon. Third, this code hasn't received very much testing and is almost certain to have more serious bugs, so it should be approached as an experimental, not-ready-for-production-use system for now. On the postive side, however: Thanks to Amazon's recently announced Free Usage Tier, if you're not already an AWS customer you can sign up now and play with FreeBSD for a year without paying a cent!

Being the guy who gets to make the announcement will probably make people think that I did all the work for this, but really I only did the final month of bug fixing and EC2 packaging. In no particular order, I'd like to thank Kip, Adrian, Justin, and Doug for the work they did to get FreeBSD's Xen code to where I started working on it; Robert, John, Kostik, and Scott for helping me track down some of the nastier bugs over the past month; and Martin, Jeff, James, Attila, Eden, Matt, Zeeshan, and Miles at Amazon for answering innumerable questions and helping me with testing my various attempts. I've seen people point to the years without FreeBSD and accuse Amazon of not listening to their customers; I'd like to dispel that myth right here: Amazon heard you, and there's no way I could ever have done this without the assistance they provided me.

Now let's bring some daemons to this cloud!

Posted at 2010-12-13 19:00 | Permanent link | Comments

Supporting FreeBSD

Dating back thousands of years, December has been a time of gift-giving. It's a good time for it: By midwinter, it's clear who has surplus from the past year's harvests, and who needs help to get through until spring. December is a good month for charity in modern times, too: In many parts of the world, it's the last opportunity to get a tax receipt for the current tax year.

There are many charities and foundations soliciting donations at this time of year, but as a FreeBSD user and developer, the FreeBSD Foundation is the one closest to my heart. Last year I donated the profits made by the Tarsnap online backup service in December to the FreeBSD Foundation, and I am pleased to announce that I will once again donate all of the profits made by Tarsnap in December to the FreeBSD Foundation.

The FreeBSD Foundation plays a very important role in supporting and sponsoring FreeBSD development; while FreeBSD, as an open source project, is mostly developed by volunteers, there are moments when money is vital — buying hardware, obtaining legal advice, paying for developers to travel to conferences, etc. — and many others where it can dramatically speed up development — for instance, in cases where basic infrastructure work is needed but isn't "sexy" enough for anyone to work on it otherwise.

The FreeBSD Foundation launched their end-of-year fundraising campaign last week, and I hope my readers will join me in supporting them — either by making a donation directly, or by signing up for secure backups and increasing the amount I'll be donating. Remember: The more you give, the better FreeBSD will be.

Posted at 2010-12-01 12:35 | Permanent link | Comments

Recent posts

Monthly Archives

Yearly Archives


RSS