File: mconsole.html

package info (click to toggle)
user-mode-linux-doc 20020523-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,592 kB
  • ctags: 340
  • sloc: makefile: 32
file content (409 lines) | stat: -rw-r--r-- 12,947 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
   <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<title>The Management Console</title>
</head>
<body alink="#FF0000" vlink="#55188A" link="#0000EF" bgcolor="#FFFFFF" text="#000099">
<table border="0">
<tr align="left">
<td valign="top">
<table border="0">

<tr align="left"><td valign="top" >
<img width="120" height="171" src="uml-small.png">
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">
<font size="-1"><a href="index.html">Site Home Page</a></font>
<br>
              <font size="-1"><a href="uses.html">What it's good for</a></font>
<br>
              <font size="-1"><a href="case-studies.html">Case Studies</a></font>
<br>
              <font size="-1"><a href="kernel.html">Kernel Capabilities</a></font>
<br>
              <font size="-1"><a href="dl-sf.html">Downloading it</a></font>
<br>
              <font size="-1"><a href="run.html">Running it</a></font>
<br>
              <font size="-1"><a href="compile.html">Compiling</a></font>
<br>
              <font size="-1"><a href="install.html">Installation</a></font>
<br>
              <font size="-1"><a href="fs_making.html">Building filesystems</a></font>
<br>
              <font size="-1"><a href="faq.html">Troubles</a></font>
<br>
              <font size="-1"><a href="contrib.html">User Contributions</a></font>
<br>
              <font size="-1"><a href="links.html">Related Links</a></font>
<br>
              <font size="-1"><a href="todo.html">The ToDo list</a></font>
<br>
              <font size="-1"><a href="projects.html">Projects</a></font>
<br>
              <font size="-1"><a href="diary.html">Diary</a></font>
<br>
              <font size="-1"><a href="thanks.html">Thanks</a></font>
<br>
              <font size="-1"><a href="contacts.html">Contacts</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">Tutorials<br>
<font size="-1"><a href="UserModeLinux-HOWTO.html">The HOWTO (html)</a></font>
<br>
              <font size="-1"><a href="UserModeLinux-HOWTO.txt">The HOWTO (text)</a></font>
<br>
              <font size="-1"><a href="hostfs.html">Host file access</a></font>
<br>
              <font size="-1"><a href="input.html">Device inputs</a></font>
<br>
              <font size="-1"><a href="shared_fs.html">Sharing filesystems</a></font>
<br>
              <font size="-1"><a href="fs.html">Creating filesystems</a></font>
<br>
              <font size="-1"><a href="networking.html">Virtual Networking</a></font>
<br>
              <font size="-1"><a href="mconsole.html">Management Console</a></font>
<br>
              <font size="-1"><a href="debugging.html">Kernel Debugging</a></font>
<br>
              <font size="-1"><a href="gprof.html">gprof and gcov</a></font>
<br>
              <font size="-1"><a href="xtut.html">Running X</a></font>
<br>
              <font size="-1"><a href="trouble.html">Diagnosing problems</a></font>
<br>
              <font size="-1"><a href="config.html">Configuration</a></font>
<br>
              <font size="-1"><a href="slack_readme.html">Installing Slackware</a></font>
<br>
              <font size="-1"><a href="arch-port.html">Porting UML</a></font>
<br>
              <font size="-1"><a href="iomem.html">IO memory emulation</a></font>
<br>
              <font size="-1"><a href="2G-2G.html">UML on 2G/2G hosts</a></font>
<br>
              <font size="-1"><a href="lksct/index.html">Adding a UML system call</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">How you can help<br>
<font size="-1"><a href="help-gen.html">Overview</a></font>
<br>
              <font size="-1"><a href="help-doc.html">Documentation</a></font>
<br>
              <font size="-1"><a href="help-userspace.html">Utilities</a></font>
<br>
              <font size="-1"><a href="help-kernel-v1.html">Kernel bugs</a></font>
<br>
              <font size="-1"><a href="projects.html">Kernel projects</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">Screenshots<br>
<font size="-1"><a href="net.html">A virtual network</a></font>
<br>
              <font size="-1"><a href="x.html">An X session</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">Transcripts<br>
<font size="-1"><a href="login.html">A login session</a></font>
<br>
              <font size="-1"><a href="debug-session.html">A debugging session</a></font>
<br>
              <font size="-1"><a href="slackinst.html">Slackware installation</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">Reference<br>
<font size="-1"><a href="switches.html">Kernel switches</a></font>
<br>
              <font size="-1"><a href="slack_readme.html">Slackware README</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">Papers<br>
<font size="-1"><a href="als2000/index.html">ALS 2000 paper (html)</a></font>
<br>
              <font size="-1"><a href="als2000.tex">ALS 2000 paper (TeX)</a></font>
<br>
              <font size="-1"><a href="slides/als2000/slides.html">ALS 2000 slides</a></font>
