Monthly Archives: February 2011

Stackfactory: a Tool for Building Disk Images

This is a guest post by David Noe,  founder of David explains how Stackfactory – the GPL tool used to build images – works and how others may benefit.

Stackfactory is a GPL tool used to create filesystems and disk images, complete operating systems ready to run on a virtualization platform such as Xen. The program itself is coded in python and defines an xml minilanguage for building filesystems programatically. The xml files are referred to as “specifications” or simply specs. The entire stackfactory pipleline from specification to disk image is shown here:


From left to right we start out with some specs (which are simple xml files describing how to build a filesystem). The stackfactory program processes these specs into a tree of filesystems. In the tree above (labelled Filesystem Repository) we have created three filesystems: CentOS, Gnome and Ubuntu. The CentOS filesystem contains the minimum amount of core packages that would allow one to run CentOS. The Gnome filesystem is derived from the CentOS filesystem and layers the Gnome desktop components on top of the CentOS core. Then there is a minimal Ubuntu filesystem, analogous to the core CentOS filesystem except that it has Ubuntu packages instead of CentOS packages. Each of these three filesystems were created by running a spec through the stackfactory process.

To be clear, the filesystem repository shown is merely a sample — stackfactory can build trees of filesystems with unlimited depth. The contents of any given filesystem in the tree depends on the specification used to build it. Each filesystem can become the parent of a derived filesystem via snapshots. Essentially the snapshot mechanism lets us create new filesystems with a defined starting point without disrupting the original filesystem.

The final step in the pipeline is to select a filesystem from the tree and bundle it for deployment. During bundling stackfactory transfers the contents of a filesystem into a disk image that will be ready to run under virtualization. This bundling process is also specification driven. Currently there are specs to turn filesystems into xen disk images, vmware vmdk’s, qcow files, tarballs, Amazon ami’s and others. Supporting new platforms is tantamount to writing a specification that can output a format suitable for that platform.

Key Benefits

  • Programmable: Uses a specification language instead of hard-coding behaviors.
  • Layered: Filesystems can be built incrementally using snapshots
  • Flexible: Decoupling the process of creating filesystems from creating disk images allows us to retarget filesystems to the maximal number of platforms. technical difficulties (all is live again)

Dear users!

We had a serious hardware failure at the facility that we use to host and, which has been exacerbated due to a holiday in the US yesterday. We are working on resolving these and update you as soon as there is a change.

A quick update as per 24th Feb:

  • is back up
  • is back up is back up
  • There may still be some minor issues with layouts due to Apache configuration and similar: these will be fixed in due course

Note that the following xen sites besides the blog are live:

Sorry for any inconvenience caused.

XCP goes github

Just a brief note that to say that the unstable development repositories for XCP are moving to GitHub to the following URLs:

The stable source trees for XCP will remain unchanged: the same is true for the patch queues for upstream XCP components such as Xen Hypervisor.

If you have followed the mailing list, you will also have seen that an XCP 1.0 release candidate is available. Once released, new stable source trees for XCP 1.0 will be created.