FreeBSD/Xen port

This wiki page documents the state of FreeBSD on Xen. Below are reported the several configurations on which FreeBSD can run XEN.

32-bit Intel/AMD (i386)

FreeBSD supports both hardware virtualized (HVM) and fully para-virtualized (PV) kernels on i386. PV drivers are supported only with the PV kernel.

A GENERIC (or similar) kernel should be used in HVM configurations.

A custom-compiled XEN kernel is required for full virtualization. Para-virtualized i386 kernels require options PAE to be included in the kernel configuration.

64-bit Intel/AMD (amd64)

FreeBSD supports only hardware virtualized (HVM) kernels on amd64; however, PV drivers are supported in this configuration.

While a GENERIC (or similar) kernel will work, a custom-compiled XENHVM kernel will add PV drivers, improving performance, etc.

Notes on PV drivers

In addition to emulating physical devices, Xen supports para-virtualized drivers, which provide better performance and integration. FreeBSD supports the netfront (network interface), blkfront (storage device), and Xen console devices. These devices can be probed and attached if xenpci is configured into the kernel.

The netfront driver attaches as its own ethernet driver, xnX.

The blkfront driver attaches as a block storage device, but emulates the adX and daX disk namespaces used by the ATA and SCSI drivers based on the disk number presented by Xen.

Amazon EC2

FreeBSD 9.0-CURRENT and 8.2-STABLE are operational on EC2 t1.micro instances. Work is ongoing to improve the stability and extend support to other instance types. More details are available at http://www.daemonology.net/freebsd-on-ec2/

Old FreeBSD/Xen port wiki page

You can refer to the following page for the old project effort: http://wiki.freebsd.org/FreeBSD/XenOld

Status and TODO

Current FreeBSD status, as XEN support, and subsequent TODO list are reported in the following presentation:

http://xenbits.xen.org/people/attilio/presentations/FreeBSD_developers_summit_XEN_2012.ppt

The following tasks need to be completed in order for full 64bit PV to be functional.

Task

Description

Functionality

Boot to ddb

Basic stubs to get kernel debugger running

[DONE]

Boot to single user mode

Basic kernel/user boundary entry/exit

[30%]

Boot to multiuser mode

Validate drivers, domain control etc.

[TODO]

Boot to MP

ipi setup and mmu update path races

[TODO]

Warnings

Setup

FreeBSD still cannot run as a Dom0 host, which means you need to setup with a different Dom0-capable operating system. A list of Dom0 kernels is available here:

http://wiki.xen.org/wiki/Dom0_Kernels_for_Xen

Once you have selected your system of preference for running a Dom0 host instance, some work is needed in order to get it ready. First of all you may need to install the Host system. You can find instructions about how to setup, officially supported, host systems here (please refer to each project page):

http://wiki.xen.org/wiki/Category:Host_Install

After that, some configuration tips are necessary. Please follow advices reported here:

http://wiki.xen.org/wiki/Category:Host_Configuration

At this point your guest FreeBSD can be booted in the selected configuration.

GENERIC kernel will boot in as HVM guests but won't use any performance optimization. In order to do so, both i386 and amd64 kernel should be compiled as XENHVM kernels.

Additively, i386 can also work as a PV guest by building the XEN kernel configuration.

Updates

Several companies and individuals have worked to FreeBSD-XEN support so far. For questions about FreeBSD on xen messages can be sent to the dedicated mailing list:

http://lists.freebsd.org/mailman/listinfo/freebsd-xen

or the following individuals can be separately contacted:

Will Andrews - will AT FreeBSD DOT org

Sean Bruno - sbruno AT FreeBSD DOT org

Justin T. Gibbs - gibbs AT FreeBSD DOT org

Bret Ketchum - Bret_Ketchum AT dell DOT com

Kenneth D. Merry - ken AT FreeBSD DOT org

Kip Macy - kmacy AT FreeBSD DOT org

Cherry G. Mathew - cherry AT FreeBSD DOT org

Colin Percival - cperciva AT FreeBSD DOT org

Attilio Rao - attilio AT FreeBSD DOT org

FreeBSD/Xen (last edited 2013-02-23 07:02:32 by CherryMathew)