Wednesday, April 25, 2012

Installing FreeNAS using virt-install

A simple way to install FreeNAS on a VM is to use virt-install. I had to add a sata controller since I have more than 4 drives:

virt-install -nFreeNAS -r 6144 --vcpus=2 --autostart --os-variant=freebsd7 --accelerate --network bridge=br0,model=rtl8139 --disk path=/mnt/img/FreeNAS.img --disk path=/dev/sda2,bus=sata --disk path=/dev/sdb2,bus=sata --disk path=/dev/sdb1,bus=sata -c /mnt/img/FreeNAS8.2.0B3.iso --vnc --controller sata

Note: I ended up not using the FreeNAS on a VM because attaching the host partitions to the VM ended up giving terrible performance on disk IO. This was true for both UFS and ZFS on fully or paravirtualized drivers.

Abandoning this approach and having the host manage its own disks greatly improved performance and am very happy with it. For every compartmentalized task such as media servers I'm still using a VM with the filesystem from the host mounted over NFS.

No comments: