In unRAID 6-beta14, we significantly updated our Docker Manager to feature an easier-to-use web interface with better performance and more controls. With today’s release of unRAID 6.0-beta15, we have introduced our new VM Manager and with it, support for creating localized virtual machines. As such, we wanted to use this opportunity to share with you our vision for virtualization with unRAID. Simply put, our goals are to:
- Make it easy to download and run a wide variety of applications.
- Remove complications due to software dependency conflicts and OS allegiance.
- Enable safe use of other devices with unRAID.
We knew that if we achieved these goals, we would solve lots of problems and have a truly unique offering. Now let’s take a moment to explore the virtualization technologies we’ve incorporated in unRAID Server OS 6: Xen, Docker, and KVM.
First up…The Xen Hypervisor
Xen was the first virtualization technology we implemented in unRAID 6. Xen offered the key benefit of paravirtualization, which would allow VMs to be created even on hardware that didn’t have virtualization support. This was really exciting, as it fulfilled goal #1 from our original list right away. Xen also had support for hardware-assisted virtualization which we hoped would address both goals 2 and 3 from our original list. In February of 2014, we even featured a blog post on virtualization and discussed the many potential use cases. However, there were challenges that we had yet to solve.
- How would we distribute VMs and how much bandwidth would we need?
- How many applications per VM?
- How would we handle patching / ongoing maintenance?
And with Xen specifically, we had experienced some issues with networking, Windows paravirtualization drivers, and PCI device assignment (specifically GPUs). So we explored other options.
Next…Docker Containers
With Docker containers on unRAID 6, we can run any application from any Linux distribution (Ubuntu, Arch, Debian, Fedora, etc.) and access them through a browser (either a webGui or VNC). Docker doesn’t require the use of hardware with Intel VT-x / AMD-V support, provides an online repository for downloading preinstalled application images, and is extremely efficient in its utilization of storage resources (disk / RAM).
In experimenting with Docker, we found that it was a much better solution for running Linux headless applications than VMs in general (Xen or otherwise). So for serving media (Plex, Logitech, MediaBrowser), sharing files (ownCloud, Dropbox, BT Sync), and running other headless apps (Minecraft, TeamSpeak, MariaDB), Docker Containers are a better solution. With Docker on unRAID 6, our customers now have access to a catalog of over 14,000 applications.
However, Docker doesn’t provide support for non-Linux applications (Windows, FreeBSD, etc.) and can’t supply drivers for devices independent of the host operating system. And with Docker effectively deprecating the #1 benefit of Xen (paravirtualization), we decided to spend some time with KVM to see how it fared in solving the remainder of our virtualization goals.
Last but not least…KVM
Unlike other hypervisors, KVM is the only one that is built directly into and supported by the Linux kernel itself. All other hypervisors out there will load before Linux does, and then a Linux distribution (OS) runs in an underprivileged state to that hypervisor. By leveraging a hypervisor that is part of the Linux kernel itself, it means better support, less complexity, and more room for optimization improvements.
In addition, if the host processor supports Intel VT-d or AMD-Vi, you can take advantage of another KVM-exclusive capability: Virtual Function I/O. VFIO is an unbelievably powerful virtualization technology exclusive to KVM that allows us to assign PCI-based devices from our host directly to guest VMs which can supply device drivers for the device directly (independent of unRAID OS). Best of all, those devices are then limited to only accessing memory that their VM guest is assigned, thus protecting other applications running on the host.
One of the most powerful examples of this is to pass through a discrete GPU (video card) to a VM, along with a set of input devices for what we are nick-naming “localized virtual desktops.” This allows users to run full desktops as virtual machines on unRAID in an isolated and controlled manner. It also provides the benefits of virtualization without sacrificing user experience. Traditional virtual desktops require you to use a secondary device to connect to them and the graphics are then transmitted over a remote connection (such as VNC or RDP). While the benefits of remote access are clear, there is no optimization for local access. For use cases requiring high-performance, 3D graphics, or latency-sensitive applications, traditional virtual desktops fail to deliver. Localized virtual desktops eliminate the performance, graphics, and latency bottle-necks by using a local set of devices to both display and interact with the VM. No need for a secondary device and you can run any traditional desktop application and get the same user experience as if local. Use cases for localized virtual desktops include: digital art, photos/videos, 3D models, high-performance gaming, and much more.
Imagine having a workstation, gaming PC, media player, and a NAS, all running on the same hardware at the same time! Instead of buying multiple disparate systems for your various home computing needs, you can consolidate spending into a single, more powerful device. Seeing this first hand is extremely powerful and very exciting, as many folks have longed for this type of solution for quite some time…one Machine to Rule Them All!
Where does this leave Xen with unRAID?
In January of this year, the Xen team released version 4.5 which represented a substantial rework of the hypervisor. To put things in perspective, while 78,000 new lines of code were added, over 141,000 were removed, dubbing the nickname for Xen 4.5 as “Less is More.” Among the release notes, there are hints of better performance, better hardware virtualization support, and significant improvements to manageability. It is our plan to test the latest release after the final release of unRAID 6.0 to determine the future of Xen in unRAID. Stay tuned to our blog for more information.
VMs and Containers…better together
We love Docker and VMs and think they complement each other very well. They allow us to run both service-driven applications and localized virtual machines so we can better harness the power of modern day processors. When we see some of the investments being made by our community members into much more capable hardware, we need to find better ways to take advantage of it!