Get the ISO and the virtio-kmod port

curl -O ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/9.0/FreeBSD-9.0-RELEASE-amd64-bootonly.iso
curl -O ftp://ftp.freebsd.org/mirror/FreeBSD/ports/amd64/packages-9-stable/emulators/virtio-kmod-0.234349.tbz

Unpack the iso

mkdir headless /mnt/freebsd
mount FreeBSD-9.0-RELEASE-amd64-bootonly.iso /mnt/freebsd
cp -R /mnt/freebsd/ .

Unpack the virtio-kmod

cd freebsd
tar -xjf virtio-kmod-0.234349.tbz
cd ..

Patch the loader.conf

echo 'virtio_load="YES"' >> freebsd/boot/loader.conf
echo 'virtio_pci_load="YES"' >> freebsd/boot/loader.conf
echo 'virtio_blk_load="YES"' >> freebsd/boot/loader.conf
echo 'if_vtnet_load="YES"' >> freebsd/boot/loader.conf
echo 'virtio_balloon_load="YES"' >> freebsd/boot/loader.conf

Rebuild ISO

mkisofs -v -b boot/cdboot -no-emul-boot -r -J -V "FREEBSD_INSTALL" \
    -o VIRTIO-FreeBSD-9.0-RELEASE-amd64-bootonly.iso freebsd

Use virt-install –os-type=linux –os-variant=virtio26 to ebanle virtio disk and network.

Post Installation

echo 'virtio_load="YES"' >> /boot/loader.conf
echo 'virtio_pci_load="YES"' >> /boot/loader.conf
echo 'virtio_blk_load="YES"' >> /boot/loader.conf
echo 'if_vtnet_load="YES"' >> /boot/loader.conf
echo 'virtio_balloon_load="YES"' >> /boot/loader.conf
export PACKAGESITE="ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/"
pkg_add -r virtio-kmod