1 |
swift 07/07/25 19:14:01 |
2 |
|
3 |
Modified: xen-guide.xml |
4 |
Log: |
5 |
Updates and patch from bug #105117 |
6 |
|
7 |
Revision Changes Path |
8 |
1.2 xml/htdocs/doc/en/draft/xen-guide.xml |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml?rev=1.2&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml?rev=1.2&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml?r1=1.1&r2=1.2 |
13 |
|
14 |
Index: xen-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml,v |
17 |
retrieving revision 1.1 |
18 |
retrieving revision 1.2 |
19 |
diff -u -r1.1 -r1.2 |
20 |
--- xen-guide.xml 20 Jul 2007 07:18:24 -0000 1.1 |
21 |
+++ xen-guide.xml 25 Jul 2007 19:14:01 -0000 1.2 |
22 |
@@ -1,5 +1,5 @@ |
23 |
<?xml version='1.0' encoding='UTF-8'?> |
24 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml,v 1.1 2007/07/20 07:18:24 swift Exp $ --> |
25 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/xen-guide.xml,v 1.2 2007/07/25 19:14:01 swift Exp $ --> |
26 |
|
27 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
28 |
|
29 |
@@ -20,7 +20,7 @@ |
30 |
<license/> |
31 |
|
32 |
<version>0.1</version> |
33 |
-<date>2007-07-14</date> |
34 |
+<date>2007-07-24</date> |
35 |
|
36 |
<chapter> |
37 |
<title>Introduction</title> |
38 |
@@ -90,7 +90,7 @@ |
39 |
<pre caption="Editing the CFLAGS and rebuild the Gentoo installation"> |
40 |
~# <i>nano -w /etc/make.conf</i> |
41 |
<comment>(Add -mno-tls-direct-seg-refs)</comment> |
42 |
-CFLAGS="-O2 -march=pentium4 -pipe -mfpmath=sse <i>-mno-tls-direct-seg-refs</i>" |
43 |
+CFLAGS="-O2 -march=pentium4 -pipe <i>-mno-tls-direct-seg-refs</i>" |
44 |
|
45 |
~# <i>emerge -e world</i> |
46 |
</pre> |
47 |
@@ -111,16 +111,21 @@ |
48 |
Xen actually contains many components, so you'll need to install a couple of |
49 |
packages. Because it is still <uri |
50 |
link="/doc/en/handbook/handbook-x86.xml?part=3&chap=3#doc_chap2">~arch |
51 |
-masked</uri> you first need to unmask it by adding the following lines to |
52 |
-<path>/etc/portage/package.keywords</path>: |
53 |
+masked</uri> you first need to unmask it by adding the necessary lines to |
54 |
+<path>/etc/portage/package.keywords</path> and then install them. |
55 |
</p> |
56 |
|
57 |
-<pre caption="Unmasking Xen"> |
58 |
+<pre caption="Unmasking and Installing Xen"> |
59 |
+~# <i>nano -w /etc/portage/package.keywords</i> |
60 |
app-emulation/xen |
61 |
app-emulation/xen-tools |
62 |
sys-kernel/xen-sources |
63 |
+ |
64 |
+~# <i>emerge xen xen-tools xen-sources</i> |
65 |
</pre> |
66 |
|
67 |
+ |
68 |
+ |
69 |
</body> |
70 |
</section> |
71 |
<section> |
72 |
@@ -147,9 +152,73 @@ |
73 |
etc.) |
74 |
</p> |
75 |
|
76 |
+<pre caption="Enabling Xen Support for i386 Kernels"> |
77 |
+Processor type and features ---> |
78 |
+ Subarchitecture Type (Xen-compatible) |
79 |
+</pre> |
80 |
+ |
81 |
+<pre caption="Enabling Xen Support for x86_64 Kernels"> |
82 |
+Processor type and features ---> |
83 |
+ Subarchitecture Type (PC-compatible) |
84 |
+ [*] Enable Xen compatible kernel |
85 |
+</pre> |
86 |
+ |
87 |
+<pre caption="Domain-0 Kernel Config"> |
88 |
+Bus options (PCI etc.) ---> |
89 |
+ [*] PCI support |
90 |
+ [*] Xen PCI Frontend (NEW) |
91 |
+ [ ] Xen PCI Frontend Debugging |
92 |
+ |
93 |
+Networking ---> |
94 |
+ Networking options ---> |
95 |
+ <*> 802.1d Ethernet Bridging |
96 |
+ <comment>Only required by bridged networking.</comment> |
97 |
+ |
98 |
+XEN ---> |
99 |
+ [*] Privileged Guest (domain 0) |
100 |
+ <*> Backend driver support |
101 |
+ <*> Block-device backend driver |
102 |
+ <*> Network-device backend driver |
103 |
+ [*] Scrub memory before freeing it to Xen |
104 |
+ [*] Disable serial port drivers |
105 |
+ Xen version compatibility (3.0.4 and later) |
106 |
+</pre> |
107 |
+ |
108 |
+<pre caption="Domain-U Kernel Config"> |
109 |
+Bus options (PCI etc.) ---> |
110 |
+ [ ] PCI support |
111 |
+ |
112 |
+Device Drivers ---> |
113 |
+ SCSI device support ---> |
114 |
+ < > SCSI device support |
115 |
+ <comment>Disabling SCSI support frees up the /dev/sd* device names |
116 |
+ for use as Xen virtual block devices.</comment> |
117 |
+ |
118 |
+XEN ---> |
119 |
+ [ ] Privileged Guest (domain 0) |
120 |
+ <*> Block-device frontend driver |
121 |
+ <*> Network-device frontend driver |
122 |
+ [*] Scrub memory before freeing it to Xen |
123 |
+ [*] Disable serial port drivers |
124 |
+ Xen version compatibility (3.0.4 and later) |
125 |
+</pre> |
126 |
+ |
127 |
<p> |
128 |
-Once the kernel is built you'll find the kernel image immediately in the kernel |
129 |
-source directory (not inside <path>arch/</path> or any other directory) called |
130 |
+A nice hint is to have the kernel make process store its intermediate object |
131 |
+files elsewhere so that you can reuse the same kernel tree to build different |
132 |
+configurations: |
133 |
+</p> |
134 |
+ |
135 |
+<pre caption="Building the Kernel"> |
136 |
+~# <i>mkdir -p ~/build/dom0 ~/build/domU</i> |
137 |
+~# <i>make O=~/build/dom0 menuconfig</i> |
138 |
+<comment>(Configure the kernel)</comment> |
139 |
+~# <i>make O=~/build/dom0 && make O=~/build/dom0 modules_install</i> |
140 |
+</pre> |
141 |
+ |
142 |
+<p> |
143 |
+Once the kernel is built you'll find the kernel image immediately in the |
144 |
+build directory (not inside <path>arch/</path> or any other directory) called |
145 |
<path>vmlinuz</path>. Copy it to <path>/boot</path> and then configure your |
146 |
bootloader to use the Xen hypervisor (one of the components installed |
147 |
previously) which is stored as <path>/boot/xen.gz</path>. In the bootloader |
148 |
@@ -160,8 +229,8 @@ |
149 |
<pre caption="GRUB Configuration for Xen"> |
150 |
title Xen 3.0 / Gentoo Linux 2.6.x.y |
151 |
root (hd0,0) |
152 |
-kernel /xen.gz |
153 |
-module /kernel-2.6.x.y-xen0 root=/dev/hda3 |
154 |
+kernel /boot/xen.gz |
155 |
+module /boot/kernel-2.6.x.y-xen0 root=/dev/hda3 |
156 |
</pre> |
157 |
|
158 |
<p> |
159 |
@@ -176,7 +245,7 @@ |
160 |
<p> |
161 |
Now check if you can do whatever you normally do on your system. If this is the |
162 |
case, you can edit your bootloader configuration to always boot into Xen and add |
163 |
-the Xen deamon to the default runlevel so that it is started automatically the |
164 |
+the Xen deamon to the default runlevel so that it is started automatically |
165 |
next time you boot. |
166 |
</p> |
167 |
|
168 |
@@ -199,10 +268,16 @@ |
169 |
</p> |
170 |
|
171 |
<pre caption="Building the guest kernel"> |
172 |
-~# <i>make</i> |
173 |
-~# <i>cp vmlinuz /mnt/data/xen/kernel/kernel-2.6.x.y-xen</i> |
174 |
+~# <i>make O=~/build/domU</i> |
175 |
+~# <i>cp ~/build/vmlinuz /mnt/data/xen/kernel/kernel-2.6.x.y-xen</i> |
176 |
</pre> |
177 |
|
178 |
+<p> |
179 |
+It is also possible to create a single kernel image for both the administrative |
180 |
+domain and the unpriviledged domain. More information about this can be found |
181 |
+in the Xen user manual. |
182 |
+</p> |
183 |
+ |
184 |
</body> |
185 |
</section> |
186 |
<section> |
187 |
@@ -252,6 +327,10 @@ |
188 |
root = "/dev/sda1 ro" |
189 |
</pre> |
190 |
|
191 |
+<p> |
192 |
+You can find example configuration files in <path>/etc/xen</path>. |
193 |
+</p> |
194 |
+ |
195 |
</body> |
196 |
</section> |
197 |
<section> |
198 |
@@ -298,12 +377,13 @@ |
199 |
|
200 |
<p> |
201 |
When selecting the <e>routed</e> approach, the interface inside your |
202 |
-unpriviledged domain is connected to a virtual interface on your |
203 |
+unpriviledged domain is connected to the virtual interface on your |
204 |
administrative domain. On your administrative domain (domain 0), the virtual |
205 |
-interface has the same IP address as <path>eth0</path> whereas the |
206 |
-interface inside your unpriviledged domain has an IP address on the same |
207 |
-network. Any communication to that IP address can only occur from the |
208 |
-administrative domain, unless you set up specific routing rules. |
209 |
+interface is linked together with <path>eth0</path>. The |
210 |
+interface inside your unpriviledged domain should have an IP address on the same |
211 |
+network as the interface on the administrative domain. Any communication to |
212 |
+that IP address can only occur from the administrative domain, unless you set |
213 |
+up specific routing rules. |
214 |
</p> |
215 |
|
216 |
<p> |
217 |
@@ -334,12 +414,16 @@ |
218 |
|
219 |
<p> |
220 |
In the above example, the interface will be created for the unpriviledged domain |
221 |
-(in which it will be called <path>eth0</path>) and Xen will link the address |
222 |
-192.168.1.101 with the domain 0 <path>eth0</path> interface through interface |
223 |
-<path>veth1</path>. That doesn't mean that the virtual <path>eth0</path> |
224 |
-interface will automatically have IP 192.168.1.101 assigned to it, but rather |
225 |
-that, if you don't give it that IP, it will not be connected with the |
226 |
-administrative domain and thus cannot be reached. |
227 |
+(in which it will be called <path>eth0</path>) and Xen will ensure that address |
228 |
+192.168.1.101 will be reachable from the administrative domain through interface |
229 |
+<path>veth1</path>. |
230 |
+</p> |
231 |
+ |
232 |
+<p> |
233 |
+This doesn't mean that the virtual <path>eth0</path> interface will |
234 |
+automatically have IP 192.168.1.101 assigned to it, but rather that, if you |
235 |
+don't give it that IP, it will not be connected with the administrative domain |
236 |
+and thus cannot be reached. |
237 |
</p> |
238 |
|
239 |
<p> |
240 |
|
241 |
|
242 |
|
243 |
-- |
244 |
gentoo-doc-cvs@g.o mailing list |