Sit tight, Linux Users. User Mode Linux will soon have the same capabilities as Xen in the virtualization arena...
-- like live migration, says Jeff Dike, author of User Mode Linux. Operating out of the Linux kernel port, UML enables the port to host multiple virtual operating systems.
Speaking with SearchOpenSource.com, Dike described the pros and cons of virtual machines versus virtual operating systems and offers some advice on whether to opt for UML, Xen or VMware.
SearchOpenSource.com: You mentioned that User Mode Linux differs from other virtualization technologies because it's more of a virtual operating system than a virtual machine. How does a virtual operating system compare with a virtual machine?
Jeff Dike: A virtual operating system has greater contact with the host operating system. This allows interactions between guest and host, which would be difficult or impossible with a virtual machine. For example, UML has two file systems [with somewhat different properties], which allow a host directory to be mounted as a UML file system.
I also have a little project under way that allows a UML file system to be mounted on the host. This allows some UML management tasks, such as password resets and process monitoring, to be done on the host without needing access to the UML.
It uses a standard mechanism, FUSE, which allows file systems to be implemented by user-space drivers. In this case, the user-space driver is embedded inside UML. A virtual machine might find this difficult since it would have to implement the entire mechanism itself rather than relying on something which already exists.
SearchOpenSource.com: How does a virtual operating system offer advantages in performance?
Dike: The increased interaction of the virtual operating system with the host has the potential for better performance than might otherwise be possible. However, this is currently unrealized due to UML not being as well-tuned as it should be and because Linux does not provide mechanisms to support guests as well as it could.
These are both changing, with performance improvements going into User Mode Linux and a recently started project to add virtualization support to the kernel. This has great potential for improving UML performance and is something that a virtual operating system could take advantage of but a virtual machine couldn't.
SearchOpenSource.com: What are the differences in hardware requirements between virtual machines and virtual operating systems?
Dike: There is no general answer to the question. The comparative hardware requirements of the virtualization technologies depend on their implementation and the resource-saving features that they have. The end goal, regardless of the underlying technology, is basically the same. Therefore, hardware requirements will be similar. The differences that exist are probably related to implementation details and usage patterns.
For example, if one technology allocates its 'physical' memory on the host on demand [as UML does] and another allocates it up front, then the latter will usually have higher memory requirements. However, as they continue to run, the memory requirements of the two will converge as the former allocates host memory up to its physical memory limit.
Another example is disk space. When booting multiple virtual machines from the same file system, each virtual machine is required to give its own private copy, which wastes disk space and memory. Providing a capability such as UML COW files allows all virtual machines to share the parts of the file system that don't change and only have private copies of changed data.
SearchOpenSource.com: How is running out of a real Linux kernel port superior to other virtualization options like Xen, VMware, Windows Virtual Server?
Dike: The fact that User Mode Linux is in the standard kernel.org kernel doesn't make too much of a practical difference to the average user. It is seen by some as a stamp of approval of sorts, which gives UML some credibility that it otherwise would not have.
Being in the mainline kernel tree means that UML is automatically updated and fixed as other maintainers make changes and fixes across the entire kernel pool. The fact that it's a kernel port brings the advantages of being a virtual operating system that I talk about elsewhere -- simplicity, manageability and extra functionality.
SearchOpenSource.com: How does one decide when to go with UML, Xen or VMware?
Dike: The first question is whether Windows is involved, either as a guest or host. If so, then VMware is probably the best option. Xen can boot a Windows guest, but I think that capability is still in the prototype stage. UML is intrinsically a Linux guest. It also doesn't run on a Windows host, but that is a matter of someone doing the port.
For a Linux guest running on a Linux host, the choice is between UML and VMware. UML is probably the better choice because it's less resource-intensive. UML has easier manageability and doesn't try to emulate a physical system, as VMware does. VMware does contain some features that UML lacks, such as the ability to suspend and resume a guest.
That leaves Xen. Xen runs a hypervisor on the hardware and then puts a privileged guest on top of it. This first guest is used to create and manage the other unprivileged guests on the system. This is noticeably more complicated than UML, which requires simply that you run UML as a process, not unlike running a shell or utility. The benefit of this extra complexity is performance. Right now, Xen guests are somewhat faster than UML guests.
UML is simpler in a different, and possibly more important, way as well. As a normal Linux process, it behaves like other Linux processes and can be managed in the same way, with the same tools, such as top, ps, free and the like. This minimizes the learning curve for UML host administrators. The same monitoring and control tools and techniques that work for everything else on Linux also work for UML. In addition, there is only one OS involved, so there is no need to learn how to manage the hypervisor. This conceptual simplicity is an advantage when something breaks and needs to be fixed in a hurry. With UML, the admin can fall back on standard and well-practiced techniques, minimizing the chance of making a mistake.
SearchOpenSource.com: What features does User Mode Linux lack?
Dike: Xen does have some features that UML doesn't, notably live migration. So the tradeoff is some extra performance and features against the complexity of introducing a new operating system, the hypervisor and having to learn a new set of tools in order to manage the guests.
These deficiencies are in the process of being fixed. The kernel virtualization project will bring UML performance much closer to native, and it has a design goal of enabling live migration of guests. When that is done, we will likely have the best of both worlds -- Linux will be the hypervisor of choice, supporting both traditional and virtualized workloads. It will provide near-native guest performance and implement the features that Xen and VMware implement but are currently missing in UML.