<br>
              <font size="-1"><a href="slides/lca2001/lca.html">LCA 2001 slides</a></font>
<br>
              <font size="-1"><a href="slides/ols2001/index.html">OLS 2001 paper (html)</a></font>
<br>
              <font size="-1"><a href="ols2001.tex">OLS 2001 paper (TeX)</a></font>
<br>
              <font size="-1"><a href="als2001/index.html">ALS 2001 paper (html)</a></font>
<br>
              <font size="-1"><a href="als2001.tex">ALS 2001 paper (TeX)</a></font>
<br>
              <font size="-1"><a href="slides/ists2002/umlsec.htm">UML security (html)</a></font>
<br>
              <font size="-1"><a href="slides/lca2002/lca2002.htm">LCA 2002 (html)</a></font>
<br>
              <font size="-1"><a href="slides/wvu2002/wvu2002.htm">WVU 2002 (html)</a></font>
</td></tr>

<tr align="left"><td valign="top" bgcolor="#e0e0e0">Fun and Games<br>
<font size="-1"><a href="http://user-mode-linux.sourceforge.net/cgi-bin/hangman">Kernel Hangman</a></font>
<br>
              <font size="-1"><a href="sdotm.html">Disaster of the Month</a></font>
</td></tr>

</table>
</td>
<td valign="top" align="left">

<center>
            <h3>The Management Console</h3>
          </center>

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>
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>
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>
You also need CONFIG_MCONSOLE (under 'General Setup') enabled in UML.
When you boot UML, you'll see a line like:
<blockquote>
            <tt>
              <font color="#000000">mconsole initialized on /home/jdike/.uml/umlNJ32yL/mconsole</font>
            </tt>
          </blockquote>
If you specify a unique machine id one the UML command line, i.e.
<blockquote>
            <tt>
              <font color="#000000">umid=debian</font>
            </tt>
          </blockquote>
you'll see this 
<blockquote>
            <tt>
              <font color="#000000">mconsole initialized on /home/jdike/.uml/debian/mconsole</font>
            </tt>
          </blockquote>
That file is the socket that uml_mconsole will use to communicate
with UML.  Run it with either the umid or the full path as its argument:
<blockquote>
            <tt>
              <font color="#000000">uml_mconsole debian</font>
            </tt>
          </blockquote>
or
<blockquote>
            <tt>
              <font color="#000000">uml_mconsole /home/jdike/.uml/debian/mconsole</font>
            </tt>
          </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>
<li>
sysrq
</li>
<li>
help
</li>
<li>
cad
</li>
</ul>

<a name="version"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">version</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="version">
This takes no arguments.  It prints the UML version.
<tt>
              <pre>
                <font size="-1">
(mconsole) version
OK Linux usermode 2.4.5-9um #1 Wed Jun 20 22:47:08 EDT 2001 i686
</font>
              </pre>
            </tt>
</blockquote>

<a name="halt and reboot"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">halt and reboot</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="halt and reboot">
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.
<tt>
              <pre>
                <font size="-1">
(mconsole) halt
OK
</font>
              </pre>
            </tt>
</blockquote>

<a name="config"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">config</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="config">
&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.
<tt>
              <pre>
                <font size="-1">
(mconsole) config ubd3=/home/jdike/incoming/roots/root_fs_debian22 
OK
(mconsole) config eth1=mcast
OK
</font>
              </pre>
            </tt>
</blockquote>

<a name="remove"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">remove</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="remove">
&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.
<tt>
              <pre>
                <font size="-1">
(mconsole) remove ubd3
OK
(mconsole) remove eth1
OK
</font>
              </pre>
            </tt>
</blockquote>

<a name="sysrq"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">sysrq</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="sysrq">
This takes one argument, which is a single letter.  It calls the
generic kernel's SysRq driver, which does whatever is called for by
that argument.  See the SysRq documentation in Documentation/sysrq.txt
in your favorite kernel tree to see what letters are valid and what
they do.
</blockquote>

<a name="help"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">help</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="help">
&quot;help&quot; returns a string listing the valid commands and what each one does.
</blockquote>

<a name="cad"/><table width="100%" bgcolor="#e0e0e0">
            <tr>
              <td>
                <b>
                  <font color="black">cad</font>
                </b>
              </td>
            </tr>
          </table>
          <blockquote head="cad">
This invokes the Ctl-Alt-Del action on init.  What exactly this ends
up doing is up to /etc/inittab.  Normally, it reboots the machine.
With UML, this is usually not desired, so if a halt would be better,
then find the section of inittab that looks like this
<tt>
              <pre>
                <font size="-1">
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
</font>
              </pre>
            </tt>
and change the command to halt.
</blockquote>


</td>
</tr>
</table>

<center>
<font size="-1">
Hosted at </font>
<a href="http://sourceforge.net">
<IMG alt="SourceForge Logo" border="0" height="31" width="88" src="http://sourceforge.net/sflogo.php?group_id=429">
</a>
</center>
</body>
</html>