2013-05-03 22:25:37 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2008-11-20 00:58:23 +08:00
|
|
|
<body>
|
|
|
|
<h1>User Mode Linux driver</h1>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The UML driver for libvirt allows use and management of paravirtualized
|
|
|
|
guests built for User Mode Linux. UML requires no special support in
|
|
|
|
the host kernel, so can be used by any user of any linux system, provided
|
|
|
|
they have enough free RAM for their guest's needs, though there are
|
2011-02-16 04:50:28 +08:00
|
|
|
certain restrictions on network connectivity unless the administrator
|
2008-11-20 00:58:23 +08:00
|
|
|
has pre-created TAP devices.
|
|
|
|
</p>
|
|
|
|
|
2011-07-16 02:33:17 +08:00
|
|
|
<h2><a name="project">Project Links</a></h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
The <a href="http://user-mode-linux.sourceforge.net/">User
|
|
|
|
Mode Linux</a> paravirtualized kernel
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2008-11-20 00:58:23 +08:00
|
|
|
<h2>Connections to UML driver</h2>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
The libvirt UML driver follows the QEMU driver in providing two
|
|
|
|
types of connection. There is one privileged instance per host,
|
|
|
|
which runs as root. This is called the "system" instance, and allows
|
|
|
|
full use of all host resources. Then, there is a per-user unprivileged
|
|
|
|
"session", instance. This has more restricted capabilities, and may
|
|
|
|
require the host administrator to setup certain resources ahead of
|
|
|
|
time to allow full integration with the network. Example connection
|
|
|
|
URIs are
|
|
|
|
</p>
|
|
|
|
|
2009-11-14 07:09:20 +08:00
|
|
|
<pre>
|
|
|
|
uml:///session (local access to per-user instance)
|
|
|
|
uml+unix:///session (local access to per-user instance)
|
2009-01-27 22:49:09 +08:00
|
|
|
|
2009-11-14 07:09:20 +08:00
|
|
|
uml:///system (local access to system instance)
|
|
|
|
uml+unix:///system (local access to system instance)
|
|
|
|
uml://example.com/system (remote access, TLS/x509)
|
|
|
|
uml+tcp://example.com/system (remote access, SASl/Kerberos)
|
|
|
|
uml+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|
|
|
</pre>
|
2008-11-20 00:58:23 +08:00
|
|
|
|
|
|
|
<h2>Example XML configuration</h2>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
User mode Linux driver only supports directly kernel boot at
|
|
|
|
this time. A future driver enhancement may allow a paravirt
|
|
|
|
bootloader in a similar style to Xen's pygrub. For now though,
|
|
|
|
the UML kernel must be stored on the host and referenced
|
|
|
|
explicitly in the "os" element. Since UML is a paravirtualized
|
|
|
|
technology, the kernel "type" is set to "uml"
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
There is not yet support for networking in the driver, but
|
|
|
|
disks can be specified in the usual libvirt manner. The main
|
|
|
|
variation is the target device naming scheme "ubd0", and
|
|
|
|
bus type of "uml".
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2014-03-01 17:41:20 +08:00
|
|
|
Once booted the primary console is connected to a PTY, and
|
2008-11-20 00:58:23 +08:00
|
|
|
thus accessible with "virsh console" or equivalent tools
|
|
|
|
</p>
|
|
|
|
|
2009-11-14 07:09:20 +08:00
|
|
|
<pre>
|
2008-11-20 00:58:23 +08:00
|
|
|
<domain type='uml'>
|
|
|
|
<name>demo</name>
|
|
|
|
<uuid>b4433fc2-a22e-ffb3-0a3d-9c173b395800</uuid>
|
|
|
|
<memory>500000</memory>
|
|
|
|
<currentMemory>500000</currentMemory>
|
|
|
|
<vcpu>1</vcpu>
|
|
|
|
<os>
|
|
|
|
<type arch='x86_64'>uml</type>
|
|
|
|
<kernel>/home/berrange/linux-uml-2.6.26-x86_64</kernel>
|
|
|
|
</os>
|
|
|
|
<devices>
|
|
|
|
<disk type='file' device='disk'>
|
|
|
|
<source file='/home/berrange/FedoraCore6-AMD64-root_fs'/>
|
|
|
|
<target dev='ubd0' bus='uml'/>
|
|
|
|
</disk>
|
|
|
|
<console type='pty'/>
|
|
|
|
</devices>
|
|
|
|
</domain>
|
2009-11-14 07:09:20 +08:00
|
|
|
</pre>
|
2008-11-20 00:58:23 +08:00
|
|
|
</body>
|
|
|
|
</html>
|