File: UserModeLinux-HOWTO-8.html

package info (click to toggle)
user-mode-linux-doc 20020320-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,580 kB
  • ctags: 300
  • sloc: makefile: 32
file content (156 lines) | stat: -rw-r--r-- 3,938 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.18">
 <TITLE>User Mode Linux HOWTO : The Management Console</TITLE>
 <LINK HREF="UserModeLinux-HOWTO-9.html" REL=next>
 <LINK HREF="UserModeLinux-HOWTO-7.html" REL=previous>
 <LINK HREF="UserModeLinux-HOWTO.html#toc8" REL=contents>
</HEAD>
<BODY>
<A HREF="UserModeLinux-HOWTO-9.html">Next</A>
<A HREF="UserModeLinux-HOWTO-7.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc8">Contents</A>
<HR>
<H2><A NAME="mconsole"></A> <A NAME="s8">8.</A> <A HREF="UserModeLinux-HOWTO.html#toc8">The Management Console</A></H2>

<P> </P>
<P>The UML management console is a low-level interface to the kernel,
somewhat like the i386 SysRq interface.  Since there is a full-blown
operating system under UML, there is much greater flexibility possible
than with the SysRq mechanism.</P>
<P> 
At this point, there are three things you can do with the mconsole
interface:
<UL>
<LI>get the kernel version
</LI>
<LI>add and remove devices
</LI>
<LI>halt or reboot the machine
</LI>
</UL>
</P>
<P> 
You need the mconsole client (uml_mconsole) which is present in CVS
(/tools/mconsole) in 2.4.5-9um and later, and will be in the RPM in 2.4.6.</P>
<P> 
You also need CONFIG_MCONSOLE (under 'General Setup') enabled in UML.
When you boot UML, you'll see a line like:
<BLOCKQUOTE><CODE>
<PRE>
mconsole initialized on /tmp/umlNJ32yL/mconsole
</PRE>
</CODE></BLOCKQUOTE>

If you specify a unique machine id one the UML command line, i.e.
<BLOCKQUOTE><CODE>
<PRE>
umid=debian
</PRE>
</CODE></BLOCKQUOTE>

you'll see this 
<BLOCKQUOTE><CODE>
<PRE>
mconsole initialized on /tmp/debian/mconsole
</PRE>
</CODE></BLOCKQUOTE>

That file is the socket that uml_mconsole will use to communicate
with UML.  Run it with that as its argument:
<BLOCKQUOTE><CODE>
<PRE>
uml_mconsole /tmp/debian/mconsole
</PRE>
</CODE></BLOCKQUOTE>

You'll get a prompt, at which you can run one of these commands:
<UL>
<LI>version
</LI>
<LI>halt
</LI>
<LI>reboot
</LI>
<LI>config
</LI>
<LI>remove
</LI>
</UL>
</P>

<H2><A NAME="ss8.1">8.1</A> <A HREF="UserModeLinux-HOWTO.html#toc8.1">version</A>
</H2>

<P>This takes no arguments.  It prints the UML version.
<BLOCKQUOTE><CODE>
<PRE>
(mconsole) version
OK Linux usermode 2.4.5-9um #1 Wed Jun 20 22:47:08 EDT 2001 i686
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="ss8.2">8.2</A> <A HREF="UserModeLinux-HOWTO.html#toc8.2">halt and reboot</A>
</H2>

<P>These take no arguments.  They shut the machine down immediately, with
no syncing of disks and no clean shutdown of userspace.  So, they are
pretty close to crashing the machine.
<BLOCKQUOTE><CODE>
<PRE>
(mconsole) halt
OK
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="ss8.3">8.3</A> <A HREF="UserModeLinux-HOWTO.html#toc8.3">config</A>
</H2>

<P>&quot;config&quot; adds a new device to the virtual machine.  Currently the
ubd and network drivers support this.  It takes one argument, which is
the device to add, with the same syntax as the kernel command line.
<BLOCKQUOTE><CODE>
<PRE>
(mconsole) config ubd3=/home/jdike/incoming/roots/root_fs_debian22 
OK
(mconsole) config eth1=mcast
OK
</PRE>
</CODE></BLOCKQUOTE>
</P>


<H2><A NAME="ss8.4">8.4</A> <A HREF="UserModeLinux-HOWTO.html#toc8.4">remove</A>
</H2>

<P>&quot;remove&quot; deletes a device from the system.  Its argument is just the
name of the device to be removed. The device must be idle in
whatever sense the driver considers necessary.  In the case of the ubd
driver, the removed block device must not be mounted, swapped on, or
otherwise open, and in the case of the network driver, the device must be down.
<BLOCKQUOTE><CODE>
<PRE>
(mconsole) remove ubd3
OK
(mconsole) remove eth1
OK
</PRE>
</CODE></BLOCKQUOTE>
</P>






<HR>
<A HREF="UserModeLinux-HOWTO-9.html">Next</A>
<A HREF="UserModeLinux-HOWTO-7.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc8">Contents</A>
</BODY>
</HTML>