File: guestmount.1

package info (click to toggle)
libguestfs 1%3A1.18.1-1%2Bdeb7u3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,156 kB
  • sloc: ansic: 282,408; ml: 22,707; sh: 16,121; perl: 5,946; java: 5,047; cs: 4,329; makefile: 3,191; haskell: 2,564; erlang: 1,510; python: 1,502; xml: 509; ruby: 217; pascal: 142; cpp: 11
file content (414 lines) | stat: -rw-r--r-- 15,583 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
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" 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
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'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 turned on, 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.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\" ========================================================================
.\"
.IX Title "guestmount 1"
.TH guestmount 1 "2012-06-01" "libguestfs-1.18.1" "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 "НАЗВА"
guestmount \- Mount a guest filesystem on the host using \s-1FUSE\s0 and libguestfs
.SH "КОРОТКИЙ ОПИС"
.IX Header "КОРОТКИЙ ОПИС"
.Vb 1
\& guestmount [\-\-options] \-a disk.img \-m device [\-\-ro] mountpoint
\&
\& guestmount [\-\-options] \-a disk.img \-i [\-\-ro] mountpoint
\&
\& guestmount [\-\-options] \-d Guest \-i [\-\-ro] mountpoint
.Ve
.SH "ПОПЕРЕДЖЕННЯ"
.IX Header "ПОПЕРЕДЖЕННЯ"
You must \fInot\fR use \f(CW\*(C`guestmount\*(C'\fR in read-write mode on live virtual
machines.  If you do this, you risk disk corruption in the \s-1VM\s0.
.SH "ОПИС"
.IX Header "ОПИС"
The guestmount program can be used to mount virtual machine filesystems and
other disk images on the host.  It uses libguestfs for access to the guest
filesystem, and \s-1FUSE\s0 (the \*(L"filesystem in userspace\*(R") to make it appear as a
mountable device.
.PP
Along with other options, you have to give at least one device (\fI\-a\fR
option) or libvirt domain (\fI\-d\fR option), and at least one mountpoint (\fI\-m\fR
option) or use the \fI\-i\fR inspection option or the \fI\-\-live\fR option.  How
this works is better explained in the \fIguestfish\fR\|(1) manual page, or by
looking at the examples below.
.PP
\&\s-1FUSE\s0 lets you mount filesystems as non-root.  The mountpoint must be owned
by you, and the filesystem will not be visible to any other users unless you
make certain global configuration changes to \f(CW\*(C`/etc/fuse.conf\*(C'\fR.  To unmount
the filesystem, use the \f(CW\*(C`fusermount \-u\*(C'\fR command.
.SH "ПРИКЛАДИ"
.IX Header "ПРИКЛАДИ"
For a typical Windows guest which has its main filesystem on the first
partition:
.PP
.Vb 1
\& guestmount \-a windows.img \-m /dev/sda1 \-\-ro /mnt
.Ve
.PP
For a typical Linux guest which has a /boot filesystem on the first
partition, and the root filesystem on a logical volume:
.PP
.Vb 1
\& guestmount \-a linux.img \-m /dev/VG/LV \-m /dev/sda1:/boot \-\-ro /mnt
.Ve
.PP
To get libguestfs to detect guest mountpoints for you:
.PP
.Vb 1
\& guestmount \-a guest.img \-i \-\-ro /mnt
.Ve
.PP
For a libvirt guest called \*(L"Guest\*(R" you could do:
.PP
.Vb 1
\& guestmount \-d Guest \-i \-\-ro /mnt
.Ve
.PP
If you don't know what filesystems are contained in a guest or disk image,
use \fIvirt\-filesystems\fR\|(1) first:
.PP
.Vb 1
\& virt\-filesystems \-d MyGuest
.Ve
.PP
If you want to trace the libguestfs calls but without excessive debugging
information, we recommend:
.PP
.Vb 1
\& guestmount [...] \-\-trace /mnt
.Ve
.PP
If you want to debug the program, we recommend:
.PP
.Vb 1
\& guestmount [...] \-\-trace \-\-verbose /mnt
.Ve
.SH "ПРИМІТКИ"
.IX Header "ПРИМІТКИ"
.SS "Other users cannot see the filesystem by default"
.IX Subsection "Other users cannot see the filesystem by default"
If you mount a filesystem as one user (eg. root), then other users will not
be able to see it by default.  The fix is to add the \s-1FUSE\s0 \f(CW\*(C`allow_other\*(C'\fR
option when mounting:
.PP
.Vb 1
\& sudo guestmount [...] \-o allow_other /mnt
.Ve
.SS "Enabling \s-1FUSE\s0"
.IX Subsection "Enabling FUSE"
On some distros, you may need to add yourself to a special group
(eg. \f(CW\*(C`fuse\*(C'\fR) before you can use any \s-1FUSE\s0 filesystem.  This is necessary on
Debian and derivatives.
.PP
On other distros, no special group is required.  It is not necessary on
Fedora or Red Hat Enterprise Linux.
.SH "ПАРАМЕТРИ"
.IX Header "ПАРАМЕТРИ"
.IP "\fB\-a образ\fR" 4
.IX Item "-a образ"
.PD 0
.IP "\fB\-\-add образ\fR" 4
.IX Item "--add образ"
.PD
Add a block device or virtual machine image.
.Sp
The format of the disk image is auto-detected.  To override this and force a
particular format use the \fI\-\-format=..\fR option.
.IP "\fB\-c адреса\fR" 4
.IX Item "-c адреса"
.PD 0
.IP "\fB\-\-connect адреса\fR" 4
.IX Item "--connect адреса"
.PD
When used in conjunction with the \fI\-d\fR option, this specifies the libvirt
\&\s-1URI\s0 to use.  The default is to use the default libvirt connection.
.IP "\fB\-d домен\-libvirt\fR" 4
.IX Item "-d домен-libvirt"
.PD 0
.IP "\fB\-\-domain домен\-libvirt\fR" 4
.IX Item "--domain домен-libvirt"
.PD
Add disks from the named libvirt domain.  If the \fI\-\-ro\fR option is also
used, then any libvirt domain can be used.  However in write mode, only
libvirt domains which are shut down can be named here.
.Sp
Domain UUIDs can be used instead of names.
.IP "\fB\-\-dir\-cache\-timeout N\fR" 4
.IX Item "--dir-cache-timeout N"
Set the readdir cache timeout to \fIN\fR seconds, the default being 60
seconds.  The readdir cache [actually, there are several semi-independent
caches] is populated after a \fIreaddir\fR\|(2) call with the stat and extended
attributes of the files in the directory, in anticipation that they will be
requested soon after.
.Sp
There is also a different attribute cache implemented by \s-1FUSE\s0 (see the \s-1FUSE\s0
option \fI\-o attr_timeout\fR), but the \s-1FUSE\s0 cache does not anticipate future
requests, only cache existing ones.
.IP "\fB\-\-echo\-keys\fR" 4
.IX Item "--echo-keys"
When prompting for keys and passphrases, guestfish normally turns echoing
off so you cannot see what you are typing.  If you are not worried about
Tempest attacks and there is no one else in the room you can specify this
flag to see what you are typing.
.IP "\fB\-\-format=raw|qcow2|..\fR" 4
.IX Item "--format=raw|qcow2|.."
.PD 0
.IP "\fB\-\-format\fR" 4
.IX Item "--format"
.PD
The default for the \fI\-a\fR option is to auto-detect the format of the disk
image.  Using this forces the disk format for \fI\-a\fR options which follow on
the command line.  Using \fI\-\-format\fR with no argument switches back to
auto-detection for subsequent \fI\-a\fR options.
.Sp
If you have untrusted raw-format guest disk images, you should use this
option to specify the disk format.  This avoids a possible security problem
with malicious guests (\s-1CVE\-2010\-3851\s0).  See also
\&\*(L"guestfs_add_drive_opts\*(R" in \fIguestfs\fR\|(3).
.IP "\fB\-\-fuse\-help\fR" 4
.IX Item "--fuse-help"
Display help on special \s-1FUSE\s0 options (see \fI\-o\fR below).
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
Display brief help and exit.
.IP "\fB\-i\fR" 4
.IX Item "-i"
.PD 0
.IP "\fB\-\-inspector\fR" 4
.IX Item "--inspector"
.PD
Using \fIvirt\-inspector\fR\|(1) code, inspect the disks looking for an operating
system and mount filesystems as they would be mounted on the real virtual
machine.
.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 \f(CW\*(C`/dev/tty\*(C'\fR.
.IP "\fB\-\-live\fR" 4
.IX Item "--live"
Connect to a live virtual machine.  (Experimental, see
\&\*(L"\s-1ATTACHING\s0 \s-1TO\s0 \s-1RUNNING\s0 \s-1DAEMONS\s0\*(R" in \fIguestfs\fR\|(3)).
.IP "\fB\-m пристрій[:точка_монтування[:параметри]]\fR" 4
.IX Item "-m пристрій[:точка_монтування[:параметри]]"
.PD 0
.IP "\fB\-\-mount пристрій[:точка_монтування[:параметри]]\fR" 4
.IX Item "--mount пристрій[:точка_монтування[:параметри]]"
.PD
Mount the named partition or logical volume on the given mountpoint \fBin the
guest\fR (this has nothing to do with mountpoints in the host).
.Sp
If the mountpoint is omitted, it defaults to \f(CW\*(C`/\*(C'\fR.  You have to mount
something on \f(CW\*(C`/\*(C'\fR.
.Sp
The third (and rarely used) part of the mount parameter is the list of mount
options used to mount the underlying filesystem.  If this is not given, then
the mount options are either the empty string or \f(CW\*(C`ro\*(C'\fR (the latter if the
\&\fI\-\-ro\fR flag is used).  By specifying the mount options, you override this
default choice.  Probably the only time you would use this is to enable ACLs
and/or extended attributes if the filesystem can support them:
.Sp
.Vb 1
\& \-m /dev/sda1:/:acl,user_xattr
.Ve
.IP "\fB\-n\fR" 4
.IX Item "-n"
.PD 0
.IP "\fB\-\-no\-sync\fR" 4
.IX Item "--no-sync"
.PD
By default, we attempt to sync the guest disk when the \s-1FUSE\s0 mountpoint is
unmounted.  If you specify this option, then we don't attempt to sync the
disk.  See the discussion of autosync in the \fIguestfs\fR\|(3) manpage.
.IP "\fB\-o параметр\fR" 4
.IX Item "-o параметр"
.PD 0
.IP "\fB\-\-option параметр\fR" 4
.IX Item "--option параметр"
.PD
Pass extra options to \s-1FUSE\s0.
.Sp
To get a list of all the extra options supported by \s-1FUSE\s0, use the command
below.  Note that only the \s-1FUSE\s0 \fI\-o\fR options can be passed, and only some
of them are a good idea.
.Sp
.Vb 1
\& guestmount \-\-fuse\-help
.Ve
.Sp
Some potentially useful \s-1FUSE\s0 options:
.RS 4
.IP "\fB\-o allow_other\fR" 4
.IX Item "-o allow_other"
Allow other users to see the filesystem.
.IP "\fB\-o attr_timeout=N\fR" 4
.IX Item "-o attr_timeout=N"
Enable attribute caching by \s-1FUSE\s0, and set the timeout to \fIN\fR seconds.
.IP "\fB\-o kernel_cache\fR" 4
.IX Item "-o kernel_cache"
Allow the kernel to cache files (reduces the number of reads that have to go
through the \fIguestfs\fR\|(3) \s-1API\s0).  This is generally a good idea if you can
afford the extra memory usage.
.IP "\fB\-o uid=N\fR \fB\-o gid=N\fR" 4
.IX Item "-o uid=N -o gid=N"
Use these options to map all UIDs and GIDs inside the guest filesystem to
the chosen values.
.RE
.RS 4
.RE
.IP "\fB\-r\fR" 4
.IX Item "-r"
.PD 0
.IP "\fB\-\-ro\fR" 4
.IX Item "--ro"
.PD
Add devices and mount everything read-only.  Also disallow writes and make
the disk appear read-only to \s-1FUSE\s0.
.Sp
This is highly recommended if you are not going to edit the guest disk.  If
the guest is running and this option is \fInot\fR supplied, then there is a
strong risk of disk corruption in the guest.  We try to prevent this from
happening, but it is not always possible.
.Sp
Див. також \*(L"\s-1OPENING\s0 \s-1DISKS\s0 \s-1FOR\s0 \s-1READ\s0 \s-1AND\s0 \s-1WRITE\s0\*(R" in \fIguestfish\fR\|(1).
.IP "\fB\-\-selinux\fR" 4
.IX Item "--selinux"
Enable SELinux support for the guest.
.IP "\fB\-v\fR" 4
.IX Item "-v"
.PD 0
.IP "\fB\-\-verbose\fR" 4
.IX Item "--verbose"
.PD
Enable verbose messages from underlying libguestfs.
.IP "\fB\-V\fR" 4
.IX Item "-V"
.PD 0
.IP "\fB\-\-version\fR" 4
.IX Item "--version"
.PD
Display the program version and exit.
.IP "\fB\-w\fR" 4
.IX Item "-w"
.PD 0
.IP "\fB\-\-rw\fR" 4
.IX Item "--rw"
.PD
This changes the \fI\-a\fR, \fI\-d\fR and \fI\-m\fR options so that disks are added and
mounts are done read-write.
.Sp
Див. \*(L"\s-1OPENING\s0 \s-1DISKS\s0 \s-1FOR\s0 \s-1READ\s0 \s-1AND\s0 \s-1WRITE\s0\*(R" in \fIguestfish\fR\|(1).
.IP "\fB\-x\fR" 4
.IX Item "-x"
.PD 0
.IP "\fB\-\-trace\fR" 4
.IX Item "--trace"
.PD
Trace libguestfs calls and entry into each \s-1FUSE\s0 function.
.Sp
This also stops the daemon from forking into the background.
.SH "ФАЙЛИ"
.IX Header "ФАЙЛИ"
.ie n .IP "$HOME/.libguestfs\-tools.rc" 4
.el .IP "\f(CW$HOME\fR/.libguestfs\-tools.rc" 4
.IX Item "$HOME/.libguestfs-tools.rc"
.PD 0
.IP "/etc/libguestfs\-tools.conf" 4
.IX Item "/etc/libguestfs-tools.conf"
.PD
This configuration file controls the default read-only or read-write mode
(\fI\-\-ro\fR or \fI\-\-rw\fR).
.Sp
Див. \*(L"\s-1OPENING\s0 \s-1DISKS\s0 \s-1FOR\s0 \s-1READ\s0 \s-1AND\s0 \s-1WRITE\s0\*(R" in \fIguestfish\fR\|(1).
.SH "СТАН ВИХОДУ"
.IX Header "СТАН ВИХОДУ"
Ця програма повертає значення 0 у разі успішного завершення і ненульове
значення, якщо сталася помилка.
.SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ"
.IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ"
\&\fIguestfish\fR\|(1), \fIvirt\-inspector\fR\|(1), \fIvirt\-cat\fR\|(1), \fIvirt\-edit\fR\|(1),
\&\fIvirt\-tar\fR\|(1), \fIguestfs\fR\|(3), <http://libguestfs.org/>,
<http://fuse.sf.net/>.
.SH "АВТОРИ"
.IX Header "АВТОРИ"
Richard W.M. Jones (\f(CW\*(C`rjones at redhat dot com\*(C'\fR)
.SH "АВТОРСЬКІ ПРАВА"
.IX Header "АВТОРСЬКІ ПРАВА"
© Red Hat Inc., 2009–2012 <http://libguestfs.org/>
.PP
Ця програма є вільним програмним забезпеченням; ви можете поширювати та/або
змінювати її за умов дотримання \s-1GNU\s0 General Public License  утому вигляді,
що оприлюднений Free Software Foundation; версії 2 цієї Ліцензії, або (якщо
забажаєте) будь\-якої випущеної пізніше.
.PP
Ця програма поширюється у сподіванні, що вона буде корисною, але БЕЗ
БУДЬ\-ЯКИХ ГАРАНТІЙНИХ ЗОБОВ’ЯЗАНЬ; навіть без очевидної гарантії
ПРАЦЕЗДАТНОСТІ або ПРИДАТНОСТІ ДЛЯ ВИКОРИСТАННЯ З ПЕВНОЮ МЕТОЮ. Докладніше
про це можна дізнатися з \s-1GNU\s0 General Public License.
.PP
Ви маєте отримати копію \s-1GNU\s0 General Public License разом з цією програмою;
якщо це не так, повідомте про факт за адресою Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, \s-1MA\s0 02110\-1301, \s-1USA\s0.