Skip to content


Xen Hackathon crazy idea: insmod xen

One of the fun things about a hackathon is the chance to get everyone together in a room and just talk about crazy ideas you might try at some point in the future.

One of the advantage that a certain competing virtualization technology has over Xen is that you don’t have to reboot to start using it. It’s not that big of a thing, but if you just want to play around with VMs, the additional step of rebooting and probably having to muck about with a grub entry makes it pretty certain that casual users will prefer our competition.

Wouldn’t it be great, someone said, if you could just do “insmod xen” in a running kernel, and have it hoist up the kernel (which is currently running on bare metal), put Xen underneath, and make the currently running kernel into domain 0?

The idea sounds pretty crazy at first, but after some examination, it’s actually quite do-able. In fact, there’s precedent: Windows 2008, apparently, does that when booting into Hyper-V. It may involve a certain amount of switching from bare metal code to PV code; but there’s precedent for that too, in the form of SMP alternatives.

One thing that it would depend upon is another project we’ve been kicking around for a year or so now, that being running dom0 in an HVM container. That would greatly reduce the amount of PVOPS necessary to run Linux as dom0, making the “hoist” a lot cleaner.

We have a lot of work to do before this can become a priority, but it’s a project that’s attractive enough that I’m sure someone will pick it up in due time, at which point there’s no technical reason that Xen can’t be as convenient for casual users to being using as any other virtualization technology out there.


Be Sociable and Share!

Posted in Community, Events, Xen Development.

Tagged with .


2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. sytoka says

    Maybe there is a solution more simple : kexec!

    linux kernel launch kexec which lauch xen which restart just linux kernel.

  2. dunlapg says

    sytoka: Yes, kexec was mentioned when I brought up the discussion. But as I understand it, what kexec will do is start an entirely new, fresh kernel instance, throwing away all of the old state. Although it may be faster than rebooting, especially on expensive server hardware (we’ve got some boxes which seriously take 4 minutes from power-on to bootloader), it still has the same effect: you throw away all of your currently running programs and state. That’s not what happens when you decide you want to run using other common Linux virtualization technologies, and for casual users, it’s an impediment.

You must be logged in to post a comment.