Xen Hypervisor Dom0 and DomU Support
Xen is a GPLv2-license hypervisor for the Intel architecture
FreeBSD 8.0 onward includes i386 and amd64 DomU and Amazon EC2 unprivileged domain (virtual machine) support.
FreeBSD 11.0 onward includes Xen Dom0 privileged domain (host) support.
FreeBSD 14.0 onward supports UEFI Dom0 boot.
See the FreeBSD Handbook for more information.
FreeBSD Xen Notes
AMD CPU Support
AMD-based systems may require BIOS/Legacy Dom0 boot.
Live migration, save and restore
The version of Xen available in the ports tree supports live migration, save and restore of live guests. Keep in mind that in order to use live migration your virtual disk must be shared between the different Xen Dom0s (NFS, iSCSI...), and it must reside in the same path on the Dom0 filesystem. The usage is the following:
# xl migrate <vm name> <destination host>
The default transport used by xl is ssh, check the man page (xl(1)) for other options.
With save and restore you can take a snapshot of the current guest state and save it to disk as a regular file, including memory and device state. This allows you to restore a guest to a specific state without having to boot it again:
# xl save <vm name> <file>
Then in order to restore the guest:
# xl restore <file>
You can also take a snapshot of the disk in order to be able to do a complete checkpoint of a guest state.
Known FreeBSD Xen Limitations
- Suspend and Resume may not work
- The FreeBSD kernel debugger may not work
- MSI-X PV interrupts are not supported (FreeBSD)
- PCI devices with virtual functions work inconsistently (FreeBSD)
- PCI Passthrough is not supported (Xen/FreeBSD)
- ARM64 is not supported
Miscellaneous
Error creating domain 0 on boot indicates that VT-x extensions are unavailable or disabled in BIOS.
ZFS zvol-backed DomU virtual machines are supported with:
disk = ['/dev/zvol/zroot/freebsd,raw,hda,rw'] disk = ['phy:/dev/zvol/zroot/linux,xvda,w']
Some DomU virtual machines such as OpenBSD may support only one virtual CPU.
If your VNC display freezes or does not scale during the various DomU boot stages, try reconnecting.
DomU configuration files are not re-read on reboot.
The freebsd-virtualization mailing list and official Xen project resources may be helpful but at this stage you may be the first person to try your given configuration.
The established Xen documentation is generally applicable to FreeBSD.
More Dom0 development information can be found at: https://wiki.xen.org/wiki/FreeBSD_Dom0
More Amazon EC2 unprivileged domain information can be found at: http://www.daemonology.net/freebsd-on-ec2/
Any guest operating system supported by Xen on other platforms should be supported on FreeBSD.