When comparing Oracle VirtualBox vs VFIO, the Slant community recommends Oracle VirtualBox for most people. In the question“What are the best tools for running Windows games on Linux?” Oracle VirtualBox is ranked 3rd while VFIO is ranked 4th. The most important reason people chose Oracle VirtualBox is:
VirtualBox is available for free with source code available [here](https://www.virtualbox.org/browser/vbox/trunk). A "VirtualBox Extension Pack" that includes virtual USB 2.0, VirtualBox RDP & PXE boot support is available only under a commercial license. VirtualBox is available on Windows, Linux, OSX and Solaris.
Ranked in these QuestionsQuestion Ranking
Pro Free, mostly open source and cross-platform
VirtualBox is available for free with source code available here. A "VirtualBox Extension Pack" that includes virtual USB 2.0, VirtualBox RDP & PXE boot support is available only under a commercial license. VirtualBox is available on Windows, Linux, OSX and Solaris.
Pro Can do snapshots
VirtualBox is capable of taking whole-system snapshots and writing them to a backing file.
Pro Works with Vagrant
Works with Vagrant, an awesome tool for managing and deploying virtual machine images.
Pro No GPU drivers for assigned GPUs required outside the virtual machine
Since the hardware is directly linked to the virtual machine, only the virtual machine has to install GPU drivers for the GPUs linked, leading to less GPU drivers required on the host machine that without VFIO.
Pro Wide platform support
Although the documentation varies, VFIO is achievable on most Linux distros.
Pro Near native performance
Since the hardware is directly connected to the virtual machine, near native performance is achievable.
Con Inferior performance
Apart from second-class performance in virtualization, there are some visual glitches with Windows 8.1 on Mavericks.
VirtualBox 5.1.22 will not work with windows 10
Con Confusing interface and lacking usability features
VirtualBox might be a bit confusing for beginners - it requires an understanding of a lot more technical details than other VMs.
Con Requires a windows license to run windows
Con Requires a separate video output
While a VFIO virtual machine can be run in windowed mode, it does not perform at near native performance while doing so, a second monitor output is required in order to display the GPU output with near native performance. This can for example be achived using a secondary monitor, or by plugging both your host and virtual machine video output into the same monitor and switching between them with a button if it supports it.
Con Difficult to unbind your GPU for use on your host machine without reboot
Since your GPU will not be usable outside of the virtual machine, (unless this process reverted of course) getting it to be "hot swapped" between your host system and the virtual machine can prove difficult.
Con Some games might not allow it
One game, in particular, Counter-Strike: Global Offensive, does not allow its users to play the game using a VFIO setup. This could, however, be overcome by playing it on your host machine, since the game runs on Linux. Then you could either rely on your secondary graphics card to run the game on your host machine or rebind your primary GPU to the host machine.
Con Requires two GPUs if using a graphical environment on host machine
Since the hardware is attached to the virtual machine, it cannot be used outside of it, meaning two GPUs are required if using a graphical environment. IGPUs (integrated GPUs, usually included in consumer grade CPUs) can of course also be used.
Con Platform-varying documentation
The amount of documentation varies drastically between platforms, arguably arch has the most documentation.
Con Long and sometimes difficult setup process on most platforms
Although some platforms have built-in support for VFIO, most platforms require a long setup process.
Con Very specific hardware requirements
Among other things, your CPU and motherboard needs to support IOMMU, and your GPU ROM must support UEFI.