User-mode Linux: Difference between revisions

Content deleted Content added
revert - see WP:EL
Bender the Bot (talk | contribs)
m HTTP to HTTPS for SourceForge
 
(44 intermediate revisions by 36 users not shown)
Line 1:
{{Short description|Virtualisation software}}
{{update|date=May 2019}}
{{Infobox software
| name =
Line 19 ⟶ 21:
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| status =
| programming language = [[C (programming language)|C]]
| operating system =
Line 29 ⟶ 30:
| genre = [[Virtualization]]
| license = [[GNU General Public License]]
| website = {{URL|httphttps://user-mode-linux.sourceforge.net/}}
}}
 
'''User-mode Linux''' ('''UML''')<ref>{{cite web |url=http://user-mode-linux.sourceforge.net/ |title=User-mode Linux Kernel Home Page}}</ref> 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). As each guest is just a normal application running as a process in [[user space]], this approach provides the user with a way of running multiple virtual Linux machines on a single piece of hardware, offering some isolation, generally without affecting the host environment's configuration or stability.
'''User-mode Linux''' ('''UML''') is a [[virtualization]] system for the [[Linux]] operating system based on an architectural [[porting|port]] of the [[Linux kernel]] to its own [[system 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 the ''um'' architecture can then boot as a process under another Linux kernel, entirely in [[User space and kernel space|user 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.
 
== Applications ==
[[File:Libvirt support.svg|thumb|300px|'''User-mode Linux''' is supported by [[libvirt]]]]
Numerous things become possible through the use of UML.<ref>[http://www.landley.net/code/UML.html Rob's quick and dirty UML howto]</ref> One can run [[computer network|network]] services from a UML environment and remain totally sequestered from the main Linux system in which the UML environment runs.<ref>[http://www.dit.upm.es/vnuml Virtual Network User Mode Linux (VNUML): Virtual network scenarios based on UML]</ref><ref>[http://www.netkit.org NetKit: Emulating a Virtual Network using UML]</ref><ref>[http://www.marionnet.org Marionnet: Another network emulator based on UML]</ref><ref>[http://cloonix.net Cloonix-Net: Virtual Network emulation using UML]</ref><ref>[http://www.cs.mcgill.ca/~anrl/gini GINI: Virtual network based teaching toolkit using UML]</ref> Administrators can use UML to set up [[honeypot (computing)|honeypot]]s, 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.
 
Numerous things become possible through the use of UML.<ref>{{cite web
In UML environments, host and guest kernel versions need not 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 as [[kgdb]]) require two machines connected with a [[null modem]] cable.
| url=https://www.landley.net/code/UML.html
| title=Rob's quick and dirty UML howto
| first=Rob
| last=Landley
| date=2009-12-16
| access-date=2023-08-08}}</ref> One can run [[computer network|network]] services from a UML environment and remain totally sequestered from the main Linux system in which the UML environment runs.<ref>{{cite web
| url=https://web.dit.upm.es/vnumlwiki/
| title=Virtual Network User-Mode-Linux
| date=2012-02-13
| access-date=2023-08-08}}</ref><ref>{{cite web
| url=http://wiki.netkit.org/index.php/Features
| title=Netkit: Features
| date=2009-12-03
| access-date=2023-08-08
| archive-date=2020-05-11
| archive-url=https://web.archive.org/web/20200511195253/http://wiki.netkit.org/index.php/Features
| url-status=dead
}}</ref><ref>{{cite web
| url=http://www.marionnet.org/site/?en
| title=Marionnet: a virtual network laboratory
|author1=Jean-Vincent Loddo |author2=Luca Saiu
| access-date=2023-08-08}}</ref><ref>{{cite web
| url=https://clownix.net/doc_stored/build-03-04/singlehtml/index.html
| title=Cloonix Documentation: v03-04
| date=2019-06-01
| access-date=2023-08-08}}</ref><ref>{{cite web
| url=https://www.cs.mcgill.ca/~anrl/gini/
| title=Welcome to GINI! A Toolkit for Constructing User-Level Micro Internets
| date=2009-09-28
| publisher=[[McGill University]]
| access-date=2023-08-08}}</ref> Administrators can use UML to set up [[honeypot (computing)|honeypot]]s,<ref>{{cite web
| url=https://user-mode-linux.sourceforge.net/old/honeypots.html
| title=UML as a honeypot
| date=2007-07-13
| access-date=2023-08-08}}</ref> 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 notto 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 as [[kgdb]]) require two machines connected with a [[null modem]] cable.
Some [[web hosting]] providers such as [[Bytemark]] offer UML-powered [[virtual private server|virtual servers]] for lower prices than true [[dedicated hosting service|dedicated servers]]. Each customer has [[Root user|root]] access on what appears to be their own system, while in reality one physical computer is shared between many people.
 
Some [[web hosting]] providers such as [[Bytemark]] offer UML-powered [[virtual private server|virtual servers]] for lower prices than true [[dedicated hosting service|dedicated servers]]. Each customer has [[Root user|root]] 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<ref>[http://rwmj.wordpress.com/2013/08/11/experimental-user-mode-linux-backend-for-libguestfs/#content]</ref> as an alternative to using QEMU or KVM.
 
[[libguestfs]] has supported a UML backend since version 1.24<ref>{{cite web
[[libguestfs]]| has supported a UML backend since version 1.24<ref>[httpurl=https://rwmj.wordpress.com/2013/08/11/experimental-user-mode-linux-backend-for-libguestfs/#content]</ref> as an alternative to using QEMU or KVM.
| title=Experimental User-Mode Linux backend for libguestfs
| date=August 11, 2013
| author=Richard WM Jones
| access-date=2019-08-29}}</ref> as an alternative to using QEMU or KVM.
 
== Integration into the Linux kernel ==
The UML guest application (a [[Linux kernel|Linux]] binary [[Executable and Linkable Format|ELF]]) was originally available as a [[patch (computing)|patch]] 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 of [[Linux kernel|Linux]] 2.6.0, it is integrated into the main [[kernel (computeroperating sciencesystem)|kernel]] 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 the [[memory 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.<ref>{{CitationCite book |title=User Mode Linux |last=Dike |first=Jeff needed|date=October2006-04-12 2012|publisher=[[Prentice Hall]] |isbn=9780131865051 |pages=197}}</ref>
 
== Comparison with other technologies ==
User-mode Linux is generally considered{{by whom|date=November 2018}} to have lower performance than some competing technologies, such as [[Xen]] and [[OpenVZ]].{{Citation needed|date=September 2011}}. Future work in adding support for [[x86 virtualization]] to UML may reduce this disadvantage.
 
Often cited as a strength of [[Xen]] (a competing technology) is support for [[thread-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., {{mono|/uml/root}} -> {{mono|/}}).
User-mode Linux is generally considered to have lower performance than some competing technologies, such as [[Xen]] and [[OpenVZ]]{{Citation needed|date=September 2011}}. Future work in adding support for [[x86 virtualization]] to UML may reduce this disadvantage.
 
Often cited as a strength of [[Xen]] (a competing technology) is support for [[thread-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 -> /).
 
== Supported platforms ==
 
UML was originally designed for the [[X86 architecture|x86]] instruction set, but has also been ported to others including [[IA-64]] and [[PowerPC]]. {{fact|date=October 2021}}
 
== See also ==
* [[L4Linux]]
* [[CoLinuxcoLinux]]
* [[MkLinux]]
 
Line 67 ⟶ 110:
 
== External links ==
* [https://www.kernel.org/doc/html/latest/virt/uml/user_mode_linux_howto_v2.html Official documentation]
* [httphttps://uml.devloop.org.uk/ MoreReady-made recentUML kernels and file systems]
* [http://eggdrop.ch/texts/uml/ Running Debian inside of Debian with User-Mode Linux]
* [httphttps://linuxzoo.net/ Linuxzoo: Online free access UMLs]
* [http://www.user-mode-linux.org/~jdike/armin/Virtual-UML-Lab-Presentation.pdf Armin M. Warda: Virtual Labs with User Mode Linux, 2004]
 
{{Linux kernel}}
Line 76 ⟶ 119:
[[Category:Free virtualization software]]
[[Category:Linux kernel variant]]
[[Category:Virtualization-related software for Linux]]