What are the problems with running a file server (FreeNAS) in a VM?
I have a FreeNAS file server that uses ZFS for redundant storage. I'm considering running this as a virtual machine using VMWare Workstation (I would give the VM access to the physical disks, rather than using virtual disks).
What problems might I come across, and is this a terrible idea?
Solution 1:
Performance would be my main concern; even if you're going to give the VM "direct" access to the physical disks, there's still VM-related overhead, and if you've got any decent load you'll have problems earlier in a VM than you would on a physical machine. But benchmark it, it might work OK for your workload.
(For the record, I'd definitely lean towards "bad idea", although I reserve "terrible" for things much, much worse than this).
Solution 2:
You really very much do not want to do this, unless you can verify that your virtualisation platform doesn't lie to your guest OS about what it's actually written to the underlying physical disks.
Case in point:
(deleted link to defunct forum)
User permanently lost 10TB of data this way.
Virtualbox with its default settings, for example, does lie about this.
Here is another thread on the same issue, and here is the section of the documentation which explains how to change the setting to tell it not to lie about commits.