ia64/xen-unstable

view docs/HOWTOs/Console-HOWTO @ 2006:bd310c8b4b5c

bitkeeper revision 1.1108.43.1 (410a5973b_ww-XNociMt5BotV87vBQ)

Tweaks.
author mwilli2@equilibrium.research.intel-research.net
date Fri Jul 30 14:21:39 2004 +0000 (2004-07-30)
parents 1d1e0a1795b8
children ce1a57f8737a bcc898397e06 631de0f7529b 11be1dfb262b
line source
1 New console I/O infrastructure in Xen 1.3
2 =========================================
4 Keir Fraser, University of Cambridge, 3rd June 2004
6 I thought I'd write a quick note about using the new console I/O
7 infrastructure in Xen 1.3. Significant new features compared with 1.2,
8 and with older revisions of 1.3, include:
9 - bi-directional console access
10 - log in to a Xenolinux guest OS via its virtual console
11 - a new terminal client (replaces the use of telnet in character mode)
12 - proper handling of terminal emulation
14 Accessing the virtual console from within the guest OS
15 ------------------------------------------------------
16 Every Xenolinux instance owns a bidirectional 'virtual console'.
17 The device node to which this console is attached can be configured
18 by specifying 'xencons=' on the OS command line:
19 'xencons=off' --> disable virtual console
20 'xencons=tty' --> attach console to /dev/tty1 (tty0 at boot-time)
21 'xencons=ttyS' --> attach console to /dev/ttyS0
22 The default is to attach to /dev/tty1, and also to create dummy
23 devices for /dev/tty2-63 to avoid warnings from many standard distro
24 startup scripts. The exception is domain 0, which by default attaches
25 to /dev/ttyS0.
27 Domain 0 virtual console
28 ------------------------
29 The virtual console for domain 0 is shared with Xen's console. For
30 example, if you specify 'console=com1' as a boot parameter to Xen,
31 then domain 0 will have bi-directional access to the primary serial
32 line. Boot-time messages can be directed to the virtual console by
33 specifying 'console=ttyS0' as a boot parameter to Xenolinux.
35 Connecting to the virtual console
36 ---------------------------------
37 Domain 0 console may be accessed using the supplied 'miniterm' program
38 if raw serial access is desired. If the Xen machine is connected to a
39 serial-port server, then the supplied 'xencons' program may be used to
40 connect to the appropriate TCP port on the server:
41 # xencons <server host> <server port>
43 Logging in via virtual console
44 ------------------------------
45 It is possible to log in to a guest OS via its virtual console if a
46 'getty' is running. In most domains the virtual console is named tty1
47 so standard startup scripts and /etc/inittab should work
48 fine. Furthermore, tty2-63 are created as dummy console devices to
49 suppress warnings from standard startup scripts. If the OS has
50 attached the virtual console to /dev/ttyS0 then you will need to
51 start a 'mingetty' on that device node.
53 Virtual console for other domains
54 ---------------------------------
55 Every guest OS has a virtual console that is accessible via
56 'console=tty0' at boot time (or 'console=xencons0' for domain 0), and
57 mingetty running on /dev/tty1 (or /dev/xen/cons for domain 0).
58 However, domains other than domain 0 do not have access to the
59 physical serial line. Instead, their console data is sent to and from
60 a control daemon running in domain 0. When properly installed, this
61 daemon can be started from the init scripts (e.g., rc.local):
62 # /usr/sbin/xend start
64 Alternatively, Redhat- and LSB-compatible Linux installations can use
65 the provided init.d script. To integrate startup and shutdown of xend
66 in such a system, you will need to run a few configuration commands:
67 # chkconfig --add xend
68 # chkconfig --level 35 xend on
69 # chkconfig --level 01246 xend off
70 This will avoid the need to run xend manually from rc.local, for example.
72 Note that, when a domain is created using xc_dom_create.py, xend MUST
73 be running. If everything is set up correctly then xc_dom_create will
74 print the local TCP port to which you should connect to perform
75 console I/O. A suitable console client is provided by the Python
76 module xenctl.console_client: running this module from the command
77 line with <host> and <port> parameters will start a terminal
78 session. This module is also installed as /usr/bin/xencons, from a
79 copy in tools/misc/xencons. For example:
80 # xencons localhost 9600
82 An alternative to manually running a terminal client is to specify
83 '-c' to xc_dom_create.py, or add 'auto_console=True' to the defaults
84 file. This will cause xc_dom_create.py to automatically become the
85 console terminal after starting the domain.