Packaging Xen for a Distribution

This page is for people packaging Xen for a Linux distribution, not for users installing it. See Teams and Projects for how packaging-related discussion happens on xen-devel — there is no separate distros-only list.

What upstream expects

  • A Xen-enabled kernel as dom0. The default boot entry should switch to the Xen kernel once Xen packages are installed, and boot successfully with no further configuration.

  • The xencommons init script running at boot. Xen relies on it to bring up its core services.

  • A meta-package bundling the hypervisor, tools, and documentation, so a user can install one package and be ready to go: install distro → install the Xen meta-package (which updates the bootloader) → reboot.

  • Man pages installed alongside the xen-tools package.

  • PV drivers available in the installer environment. xen-netfront and xen-blkfront need to be in your installer’s ramdisk/initrd — without them, network (including PXE) and disk-based installs into a PV or PVH guest won’t see any devices.

Suggested defaults

Recommend LVM for guest storage in your documentation and default configurations: it’s the best-performing option, since it can use the in-kernel block backend directly rather than a file-backed one. See Storage in the User Handbook for the guest-side configuration.

Testing before release

  • Boot with the packaged Xen kernel and confirm dom0 comes up cleanly.

  • Create a guest and confirm the paravirtualized network and disk drivers are enabled by default, not just available.

  • Confirm bridging works: after creating the default xenbr0 bridge and starting a guest with a vif, the guest’s virtual interface should be added to the bridge automatically via udev.