File: virt-inspector.1

package info (click to toggle)
guestfs-tools 1.52.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 69,236 kB
  • sloc: ansic: 15,698; ml: 15,621; sh: 7,396; xml: 5,478; makefile: 3,601; perl: 1,535; lex: 135; yacc: 128; python: 80
file content (541 lines) | stat: -rw-r--r-- 23,222 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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Podwrapper::Man 1.52.3 (Pod::Simple 3.45)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Required to disable full justification in groff 1.23.0.
.if n .ds AD l
.\" ========================================================================
.\"
.IX Title "virt-inspector 1"
.TH virt-inspector 1 2025-02-18 guestfs-tools-1.52.3 "Virtualization Support"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH 名前
.IX Header "名前"
virt\-inspector \- Display operating system version and other information about a virtual machine
.SH 書式
.IX Header "書式"
.Vb 1
\& virt\-inspector [\-\-options] \-d domname
\&
\& virt\-inspector [\-\-options] \-a disk.img [\-a disk.img ...]
.Ve
.PP
古い形式:
.PP
.Vb 1
\& virt\-inspector domname
\&
\& virt\-inspector disk.img [disk.img ...]
.Ve
.SH 説明
.IX Header "説明"
\&\fBvirt\-inspector\fR examines a virtual machine or disk image and tries to determine the version of the operating system and other information about the virtual machine.
.PP
Virt\-inspector は他のプログラムに提供するための情報をXML形式出力で生成します。
.PP
In the normal usage, use \f(CW\*(C`virt\-inspector \-d domname\*(C'\fR where \f(CW\*(C`domname\*(C'\fR is the libvirt domain (see: \f(CW\*(C`virsh list \-\-all\*(C'\fR).
.PP
You can also run virt\-inspector directly on disk images from a single virtual machine.  Use \f(CW\*(C`virt\-inspector \-a disk.img\*(C'\fR.  In rare cases a domain has several block devices, in which case you should list several \fI\-a\fR options one after another, with the first corresponding to the guest’s \fI/dev/sda\fR, the second to the guest’s \fI/dev/sdb\fR and so on.
.PP
You can also run virt\-inspector on install disks, live CDs, bootable USB keys and similar.
.PP
Virt\-inspector can only inspect and report upon \fIone domain at a time\fR.  To inspect several virtual machines, you have to run virt\-inspector several times (for example, from a shell script for\-loop).
.PP
Because virt\-inspector needs direct access to guest images, it won’t normally work over remote libvirt connections.
.PP
All of the information available from virt\-inspector is also available through the core libguestfs inspection API (see "INSPECTION" in \fBguestfs\fR\|(3)). The same information can also be fetched using guestfish or via libguestfs bindings in many programming languages (see "GETTING INSPECTION DATA FROM THE LIBGUESTFS API").
.PP
Additional information about bootloader, kernel and drivers inside a guest can be found using \fBvirt\-drivers\fR\|(1).
.SH オプション
.IX Header "オプション"
.IP \fB\-\-help\fR 4
.IX Item "--help"
簡単なヘルプを表示します。
.IP "\fB\-a\fR file" 4
.IX Item "-a file"
.PD 0
.IP "\fB\-\-add\fR file" 4
.IX Item "--add file"
.PD
Add \fIfile\fR which should be a disk image from a virtual machine.  If the virtual machine has multiple block devices, you must supply all of them with separate \fI\-a\fR options.
.Sp
ディスクイメージの形式は自動検知されます。 これを上書きして強制的に特定の形式を使用する場合、 \fI\-\-format=..\fR オプションを使用します。
.IP "\fB\-a\fR URI" 4
.IX Item "-a URI"
.PD 0
.IP "\fB\-\-add\fR URI" 4
.IX Item "--add URI"
.PD
リモートディスクを追加します。 "リモートストレージの追加" in \fBguestfish\fR\|(1) 参照。
.IP \fB\-\-blocksize=512\fR 4
.IX Item "--blocksize=512"
.PD 0
.IP \fB\-\-blocksize=4096\fR 4
.IX Item "--blocksize=4096"
.IP \fB\-\-blocksize\fR 4
.IX Item "--blocksize"
.PD
This parameter sets the sector size of the disk image.  It affects all
explicitly added subsequent disks after this parameter.  Using
\&\fI\-\-blocksize\fR with no argument switches the disk sector size to the
default value which is usually 512 bytes.  See also
"guestfs_add_drive_opts" in \fBguestfs\fR\|(3).
.IP "\fB\-c\fR URI" 4
.IX Item "-c URI"
.PD 0
.IP "\fB\-\-connect\fR URI" 4
.IX Item "--connect URI"
.PD
libvirt を使用していると、指定された \fIURI\fR に接続します。  省略すると、デフォルトの libvirt ハイパーバイザーに接続します。
.Sp
Libvirt is only used if you specify a \f(CW\*(C`domname\*(C'\fR on the command line.  If you specify guest block devices directly (\fI\-a\fR), then libvirt is not used at all.
.IP "\fB\-d\fR guest" 4
.IX Item "-d guest"
.PD 0
.IP "\fB\-\-domain\fR guest" 4
.IX Item "--domain guest"
.PD
名前付きの libvirt 仮想マシンからすべてのディスクを追加します。  名前の代わりに仮想マシンの UUID を使用できます。
.IP \fB\-\-echo\-keys\fR 4
.IX Item "--echo-keys"
キーやパスフレーズを入力するとき、通常 virt\-inspector はエコーを無効化します。 そのため、入力内容を確認できません。 テンペスト攻撃の心配がなく、 部屋に誰も居なければ、 入力内容を確認するためにこのフラグを指定できます。
.IP \fB\-\-format=raw|qcow2|..\fR 4
.IX Item "--format=raw|qcow2|.."
.PD 0
.IP \fB\-\-format\fR 4
.IX Item "--format"
.PD
Specify the format of disk images given on the command line.  If this is omitted then the format is autodetected from the content of the disk image.
.Sp
If disk images are requested from libvirt, then this program asks libvirt for this information.  In this case, the value of the format parameter is ignored.
.Sp
If working with untrusted raw\-format guest disk images, you should ensure the format is always specified.
.IP "\fB\-\-key\fR SELECTOR" 4
.IX Item "--key SELECTOR"
Specify a key for LUKS, to automatically open a LUKS device when using
the inspection.
.RS 4
.IP "\fB\-\-key\fR NAME\fB:key:\fRKEY_STRING" 4
.IX Item "--key NAME:key:KEY_STRING"
.PD 0
.IP "\fB\-\-key\fR UUID\fB:key:\fRKEY_STRING" 4
.IX Item "--key UUID:key:KEY_STRING"
.IP "\fB\-\-key\fR \fBall:key:\fRKEY_STRING" 4
.IX Item "--key all:key:KEY_STRING"
.PD
\&\f(CW\*(C`NAME\*(C'\fR is the libguestfs device name (eg. \f(CW\*(C`/dev/sda1\*(C'\fR).  \f(CW\*(C`UUID\*(C'\fR is
the device UUID.  \f(CW\*(C`all\*(C'\fR means try the key against any encrypted
device.
.Sp
Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase.
.IP "\fB\-\-key\fR NAME\fB:file:\fRFILENAME" 4
.IX Item "--key NAME:file:FILENAME"
.PD 0
.IP "\fB\-\-key\fR UUID\fB:file:\fRFILENAME" 4
.IX Item "--key UUID:file:FILENAME"
.IP "\fB\-\-key\fR \fBall:file:\fRFILENAME" 4
.IX Item "--key all:file:FILENAME"
.PD
Read the passphrase from \fIFILENAME\fR.
.IP "\fB\-\-key\fR NAME\fB:clevis\fR" 4
.IX Item "--key NAME:clevis"
.PD 0
.IP "\fB\-\-key\fR UUID\fB:clevis\fR" 4
.IX Item "--key UUID:clevis"
.IP "\fB\-\-key\fR \fBall:clevis\fR" 4
.IX Item "--key all:clevis"
.PD
Attempt passphrase\-less unlocking for the device with Clevis, over the
network.  Please refer to "ENCRYPTED DISKS" in \fBguestfs\fR\|(3) for more
information on network\-bound disk encryption (NBDE).
.Sp
Note that if any such option is present on the command line, QEMU user
networking will be automatically enabled for the libguestfs appliance.
.RE
.RS 4
.RE
.IP \fB\-\-keys\-from\-stdin\fR 4
.IX Item "--keys-from-stdin"
Read key or passphrase parameters from stdin.  The default is
to try to read passphrases from the user by opening \fI/dev/tty\fR.
.Sp
If there are multiple encrypted devices then you may need to supply
multiple keys on stdin, one per line.
.IP \fB\-\-no\-applications\fR 4
.IX Item "--no-applications"
By default the output of virt\-inspector includes the list of all the applications installed in the guest, if available.
.Sp
Specify this option to disable this part of the resulting XML.
.IP \fB\-\-no\-icon\fR 4
.IX Item "--no-icon"
By default the output of virt\-inspector includes the icon of the guest, if available (see "icon").
.Sp
Specify this option to disable this part of the resulting XML.
.IP \fB\-v\fR 4
.IX Item "-v"
.PD 0
.IP \fB\-\-verbose\fR 4
.IX Item "--verbose"
.PD
デバッグ用の冗長なメッセージを有効にします。
.IP \fB\-V\fR 4
.IX Item "-V"
.PD 0
.IP \fB\-\-version\fR 4
.IX Item "--version"
.PD
バージョン番号を表示して、終了します。
.IP \fB\-x\fR 4
.IX Item "-x"
libguestfs API 呼び出しのトレースを有効にします。
.IP "\fB\-\-xpath\fR query" 4
.IX Item "--xpath query"
Perform an XPath query on the XML on stdin, and print the result on stdout. In this mode virt\-inspector simply runs an XPath query; all other inspection functions are disabled.  See "XPATH QUERIES" below for some examples.
.SH 旧形式のコマンドライン引数
.IX Header "旧形式のコマンドライン引数"
Previous versions of virt\-inspector allowed you to write either:
.PP
.Vb 1
\& virt\-inspector disk.img [disk.img ...]
.Ve
.PP
または
.PP
.Vb 1
\& virt\-inspector guestname
.Ve
.PP
whereas in this version you should use \fI\-a\fR or \fI\-d\fR respectively to avoid the confusing case where a disk image might have the same name as a guest.
.PP
互換性のため古い形式がまだサポートされています。
.SH "XML フォーマット"
.IX Header "XML フォーマット"
The virt\-inspector XML is described precisely in a RELAX NG schema file \fIvirt\-inspector.rng\fR which is supplied with libguestfs.  This section is just an overview.
.PP
The top\-level element is <operatingsystems>, and it contains one or more <operatingsystem> elements.  You would only see more than one <operatingsystem> element if the virtual machine is multi\-boot, which is vanishingly rare in real world VMs.
.SS <operatingsystem>
.IX Subsection "<operatingsystem>"
In the <operatingsystem> tag are various optional fields that describe the operating system, its architecture, the descriptive "product name" string, the type of OS and so on, as in this example:
.PP
.Vb 11
\& <operatingsystems>
\&   <operatingsystem>
\&     <root>/dev/sda2</root>
\&     <name>windows</name>
\&     <arch>i386</arch>
\&     <distro>windows</distro>
\&     <product_name>Windows 7 Enterprise</product_name>
\&     <product_variant>Client</product_variant>
\&     <major_version>6</major_version>
\&     <minor_version>1</minor_version>
\&     <windows_systemroot>/Windows</windows_systemroot>
.Ve
.PP
In brief, <name> is the class of operating system (something like \f(CW\*(C`linux\*(C'\fR or \f(CW\*(C`windows\*(C'\fR), <distro> is the distribution (eg. \f(CW\*(C`fedora\*(C'\fR but many other distros are recognized) and <arch> is the guest architecture.  The other fields are fairly self\-explanatory, but because these fields are taken directly from the libguestfs inspection API you can find precise information from "INSPECTION" in \fBguestfs\fR\|(3).
.PP
The <root> element is the root filesystem device, but from the point of view of libguestfs (block devices may have completely different names inside the VM itself).
.SS <mountpoints>
.IX Subsection "<mountpoints>"
Un*x\-like guests typically have multiple filesystems which are mounted at various mountpoints, and these are described in the <mountpoints> element which looks like this:
.PP
.Vb 7
\& <operatingsystems>
\&   <operatingsystem>
\&     ...
\&     <mountpoints>
\&       <mountpoint dev="/dev/vg_f13x64/lv_root">/</mountpoint>
\&       <mountpoint dev="/dev/sda1">/boot</mountpoint>
\&     </mountpoints>
.Ve
.PP
As with <root>, devices are from the point of view of libguestfs, and may have completely different names inside the guest.  Only mountable filesystems appear in this list, not things like swap devices.
.SS <filesystems>
.IX Subsection "<filesystems>"
<filesystems> is like <mountpoints> but covers \fIall\fR filesystems belonging to the guest, including swap and empty partitions. (In the rare case of a multi\-boot guest, it covers filesystems belonging to this OS or shared with this OS and other OSes).
.PP
次のように表示されることがあります:
.PP
.Vb 9
\& <operatingsystems>
\&   <operatingsystem>
\&     ...
\&     <filesystems>
\&       <filesystem dev="/dev/vg_f13x64/lv_root">
\&         <type>ext4</type>
\&         <label>Fedora\-13\-x86_64</label>
\&         <uuid>e6a4db1e\-15c2\-477b\-ac2a\-699181c396aa</uuid>
\&       </filesystem>
.Ve
.PP
The optional elements within <filesystem> are the filesystem type, the label, and the UUID.
.SS <applications>
.IX Subsection "<applications>"
関連する要素 <package_format>, <package_management> および <applications> は仮想マシンにインストールされたアプリケーションを記述しています。
.PP
<package_format>, if present, describes the packaging system used. Typical values would be \f(CW\*(C`rpm\*(C'\fR and \f(CW\*(C`deb\*(C'\fR.
.PP
<package_management>, if present, describes the package manager. Typical values include \f(CW\*(C`yum\*(C'\fR, \f(CW\*(C`up2date\*(C'\fR and \f(CW\*(C`apt\*(C'\fR
.PP
<applications> lists the packages or applications installed.
.PP
.Vb 9
\& <operatingsystems>
\&   <operatingsystem>
\&     ...
\&     <applications>
\&       <application>
\&         <name>coreutils</name>
\&         <version>8.5</version>
\&         <release>1</release>
\&       </application>
.Ve
.PP
The version and release fields may not be available for some types guests. Other fields are possible, see "guestfs_inspect_list_applications" in \fBguestfs\fR\|(3).
.SS <drive_mappings>
.IX Subsection "<drive_mappings>"
For operating systems like Windows which use drive letters, virt\-inspector is able to find out how drive letters map to filesystems.
.PP
.Vb 7
\& <operatingsystems>
\&   <operatingsystem>
\&     ...
\&     <drive_mappings>
\&       <drive_mapping name="C">/dev/sda2</drive_mapping>
\&       <drive_mapping name="E">/dev/sdb1</drive_mapping>
\&     </drive_mappings>
.Ve
.PP
In the example above, drive C maps to the filesystem on the second partition on the first disk, and drive E maps to the filesystem on the first partition on the second disk.
.PP
Note that this only covers permanent local filesystem mappings, not things like network shares.  Furthermore NTFS volume mount points may not be listed here.
.SS <icon>
.IX Subsection "<icon>"
Virt\-inspector is sometimes able to extract an icon or logo for the guest. The icon is returned as base64\-encoded PNG data.  Note that the icon can be very large and high quality.
.PP
.Vb 7
\& <operatingsystems>
\&   <operatingsystem>
\&     ...
\&     <icon>
\&       iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]
\&       [... many lines of base64 data ...]
\&     </icon>
.Ve
.PP
To display the icon, you have to extract it and convert the base64 data back to a binary file.  Use an XPath query or simply an editor to extract the data, then use the coreutils \fBbase64\fR\|(1) program to do the conversion back to a PNG file:
.PP
.Vb 1
\& base64 \-i \-d < icon.data > icon.png
.Ve
.SH "XPath クエリー"
.IX Header "XPath クエリー"
Virt\-inspector includes built in support for running XPath queries.  The reason for including XPath support directly in virt\-inspector is simply that there are no good and widely available command line programs that can do XPath queries.  The only good one is \fBxmlstarlet\fR\|(1) and that is not available on Red Hat Enterprise Linux.
.PP
To perform an XPath query, use the \fI\-\-xpath\fR option.  Note that in this mode, virt\-inspector simply reads XML from stdin and outputs the query result on stdout.  All other inspection features are disabled in this mode.
.PP
例:
.PP
.Vb 5
\& $ virt\-inspector \-d Guest | virt\-inspector \-\-xpath \*(Aq//filesystems\*(Aq
\& <filesystems>
\&      <filesystem dev="/dev/vg_f13x64/lv_root">
\&        <type>ext4</type>
\& [...]
\&
\& $ virt\-inspector \-d Guest | \e
\&     virt\-inspector \-\-xpath "string(//filesystem[@dev=\*(Aq/dev/sda1\*(Aq]/type)"
\& ext4
\&
\& $ virt\-inspector \-d Guest | \e
\&     virt\-inspector \-\-xpath \*(Aqstring(//icon)\*(Aq | base64 \-i \-d | display \-
\& [displays the guest icon, if there is one]
.Ve
.SH "GETTING INSPECTION DATA FROM THE LIBGUESTFS API"
.IX Header "GETTING INSPECTION DATA FROM THE LIBGUESTFS API"
In early versions of libguestfs, virt\-inspector was a large Perl script that contained many heuristics for inspecting guests.  This had several problems: in order to do inspection from other tools (like guestfish) we had to call out to this Perl script; and it privileged Perl over other languages that libguestfs supports.
.PP
By libguestfs 1.8 we had rewritten the Perl code in C, and incorporated it all into the core libguestfs API (\fBguestfs\fR\|(3)).  Now virt\-inspector is simply a thin C program over the core C API.  All of the inspection information is available from all programming languages that libguestfs supports, and from guestfish.
.PP
For a description of the C inspection API, read "INSPECTION" in \fBguestfs\fR\|(3).
.PP
For example code using the C inspection API, look for \fIinspect\-vm.c\fR which ships with libguestfs.
.PP
\&\fIinspect\-vm.c\fR has also been translated into other languages.  For example, \fIinspect_vm.pl\fR is the Perl translation, and there are other translations for OCaml, Python, etc.  See "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES" in \fBguestfs\fR\|(3) for a list of man pages which contain this example code.
.SS "GETTING INSPECTION DATA FROM GUESTFISH"
.IX Subsection "GETTING INSPECTION DATA FROM GUESTFISH"
If you use the guestfish \fI\-i\fR option, then the main C inspection API "guestfs_inspect_os" in \fBguestfs\fR\|(3) is called.  This is equivalent to the guestfish command \f(CW\*(C`inspect\-os\*(C'\fR.  You can also call this guestfish command by hand.
.PP
\&\f(CW\*(C`inspect\-os\*(C'\fR performs inspection on the current disk image, returning the list of operating systems found.  Each OS is represented by its root filesystem device.  In the majority of cases, this command prints nothing (no OSes found), or a single root device, but beware that it can print multiple lines if there are multiple OSes or if there is an install CD attached to the guest.
.PP
.Vb 4
\& $ guestfish \-\-ro \-a F15x32.img
\& ><fs> run
\& ><fs> inspect\-os
\& /dev/vg_f15x32/lv_root
.Ve
.PP
ルートデバイスを使用して、ゲストに関するさらなる情報を取得できます:
.PP
.Vb 8
\& ><fs> inspect\-get\-type /dev/vg_f15x32/lv_root
\& linux
\& ><fs> inspect\-get\-distro /dev/vg_f15x32/lv_root
\& fedora
\& ><fs> inspect\-get\-major\-version /dev/vg_f15x32/lv_root
\& 15
\& ><fs> inspect\-get\-product\-name /dev/vg_f15x32/lv_root
\& Fedora release 15 (Lovelock)
.Ve
.PP
Limitations of guestfish make it hard to assign the root device to a variable (since guestfish doesn\*(Aqt have variables), so if you want to do this reproducibly you are better off writing a script using one of the other languages that the libguestfs API supports.
.PP
アプリケーションを一覧表示するには、まずディスクをマウントする必要があります:
.PP
.Vb 5
\& ><fs> inspect\-get\-mountpoints /dev/vg_f15x32/lv_root
\& /: /dev/vg_f15x32/lv_root
\& /boot: /dev/vda1
\& ><fs> mount\-ro /dev/vg_f15x32/lv_root /
\& ><fs> mount\-ro /dev/vda1 /boot
.Ve
.PP
and then call the inspect\-list\-applications API:
.PP
.Vb 10
\& ><fs> inspect\-list\-applications /dev/vg_f15x32/lv_root | head \-28
\& [0] = {
\&   app_name: ConsoleKit
\&   app_display_name:
\&   app_epoch: 0
\&   app_version: 0.4.5
\&   app_release: 1.fc15
\&   app_install_path:
\&   app_trans_path:
\&   app_publisher:
\&   app_url:
\&   app_source_package:
\&   app_summary:
\&   app_description:
\& }
\& [1] = {
\&   app_name: ConsoleKit\-libs
\&   app_display_name:
\&   app_epoch: 0
\&   app_version: 0.4.5
\&   app_release: 1.fc15
\&   app_install_path:
\&   app_trans_path:
\&   app_publisher:
\&   app_url:
\&   app_source_package:
\&   app_summary:
\&   app_description:
\& }
.Ve
.PP
To display an icon for the guest, note that filesystems must also be mounted as above.  You can then do:
.PP
.Vb 1
\& ><fs> inspect\-get\-icon /dev/vg_f15x32/lv_root | display \-
.Ve
.SH "古いバージョンの virt\-inspector"
.IX Header "古いバージョンの virt-inspector"
As described above, early versions of libguestfs shipped with a different virt\-inspector program written in Perl (the current version is written in C).  The XML output of the Perl virt\-inspector was different and it could also output in other formats like text.
.PP
古い virt\-inspector はもはや libguestfs でサポートされず、同梱されていません。
.PP
さらに混乱することに、Red Hat Enterprise Linux 6 では異なる名前で 2 つのバージョンの virt\-inspector が同梱されています:
.PP
.Vb 2
\& virt\-inspector     古い Perl バージョンです。
\& virt\-inspector2    新しい C バージョンです。
.Ve
.SH 終了ステータス
.IX Header "終了ステータス"
このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。
.SH 関連項目
.IX Header "関連項目"
\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), http://www.w3.org/TR/xpath/, \fBbase64\fR\|(1), \fBxmlstarlet\fR\|(1), \fBvirt\-drivers\fR\|(1), http://libguestfs.org/.
.SH 著者
.IX Header "著者"
.IP \(bu 4
Richard W.M. Jones http://people.redhat.com/~rjones/
.IP \(bu 4
Matthew Booth mbooth@redhat.com
.SH COPYRIGHT
.IX Header "COPYRIGHT"
Copyright (C) 2010\-2023 Red Hat Inc.
.SH LICENSE
.IX Header "LICENSE"
.SH BUGS
.IX Header "BUGS"
To get a list of bugs against libguestfs, use this link:
https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
.PP
To report a new bug against libguestfs, use this link:
https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
.PP
When reporting a bug, please supply:
.IP \(bu 4
The version of libguestfs.
.IP \(bu 4
Where you got libguestfs (eg. which Linux distro, compiled from source, etc)
.IP \(bu 4
Describe the bug accurately and give a way to reproduce it.
.IP \(bu 4
Run \fBlibguestfs\-test\-tool\fR\|(1) and paste the \fBcomplete, unedited\fR
output into the bug report.