This article needs to beupdated. Please help update this article to reflect recent events or newly available information.(May 2019) |
| User-mode Linux | |
|---|---|
| Written in | C |
| Type | Virtualization |
| License | GNU General Public License |
| Website | user-mode-linux |
User-mode Linux (UML) is avirtualization system for theLinux operating system based on an architecturalport of theLinux kernel to its ownsystem call interface, which enables multiple virtual Linux kernel-based operating systems (known as guests) to run as an application within a normal Linux system (known as the host). A Linux kernel compiled for theum architecture can then boot as a process under another Linux kernel, entirely inuser space, without affecting the host environment's configuration or stability.
This method gives the user a way to run many virtual Linux machines on a single piece of hardware, allowing some isolation, typically without changing the configuration or stability of the host environment because each guest is just a regular application running as a process in user space.
Numerous things become possible through the use of UML.[1] One can runnetwork services from a UML environment and remain totally sequestered from the main Linux system in which the UML environment runs.[2][3][4][5][6] Administrators can use UML to set uphoneypots,[7] which allow one to test the security of one's computers or network. UML can serve to test and debug new software without adversely affecting the host system. UML can also be used for teaching and research, providing a realistic Linux networked environment with a high degree of safety.
In UML environments, host and guest kernel versions don't need to match, so it is entirely possible to test a "bleeding edge" version of Linux in User-mode on a system running a much older kernel. UML also allows kernel debugging to be performed on one machine, where other kernel debugging tools (such askgdb) require two machines connected with anull modem cable.
Someweb hosting providers offer UML-poweredvirtual servers for lower prices than truededicated servers. Each customer hasroot access on what appears to be their own system, while in reality one physical computer is shared between many people.
libguestfs has supported a UML backend since version 1.24[8] as an alternative to using QEMU or KVM.
The UML guest application (aLinux binaryELF) was originally available as apatch for some Kernel versions above 2.2.x, and the host with any kernel version above 2.2.x supported it easily in the thread mode (i.e., non-SKAS3).
As ofLinux 2.6.0, it is integrated into the mainkernel source tree. A method of running a separate kernel address space (SKAS) that does not require host kernel patching has been implemented. This improves performance and security over the old Traced Thread approach, in which processes running in the UML share the same address space from the host's point of view, which leads the memory inside the UML to not be protected by thememory management unit. Unlike the current UML using SKAS, buggy or malicious software inside a UML running on a non-SKAS host could be able to read the memory space of other UML processes or even the UML kernel memory.[9]
User-mode Linux is generally considered[by whom?] to have lower performance than some competing technologies, such asXen andOpenVZ.[citation needed] Future work in adding support forx86 virtualization to UML may reduce this disadvantage.
Often cited as a strength ofXen (a competing technology) is support forthread-local storage (TLS). This is now also supported in the latest UML kernels. Xen concentrates on virtualizing the whole machine, and thus all systems running on a Xen machine are really virtual machines. In UML, the host machine is not virtualized in any way, and only guest systems are true virtual machines. This allows UML guest direct access to host filesystems and hardware, where it is common to map a host directory (e.g.,/uml/root →/).
UML was originally designed for thex86 instruction set, but has also been ported to others includingIA-64 andPowerPC.[10][11] It also runs onx86_64[12] and should run on any platform inasmuch as Linux'sptrace is uniform across platforms.