swift 07/07/25 19:14:01 Modified: xen-guide.xml Log: Updates and patch from bug #105117
Revision Changes Path 1.2 xml/htdocs/doc/en/draft/xen-guide.xml file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml?rev=1.2&view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml?rev=1.2&content-type=text/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml?r1=1.1&r2=1.2 Index: xen-guide.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xen-guide.xml 20 Jul 2007 07:18:24 -0000 1.1 +++ xen-guide.xml 25 Jul 2007 19:14:01 -0000 1.2 @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='UTF-8'?> -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml,v 1.1 2007/07/20 07:18:24 swift Exp $ --> +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml,v 1.2 2007/07/25 19:14:01 swift Exp $ --> <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> @@ -20,7 +20,7 @@ <license/> <version>0.1</version> -<date>2007-07-14</date> +<date>2007-07-24</date> <chapter> <title>Introduction</title> @@ -90,7 +90,7 @@ <pre caption="Editing the CFLAGS and rebuild the Gentoo installation"> ~# <i>nano -w /etc/make.conf</i> <comment>(Add -mno-tls-direct-seg-refs)</comment> -CFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse <i>-mno-tls-direct-seg-refs</i>" +CFLAGS="-O2 -march=pentium4 -pipe <i>-mno-tls-direct-seg-refs</i>" ~# <i>emerge -e world</i> </pre> @@ -111,16 +111,21 @@ Xen actually contains many components, so you'll need to install a couple of packages. Because it is still <uri link="/doc/en/handbook/handbook-x86.xml?part=3&chap=3#doc_chap2">~arch -masked</uri> you first need to unmask it by adding the following lines to -<path>/etc/portage/package.keywords</path>: +masked</uri> you first need to unmask it by adding the necessary lines to +<path>/etc/portage/package.keywords</path> and then install them. </p> -<pre caption="Unmasking Xen"> +<pre caption="Unmasking and Installing Xen"> +~# <i>nano -w /etc/portage/package.keywords</i> app-emulation/xen app-emulation/xen-tools sys-kernel/xen-sources + +~# <i>emerge xen xen-tools xen-sources</i> </pre> + + </body> </section> <section> @@ -147,9 +152,73 @@ etc.) </p> +<pre caption="Enabling Xen Support for i386 Kernels"> +Processor type and features ---> + Subarchitecture Type (Xen-compatible) +</pre> + +<pre caption="Enabling Xen Support for x86_64 Kernels"> +Processor type and features ---> + Subarchitecture Type (PC-compatible) + [*] Enable Xen compatible kernel +</pre> + +<pre caption="Domain-0 Kernel Config"> +Bus options (PCI etc.) ---> + [*] PCI support + [*] Xen PCI Frontend (NEW) + [ ] Xen PCI Frontend Debugging + +Networking ---> + Networking options ---> + <*> 802.1d Ethernet Bridging + <comment>Only required by bridged networking.</comment> + +XEN ---> + [*] Privileged Guest (domain 0) + <*> Backend driver support + <*> Block-device backend driver + <*> Network-device backend driver + [*] Scrub memory before freeing it to Xen + [*] Disable serial port drivers + Xen version compatibility (3.0.4 and later) +</pre> + +<pre caption="Domain-U Kernel Config"> +Bus options (PCI etc.) ---> + [ ] PCI support + +Device Drivers ---> + SCSI device support ---> + < > SCSI device support + <comment>Disabling SCSI support frees up the /dev/sd* device names + for use as Xen virtual block devices.</comment> + +XEN ---> + [ ] Privileged Guest (domain 0) + <*> Block-device frontend driver + <*> Network-device frontend driver + [*] Scrub memory before freeing it to Xen + [*] Disable serial port drivers + Xen version compatibility (3.0.4 and later) +</pre> + <p> -Once the kernel is built you'll find the kernel image immediately in the kernel -source directory (not inside <path>arch/</path> or any other directory) called +A nice hint is to have the kernel make process store its intermediate object +files elsewhere so that you can reuse the same kernel tree to build different +configurations: +</p> + +<pre caption="Building the Kernel"> +~# <i>mkdir -p ~/build/dom0 ~/build/domU</i> +~# <i>make O=~/build/dom0 menuconfig</i> +<comment>(Configure the kernel)</comment> +~# <i>make O=~/build/dom0 && make O=~/build/dom0 modules_install</i> +</pre> + +<p> +Once the kernel is built you'll find the kernel image immediately in the +build directory (not inside <path>arch/</path> or any other directory) called <path>vmlinuz</path>. Copy it to <path>/boot</path> and then configure your bootloader to use the Xen hypervisor (one of the components installed previously) which is stored as <path>/boot/xen.gz</path>. In the bootloader @@ -160,8 +229,8 @@ <pre caption="GRUB Configuration for Xen"> title Xen 3.0 / Gentoo Linux 2.6.x.y root (hd0,0) -kernel /xen.gz -module /kernel-2.6.x.y-xen0 root=/dev/hda3 +kernel /boot/xen.gz +module /boot/kernel-2.6.x.y-xen0 root=/dev/hda3 </pre> <p> @@ -176,7 +245,7 @@ <p> Now check if you can do whatever you normally do on your system. If this is the case, you can edit your bootloader configuration to always boot into Xen and add -the Xen deamon to the default runlevel so that it is started automatically the +the Xen deamon to the default runlevel so that it is started automatically next time you boot. </p> @@ -199,10 +268,16 @@ </p> <pre caption="Building the guest kernel"> -~# <i>make</i> -~# <i>cp vmlinuz /mnt/data/xen/kernel/kernel-2.6.x.y-xen</i> +~# <i>make O=~/build/domU</i> +~# <i>cp ~/build/vmlinuz /mnt/data/xen/kernel/kernel-2.6.x.y-xen</i> </pre> +<p> +It is also possible to create a single kernel image for both the administrative +domain and the unpriviledged domain. More information about this can be found +in the Xen user manual. +</p> + </body> </section> <section> @@ -252,6 +327,10 @@ root = "/dev/sda1 ro" </pre> +<p> +You can find example configuration files in <path>/etc/xen</path>. +</p> + </body> </section> <section> @@ -298,12 +377,13 @@ <p> When selecting the <e>routed</e> approach, the interface inside your -unpriviledged domain is connected to a virtual interface on your +unpriviledged domain is connected to the virtual interface on your administrative domain. On your administrative domain (domain 0), the virtual -interface has the same IP address as <path>eth0</path> whereas the -interface inside your unpriviledged domain has an IP address on the same -network. Any communication to that IP address can only occur from the -administrative domain, unless you set up specific routing rules. +interface is linked together with <path>eth0</path>. The +interface inside your unpriviledged domain should have an IP address on the same +network as the interface on the administrative domain. Any communication to +that IP address can only occur from the administrative domain, unless you set +up specific routing rules. </p> <p> @@ -334,12 +414,16 @@ <p> In the above example, the interface will be created for the unpriviledged domain -(in which it will be called <path>eth0</path>) and Xen will link the address -192.168.1.101 with the domain 0 <path>eth0</path> interface through interface -<path>veth1</path>. That doesn't mean that the virtual <path>eth0</path> -interface will automatically have IP 192.168.1.101 assigned to it, but rather -that, if you don't give it that IP, it will not be connected with the -administrative domain and thus cannot be reached. +(in which it will be called <path>eth0</path>) and Xen will ensure that address +192.168.1.101 will be reachable from the administrative domain through interface +<path>veth1</path>. +</p> + +<p> +This doesn't mean that the virtual <path>eth0</path> interface will +automatically have IP 192.168.1.101 assigned to it, but rather that, if you +don't give it that IP, it will not be connected with the administrative domain +and thus cannot be reached. </p> <p> -- [EMAIL PROTECTED] mailing list
