I am also interested in allowing Windows VMs access to GPU resources. Is this possible in this situation?
To directly passthrough a PCIe graphics card, you will need:
- two PCIe graphics cards (one if certain tricks are used, like moving the card by scripts from the hypervisor system to the guest system on bootup)
- a mainboard that supports Intel VT-d or AMD Vi (formerly IOMMU)
- hypervisor software that supports it
It seems that unfortunately, Virtualbox does not currently support it. If this is a hard requirement, you may need to use KVM on Linux or illumos, VMware ESXi or Microsoft Hyper-V, all of them support it (although with different configuration work needed).
Is it possible to host a Windows/Linux VM that uses a zfs zpool or vdev instead of going direct to the hardware for file system access?
Yes, it is possible. Here are the relevant commands, taken from Johannes Schlüter's blog post:
# zfs create -V 10G tank/some_name
# chown your_user /dev/zvol/rdsk/tank/some_name
# VBoxManage internalcommands createrawvmdk \
-filename /home/your_user/VBoxdisks/some_name.vmdk \
# VBoxManage registerimage disk /home/your_user/VBoxdisks/some_name.vmdk
Alternatively you could use COMSTAR to serve the zvol over iSCSI.
While this has only slight additional overhead and no direct advantage in the local case, you may profit from it when you want to spread out and for example add another (redundant) storage server, or when moving the storage to a separate box.
In your specific case I would not do this, but there exists the option (also with NFS instead of iSCSI, but when using zvols instead of file systems there is no immediate advantage if both are properly configured).
Is there a better way of doing this, or have I picked the best option?
- If you want to use Virtualbox, this would be what I would do
- If you are flexible with regards to the hypervisor, you may have a look at SmartOS (ZFS, Zones and KVM in a small almost stateless server operating system built especially for hosting virtual machines)
- If you require PCIe passthrough for graphics cards, you may need to use Linux+KVM, ESXi or Hyper-V as the hypervisor, virtualize the Solaris/illumos storage VM, passthrough the disks to it and serve them back over NFS or iSCSI to the hypervisor, where it is then used normally. This is also known as All-in-One storage appliance (AiO), I suggest reading about the concept in gea's excellent manual (see linked PDF at the top). It sounds complicated, but once setup, it is surprisingly simple and flexible, as you can spread it out from virtual network to physical network at any time, can replace hardware as usual and the whole approach is layered. It has some downsides, but I will only go into them if you are interested, as they are quite a niche.
Regarding your edit:
- Have one physical machine.
- Minimize the potential for data loss as the result of hard drive failures and other file system problems.
- Run a Windows 2016 server OS plus some applications like Exchange, sql server. GPU is required here
- Run a modified CentOS system (FreePBX).
- Run some other virtual machines, preferably also with GPU support.
- Supplement and eventually replace a Synology RS812+ box.
- Minimize expenditure on software, allowing more/better hardware for my budget.
In broad terms, you have two possible All-in-One setup options - storage itself virtualized (like in the napp-it readme I've linked) or storage on the hypervisor. I will call them A and B to compare along your points.
- A and B are equal, because both are on the same physical machine.
- A and B are almost equal, because both systems can use ZFS. With A, you are free to choose your storage OS (Solaris, illumos, Linux, BSD), with B, you have to choose something that supports ZFS and PCIe passthrough for VGA (currently only Linux and FreeBSD). This also affects your choice of hypervisor (ESXi, Hyper-V, KVM with A, and only KVM with B).
- A and B are equal. Take note however, that a single GPU can only be passed through to a single running VM, which occupies it completely. Switching GPUs requires shutdown of the affected VMs. If you require shared GPU support, your options are limited: Nvidia Tesla/Grid (very expensive) or new Intel Skylake shared GPUs (not very powerful, still experimental, see KVMGT presentation).
- No problem in both cases, as a virtual VGA card is sufficient.
- See point 3, depending on the number of VMs it may be ok to buy multiple cards or a single Grid card or wait until sharing is implemented properly for all cards in KVM.
- Both cases support the use of iSCSI and NFS for internal and external (meaning real network) use, it depends on your preference for administration. Also both can use storage from the NAS/SAN (assuming from the datasheet, I don't have the system myself).
- Regardless of your choice, all software can be run without any license cost, except of course Windows Server plus needed CALs (but that could be replaced with samba4), and Solaris (can be replaced by an illumos distribution like OmniOS, OpenIndiana or SmartOS). The Grid solution may have additional license costs, I did not look into it because the hardware itself is so expensive it is not useful for these cases.
So, it largely comes down to preference:
- If you are comfortable with Linux administration (including ZoL) and KVM setup (can be a bit tricky depending on hardware and distributions), you can bypass the additional storage VM and need for small SSD/HDD if you go for solution B.
- If on the other hand you want to choose from the full range of options and use the best system for every case, you might profit from the flexibility of solution A (although slight internal network overhead may be occurring here).