ia64/xen-unstable

view docs/src/user/redhat.tex @ 7176:0e1838de9db8

Move XendDomainInfo.{create,recreate,parseConfig} to the top level of the
domain. This allows us to refer to them using an import statement, rather than
a from .. import. This is a step towards getting rid of the xroot hack. All
other references to XendDomainInfo methods need to be doubly qualified (once
for the module, once for the class).

Remove XendDomainDict, replacing it with a simple dictionary, folding the
get_by_name method into XendDomain.

Replace XendDomain.refresh_lock with a domains_lock which goes around any
reference to XendDomain.domains or anything that will create or destroy a
domain. This serialises most accesses through XendDomain, ensuring that we will
not return stale state when racing against the watches fired in separate
threads. This should have fixed bugs #270 and #234.

Added a number of domain_get_xyz methods. Those named xyz_nr are to allow
components internal to XendDomain (XendDomainInfo, XendCheckpoint) to call back
into XendDomain without triggering further calls to XendDomain.refresh. The
other methods simply make it clear which fallback behaviour is expected.

Replace XendDomainInfo.domain_exists with XendDomainInfo.domain_by_name; the
internals of this method needed to change to match those changes above, and it
has been a misnomer for some time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Tue Oct 04 02:21:28 2005 +0100 (2005-10-04)
parents 06d84bf87159
children
line source
1 \chapter{Installing Xen / XenLinux on Red~Hat or Fedora Core}
3 When using Xen / XenLinux on a standard Linux distribution there are a
4 couple of things to watch out for:
6 Note that, because domains greater than 0 don't have any privileged
7 access at all, certain commands in the default boot sequence will fail
8 e.g.\ attempts to update the hwclock, change the console font, update
9 the keytable map, start apmd (power management), or gpm (mouse
10 cursor). Either ignore the errors (they should be harmless), or
11 remove them from the startup scripts. Deleting the following links
12 are a good start: {\path{S24pcmcia}}, {\path{S09isdn}},
13 {\path{S17keytable}}, {\path{S26apmd}}, {\path{S85gpm}}.
15 If you want to use a single root file system that works cleanly for
16 both domain~0 and unprivileged domains, a useful trick is to use
17 different `init' run levels. For example, use run level 3 for
18 domain~0, and run level 4 for other domains. This enables different
19 startup scripts to be run in depending on the run level number passed
20 on the kernel command line.
22 If using NFS root files systems mounted either from an external server
23 or from domain0 there are a couple of other gotchas. The default
24 {\path{/etc/sysconfig/iptables}} rules block NFS, so part way through
25 the boot sequence things will suddenly go dead.
27 If you're planning on having a separate NFS {\path{/usr}} partition,
28 the RH9 boot scripts don't make life easy - they attempt to mount NFS
29 file systems way to late in the boot process. The easiest way I found
30 to do this was to have a {\path{/linuxrc}} script run ahead of
31 {\path{/sbin/init}} that mounts {\path{/usr}}:
33 \begin{quote}
34 \begin{small}\begin{verbatim}
35 #!/bin/bash
36 /sbin/ipconfig lo 127.0.0.1
37 /sbin/portmap
38 /bin/mount /usr
39 exec /sbin/init "$@" <>/dev/console 2>&1
40 \end{verbatim}\end{small}
41 \end{quote}
43 %% $ XXX SMH: font lock fix :-)
45 The one slight complication with the above is that
46 {\path{/sbin/portmap}} is dynamically linked against
47 {\path{/usr/lib/libwrap.so.0}} Since this is in {\path{/usr}}, it
48 won't work. This can be solved by copying the file (and link) below
49 the {\path{/usr}} mount point, and just let the file be `covered' when
50 the mount happens.
52 In some installations, where a shared read-only {\path{/usr}} is being
53 used, it may be desirable to move other large directories over into
54 the read-only {\path{/usr}}. For example, you might replace
55 {\path{/bin}}, {\path{/lib}} and {\path{/sbin}} with links into
56 {\path{/usr/root/bin}}, {\path{/usr/root/lib}} and
57 {\path{/usr/root/sbin}} respectively. This creates other problems for
58 running the {\path{/linuxrc}} script, requiring bash, portmap, mount,
59 ifconfig, and a handful of other shared libraries to be copied below
60 the mount point --- a simple statically-linked C program would solve
61 this problem.