swift 05/11/17 17:19:55 Modified: xml/htdocs/doc/en uml.xml Log: #103026 and #110695 - Fix ubd, place sources elsewhere, plus additional information on networking
Revision Changes Path 1.24 +70 -14 xml/htdocs/doc/en/uml.xml file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/uml.xml?rev=1.24&content-type=text/x-cvsweb-markup&cvsroot=gentoo plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/uml.xml?rev=1.24&content-type=text/plain&cvsroot=gentoo diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/uml.xml.diff?r1=1.23&r2=1.24&cvsroot=gentoo Index: uml.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- uml.xml 3 Oct 2005 22:53:50 -0000 1.23 +++ uml.xml 17 Nov 2005 17:19:55 -0000 1.24 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding="UTF-8"?> -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v 1.23 2005/10/03 22:53:50 rane Exp $ --> +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v 1.24 2005/11/17 17:19:55 swift Exp $ --> <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> @@ -28,8 +28,8 @@ <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> <license/> -<version>0.11</version> -<date>2005-02-05</date> +<version>0.12</version> +<date>2005-11-17</date> <chapter> <title>Obtaining User-Mode Linux</title> @@ -50,17 +50,27 @@ </p> <p> -Installing user-mode linux is essentially identical to a normal kernel -install. First install the kernel sources (appropriately patched for -user-mode linux), and then configure the user-mode linux kernel in the -usual fashion. Since kernel 2.6.9, UML has been integrated in the vanilla -kernel. +Most 2.6 kernels have UML support. Although you can use your current kernel +sources, it might be wiser to keep the UML kernel tree(s) separate. After all, +you'll be building a new kernel with a different configuration and you might +want to have heterogenous systems on your main Linux system (several different +UML kernels). </p> -<pre caption="Installing UML kernel sources"> -<comment>(We'll install the vanilla 2.6 kernel, you can also use the usermode-sources)</comment> -# <i>emerge sys-kernel/development-sources</i> -# <i>cd /usr/src/linux</i> +<p> +So download a nice kernel tree (like the vanilla one from <uri +link="http://www.kernel.org">kernel.org</uri>) and extract it to some local +development location. +</p> + +<p> +Next, configure this UML kernel as you would do for any other system, but append +<e>ARCH=um</e> so that the kernel build software knows that the kernel +is meant to run as a guest process on the main system. +</p> + +<pre caption="Building the UML kernel"> +# <i>cd /srv/aegis/src/uml-linux</i> # <i>make menuconfig <comment>ARCH=um</comment></i> # <i>make linux <comment>ARCH=um</comment></i> # <i>cp linux /usr/local/bin/linux</i> @@ -168,9 +178,9 @@ <p> Add any additional packages you desire. Feel free to give your virtual Gentoo system a hostname, if you so desire. In <path>/etc/fstab</path> -you will want <path>/dev/ROOT</path> to be <path>/dev/ubd/0</path>, with +you will want <path>/dev/ROOT</path> to be <path>/dev/ubda</path>, with a fs type of either ext2, ext3, or reiserfs. Set <path>/dev/SWAP</path> -to be <path>/dev/ubd/1</path>, and comment out <path>/dev/BOOT</path>. +to be <path>/dev/ubdb</path>, and comment out <path>/dev/BOOT</path>. </p> <p> @@ -261,6 +271,7 @@ <chapter> <title>Networking</title> <section> +<title>Using an Existing Network</title> <body> <p> @@ -346,6 +357,51 @@ </body> </section> +<section> +<title>Using a Virtual Network</title> +<body> + +<p> +Before you get all too excited, this is not a virtual private network. It is a +network that is only accessible by the UML instances. The +<c>usermode-utilities</c> package provides a tool called <c>uml_switch</c> which +defines the end points of the switch. +</p> + +<pre caption="Activating end points of a UML switch"> +<comment>(If the switch information should stay in the foreground:)</comment> +$ <i>uml_switch -unix ~/tmp/switch.sock</i> + +<comment>(If it should be backgrounded:)</comment> +$ <i>uml_switch -unix ~/tmp/switch.sock &> ~/tmp/switch.log &</i> +</pre> + +<p> +To start the UML instances on the switch, run the next command. Your +(virtual) network interface will be connected to the <c>uml_switch</c> process +and will be using the given MAC address. +</p> + +<pre caption="Running first UML instance"> +$ <i>linux ubd0=first_rootfs ubd1=first_swapfs eth0=daemon,10:00:01:02:00:00,,~/tmp/switch.sock</i> +</pre> + +<p> +You can still connect the system to the existing network, or have a second +process attached to both the virtual one and the existing one: +</p> + +<pre caption="Running second UML instance"> +$ <i>linux ubd0=second_rootfs ubd1=second_swapfs eth0=daemon,10:00:01:02:00:01,,~/tmp/switch.sock \ + eth1=tuntap,,,192.168.1.43</i> +</pre> + +<p> +More information about the tuntap setting can be found in the previous section. +</p> + +</body> +</section> </chapter> <chapter> <title>Testing the .iso</title> -- [email protected] mailing list
