November 22nd, 2007 by Peter

I tested out QEMU on FreeBSD 7.0 to see what the I/O performance was like (this being my primary concern). I ran into the most issues with networking, but I have outlined how I got QEMU installed on my system. Overall, I am not happy with the performance of QEMU and have chosen not to use it.

Installation

cd /usr/ports/emulators/qemu && make install

Make sure to select KQEMU for a bit of a performance boost.

Configuration

/etc/rc.conf:

cloned_interfaces=”bridge0″
ifconfig_re0=”up promisc -rxcsum -txcsum”
ifconfig_bridge0=”inet 192.168.1.x netmask 255.255.255.0 addm re0 up”
autobridge_interfaces=”bridge0″
autobridge_bridge0=”tap*”

re0 is my LAN interface, bridge0 is the interface where you need to bind your actual LAN IP. The TX/RX hardware checksum disabling is to work around a bug in my ethernet interface, you do not need to add this.

/boot/loader.conf:

aio_load=”YES”
kqemu_load=”YES”
if_bridge_load=”YES”
if_tap_load=”YES”
kern.hz=”1024″

QEMU and FreeBSD as a guest

A commit has broken the emulated CD drive from working in FreeBSD, any ISO made after 6.2 has this behavoir. You can either do a netinstall or use a release prior to FreeBSD 6.2.