This is an old revision of the document!
This page contains recipes for using qemu to run FreeBSD inside virtual machines (especially non-native virtual machines) on a FreeBSD host. The goal is to have a at least one “blessed” qemu recipe for each architecture FreeBSD supports. For more details on running qemu in general including network configuration, see the qemu page.
For systems installed from an ISO image, the instructions assume you have downloaded an appropriate ISO image from a release or snapshot. When installing a new machine that requires a disk image, you can use truncate(1) to create an empty disk image before installing, for example:
truncate -s 16g /path/to/disk.img
If you wish to boot without a graphical console, add -nographic to the qemu command line.
sparc64
Note: FreeBSD/sparc64 does not currently boot under qemu (see this thread), but once it does, these commands should probably work.
Install from an ISO
qemu-system-sparc64 -cdrom /path/to/disc1.iso -drive file=/path/to/disk.img,format=raw -boot d
Booting Installed System
qemu-system-sparc64 -drive file=/path/to/disk.img,format=raw