# FreeBSD as a KVM guest, best practices



## mamalos (Apr 13, 2016)

Hi all,

I have a few FreeBSD VPS' running under KVM (most of them are running FreeBSD 10.2 or later) and I was wondering what the best configuration would be with respect to performance. I found a few guides about using virtio(4) drivers for network and disks on FreeBSD guests, but they seemed to be rather outdated (they were discussing about FreeBSD 9.x and earlier).

For example, on one of my machines which is hosted on a proxmox server (which I have access to), I see no virtio_blk(4) devices and use ada(4) instead. Should I assume that I could have used a different device when creating the machine in order to use the quicker virtio_blk(4) or shouldn't I? And is there any analogous configuration options for other devices (nics/pci/etc)?

So, since I'm not sure what exactly applies and what doesn't, and since I'm not very familiar with KVM's esoterics, I'd be glad to know your opinions, which will surely be helpful to others being in my shoes.


----------



## mamalos (Apr 15, 2016)

So far I've tried *virtio* on the disk controller and on my nics and it has been proven to be the fastest choice. FreeBSD needs no additional modules to be loaded (or kernel recompilation) since at least 10.0, so devices are recognised automatically. ProxMox disks and nics need to be configured accordingly on machine creation -or additional disks need to be created if the VM already exists. Any other suggestions are very welcome.


----------

