1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
5 # rjones <rjones@redhat.com>, 2011.
8 "Project-Id-Version: libguestfs\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-09-28 21:49+0200\n"
11 "PO-Revision-Date: 2011-07-17 20:50+0000\n"
12 "Last-Translator: rjones <rjones@redhat.com>\n"
13 "Language-Team: Japanese (http://www.transifex.net/projects/p/fedora/team/"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=1; plural=0\n"
22 #: ../cat/virt-cat.pod:3 ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3
23 #: ../df/virt-df.pod:3 ../edit/virt-edit.pod:3
24 #: ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3
25 #: ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3
26 #: ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3
27 #: ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3
28 #: ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3
29 #: ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3
30 #: ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3
31 #: ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3
32 #: ../ruby/examples/guestfs-ruby.pod:3 ../src/guestfs.pod:3
33 #: ../test-tool/libguestfs-test-tool.pod:3
34 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
35 #: ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31
36 #: ../tools/virt-win-reg.pl:35
41 #: ../cat/virt-cat.pod:5
42 msgid "virt-cat - Display files in a virtual machine"
46 #: ../cat/virt-cat.pod:7 ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7
47 #: ../df/virt-df.pod:7 ../edit/virt-edit.pod:7
48 #: ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7
49 #: ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7
50 #: ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7
51 #: ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7
52 #: ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7
53 #: ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7
54 #: ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7
55 #: ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7
56 #: ../src/guestfs.pod:7 ../test-tool/libguestfs-test-tool.pod:7
57 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
58 #: ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35
59 #: ../tools/virt-win-reg.pl:39
64 #: ../cat/virt-cat.pod:9
67 " virt-cat [--options] -d domname file [file ...]\n"
72 #: ../cat/virt-cat.pod:11
75 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
80 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
81 #: ../inspector/virt-inspector.pod:13
86 #: ../cat/virt-cat.pod:15
89 " virt-cat domname file\n"
94 #: ../cat/virt-cat.pod:17
97 " virt-cat disk.img file\n"
102 #: ../cat/virt-cat.pod:19 ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19
103 #: ../df/virt-df.pod:21 ../edit/virt-edit.pod:27
104 #: ../erlang/examples/guestfs-erlang.pod:16
105 #: ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18
106 #: ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19
107 #: ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21
108 #: ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20
109 #: ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15
110 #: ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18
111 #: ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29
112 #: ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15
113 #: ../src/guestfs.pod:23 ../test-tool/libguestfs-test-tool.pod:11
114 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
115 #: ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77
116 #: ../tools/virt-win-reg.pl:63
121 #: ../cat/virt-cat.pod:21
123 "C<virt-cat> is a command line tool to display the contents of C<file> where "
124 "C<file> exists in the named virtual machine (or disk image)."
128 #: ../cat/virt-cat.pod:24
130 "Multiple filenames can be given, in which case they are concatenated "
131 "together. Each filename must be a full path, starting at the root directory "
132 "(starting with '/')."
136 #: ../cat/virt-cat.pod:28
138 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
139 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
140 "(see L</USING GUESTFISH> below)."
144 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
145 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
146 #: ../fish/guestfish.pod:1018 ../fish/virt-copy-in.pod:29
147 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
148 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
149 #: ../resize/virt-resize.pod:27 ../tools/virt-tar.pl:50
154 #: ../cat/virt-cat.pod:34
156 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
160 #: ../cat/virt-cat.pod:37
163 " virt-cat -d mydomain /etc/fstab\n"
168 #: ../cat/virt-cat.pod:39
169 msgid "List syslog messages from a VM disk image file:"
173 #: ../cat/virt-cat.pod:41
176 " virt-cat -a disk.img /var/log/messages | tail\n"
181 #: ../cat/virt-cat.pod:43
182 msgid "Find out what DHCP IP address a VM acquired:"
186 #: ../cat/virt-cat.pod:45
189 " virt-cat -d mydomain /var/log/messages | \\\n"
190 " grep 'dhclient: bound to' | tail\n"
195 #: ../cat/virt-cat.pod:48
196 msgid "Find out what packages were recently installed:"
200 #: ../cat/virt-cat.pod:50
203 " virt-cat -d mydomain /var/log/yum.log | tail\n"
208 #: ../cat/virt-cat.pod:52
209 msgid "Find out who is logged on inside a virtual machine:"
213 #: ../cat/virt-cat.pod:54
216 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
222 #: ../cat/virt-cat.pod:57
223 msgid "or who was logged on:"
227 #: ../cat/virt-cat.pod:59
230 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
231 " last -f /tmp/wtmp\n"
236 #: ../cat/virt-cat.pod:62 ../cat/virt-filesystems.pod:91
237 #: ../cat/virt-ls.pod:261 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62
238 #: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45
239 #: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42
240 #: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:83
241 #: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84
242 #: ../resize/virt-resize.pod:241 ../test-tool/libguestfs-test-tool.pod:36
243 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54
244 #: ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103
245 #: ../tools/virt-win-reg.pl:96
250 #: ../cat/virt-cat.pod:66 ../cat/virt-filesystems.pod:95
251 #: ../cat/virt-ls.pod:265 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66
252 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:151
253 #: ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88
254 #: ../resize/virt-resize.pod:245 ../test-tool/libguestfs-test-tool.pod:40
255 #: ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62
256 #: ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111
257 #: ../tools/virt-win-reg.pl:104
262 #: ../cat/virt-cat.pod:68 ../cat/virt-filesystems.pod:97
263 #: ../cat/virt-ls.pod:267 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68
264 #: ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90
265 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64
266 #: ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113
267 #: ../tools/virt-win-reg.pl:106
268 msgid "Display brief help."
272 #: ../cat/virt-cat.pod:70 ../cat/virt-filesystems.pod:99
273 #: ../cat/virt-ls.pod:269 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70
274 #: ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
279 #: ../cat/virt-cat.pod:72 ../cat/virt-filesystems.pod:101
280 #: ../cat/virt-ls.pod:271 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72
281 #: ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
282 msgid "B<--add> file"
286 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
287 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
288 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
290 "Add I<file> which should be a disk image from a virtual machine. If the "
291 "virtual machine has multiple block devices, you must supply all of them with "
292 "separate I<-a> options."
296 #: ../cat/virt-cat.pod:78 ../cat/virt-filesystems.pod:107
297 #: ../cat/virt-ls.pod:277 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78
298 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:93
299 #: ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
301 "The format of the disk image is auto-detected. To override this and force a "
302 "particular format use the I<--format=..> option."
306 #: ../cat/virt-cat.pod:81 ../cat/virt-filesystems.pod:125
307 #: ../cat/virt-ls.pod:291 ../df/virt-df.pod:78 ../rescue/virt-rescue.pod:107
312 #: ../cat/virt-cat.pod:83 ../cat/virt-filesystems.pod:127
313 #: ../cat/virt-ls.pod:293 ../df/virt-df.pod:80 ../rescue/virt-rescue.pod:109
314 msgid "B<--connect> URI"
318 #: ../cat/virt-cat.pod:85 ../cat/virt-filesystems.pod:129
319 #: ../cat/virt-ls.pod:295 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99
320 #: ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111
321 #: ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82
322 #: ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
324 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
325 "to the default libvirt hypervisor."
329 #: ../cat/virt-cat.pod:88 ../cat/virt-filesystems.pod:132
330 #: ../cat/virt-ls.pod:298 ../df/virt-df.pod:85 ../rescue/virt-rescue.pod:114
332 "If you specify guest block devices directly (I<-a>), then libvirt is not "
337 #: ../cat/virt-cat.pod:91 ../cat/virt-filesystems.pod:141
338 #: ../cat/virt-ls.pod:307 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105
339 #: ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
344 #: ../cat/virt-cat.pod:93 ../cat/virt-filesystems.pod:143
345 #: ../cat/virt-ls.pod:309 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107
346 #: ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
347 msgid "B<--domain> guest"
351 #: ../cat/virt-cat.pod:95 ../cat/virt-filesystems.pod:145
352 #: ../cat/virt-ls.pod:311 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109
353 #: ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
355 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
360 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
361 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
362 #: ../fuse/guestmount.pod:126 ../inspector/virt-inspector.pod:92
363 msgid "B<--echo-keys>"
367 #: ../cat/virt-cat.pod:100
369 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
370 "so you cannot see what you are typing. If you are not worried about Tempest "
371 "attacks and there is no one else in the room you can specify this flag to "
372 "see what you are typing."
376 #: ../cat/virt-cat.pod:105 ../cat/virt-filesystems.pod:170
377 #: ../cat/virt-ls.pod:328 ../df/virt-df.pod:101 ../fish/guestfish.pod:233
378 #: ../fuse/guestmount.pod:133 ../inspector/virt-inspector.pod:99
379 #: ../rescue/virt-rescue.pod:124
380 msgid "B<--format=raw|qcow2|..>"
384 #: ../cat/virt-cat.pod:107 ../cat/virt-filesystems.pod:172
385 #: ../cat/virt-ls.pod:330 ../df/virt-df.pod:103 ../edit/virt-edit.pod:134
386 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:135
387 #: ../inspector/virt-inspector.pod:101 ../rescue/virt-rescue.pod:126
392 #: ../cat/virt-cat.pod:109 ../cat/virt-filesystems.pod:174
393 #: ../cat/virt-ls.pod:332 ../df/virt-df.pod:105 ../edit/virt-edit.pod:136
394 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:137
395 #: ../rescue/virt-rescue.pod:128
397 "The default for the I<-a> option is to auto-detect the format of the disk "
398 "image. Using this forces the disk format for I<-a> options which follow on "
399 "the command line. Using I<--format> with no argument switches back to auto-"
400 "detection for subsequent I<-a> options."
404 #: ../cat/virt-cat.pod:114 ../cat/virt-filesystems.pod:179
405 #: ../cat/virt-ls.pod:337 ../df/virt-df.pod:110 ../edit/virt-edit.pod:141
406 #: ../fish/guestfish.pod:242 ../fish/guestfish.pod:673
407 #: ../inspector/virt-inspector.pod:336 ../rescue/virt-rescue.pod:133
408 #: ../src/guestfs.pod:2788
413 #: ../cat/virt-cat.pod:116
416 " virt-cat --format=raw -a disk.img file\n"
421 #: ../cat/virt-cat.pod:118 ../cat/virt-filesystems.pod:183
422 #: ../cat/virt-ls.pod:341 ../df/virt-df.pod:114 ../edit/virt-edit.pod:145
423 #: ../fish/guestfish.pod:246 ../rescue/virt-rescue.pod:137
424 msgid "forces raw format (no auto-detection) for C<disk.img>."
428 #: ../cat/virt-cat.pod:120
431 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
436 #: ../cat/virt-cat.pod:122 ../cat/virt-filesystems.pod:187
437 #: ../cat/virt-ls.pod:345 ../df/virt-df.pod:118 ../edit/virt-edit.pod:149
438 #: ../fish/guestfish.pod:250 ../rescue/virt-rescue.pod:141
440 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
441 "detection for C<another.img>."
445 #: ../cat/virt-cat.pod:125 ../cat/virt-filesystems.pod:190
446 #: ../cat/virt-ls.pod:348 ../df/virt-df.pod:121 ../edit/virt-edit.pod:152
447 #: ../rescue/virt-rescue.pod:144
449 "If you have untrusted raw-format guest disk images, you should use this "
450 "option to specify the disk format. This avoids a possible security problem "
451 "with malicious guests (CVE-2010-3851)."
455 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
456 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
457 #: ../fuse/guestmount.pod:163 ../inspector/virt-inspector.pod:114
458 msgid "B<--keys-from-stdin>"
462 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
463 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
464 #: ../fuse/guestmount.pod:165 ../inspector/virt-inspector.pod:116
466 "Read key or passphrase parameters from stdin. The default is to try to read "
467 "passphrases from the user by opening C</dev/tty>."
471 #: ../cat/virt-cat.pod:134 ../cat/virt-filesystems.pod:261
472 #: ../cat/virt-ls.pod:425 ../df/virt-df.pod:173 ../edit/virt-edit.pod:161
473 #: ../fish/guestfish.pod:390 ../fuse/guestmount.pod:257
474 #: ../inspector/virt-inspector.pod:119 ../rescue/virt-rescue.pod:182
479 #: ../cat/virt-cat.pod:136 ../cat/virt-filesystems.pod:263
480 #: ../cat/virt-ls.pod:427 ../df/virt-df.pod:175 ../edit/virt-edit.pod:163
481 #: ../fish/guestfish.pod:392 ../fuse/guestmount.pod:259
482 #: ../inspector/virt-inspector.pod:121 ../rescue/virt-rescue.pod:184
487 #: ../cat/virt-cat.pod:138 ../cat/virt-filesystems.pod:265
488 #: ../cat/virt-ls.pod:429 ../df/virt-df.pod:177 ../edit/virt-edit.pod:165
489 #: ../inspector/virt-inspector.pod:123 ../rescue/virt-rescue.pod:186
490 msgid "Enable verbose messages for debugging."
494 #: ../cat/virt-cat.pod:140 ../cat/virt-filesystems.pod:267
495 #: ../cat/virt-ls.pod:431 ../df/virt-df.pod:179 ../edit/virt-edit.pod:167
496 #: ../fish/guestfish.pod:397 ../fuse/guestmount.pod:263
497 #: ../inspector/virt-inspector.pod:125 ../rescue/virt-rescue.pod:188
498 #: ../resize/virt-resize.pod:484
503 #: ../cat/virt-cat.pod:142 ../cat/virt-filesystems.pod:269
504 #: ../cat/virt-ls.pod:433 ../df/virt-df.pod:181 ../edit/virt-edit.pod:169
505 #: ../fish/guestfish.pod:399 ../fuse/guestmount.pod:265
506 #: ../inspector/virt-inspector.pod:127 ../rescue/virt-rescue.pod:190
507 #: ../resize/virt-resize.pod:486 ../tools/virt-list-filesystems.pl:69
508 #: ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169
509 #: ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
514 #: ../cat/virt-cat.pod:144 ../cat/virt-filesystems.pod:271
515 #: ../cat/virt-ls.pod:435 ../df/virt-df.pod:183 ../edit/virt-edit.pod:171
516 #: ../inspector/virt-inspector.pod:129 ../rescue/virt-rescue.pod:192
517 #: ../resize/virt-resize.pod:488 ../tools/virt-list-filesystems.pl:71
518 #: ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171
519 #: ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
520 msgid "Display version number and exit."
524 #: ../cat/virt-cat.pod:146 ../cat/virt-filesystems.pod:281
525 #: ../cat/virt-ls.pod:437 ../df/virt-df.pod:185 ../edit/virt-edit.pod:173
526 #: ../fish/guestfish.pod:412 ../fuse/guestmount.pod:278
527 #: ../inspector/virt-inspector.pod:131 ../rescue/virt-rescue.pod:203
528 #: ../tools/virt-tar.pl:158
533 #: ../cat/virt-cat.pod:148 ../cat/virt-filesystems.pod:283
534 #: ../cat/virt-ls.pod:439 ../df/virt-df.pod:187 ../edit/virt-edit.pod:175
535 #: ../inspector/virt-inspector.pod:133 ../rescue/virt-rescue.pod:205
536 msgid "Enable tracing of libguestfs API calls."
540 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
541 #: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
542 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
546 #: ../cat/virt-cat.pod:154
547 msgid "Previous versions of virt-cat allowed you to write either:"
551 #: ../cat/virt-cat.pod:156
554 " virt-cat disk.img [disk.img ...] file\n"
559 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
560 #: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
565 #: ../cat/virt-cat.pod:160
568 " virt-cat guestname file\n"
573 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
574 #: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
576 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
577 "the confusing case where a disk image might have the same name as a guest."
581 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
582 #: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
583 msgid "For compatibility the old style is still supported."
587 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297
588 msgid "USING GUESTFISH"
592 #: ../cat/virt-cat.pod:170
594 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
595 "C<virt-cat> doesn't work."
599 #: ../cat/virt-cat.pod:173
600 msgid "Using C<virt-cat> is approximately equivalent to doing:"
604 #: ../cat/virt-cat.pod:175
607 " guestfish --ro -i -d domname download file -\n"
612 #: ../cat/virt-cat.pod:177
614 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
615 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
619 #: ../cat/virt-cat.pod:181
621 "The command above uses libguestfs's guest inspection feature and so does not "
622 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
623 "disk images that don't contain guests. To display a file from a disk image "
628 #: ../cat/virt-cat.pod:186
631 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
636 #: ../cat/virt-cat.pod:188
638 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
639 "the disk image, and C<file> is the full path to the file."
643 #: ../cat/virt-cat.pod:191 ../cat/virt-filesystems.pod:365
644 #: ../cat/virt-ls.pod:483 ../df/virt-df.pod:215 ../edit/virt-edit.pod:342
645 #: ../inspector/virt-inspector.pod:352 ../rescue/virt-rescue.pod:266
646 #: ../resize/virt-resize.pod:601 ../tools/virt-list-filesystems.pl:188
647 #: ../tools/virt-list-partitions.pl:258 ../tools/virt-make-fs.pl:532
648 #: ../tools/virt-tar.pl:289 ../tools/virt-win-reg.pl:733
649 msgid "SHELL QUOTING"
653 #: ../cat/virt-cat.pod:193 ../cat/virt-filesystems.pod:367
654 #: ../cat/virt-ls.pod:485 ../df/virt-df.pod:217 ../edit/virt-edit.pod:344
655 #: ../inspector/virt-inspector.pod:354 ../rescue/virt-rescue.pod:268
656 #: ../resize/virt-resize.pod:603 ../tools/virt-list-filesystems.pl:190
657 #: ../tools/virt-list-partitions.pl:260 ../tools/virt-make-fs.pl:534
658 #: ../tools/virt-tar.pl:291 ../tools/virt-win-reg.pl:741
660 "Libvirt guest names can contain arbitrary characters, some of which have "
661 "meaning to the shell such as C<#> and space. You may need to quote or "
662 "escape these characters on the command line. See the shell manual page L<sh"
667 #: ../cat/virt-cat.pod:198 ../cat/virt-filesystems.pod:372
668 #: ../cat/virt-ls.pod:490 ../df/virt-df.pod:222 ../edit/virt-edit.pod:349
669 #: ../fish/guestfish.pod:1081 ../fuse/guestmount.pod:303
670 #: ../inspector/virt-inspector.pod:375 ../resize/virt-resize.pod:608
671 #: ../test-tool/libguestfs-test-tool.pod:90
676 #: ../cat/virt-cat.pod:200 ../cat/virt-filesystems.pod:374
677 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
678 #: ../fuse/guestmount.pod:305 ../inspector/virt-inspector.pod:377
679 #: ../resize/virt-resize.pod:610
681 "This program returns 0 if successful, or non-zero if there was an error."
685 #: ../cat/virt-cat.pod:203 ../cat/virt-filesystems.pod:377
686 #: ../cat/virt-ls.pod:495 ../df/virt-df.pod:227 ../edit/virt-edit.pod:354
687 #: ../erlang/examples/guestfs-erlang.pod:97
688 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
689 #: ../fish/guestfish.pod:1235 ../fish/virt-copy-in.pod:50
690 #: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
691 #: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:308
692 #: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
693 #: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
694 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288
695 #: ../resize/virt-resize.pod:613 ../ruby/examples/guestfs-ruby.pod:36
696 #: ../src/guestfs.pod:3164 ../test-tool/libguestfs-test-tool.pod:100
697 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
698 #: ../tools/virt-make-fs.pl:539 ../tools/virt-tar.pl:296
699 #: ../tools/virt-win-reg.pl:746
704 #: ../cat/virt-cat.pod:205
706 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L<virt-"
707 "tar-out(1)>, L<http://libguestfs.org/>."
711 #: ../cat/virt-cat.pod:212 ../cat/virt-filesystems.pod:388
712 #: ../cat/virt-ls.pod:507 ../df/virt-df.pod:235 ../edit/virt-edit.pod:368
713 #: ../rescue/virt-rescue.pod:296 ../resize/virt-resize.pod:634
714 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
715 #: ../tools/virt-make-fs.pl:564 ../tools/virt-tar.pl:311
716 #: ../tools/virt-win-reg.pl:772
721 #: ../cat/virt-cat.pod:214 ../cat/virt-filesystems.pod:390
722 #: ../cat/virt-ls.pod:509 ../df/virt-df.pod:237 ../edit/virt-edit.pod:370
723 #: ../inspector/virt-inspector.pod:395 ../rescue/virt-rescue.pod:298
724 #: ../resize/virt-resize.pod:636 ../tools/virt-list-filesystems.pl:210
725 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:566
726 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:774
727 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
731 #: ../cat/virt-cat.pod:216 ../cat/virt-filesystems.pod:392
732 #: ../cat/virt-ls.pod:511 ../df/virt-df.pod:239 ../edit/virt-edit.pod:372
733 #: ../erlang/examples/guestfs-erlang.pod:114
734 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
735 #: ../fish/guestfish.pod:1264 ../fish/virt-copy-in.pod:64
736 #: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
737 #: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:323
738 #: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
739 #: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
740 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300
741 #: ../resize/virt-resize.pod:638 ../ruby/examples/guestfs-ruby.pod:52
742 #: ../src/guestfs.pod:3241 ../test-tool/libguestfs-test-tool.pod:110
743 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
744 #: ../tools/virt-make-fs.pl:568 ../tools/virt-tar.pl:315
745 #: ../tools/virt-win-reg.pl:776
750 #: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405
751 #: ../resize/virt-resize.pod:640
752 msgid "Copyright (C) 2010-2011 Red Hat Inc."
756 #: ../cat/virt-cat.pod:220 ../cat/virt-filesystems.pod:396
757 #: ../cat/virt-ls.pod:515 ../df/virt-df.pod:243 ../edit/virt-edit.pod:376
758 #: ../fish/guestfish.pod:1269 ../fish/virt-copy-in.pod:69
759 #: ../fish/virt-copy-out.pod:58 ../fish/virt-tar-in.pod:67
760 #: ../fish/virt-tar-out.pod:60 ../fuse/guestmount.pod:328
761 #: ../inspector/virt-inspector.pod:407 ../rescue/virt-rescue.pod:304
762 #: ../resize/virt-resize.pod:642 ../test-tool/libguestfs-test-tool.pod:115
763 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
764 #: ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319
765 #: ../tools/virt-win-reg.pl:780
767 "This program is free software; you can redistribute it and/or modify it "
768 "under the terms of the GNU General Public License as published by the Free "
769 "Software Foundation; either version 2 of the License, or (at your option) "
774 #: ../cat/virt-cat.pod:225 ../cat/virt-filesystems.pod:401
775 #: ../cat/virt-ls.pod:520 ../df/virt-df.pod:248 ../edit/virt-edit.pod:381
776 #: ../fish/guestfish.pod:1274 ../fish/virt-copy-in.pod:74
777 #: ../fish/virt-copy-out.pod:63 ../fish/virt-tar-in.pod:72
778 #: ../fish/virt-tar-out.pod:65 ../fuse/guestmount.pod:333
779 #: ../inspector/virt-inspector.pod:412 ../rescue/virt-rescue.pod:309
780 #: ../resize/virt-resize.pod:647 ../test-tool/libguestfs-test-tool.pod:120
781 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
782 #: ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324
783 #: ../tools/virt-win-reg.pl:785
785 "This program is distributed in the hope that it will be useful, but WITHOUT "
786 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
787 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
792 #: ../cat/virt-cat.pod:230 ../cat/virt-filesystems.pod:406
793 #: ../cat/virt-ls.pod:525 ../df/virt-df.pod:253 ../edit/virt-edit.pod:386
794 #: ../fish/guestfish.pod:1279 ../fish/virt-copy-in.pod:79
795 #: ../fish/virt-copy-out.pod:68 ../fish/virt-tar-in.pod:77
796 #: ../fish/virt-tar-out.pod:70 ../fuse/guestmount.pod:338
797 #: ../inspector/virt-inspector.pod:417 ../rescue/virt-rescue.pod:314
798 #: ../resize/virt-resize.pod:652 ../test-tool/libguestfs-test-tool.pod:125
799 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
800 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329
801 #: ../tools/virt-win-reg.pl:790
803 "You should have received a copy of the GNU General Public License along with "
804 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
805 "Ave, Cambridge, MA 02139, USA."
809 #: ../cat/virt-filesystems.pod:5
811 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
812 "virtual machine or disk image"
816 #: ../cat/virt-filesystems.pod:9
819 " virt-filesystems [--options] -d domname\n"
824 #: ../cat/virt-filesystems.pod:11
827 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
832 #: ../cat/virt-filesystems.pod:15
834 "This tool allows you to discover filesystems, partitions, logical volumes, "
835 "and their sizes in a disk image or virtual machine. It is a replacement for "
836 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
840 #: ../cat/virt-filesystems.pod:20
842 "One use for this tool is from shell scripts to iterate over all filesystems "
847 #: ../cat/virt-filesystems.pod:23
850 " for fs in $(virt-filesystems -a disk.img); do\n"
857 #: ../cat/virt-filesystems.pod:27
859 "Another use is to list partitions before using another tool to modify those "
860 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
861 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
865 #: ../cat/virt-filesystems.pod:32
867 "Various command line options control what this program displays. You need "
868 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
869 "guest respectively. If you just specify that then the program shows "
870 "filesystems found, one per line, like this:"
874 #: ../cat/virt-filesystems.pod:37
877 " $ virt-filesystems -a disk.img\n"
879 " /dev/vg_guest/lv_root\n"
884 #: ../cat/virt-filesystems.pod:41
886 "If you add I<-l> or I<--long> then the output includes extra information:"
890 #: ../cat/virt-filesystems.pod:44
893 " $ virt-filesystems -a disk.img -l\n"
894 " Name Type VFS Label Size\n"
895 " /dev/sda1 filesystem ext4 boot 524288000\n"
896 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
901 #: ../cat/virt-filesystems.pod:49
903 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
908 #: ../cat/virt-filesystems.pod:52
911 " $ virt-filesystems -a disk.img --extra\n"
913 " /dev/vg_guest/lv_root\n"
914 " /dev/vg_guest/lv_swap\n"
915 " /dev/vg_guest/lv_data\n"
920 #: ../cat/virt-filesystems.pod:58
922 "If you add I<--partitions> then partitions are shown instead of filesystems:"
926 #: ../cat/virt-filesystems.pod:60
929 " $ virt-filesystems -a disk.img --partitions\n"
936 #: ../cat/virt-filesystems.pod:64
938 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-"
939 "volumes>, I<--block-devices> to list those items."
943 #: ../cat/virt-filesystems.pod:67
945 "You can use these options in combination as well (if you want a combination "
946 "including filesystems, you have to add I<--filesystems>). Notice that some "
947 "items fall into several categories (eg. C</dev/sda1> might be both a "
948 "partition and a filesystem). These items are listed several times. To get "
949 "a list which includes absolutely everything that virt-filesystems knows "
950 "about, use the I<--all> option."
954 #: ../cat/virt-filesystems.pod:74
956 "UUIDs (because they are quite long) are not shown by default. Add the I<--"
957 "uuid> option to display device and filesystem UUIDs in the long output."
961 #: ../cat/virt-filesystems.pod:78
963 "I<--all --long --uuid> is a useful combination to display all possible "
964 "information about everything."
968 #: ../cat/virt-filesystems.pod:81
971 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
972 " Name Type VFS Label Size Parent UUID\n"
973 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
974 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
975 " /dev/sda1 partition - - 100M /dev/sda -\n"
976 " /dev/sda2 partition - - 20G /dev/sda -\n"
977 " /dev/sda device - - 20G - -\n"
982 #: ../cat/virt-filesystems.pod:89
984 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
988 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
993 #: ../cat/virt-filesystems.pod:112
995 "Display everything. This is currently the same as specifying these options: "
996 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--"
997 "logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be "
998 "added to this list in future)."
1002 #: ../cat/virt-filesystems.pod:117
1003 msgid "See also I<--long>."
1007 #: ../cat/virt-filesystems.pod:119
1008 msgid "B<--blkdevs>"
1012 #: ../cat/virt-filesystems.pod:121
1013 msgid "B<--block-devices>"
1017 #: ../cat/virt-filesystems.pod:123
1018 msgid "Display block devices."
1022 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1027 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1029 "Write out the results in CSV format (comma-separated values). This format "
1030 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1031 "ABOUT CSV FORMAT> below."
1035 #: ../cat/virt-filesystems.pod:150
1037 "When prompting for keys and passphrases, virt-filesystems normally turns "
1038 "echoing off so you cannot see what you are typing. If you are not worried "
1039 "about Tempest attacks and there is no one else in the room you can specify "
1040 "this flag to see what you are typing."
1044 #: ../cat/virt-filesystems.pod:155
1049 #: ../cat/virt-filesystems.pod:157
1051 "This causes filesystems that are not ordinary, mountable filesystems to be "
1052 "displayed. This category includes swapspace, and filesystems that are empty "
1053 "or contain unknown data."
1057 #: ../cat/virt-filesystems.pod:161
1058 msgid "This option implies I<--filesystems>."
1062 #: ../cat/virt-filesystems.pod:163
1063 msgid "B<--filesystems>"
1067 #: ../cat/virt-filesystems.pod:165
1069 "Display mountable filesystems. If no display option was selected then this "
1070 "option is implied."
1074 #: ../cat/virt-filesystems.pod:168
1075 msgid "With I<--extra>, non-mountable filesystems are shown too."
1079 #: ../cat/virt-filesystems.pod:181
1082 " virt-filesystems --format=raw -a disk.img\n"
1087 #: ../cat/virt-filesystems.pod:185
1090 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1095 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1096 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1097 #: ../tools/virt-list-partitions.pl:109
1102 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1103 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1104 msgid "B<--human-readable>"
1108 #: ../cat/virt-filesystems.pod:198
1109 msgid "In I<--long> mode, display sizes in human-readable format."
1113 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1114 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1119 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1120 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1125 #: ../cat/virt-filesystems.pod:209
1126 msgid "Display extra columns of data (\"long format\")."
1130 #: ../cat/virt-filesystems.pod:211
1131 msgid "A title row is added unless you also specify I<--no-title>."
1135 #: ../cat/virt-filesystems.pod:213
1137 "The extra columns displayed depend on what output you select, and the "
1138 "ordering of columns may change in future versions. Use the title row, I<--"
1139 "csv> output and/or L<csvtool(1)> to match columns to data in external "
1144 #: ../cat/virt-filesystems.pod:218
1146 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1147 "default is to show raw numbers of I<bytes>."
1151 #: ../cat/virt-filesystems.pod:221
1152 msgid "Use I<--uuid> to display UUIDs too."
1156 #: ../cat/virt-filesystems.pod:223
1161 #: ../cat/virt-filesystems.pod:225
1162 msgid "B<--logvols>"
1166 #: ../cat/virt-filesystems.pod:227
1167 msgid "B<--logical-volumes>"
1171 #: ../cat/virt-filesystems.pod:229
1173 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1174 "of whether the LVs contain filesystems."
1178 #: ../cat/virt-filesystems.pod:232
1179 msgid "B<--no-title>"
1183 #: ../cat/virt-filesystems.pod:234
1184 msgid "In I<--long> mode, don't add a title row."
1188 #: ../cat/virt-filesystems.pod:236
1190 "Note that the order of the columns is not fixed, and may change in future "
1191 "versions of virt-filesystems, so using this option may give you unexpected "
1196 #: ../cat/virt-filesystems.pod:240
1201 #: ../cat/virt-filesystems.pod:242
1202 msgid "B<--partitions>"
1206 #: ../cat/virt-filesystems.pod:244
1208 "Display partitions. In this mode, these are displayed irrespective of "
1209 "whether the partitions contain filesystems."
1213 #: ../cat/virt-filesystems.pod:247
1218 #: ../cat/virt-filesystems.pod:249
1219 msgid "B<--physvols>"
1223 #: ../cat/virt-filesystems.pod:251
1224 msgid "B<--physical-volumes>"
1228 #: ../cat/virt-filesystems.pod:253
1229 msgid "Display LVM physical volumes."
1233 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1238 #: ../cat/virt-filesystems.pod:257
1243 #: ../cat/virt-filesystems.pod:259
1244 msgid "In I<--long> mode, display UUIDs as well."
1248 #: ../cat/virt-filesystems.pod:273
1253 #: ../cat/virt-filesystems.pod:275
1254 msgid "B<--volgroups>"
1258 #: ../cat/virt-filesystems.pod:277
1259 msgid "B<--volume-groups>"
1263 #: ../cat/virt-filesystems.pod:279
1264 msgid "Display LVM volume groups."
1268 #: ../cat/virt-filesystems.pod:287
1273 #: ../cat/virt-filesystems.pod:289
1275 "Note that columns in the output are subject to reordering and change in "
1276 "future versions of this tool."
1280 #: ../cat/virt-filesystems.pod:294
1285 #: ../cat/virt-filesystems.pod:296
1286 msgid "The filesystem, partition, block device or LVM name."
1290 #: ../cat/virt-filesystems.pod:298
1292 "For device and partition names these are displayed as canonical libguestfs "
1293 "names, so that for example C</dev/sda2> is the second partition on the first "
1298 #: ../cat/virt-filesystems.pod:302
1300 "If the I<--long> option is B<not> specified, then only the name column is "
1301 "shown in the output."
1305 #: ../cat/virt-filesystems.pod:305
1310 #: ../cat/virt-filesystems.pod:307
1311 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1315 #: ../cat/virt-filesystems.pod:309
1320 #: ../cat/virt-filesystems.pod:311
1322 "If there is a filesystem, then this column displays the filesystem type if "
1323 "one could be detected, eg. C<ext4>."
1327 #: ../cat/virt-filesystems.pod:314
1332 #: ../cat/virt-filesystems.pod:316
1334 "If the object has a label (used for identifying and mounting filesystems) "
1335 "then this column contains the label."
1339 #: ../cat/virt-filesystems.pod:319
1344 #: ../cat/virt-filesystems.pod:321
1346 "The size of the object in bytes. If the I<--human> option is used then the "
1347 "size is displayed in a human-readable form."
1351 #: ../cat/virt-filesystems.pod:324
1356 #: ../cat/virt-filesystems.pod:326
1358 "The parent column records the parent relationship between objects. For "
1359 "example, if the object is a partition, then this column contains the name of "
1360 "the containing device. If the object is a logical volume, then this column "
1361 "is the name of the volume group."
1365 #: ../cat/virt-filesystems.pod:331
1370 #: ../cat/virt-filesystems.pod:333
1372 "If the object has a UUID (used for identifying and mounting filesystems and "
1373 "block devices) then this column contains the UUID as a string."
1377 #: ../cat/virt-filesystems.pod:337
1378 msgid "The UUID is only displayed if the I<--uuid> option is given."
1382 #: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459
1383 #: ../df/virt-df.pod:191
1384 msgid "NOTE ABOUT CSV FORMAT"
1388 #: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461
1389 #: ../df/virt-df.pod:193
1391 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
1392 "should be easy to parse, but it is definitely not easy to parse."
1396 #: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464
1397 #: ../df/virt-df.pod:196
1399 "Myth: Just split fields at commas. Reality: This does I<not> work "
1400 "reliably. This example has two columns:"
1404 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467
1405 #: ../df/virt-df.pod:199
1408 " \"foo,bar\",baz\n"
1413 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469
1414 #: ../df/virt-df.pod:201
1416 "Myth: Read the file one line at a time. Reality: This does I<not> work "
1417 "reliably. This example has one row:"
1421 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472
1422 #: ../df/virt-df.pod:204
1431 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475
1432 #: ../df/virt-df.pod:207
1434 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
1435 "packaged in major Linux distributions)."
1439 #: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478
1440 #: ../df/virt-df.pod:210
1442 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
1443 "or Python's built-in csv library)."
1447 #: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481
1448 #: ../df/virt-df.pod:213
1449 msgid "Most spreadsheets and databases can import CSV directly."
1453 #: ../cat/virt-filesystems.pod:379
1455 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
1456 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, L<http://"
1461 #: ../cat/virt-filesystems.pod:394 ../tools/virt-make-fs.pl:570
1462 #: ../tools/virt-win-reg.pl:778
1463 msgid "Copyright (C) 2010 Red Hat Inc."
1467 #: ../cat/virt-ls.pod:5
1468 msgid "virt-ls - List files in a virtual machine"
1472 #: ../cat/virt-ls.pod:9
1475 " virt-ls [--options] -d domname directory [directory ...]\n"
1480 #: ../cat/virt-ls.pod:11
1483 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
1488 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
1493 #: ../cat/virt-ls.pod:15
1496 " virt-ls [--options] domname directory\n"
1501 #: ../cat/virt-ls.pod:17
1504 " virt-ls [--options] disk.img [disk.img ...] directory\n"
1509 #: ../cat/virt-ls.pod:21
1511 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
1512 "more from a virtual machine or disk image."
1516 #: ../cat/virt-ls.pod:24
1518 "Multiple directory names can be given, in which case the output from each is "
1523 #: ../cat/virt-ls.pod:27
1525 "To list directories from a libvirt guest use the I<-d> option to specify the "
1526 "name of the guest. For a disk image, use the I<-a> option."
1530 #: ../cat/virt-ls.pod:31
1532 "C<virt-ls> can do many simple file listings. For more complicated cases you "
1533 "may need to use L<guestfish(1)>, or write a program directly to the L<guestfs"
1538 #: ../cat/virt-ls.pod:37
1539 msgid "Get a list of all files and directories in a virtual machine:"
1543 #: ../cat/virt-ls.pod:39
1546 " virt-ls -R -d guest /\n"
1551 #: ../cat/virt-ls.pod:41
1552 msgid "List all setuid or setgid programs in a Linux virtual machine:"
1556 #: ../cat/virt-ls.pod:43
1559 " virt-ls -lR -d guest / | grep '^- [42]'\n"
1564 #: ../cat/virt-ls.pod:45
1565 msgid "List all public-writable directories in a Linux virtual machine:"
1569 #: ../cat/virt-ls.pod:47
1572 " virt-ls -lR -d guest / | grep '^d ...7'\n"
1577 #: ../cat/virt-ls.pod:49
1578 msgid "List all Unix domain sockets in a Linux virtual machine:"
1582 #: ../cat/virt-ls.pod:51
1585 " virt-ls -lR -d guest / | grep '^s'\n"
1590 #: ../cat/virt-ls.pod:53
1591 msgid "List all regular files with filenames ending in '.png':"
1595 #: ../cat/virt-ls.pod:55
1598 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
1603 #: ../cat/virt-ls.pod:57
1604 msgid "To display files larger than 10MB in home directories:"
1608 #: ../cat/virt-ls.pod:59
1611 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
1616 #: ../cat/virt-ls.pod:61
1617 msgid "Find everything modified in the last 7 days:"
1621 #: ../cat/virt-ls.pod:63
1624 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
1629 #: ../cat/virt-ls.pod:65
1630 msgid "Find regular files modified in the last 24 hours:"
1634 #: ../cat/virt-ls.pod:67
1637 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
1642 #: ../cat/virt-ls.pod:69
1643 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
1647 #: ../cat/virt-ls.pod:71
1649 "Find the differences between files in a guest and an earlier snapshot of the "
1654 #: ../cat/virt-ls.pod:74
1657 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
1658 " virt-ls -lR -a current.img / --uids --time-t > new\n"
1659 " diff -u old new | less\n"
1664 #: ../cat/virt-ls.pod:78
1666 "The commands above won't find files where the content has changed but the "
1667 "metadata (eg. file size and modification date) is the same. To do that, you "
1668 "need to add the I<--checksum> parameter to both C<virt-ls> commands. I<--"
1669 "checksum> can be quite slow since it has to read and compute a checksum of "
1670 "every regular file in the virtual machine."
1674 #: ../cat/virt-ls.pod:84
1675 msgid "OUTPUT MODES"
1679 #: ../cat/virt-ls.pod:86
1681 "C<virt-ls> has four output modes, controlled by different combinations of "
1682 "the I<-l> and I<-R> options."
1686 #: ../cat/virt-ls.pod:89
1687 msgid "SIMPLE LISTING"
1691 #: ../cat/virt-ls.pod:91
1692 msgid "A simple listing is like the ordinary L<ls(1)> command:"
1696 #: ../cat/virt-ls.pod:93
1699 " $ virt-ls -d guest /\n"
1707 #: ../cat/virt-ls.pod:98
1708 msgid "LONG LISTING"
1712 #: ../cat/virt-ls.pod:100
1714 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
1715 "(more specifically, like the C<guestfs_ll> function)."
1719 #: ../cat/virt-ls.pod:103
1722 " $ virt-ls -l -d guest /\n"
1724 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
1725 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
1731 #: ../cat/virt-ls.pod:109
1733 "Note that while this is useful for displaying a directory, do not try "
1734 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
1739 #: ../cat/virt-ls.pod:113
1740 msgid "RECURSIVE LISTING"
1744 #: ../cat/virt-ls.pod:115
1746 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
1747 "and directories recursively:"
1751 #: ../cat/virt-ls.pod:118
1754 " $ virt-ls -R -d guest /tmp\n"
1762 #: ../cat/virt-ls.pod:123
1764 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
1765 "converts C<\\0> characters to C<\\n>."
1769 #: ../cat/virt-ls.pod:126
1770 msgid "RECURSIVE LONG LISTING"
1774 #: ../cat/virt-ls.pod:128
1776 "Using I<-lR> options together changes the output to display directories "
1777 "recursively, with file stats, and optionally other features such as "
1778 "checksums and extended attributes."
1782 #: ../cat/virt-ls.pod:132
1784 "Most of the interesting features of C<virt-ls> are only available when using "
1789 #: ../cat/virt-ls.pod:135
1791 "The fields are normally space-separated. Filenames are B<not> quoted, so "
1792 "you cannot use the output in another program (because filenames can contain "
1793 "spaces and other unsafe characters). If the guest was untrusted and someone "
1794 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
1795 "on you by creating filenames with embedded newline characters. To B<safely> "
1796 "parse the output in another program, use the I<--csv> (Comma-Separated "
1801 #: ../cat/virt-ls.pod:143
1803 "Note that this output format is completely unrelated to the C<ls -lR> "
1808 #: ../cat/virt-ls.pod:146
1811 " $ virt-ls -lR -d guest /bin\n"
1812 " d 0555 4096 /bin\n"
1813 " - 0755 123 /bin/alsaunmute\n"
1814 " - 0755 28328 /bin/arch\n"
1815 " l 0777 4 /bin/awk -> gawk\n"
1816 " - 0755 27216 /bin/basename\n"
1817 " - 0755 943360 /bin/bash\n"
1823 #: ../cat/virt-ls.pod:155
1824 msgid "These basic fields are always shown:"
1828 #: ../cat/virt-ls.pod:159
1833 #: ../cat/virt-ls.pod:161
1835 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
1836 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
1837 "link), C<s> (socket) or C<u> (unknown)."
1841 #: ../cat/virt-ls.pod:171
1846 #: ../cat/virt-ls.pod:173
1847 msgid "The Unix permissions, displayed as a 4 digit octal number."
1851 #: ../cat/virt-ls.pod:175
1856 #: ../cat/virt-ls.pod:177
1858 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
1859 "readable> option is given, in which case this is shown as a human-readable "
1864 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4255
1869 #: ../cat/virt-ls.pod:183
1870 msgid "The full path of the file or directory."
1874 #: ../cat/virt-ls.pod:185
1879 #: ../cat/virt-ls.pod:187
1880 msgid "For symbolic links only, the link target."
1884 #: ../cat/virt-ls.pod:191
1886 "In I<-lR> mode, additional command line options enable the display of more "
1891 #: ../cat/virt-ls.pod:194
1893 "With the I<--uids> flag, these additional fields are displayed before the "
1898 #: ../cat/virt-ls.pod:199
1903 #: ../cat/virt-ls.pod:201
1908 #: ../cat/virt-ls.pod:203
1910 "The UID and GID of the owner of the file (displayed numerically). Note "
1911 "these only make sense in the context of a Unix-like guest."
1915 #: ../cat/virt-ls.pod:208
1916 msgid "With the I<--times> flag, these additional fields are displayed:"
1920 #: ../cat/virt-ls.pod:212
1925 #: ../cat/virt-ls.pod:214
1926 msgid "The time of last access."
1930 #: ../cat/virt-ls.pod:216
1935 #: ../cat/virt-ls.pod:218
1936 msgid "The time of last modification."
1940 #: ../cat/virt-ls.pod:220
1945 #: ../cat/virt-ls.pod:222
1946 msgid "The time of last status change."
1950 #: ../cat/virt-ls.pod:226
1952 "The time fields are displayed as string dates and times, unless one of the "
1953 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
1957 #: ../cat/virt-ls.pod:229
1958 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
1962 #: ../cat/virt-ls.pod:233
1967 #: ../cat/virt-ls.pod:235
1969 "The device containing the file (displayed as major:minor). This may not "
1970 "match devices as known to the guest."
1974 #: ../cat/virt-ls.pod:238
1979 #: ../cat/virt-ls.pod:240
1980 msgid "The inode number."
1984 #: ../cat/virt-ls.pod:242
1989 #: ../cat/virt-ls.pod:244
1990 msgid "The number of hard links."
1994 #: ../cat/virt-ls.pod:246
1999 #: ../cat/virt-ls.pod:248
2001 "For block and char special files, the device (displayed as major:minor)."
2005 #: ../cat/virt-ls.pod:251
2010 #: ../cat/virt-ls.pod:253
2011 msgid "The number of 512 byte blocks allocated to the file."
2015 #: ../cat/virt-ls.pod:257
2017 "With the I<--checksum> flag, the checksum of the file contents is shown "
2018 "(only for regular files). Computing file checksums can take a considerable "
2023 #: ../cat/virt-ls.pod:280
2024 msgid "B<--checksum>"
2028 #: ../cat/virt-ls.pod:282
2029 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2033 #: ../cat/virt-ls.pod:284
2035 "Display checksum over file contents for regular files. With no argument, "
2036 "this defaults to using I<md5>. Using an argument, you can select the "
2037 "checksum type to use."
2041 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2042 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2043 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2045 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2050 #: ../cat/virt-ls.pod:316
2052 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2053 "so you cannot see what you are typing. If you are not worried about Tempest "
2054 "attacks and there is no one else in the room you can specify this flag to "
2055 "see what you are typing."
2059 #: ../cat/virt-ls.pod:321
2060 msgid "B<--extra-stats>"
2064 #: ../cat/virt-ls.pod:323
2065 msgid "Display extra stats."
2069 #: ../cat/virt-ls.pod:339
2072 " virt-ls --format=raw -a disk.img /dir\n"
2077 #: ../cat/virt-ls.pod:343
2080 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2085 #: ../cat/virt-ls.pod:356
2086 msgid "Display file sizes in human-readable format."
2090 #: ../cat/virt-ls.pod:370
2095 #: ../cat/virt-ls.pod:372
2096 msgid "B<--recursive>"
2100 #: ../cat/virt-ls.pod:374
2102 "Select the mode. With neither of these options, C<virt-ls> produces a "
2103 "simple, flat list of the files in the named directory. See L</SIMPLE "
2108 #: ../cat/virt-ls.pod:378
2110 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See L</"
2115 #: ../cat/virt-ls.pod:381
2117 "C<virt-ls -R> produces a recursive list of files starting at the named "
2118 "directory. See L</RECURSIVE LISTING>."
2122 #: ../cat/virt-ls.pod:384
2124 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2125 "parsed. See L</RECURSIVE LONG LISTING>."
2129 #: ../cat/virt-ls.pod:387
2134 #: ../cat/virt-ls.pod:389
2135 msgid "Display time fields."
2139 #: ../cat/virt-ls.pod:394
2140 msgid "B<--time-days>"
2144 #: ../cat/virt-ls.pod:396
2145 msgid "Display time fields as days before now (negative if in the future)."
2149 #: ../cat/virt-ls.pod:398
2151 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2152 "of the file is between 0 and 86399 seconds."
2156 #: ../cat/virt-ls.pod:404
2157 msgid "B<--time-relative>"
2161 #: ../cat/virt-ls.pod:406
2162 msgid "Display time fields as seconds before now (negative if in the future)."
2166 #: ../cat/virt-ls.pod:411
2171 #: ../cat/virt-ls.pod:413
2172 msgid "Display time fields as seconds since the Unix epoch."
2176 #: ../cat/virt-ls.pod:418
2181 #: ../cat/virt-ls.pod:420
2182 msgid "Display UID and GID fields."
2186 #: ../cat/virt-ls.pod:445
2187 msgid "Previous versions of virt-ls allowed you to write either:"
2191 #: ../cat/virt-ls.pod:447
2194 " virt-ls disk.img [disk.img ...] /dir\n"
2199 #: ../cat/virt-ls.pod:451
2202 " virt-ls guestname /dir\n"
2207 #: ../cat/virt-ls.pod:497
2209 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2210 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2211 "L<http://libguestfs.org/>."
2215 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374
2216 #: ../rescue/virt-rescue.pod:302
2217 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2221 #: ../df/virt-df.pod:5
2222 msgid "virt-df - Display free space on virtual filesystems"
2226 #: ../df/virt-df.pod:9
2229 " virt-df [--options]\n"
2234 #: ../df/virt-df.pod:11
2237 " virt-df [--options] -d domname\n"
2242 #: ../df/virt-df.pod:13
2245 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
2250 #: ../df/virt-df.pod:17
2253 " virt-df [--options] domname\n"
2258 #: ../df/virt-df.pod:19
2261 " virt-df [--options] disk.img [disk.img ...]\n"
2266 #: ../df/virt-df.pod:23
2268 "C<virt-df> is a command line tool to display free space on virtual machine "
2269 "filesystems. Unlike other tools, it doesn't just display the size of disk "
2270 "allocated to a virtual machine, but can look inside disk images to see how "
2271 "much space is really being used."
2275 #: ../df/virt-df.pod:28
2277 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
2278 "to get a list of all active and inactive guests, and performs a C<df>-type "
2279 "operation on each one in turn, printing out the results."
2283 #: ../df/virt-df.pod:32
2285 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a C<df>-"
2286 "type operation on either the single named libvirt domain, or on the disk "
2287 "image(s) listed on the command line (which must all belong to a single VM). "
2288 "In this mode (with arguments), C<virt-df> will I<only work for a single "
2289 "guest>. If you want to run on multiple guests, then you have to invoke "
2290 "C<virt-df> multiple times."
2294 #: ../df/virt-df.pod:39
2296 "Use the I<--csv> option to get a format which can be easily parsed by other "
2297 "programs. Other options are similar to the standard L<df(1)> command."
2301 #: ../df/virt-df.pod:45
2303 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
2304 "output human-readable:"
2308 #: ../df/virt-df.pod:48
2311 " # virt-df -d F14x64 -h\n"
2312 " Filesystem Size Used Available Use%\n"
2313 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
2314 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
2319 #: ../df/virt-df.pod:53
2320 msgid "Show disk usage for a disk image file called C<test.img>:"
2324 #: ../df/virt-df.pod:55
2327 " $ virt-df -a test1.img\n"
2328 " Filesystem 1K-blocks Used Available Use%\n"
2329 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
2334 #: ../df/virt-df.pod:112
2337 " virt-df --format=raw -a disk.img\n"
2342 #: ../df/virt-df.pod:116
2345 " virt-df --format=raw -a disk.img --format -a another.img\n"
2350 #: ../df/virt-df.pod:129
2351 msgid "Print sizes in human-readable format."
2355 #: ../df/virt-df.pod:131
2356 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
2360 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:155
2365 #: ../df/virt-df.pod:135
2370 #: ../df/virt-df.pod:137
2371 msgid "Print inodes instead of blocks."
2375 #: ../df/virt-df.pod:139
2376 msgid "B<--one-per-guest>"
2380 #: ../df/virt-df.pod:141
2382 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
2383 "disks from several guests to a single libguestfs appliance."
2387 #: ../df/virt-df.pod:144
2388 msgid "You might use this option in the following circumstances:"
2392 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
2393 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
2394 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
2395 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
2396 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
2397 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
2398 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
2399 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
2400 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
2401 #: ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:398
2402 #: ../fish/guestfish-actions.pod:405 ../fish/guestfish-actions.pod:412
2403 #: ../fish/guestfish-actions.pod:1139 ../fish/guestfish-actions.pod:1143
2404 #: ../fish/guestfish-actions.pod:1147 ../fish/guestfish-actions.pod:1151
2405 #: ../fish/guestfish-actions.pod:1159 ../fish/guestfish-actions.pod:1163
2406 #: ../fish/guestfish-actions.pod:1167 ../fish/guestfish-actions.pod:1177
2407 #: ../fish/guestfish-actions.pod:1181 ../fish/guestfish-actions.pod:1185
2408 #: ../fish/guestfish-actions.pod:1275 ../fish/guestfish-actions.pod:1279
2409 #: ../fish/guestfish-actions.pod:1284 ../fish/guestfish-actions.pod:1289
2410 #: ../fish/guestfish-actions.pod:1331 ../fish/guestfish-actions.pod:1335
2411 #: ../fish/guestfish-actions.pod:1340 ../fish/guestfish-actions.pod:1596
2412 #: ../fish/guestfish-actions.pod:1603 ../fish/guestfish-actions.pod:1610
2413 #: ../fish/guestfish-actions.pod:2005 ../fish/guestfish-actions.pod:2011
2414 #: ../fish/guestfish-actions.pod:2019 ../fish/guestfish-actions.pod:2026
2415 #: ../fish/guestfish-actions.pod:2033 ../fish/guestfish.pod:445
2416 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
2417 #: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
2418 #: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:282
2419 #: ../resize/virt-resize.pod:286 ../resize/virt-resize.pod:295
2420 #: ../resize/virt-resize.pod:301 ../src/guestfs-actions.pod:22
2421 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:588
2422 #: ../src/guestfs-actions.pod:596 ../src/guestfs-actions.pod:603
2423 #: ../src/guestfs-actions.pod:610 ../src/guestfs-actions.pod:1774
2424 #: ../src/guestfs-actions.pod:1778 ../src/guestfs-actions.pod:1782
2425 #: ../src/guestfs-actions.pod:1786 ../src/guestfs-actions.pod:1794
2426 #: ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:1802
2427 #: ../src/guestfs-actions.pod:1812 ../src/guestfs-actions.pod:1816
2428 #: ../src/guestfs-actions.pod:1820 ../src/guestfs-actions.pod:1958
2429 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:1967
2430 #: ../src/guestfs-actions.pod:1972 ../src/guestfs-actions.pod:2033
2431 #: ../src/guestfs-actions.pod:2037 ../src/guestfs-actions.pod:2042
2432 #: ../src/guestfs-actions.pod:2455 ../src/guestfs-actions.pod:2462
2433 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:3006
2434 #: ../src/guestfs-actions.pod:3012 ../src/guestfs-actions.pod:3020
2435 #: ../src/guestfs-actions.pod:3027 ../src/guestfs-actions.pod:3034
2436 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398
2437 #: ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411
2438 #: ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1091
2439 #: ../src/guestfs.pod:1095 ../src/guestfs.pod:1099 ../src/guestfs.pod:1104
2440 #: ../src/guestfs.pod:1112 ../src/guestfs.pod:1131 ../src/guestfs.pod:1139
2441 #: ../src/guestfs.pod:1161 ../src/guestfs.pod:1165 ../src/guestfs.pod:1169
2442 #: ../src/guestfs.pod:1173 ../src/guestfs.pod:1177 ../src/guestfs.pod:1181
2443 #: ../src/guestfs.pod:1671 ../src/guestfs.pod:1676 ../src/guestfs.pod:1680
2444 #: ../src/guestfs.pod:1782 ../src/guestfs.pod:1787 ../src/guestfs.pod:1791
2445 #: ../src/guestfs.pod:1801 ../src/guestfs.pod:2090 ../src/guestfs.pod:2095
2446 #: ../src/guestfs.pod:2101 ../src/guestfs.pod:2109 ../src/guestfs.pod:2556
2447 #: ../src/guestfs.pod:2562 ../src/guestfs.pod:2567 ../src/guestfs.pod:2573
2448 #: ../src/guestfs.pod:2956 ../src/guestfs.pod:2961 ../src/guestfs.pod:2965
2449 #: ../src/guestfs.pod:2969 ../src/guestfs.pod:2973 ../src/guestfs.pod:2987
2450 #: ../src/guestfs.pod:2992 ../src/guestfs.pod:3218 ../src/guestfs.pod:3222
2451 #: ../src/guestfs.pod:3226 ../src/guestfs.pod:3230
2452 #: ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202
2453 #: ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:710
2454 #: ../tools/virt-win-reg.pl:716 ../tools/virt-win-reg.pl:722
2459 #: ../df/virt-df.pod:150
2461 "If you think an untrusted guest might actively try to exploit the libguestfs "
2462 "appliance kernel, then this prevents one guest from interfering with the "
2463 "stats printed for another guest."
2467 #: ../df/virt-df.pod:156
2469 "If the kernel has a bug which stops it from accessing a filesystem in one "
2470 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
2471 "and report stats for further guests."
2475 #: ../df/virt-df.pod:165
2477 "Print UUIDs instead of names. This is useful for following a guest even "
2478 "when the guest is migrated or renamed, or when two guests happen to have the "
2483 #: ../df/virt-df.pod:169
2485 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
2486 "images, we still print the disk image name even when this option is "
2491 #: ../df/virt-df.pod:229
2493 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<http://"
2498 #: ../edit/virt-edit.pod:5
2499 msgid "virt-edit - Edit a file in a virtual machine"
2503 #: ../edit/virt-edit.pod:9
2506 " virt-edit [--options] -d domname file [file ...]\n"
2511 #: ../edit/virt-edit.pod:11
2514 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
2519 #: ../edit/virt-edit.pod:13
2522 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
2527 #: ../edit/virt-edit.pod:17
2530 " virt-edit domname file\n"
2535 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
2538 " virt-edit disk.img [disk.img ...] file\n"
2543 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
2544 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
2545 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19
2546 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
2551 #: ../edit/virt-edit.pod:23
2553 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
2554 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
2555 "doing this, but doesn't catch all cases."
2559 #: ../edit/virt-edit.pod:29
2561 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
2562 "exists in the named virtual machine (or disk image)."
2566 #: ../edit/virt-edit.pod:32
2568 "Multiple filenames can be given, in which case they are each edited in "
2569 "turn. Each filename must be a full path, starting at the root directory "
2570 "(starting with '/')."
2574 #: ../edit/virt-edit.pod:36
2575 msgid "If you want to just view a file, use L<virt-cat(1)>."
2579 #: ../edit/virt-edit.pod:38
2581 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
2582 "USING GUESTFISH> below)."
2586 #: ../edit/virt-edit.pod:41
2588 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
2589 "that and much more."
2593 #: ../edit/virt-edit.pod:46
2594 msgid "Edit the named files interactively:"
2598 #: ../edit/virt-edit.pod:48
2601 " virt-edit -d mydomain /boot/grub/grub.conf\n"
2606 #: ../edit/virt-edit.pod:50
2609 " virt-edit -d mydomain /etc/passwd\n"
2614 #: ../edit/virt-edit.pod:52
2615 msgid "For Windows guests, some Windows paths are understood:"
2619 #: ../edit/virt-edit.pod:54
2622 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
2627 #: ../edit/virt-edit.pod:56
2629 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
2630 "INTERACTIVE EDITING> below). To change the init default level to 5:"
2634 #: ../edit/virt-edit.pod:60
2637 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
2642 #: ../edit/virt-edit.pod:81
2643 msgid "B<-b> extension"
2647 #: ../edit/virt-edit.pod:83
2648 msgid "B<--backup> extension"
2652 #: ../edit/virt-edit.pod:85
2654 "Create a backup of the original file I<in the guest disk image>. The backup "
2655 "has the original filename with C<extension> added."
2659 #: ../edit/virt-edit.pod:88
2661 "Usually the first character of C<extension> would be a dot C<.> so you would "
2666 #: ../edit/virt-edit.pod:91
2669 " virt-edit -b .orig [etc]\n"
2674 #: ../edit/virt-edit.pod:93
2675 msgid "By default, no backup file is made."
2679 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
2680 #: ../fuse/guestmount.pod:96 ../inspector/virt-inspector.pod:74
2681 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
2682 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
2687 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
2688 #: ../fuse/guestmount.pod:98 ../inspector/virt-inspector.pod:76
2689 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
2690 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
2691 msgid "B<--connect URI>"
2695 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
2696 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
2697 #: ../tools/virt-win-reg.pl:135
2699 "If you specify guest block devices directly, then libvirt is not used at all."
2703 #: ../edit/virt-edit.pod:114
2705 "When prompting for keys and passphrases, virt-edit normally turns echoing "
2706 "off so you cannot see what you are typing. If you are not worried about "
2707 "Tempest attacks and there is no one else in the room you can specify this "
2708 "flag to see what you are typing."
2712 #: ../edit/virt-edit.pod:119
2717 #: ../edit/virt-edit.pod:121
2718 msgid "B<--expr> EXPR"
2722 #: ../edit/virt-edit.pod:123
2724 "Instead of launching the external editor, non-interactively apply the Perl "
2725 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
2730 #: ../edit/virt-edit.pod:127
2732 "Be careful to properly quote the expression to prevent it from being altered "
2737 #: ../edit/virt-edit.pod:130
2738 msgid "Note that this option is only available when Perl 5 is installed."
2742 #: ../edit/virt-edit.pod:132
2743 msgid "B<--format> raw|qcow2|..."
2747 #: ../edit/virt-edit.pod:143
2750 " virt-edit --format=raw -a disk.img file\n"
2755 #: ../edit/virt-edit.pod:147
2758 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
2763 #: ../edit/virt-edit.pod:181
2764 msgid "Previous versions of virt-edit allowed you to write either:"
2768 #: ../edit/virt-edit.pod:187
2771 " virt-edit guestname file\n"
2776 #: ../edit/virt-edit.pod:195
2777 msgid "NON-INTERACTIVE EDITING"
2781 #: ../edit/virt-edit.pod:197
2783 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
2784 "administrator can interactively edit the file."
2788 #: ../edit/virt-edit.pod:200
2790 "There are two ways also to use C<virt-edit> from scripts in order to make "
2791 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
2792 "like this, it's less error-prone to write scripts directly using the "
2793 "libguestfs API and Augeas for configuration file editing.)"
2797 #: ../edit/virt-edit.pod:206
2799 "The first method is to temporarily set C<$EDITOR> to any script or program "
2800 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
2801 "update C<tmpfile> in place however it likes."
2805 #: ../edit/virt-edit.pod:210
2807 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
2808 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
2809 "instances of C<foo> with C<bar> in a file:"
2813 #: ../edit/virt-edit.pod:214
2816 " virt-edit -d domname filename -e 's/foo/bar/'\n"
2821 #: ../edit/virt-edit.pod:216
2823 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
2824 "For example to delete root's password you could do:"
2828 #: ../edit/virt-edit.pod:219
2831 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
2836 #: ../edit/virt-edit.pod:221
2838 "What really happens is that the snippet is evaluated as a Perl expression "
2839 "for each line of the file. The line, including the final C<\\n>, is passed "
2840 "in C<$_> and the expression should update C<$_> or leave it unchanged."
2844 #: ../edit/virt-edit.pod:226
2846 "To delete a line, set C<$_> to the empty string. For example, to delete the "
2847 "C<apache> user account from the password file you can do:"
2851 #: ../edit/virt-edit.pod:229
2854 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
2859 #: ../edit/virt-edit.pod:231
2861 "To insert a line, prepend or append it to C<$_>. However appending lines to "
2862 "the end of the file is rather difficult this way since there is no concept "
2863 "of \"last line of the file\" - your expression just doesn't get called "
2864 "again. You might want to use the first method (setting C<$EDITOR>) if you "
2869 #: ../edit/virt-edit.pod:237
2871 "The variable C<$lineno> contains the current line number. As is "
2872 "traditional, the first line in the file is number C<1>."
2876 #: ../edit/virt-edit.pod:240
2878 "The return value from the expression is ignored, but the expression may call "
2879 "C<die> in order to abort the whole program, leaving the original file "
2884 #: ../edit/virt-edit.pod:244
2886 "Remember when matching the end of a line that C<$_> may contain the final C<"
2887 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
2888 "newline then neither of these. Thus to match or substitute some text at the "
2889 "end of a line, use this regular expression:"
2893 #: ../edit/virt-edit.pod:249
2896 " /some text(\\r?\\n)?$/\n"
2901 #: ../edit/virt-edit.pod:251
2903 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
2904 "$_> itself (since that would remove all newlines from the file):"
2908 #: ../edit/virt-edit.pod:255
2911 " my $m = $_; chomp $m; $m =~ /some text$/\n"
2916 #: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
2917 msgid "WINDOWS PATHS"
2921 #: ../edit/virt-edit.pod:259
2923 "C<virt-edit> has a limited ability to understand Windows drive letters and "
2924 "paths (eg. C<E:\\foo\\bar.txt>)."
2928 #: ../edit/virt-edit.pod:262
2929 msgid "If and only if the guest is running Windows then:"
2933 #: ../edit/virt-edit.pod:268
2935 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
2936 "to the correct filesystem."
2940 #: ../edit/virt-edit.pod:273
2942 "Any backslash (C<\\>) characters in the path are replaced with forward "
2943 "slashes so that libguestfs can process it."
2947 #: ../edit/virt-edit.pod:278
2949 "The path is resolved case insensitively to locate the file that should be "
2954 #: ../edit/virt-edit.pod:283
2955 msgid "There are some known shortcomings:"
2959 #: ../edit/virt-edit.pod:289
2960 msgid "Some NTFS symbolic links may not be followed correctly."
2964 #: ../edit/virt-edit.pod:293
2965 msgid "NTFS junction points that cross filesystems are not followed."
2969 #: ../edit/virt-edit.pod:299
2971 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
2972 "C<virt-edit> doesn't work."
2976 #: ../edit/virt-edit.pod:302
2977 msgid "Using C<virt-edit> is approximately equivalent to doing:"
2981 #: ../edit/virt-edit.pod:304
2984 " guestfish --rw -i -d domname edit /file\n"
2989 #: ../edit/virt-edit.pod:306
2991 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
2996 #: ../edit/virt-edit.pod:309
2998 "The command above uses libguestfs's guest inspection feature and so does not "
2999 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
3000 "disk images that don't contain guests. To edit a file on a disk image "
3005 #: ../edit/virt-edit.pod:314
3008 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
3013 #: ../edit/virt-edit.pod:316
3015 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
3016 "the disk image to edit, and C</file> is the full path to the file."
3020 #: ../edit/virt-edit.pod:320
3022 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
3023 "C<write> or C<upload> instead:"
3027 #: ../edit/virt-edit.pod:323
3030 " guestfish --rw -i -d domname touch /newfile\n"
3035 #: ../edit/virt-edit.pod:325
3038 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
3043 #: ../edit/virt-edit.pod:327
3046 " guestfish --rw -i -d domname upload localfile /newfile\n"
3051 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1086
3052 #: ../rescue/virt-rescue.pod:261 ../src/guestfs.pod:3103
3053 #: ../test-tool/libguestfs-test-tool.pod:95
3054 msgid "ENVIRONMENT VARIABLES"
3058 #: ../edit/virt-edit.pod:333
3063 #: ../edit/virt-edit.pod:335
3065 "If set, this string is used as the editor. It may contain arguments, eg. C<"
3070 #: ../edit/virt-edit.pod:338
3071 msgid "If not set, C<vi> is used."
3075 #: ../edit/virt-edit.pod:356
3077 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
3078 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
3079 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
3083 #: ../erlang/examples/guestfs-erlang.pod:5
3084 msgid "guestfs-erlang - How to use libguestfs from Erlang"
3088 #: ../erlang/examples/guestfs-erlang.pod:9
3091 " {ok, G} = guestfs:create(),\n"
3092 " ok = guestfs:add_drive_opts(G, Disk,\n"
3093 " [{format, \"raw\"}, {readonly, true}]),\n"
3094 " ok = guestfs:launch(G),\n"
3095 " [Device] = guestfs:list_devices(G),\n"
3096 " ok = guestfs:close(G).\n"
3101 #: ../erlang/examples/guestfs-erlang.pod:18
3103 "This manual page documents how to call libguestfs from the Erlang "
3104 "programming language. This page just documents the differences from the C "
3105 "API and gives some examples. If you are not familiar with using libguestfs, "
3106 "you also need to read L<guestfs(3)>."
3110 #: ../erlang/examples/guestfs-erlang.pod:23
3111 msgid "OPENING AND CLOSING THE HANDLE"
3115 #: ../erlang/examples/guestfs-erlang.pod:25
3117 "The Erlang bindings are implemented using an external program called C<erl-"
3118 "guestfs>. This program must be on the current PATH, or else you should "
3119 "specify the full path to the program:"
3123 #: ../erlang/examples/guestfs-erlang.pod:29
3126 " {ok, G} = guestfs:create().\n"
3131 #: ../erlang/examples/guestfs-erlang.pod:31
3134 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
3139 #: ../erlang/examples/guestfs-erlang.pod:33
3140 msgid "C<G> is the libguestfs handle which you should pass to other functions."
3144 #: ../erlang/examples/guestfs-erlang.pod:36
3145 msgid "To close the handle:"
3149 #: ../erlang/examples/guestfs-erlang.pod:38
3152 " ok = guestfs:close(G).\n"
3157 #: ../erlang/examples/guestfs-erlang.pod:40
3158 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
3162 #: ../erlang/examples/guestfs-erlang.pod:42
3164 "For functions that take optional arguments, the first arguments are the non-"
3165 "optional ones. The last argument is a list of tuples supplying the "
3166 "remaining optional arguments."
3170 #: ../erlang/examples/guestfs-erlang.pod:46
3173 " ok = guestfs:add_drive_opts(G, Disk,\n"
3174 " [{format, \"raw\"}, {readonly, true}]).\n"
3179 #: ../erlang/examples/guestfs-erlang.pod:49
3180 msgid "If the last argument would be an empty list, you can also omit it:"
3184 #: ../erlang/examples/guestfs-erlang.pod:51
3187 " ok = guestfs:add_drive_opts(G, Disk).\n"
3192 #: ../erlang/examples/guestfs-erlang.pod:53
3193 msgid "RETURN VALUES AND ERRORS"
3197 #: ../erlang/examples/guestfs-erlang.pod:55
3199 "On success, most functions return a C<Result> term (which could be a list, "
3200 "string, tuple etc.). If there is nothing for the function to return, then "
3201 "the atom C<ok> is returned."
3205 #: ../erlang/examples/guestfs-erlang.pod:59
3206 msgid "On error, you would see one of the following tuples:"
3210 #: ../erlang/examples/guestfs-erlang.pod:63
3211 msgid "C<{error, Msg, Errno}>"
3215 #: ../erlang/examples/guestfs-erlang.pod:65
3216 msgid "This indicates an ordinary error from the function."
3220 #: ../erlang/examples/guestfs-erlang.pod:67
3222 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
3227 #: ../erlang/examples/guestfs-erlang.pod:70
3228 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
3232 #: ../erlang/examples/guestfs-erlang.pod:72
3233 msgid "C<{unknown, Function}>"
3237 #: ../erlang/examples/guestfs-erlang.pod:74
3239 "This indicates that the function you called is not known. Generally this "
3240 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
3241 "which you should not do."
3245 #: ../erlang/examples/guestfs-erlang.pod:78
3246 msgid "C<Function> is the name of the unknown function."
3250 #: ../erlang/examples/guestfs-erlang.pod:80
3251 msgid "C<{unknownarg, Arg}>"
3255 #: ../erlang/examples/guestfs-erlang.pod:82
3257 "This indicates that you called a function with optional arguments, with an "
3258 "unknown argument name."
3262 #: ../erlang/examples/guestfs-erlang.pod:85
3263 msgid "C<Arg> is the name of the unknown argument."
3267 #: ../erlang/examples/guestfs-erlang.pod:89
3268 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
3269 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
3270 #: ../python/examples/guestfs-python.pod:34
3271 #: ../ruby/examples/guestfs-ruby.pod:28
3272 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
3276 #: ../erlang/examples/guestfs-erlang.pod:91
3277 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
3278 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
3279 #: ../python/examples/guestfs-python.pod:36
3280 #: ../ruby/examples/guestfs-ruby.pod:30
3285 #: ../erlang/examples/guestfs-erlang.pod:93
3286 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
3287 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
3288 #: ../python/examples/guestfs-python.pod:38
3289 #: ../ruby/examples/guestfs-ruby.pod:32
3290 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
3294 #: ../erlang/examples/guestfs-erlang.pod:95
3295 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
3296 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
3297 #: ../python/examples/guestfs-python.pod:40
3298 #: ../ruby/examples/guestfs-ruby.pod:34
3303 #: ../erlang/examples/guestfs-erlang.pod:99
3305 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
3306 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
3307 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
3311 #: ../erlang/examples/guestfs-erlang.pod:110
3312 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
3313 #: ../fish/guestfish.pod:1260 ../fish/virt-copy-in.pod:60
3314 #: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
3315 #: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:319
3316 #: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
3317 #: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
3318 #: ../python/examples/guestfs-python.pod:54
3319 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3237
3320 #: ../test-tool/libguestfs-test-tool.pod:106
3325 #: ../erlang/examples/guestfs-erlang.pod:112
3326 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
3327 #: ../fish/guestfish.pod:1262 ../fish/virt-copy-in.pod:62
3328 #: ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60
3329 #: ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:321
3330 #: ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93
3331 #: ../perl/examples/guestfs-perl.pod:54
3332 #: ../python/examples/guestfs-python.pod:56
3333 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3239
3334 #: ../test-tool/libguestfs-test-tool.pod:108
3335 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3339 #: ../erlang/examples/guestfs-erlang.pod:116
3340 #: ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
3341 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
3345 #: ../erlang/examples/guestfs-erlang.pod:118
3346 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
3347 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
3348 #: ../perl/examples/guestfs-perl.pod:60
3349 #: ../python/examples/guestfs-python.pod:62
3350 #: ../ruby/examples/guestfs-ruby.pod:56
3352 "The examples in this manual page may be freely copied, modified and "
3353 "distributed without any restrictions."
3357 #: ../erlang/examples/guestfs-erlang.pod:121
3358 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
3359 #: ../java/examples/guestfs-java.pod:69
3360 #: ../ocaml/examples/guestfs-ocaml.pod:102
3361 #: ../perl/examples/guestfs-perl.pod:63
3362 #: ../python/examples/guestfs-python.pod:65
3363 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3246
3365 "This library is free software; you can redistribute it and/or modify it "
3366 "under the terms of the GNU Lesser General Public License as published by the "
3367 "Free Software Foundation; either version 2 of the License, or (at your "
3368 "option) any later version."
3372 #: ../erlang/examples/guestfs-erlang.pod:126
3373 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
3374 #: ../java/examples/guestfs-java.pod:74
3375 #: ../ocaml/examples/guestfs-ocaml.pod:107
3376 #: ../perl/examples/guestfs-perl.pod:68
3377 #: ../python/examples/guestfs-python.pod:70
3378 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3251
3380 "This library is distributed in the hope that it will be useful, but WITHOUT "
3381 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3382 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3387 #: ../erlang/examples/guestfs-erlang.pod:131
3388 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
3389 #: ../java/examples/guestfs-java.pod:79
3390 #: ../ocaml/examples/guestfs-ocaml.pod:112
3391 #: ../perl/examples/guestfs-perl.pod:73
3392 #: ../python/examples/guestfs-python.pod:75
3393 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3256
3395 "You should have received a copy of the GNU Lesser General Public License "
3396 "along with this library; if not, write to the Free Software Foundation, "
3397 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3401 #: ../examples/guestfs-examples.pod:5
3402 msgid "guestfs-examples - Examples of using libguestfs from C"
3406 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
3409 " #include <guestfs.h>\n"
3414 #: ../examples/guestfs-examples.pod:11
3417 " guestfs_h *g = guestfs_create ();\n"
3418 " guestfs_add_drive_ro (g, \"disk.img\");\n"
3419 " guestfs_launch (g);\n"
3424 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
3427 " cc prog.c -o prog -lguestfs\n"
3429 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
3434 #: ../examples/guestfs-examples.pod:21
3436 "This manual page contains examples of calling libguestfs from the C "
3437 "programming language. If you are not familiar with using libguestfs, you "
3438 "also need to read L<guestfs(3)>."
3442 #: ../examples/guestfs-examples.pod:35
3444 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
3445 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
3446 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
3450 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
3451 #: ../python/examples/guestfs-python.pod:60
3452 #: ../ruby/examples/guestfs-ruby.pod:54
3453 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
3457 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
3462 #: ../examples/guestfs-recipes.pod:5
3464 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
3465 "here. The only way which works for both sorts of output is to just write "
3466 "the URL directly. Do NOT use L<...> for URLs."
3470 #: ../examples/guestfs-recipes.pod:9
3472 "We break with tradition here and don't use ALL CAPS for the section "
3473 "headings, as this makes them much easier to read."
3477 #: ../examples/guestfs-recipes.pod:16
3478 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
3482 #: ../examples/guestfs-recipes.pod:20
3484 "This page contains recipes for and links to things you can do using "
3485 "libguestfs, L<guestfish(1)> and the virt tools."
3489 #: ../examples/guestfs-recipes.pod:23
3490 msgid "Audit a virtual machine for setuid files"
3494 #: ../examples/guestfs-recipes.pod:25
3496 "The link below contains a small program which can be used to audit a Linux "
3497 "virtual machine to see what setuid and setgid files it contains."
3501 #: ../examples/guestfs-recipes.pod:28
3503 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
3508 #: ../examples/guestfs-recipes.pod:30
3509 msgid "Change the background image in a Windows XP VM"
3513 #: ../examples/guestfs-recipes.pod:32
3515 "The links below explain how to use L<guestfish(1)> to change the background "
3516 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
3517 "be substantially different for each version of Windows."
3521 #: ../examples/guestfs-recipes.pod:37
3523 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html https://"
3524 "lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
3528 #: ../examples/guestfs-recipes.pod:40
3529 msgid "Cloning a virtual machine (Linux)"
3533 #: ../examples/guestfs-recipes.pod:42
3535 "The guestfish technique described in the link below works well for most "
3536 "Linux VMs. Depending on the Linux distro you may need to change the paths "
3541 #: ../examples/guestfs-recipes.pod:46
3543 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
3548 #: ../examples/guestfs-recipes.pod:48
3550 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
3555 #: ../examples/guestfs-recipes.pod:51
3556 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
3560 #: ../examples/guestfs-recipes.pod:53
3561 msgid "Cloning a virtual machine (Windows)"
3565 #: ../examples/guestfs-recipes.pod:55
3567 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
3568 "straightforward. Currently there is code in the Aeolus Oz project which "
3569 "does this (using libguestfs). As part of our review of the virt-clone tool, "
3570 "we may add sysprepping ability."
3574 #: ../examples/guestfs-recipes.pod:60
3576 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-tools-"
3577 "list/2011-May/msg00019.html"
3581 #: ../examples/guestfs-recipes.pod:63
3582 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
3586 #: ../examples/guestfs-recipes.pod:65
3587 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
3591 #: ../examples/guestfs-recipes.pod:67
3594 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
3599 #: ../examples/guestfs-recipes.pod:69
3600 msgid "To export just a subdirectory, eg. C</files>, do:"
3604 #: ../examples/guestfs-recipes.pod:71
3607 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
3612 #: ../examples/guestfs-recipes.pod:73
3613 msgid "Create empty disk images"
3617 #: ../examples/guestfs-recipes.pod:75
3619 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
3620 "The useful guide below explains the options available."
3624 #: ../examples/guestfs-recipes.pod:78
3626 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/"
3631 #: ../examples/guestfs-recipes.pod:80
3632 msgid "Dump raw filesystem content from inside a disk image or VM"
3636 #: ../examples/guestfs-recipes.pod:82
3638 "You can use the L<guestfish(1)> C<download> command to extract the raw "
3639 "filesystem content from any filesystem in a disk image or a VM (even one "
3640 "which is encrypted or buried inside an LV):"
3644 #: ../examples/guestfs-recipes.pod:86
3647 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
3652 #: ../examples/guestfs-recipes.pod:88
3655 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
3660 #: ../examples/guestfs-recipes.pod:90
3661 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
3665 #: ../examples/guestfs-recipes.pod:92
3666 msgid "Edit grub configuration in a VM"
3670 #: ../examples/guestfs-recipes.pod:94
3671 msgid "You can use this to:"
3675 #: ../examples/guestfs-recipes.pod:100
3676 msgid "Fix a virtual machine that does not boot."
3680 #: ../examples/guestfs-recipes.pod:104
3681 msgid "Change which kernel is used to boot the VM."
3685 #: ../examples/guestfs-recipes.pod:108
3686 msgid "Change kernel command line options."
3690 #: ../examples/guestfs-recipes.pod:112
3691 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
3695 #: ../examples/guestfs-recipes.pod:114
3698 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
3703 #: ../examples/guestfs-recipes.pod:116
3705 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
3710 #: ../examples/guestfs-recipes.pod:119
3713 " virt-rescue -d BrokenGuest\n"
3718 #: ../examples/guestfs-recipes.pod:121
3719 msgid "Export any directory from a VM"
3723 #: ../examples/guestfs-recipes.pod:123
3725 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
3729 #: ../examples/guestfs-recipes.pod:126
3732 " virt-copy-out -d Guest /home .\n"
3737 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
3738 #: ../fish/guestfish-actions.pod:1327 ../fish/guestfish-actions.pod:1592
3739 #: ../fish/guestfish-actions.pod:2001 ../src/guestfs-actions.pod:18
3740 #: ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2451
3741 #: ../src/guestfs-actions.pod:3002 ../src/guestfs.pod:1667
3742 #: ../tools/virt-win-reg.pl:706
3747 #: ../examples/guestfs-recipes.pod:134
3749 "The final dot of the command is not a printing error. It means we want to "
3750 "copy out to the current directory."
3754 #: ../examples/guestfs-recipes.pod:139
3755 msgid "This creates a directory called C<home> under the current directory."
3759 #: ../examples/guestfs-recipes.pod:143
3761 "If the guest is a Windows guest then you can use drive letters and "
3762 "backslashes, but you must prefix the path with C<win:> and quote it to "
3763 "protect it from the shell, like this:"
3767 #: ../examples/guestfs-recipes.pod:147
3770 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
3775 #: ../examples/guestfs-recipes.pod:149
3776 msgid "To get the output as a compressed tarball, do:"
3780 #: ../examples/guestfs-recipes.pod:151
3783 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
3788 #: ../examples/guestfs-recipes.pod:153
3790 "Although it sounds tempting, this is usually not a reliable way to get a "
3791 "backup from a running guest. See the entry in the FAQ: http://libguestfs."
3792 "org/FAQ.html#backup"
3796 #: ../examples/guestfs-recipes.pod:157
3797 msgid "Find out which user is using the most space"
3801 #: ../examples/guestfs-recipes.pod:159
3803 "This simple script examines a Linux guest to find out which user is using "
3804 "the most space in their home directory:"
3808 #: ../examples/guestfs-recipes.pod:162
3816 #: ../examples/guestfs-recipes.pod:164
3824 #: ../examples/guestfs-recipes.pod:166
3833 #: ../examples/guestfs-recipes.pod:169
3836 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
3841 #: ../examples/guestfs-recipes.pod:171
3844 " for d in $(guestfish --remote ls \"$dir\"); do\n"
3845 " echo -n \"$dir/$d\"\n"
3847 " guestfish --remote du \"$dir/$d\";\n"
3848 " done | sort -nr -k 2\n"
3853 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
3856 " guestfish --remote exit\n"
3861 #: ../examples/guestfs-recipes.pod:179
3862 msgid "Get DHCP address from a VM"
3866 #: ../examples/guestfs-recipes.pod:181
3868 "The link below explains the many different possible techniques for getting "
3869 "the last assigned DHCP address of a virtual machine."
3873 #: ../examples/guestfs-recipes.pod:184
3875 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-"
3876 "a-virtual-machine-disk-image/#content"
3880 #: ../examples/guestfs-recipes.pod:186
3882 "In the libguestfs source examples directory you will find the latest version "
3883 "of the C<virt-dhcp-address.c> program."
3887 #: ../examples/guestfs-recipes.pod:189
3888 msgid "Get the operating system product name string"
3892 #: ../examples/guestfs-recipes.pod:191
3893 msgid "Save the following script into a file called C<product-name.sh>:"
3897 #: ../examples/guestfs-recipes.pod:193
3902 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
3903 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
3904 " guestfish --remote inspect-get-product-name \"$root\"\n"
3905 " guestfish --remote exit\n"
3910 #: ../examples/guestfs-recipes.pod:200
3911 msgid "Make the script executable and run it on a named guest:"
3915 #: ../examples/guestfs-recipes.pod:202
3918 " # product-name.sh RHEL60x64\n"
3919 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
3924 #: ../examples/guestfs-recipes.pod:205
3926 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
3927 "C<xpath> command line tool or from your favourite programming language:"
3931 #: ../examples/guestfs-recipes.pod:209
3934 " # virt-inspector RHEL60x64 > xml\n"
3935 " # xpath '//product_name' < xml\n"
3938 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
3943 #: ../examples/guestfs-recipes.pod:215
3944 msgid "Get the default boot kernel for a Linux VM"
3948 #: ../examples/guestfs-recipes.pod:217
3950 "The link below contains a program to print the default boot kernel for a "
3955 #: ../examples/guestfs-recipes.pod:220
3957 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-"
3958 "kernel-for-a-vm/#content"
3962 #: ../examples/guestfs-recipes.pod:222
3964 "It uses Augeas, and the technique is generally applicable for many different "
3969 #: ../examples/guestfs-recipes.pod:229
3970 msgid "listing the user accounts in the guest"
3974 #: ../examples/guestfs-recipes.pod:233
3975 msgid "what repositories is it configured to use"
3979 #: ../examples/guestfs-recipes.pod:237
3980 msgid "what NTP servers does it connect to"
3984 #: ../examples/guestfs-recipes.pod:241
3985 msgid "what were the boot messages last time it booted"
3989 #: ../examples/guestfs-recipes.pod:245
3990 msgid "listing who was logged in recently"
3994 #: ../examples/guestfs-recipes.pod:249
3995 msgid "http://augeas.net/"
3999 #: ../examples/guestfs-recipes.pod:251
4000 msgid "Install RPMs in a guest"
4004 #: ../examples/guestfs-recipes.pod:253
4006 "The link below contains a method to install RPMs in a guest. In fact the "
4007 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
4008 "installs them next time the guest is booted. You could use this technique "
4009 "to install vital security updates in an offline guest."
4013 #: ../examples/guestfs-recipes.pod:259
4015 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
4019 #: ../examples/guestfs-recipes.pod:261
4020 msgid "List applications installed in a VM"
4024 #: ../examples/guestfs-recipes.pod:263
4025 msgid "Save the following to a file C<list-apps.sh>:"
4029 #: ../examples/guestfs-recipes.pod:265
4034 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
4035 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
4036 " guestfish --remote inspect-list-applications \"$root\"\n"
4037 " guestfish --remote exit\n"
4042 #: ../examples/guestfs-recipes.pod:272
4044 "Make the file executable and then you can run it on any named virtual "
4049 #: ../examples/guestfs-recipes.pod:275
4052 " # list-apps.sh WinGuest\n"
4054 " app_name: Mozilla Firefox (3.6.12)\n"
4055 " app_display_name: Mozilla Firefox (3.6.12)\n"
4057 " app_version: 3.6.12 (en-GB)\n"
4059 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
4060 " app_trans_path:\n"
4061 " app_publisher: Mozilla\n"
4062 " app_url: http://www.mozilla.com/en-GB/\n"
4063 " app_source_package:\n"
4065 " app_description: Mozilla Firefox\n"
4068 " app_name: VLC media player\n"
4069 " app_display_name: VLC media player 1.1.5\n"
4071 " app_version: 1.1.5\n"
4073 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
4074 " app_trans_path:\n"
4075 " app_publisher: VideoLAN\n"
4076 " app_url: http://www.videolan.org/\n"
4077 " app_source_package:\n"
4079 " app_description:\n"
4085 #: ../examples/guestfs-recipes.pod:305
4087 "If you want to run the script on disk images (instead of libvirt virtual "
4088 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-inspector(1)"
4093 #: ../examples/guestfs-recipes.pod:309
4094 msgid "List files and directories in a VM"
4098 #: ../examples/guestfs-recipes.pod:311
4099 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
4103 #: ../examples/guestfs-recipes.pod:313
4106 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
4111 #: ../examples/guestfs-recipes.pod:315
4112 msgid "List services in a Windows VM"
4116 #: ../examples/guestfs-recipes.pod:317
4118 "The link below contains a script that can be used to list out the services "
4119 "from a Windows VM, and whether those services run at boot time or are loaded "
4124 #: ../examples/guestfs-recipes.pod:321
4126 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/"
4131 #: ../examples/guestfs-recipes.pod:323
4132 msgid "Make a disk image sparse"
4136 #: ../examples/guestfs-recipes.pod:325
4138 "The link below contains some guides for making a disk image sparse (or "
4139 "reintroducing sparseness)."
4143 #: ../examples/guestfs-recipes.pod:328
4145 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
4149 #: ../examples/guestfs-recipes.pod:330
4150 msgid "Monitor disk usage over time"
4154 #: ../examples/guestfs-recipes.pod:332
4156 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
4157 "The link below contains a guide."
4161 #: ../examples/guestfs-recipes.pod:335
4162 msgid "http://virt-tools.org/learning/advanced-virt-df/"
4166 #: ../examples/guestfs-recipes.pod:337
4167 msgid "Reading the Windows Event Log from Windows Vista (or later)"
4171 #: ../examples/guestfs-recipes.pod:339
4173 "L<guestfish(1)> plus the tools described in the link below can be used to "
4174 "read out the Windows Event Log from any virtual machine running Windows "
4175 "Vista or a later version."
4179 #: ../examples/guestfs-recipes.pod:343
4181 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
4182 "guestfish/#content"
4186 #: ../examples/guestfs-recipes.pod:345
4187 msgid "Remove root password (Linux)"
4191 #: ../examples/guestfs-recipes.pod:347
4193 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
4194 "files. One use is to remove the root password from a Linux guest:"
4198 #: ../examples/guestfs-recipes.pod:350
4201 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4206 #: ../examples/guestfs-recipes.pod:352
4207 msgid "Remove Administrator password (Windows)"
4211 #: ../examples/guestfs-recipes.pod:354
4213 "The link below contains one technique for removing the Administrator "
4214 "password from a Windows VM, or to be more precise, it gives you a command "
4215 "prompt the next time you log in which you can use to bypass any security:"
4219 #: ../examples/guestfs-recipes.pod:359
4221 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
4222 "administrator-password-with-guestfish/"
4226 #: ../examples/guestfs-recipes.pod:361
4227 msgid "Unpack a live CD"
4231 #: ../examples/guestfs-recipes.pod:363
4233 "Linux live CDs often contain multiple layers of disk images wrapped like a "
4234 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
4235 "layers, as outlined in the guide below."
4239 #: ../examples/guestfs-recipes.pod:367
4241 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
4246 #: ../examples/guestfs-recipes.pod:369
4247 msgid "Uploading and downloading files"
4251 #: ../examples/guestfs-recipes.pod:371
4253 "The link below contains general tips on uploading (copying in) and "
4254 "downloading (copying out) files from VMs."
4258 #: ../examples/guestfs-recipes.pod:374
4260 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
4264 #: ../examples/guestfs-recipes.pod:376
4265 msgid "Use libguestfs tools on VMware ESX guests"
4269 #: ../examples/guestfs-recipes.pod:378
4271 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
4272 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
4276 #: ../examples/guestfs-recipes.pod:382
4278 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
4283 #: ../examples/guestfs-recipes.pod:386
4285 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)"
4286 ">, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-"
4287 "python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4291 #: ../examples/guestfs-recipes.pod:403
4292 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
4296 #: ../fish/guestfish-actions.pod:1
4301 #: ../fish/guestfish-actions.pod:3
4304 " add-cdrom filename\n"
4309 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
4310 msgid "This function adds a virtual CD-ROM disk image to the guest."
4314 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
4315 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
4319 #: ../fish/guestfish-actions.pod:15
4321 "This call checks for the existence of C<filename>. This stops you from "
4322 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4323 "and C<http:> URLs. To specify those, use the general L</config> call "
4328 #: ../fish/guestfish-actions.pod:22
4330 "If you just want to add an ISO file (often you use this as an efficient way "
4331 "to transfer large files into the guest), then you should probably use L</add-"
4332 "drive-ro> instead."
4336 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:163
4337 #: ../fish/guestfish-actions.pod:177
4339 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
4344 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:166
4345 #: ../fish/guestfish-actions.pod:180 ../fish/guestfish-actions.pod:1026
4346 #: ../fish/guestfish-actions.pod:1386 ../fish/guestfish-actions.pod:1400
4347 #: ../fish/guestfish-actions.pod:3157 ../fish/guestfish-actions.pod:3364
4348 #: ../fish/guestfish-actions.pod:3478 ../fish/guestfish-actions.pod:3526
4349 #: ../fish/guestfish-actions.pod:4439 ../fish/guestfish-actions.pod:4462
4350 #: ../fish/guestfish-actions.pod:4484 ../fish/guestfish-actions.pod:4522
4351 #: ../fish/guestfish-actions.pod:5171 ../fish/guestfish-actions.pod:5277
4352 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:252
4353 #: ../src/guestfs-actions.pod:273 ../src/guestfs-actions.pod:1615
4354 #: ../src/guestfs-actions.pod:2114 ../src/guestfs-actions.pod:2135
4355 #: ../src/guestfs-actions.pod:4765 ../src/guestfs-actions.pod:5068
4356 #: ../src/guestfs-actions.pod:5297 ../src/guestfs-actions.pod:5397
4357 #: ../src/guestfs-actions.pod:6677 ../src/guestfs-actions.pod:6721
4358 #: ../src/guestfs-actions.pod:6755 ../src/guestfs-actions.pod:6818
4359 #: ../src/guestfs-actions.pod:7750 ../src/guestfs-actions.pod:7859
4360 #: ../src/guestfs-actions.pod:8042
4362 "Deprecated functions will not be removed from the API, but the fact that "
4363 "they are deprecated indicates that there are problems with correct use of "
4368 #: ../fish/guestfish-actions.pod:35
4373 #: ../fish/guestfish-actions.pod:37
4378 #: ../fish/guestfish-actions.pod:39
4381 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
4386 #: ../fish/guestfish-actions.pod:41
4388 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4389 "It works by connecting to libvirt, requesting the domain and domain XML from "
4390 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
4394 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64
4396 "The number of disks added is returned. This operation is atomic: if an "
4397 "error is returned, then no disks are added."
4401 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67
4403 "This function does some minimal checks to make sure the libvirt domain is "
4404 "not running (unless C<readonly> is true). In a future version we will try "
4405 "to acquire the libvirt lock on each disk."
4409 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71
4411 "Disks must be accessible locally. This often means that adding disks from a "
4412 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4413 "unless those disks are accessible via the same device path locally too."
4417 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76
4419 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
4420 "libvirt.org/uri.html>). If this is not set then we connect to the default "
4421 "libvirt URI (or one set through an environment variable, see the libvirt "
4422 "documentation for full details)."
4426 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82
4428 "The optional C<live> flag controls whether this call will try to connect to "
4429 "a running virtual machine C<guestfsd> process if it sees a suitable "
4430 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
4431 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
4432 "DAEMONS> for more information."
4436 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89
4438 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
4439 "passed instead of the domain name. The C<dom> string is treated as a UUID "
4440 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
4445 #: ../fish/guestfish-actions.pod:76
4447 "The other optional parameters are passed directly through to L</add-drive-"
4452 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
4453 #: ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:784
4454 #: ../fish/guestfish-actions.pod:805 ../fish/guestfish-actions.pod:2040
4455 #: ../fish/guestfish-actions.pod:3206 ../fish/guestfish-actions.pod:3379
4456 #: ../fish/guestfish-actions.pod:3514
4458 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
4462 #: ../fish/guestfish-actions.pod:81
4467 #: ../fish/guestfish-actions.pod:83
4470 " add-drive filename\n"
4475 #: ../fish/guestfish-actions.pod:85
4477 "This function is the equivalent of calling L</add-drive-opts> with no "
4478 "optional parameters, so the disk is added writable, with the format being "
4479 "detected automatically."
4483 #: ../fish/guestfish-actions.pod:89
4485 "Automatic detection of the format opens you up to a potential security hole "
4486 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4487 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4488 "you should think about replacing calls to this function with calls to L</add-"
4489 "drive-opts>, and specifying the format."
4493 #: ../fish/guestfish-actions.pod:96
4494 msgid "add-drive-opts"
4498 #: ../fish/guestfish-actions.pod:98
4503 #: ../fish/guestfish-actions.pod:100
4506 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
4511 #: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:160
4513 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4514 "The first time you call this function, the disk appears as C</dev/sda>, the "
4515 "second time as C</dev/sdb>, and so on."
4519 #: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:165
4521 "You don't necessarily need to be root when using libguestfs. However you "
4522 "obviously do need sufficient permissions to access the filename for whatever "
4523 "operations you want to perform (ie. read access if you just want to read the "
4524 "image or write access if you want to modify the image)."
4528 #: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:171
4529 msgid "This call checks that C<filename> exists."
4533 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3168
4534 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4802
4535 msgid "The optional arguments are:"
4539 #: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:177
4544 #: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:179
4546 "If true then the image is treated as read-only. Writes are still allowed, "
4547 "but they are stored in a temporary snapshot overlay which is discarded at "
4548 "the end. The disk that you add is not modified."
4552 #: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:183
4557 #: ../fish/guestfish-actions.pod:127
4559 "This forces the image format. If you omit this (or use L</add-drive> or L</"
4560 "add-drive-ro>) then the format is automatically detected. Possible formats "
4561 "include C<raw> and C<qcow2>."
4565 #: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:189
4567 "Automatic detection of the format opens you up to a potential security hole "
4568 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4569 "RHBZ#642934. Specifying the format closes this security hole."
4573 #: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:194
4578 #: ../fish/guestfish-actions.pod:138
4580 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
4581 "add-drive-with-if> call (q.v.)"
4585 #: ../fish/guestfish-actions.pod:145
4586 msgid "add-drive-ro"
4590 #: ../fish/guestfish-actions.pod:147
4595 #: ../fish/guestfish-actions.pod:149
4598 " add-drive-ro filename\n"
4603 #: ../fish/guestfish-actions.pod:151
4605 "This function is the equivalent of calling L</add-drive-opts> with the "
4606 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
4607 "is added read-only, with the format being detected automatically."
4611 #: ../fish/guestfish-actions.pod:156
4612 msgid "add-drive-ro-with-if"
4616 #: ../fish/guestfish-actions.pod:158
4619 " add-drive-ro-with-if filename iface\n"
4624 #: ../fish/guestfish-actions.pod:160
4626 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
4627 "interface emulation to use at run time."
4631 #: ../fish/guestfish-actions.pod:170
4632 msgid "add-drive-with-if"
4636 #: ../fish/guestfish-actions.pod:172
4639 " add-drive-with-if filename iface\n"
4644 #: ../fish/guestfish-actions.pod:174
4646 "This is the same as L</add-drive> but it allows you to specify the QEMU "
4647 "interface emulation to use at run time."
4651 #: ../fish/guestfish-actions.pod:184
4656 #: ../fish/guestfish-actions.pod:186
4659 " aug-clear augpath\n"
4664 #: ../fish/guestfish-actions.pod:188 ../src/guestfs-actions.pod:290
4666 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4667 "L<augtool(1)> C<clear> command."
4671 #: ../fish/guestfish-actions.pod:191
4676 #: ../fish/guestfish-actions.pod:193
4684 #: ../fish/guestfish-actions.pod:195
4686 "Close the current Augeas handle and free up any resources used by it. After "
4687 "calling this, you have to call L</aug-init> again before you can use any "
4688 "other Augeas functions."
4692 #: ../fish/guestfish-actions.pod:200
4697 #: ../fish/guestfish-actions.pod:202
4700 " aug-defnode name expr val\n"
4705 #: ../fish/guestfish-actions.pod:204 ../src/guestfs-actions.pod:319
4707 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4711 #: ../fish/guestfish-actions.pod:207
4713 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4714 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
4715 "containing that single node."
4719 #: ../fish/guestfish-actions.pod:211 ../src/guestfs-actions.pod:326
4721 "On success this returns a pair containing the number of nodes in the "
4722 "nodeset, and a boolean flag if a node was created."
4726 #: ../fish/guestfish-actions.pod:215
4731 #: ../fish/guestfish-actions.pod:217
4734 " aug-defvar name expr\n"
4739 #: ../fish/guestfish-actions.pod:219 ../src/guestfs-actions.pod:343
4741 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4742 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4746 #: ../fish/guestfish-actions.pod:223 ../src/guestfs-actions.pod:347
4748 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4749 "evaluates to something which is not a nodeset."
4753 #: ../fish/guestfish-actions.pod:226
4758 #: ../fish/guestfish-actions.pod:228
4761 " aug-get augpath\n"
4766 #: ../fish/guestfish-actions.pod:230 ../src/guestfs-actions.pod:360
4768 "Look up the value associated with C<path>. If C<path> matches exactly one "
4769 "node, the C<value> is returned."
4773 #: ../fish/guestfish-actions.pod:233
4778 #: ../fish/guestfish-actions.pod:235
4781 " aug-init root flags\n"
4786 #: ../fish/guestfish-actions.pod:237 ../src/guestfs-actions.pod:375
4788 "Create a new Augeas handle for editing configuration files. If there was "
4789 "any previous Augeas handle associated with this guestfs session, then it is "
4794 #: ../fish/guestfish-actions.pod:241
4795 msgid "You must call this before using any other L</aug-*> commands."
4799 #: ../fish/guestfish-actions.pod:244 ../src/guestfs-actions.pod:382
4801 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4805 #: ../fish/guestfish-actions.pod:247 ../src/guestfs-actions.pod:385
4807 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4808 "logical I<or> of the following integers:"
4812 #: ../fish/guestfish-actions.pod:253 ../src/guestfs-actions.pod:391
4813 msgid "C<AUG_SAVE_BACKUP> = 1"
4817 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:393
4818 msgid "Keep the original file with a C<.augsave> extension."
4822 #: ../fish/guestfish-actions.pod:257 ../src/guestfs-actions.pod:395
4823 msgid "C<AUG_SAVE_NEWFILE> = 2"
4827 #: ../fish/guestfish-actions.pod:259 ../src/guestfs-actions.pod:397
4829 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4830 "original. Overrides C<AUG_SAVE_BACKUP>."
4834 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:400
4835 msgid "C<AUG_TYPE_CHECK> = 4"
4839 #: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:402
4840 msgid "Typecheck lenses."
4844 #: ../fish/guestfish-actions.pod:266
4846 "This option is only useful when debugging Augeas lenses. Use of this option "
4847 "may require additional memory for the libguestfs appliance. You may need to "
4848 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
4852 #: ../fish/guestfish-actions.pod:271 ../src/guestfs-actions.pod:409
4853 msgid "C<AUG_NO_STDINC> = 8"
4857 #: ../fish/guestfish-actions.pod:273 ../src/guestfs-actions.pod:411
4858 msgid "Do not use standard load path for modules."
4862 #: ../fish/guestfish-actions.pod:275 ../src/guestfs-actions.pod:413
4863 msgid "C<AUG_SAVE_NOOP> = 16"
4867 #: ../fish/guestfish-actions.pod:277 ../src/guestfs-actions.pod:415
4868 msgid "Make save a no-op, just record what would have been changed."
4872 #: ../fish/guestfish-actions.pod:279 ../src/guestfs-actions.pod:417
4873 msgid "C<AUG_NO_LOAD> = 32"
4877 #: ../fish/guestfish-actions.pod:281
4878 msgid "Do not load the tree in L</aug-init>."
4882 #: ../fish/guestfish-actions.pod:285
4883 msgid "To close the handle, you can call L</aug-close>."
4887 #: ../fish/guestfish-actions.pod:287 ../src/guestfs-actions.pod:425
4888 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4892 #: ../fish/guestfish-actions.pod:289
4897 #: ../fish/guestfish-actions.pod:291
4900 " aug-insert augpath label true|false\n"
4905 #: ../fish/guestfish-actions.pod:293 ../src/guestfs-actions.pod:439
4907 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4908 "or after C<path> (depending on the boolean flag C<before>)."
4912 #: ../fish/guestfish-actions.pod:297 ../src/guestfs-actions.pod:443
4914 "C<path> must match exactly one existing node in the tree, and C<label> must "
4915 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4919 #: ../fish/guestfish-actions.pod:301
4924 #: ../fish/guestfish-actions.pod:303
4932 #: ../fish/guestfish-actions.pod:305 ../src/guestfs-actions.pod:456
4933 msgid "Load files into the tree."
4937 #: ../fish/guestfish-actions.pod:307 ../src/guestfs-actions.pod:458
4938 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4942 #: ../fish/guestfish-actions.pod:310
4947 #: ../fish/guestfish-actions.pod:312
4955 #: ../fish/guestfish-actions.pod:314
4957 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
4958 "resulting nodes into alphabetical order."
4962 #: ../fish/guestfish-actions.pod:317
4967 #: ../fish/guestfish-actions.pod:319
4970 " aug-match augpath\n"
4975 #: ../fish/guestfish-actions.pod:321 ../src/guestfs-actions.pod:486
4977 "Returns a list of paths which match the path expression C<path>. The "
4978 "returned paths are sufficiently qualified so that they match exactly one "
4979 "node in the current tree."
4983 #: ../fish/guestfish-actions.pod:325
4988 #: ../fish/guestfish-actions.pod:327
4991 " aug-mv src dest\n"
4996 #: ../fish/guestfish-actions.pod:329 ../src/guestfs-actions.pod:503
4998 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4999 "C<dest> is overwritten if it exists."
5003 #: ../fish/guestfish-actions.pod:332
5008 #: ../fish/guestfish-actions.pod:334
5016 #: ../fish/guestfish-actions.pod:336 ../src/guestfs-actions.pod:516
5017 msgid "Remove C<path> and all of its children."
5021 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:518
5022 msgid "On success this returns the number of entries which were removed."
5026 #: ../fish/guestfish-actions.pod:340
5031 #: ../fish/guestfish-actions.pod:342
5039 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:529
5040 msgid "This writes all pending changes to disk."
5044 #: ../fish/guestfish-actions.pod:346
5046 "The flags which were passed to L</aug-init> affect exactly how files are "
5051 #: ../fish/guestfish-actions.pod:349
5056 #: ../fish/guestfish-actions.pod:351
5059 " aug-set augpath val\n"
5064 #: ../fish/guestfish-actions.pod:353 ../src/guestfs-actions.pod:545
5065 msgid "Set the value associated with C<path> to C<val>."
5069 #: ../fish/guestfish-actions.pod:355
5071 "In the Augeas API, it is possible to clear a node by setting the value to "
5072 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5073 "this call. Instead you must use the L</aug-clear> call."
5077 #: ../fish/guestfish-actions.pod:360
5082 #: ../fish/guestfish-actions.pod:362
5085 " available 'groups ...'\n"
5090 #: ../fish/guestfish-actions.pod:364 ../src/guestfs-actions.pod:562
5092 "This command is used to check the availability of some groups of "
5093 "functionality in the appliance, which not all builds of the libguestfs "
5094 "appliance will be able to provide."
5098 #: ../fish/guestfish-actions.pod:368
5100 "The libguestfs groups, and the functions that those groups correspond to, "
5101 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5102 "runtime by calling L</available-all-groups>."
5106 #: ../fish/guestfish-actions.pod:373 ../src/guestfs-actions.pod:571
5108 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
5109 "\"]> would check for the availability of the Linux inotify functions and "
5110 "Augeas (configuration file editing) functions."
5114 #: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:576
5115 msgid "The command returns no error if I<all> requested groups are available."
5119 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:578
5121 "It fails with an error if one or more of the requested groups is unavailable "
5126 #: ../fish/guestfish-actions.pod:383 ../src/guestfs-actions.pod:581
5128 "If an unknown group name is included in the list of groups then an error is "
5133 #: ../fish/guestfish-actions.pod:386 ../src/guestfs-actions.pod:584
5138 #: ../fish/guestfish-actions.pod:392
5139 msgid "You must call L</launch> before calling this function."
5143 #: ../fish/guestfish-actions.pod:394 ../src/guestfs-actions.pod:592
5145 "The reason is because we don't know what groups are supported by the "
5146 "appliance/daemon until it is running and can be queried."
5150 #: ../fish/guestfish-actions.pod:400 ../src/guestfs-actions.pod:598
5152 "If a group of functions is available, this does not necessarily mean that "
5153 "they will work. You still have to check for errors when calling individual "
5154 "API functions even if they are available."
5158 #: ../fish/guestfish-actions.pod:407 ../src/guestfs-actions.pod:605
5160 "It is usually the job of distro packagers to build complete functionality "
5161 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5162 "with all requirements satisfied, will support everything."
5166 #: ../fish/guestfish-actions.pod:414
5168 "This call was added in version C<1.0.80>. In previous versions of "
5169 "libguestfs all you could do would be to speculatively execute a command to "
5170 "find out if the daemon implemented it. See also L</version>."
5174 #: ../fish/guestfish-actions.pod:421
5175 msgid "available-all-groups"
5179 #: ../fish/guestfish-actions.pod:423
5182 " available-all-groups\n"
5187 #: ../fish/guestfish-actions.pod:425
5189 "This command returns a list of all optional groups that this daemon knows "
5190 "about. Note this returns both supported and unsupported groups. To find "
5191 "out which ones the daemon can actually support you have to call L</"
5192 "available> on each member of the returned list."
5196 #: ../fish/guestfish-actions.pod:431
5197 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
5201 #: ../fish/guestfish-actions.pod:433
5206 #: ../fish/guestfish-actions.pod:435
5209 " base64-in (base64file|-) filename\n"
5214 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:649
5216 "This command uploads base64-encoded data from C<base64file> to C<filename>."
5220 #: ../fish/guestfish-actions.pod:440 ../fish/guestfish-actions.pod:449
5221 #: ../fish/guestfish-actions.pod:698 ../fish/guestfish-actions.pod:782
5222 #: ../fish/guestfish-actions.pod:803 ../fish/guestfish-actions.pod:902
5223 #: ../fish/guestfish-actions.pod:921 ../fish/guestfish-actions.pod:1295
5224 #: ../fish/guestfish-actions.pod:4742 ../fish/guestfish-actions.pod:4754
5225 #: ../fish/guestfish-actions.pod:4765 ../fish/guestfish-actions.pod:4776
5226 #: ../fish/guestfish-actions.pod:4828 ../fish/guestfish-actions.pod:4837
5227 #: ../fish/guestfish-actions.pod:4891 ../fish/guestfish-actions.pod:4914
5228 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
5232 #: ../fish/guestfish-actions.pod:442
5237 #: ../fish/guestfish-actions.pod:444
5240 " base64-out filename (base64file|-)\n"
5245 #: ../fish/guestfish-actions.pod:446 ../src/guestfs-actions.pod:663
5247 "This command downloads the contents of C<filename>, writing it out to local "
5248 "file C<base64file> encoded as base64."
5252 #: ../fish/guestfish-actions.pod:451
5253 msgid "blockdev-flushbufs"
5257 #: ../fish/guestfish-actions.pod:453
5260 " blockdev-flushbufs device\n"
5265 #: ../fish/guestfish-actions.pod:455 ../src/guestfs-actions.pod:676
5267 "This tells the kernel to flush internal buffers associated with C<device>."
5271 #: ../fish/guestfish-actions.pod:458 ../fish/guestfish-actions.pod:469
5272 #: ../fish/guestfish-actions.pod:478 ../fish/guestfish-actions.pod:488
5273 #: ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:513
5274 #: ../fish/guestfish-actions.pod:521 ../fish/guestfish-actions.pod:532
5275 #: ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:548
5276 #: ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:696
5277 #: ../src/guestfs-actions.pod:711 ../src/guestfs-actions.pod:727
5278 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:764
5279 #: ../src/guestfs-actions.pod:778 ../src/guestfs-actions.pod:796
5280 #: ../src/guestfs-actions.pod:810 ../src/guestfs-actions.pod:824
5281 msgid "This uses the L<blockdev(8)> command."
5285 #: ../fish/guestfish-actions.pod:460
5286 msgid "blockdev-getbsz"
5290 #: ../fish/guestfish-actions.pod:462
5293 " blockdev-getbsz device\n"
5298 #: ../fish/guestfish-actions.pod:464 ../src/guestfs-actions.pod:691
5299 msgid "This returns the block size of a device."
5303 #: ../fish/guestfish-actions.pod:466 ../fish/guestfish-actions.pod:529
5304 #: ../src/guestfs-actions.pod:693 ../src/guestfs-actions.pod:793
5306 "(Note this is different from both I<size in blocks> and I<filesystem block "
5311 #: ../fish/guestfish-actions.pod:471
5312 msgid "blockdev-getro"
5316 #: ../fish/guestfish-actions.pod:473
5319 " blockdev-getro device\n"
5324 #: ../fish/guestfish-actions.pod:475 ../src/guestfs-actions.pod:708
5326 "Returns a boolean indicating if the block device is read-only (true if read-"
5327 "only, false if not)."
5331 #: ../fish/guestfish-actions.pod:480
5332 msgid "blockdev-getsize64"
5336 #: ../fish/guestfish-actions.pod:482
5339 " blockdev-getsize64 device\n"
5344 #: ../fish/guestfish-actions.pod:484 ../src/guestfs-actions.pod:723
5345 msgid "This returns the size of the device in bytes."
5349 #: ../fish/guestfish-actions.pod:486
5350 msgid "See also L</blockdev-getsz>."
5354 #: ../fish/guestfish-actions.pod:490
5355 msgid "blockdev-getss"
5359 #: ../fish/guestfish-actions.pod:492
5362 " blockdev-getss device\n"
5367 #: ../fish/guestfish-actions.pod:494 ../src/guestfs-actions.pod:739
5369 "This returns the size of sectors on a block device. Usually 512, but can be "
5370 "larger for modern devices."
5374 #: ../fish/guestfish-actions.pod:497
5376 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
5380 #: ../fish/guestfish-actions.pod:502
5381 msgid "blockdev-getsz"
5385 #: ../fish/guestfish-actions.pod:504
5388 " blockdev-getsz device\n"
5393 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:757
5395 "This returns the size of the device in units of 512-byte sectors (even if "
5396 "the sectorsize isn't 512 bytes ... weird)."
5400 #: ../fish/guestfish-actions.pod:509
5402 "See also L</blockdev-getss> for the real sector size of the device, and L</"
5403 "blockdev-getsize64> for the more useful I<size in bytes>."
5407 #: ../fish/guestfish-actions.pod:515
5408 msgid "blockdev-rereadpt"
5412 #: ../fish/guestfish-actions.pod:517
5415 " blockdev-rereadpt device\n"
5420 #: ../fish/guestfish-actions.pod:519 ../src/guestfs-actions.pod:776
5421 msgid "Reread the partition table on C<device>."
5425 #: ../fish/guestfish-actions.pod:523
5426 msgid "blockdev-setbsz"
5430 #: ../fish/guestfish-actions.pod:525
5433 " blockdev-setbsz device blocksize\n"
5438 #: ../fish/guestfish-actions.pod:527 ../src/guestfs-actions.pod:791
5439 msgid "This sets the block size of a device."
5443 #: ../fish/guestfish-actions.pod:534
5444 msgid "blockdev-setro"
5448 #: ../fish/guestfish-actions.pod:536
5451 " blockdev-setro device\n"
5456 #: ../fish/guestfish-actions.pod:538 ../src/guestfs-actions.pod:808
5457 msgid "Sets the block device named C<device> to read-only."
5461 #: ../fish/guestfish-actions.pod:542
5462 msgid "blockdev-setrw"
5466 #: ../fish/guestfish-actions.pod:544
5469 " blockdev-setrw device\n"
5474 #: ../fish/guestfish-actions.pod:546 ../src/guestfs-actions.pod:822
5475 msgid "Sets the block device named C<device> to read-write."
5479 #: ../fish/guestfish-actions.pod:550
5480 msgid "btrfs-filesystem-resize"
5484 #: ../fish/guestfish-actions.pod:552
5487 " btrfs-filesystem-resize mountpoint [size:..]\n"
5492 #: ../fish/guestfish-actions.pod:554 ../src/guestfs-actions.pod:844
5493 msgid "This command resizes a btrfs filesystem."
5497 #: ../fish/guestfish-actions.pod:556 ../src/guestfs-actions.pod:846
5499 "Note that unlike other resize calls, the filesystem has to be mounted and "
5500 "the parameter is the mountpoint not the device (this is a requirement of "
5505 #: ../fish/guestfish-actions.pod:560 ../fish/guestfish-actions.pod:3489
5506 #: ../src/guestfs-actions.pod:850 ../src/guestfs-actions.pod:5336
5507 msgid "The optional parameters are:"
5511 #: ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:3493
5512 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:5340
5517 #: ../fish/guestfish-actions.pod:566 ../src/guestfs-actions.pod:856
5519 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
5520 "resized to the maximum size."
5524 #: ../fish/guestfish-actions.pod:571 ../src/guestfs-actions.pod:861
5525 msgid "See also L<btrfs(8)>."
5529 #: ../fish/guestfish-actions.pod:575
5530 msgid "case-sensitive-path"
5534 #: ../fish/guestfish-actions.pod:577
5537 " case-sensitive-path path\n"
5542 #: ../fish/guestfish-actions.pod:579 ../src/guestfs-actions.pod:895
5544 "This can be used to resolve case insensitive paths on a filesystem which is "
5545 "case sensitive. The use case is to resolve paths which you have read from "
5546 "Windows configuration files or the Windows Registry, to the true path."
5550 #: ../fish/guestfish-actions.pod:584 ../src/guestfs-actions.pod:900
5552 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5553 "(and probably others), which is that although the underlying filesystem is "
5554 "case-insensitive, the driver exports the filesystem to Linux as case-"
5559 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:905
5561 "One consequence of this is that special directories such as C<c:\\windows> "
5562 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5563 "precise details of how they were created. In Windows itself this would not "
5568 #: ../fish/guestfish-actions.pod:595 ../src/guestfs-actions.pod:911
5570 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
5575 #: ../fish/guestfish-actions.pod:598 ../src/guestfs-actions.pod:914
5577 "This function resolves the true case of each element in the path and returns "
5578 "the case-sensitive path."
5582 #: ../fish/guestfish-actions.pod:601
5584 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
5585 "WINDOWS/system32\"> (the exact return value would depend on details of how "
5586 "the directories were originally created under Windows)."
5590 #: ../fish/guestfish-actions.pod:606 ../src/guestfs-actions.pod:922
5591 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5595 #: ../fish/guestfish-actions.pod:609
5596 msgid "See also L</realpath>."
5600 #: ../fish/guestfish-actions.pod:611
5605 #: ../fish/guestfish-actions.pod:613
5613 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3909
5614 #: ../src/guestfs-actions.pod:938 ../src/guestfs-actions.pod:5979
5615 msgid "Return the contents of the file named C<path>."
5619 #: ../fish/guestfish-actions.pod:617
5621 "Note that this function cannot correctly handle binary files (specifically, "
5622 "files containing C<\\0> character which is treated as end of string). For "
5623 "those you need to use the L</read-file> or L</download> functions which have "
5624 "a more complex interface."
5628 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:757
5629 #: ../fish/guestfish-actions.pod:769 ../fish/guestfish-actions.pod:980
5630 #: ../fish/guestfish-actions.pod:990 ../fish/guestfish-actions.pod:1057
5631 #: ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1259
5632 #: ../fish/guestfish-actions.pod:1572 ../fish/guestfish-actions.pod:1582
5633 #: ../fish/guestfish-actions.pod:1632 ../fish/guestfish-actions.pod:1647
5634 #: ../fish/guestfish-actions.pod:1657 ../fish/guestfish-actions.pod:1676
5635 #: ../fish/guestfish-actions.pod:3779 ../fish/guestfish-actions.pod:3794
5636 #: ../fish/guestfish-actions.pod:3870 ../fish/guestfish-actions.pod:3887
5637 #: ../fish/guestfish-actions.pod:3902 ../fish/guestfish-actions.pod:4583
5638 #: ../fish/guestfish-actions.pod:4629 ../fish/guestfish-actions.pod:4714
5639 #: ../fish/guestfish-actions.pod:4729 ../fish/guestfish-actions.pod:5135
5640 #: ../fish/guestfish-actions.pod:5147 ../fish/guestfish-actions.pod:5165
5641 #: ../fish/guestfish-actions.pod:5182 ../fish/guestfish-actions.pod:5192
5642 #: ../fish/guestfish-actions.pod:5249 ../fish/guestfish-actions.pod:5259
5643 #: ../fish/guestfish-actions.pod:5288 ../fish/guestfish-actions.pod:5298
5644 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:1127
5645 #: ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1550
5646 #: ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1672
5647 #: ../src/guestfs-actions.pod:1691 ../src/guestfs-actions.pod:1937
5648 #: ../src/guestfs-actions.pod:2417 ../src/guestfs-actions.pod:2436
5649 #: ../src/guestfs-actions.pod:2501 ../src/guestfs-actions.pod:2525
5650 #: ../src/guestfs-actions.pod:2542 ../src/guestfs-actions.pod:2571
5651 #: ../src/guestfs-actions.pod:5761 ../src/guestfs-actions.pod:5787
5652 #: ../src/guestfs-actions.pod:5918 ../src/guestfs-actions.pod:5944
5653 #: ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:6933
5654 #: ../src/guestfs-actions.pod:6988 ../src/guestfs-actions.pod:7134
5655 #: ../src/guestfs-actions.pod:7158 ../src/guestfs-actions.pod:7823
5656 #: ../src/guestfs-actions.pod:7843 ../src/guestfs-actions.pod:7876
5657 #: ../src/guestfs-actions.pod:7895 ../src/guestfs-actions.pod:7914
5658 #: ../src/guestfs-actions.pod:8008 ../src/guestfs-actions.pod:8027
5659 #: ../src/guestfs-actions.pod:8073 ../src/guestfs-actions.pod:8092
5661 "Because of the message protocol, there is a transfer limit of somewhere "
5662 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5666 #: ../fish/guestfish-actions.pod:625
5671 #: ../fish/guestfish-actions.pod:627
5674 " checksum csumtype path\n"
5679 #: ../fish/guestfish-actions.pod:629 ../src/guestfs-actions.pod:960
5681 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5685 #: ../fish/guestfish-actions.pod:632 ../src/guestfs-actions.pod:963
5687 "The type of checksum to compute is given by the C<csumtype> parameter which "
5688 "must have one of the following values:"
5692 #: ../fish/guestfish-actions.pod:637 ../src/guestfs-actions.pod:968
5697 #: ../fish/guestfish-actions.pod:639 ../src/guestfs-actions.pod:970
5699 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5704 #: ../fish/guestfish-actions.pod:642 ../src/guestfs-actions.pod:973
5709 #: ../fish/guestfish-actions.pod:644 ../src/guestfs-actions.pod:975
5710 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5714 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:977
5719 #: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:979
5720 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5724 #: ../fish/guestfish-actions.pod:650 ../src/guestfs-actions.pod:981
5729 #: ../fish/guestfish-actions.pod:652 ../src/guestfs-actions.pod:983
5730 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5734 #: ../fish/guestfish-actions.pod:654 ../src/guestfs-actions.pod:985
5739 #: ../fish/guestfish-actions.pod:656 ../src/guestfs-actions.pod:987
5740 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5744 #: ../fish/guestfish-actions.pod:658 ../src/guestfs-actions.pod:989
5749 #: ../fish/guestfish-actions.pod:660 ../src/guestfs-actions.pod:991
5750 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5754 #: ../fish/guestfish-actions.pod:662 ../src/guestfs-actions.pod:993
5759 #: ../fish/guestfish-actions.pod:664 ../src/guestfs-actions.pod:995
5760 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5764 #: ../fish/guestfish-actions.pod:668 ../src/guestfs-actions.pod:999
5765 msgid "The checksum is returned as a printable string."
5769 #: ../fish/guestfish-actions.pod:670
5770 msgid "To get the checksum for a device, use L</checksum-device>."
5774 #: ../fish/guestfish-actions.pod:672
5775 msgid "To get the checksums for many files, use L</checksums-out>."
5779 #: ../fish/guestfish-actions.pod:674
5780 msgid "checksum-device"
5784 #: ../fish/guestfish-actions.pod:676
5787 " checksum-device csumtype device\n"
5792 #: ../fish/guestfish-actions.pod:678
5794 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5795 "device named C<device>. For the types of checksums supported see the L</"
5796 "checksum> command."
5800 #: ../fish/guestfish-actions.pod:682
5801 msgid "checksums-out"
5805 #: ../fish/guestfish-actions.pod:684
5808 " checksums-out csumtype directory (sumsfile|-)\n"
5813 #: ../fish/guestfish-actions.pod:686 ../src/guestfs-actions.pod:1034
5815 "This command computes the checksums of all regular files in C<directory> and "
5816 "then emits a list of those checksums to the local output file C<sumsfile>."
5820 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1038
5822 "This can be used for verifying the integrity of a virtual machine. However "
5823 "to be properly secure you should pay attention to the output of the checksum "
5824 "command (it uses the ones from GNU coreutils). In particular when the "
5825 "filename is not printable, coreutils uses a special backslash syntax. For "
5826 "more information, see the GNU coreutils info file."
5830 #: ../fish/guestfish-actions.pod:700
5835 #: ../fish/guestfish-actions.pod:702
5838 " chmod mode path\n"
5843 #: ../fish/guestfish-actions.pod:704 ../src/guestfs-actions.pod:1057
5845 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5850 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1060
5852 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5853 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5858 #: ../fish/guestfish-actions.pod:711 ../fish/guestfish-actions.pod:3132
5859 #: ../fish/guestfish-actions.pod:3271 ../fish/guestfish-actions.pod:3281
5860 #: ../fish/guestfish-actions.pod:3291 ../src/guestfs-actions.pod:1064
5861 #: ../src/guestfs-actions.pod:4733 ../src/guestfs-actions.pod:4942
5862 #: ../src/guestfs-actions.pod:4961 ../src/guestfs-actions.pod:4980
5863 msgid "The mode actually set is affected by the umask."
5867 #: ../fish/guestfish-actions.pod:713
5872 #: ../fish/guestfish-actions.pod:715
5875 " chown owner group path\n"
5880 #: ../fish/guestfish-actions.pod:717 ../src/guestfs-actions.pod:1078
5881 msgid "Change the file owner to C<owner> and group to C<group>."
5885 #: ../fish/guestfish-actions.pod:719 ../fish/guestfish-actions.pod:2567
5886 #: ../src/guestfs-actions.pod:1080 ../src/guestfs-actions.pod:3804
5888 "Only numeric uid and gid are supported. If you want to use names, you will "
5889 "need to locate and parse the password file yourself (Augeas support makes "
5890 "this relatively easy)."
5894 #: ../fish/guestfish-actions.pod:723
5899 #: ../fish/guestfish-actions.pod:725
5902 " command 'arguments ...'\n"
5907 #: ../fish/guestfish-actions.pod:727 ../src/guestfs-actions.pod:1094
5909 "This call runs a command from the guest filesystem. The filesystem must be "
5910 "mounted, and must contain a compatible operating system (ie. something "
5911 "Linux, with the same or compatible processor architecture)."
5915 #: ../fish/guestfish-actions.pod:732
5917 "The single parameter is an argv-style list of arguments. The first element "
5918 "is the name of the program to run. Subsequent elements are parameters. The "
5919 "list must be non-empty (ie. must contain a program name). Note that the "
5920 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
5924 #: ../fish/guestfish-actions.pod:739 ../src/guestfs-actions.pod:1106
5925 msgid "The return value is anything printed to I<stdout> by the command."
5929 #: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1109
5931 "If the command returns a non-zero exit status, then this function returns an "
5932 "error message. The error message string is the content of I<stderr> from "
5937 #: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1113
5939 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5940 "bin>. If you require a program from another location, you should provide "
5941 "the full path in the first parameter."
5945 #: ../fish/guestfish-actions.pod:751 ../src/guestfs-actions.pod:1118
5947 "Shared libraries and data files required by the program must be available on "
5948 "filesystems which are mounted in the correct places. It is the caller's "
5949 "responsibility to ensure all filesystems that are needed are mounted at the "
5954 #: ../fish/guestfish-actions.pod:760
5955 msgid "command-lines"
5959 #: ../fish/guestfish-actions.pod:762
5962 " command-lines 'arguments ...'\n"
5967 #: ../fish/guestfish-actions.pod:764
5969 "This is the same as L</command>, but splits the result into a list of lines."
5973 #: ../fish/guestfish-actions.pod:767
5974 msgid "See also: L</sh-lines>"
5978 #: ../fish/guestfish-actions.pod:772
5979 msgid "compress-device-out"
5983 #: ../fish/guestfish-actions.pod:774
5986 " compress-device-out ctype device (zdevice|-) [level:..]\n"
5991 #: ../fish/guestfish-actions.pod:776 ../src/guestfs-actions.pod:1168
5993 "This command compresses C<device> and writes it out to the local file "
5998 #: ../fish/guestfish-actions.pod:779
6000 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
6005 #: ../fish/guestfish-actions.pod:786
6006 msgid "compress-out"
6010 #: ../fish/guestfish-actions.pod:788
6013 " compress-out ctype file (zfile|-) [level:..]\n"
6018 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1218
6020 "This command compresses C<file> and writes it out to the local file C<zfile>."
6024 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1221
6026 "The compression program used is controlled by the C<ctype> parameter. "
6027 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
6028 "Some compression types may not be supported by particular builds of "
6029 "libguestfs, in which case you will get an error containing the substring "
6030 "\"not supported\"."
6034 #: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1227
6036 "The optional C<level> parameter controls compression level. The meaning and "
6037 "default for this parameter depends on the compression program being used."
6041 #: ../fish/guestfish-actions.pod:807
6046 #: ../fish/guestfish-actions.pod:809
6049 " config qemuparam qemuvalue\n"
6054 #: ../fish/guestfish-actions.pod:811 ../src/guestfs-actions.pod:1266
6056 "This can be used to add arbitrary qemu command line parameters of the form "
6057 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
6058 "setting some parameters which would interfere with parameters that we use."
6062 #: ../fish/guestfish-actions.pod:816 ../src/guestfs-actions.pod:1271
6063 msgid "The first character of C<param> string must be a C<-> (dash)."
6067 #: ../fish/guestfish-actions.pod:818 ../src/guestfs-actions.pod:1273
6068 msgid "C<value> can be NULL."
6072 #: ../fish/guestfish-actions.pod:820
6077 #: ../fish/guestfish-actions.pod:822
6080 " copy-size src dest size\n"
6085 #: ../fish/guestfish-actions.pod:824 ../src/guestfs-actions.pod:1287
6087 "This command copies exactly C<size> bytes from one source device or file "
6088 "C<src> to another destination device or file C<dest>."
6092 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1290
6094 "Note this will fail if the source is too short or if the destination is not "
6099 #: ../fish/guestfish-actions.pod:830
6104 #: ../fish/guestfish-actions.pod:832
6112 #: ../fish/guestfish-actions.pod:834 ../src/guestfs-actions.pod:1309
6114 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6115 "destination filename or destination directory."
6119 #: ../fish/guestfish-actions.pod:837
6124 #: ../fish/guestfish-actions.pod:839
6132 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1323
6134 "This copies a file or directory from C<src> to C<dest> recursively using the "
6139 #: ../fish/guestfish-actions.pod:844
6144 #: ../fish/guestfish-actions.pod:846
6152 #: ../fish/guestfish-actions.pod:848 ../src/guestfs-actions.pod:1337
6154 "This command copies from one source device or file C<src> to another "
6155 "destination device or file C<dest>. Normally you would use this to copy to "
6156 "or from a device or partition, for example to duplicate a filesystem."
6160 #: ../fish/guestfish-actions.pod:853
6162 "If the destination is a device, it must be as large or larger than the "
6163 "source file or device, otherwise the copy will fail. This command cannot do "
6164 "partial copies (see L</copy-size>)."
6168 #: ../fish/guestfish-actions.pod:857
6173 #: ../fish/guestfish-actions.pod:859
6181 #: ../fish/guestfish-actions.pod:861 ../src/guestfs-actions.pod:1355
6182 msgid "This command runs the C<df> command to report disk space used."
6186 #: ../fish/guestfish-actions.pod:863 ../fish/guestfish-actions.pod:874
6188 "This command is mostly useful for interactive sessions. It is I<not> "
6189 "intended that you try to parse the output string. Use L</statvfs> from "
6194 #: ../fish/guestfish-actions.pod:867
6199 #: ../fish/guestfish-actions.pod:869
6207 #: ../fish/guestfish-actions.pod:871 ../src/guestfs-actions.pod:1371
6209 "This command runs the C<df -h> command to report disk space used in human-"
6214 #: ../fish/guestfish-actions.pod:878
6219 #: ../fish/guestfish-actions.pod:880
6227 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1388
6229 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6230 "This is sometimes useful for extended debugging of problems."
6234 #: ../fish/guestfish-actions.pod:886
6236 "Another way to get the same information is to enable verbose messages with "
6237 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
6238 "before running the program."
6242 #: ../fish/guestfish-actions.pod:891
6247 #: ../fish/guestfish-actions.pod:893
6250 " download remotefilename (filename|-)\n"
6255 #: ../fish/guestfish-actions.pod:895 ../fish/guestfish-actions.pod:908
6256 #: ../src/guestfs-actions.pod:1409 ../src/guestfs-actions.pod:1434
6258 "Download file C<remotefilename> and save it as C<filename> on the local "
6263 #: ../fish/guestfish-actions.pod:898 ../fish/guestfish-actions.pod:4887
6264 #: ../src/guestfs-actions.pod:1412 ../src/guestfs-actions.pod:7393
6265 msgid "C<filename> can also be a named pipe."
6269 #: ../fish/guestfish-actions.pod:900
6270 msgid "See also L</upload>, L</cat>."
6274 #: ../fish/guestfish-actions.pod:904
6275 msgid "download-offset"
6279 #: ../fish/guestfish-actions.pod:906
6282 " download-offset remotefilename (filename|-) offset size\n"
6287 #: ../fish/guestfish-actions.pod:911 ../src/guestfs-actions.pod:1437
6289 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6290 "region must be within the file or device)."
6294 #: ../fish/guestfish-actions.pod:914
6296 "Note that there is no limit on the amount of data that can be downloaded "
6297 "with this call, unlike with L</pread>, and this call always reads the full "
6298 "amount unless an error occurs."
6302 #: ../fish/guestfish-actions.pod:919
6303 msgid "See also L</download>, L</pread>."
6307 #: ../fish/guestfish-actions.pod:923
6312 #: ../fish/guestfish-actions.pod:925
6315 " drop-caches whattodrop\n"
6320 #: ../fish/guestfish-actions.pod:927 ../src/guestfs-actions.pod:1462
6322 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6323 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6324 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6328 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1467
6329 msgid "Setting C<whattodrop> to 3 should drop everything."
6333 #: ../fish/guestfish-actions.pod:934 ../src/guestfs-actions.pod:1469
6335 "This automatically calls L<sync(2)> before the operation, so that the "
6336 "maximum guest memory is freed."
6340 #: ../fish/guestfish-actions.pod:937
6345 #: ../fish/guestfish-actions.pod:939
6353 #: ../fish/guestfish-actions.pod:941 ../src/guestfs-actions.pod:1482
6355 "This command runs the C<du -s> command to estimate file space usage for "
6360 #: ../fish/guestfish-actions.pod:944 ../src/guestfs-actions.pod:1485
6362 "C<path> can be a file or a directory. If C<path> is a directory then the "
6363 "estimate includes the contents of the directory and all subdirectories "
6368 #: ../fish/guestfish-actions.pod:948 ../src/guestfs-actions.pod:1489
6370 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6374 #: ../fish/guestfish-actions.pod:951
6379 #: ../fish/guestfish-actions.pod:953
6382 " e2fsck-f device\n"
6387 #: ../fish/guestfish-actions.pod:955 ../src/guestfs-actions.pod:1507
6389 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6390 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
6395 #: ../fish/guestfish-actions.pod:959
6397 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
6398 "should use L</fsck>."
6402 #: ../fish/guestfish-actions.pod:962
6407 #: ../fish/guestfish-actions.pod:964
6410 " echo-daemon 'words ...'\n"
6415 #: ../fish/guestfish-actions.pod:966 ../src/guestfs-actions.pod:1524
6417 "This command concatenates the list of C<words> passed with single spaces "
6418 "between them and returns the resulting string."
6422 #: ../fish/guestfish-actions.pod:969 ../src/guestfs-actions.pod:1527
6423 msgid "You can use this command to test the connection through to the daemon."
6427 #: ../fish/guestfish-actions.pod:971
6428 msgid "See also L</ping-daemon>."
6432 #: ../fish/guestfish-actions.pod:973
6437 #: ../fish/guestfish-actions.pod:975
6440 " egrep regex path\n"
6445 #: ../fish/guestfish-actions.pod:977 ../src/guestfs-actions.pod:1543
6447 "This calls the external C<egrep> program and returns the matching lines."
6451 #: ../fish/guestfish-actions.pod:983
6456 #: ../fish/guestfish-actions.pod:985
6459 " egrepi regex path\n"
6464 #: ../fish/guestfish-actions.pod:987 ../src/guestfs-actions.pod:1562
6466 "This calls the external C<egrep -i> program and returns the matching lines."
6470 #: ../fish/guestfish-actions.pod:993
6475 #: ../fish/guestfish-actions.pod:995
6478 " equal file1 file2\n"
6483 #: ../fish/guestfish-actions.pod:997 ../src/guestfs-actions.pod:1581
6485 "This compares the two files C<file1> and C<file2> and returns true if their "
6486 "content is exactly equal, or false otherwise."
6490 #: ../fish/guestfish-actions.pod:1000 ../src/guestfs-actions.pod:1584
6491 msgid "The external L<cmp(1)> program is used for the comparison."
6495 #: ../fish/guestfish-actions.pod:1002
6500 #: ../fish/guestfish-actions.pod:1004
6508 #: ../fish/guestfish-actions.pod:1006 ../src/guestfs-actions.pod:1596
6510 "This returns C<true> if and only if there is a file, directory (or anything) "
6511 "with the given C<path> name."
6515 #: ../fish/guestfish-actions.pod:1009
6516 msgid "See also L</is-file>, L</is-dir>, L</stat>."
6520 #: ../fish/guestfish-actions.pod:1011
6525 #: ../fish/guestfish-actions.pod:1013
6528 " fallocate path len\n"
6533 #: ../fish/guestfish-actions.pod:1015 ../fish/guestfish-actions.pod:1034
6534 #: ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:1638
6536 "This command preallocates a file (containing zero bytes) named C<path> of "
6537 "size C<len> bytes. If the file exists already, it is overwritten."
6541 #: ../fish/guestfish-actions.pod:1019 ../src/guestfs-actions.pod:1623
6543 "Do not confuse this with the guestfish-specific C<alloc> command which "
6544 "allocates a file in the host and attaches it as a device."
6548 #: ../fish/guestfish-actions.pod:1023
6550 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
6555 #: ../fish/guestfish-actions.pod:1030
6560 #: ../fish/guestfish-actions.pod:1032
6563 " fallocate64 path len\n"
6568 #: ../fish/guestfish-actions.pod:1038
6570 "Note that this call allocates disk blocks for the file. To create a sparse "
6571 "file use L</truncate-size> instead."
6575 #: ../fish/guestfish-actions.pod:1041
6577 "The deprecated call L</fallocate> does the same, but owing to an oversight "
6578 "it only allowed 30 bit lengths to be specified, effectively limiting the "
6579 "maximum size of files created through that call to 1GB."
6583 #: ../fish/guestfish-actions.pod:1046 ../src/guestfs-actions.pod:1650
6585 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6586 "commands which create a file in the host and attach it as a device."
6590 #: ../fish/guestfish-actions.pod:1050
6595 #: ../fish/guestfish-actions.pod:1052
6598 " fgrep pattern path\n"
6603 #: ../fish/guestfish-actions.pod:1054 ../src/guestfs-actions.pod:1665
6605 "This calls the external C<fgrep> program and returns the matching lines."
6609 #: ../fish/guestfish-actions.pod:1060
6614 #: ../fish/guestfish-actions.pod:1062
6617 " fgrepi pattern path\n"
6622 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1684
6624 "This calls the external C<fgrep -i> program and returns the matching lines."
6628 #: ../fish/guestfish-actions.pod:1070
6633 #: ../fish/guestfish-actions.pod:1072
6641 #: ../fish/guestfish-actions.pod:1074 ../src/guestfs-actions.pod:1702
6643 "This call uses the standard L<file(1)> command to determine the type or "
6644 "contents of the file."
6648 #: ../fish/guestfish-actions.pod:1077 ../src/guestfs-actions.pod:1705
6650 "This call will also transparently look inside various types of compressed "
6655 #: ../fish/guestfish-actions.pod:1080 ../src/guestfs-actions.pod:1708
6657 "The exact command which runs is C<file -zb path>. Note in particular that "
6658 "the filename is not prepended to the output (the I<-b> option)."
6662 #: ../fish/guestfish-actions.pod:1084 ../src/guestfs-actions.pod:1712
6664 "The output depends on the output of the underlying L<file(1)> command and it "
6665 "can change in future in ways beyond our control. In other words, the output "
6666 "is not guaranteed by the ABI."
6670 #: ../fish/guestfish-actions.pod:1088
6672 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
6673 "(etc), L</is-zero>."
6677 #: ../fish/guestfish-actions.pod:1091
6678 msgid "file-architecture"
6682 #: ../fish/guestfish-actions.pod:1093
6685 " file-architecture filename\n"
6690 #: ../fish/guestfish-actions.pod:1095 ../src/guestfs-actions.pod:1730
6692 "This detects the architecture of the binary C<filename>, and returns it if "
6697 #: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1733
6698 msgid "Currently defined architectures are:"
6702 #: ../fish/guestfish-actions.pod:1102 ../src/guestfs-actions.pod:1737
6707 #: ../fish/guestfish-actions.pod:1104 ../src/guestfs-actions.pod:1739
6709 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6710 "irrespective of the precise processor requirements of the binary."
6714 #: ../fish/guestfish-actions.pod:1107 ../src/guestfs-actions.pod:1742
6719 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1744
6720 msgid "64 bit x86-64."
6724 #: ../fish/guestfish-actions.pod:1111 ../src/guestfs-actions.pod:1746
6729 #: ../fish/guestfish-actions.pod:1113 ../src/guestfs-actions.pod:1748
6730 msgid "32 bit SPARC."
6734 #: ../fish/guestfish-actions.pod:1115 ../src/guestfs-actions.pod:1750
6739 #: ../fish/guestfish-actions.pod:1117 ../src/guestfs-actions.pod:1752
6740 msgid "64 bit SPARC V9 and above."
6744 #: ../fish/guestfish-actions.pod:1119 ../src/guestfs-actions.pod:1754
6749 #: ../fish/guestfish-actions.pod:1121 ../src/guestfs-actions.pod:1756
6750 msgid "Intel Itanium."
6754 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1758
6759 #: ../fish/guestfish-actions.pod:1125 ../src/guestfs-actions.pod:1760
6760 msgid "32 bit Power PC."
6764 #: ../fish/guestfish-actions.pod:1127 ../src/guestfs-actions.pod:1762
6769 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1764
6770 msgid "64 bit Power PC."
6774 #: ../fish/guestfish-actions.pod:1133 ../src/guestfs-actions.pod:1768
6775 msgid "Libguestfs may return other architecture strings in future."
6779 #: ../fish/guestfish-actions.pod:1135 ../src/guestfs-actions.pod:1770
6780 msgid "The function works on at least the following types of files:"
6784 #: ../fish/guestfish-actions.pod:1141 ../src/guestfs-actions.pod:1776
6785 msgid "many types of Un*x and Linux binary"
6789 #: ../fish/guestfish-actions.pod:1145 ../src/guestfs-actions.pod:1780
6790 msgid "many types of Un*x and Linux shared library"
6794 #: ../fish/guestfish-actions.pod:1149 ../src/guestfs-actions.pod:1784
6795 msgid "Windows Win32 and Win64 binaries"
6799 #: ../fish/guestfish-actions.pod:1153 ../src/guestfs-actions.pod:1788
6800 msgid "Windows Win32 and Win64 DLLs"
6804 #: ../fish/guestfish-actions.pod:1155 ../src/guestfs-actions.pod:1790
6805 msgid "Win32 binaries and DLLs return C<i386>."
6809 #: ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1792
6810 msgid "Win64 binaries and DLLs return C<x86_64>."
6814 #: ../fish/guestfish-actions.pod:1161 ../src/guestfs-actions.pod:1796
6815 msgid "Linux kernel modules"
6819 #: ../fish/guestfish-actions.pod:1165 ../src/guestfs-actions.pod:1800
6820 msgid "Linux new-style initrd images"
6824 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1804
6825 msgid "some non-x86 Linux vmlinuz kernels"
6829 #: ../fish/guestfish-actions.pod:1173 ../src/guestfs-actions.pod:1808
6830 msgid "What it can't do currently:"
6834 #: ../fish/guestfish-actions.pod:1179 ../src/guestfs-actions.pod:1814
6835 msgid "static libraries (libfoo.a)"
6839 #: ../fish/guestfish-actions.pod:1183 ../src/guestfs-actions.pod:1818
6840 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6844 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1822
6845 msgid "x86 Linux vmlinuz kernels"
6849 #: ../fish/guestfish-actions.pod:1189 ../src/guestfs-actions.pod:1824
6851 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6852 "compressed code, and are horribly hard to unpack. If you want to find the "
6853 "architecture of a kernel, use the architecture of the associated initrd or "
6854 "kernel module(s) instead."
6858 #: ../fish/guestfish-actions.pod:1196
6863 #: ../fish/guestfish-actions.pod:1198
6871 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:1842
6872 msgid "This command returns the size of C<file> in bytes."
6876 #: ../fish/guestfish-actions.pod:1202
6878 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
6879 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
6883 #: ../fish/guestfish-actions.pod:1206
6888 #: ../fish/guestfish-actions.pod:1208
6891 " fill c len path\n"
6896 #: ../fish/guestfish-actions.pod:1210 ../src/guestfs-actions.pod:1860
6898 "This command creates a new file called C<path>. The initial content of the "
6899 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6904 #: ../fish/guestfish-actions.pod:1214
6906 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6907 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
6912 #: ../fish/guestfish-actions.pod:1219
6913 msgid "fill-pattern"
6917 #: ../fish/guestfish-actions.pod:1221
6920 " fill-pattern pattern len path\n"
6925 #: ../fish/guestfish-actions.pod:1223
6927 "This function is like L</fill> except that it creates a new file of length "
6928 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
6929 "is truncated if necessary to ensure the length of the file is exactly C<len> "
6934 #: ../fish/guestfish-actions.pod:1228
6939 #: ../fish/guestfish-actions.pod:1230
6947 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:1906
6949 "This command lists out all files and directories, recursively, starting at "
6950 "C<directory>. It is essentially equivalent to running the shell command "
6951 "C<find directory -print> but some post-processing happens on the output, "
6956 #: ../fish/guestfish-actions.pod:1237 ../src/guestfs-actions.pod:1911
6958 "This returns a list of strings I<without any prefix>. Thus if the directory "
6963 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:1914
6973 #: ../fish/guestfish-actions.pod:1244
6974 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
6978 #: ../fish/guestfish-actions.pod:1247 ../src/guestfs-actions.pod:1921
6989 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:1926
6990 msgid "If C<directory> is not a directory, then this command returns an error."
6994 #: ../fish/guestfish-actions.pod:1255 ../src/guestfs-actions.pod:1929
6995 msgid "The returned list is sorted."
6999 #: ../fish/guestfish-actions.pod:1257
7000 msgid "See also L</find0>."
7004 #: ../fish/guestfish-actions.pod:1262
7009 #: ../fish/guestfish-actions.pod:1264
7012 " find0 directory (files|-)\n"
7017 #: ../fish/guestfish-actions.pod:1266 ../src/guestfs-actions.pod:1949
7019 "This command lists out all files and directories, recursively, starting at "
7020 "C<directory>, placing the resulting list in the external file called "
7025 #: ../fish/guestfish-actions.pod:1270
7027 "This command works the same way as L</find> with the following exceptions:"
7031 #: ../fish/guestfish-actions.pod:1277 ../src/guestfs-actions.pod:1960
7032 msgid "The resulting list is written to an external file."
7036 #: ../fish/guestfish-actions.pod:1281 ../src/guestfs-actions.pod:1964
7038 "Items (filenames) in the result are separated by C<\\0> characters. See "
7039 "L<find(1)> option I<-print0>."
7043 #: ../fish/guestfish-actions.pod:1286 ../src/guestfs-actions.pod:1969
7044 msgid "This command is not limited in the number of names that it can return."
7048 #: ../fish/guestfish-actions.pod:1291 ../src/guestfs-actions.pod:1974
7049 msgid "The result list is not sorted."
7053 #: ../fish/guestfish-actions.pod:1297
7054 msgid "findfs-label"
7058 #: ../fish/guestfish-actions.pod:1299
7061 " findfs-label label\n"
7066 #: ../fish/guestfish-actions.pod:1301 ../src/guestfs-actions.pod:1988
7068 "This command searches the filesystems and returns the one which has the "
7069 "given label. An error is returned if no such filesystem can be found."
7073 #: ../fish/guestfish-actions.pod:1305
7074 msgid "To find the label of a filesystem, use L</vfs-label>."
7078 #: ../fish/guestfish-actions.pod:1307
7083 #: ../fish/guestfish-actions.pod:1309
7086 " findfs-uuid uuid\n"
7091 #: ../fish/guestfish-actions.pod:1311 ../src/guestfs-actions.pod:2005
7093 "This command searches the filesystems and returns the one which has the "
7094 "given UUID. An error is returned if no such filesystem can be found."
7098 #: ../fish/guestfish-actions.pod:1315
7099 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
7103 #: ../fish/guestfish-actions.pod:1317
7108 #: ../fish/guestfish-actions.pod:1319
7111 " fsck fstype device\n"
7116 #: ../fish/guestfish-actions.pod:1321 ../src/guestfs-actions.pod:2023
7118 "This runs the filesystem checker (fsck) on C<device> which should have "
7119 "filesystem type C<fstype>."
7123 #: ../fish/guestfish-actions.pod:1324 ../src/guestfs-actions.pod:2026
7125 "The returned integer is the status. See L<fsck(8)> for the list of status "
7126 "codes from C<fsck>."
7130 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2035
7131 msgid "Multiple status codes can be summed together."
7135 #: ../fish/guestfish-actions.pod:1337 ../src/guestfs-actions.pod:2039
7137 "A non-zero return code can mean \"success\", for example if errors have been "
7138 "corrected on the filesystem."
7142 #: ../fish/guestfish-actions.pod:1342 ../src/guestfs-actions.pod:2044
7143 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7147 #: ../fish/guestfish-actions.pod:1347 ../src/guestfs-actions.pod:2049
7149 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7153 #: ../fish/guestfish-actions.pod:1349
7158 #: ../fish/guestfish-actions.pod:1351
7166 #: ../fish/guestfish-actions.pod:1353 ../src/guestfs-actions.pod:2060
7168 "Return the additional kernel options which are added to the guest kernel "
7173 #: ../fish/guestfish-actions.pod:1356 ../src/guestfs-actions.pod:2063
7174 msgid "If C<NULL> then no options are added."
7178 #: ../fish/guestfish-actions.pod:1358
7179 msgid "get-attach-method"
7183 #: ../fish/guestfish-actions.pod:1360
7186 " get-attach-method\n"
7191 #: ../fish/guestfish-actions.pod:1362
7192 msgid "Return the current attach method. See L</set-attach-method>."
7196 #: ../fish/guestfish-actions.pod:1364
7197 msgid "get-autosync"
7201 #: ../fish/guestfish-actions.pod:1366
7209 #: ../fish/guestfish-actions.pod:1368 ../src/guestfs-actions.pod:2088
7210 msgid "Get the autosync flag."
7214 #: ../fish/guestfish-actions.pod:1370
7219 #: ../fish/guestfish-actions.pod:1372
7227 #: ../fish/guestfish-actions.pod:1374 ../src/guestfs-actions.pod:2099
7228 msgid "Return the direct appliance mode flag."
7232 #: ../fish/guestfish-actions.pod:1376
7237 #: ../fish/guestfish-actions.pod:1378
7240 " get-e2label device\n"
7245 #: ../fish/guestfish-actions.pod:1380 ../src/guestfs-actions.pod:2118
7247 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7251 #: ../fish/guestfish-actions.pod:1383
7253 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
7258 #: ../fish/guestfish-actions.pod:1390
7263 #: ../fish/guestfish-actions.pod:1392
7266 " get-e2uuid device\n"
7271 #: ../fish/guestfish-actions.pod:1394 ../src/guestfs-actions.pod:2139
7273 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7277 #: ../fish/guestfish-actions.pod:1397
7279 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
7284 #: ../fish/guestfish-actions.pod:1404
7289 #: ../fish/guestfish-actions.pod:1406
7297 #: ../fish/guestfish-actions.pod:1408 ../src/guestfs-actions.pod:2152
7299 "This gets the memory size in megabytes allocated to the qemu subprocess."
7303 #: ../fish/guestfish-actions.pod:1411
7305 "If L</set-memsize> was not called on this handle, and if "
7306 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7307 "value for memsize."
7311 #: ../fish/guestfish-actions.pod:1415 ../fish/guestfish-actions.pod:1472
7312 #: ../fish/guestfish-actions.pod:4235 ../fish/guestfish-actions.pod:4337
7313 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:2251
7314 #: ../src/guestfs-actions.pod:6440 ../src/guestfs-actions.pod:6566
7316 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7320 #: ../fish/guestfish-actions.pod:1418
7325 #: ../fish/guestfish-actions.pod:1420
7333 #: ../fish/guestfish-actions.pod:1422 ../src/guestfs-actions.pod:2171
7334 msgid "This returns the enable network flag."
7338 #: ../fish/guestfish-actions.pod:1424
7343 #: ../fish/guestfish-actions.pod:1426
7351 #: ../fish/guestfish-actions.pod:1428 ../src/guestfs-actions.pod:2182
7352 msgid "Return the current search path."
7356 #: ../fish/guestfish-actions.pod:1430 ../src/guestfs-actions.pod:2184
7358 "This is always non-NULL. If it wasn't set already, then this will return "
7363 #: ../fish/guestfish-actions.pod:1433
7368 #: ../fish/guestfish-actions.pod:1435
7376 #: ../fish/guestfish-actions.pod:1437 ../src/guestfs-actions.pod:2197
7377 msgid "This returns the process group flag."
7381 #: ../fish/guestfish-actions.pod:1439
7386 #: ../fish/guestfish-actions.pod:1441
7391 #: ../fish/guestfish-actions.pod:1443
7399 #: ../fish/guestfish-actions.pod:1445 ../src/guestfs-actions.pod:2208
7401 "Return the process ID of the qemu subprocess. If there is no qemu "
7402 "subprocess, then this will return an error."
7406 #: ../fish/guestfish-actions.pod:1448 ../src/guestfs-actions.pod:2211
7407 msgid "This is an internal call used for debugging and testing."
7411 #: ../fish/guestfish-actions.pod:1450
7416 #: ../fish/guestfish-actions.pod:1452
7424 #: ../fish/guestfish-actions.pod:1454 ../src/guestfs-actions.pod:2222
7425 msgid "Return the current qemu binary."
7429 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2224
7431 "This is always non-NULL. If it wasn't set already, then this will return "
7432 "the default qemu binary name."
7436 #: ../fish/guestfish-actions.pod:1459
7437 msgid "get-recovery-proc"
7441 #: ../fish/guestfish-actions.pod:1461
7444 " get-recovery-proc\n"
7449 #: ../fish/guestfish-actions.pod:1463 ../src/guestfs-actions.pod:2237
7450 msgid "Return the recovery process enabled flag."
7454 #: ../fish/guestfish-actions.pod:1465
7459 #: ../fish/guestfish-actions.pod:1467
7467 #: ../fish/guestfish-actions.pod:1469
7469 "This returns the current setting of the selinux flag which is passed to the "
7470 "appliance at boot time. See L</set-selinux>."
7474 #: ../fish/guestfish-actions.pod:1475
7479 #: ../fish/guestfish-actions.pod:1477
7487 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2263
7488 msgid "This returns the number of virtual CPUs assigned to the appliance."
7492 #: ../fish/guestfish-actions.pod:1481
7497 #: ../fish/guestfish-actions.pod:1483
7505 #: ../fish/guestfish-actions.pod:1485 ../src/guestfs-actions.pod:2272
7507 "This returns the current state as an opaque integer. This is only useful "
7508 "for printing debug and internal error messages."
7512 #: ../fish/guestfish-actions.pod:1488 ../fish/guestfish-actions.pod:2434
7513 #: ../fish/guestfish-actions.pod:2452 ../fish/guestfish-actions.pod:2490
7514 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:2275
7515 #: ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:3610
7516 #: ../src/guestfs-actions.pod:3671 ../src/guestfs-actions.pod:3698
7517 msgid "For more information on states, see L<guestfs(3)>."
7521 #: ../fish/guestfish-actions.pod:1490
7526 #: ../fish/guestfish-actions.pod:1492
7534 #: ../fish/guestfish-actions.pod:1494 ../src/guestfs-actions.pod:2286
7535 msgid "Return the command trace flag."
7539 #: ../fish/guestfish-actions.pod:1496
7544 #: ../fish/guestfish-actions.pod:1498
7552 #: ../fish/guestfish-actions.pod:1500
7554 "Return the current umask. By default the umask is C<022> unless it has been "
7555 "set by calling L</umask>."
7559 #: ../fish/guestfish-actions.pod:1503
7564 #: ../fish/guestfish-actions.pod:1505
7572 #: ../fish/guestfish-actions.pod:1507 ../src/guestfs-actions.pod:2309
7573 msgid "This returns the verbose messages flag."
7577 #: ../fish/guestfish-actions.pod:1509
7582 #: ../fish/guestfish-actions.pod:1511
7590 #: ../fish/guestfish-actions.pod:1513 ../src/guestfs-actions.pod:2320
7591 msgid "This gets the SELinux security context of the daemon."
7595 #: ../fish/guestfish-actions.pod:1515
7596 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
7600 #: ../fish/guestfish-actions.pod:1518
7605 #: ../fish/guestfish-actions.pod:1520
7608 " getxattr path name\n"
7613 #: ../fish/guestfish-actions.pod:1522
7615 "Get a single extended attribute from file C<path> named C<name>. This call "
7616 "follows symlinks. If you want to lookup an extended attribute for the "
7617 "symlink itself, use L</lgetxattr>."
7621 #: ../fish/guestfish-actions.pod:1526 ../fish/guestfish-actions.pod:2579
7623 "Normally it is better to get all extended attributes from a file in one go "
7624 "by calling L</getxattrs>. However some Linux filesystem implementations are "
7625 "buggy and do not provide a way to list out attributes. For these "
7626 "filesystems (notably ntfs-3g) you have to know the names of the extended "
7627 "attributes you want in advance and call this function."
7631 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:2586
7632 #: ../src/guestfs-actions.pod:2349 ../src/guestfs-actions.pod:3831
7634 "Extended attribute values are blobs of binary data. If there is no extended "
7635 "attribute named C<name>, this returns an error."
7639 #: ../fish/guestfish-actions.pod:1536
7640 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
7644 #: ../fish/guestfish-actions.pod:1538
7649 #: ../fish/guestfish-actions.pod:1540
7657 #: ../fish/guestfish-actions.pod:1542 ../src/guestfs-actions.pod:2366
7659 "This call lists the extended attributes of the file or directory C<path>."
7663 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2369
7665 "At the system call level, this is a combination of the L<listxattr(2)> and "
7666 "L<getxattr(2)> calls."
7670 #: ../fish/guestfish-actions.pod:1548
7671 msgid "See also: L</lgetxattrs>, L<attr(5)>."
7675 #: ../fish/guestfish-actions.pod:1550
7680 #: ../fish/guestfish-actions.pod:1552
7683 " glob-expand pattern\n"
7688 #: ../fish/guestfish-actions.pod:1554 ../src/guestfs-actions.pod:2386
7690 "This command searches for all the pathnames matching C<pattern> according to "
7691 "the wildcard expansion rules used by the shell."
7695 #: ../fish/guestfish-actions.pod:1558 ../src/guestfs-actions.pod:2390
7697 "If no paths match, then this returns an empty list (note: not an error)."
7701 #: ../fish/guestfish-actions.pod:1561 ../src/guestfs-actions.pod:2393
7703 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
7704 "GLOB_BRACE>. See that manual page for more details."
7708 #: ../fish/guestfish-actions.pod:1565
7713 #: ../fish/guestfish-actions.pod:1567
7716 " grep regex path\n"
7721 #: ../fish/guestfish-actions.pod:1569 ../src/guestfs-actions.pod:2410
7722 msgid "This calls the external C<grep> program and returns the matching lines."
7726 #: ../fish/guestfish-actions.pod:1575
7731 #: ../fish/guestfish-actions.pod:1577
7734 " grepi regex path\n"
7739 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2429
7741 "This calls the external C<grep -i> program and returns the matching lines."
7745 #: ../fish/guestfish-actions.pod:1585
7746 msgid "grub-install"
7750 #: ../fish/guestfish-actions.pod:1587
7753 " grub-install root device\n"
7758 #: ../fish/guestfish-actions.pod:1589 ../src/guestfs-actions.pod:2448
7760 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
7761 "with the root directory being C<root>."
7765 #: ../fish/guestfish-actions.pod:1598 ../src/guestfs-actions.pod:2457
7767 "There is currently no way in the API to install grub2, which is used by most "
7768 "modern Linux guests. It is possible to run the grub2 command from the "
7769 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
7773 #: ../fish/guestfish-actions.pod:1605 ../src/guestfs-actions.pod:2464
7775 "This uses C<grub-install> from the host. Unfortunately grub is not always "
7776 "compatible with itself, so this only works in rather narrow circumstances. "
7777 "Careful testing with each guest version is advisable."
7781 #: ../fish/guestfish-actions.pod:1612 ../src/guestfs-actions.pod:2471
7783 "If grub-install reports the error \"No suitable drive was found in the "
7784 "generated device map.\" it may be that you need to create a C</boot/grub/"
7785 "device.map> file first that contains the mapping between grub device names "
7786 "and Linux device names. It is usually sufficient to create a file "
7791 #: ../fish/guestfish-actions.pod:1619 ../src/guestfs-actions.pod:2478
7799 #: ../fish/guestfish-actions.pod:1621 ../src/guestfs-actions.pod:2480
7800 msgid "replacing C</dev/vda> with the name of the installation device."
7804 #: ../fish/guestfish-actions.pod:1625
7809 #: ../fish/guestfish-actions.pod:1627
7817 #: ../fish/guestfish-actions.pod:1629 ../src/guestfs-actions.pod:2494
7819 "This command returns up to the first 10 lines of a file as a list of strings."
7823 #: ../fish/guestfish-actions.pod:1635
7828 #: ../fish/guestfish-actions.pod:1637
7831 " head-n nrlines path\n"
7836 #: ../fish/guestfish-actions.pod:1639 ../src/guestfs-actions.pod:2513
7838 "If the parameter C<nrlines> is a positive number, this returns the first "
7839 "C<nrlines> lines of the file C<path>."
7843 #: ../fish/guestfish-actions.pod:1642 ../src/guestfs-actions.pod:2516
7845 "If the parameter C<nrlines> is a negative number, this returns lines from "
7846 "the file C<path>, excluding the last C<nrlines> lines."
7850 #: ../fish/guestfish-actions.pod:1645 ../fish/guestfish-actions.pod:4727
7851 #: ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:7152
7852 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7856 #: ../fish/guestfish-actions.pod:1650
7861 #: ../fish/guestfish-actions.pod:1652
7869 #: ../fish/guestfish-actions.pod:1654 ../src/guestfs-actions.pod:2536
7871 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
7872 "readable, canonical hex dump of the file."
7876 #: ../fish/guestfish-actions.pod:1660
7881 #: ../fish/guestfish-actions.pod:1662
7884 " initrd-cat initrdpath filename\n"
7889 #: ../fish/guestfish-actions.pod:1664 ../src/guestfs-actions.pod:2555
7891 "This command unpacks the file C<filename> from the initrd file called "
7892 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7897 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2559
7899 "For example, in guestfish you could use the following command to examine the "
7900 "boot script (usually called C</init>) contained in a Linux initrd or "
7905 #: ../fish/guestfish-actions.pod:1672 ../src/guestfs-actions.pod:2563
7908 " initrd-cat /boot/initrd-<version>.img init\n"
7913 #: ../fish/guestfish-actions.pod:1674
7914 msgid "See also L</initrd-list>."
7918 #: ../fish/guestfish-actions.pod:1679
7923 #: ../fish/guestfish-actions.pod:1681
7926 " initrd-list path\n"
7931 #: ../fish/guestfish-actions.pod:1683 ../src/guestfs-actions.pod:2582
7932 msgid "This command lists out files contained in an initrd."
7936 #: ../fish/guestfish-actions.pod:1685 ../src/guestfs-actions.pod:2584
7938 "The files are listed without any initial C</> character. The files are "
7939 "listed in the order they appear (not necessarily alphabetical). Directory "
7940 "names are listed as separate items."
7944 #: ../fish/guestfish-actions.pod:1689 ../src/guestfs-actions.pod:2588
7946 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7947 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7952 #: ../fish/guestfish-actions.pod:1693
7953 msgid "inotify-add-watch"
7957 #: ../fish/guestfish-actions.pod:1695
7960 " inotify-add-watch path mask\n"
7965 #: ../fish/guestfish-actions.pod:1697 ../src/guestfs-actions.pod:2605
7966 msgid "Watch C<path> for the events listed in C<mask>."
7970 #: ../fish/guestfish-actions.pod:1699 ../src/guestfs-actions.pod:2607
7972 "Note that if C<path> is a directory then events within that directory are "
7973 "watched, but this does I<not> happen recursively (in subdirectories)."
7977 #: ../fish/guestfish-actions.pod:1703 ../src/guestfs-actions.pod:2611
7979 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7980 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7984 #: ../fish/guestfish-actions.pod:1707
7985 msgid "inotify-close"
7989 #: ../fish/guestfish-actions.pod:1709
7997 #: ../fish/guestfish-actions.pod:1711 ../src/guestfs-actions.pod:2624
7999 "This closes the inotify handle which was previously opened by inotify_init. "
8000 "It removes all watches, throws away any pending events, and deallocates all "
8005 #: ../fish/guestfish-actions.pod:1715
8006 msgid "inotify-files"
8010 #: ../fish/guestfish-actions.pod:1717
8018 #: ../fish/guestfish-actions.pod:1719
8020 "This function is a helpful wrapper around L</inotify-read> which just "
8021 "returns a list of pathnames of objects that were touched. The returned "
8022 "pathnames are sorted and deduplicated."
8026 #: ../fish/guestfish-actions.pod:1723
8027 msgid "inotify-init"
8031 #: ../fish/guestfish-actions.pod:1725
8034 " inotify-init maxevents\n"
8039 #: ../fish/guestfish-actions.pod:1727 ../src/guestfs-actions.pod:2653
8041 "This command creates a new inotify handle. The inotify subsystem can be "
8042 "used to notify events which happen to objects in the guest filesystem."
8046 #: ../fish/guestfish-actions.pod:1731
8048 "C<maxevents> is the maximum number of events which will be queued up between "
8049 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
8050 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
8051 "default was 16384 events. Beyond this limit, the kernel throws away events, "
8052 "but records the fact that it threw them away by setting a flag "
8053 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
8057 #: ../fish/guestfish-actions.pod:1741
8059 "Before any events are generated, you have to add some watches to the "
8060 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
8061 "L</inotify-watch-all>."
8065 #: ../fish/guestfish-actions.pod:1747
8067 "Queued up events should be read periodically by calling L</inotify-read> (or "
8068 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
8069 "If you don't read the events out often enough then you risk the internal "
8070 "queue overflowing."
8074 #: ../fish/guestfish-actions.pod:1754
8076 "The handle should be closed after use by calling L</inotify-close>. This "
8077 "also removes any watches automatically."
8081 #: ../fish/guestfish-actions.pod:1758 ../src/guestfs-actions.pod:2684
8083 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8084 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8085 "that there is one global inotify handle per libguestfs instance."
8089 #: ../fish/guestfish-actions.pod:1763
8090 msgid "inotify-read"
8094 #: ../fish/guestfish-actions.pod:1765
8102 #: ../fish/guestfish-actions.pod:1767 ../src/guestfs-actions.pod:2698
8104 "Return the complete queue of events that have happened since the previous "
8109 #: ../fish/guestfish-actions.pod:1770 ../src/guestfs-actions.pod:2701
8110 msgid "If no events have happened, this returns an empty list."
8114 #: ../fish/guestfish-actions.pod:1772 ../src/guestfs-actions.pod:2703
8116 "I<Note>: In order to make sure that all events have been read, you must call "
8117 "this function repeatedly until it returns an empty list. The reason is that "
8118 "the call will read events up to the maximum appliance-to-host message size "
8119 "and leave remaining events in the queue."
8123 #: ../fish/guestfish-actions.pod:1778
8124 msgid "inotify-rm-watch"
8128 #: ../fish/guestfish-actions.pod:1780
8131 " inotify-rm-watch wd\n"
8136 #: ../fish/guestfish-actions.pod:1782
8137 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
8141 #: ../fish/guestfish-actions.pod:1785
8142 msgid "inspect-get-arch"
8146 #: ../fish/guestfish-actions.pod:1787
8149 " inspect-get-arch root\n"
8154 #: ../fish/guestfish-actions.pod:1789
8156 "This returns the architecture of the inspected operating system. The "
8157 "possible return values are listed under L</file-architecture>."
8161 #: ../fish/guestfish-actions.pod:1793 ../src/guestfs-actions.pod:2738
8163 "If the architecture could not be determined, then the string C<unknown> is "
8168 #: ../fish/guestfish-actions.pod:1796 ../fish/guestfish-actions.pod:1883
8169 #: ../fish/guestfish-actions.pod:1962 ../fish/guestfish-actions.pod:1974
8170 #: ../fish/guestfish-actions.pod:2058 ../fish/guestfish-actions.pod:2119
8171 #: ../fish/guestfish-actions.pod:2140 ../fish/guestfish-actions.pod:2154
8172 #: ../fish/guestfish-actions.pod:2194 ../fish/guestfish-actions.pod:2226
8173 #: ../fish/guestfish-actions.pod:2239 ../fish/guestfish-actions.pod:2252
8174 #: ../fish/guestfish-actions.pod:2262 ../fish/guestfish-actions.pod:2272
8175 #: ../fish/guestfish-actions.pod:2284 ../fish/guestfish-actions.pod:2380
8176 #: ../fish/guestfish-actions.pod:2414 ../src/guestfs-actions.pod:2741
8177 #: ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2939
8178 #: ../src/guestfs-actions.pod:2958 ../src/guestfs-actions.pod:3089
8179 #: ../src/guestfs-actions.pod:3172 ../src/guestfs-actions.pod:3200
8180 #: ../src/guestfs-actions.pod:3221 ../src/guestfs-actions.pod:3274
8181 #: ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3334
8182 #: ../src/guestfs-actions.pod:3354 ../src/guestfs-actions.pod:3371
8183 #: ../src/guestfs-actions.pod:3387 ../src/guestfs-actions.pod:3405
8184 #: ../src/guestfs-actions.pod:3507 ../src/guestfs-actions.pod:3548
8185 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8189 #: ../fish/guestfish-actions.pod:1798
8190 msgid "inspect-get-distro"
8194 #: ../fish/guestfish-actions.pod:1800
8197 " inspect-get-distro root\n"
8202 #: ../fish/guestfish-actions.pod:1802 ../src/guestfs-actions.pod:2754
8204 "This returns the distro (distribution) of the inspected operating system."
8208 #: ../fish/guestfish-actions.pod:1805 ../src/guestfs-actions.pod:2757
8209 msgid "Currently defined distros are:"
8213 #: ../fish/guestfish-actions.pod:1809 ../src/guestfs-actions.pod:2761
8214 msgid "\"archlinux\""
8218 #: ../fish/guestfish-actions.pod:1811 ../src/guestfs-actions.pod:2763
8223 #: ../fish/guestfish-actions.pod:1813 ../src/guestfs-actions.pod:2765
8228 #: ../fish/guestfish-actions.pod:1815 ../src/guestfs-actions.pod:2767
8233 #: ../fish/guestfish-actions.pod:1817 ../src/guestfs-actions.pod:2769
8238 #: ../fish/guestfish-actions.pod:1819 ../src/guestfs-actions.pod:2771
8243 #: ../fish/guestfish-actions.pod:1821 ../src/guestfs-actions.pod:2773
8248 #: ../fish/guestfish-actions.pod:1823 ../src/guestfs-actions.pod:2775
8253 #: ../fish/guestfish-actions.pod:1825 ../src/guestfs-actions.pod:2777
8258 #: ../fish/guestfish-actions.pod:1827 ../src/guestfs-actions.pod:2779
8263 #: ../fish/guestfish-actions.pod:1829 ../src/guestfs-actions.pod:2781
8264 msgid "\"linuxmint\""
8268 #: ../fish/guestfish-actions.pod:1831 ../src/guestfs-actions.pod:2783
8273 #: ../fish/guestfish-actions.pod:1833 ../src/guestfs-actions.pod:2785
8274 msgid "\"mandriva\""
8278 #: ../fish/guestfish-actions.pod:1835 ../src/guestfs-actions.pod:2787
8283 #: ../fish/guestfish-actions.pod:1837 ../src/guestfs-actions.pod:2789
8288 #: ../fish/guestfish-actions.pod:1839 ../src/guestfs-actions.pod:2791
8293 #: ../fish/guestfish-actions.pod:1841 ../src/guestfs-actions.pod:2793
8298 #: ../fish/guestfish-actions.pod:1843 ../src/guestfs-actions.pod:2795
8303 #: ../fish/guestfish-actions.pod:1845 ../src/guestfs-actions.pod:2797
8304 msgid "\"redhat-based\""
8308 #: ../fish/guestfish-actions.pod:1847 ../src/guestfs-actions.pod:2799
8309 msgid "Some Red Hat-derived distro."
8313 #: ../fish/guestfish-actions.pod:1849 ../src/guestfs-actions.pod:2801
8318 #: ../fish/guestfish-actions.pod:1851 ../src/guestfs-actions.pod:2803
8319 msgid "Red Hat Enterprise Linux."
8323 #: ../fish/guestfish-actions.pod:1853 ../src/guestfs-actions.pod:2805
8324 msgid "\"scientificlinux\""
8328 #: ../fish/guestfish-actions.pod:1855 ../src/guestfs-actions.pod:2807
8329 msgid "Scientific Linux."
8333 #: ../fish/guestfish-actions.pod:1857 ../src/guestfs-actions.pod:2809
8334 msgid "\"slackware\""
8338 #: ../fish/guestfish-actions.pod:1859 ../src/guestfs-actions.pod:2811
8343 #: ../fish/guestfish-actions.pod:1861 ../src/guestfs-actions.pod:2813
8344 msgid "\"ttylinux\""
8348 #: ../fish/guestfish-actions.pod:1863 ../src/guestfs-actions.pod:2815
8353 #: ../fish/guestfish-actions.pod:1865 ../src/guestfs-actions.pod:2817
8358 #: ../fish/guestfish-actions.pod:1867 ../src/guestfs-actions.pod:2819
8363 #: ../fish/guestfish-actions.pod:1869 ../fish/guestfish-actions.pod:1953
8364 #: ../fish/guestfish-actions.pod:2217 ../src/guestfs-actions.pod:2821
8365 #: ../src/guestfs-actions.pod:2930 ../src/guestfs-actions.pod:3305
8370 #: ../fish/guestfish-actions.pod:1871 ../src/guestfs-actions.pod:2823
8371 msgid "The distro could not be determined."
8375 #: ../fish/guestfish-actions.pod:1873 ../fish/guestfish-actions.pod:2209
8376 #: ../src/guestfs-actions.pod:2825 ../src/guestfs-actions.pod:3297
8381 #: ../fish/guestfish-actions.pod:1875 ../src/guestfs-actions.pod:2827
8383 "Windows does not have distributions. This string is returned if the OS type "
8388 #: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1959
8389 #: ../fish/guestfish-actions.pod:2223 ../src/guestfs-actions.pod:2832
8390 #: ../src/guestfs-actions.pod:2936 ../src/guestfs-actions.pod:3311
8392 "Future versions of libguestfs may return other strings here. The caller "
8393 "should be prepared to handle any string."
8397 #: ../fish/guestfish-actions.pod:1885
8398 msgid "inspect-get-drive-mappings"
8402 #: ../fish/guestfish-actions.pod:1887
8405 " inspect-get-drive-mappings root\n"
8410 #: ../fish/guestfish-actions.pod:1889 ../src/guestfs-actions.pod:2848
8412 "This call is useful for Windows which uses a primitive system of assigning "
8413 "drive letters (like \"C:\") to partitions. This inspection API examines the "
8414 "Windows Registry to find out how disks/partitions are mapped to drive "
8415 "letters, and returns a hash table as in the example below:"
8419 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:2854
8429 #: ../fish/guestfish-actions.pod:1899 ../src/guestfs-actions.pod:2858
8431 "Note that keys are drive letters. For Windows, the key is case insensitive "
8432 "and just contains the drive letter, without the customary colon separator "
8437 #: ../fish/guestfish-actions.pod:1903 ../src/guestfs-actions.pod:2862
8439 "In future we may support other operating systems that also used drive "
8440 "letters, but the keys for those might not be case insensitive and might be "
8441 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
8446 #: ../fish/guestfish-actions.pod:1908 ../src/guestfs-actions.pod:2867
8448 "For Windows guests, currently only hard drive mappings are returned. "
8449 "Removable disks (eg. DVD-ROMs) are ignored."
8453 #: ../fish/guestfish-actions.pod:1911 ../src/guestfs-actions.pod:2870
8455 "For guests that do not use drive mappings, or if the drive mappings could "
8456 "not be determined, this returns an empty hash table."
8460 #: ../fish/guestfish-actions.pod:1914
8462 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8463 "get-mountpoints>, L</inspect-get-filesystems>."
8467 #: ../fish/guestfish-actions.pod:1918
8468 msgid "inspect-get-filesystems"
8472 #: ../fish/guestfish-actions.pod:1920
8475 " inspect-get-filesystems root\n"
8480 #: ../fish/guestfish-actions.pod:1922 ../src/guestfs-actions.pod:2891
8482 "This returns a list of all the filesystems that we think are associated with "
8483 "this operating system. This includes the root filesystem, other ordinary "
8484 "filesystems, and non-mounted devices like swap partitions."
8488 #: ../fish/guestfish-actions.pod:1927 ../src/guestfs-actions.pod:2896
8490 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8491 "to be shared between operating systems."
8495 #: ../fish/guestfish-actions.pod:1930
8497 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8502 #: ../fish/guestfish-actions.pod:1933
8503 msgid "inspect-get-format"
8507 #: ../fish/guestfish-actions.pod:1935
8510 " inspect-get-format root\n"
8515 #: ../fish/guestfish-actions.pod:1937 ../src/guestfs-actions.pod:2914
8517 "This returns the format of the inspected operating system. You can use it "
8518 "to detect install images, live CDs and similar."
8522 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:2917
8523 msgid "Currently defined formats are:"
8527 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:2921
8528 msgid "\"installed\""
8532 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:2923
8533 msgid "This is an installed operating system."
8537 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:2925
8538 msgid "\"installer\""
8542 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:2927
8544 "The disk image being inspected is not an installed operating system, but a "
8545 "I<bootable> install disk, live CD, or similar."
8549 #: ../fish/guestfish-actions.pod:1955 ../src/guestfs-actions.pod:2932
8550 msgid "The format of this disk image is not known."
8554 #: ../fish/guestfish-actions.pod:1964
8555 msgid "inspect-get-hostname"
8559 #: ../fish/guestfish-actions.pod:1966
8562 " inspect-get-hostname root\n"
8567 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:2952
8569 "This function returns the hostname of the operating system as found by "
8570 "inspection of the guest's configuration files."
8574 #: ../fish/guestfish-actions.pod:1971 ../src/guestfs-actions.pod:2955
8576 "If the hostname could not be determined, then the string C<unknown> is "
8581 #: ../fish/guestfish-actions.pod:1976
8582 msgid "inspect-get-icon"
8586 #: ../fish/guestfish-actions.pod:1978
8589 " inspect-get-icon root [favicon:..] [highquality:..]\n"
8594 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:2981
8596 "This function returns an icon corresponding to the inspected operating "
8597 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
8598 "to PNG if necessary)."
8602 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:2985
8604 "If it was not possible to get an icon this function returns a zero-length "
8605 "(non-NULL) buffer. I<Callers must check for this case>."
8609 #: ../fish/guestfish-actions.pod:1987 ../src/guestfs-actions.pod:2988
8611 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
8612 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
8613 "this file will be returned. You can disable favicons by passing the "
8614 "optional C<favicon> boolean as false (default is true)."
8618 #: ../fish/guestfish-actions.pod:1993 ../src/guestfs-actions.pod:2994
8620 "If finding the favicon fails, then we look in other places in the guest for "
8625 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:2997
8627 "If the optional C<highquality> boolean is true then only high quality icons "
8628 "are returned, which means only icons of high resolution with an alpha "
8629 "channel. The default (false) is to return any icon we can, even if it is of "
8630 "substandard quality."
8634 #: ../fish/guestfish-actions.pod:2007 ../src/guestfs-actions.pod:3008
8636 "Unlike most other inspection API calls, the guest's disks must be mounted up "
8637 "before you call this, since it needs to read information from the guest "
8638 "filesystem during the call."
8642 #: ../fish/guestfish-actions.pod:2013 ../src/guestfs-actions.pod:3014
8644 "B<Security:> The icon data comes from the untrusted guest, and should be "
8645 "treated with caution. PNG files have been known to contain exploits. "
8646 "Ensure that libpng (or other relevant libraries) are fully up to date before "
8647 "trying to process or display the icon."
8651 #: ../fish/guestfish-actions.pod:2021 ../src/guestfs-actions.pod:3022
8653 "The PNG image returned can be any size. It might not be square. Libguestfs "
8654 "tries to return the largest, highest quality icon available. The "
8655 "application must scale the icon to the required size."
8659 #: ../fish/guestfish-actions.pod:2028 ../src/guestfs-actions.pod:3029
8661 "Extracting icons from Windows guests requires the external C<wrestool> "
8662 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
8663 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
8664 "installed separately."
8668 #: ../fish/guestfish-actions.pod:2035 ../src/guestfs-actions.pod:3036
8670 "Operating system icons are usually trademarks. Seek legal advice before "
8671 "using trademarks in applications."
8675 #: ../fish/guestfish-actions.pod:2042
8676 msgid "inspect-get-major-version"
8680 #: ../fish/guestfish-actions.pod:2044
8683 " inspect-get-major-version root\n"
8688 #: ../fish/guestfish-actions.pod:2046 ../src/guestfs-actions.pod:3077
8690 "This returns the major version number of the inspected operating system."
8694 #: ../fish/guestfish-actions.pod:2049 ../src/guestfs-actions.pod:3080
8696 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8697 "popular public names used by the operating system. Notably the operating "
8698 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8699 "1). You can find out the real versions corresponding to releases of Windows "
8700 "by consulting Wikipedia or MSDN."
8704 #: ../fish/guestfish-actions.pod:2056 ../fish/guestfish-actions.pod:2067
8705 #: ../src/guestfs-actions.pod:3087 ../src/guestfs-actions.pod:3104
8706 msgid "If the version could not be determined, then C<0> is returned."
8710 #: ../fish/guestfish-actions.pod:2060
8711 msgid "inspect-get-minor-version"
8715 #: ../fish/guestfish-actions.pod:2062
8718 " inspect-get-minor-version root\n"
8723 #: ../fish/guestfish-actions.pod:2064 ../src/guestfs-actions.pod:3101
8725 "This returns the minor version number of the inspected operating system."
8729 #: ../fish/guestfish-actions.pod:2069
8731 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8732 "get-major-version>."
8736 #: ../fish/guestfish-actions.pod:2072
8737 msgid "inspect-get-mountpoints"
8741 #: ../fish/guestfish-actions.pod:2074
8744 " inspect-get-mountpoints root\n"
8749 #: ../fish/guestfish-actions.pod:2076 ../src/guestfs-actions.pod:3119
8751 "This returns a hash of where we think the filesystems associated with this "
8752 "operating system should be mounted. Callers should note that this is at "
8753 "best an educated guess made by reading configuration files such as C</etc/"
8754 "fstab>. I<In particular note> that this may return filesystems which are "
8755 "non-existent or not mountable and callers should be prepared to handle or "
8756 "ignore failures if they try to mount them."
8760 #: ../fish/guestfish-actions.pod:2085 ../src/guestfs-actions.pod:3128
8762 "Each element in the returned hashtable has a key which is the path of the "
8763 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8764 "mounted there (eg. C</dev/sda1>)."
8768 #: ../fish/guestfish-actions.pod:2090 ../src/guestfs-actions.pod:3133
8770 "Non-mounted devices such as swap devices are I<not> returned in this list."
8774 #: ../fish/guestfish-actions.pod:2093
8776 "For operating systems like Windows which still use drive letters, this call "
8777 "will only return an entry for the first drive \"mounted on\" C</>. For "
8778 "information about the mapping of drive letters to partitions, see L</inspect-"
8779 "get-drive-mappings>."
8783 #: ../fish/guestfish-actions.pod:2099
8785 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8790 #: ../fish/guestfish-actions.pod:2102
8791 msgid "inspect-get-package-format"
8795 #: ../fish/guestfish-actions.pod:2104
8798 " inspect-get-package-format root\n"
8803 #: ../fish/guestfish-actions.pod:2106
8805 "This function and L</inspect-get-package-management> return the package "
8806 "format and package management tool used by the inspected operating system. "
8807 "For example for Fedora these functions would return C<rpm> (package format) "
8808 "and C<yum> (package management)."
8812 #: ../fish/guestfish-actions.pod:2112 ../src/guestfs-actions.pod:3165
8814 "This returns the string C<unknown> if we could not determine the package "
8815 "format I<or> if the operating system does not have a real packaging system "
8820 #: ../fish/guestfish-actions.pod:2116 ../src/guestfs-actions.pod:3169
8822 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8823 "Future versions of libguestfs may return other strings."
8827 #: ../fish/guestfish-actions.pod:2121
8828 msgid "inspect-get-package-management"
8832 #: ../fish/guestfish-actions.pod:2123
8835 " inspect-get-package-management root\n"
8840 #: ../fish/guestfish-actions.pod:2125
8842 "L</inspect-get-package-format> and this function return the package format "
8843 "and package management tool used by the inspected operating system. For "
8844 "example for Fedora these functions would return C<rpm> (package format) and "
8845 "C<yum> (package management)."
8849 #: ../fish/guestfish-actions.pod:2131 ../src/guestfs-actions.pod:3191
8851 "This returns the string C<unknown> if we could not determine the package "
8852 "management tool I<or> if the operating system does not have a real packaging "
8853 "system (eg. Windows)."
8857 #: ../fish/guestfish-actions.pod:2135 ../src/guestfs-actions.pod:3195
8859 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8860 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
8861 "libguestfs may return other strings."
8865 #: ../fish/guestfish-actions.pod:2142
8866 msgid "inspect-get-product-name"
8870 #: ../fish/guestfish-actions.pod:2144
8873 " inspect-get-product-name root\n"
8878 #: ../fish/guestfish-actions.pod:2146 ../src/guestfs-actions.pod:3213
8880 "This returns the product name of the inspected operating system. The "
8881 "product name is generally some freeform string which can be displayed to the "
8882 "user, but should not be parsed by programs."
8886 #: ../fish/guestfish-actions.pod:2151 ../src/guestfs-actions.pod:3218
8888 "If the product name could not be determined, then the string C<unknown> is "
8893 #: ../fish/guestfish-actions.pod:2156
8894 msgid "inspect-get-product-variant"
8898 #: ../fish/guestfish-actions.pod:2158
8901 " inspect-get-product-variant root\n"
8906 #: ../fish/guestfish-actions.pod:2160 ../src/guestfs-actions.pod:3234
8907 msgid "This returns the product variant of the inspected operating system."
8911 #: ../fish/guestfish-actions.pod:2163 ../src/guestfs-actions.pod:3237
8913 "For Windows guests, this returns the contents of the Registry key C<HKLM"
8914 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
8915 "is usually a string such as C<Client> or C<Server> (other values are "
8916 "possible). This can be used to distinguish consumer and enterprise versions "
8917 "of Windows that have the same version number (for example, Windows 7 and "
8918 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
8919 "the latter is C<Server>)."
8923 #: ../fish/guestfish-actions.pod:2172 ../src/guestfs-actions.pod:3246
8925 "For enterprise Linux guests, in future we intend this to return the product "
8926 "variant such as C<Desktop>, C<Server> and so on. But this is not "
8927 "implemented at present."
8931 #: ../fish/guestfish-actions.pod:2176 ../src/guestfs-actions.pod:3250
8933 "If the product variant could not be determined, then the string C<unknown> "
8938 #: ../fish/guestfish-actions.pod:2179
8940 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8941 "get-product-name>, L</inspect-get-major-version>."
8945 #: ../fish/guestfish-actions.pod:2183
8946 msgid "inspect-get-roots"
8950 #: ../fish/guestfish-actions.pod:2185
8953 " inspect-get-roots\n"
8958 #: ../fish/guestfish-actions.pod:2187
8960 "This function is a convenient way to get the list of root devices, as "
8961 "returned from a previous call to L</inspect-os>, but without redoing the "
8962 "whole inspection process."
8966 #: ../fish/guestfish-actions.pod:2191
8968 "This returns an empty list if either no root devices were found or the "
8969 "caller has not called L</inspect-os>."
8973 #: ../fish/guestfish-actions.pod:2196
8974 msgid "inspect-get-type"
8978 #: ../fish/guestfish-actions.pod:2198
8981 " inspect-get-type root\n"
8986 #: ../fish/guestfish-actions.pod:2200 ../src/guestfs-actions.pod:3288
8988 "This returns the type of the inspected operating system. Currently defined "
8993 #: ../fish/guestfish-actions.pod:2205 ../src/guestfs-actions.pod:3293
8998 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3295
8999 msgid "Any Linux-based operating system."
9003 #: ../fish/guestfish-actions.pod:2211 ../src/guestfs-actions.pod:3299
9004 msgid "Any Microsoft Windows operating system."
9008 #: ../fish/guestfish-actions.pod:2213 ../src/guestfs-actions.pod:3301
9013 #: ../fish/guestfish-actions.pod:2215 ../src/guestfs-actions.pod:3303
9018 #: ../fish/guestfish-actions.pod:2219 ../src/guestfs-actions.pod:3307
9019 msgid "The operating system type could not be determined."
9023 #: ../fish/guestfish-actions.pod:2228
9024 msgid "inspect-get-windows-current-control-set"
9028 #: ../fish/guestfish-actions.pod:2230
9031 " inspect-get-windows-current-control-set root\n"
9036 #: ../fish/guestfish-actions.pod:2232 ../src/guestfs-actions.pod:3327
9038 "This returns the Windows CurrentControlSet of the inspected guest. The "
9039 "CurrentControlSet is a registry key name such as C<ControlSet001>."
9043 #: ../fish/guestfish-actions.pod:2235 ../src/guestfs-actions.pod:3330
9045 "This call assumes that the guest is Windows and that the Registry could be "
9046 "examined by inspection. If this is not the case then an error is returned."
9050 #: ../fish/guestfish-actions.pod:2241
9051 msgid "inspect-get-windows-systemroot"
9055 #: ../fish/guestfish-actions.pod:2243
9058 " inspect-get-windows-systemroot root\n"
9063 #: ../fish/guestfish-actions.pod:2245 ../src/guestfs-actions.pod:3347
9065 "This returns the Windows systemroot of the inspected guest. The systemroot "
9066 "is a directory path such as C</WINDOWS>."
9070 #: ../fish/guestfish-actions.pod:2248 ../src/guestfs-actions.pod:3350
9072 "This call assumes that the guest is Windows and that the systemroot could be "
9073 "determined by inspection. If this is not the case then an error is returned."
9077 #: ../fish/guestfish-actions.pod:2254
9078 msgid "inspect-is-live"
9082 #: ../fish/guestfish-actions.pod:2256
9085 " inspect-is-live root\n"
9090 #: ../fish/guestfish-actions.pod:2258
9092 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
9093 "then this returns true if a live image was detected on the disk."
9097 #: ../fish/guestfish-actions.pod:2264
9098 msgid "inspect-is-multipart"
9102 #: ../fish/guestfish-actions.pod:2266
9105 " inspect-is-multipart root\n"
9110 #: ../fish/guestfish-actions.pod:2268
9112 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
9113 "then this returns true if the disk is part of a set."
9117 #: ../fish/guestfish-actions.pod:2274
9118 msgid "inspect-is-netinst"
9122 #: ../fish/guestfish-actions.pod:2276
9125 " inspect-is-netinst root\n"
9130 #: ../fish/guestfish-actions.pod:2278
9132 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
9133 "then this returns true if the disk is a network installer, ie. not a self-"
9134 "contained install CD but one which is likely to require network access to "
9135 "complete the install."
9139 #: ../fish/guestfish-actions.pod:2286
9140 msgid "inspect-list-applications"
9144 #: ../fish/guestfish-actions.pod:2288
9147 " inspect-list-applications root\n"
9152 #: ../fish/guestfish-actions.pod:2290 ../src/guestfs-actions.pod:3417
9153 msgid "Return the list of applications installed in the operating system."
9157 #: ../fish/guestfish-actions.pod:2292
9159 "I<Note:> This call works differently from other parts of the inspection "
9160 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
9161 "then mount up the disks, before calling this. Listing applications is a "
9162 "significantly more difficult operation which requires access to the full "
9163 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
9164 "are just returning data cached in the libguestfs handle, this call actually "
9165 "reads parts of the mounted filesystems during the call."
9169 #: ../fish/guestfish-actions.pod:2302 ../src/guestfs-actions.pod:3429
9171 "This returns an empty list if the inspection code was not able to determine "
9172 "the list of applications."
9176 #: ../fish/guestfish-actions.pod:2305 ../src/guestfs-actions.pod:3432
9177 msgid "The application structure contains the following fields:"
9181 #: ../fish/guestfish-actions.pod:2309 ../src/guestfs-actions.pod:3436
9186 #: ../fish/guestfish-actions.pod:2311 ../src/guestfs-actions.pod:3438
9188 "The name of the application. For Red Hat-derived and Debian-derived Linux "
9189 "guests, this is the package name."
9193 #: ../fish/guestfish-actions.pod:2314 ../src/guestfs-actions.pod:3441
9194 msgid "C<app_display_name>"
9198 #: ../fish/guestfish-actions.pod:2316 ../src/guestfs-actions.pod:3443
9200 "The display name of the application, sometimes localized to the install "
9201 "language of the guest operating system."
9205 #: ../fish/guestfish-actions.pod:2319 ../src/guestfs-actions.pod:3446
9207 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
9208 "to display something can use C<app_name> instead."
9212 #: ../fish/guestfish-actions.pod:2322 ../src/guestfs-actions.pod:3449
9213 msgid "C<app_epoch>"
9217 #: ../fish/guestfish-actions.pod:2324 ../src/guestfs-actions.pod:3451
9219 "For package managers which use epochs, this contains the epoch of the "
9220 "package (an integer). If unavailable, this is returned as C<0>."
9224 #: ../fish/guestfish-actions.pod:2327 ../src/guestfs-actions.pod:3454
9225 msgid "C<app_version>"
9229 #: ../fish/guestfish-actions.pod:2329 ../src/guestfs-actions.pod:3456
9231 "The version string of the application or package. If unavailable this is "
9232 "returned as an empty string C<\"\">."
9236 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3459
9237 msgid "C<app_release>"
9241 #: ../fish/guestfish-actions.pod:2334 ../src/guestfs-actions.pod:3461
9243 "The release string of the application or package, for package managers that "
9244 "use this. If unavailable this is returned as an empty string C<\"\">."
9248 #: ../fish/guestfish-actions.pod:2338 ../src/guestfs-actions.pod:3465
9249 msgid "C<app_install_path>"
9253 #: ../fish/guestfish-actions.pod:2340 ../src/guestfs-actions.pod:3467
9255 "The installation path of the application (on operating systems such as "
9256 "Windows which use installation paths). This path is in the format used by "
9257 "the guest operating system, it is not a libguestfs path."
9261 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3472
9262 msgid "If unavailable this is returned as an empty string C<\"\">."
9266 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3474
9267 msgid "C<app_trans_path>"
9271 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3476
9273 "The install path translated into a libguestfs path. If unavailable this is "
9274 "returned as an empty string C<\"\">."
9278 #: ../fish/guestfish-actions.pod:2352 ../src/guestfs-actions.pod:3479
9279 msgid "C<app_publisher>"
9283 #: ../fish/guestfish-actions.pod:2354 ../src/guestfs-actions.pod:3481
9285 "The name of the publisher of the application, for package managers that use "
9286 "this. If unavailable this is returned as an empty string C<\"\">."
9290 #: ../fish/guestfish-actions.pod:2358 ../src/guestfs-actions.pod:3485
9295 #: ../fish/guestfish-actions.pod:2360 ../src/guestfs-actions.pod:3487
9297 "The URL (eg. upstream URL) of the application. If unavailable this is "
9298 "returned as an empty string C<\"\">."
9302 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3490
9303 msgid "C<app_source_package>"
9307 #: ../fish/guestfish-actions.pod:2365 ../src/guestfs-actions.pod:3492
9309 "For packaging systems which support this, the name of the source package. "
9310 "If unavailable this is returned as an empty string C<\"\">."
9314 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3495
9315 msgid "C<app_summary>"
9319 #: ../fish/guestfish-actions.pod:2370 ../src/guestfs-actions.pod:3497
9321 "A short (usually one line) description of the application or package. If "
9322 "unavailable this is returned as an empty string C<\"\">."
9326 #: ../fish/guestfish-actions.pod:2373 ../src/guestfs-actions.pod:3500
9327 msgid "C<app_description>"
9331 #: ../fish/guestfish-actions.pod:2375 ../src/guestfs-actions.pod:3502
9333 "A longer description of the application or package. If unavailable this is "
9334 "returned as an empty string C<\"\">."
9338 #: ../fish/guestfish-actions.pod:2382
9343 #: ../fish/guestfish-actions.pod:2384
9351 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3520
9353 "This function uses other libguestfs functions and certain heuristics to "
9354 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9355 "for operating systems."
9359 #: ../fish/guestfish-actions.pod:2390 ../src/guestfs-actions.pod:3524
9360 msgid "The list returned is empty if no operating systems were found."
9364 #: ../fish/guestfish-actions.pod:2392 ../src/guestfs-actions.pod:3526
9366 "If one operating system was found, then this returns a list with a single "
9367 "element, which is the name of the root filesystem of this operating system. "
9368 "It is also possible for this function to return a list containing more than "
9369 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9370 "element being the root filesystem of one of the operating systems."
9374 #: ../fish/guestfish-actions.pod:2399
9376 "You can pass the root string(s) returned to other L</inspect-get-*> "
9377 "functions in order to query further information about each operating system, "
9378 "such as the name and version."
9382 #: ../fish/guestfish-actions.pod:2404
9384 "This function uses other libguestfs features such as L</mount-ro> and L</"
9385 "umount-all> in order to mount and unmount filesystems and look at the "
9386 "contents. This should be called with no disks currently mounted. The "
9387 "function may also use Augeas, so any existing Augeas handle will be closed."
9391 #: ../fish/guestfish-actions.pod:2410 ../src/guestfs-actions.pod:3544
9393 "This function cannot decrypt encrypted disks. The caller must do that first "
9394 "(supplying the necessary keys) if the disk is encrypted."
9398 #: ../fish/guestfish-actions.pod:2416 ../fish/guestfish-actions.pod:2614
9399 #: ../fish/guestfish-actions.pod:2673
9400 msgid "See also L</list-filesystems>."
9404 #: ../fish/guestfish-actions.pod:2418
9409 #: ../fish/guestfish-actions.pod:2420
9412 " is-blockdev path\n"
9417 #: ../fish/guestfish-actions.pod:2422 ../src/guestfs-actions.pod:3564
9419 "This returns C<true> if and only if there is a block device with the given "
9424 #: ../fish/guestfish-actions.pod:2425 ../fish/guestfish-actions.pod:2443
9425 #: ../fish/guestfish-actions.pod:2462 ../fish/guestfish-actions.pod:2471
9426 #: ../fish/guestfish-actions.pod:2481 ../fish/guestfish-actions.pod:2515
9427 #: ../fish/guestfish-actions.pod:2524
9428 msgid "See also L</stat>."
9432 #: ../fish/guestfish-actions.pod:2427
9437 #: ../fish/guestfish-actions.pod:2429
9445 #: ../fish/guestfish-actions.pod:2431 ../src/guestfs-actions.pod:3578
9447 "This returns true iff this handle is busy processing a command (in the "
9452 #: ../fish/guestfish-actions.pod:2436
9457 #: ../fish/guestfish-actions.pod:2438
9460 " is-chardev path\n"
9465 #: ../fish/guestfish-actions.pod:2440 ../src/guestfs-actions.pod:3593
9467 "This returns C<true> if and only if there is a character device with the "
9468 "given C<path> name."
9472 #: ../fish/guestfish-actions.pod:2445
9477 #: ../fish/guestfish-actions.pod:2447
9485 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3607
9487 "This returns true iff this handle is being configured (in the C<CONFIG> "
9492 #: ../fish/guestfish-actions.pod:2454
9497 #: ../fish/guestfish-actions.pod:2456
9505 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3622
9507 "This returns C<true> if and only if there is a directory with the given "
9508 "C<path> name. Note that it returns false for other objects like files."
9512 #: ../fish/guestfish-actions.pod:2464
9517 #: ../fish/guestfish-actions.pod:2466
9525 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3638
9527 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9528 "given C<path> name."
9532 #: ../fish/guestfish-actions.pod:2473
9537 #: ../fish/guestfish-actions.pod:2475
9545 #: ../fish/guestfish-actions.pod:2477 ../src/guestfs-actions.pod:3653
9547 "This returns C<true> if and only if there is a regular file with the given "
9548 "C<path> name. Note that it returns false for other objects like directories."
9552 #: ../fish/guestfish-actions.pod:2483
9553 msgid "is-launching"
9557 #: ../fish/guestfish-actions.pod:2485
9565 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3668
9567 "This returns true iff this handle is launching the subprocess (in the "
9568 "C<LAUNCHING> state)."
9572 #: ../fish/guestfish-actions.pod:2492
9577 #: ../fish/guestfish-actions.pod:2494
9585 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3683
9587 "This command tests whether C<device> is a logical volume, and returns true "
9588 "iff this is the case."
9592 #: ../fish/guestfish-actions.pod:2499
9597 #: ../fish/guestfish-actions.pod:2501
9605 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3695
9607 "This returns true iff this handle is ready to accept commands (in the "
9612 #: ../fish/guestfish-actions.pod:2508
9617 #: ../fish/guestfish-actions.pod:2510
9625 #: ../fish/guestfish-actions.pod:2512 ../src/guestfs-actions.pod:3710
9627 "This returns C<true> if and only if there is a Unix domain socket with the "
9628 "given C<path> name."
9632 #: ../fish/guestfish-actions.pod:2517
9637 #: ../fish/guestfish-actions.pod:2519
9640 " is-symlink path\n"
9645 #: ../fish/guestfish-actions.pod:2521 ../src/guestfs-actions.pod:3725
9647 "This returns C<true> if and only if there is a symbolic link with the given "
9652 #: ../fish/guestfish-actions.pod:2526
9657 #: ../fish/guestfish-actions.pod:2528
9665 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3740
9667 "This returns true iff the file exists and the file is empty or it contains "
9672 #: ../fish/guestfish-actions.pod:2533
9673 msgid "is-zero-device"
9677 #: ../fish/guestfish-actions.pod:2535
9680 " is-zero-device device\n"
9685 #: ../fish/guestfish-actions.pod:2537 ../src/guestfs-actions.pod:3753
9686 msgid "This returns true iff the device exists and contains all zero bytes."
9690 #: ../fish/guestfish-actions.pod:2539 ../src/guestfs-actions.pod:3755
9691 msgid "Note that for large devices this can take a long time to run."
9695 #: ../fish/guestfish-actions.pod:2541
9696 msgid "kill-subprocess"
9700 #: ../fish/guestfish-actions.pod:2543
9703 " kill-subprocess\n"
9708 #: ../fish/guestfish-actions.pod:2545 ../src/guestfs-actions.pod:3766
9709 msgid "This kills the qemu subprocess. You should never need to call this."
9713 #: ../fish/guestfish-actions.pod:2547
9718 #: ../fish/guestfish-actions.pod:2549
9723 #: ../fish/guestfish-actions.pod:2551
9731 #: ../fish/guestfish-actions.pod:2553 ../src/guestfs-actions.pod:3777
9733 "Internally libguestfs is implemented by running a virtual machine using "
9738 #: ../fish/guestfish-actions.pod:2556 ../src/guestfs-actions.pod:3780
9740 "You should call this after configuring the handle (eg. adding drives) but "
9741 "before performing any actions."
9745 #: ../fish/guestfish-actions.pod:2559
9750 #: ../fish/guestfish-actions.pod:2561
9753 " lchown owner group path\n"
9758 #: ../fish/guestfish-actions.pod:2563
9760 "Change the file owner to C<owner> and group to C<group>. This is like L</"
9761 "chown> but if C<path> is a symlink then the link itself is changed, not the "
9766 #: ../fish/guestfish-actions.pod:2571
9771 #: ../fish/guestfish-actions.pod:2573
9774 " lgetxattr path name\n"
9779 #: ../fish/guestfish-actions.pod:2575 ../src/guestfs-actions.pod:3820
9781 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
9782 "is a symlink, then this call returns an extended attribute from the symlink."
9786 #: ../fish/guestfish-actions.pod:2589
9787 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
9791 #: ../fish/guestfish-actions.pod:2591
9796 #: ../fish/guestfish-actions.pod:2593
9799 " lgetxattrs path\n"
9804 #: ../fish/guestfish-actions.pod:2595
9806 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
9807 "it returns the extended attributes of the link itself."
9811 #: ../fish/guestfish-actions.pod:2599
9816 #: ../fish/guestfish-actions.pod:2601
9824 #: ../fish/guestfish-actions.pod:2603 ../src/guestfs-actions.pod:3863
9826 "List all 9p filesystems attached to the guest. A list of mount tags is "
9831 #: ../fish/guestfish-actions.pod:2606
9832 msgid "list-devices"
9836 #: ../fish/guestfish-actions.pod:2608
9844 #: ../fish/guestfish-actions.pod:2610 ../src/guestfs-actions.pod:3877
9845 msgid "List all the block devices."
9849 #: ../fish/guestfish-actions.pod:2612 ../src/guestfs-actions.pod:3879
9850 msgid "The full block device names are returned, eg. C</dev/sda>."
9854 #: ../fish/guestfish-actions.pod:2616
9855 msgid "list-dm-devices"
9859 #: ../fish/guestfish-actions.pod:2618
9862 " list-dm-devices\n"
9867 #: ../fish/guestfish-actions.pod:2620 ../src/guestfs-actions.pod:3894
9868 msgid "List all device mapper devices."
9872 #: ../fish/guestfish-actions.pod:2622
9874 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
9875 "previous call to L</luks-open>."
9879 #: ../fish/guestfish-actions.pod:2625
9881 "Device mapper devices which correspond to logical volumes are I<not> "
9882 "returned in this list. Call L</lvs> if you want to list logical volumes."
9886 #: ../fish/guestfish-actions.pod:2629
9887 msgid "list-filesystems"
9891 #: ../fish/guestfish-actions.pod:2631
9894 " list-filesystems\n"
9899 #: ../fish/guestfish-actions.pod:2633 ../src/guestfs-actions.pod:3914
9901 "This inspection command looks for filesystems on partitions, block devices "
9902 "and logical volumes, returning a list of devices containing filesystems and "
9907 #: ../fish/guestfish-actions.pod:2637 ../src/guestfs-actions.pod:3918
9909 "The return value is a hash, where the keys are the devices containing "
9910 "filesystems, and the values are the filesystem types. For example:"
9914 #: ../fish/guestfish-actions.pod:2641 ../src/guestfs-actions.pod:3922
9917 " \"/dev/sda1\" => \"ntfs\"\n"
9918 " \"/dev/sda2\" => \"ext2\"\n"
9919 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9920 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9925 #: ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:3927
9927 "The value can have the special value \"unknown\", meaning the content of the "
9928 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9932 #: ../fish/guestfish-actions.pod:2650
9934 "This command runs other libguestfs commands, which might include L</mount> "
9935 "and L</umount>, and therefore you should use this soon after launch and only "
9936 "when nothing is mounted."
9940 #: ../fish/guestfish-actions.pod:2654
9942 "Not all of the filesystems returned will be mountable. In particular, swap "
9943 "partitions are returned in the list. Also this command does not check that "
9944 "each filesystem found is valid and mountable, and some filesystems might be "
9945 "mountable but require special options. Filesystems may not all belong to a "
9946 "single logical operating system (use L</inspect-os> to look for OSes)."
9950 #: ../fish/guestfish-actions.pod:2662
9951 msgid "list-partitions"
9955 #: ../fish/guestfish-actions.pod:2664
9958 " list-partitions\n"
9963 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:3956
9964 msgid "List all the partitions detected on all block devices."
9968 #: ../fish/guestfish-actions.pod:2668 ../src/guestfs-actions.pod:3958
9969 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9973 #: ../fish/guestfish-actions.pod:2670
9975 "This does not return logical volumes. For that you will need to call L</"
9980 #: ../fish/guestfish-actions.pod:2675
9985 #: ../fish/guestfish-actions.pod:2677
9993 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:3977
9995 "List the files in C<directory> (relative to the root directory, there is no "
9996 "cwd) in the format of 'ls -la'."
10000 #: ../fish/guestfish-actions.pod:2682 ../src/guestfs-actions.pod:3980
10002 "This command is mostly useful for interactive sessions. It is I<not> "
10003 "intended that you try to parse the output string."
10007 #: ../fish/guestfish-actions.pod:2685
10012 #: ../fish/guestfish-actions.pod:2687
10015 " ln target linkname\n"
10020 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:3995
10021 msgid "This command creates a hard link using the C<ln> command."
10025 #: ../fish/guestfish-actions.pod:2691
10030 #: ../fish/guestfish-actions.pod:2693
10033 " ln-f target linkname\n"
10038 #: ../fish/guestfish-actions.pod:2695 ../src/guestfs-actions.pod:4008
10040 "This command creates a hard link using the C<ln -f> command. The I<-f> "
10041 "option removes the link (C<linkname>) if it exists already."
10045 #: ../fish/guestfish-actions.pod:2698
10050 #: ../fish/guestfish-actions.pod:2700
10053 " ln-s target linkname\n"
10058 #: ../fish/guestfish-actions.pod:2702 ../src/guestfs-actions.pod:4022
10059 msgid "This command creates a symbolic link using the C<ln -s> command."
10063 #: ../fish/guestfish-actions.pod:2704
10068 #: ../fish/guestfish-actions.pod:2706
10071 " ln-sf target linkname\n"
10076 #: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4035
10078 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
10079 "option removes the link (C<linkname>) if it exists already."
10083 #: ../fish/guestfish-actions.pod:2711
10084 msgid "lremovexattr"
10088 #: ../fish/guestfish-actions.pod:2713
10091 " lremovexattr xattr path\n"
10096 #: ../fish/guestfish-actions.pod:2715
10098 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
10099 "it removes an extended attribute of the link itself."
10103 #: ../fish/guestfish-actions.pod:2719
10108 #: ../fish/guestfish-actions.pod:2721
10116 #: ../fish/guestfish-actions.pod:2723 ../src/guestfs-actions.pod:4063
10118 "List the files in C<directory> (relative to the root directory, there is no "
10119 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
10123 #: ../fish/guestfish-actions.pod:2727
10125 "This command is mostly useful for interactive sessions. Programs should "
10126 "probably use L</readdir> instead."
10130 #: ../fish/guestfish-actions.pod:2730
10135 #: ../fish/guestfish-actions.pod:2732
10138 " lsetxattr xattr val vallen path\n"
10143 #: ../fish/guestfish-actions.pod:2734
10145 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
10146 "sets an extended attribute of the link itself."
10150 #: ../fish/guestfish-actions.pod:2738
10155 #: ../fish/guestfish-actions.pod:2740
10163 #: ../fish/guestfish-actions.pod:2742 ../fish/guestfish-actions.pod:4562
10164 #: ../src/guestfs-actions.pod:4099 ../src/guestfs-actions.pod:6892
10165 msgid "Returns file information for the given C<path>."
10169 #: ../fish/guestfish-actions.pod:2744
10171 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
10172 "the link is stat-ed, not the file it refers to."
10176 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4105
10177 msgid "This is the same as the C<lstat(2)> system call."
10181 #: ../fish/guestfish-actions.pod:2750
10186 #: ../fish/guestfish-actions.pod:2752
10189 " lstatlist path 'names ...'\n"
10194 #: ../fish/guestfish-actions.pod:2754
10196 "This call allows you to perform the L</lstat> operation on multiple files, "
10197 "where all files are in the directory C<path>. C<names> is the list of files "
10198 "from this directory."
10202 #: ../fish/guestfish-actions.pod:2758 ../src/guestfs-actions.pod:4124
10204 "On return you get a list of stat structs, with a one-to-one correspondence "
10205 "to the C<names> list. If any name did not exist or could not be lstat'd, "
10206 "then the C<ino> field of that structure is set to C<-1>."
10210 #: ../fish/guestfish-actions.pod:2763
10212 "This call is intended for programs that want to efficiently list a directory "
10213 "contents without making many round-trips. See also L</lxattrlist> for a "
10214 "similarly efficient call for getting extended attributes. Very long "
10215 "directory listings might cause the protocol message size to be exceeded, "
10216 "causing this call to fail. The caller must split up such requests into "
10217 "smaller groups of names."
10221 #: ../fish/guestfish-actions.pod:2771
10222 msgid "luks-add-key"
10226 #: ../fish/guestfish-actions.pod:2773
10229 " luks-add-key device keyslot\n"
10234 #: ../fish/guestfish-actions.pod:2775 ../src/guestfs-actions.pod:4152
10236 "This command adds a new key on LUKS device C<device>. C<key> is any "
10237 "existing key, and is used to access the device. C<newkey> is the new key to "
10238 "add. C<keyslot> is the key slot that will be replaced."
10242 #: ../fish/guestfish-actions.pod:2780
10244 "Note that if C<keyslot> already contains a key, then this command will "
10245 "fail. You have to use L</luks-kill-slot> first to remove that key."
10249 #: ../fish/guestfish-actions.pod:2784 ../fish/guestfish-actions.pod:2806
10250 #: ../fish/guestfish-actions.pod:2819 ../fish/guestfish-actions.pod:2833
10251 #: ../fish/guestfish-actions.pod:2859 ../fish/guestfish-actions.pod:2869
10253 "This command has one or more key or passphrase parameters. Guestfish will "
10254 "prompt for these separately."
10258 #: ../fish/guestfish-actions.pod:2787
10263 #: ../fish/guestfish-actions.pod:2789
10266 " luks-close device\n"
10271 #: ../fish/guestfish-actions.pod:2791
10273 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
10274 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
10275 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
10280 #: ../fish/guestfish-actions.pod:2797
10281 msgid "luks-format"
10285 #: ../fish/guestfish-actions.pod:2799
10288 " luks-format device keyslot\n"
10293 #: ../fish/guestfish-actions.pod:2801 ../src/guestfs-actions.pod:4193
10295 "This command erases existing data on C<device> and formats the device as a "
10296 "LUKS encrypted device. C<key> is the initial key, which is added to key "
10297 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
10301 #: ../fish/guestfish-actions.pod:2809 ../fish/guestfish-actions.pod:2822
10302 #: ../fish/guestfish-actions.pod:2909 ../fish/guestfish-actions.pod:3570
10303 #: ../fish/guestfish-actions.pod:4096 ../fish/guestfish-actions.pod:4433
10304 #: ../fish/guestfish-actions.pod:4456 ../fish/guestfish-actions.pod:4478
10305 #: ../fish/guestfish-actions.pod:5224 ../src/guestfs-actions.pod:4200
10306 #: ../src/guestfs-actions.pod:4223 ../src/guestfs-actions.pod:4366
10307 #: ../src/guestfs-actions.pod:5469 ../src/guestfs-actions.pod:6257
10308 #: ../src/guestfs-actions.pod:6706 ../src/guestfs-actions.pod:6736
10309 #: ../src/guestfs-actions.pod:6769 ../src/guestfs-actions.pod:7968
10311 "B<This command is dangerous. Without careful use you can easily destroy all "
10316 #: ../fish/guestfish-actions.pod:2812
10317 msgid "luks-format-cipher"
10321 #: ../fish/guestfish-actions.pod:2814
10324 " luks-format-cipher device keyslot cipher\n"
10329 #: ../fish/guestfish-actions.pod:2816
10331 "This command is the same as L</luks-format> but it also allows you to set "
10332 "the C<cipher> used."
10336 #: ../fish/guestfish-actions.pod:2825
10337 msgid "luks-kill-slot"
10341 #: ../fish/guestfish-actions.pod:2827
10344 " luks-kill-slot device keyslot\n"
10349 #: ../fish/guestfish-actions.pod:2829 ../src/guestfs-actions.pod:4240
10351 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10352 "device C<device>. C<key> must be one of the I<other> keys."
10356 #: ../fish/guestfish-actions.pod:2836
10361 #: ../fish/guestfish-actions.pod:2838
10364 " luks-open device mapname\n"
10369 #: ../fish/guestfish-actions.pod:2840 ../src/guestfs-actions.pod:4260
10371 "This command opens a block device which has been encrypted according to the "
10372 "Linux Unified Key Setup (LUKS) standard."
10376 #: ../fish/guestfish-actions.pod:2843 ../src/guestfs-actions.pod:4263
10377 msgid "C<device> is the encrypted block device or partition."
10381 #: ../fish/guestfish-actions.pod:2845 ../src/guestfs-actions.pod:4265
10383 "The caller must supply one of the keys associated with the LUKS block "
10384 "device, in the C<key> parameter."
10388 #: ../fish/guestfish-actions.pod:2848 ../src/guestfs-actions.pod:4268
10390 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10391 "writes to this block device are decrypted from and encrypted to the "
10392 "underlying C<device> respectively."
10396 #: ../fish/guestfish-actions.pod:2852
10398 "If this block device contains LVM volume groups, then calling L</vgscan> "
10399 "followed by L</vg-activate-all> will make them visible."
10403 #: ../fish/guestfish-actions.pod:2856
10404 msgid "Use L</list-dm-devices> to list all device mapper devices."
10408 #: ../fish/guestfish-actions.pod:2862
10409 msgid "luks-open-ro"
10413 #: ../fish/guestfish-actions.pod:2864
10416 " luks-open-ro device mapname\n"
10421 #: ../fish/guestfish-actions.pod:2866
10423 "This is the same as L</luks-open> except that a read-only mapping is created."
10427 #: ../fish/guestfish-actions.pod:2872
10432 #: ../fish/guestfish-actions.pod:2874
10435 " lvcreate logvol volgroup mbytes\n"
10440 #: ../fish/guestfish-actions.pod:2876 ../src/guestfs-actions.pod:4314
10442 "This creates an LVM logical volume called C<logvol> on the volume group "
10443 "C<volgroup>, with C<size> megabytes."
10447 #: ../fish/guestfish-actions.pod:2879
10448 msgid "lvm-canonical-lv-name"
10452 #: ../fish/guestfish-actions.pod:2881
10455 " lvm-canonical-lv-name lvname\n"
10460 #: ../fish/guestfish-actions.pod:2883 ../src/guestfs-actions.pod:4327
10462 "This converts alternative naming schemes for LVs that you might find to the "
10463 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
10468 #: ../fish/guestfish-actions.pod:2887 ../src/guestfs-actions.pod:4331
10470 "This command returns an error if the C<lvname> parameter does not refer to a "
10475 #: ../fish/guestfish-actions.pod:2890
10476 msgid "See also L</is-lv>."
10480 #: ../fish/guestfish-actions.pod:2892
10481 msgid "lvm-clear-filter"
10485 #: ../fish/guestfish-actions.pod:2894
10488 " lvm-clear-filter\n"
10493 #: ../fish/guestfish-actions.pod:2896
10495 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
10500 #: ../fish/guestfish-actions.pod:2899 ../fish/guestfish-actions.pod:2930
10501 #: ../src/guestfs-actions.pod:4349 ../src/guestfs-actions.pod:4391
10503 "This command also clears the LVM cache and performs a volume group scan."
10507 #: ../fish/guestfish-actions.pod:2902
10508 msgid "lvm-remove-all"
10512 #: ../fish/guestfish-actions.pod:2904
10515 " lvm-remove-all\n"
10520 #: ../fish/guestfish-actions.pod:2906 ../src/guestfs-actions.pod:4361
10522 "This command removes all LVM logical volumes, volume groups and physical "
10527 #: ../fish/guestfish-actions.pod:2912
10528 msgid "lvm-set-filter"
10532 #: ../fish/guestfish-actions.pod:2914
10535 " lvm-set-filter 'devices ...'\n"
10540 #: ../fish/guestfish-actions.pod:2916 ../src/guestfs-actions.pod:4377
10542 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10543 "block devices in the list C<devices>, and will ignore all other attached "
10548 #: ../fish/guestfish-actions.pod:2920 ../src/guestfs-actions.pod:4381
10550 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10551 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10552 "there are two types of duplication possible: either cloned PVs/VGs which "
10553 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10554 "same name. In normal operation you cannot create this situation, but you "
10555 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10556 "inside the LVM metadata."
10560 #: ../fish/guestfish-actions.pod:2933 ../src/guestfs-actions.pod:4394
10561 msgid "You can filter whole block devices or individual partitions."
10565 #: ../fish/guestfish-actions.pod:2935 ../src/guestfs-actions.pod:4396
10567 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10568 "filesystem), even if you are not filtering out that VG."
10572 #: ../fish/guestfish-actions.pod:2939
10577 #: ../fish/guestfish-actions.pod:2941
10580 " lvremove device\n"
10585 #: ../fish/guestfish-actions.pod:2943 ../src/guestfs-actions.pod:4410
10587 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10588 "LV, such as C</dev/VG/LV>."
10592 #: ../fish/guestfish-actions.pod:2946 ../src/guestfs-actions.pod:4413
10594 "You can also remove all LVs in a volume group by specifying the VG name, C</"
10599 #: ../fish/guestfish-actions.pod:2949
10604 #: ../fish/guestfish-actions.pod:2951
10607 " lvrename logvol newlogvol\n"
10612 #: ../fish/guestfish-actions.pod:2953 ../src/guestfs-actions.pod:4427
10613 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10617 #: ../fish/guestfish-actions.pod:2955
10622 #: ../fish/guestfish-actions.pod:2957
10625 " lvresize device mbytes\n"
10630 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4440
10632 "This resizes (expands or shrinks) an existing LVM logical volume to "
10633 "C<mbytes>. When reducing, data in the reduced part is lost."
10637 #: ../fish/guestfish-actions.pod:2963
10638 msgid "lvresize-free"
10642 #: ../fish/guestfish-actions.pod:2965
10645 " lvresize-free lv percent\n"
10650 #: ../fish/guestfish-actions.pod:2967 ../src/guestfs-actions.pod:4455
10652 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10653 "remaining free space in the volume group. Commonly you would call this with "
10654 "pc = 100 which expands the logical volume as much as possible, using all "
10655 "remaining free space in the volume group."
10659 #: ../fish/guestfish-actions.pod:2973
10664 #: ../fish/guestfish-actions.pod:2975
10672 #: ../fish/guestfish-actions.pod:2977 ../src/guestfs-actions.pod:4470
10674 "List all the logical volumes detected. This is the equivalent of the L<lvs"
10679 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4473
10681 "This returns a list of the logical volume device names (eg. C</dev/"
10682 "VolGroup00/LogVol00>)."
10686 #: ../fish/guestfish-actions.pod:2983
10687 msgid "See also L</lvs-full>, L</list-filesystems>."
10691 #: ../fish/guestfish-actions.pod:2985
10696 #: ../fish/guestfish-actions.pod:2987
10704 #: ../fish/guestfish-actions.pod:2989 ../src/guestfs-actions.pod:4489
10706 "List all the logical volumes detected. This is the equivalent of the L<lvs"
10707 "(8)> command. The \"full\" version includes all fields."
10711 #: ../fish/guestfish-actions.pod:2992
10716 #: ../fish/guestfish-actions.pod:2994
10724 #: ../fish/guestfish-actions.pod:2996 ../src/guestfs-actions.pod:4504
10725 msgid "This command returns the UUID of the LVM LV C<device>."
10729 #: ../fish/guestfish-actions.pod:2998
10734 #: ../fish/guestfish-actions.pod:3000
10737 " lxattrlist path 'names ...'\n"
10742 #: ../fish/guestfish-actions.pod:3002 ../src/guestfs-actions.pod:4518
10744 "This call allows you to get the extended attributes of multiple files, where "
10745 "all files are in the directory C<path>. C<names> is the list of files from "
10750 #: ../fish/guestfish-actions.pod:3006 ../src/guestfs-actions.pod:4522
10752 "On return you get a flat list of xattr structs which must be interpreted "
10753 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10754 "C<attrval> in this struct is zero-length to indicate there was an error "
10755 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10756 "number (the number of following attributes for this file, which could be C<"
10757 "\"0\">). Then after the first xattr struct are the zero or more attributes "
10758 "for the first named file. This repeats for the second and subsequent files."
10762 #: ../fish/guestfish-actions.pod:3016
10764 "This call is intended for programs that want to efficiently list a directory "
10765 "contents without making many round-trips. See also L</lstatlist> for a "
10766 "similarly efficient call for getting standard stats. Very long directory "
10767 "listings might cause the protocol message size to be exceeded, causing this "
10768 "call to fail. The caller must split up such requests into smaller groups of "
10773 #: ../fish/guestfish-actions.pod:3024
10778 #: ../fish/guestfish-actions.pod:3026
10786 #: ../fish/guestfish-actions.pod:3028 ../src/guestfs-actions.pod:4552
10787 msgid "Create a directory named C<path>."
10791 #: ../fish/guestfish-actions.pod:3030
10796 #: ../fish/guestfish-actions.pod:3032
10799 " mkdir-mode path mode\n"
10804 #: ../fish/guestfish-actions.pod:3034 ../src/guestfs-actions.pod:4565
10806 "This command creates a directory, setting the initial permissions of the "
10807 "directory to C<mode>."
10811 #: ../fish/guestfish-actions.pod:3037 ../src/guestfs-actions.pod:4568
10813 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10814 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10819 #: ../fish/guestfish-actions.pod:3041
10820 msgid "See also L</mkdir>, L</umask>"
10824 #: ../fish/guestfish-actions.pod:3043
10829 #: ../fish/guestfish-actions.pod:3045
10837 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4584
10839 "Create a directory named C<path>, creating any parent directories as "
10840 "necessary. This is like the C<mkdir -p> shell command."
10844 #: ../fish/guestfish-actions.pod:3050
10849 #: ../fish/guestfish-actions.pod:3052
10852 " mkdtemp template\n"
10857 #: ../fish/guestfish-actions.pod:3054 ../src/guestfs-actions.pod:4597
10859 "This command creates a temporary directory. The C<template> parameter "
10860 "should be a full pathname for the temporary directory name with the final "
10861 "six characters being \"XXXXXX\"."
10865 #: ../fish/guestfish-actions.pod:3059 ../src/guestfs-actions.pod:4602
10867 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10868 "being suitable for Windows filesystems."
10872 #: ../fish/guestfish-actions.pod:3062 ../src/guestfs-actions.pod:4605
10873 msgid "The name of the temporary directory that was created is returned."
10877 #: ../fish/guestfish-actions.pod:3065 ../src/guestfs-actions.pod:4608
10878 msgid "The temporary directory is created with mode 0700 and is owned by root."
10882 #: ../fish/guestfish-actions.pod:3068 ../src/guestfs-actions.pod:4611
10884 "The caller is responsible for deleting the temporary directory and its "
10885 "contents after use."
10889 #: ../fish/guestfish-actions.pod:3071 ../src/guestfs-actions.pod:4614
10890 msgid "See also: L<mkdtemp(3)>"
10894 #: ../fish/guestfish-actions.pod:3073
10899 #: ../fish/guestfish-actions.pod:3075
10902 " mke2fs-J fstype blocksize device journal\n"
10907 #: ../fish/guestfish-actions.pod:3077 ../src/guestfs-actions.pod:4630
10909 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10910 "C<journal>. It is equivalent to the command:"
10914 #: ../fish/guestfish-actions.pod:3081 ../src/guestfs-actions.pod:4634
10917 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10922 #: ../fish/guestfish-actions.pod:3083
10923 msgid "See also L</mke2journal>."
10927 #: ../fish/guestfish-actions.pod:3085
10932 #: ../fish/guestfish-actions.pod:3087
10935 " mke2fs-JL fstype blocksize device label\n"
10940 #: ../fish/guestfish-actions.pod:3089 ../src/guestfs-actions.pod:4651
10942 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10943 "the journal labeled C<label>."
10947 #: ../fish/guestfish-actions.pod:3092
10948 msgid "See also L</mke2journal-L>."
10952 #: ../fish/guestfish-actions.pod:3094
10957 #: ../fish/guestfish-actions.pod:3096
10960 " mke2fs-JU fstype blocksize device uuid\n"
10965 #: ../fish/guestfish-actions.pod:3098 ../src/guestfs-actions.pod:4669
10967 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10968 "the journal with UUID C<uuid>."
10972 #: ../fish/guestfish-actions.pod:3101
10973 msgid "See also L</mke2journal-U>."
10977 #: ../fish/guestfish-actions.pod:3103
10978 msgid "mke2journal"
10982 #: ../fish/guestfish-actions.pod:3105
10985 " mke2journal blocksize device\n"
10990 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4685
10992 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10997 #: ../fish/guestfish-actions.pod:3110 ../src/guestfs-actions.pod:4688
11000 " mke2fs -O journal_dev -b blocksize device\n"
11005 #: ../fish/guestfish-actions.pod:3112
11006 msgid "mke2journal-L"
11010 #: ../fish/guestfish-actions.pod:3114
11013 " mke2journal-L blocksize label device\n"
11018 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4702
11019 msgid "This creates an ext2 external journal on C<device> with label C<label>."
11023 #: ../fish/guestfish-actions.pod:3118
11024 msgid "mke2journal-U"
11028 #: ../fish/guestfish-actions.pod:3120
11031 " mke2journal-U blocksize uuid device\n"
11036 #: ../fish/guestfish-actions.pod:3122 ../src/guestfs-actions.pod:4716
11037 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
11041 #: ../fish/guestfish-actions.pod:3124
11046 #: ../fish/guestfish-actions.pod:3126
11049 " mkfifo mode path\n"
11054 #: ../fish/guestfish-actions.pod:3128
11056 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
11057 "is just a convenient wrapper around L</mknod>."
11061 #: ../fish/guestfish-actions.pod:3134
11066 #: ../fish/guestfish-actions.pod:3136
11069 " mkfs fstype device\n"
11074 #: ../fish/guestfish-actions.pod:3138 ../src/guestfs-actions.pod:4746
11076 "This creates a filesystem on C<device> (usually a partition or LVM logical "
11077 "volume). The filesystem type is C<fstype>, for example C<ext3>."
11081 #: ../fish/guestfish-actions.pod:3142
11086 #: ../fish/guestfish-actions.pod:3144
11089 " mkfs-b fstype blocksize device\n"
11094 #: ../fish/guestfish-actions.pod:3146
11096 "This call is similar to L</mkfs>, but it allows you to control the block "
11097 "size of the resulting filesystem. Supported block sizes depend on the "
11098 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
11102 #: ../fish/guestfish-actions.pod:3151 ../fish/guestfish-actions.pod:3178
11103 #: ../src/guestfs-actions.pod:4774 ../src/guestfs-actions.pod:4812
11105 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
11110 #: ../fish/guestfish-actions.pod:3154
11112 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
11117 #: ../fish/guestfish-actions.pod:3161
11122 #: ../fish/guestfish-actions.pod:3163
11125 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
11130 #: ../fish/guestfish-actions.pod:3165 ../src/guestfs-actions.pod:4799
11132 "This function creates a filesystem on C<device>. The filesystem type is "
11133 "C<fstype>, for example C<ext3>."
11137 #: ../fish/guestfish-actions.pod:3172 ../src/guestfs-actions.pod:4806
11138 msgid "C<blocksize>"
11142 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4808
11144 "The filesystem block size. Supported block sizes depend on the filesystem "
11145 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
11150 #: ../fish/guestfish-actions.pod:3181 ../src/guestfs-actions.pod:4815
11151 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
11155 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4817
11156 msgid "C<features>"
11160 #: ../fish/guestfish-actions.pod:3185 ../src/guestfs-actions.pod:4819
11161 msgid "This passes the I<-O> parameter to the external mkfs program."
11165 #: ../fish/guestfish-actions.pod:3187 ../src/guestfs-actions.pod:4821
11167 "For certain filesystem types, this allows extra filesystem features to be "
11168 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
11172 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4825
11174 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
11179 #: ../fish/guestfish-actions.pod:3194 ../src/guestfs-actions.pod:4828
11184 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4830
11186 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
11187 "sets the inode size (only for ext2/3/4 filesystems at present)."
11191 #: ../fish/guestfish-actions.pod:3199 ../src/guestfs-actions.pod:4833
11192 msgid "C<sectorsize>"
11196 #: ../fish/guestfish-actions.pod:3201 ../src/guestfs-actions.pod:4835
11198 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
11199 "sets sector size for ufs filesystem."
11203 #: ../fish/guestfish-actions.pod:3208
11204 msgid "mkmountpoint"
11208 #: ../fish/guestfish-actions.pod:3210
11211 " mkmountpoint exemptpath\n"
11216 #: ../fish/guestfish-actions.pod:3212
11218 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
11219 "to create extra mountpoints before mounting the first filesystem."
11223 #: ../fish/guestfish-actions.pod:3216 ../src/guestfs-actions.pod:4878
11225 "These calls are I<only> necessary in some very limited circumstances, mainly "
11226 "the case where you want to mount a mix of unrelated and/or read-only "
11227 "filesystems together."
11231 #: ../fish/guestfish-actions.pod:3220 ../src/guestfs-actions.pod:4882
11233 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
11234 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
11235 "inside that. You can unpack this as follows in guestfish:"
11239 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4887
11242 " add-ro Fedora-11-i686-Live.iso\n"
11244 " mkmountpoint /cd\n"
11245 " mkmountpoint /sqsh\n"
11246 " mkmountpoint /ext3fs\n"
11247 " mount /dev/sda /cd\n"
11248 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
11249 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
11254 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4896
11255 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
11259 #: ../fish/guestfish-actions.pod:3236
11261 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
11262 "unexpected errors if you try to mix these calls. It is safest to manually "
11263 "unmount filesystems and remove mountpoints after use."
11267 #: ../fish/guestfish-actions.pod:3240
11269 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
11270 "for this to work for manual mountpoints, you must ensure that the innermost "
11271 "mountpoints have the longest pathnames, as in the example code above."
11275 #: ../fish/guestfish-actions.pod:3245 ../src/guestfs-actions.pod:4907
11277 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
11281 #: ../fish/guestfish-actions.pod:3247
11283 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
11284 "L</umount-all> to be called when the handle is closed which can also trigger "
11289 #: ../fish/guestfish-actions.pod:3251
11294 #: ../fish/guestfish-actions.pod:3253
11297 " mknod mode devmajor devminor path\n"
11302 #: ../fish/guestfish-actions.pod:3255 ../src/guestfs-actions.pod:4926
11304 "This call creates block or character special devices, or named pipes (FIFOs)."
11308 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:4929
11310 "The C<mode> parameter should be the mode, using the standard constants. "
11311 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11312 "used when creating block and character special devices."
11316 #: ../fish/guestfish-actions.pod:3263
11318 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11319 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11320 "regular file). These constants are available in the standard Linux header "
11321 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
11322 "wrappers around this command which bitwise OR in the appropriate constant "
11327 #: ../fish/guestfish-actions.pod:3273
11332 #: ../fish/guestfish-actions.pod:3275
11335 " mknod-b mode devmajor devminor path\n"
11340 #: ../fish/guestfish-actions.pod:3277
11342 "This call creates a block device node called C<path> with mode C<mode> and "
11343 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11344 "wrapper around L</mknod>."
11348 #: ../fish/guestfish-actions.pod:3283
11353 #: ../fish/guestfish-actions.pod:3285
11356 " mknod-c mode devmajor devminor path\n"
11361 #: ../fish/guestfish-actions.pod:3287
11363 "This call creates a char device node called C<path> with mode C<mode> and "
11364 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11365 "wrapper around L</mknod>."
11369 #: ../fish/guestfish-actions.pod:3293
11374 #: ../fish/guestfish-actions.pod:3295
11382 #: ../fish/guestfish-actions.pod:3297 ../src/guestfs-actions.pod:4992
11383 msgid "Create a swap partition on C<device>."
11387 #: ../fish/guestfish-actions.pod:3299
11392 #: ../fish/guestfish-actions.pod:3301
11395 " mkswap-L label device\n"
11400 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5005
11401 msgid "Create a swap partition on C<device> with label C<label>."
11405 #: ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5007
11407 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
11408 "sda>), just to a partition. This appears to be a limitation of the kernel "
11413 #: ../fish/guestfish-actions.pod:3309
11418 #: ../fish/guestfish-actions.pod:3311
11421 " mkswap-U uuid device\n"
11426 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5022
11427 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11431 #: ../fish/guestfish-actions.pod:3315
11432 msgid "mkswap-file"
11436 #: ../fish/guestfish-actions.pod:3317
11439 " mkswap-file path\n"
11444 #: ../fish/guestfish-actions.pod:3319 ../src/guestfs-actions.pod:5034
11445 msgid "Create a swap file."
11449 #: ../fish/guestfish-actions.pod:3321
11451 "This command just writes a swap file signature to an existing file. To "
11452 "create the file itself, use something like L</fallocate>."
11456 #: ../fish/guestfish-actions.pod:3324
11461 #: ../fish/guestfish-actions.pod:3326
11464 " modprobe modulename\n"
11469 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5049
11470 msgid "This loads a kernel module in the appliance."
11474 #: ../fish/guestfish-actions.pod:3330 ../src/guestfs-actions.pod:5051
11476 "The kernel module must have been whitelisted when libguestfs was built (see "
11477 "C<appliance/kmod.whitelist.in> in the source)."
11481 #: ../fish/guestfish-actions.pod:3333
11486 #: ../fish/guestfish-actions.pod:3335
11489 " mount device mountpoint\n"
11494 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5072
11496 "Mount a guest disk at a position in the filesystem. Block devices are named "
11497 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11498 "those block devices contain partitions, they will have the usual names (eg. "
11499 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11503 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5078
11505 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11506 "mounted on C</> before others can be mounted. Other filesystems can only be "
11507 "mounted on directories which already exist."
11511 #: ../fish/guestfish-actions.pod:3348 ../src/guestfs-actions.pod:5083
11513 "The mounted filesystem is writable, if we have sufficient permissions on the "
11514 "underlying device."
11518 #: ../fish/guestfish-actions.pod:3351
11520 "B<Important note:> When you use this call, the filesystem options C<sync> "
11521 "and C<noatime> are set implicitly. This was originally done because we "
11522 "thought it would improve reliability, but it turns out that I<-o sync> has a "
11523 "very large negative performance impact and negligible effect on "
11524 "reliability. Therefore we recommend that you avoid using L</mount> in any "
11525 "code that needs performance, and instead use L</mount-options> (use an empty "
11526 "string for the first parameter if you don't want any options)."
11530 #: ../fish/guestfish-actions.pod:3361
11532 "I<This function is deprecated.> In new code, use the L</mount_options> call "
11537 #: ../fish/guestfish-actions.pod:3368
11542 #: ../fish/guestfish-actions.pod:3370
11545 " mount-9p mounttag mountpoint [options:..]\n"
11550 #: ../fish/guestfish-actions.pod:3372 ../src/guestfs-actions.pod:5115
11552 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
11557 #: ../fish/guestfish-actions.pod:3375 ../src/guestfs-actions.pod:5118
11559 "If required, C<trans=virtio> will be automatically added to the options. "
11560 "Any other options required can be passed in the optional C<options> "
11565 #: ../fish/guestfish-actions.pod:3381
11570 #: ../fish/guestfish-actions.pod:3383
11573 " mount-loop file mountpoint\n"
11578 #: ../fish/guestfish-actions.pod:3385 ../src/guestfs-actions.pod:5157
11580 "This command lets you mount C<file> (a filesystem image in a file) on a "
11581 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11586 #: ../fish/guestfish-actions.pod:3389
11587 msgid "mount-options"
11591 #: ../fish/guestfish-actions.pod:3391
11594 " mount-options options device mountpoint\n"
11599 #: ../fish/guestfish-actions.pod:3393
11601 "This is the same as the L</mount> command, but it allows you to set the "
11602 "mount options as for the L<mount(8)> I<-o> flag."
11606 #: ../fish/guestfish-actions.pod:3397 ../src/guestfs-actions.pod:5177
11608 "If the C<options> parameter is an empty string, then no options are passed "
11609 "(all options default to whatever the filesystem uses)."
11613 #: ../fish/guestfish-actions.pod:3401
11618 #: ../fish/guestfish-actions.pod:3403
11621 " mount-ro device mountpoint\n"
11626 #: ../fish/guestfish-actions.pod:3405
11628 "This is the same as the L</mount> command, but it mounts the filesystem with "
11629 "the read-only (I<-o ro>) flag."
11633 #: ../fish/guestfish-actions.pod:3408
11638 #: ../fish/guestfish-actions.pod:3410
11641 " mount-vfs options vfstype device mountpoint\n"
11646 #: ../fish/guestfish-actions.pod:3412
11648 "This is the same as the L</mount> command, but it allows you to set both the "
11649 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
11653 #: ../fish/guestfish-actions.pod:3416
11654 msgid "mountpoints"
11658 #: ../fish/guestfish-actions.pod:3418
11666 #: ../fish/guestfish-actions.pod:3420
11668 "This call is similar to L</mounts>. That call returns a list of devices. "
11669 "This one returns a hash table (map) of device name to directory where the "
11670 "device is mounted."
11674 #: ../fish/guestfish-actions.pod:3424
11679 #: ../fish/guestfish-actions.pod:3426
11687 #: ../fish/guestfish-actions.pod:3428 ../src/guestfs-actions.pod:5238
11689 "This returns the list of currently mounted filesystems. It returns the list "
11690 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11694 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5241
11695 msgid "Some internal mounts are not shown."
11699 #: ../fish/guestfish-actions.pod:3433
11700 msgid "See also: L</mountpoints>"
11704 #: ../fish/guestfish-actions.pod:3435
11709 #: ../fish/guestfish-actions.pod:3437
11717 #: ../fish/guestfish-actions.pod:3439 ../src/guestfs-actions.pod:5258
11719 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11720 "destination filename or destination directory."
11724 #: ../fish/guestfish-actions.pod:3442
11725 msgid "ntfs-3g-probe"
11729 #: ../fish/guestfish-actions.pod:3444
11732 " ntfs-3g-probe true|false device\n"
11737 #: ../fish/guestfish-actions.pod:3446 ../src/guestfs-actions.pod:5272
11739 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11740 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
11741 "write, and some cannot be mounted at all)."
11745 #: ../fish/guestfish-actions.pod:3450 ../src/guestfs-actions.pod:5276
11747 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11748 "can be mounted read-write. Set it to false if you want to test if the "
11749 "volume can be mounted read-only."
11753 #: ../fish/guestfish-actions.pod:3454 ../src/guestfs-actions.pod:5280
11755 "The return value is an integer which C<0> if the operation would succeed, or "
11756 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11760 #: ../fish/guestfish-actions.pod:3458
11765 #: ../fish/guestfish-actions.pod:3460
11768 " ntfsresize device\n"
11773 #: ../fish/guestfish-actions.pod:3462 ../fish/guestfish-actions.pod:3486
11774 #: ../src/guestfs-actions.pod:5301 ../src/guestfs-actions.pod:5333
11776 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11777 "size of the underlying device."
11781 #: ../fish/guestfish-actions.pod:3465 ../src/guestfs-actions.pod:5304
11783 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
11784 "consistency check (for safety). You have to boot into Windows to perform "
11785 "this check and clear this condition. Furthermore, ntfsresize refuses to "
11786 "resize filesystems which have been marked in this way. So in effect it is "
11787 "not possible to call ntfsresize multiple times on a single filesystem "
11788 "without booting into Windows between each resize."
11792 #: ../fish/guestfish-actions.pod:3473 ../fish/guestfish-actions.pod:3512
11793 #: ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5359
11794 msgid "See also L<ntfsresize(8)>."
11798 #: ../fish/guestfish-actions.pod:3475 ../fish/guestfish-actions.pod:3523
11800 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
11805 #: ../fish/guestfish-actions.pod:3482
11806 msgid "ntfsresize-opts"
11810 #: ../fish/guestfish-actions.pod:3484
11813 " ntfsresize-opts device [size:..] [force:..]\n"
11818 #: ../fish/guestfish-actions.pod:3495 ../src/guestfs-actions.pod:5342
11820 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
11821 "resized to fit the container (eg. partition)."
11825 #: ../fish/guestfish-actions.pod:3498 ../src/guestfs-actions.pod:5345
11830 #: ../fish/guestfish-actions.pod:3500 ../src/guestfs-actions.pod:5347
11832 "If this option is true, then force the resize of the filesystem even if the "
11833 "filesystem is marked as requiring a consistency check."
11837 #: ../fish/guestfish-actions.pod:3503
11839 "After the resize operation, the filesystem is always marked as requiring a "
11840 "consistency check (for safety). You have to boot into Windows to perform "
11841 "this check and clear this condition. If you I<don't> set the C<force> "
11842 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
11843 "a single filesystem without booting into Windows between each resize."
11847 #: ../fish/guestfish-actions.pod:3516
11848 msgid "ntfsresize-size"
11852 #: ../fish/guestfish-actions.pod:3518
11855 " ntfsresize-size device size\n"
11860 #: ../fish/guestfish-actions.pod:3520
11862 "This command is the same as L</ntfsresize> except that it allows you to "
11863 "specify the new size (in bytes) explicitly."
11867 #: ../fish/guestfish-actions.pod:3530
11872 #: ../fish/guestfish-actions.pod:3532
11875 " part-add device prlogex startsect endsect\n"
11880 #: ../fish/guestfish-actions.pod:3534
11882 "This command adds a partition to C<device>. If there is no partition table "
11883 "on the device, call L</part-init> first."
11887 #: ../fish/guestfish-actions.pod:3537 ../src/guestfs-actions.pod:5420
11889 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11890 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11891 "C<logical>) and C<e> (or C<extended>) partition types."
11895 #: ../fish/guestfish-actions.pod:3542 ../src/guestfs-actions.pod:5425
11897 "C<startsect> and C<endsect> are the start and end of the partition in "
11898 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11899 "from the end of the disk (C<-1> is the last sector)."
11903 #: ../fish/guestfish-actions.pod:3546
11905 "Creating a partition which covers the whole disk is not so easy. Use L</"
11906 "part-disk> to do that."
11910 #: ../fish/guestfish-actions.pod:3549
11915 #: ../fish/guestfish-actions.pod:3551
11918 " part-del device partnum\n"
11923 #: ../fish/guestfish-actions.pod:3553 ../src/guestfs-actions.pod:5443
11924 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11928 #: ../fish/guestfish-actions.pod:3555 ../src/guestfs-actions.pod:5445
11930 "Note that in the case of MBR partitioning, deleting an extended partition "
11931 "also deletes any logical partitions it contains."
11935 #: ../fish/guestfish-actions.pod:3559
11940 #: ../fish/guestfish-actions.pod:3561
11943 " part-disk device parttype\n"
11948 #: ../fish/guestfish-actions.pod:3563
11950 "This command is simply a combination of L</part-init> followed by L</part-"
11951 "add> to create a single primary partition covering the whole disk."
11955 #: ../fish/guestfish-actions.pod:3567
11957 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11958 "possible values are described in L</part-init>."
11962 #: ../fish/guestfish-actions.pod:3573
11963 msgid "part-get-bootable"
11967 #: ../fish/guestfish-actions.pod:3575
11970 " part-get-bootable device partnum\n"
11975 #: ../fish/guestfish-actions.pod:3577 ../src/guestfs-actions.pod:5481
11977 "This command returns true if the partition C<partnum> on C<device> has the "
11978 "bootable flag set."
11982 #: ../fish/guestfish-actions.pod:3580
11983 msgid "See also L</part-set-bootable>."
11987 #: ../fish/guestfish-actions.pod:3582
11988 msgid "part-get-mbr-id"
11992 #: ../fish/guestfish-actions.pod:3584
11995 " part-get-mbr-id device partnum\n"
12000 #: ../fish/guestfish-actions.pod:3586 ../src/guestfs-actions.pod:5497
12002 "Returns the MBR type byte (also known as the ID byte) from the numbered "
12003 "partition C<partnum>."
12007 #: ../fish/guestfish-actions.pod:3589 ../fish/guestfish-actions.pod:3733
12009 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
12010 "undefined results for other partition table types (see L</part-get-"
12015 #: ../fish/guestfish-actions.pod:3593
12016 msgid "part-get-parttype"
12020 #: ../fish/guestfish-actions.pod:3595
12023 " part-get-parttype device\n"
12028 #: ../fish/guestfish-actions.pod:3597 ../src/guestfs-actions.pod:5514
12030 "This command examines the partition table on C<device> and returns the "
12031 "partition table type (format) being used."
12035 #: ../fish/guestfish-actions.pod:3600
12037 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
12038 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
12039 "possible, although unusual. See L</part-init> for a full list."
12043 #: ../fish/guestfish-actions.pod:3605
12048 #: ../fish/guestfish-actions.pod:3607
12051 " part-init device parttype\n"
12056 #: ../fish/guestfish-actions.pod:3609 ../src/guestfs-actions.pod:5534
12058 "This creates an empty partition table on C<device> of one of the partition "
12059 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
12060 "(for large disks)."
12064 #: ../fish/guestfish-actions.pod:3613
12066 "Initially there are no partitions. Following this, you should call L</part-"
12067 "add> for each partition required."
12071 #: ../fish/guestfish-actions.pod:3616 ../src/guestfs-actions.pod:5541
12072 msgid "Possible values for C<parttype> are:"
12076 #: ../fish/guestfish-actions.pod:3620 ../src/guestfs-actions.pod:5545
12081 #: ../fish/guestfish-actions.pod:3622 ../src/guestfs-actions.pod:5547
12086 #: ../fish/guestfish-actions.pod:3624 ../src/guestfs-actions.pod:5549
12087 msgid "Intel EFI / GPT partition table."
12091 #: ../fish/guestfish-actions.pod:3626 ../src/guestfs-actions.pod:5551
12093 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
12094 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
12095 "the C<mbr> format."
12099 #: ../fish/guestfish-actions.pod:3630 ../src/guestfs-actions.pod:5555
12104 #: ../fish/guestfish-actions.pod:3632 ../src/guestfs-actions.pod:5557
12109 #: ../fish/guestfish-actions.pod:3634 ../src/guestfs-actions.pod:5559
12111 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
12112 "Windows. This partition type will B<only> work for device sizes up to 2 "
12113 "TB. For large disks we recommend using C<gpt>."
12117 #: ../fish/guestfish-actions.pod:3641 ../src/guestfs-actions.pod:5566
12119 "Other partition table types that may work but are not supported include:"
12123 #: ../fish/guestfish-actions.pod:3646 ../src/guestfs-actions.pod:5571
12128 #: ../fish/guestfish-actions.pod:3648 ../src/guestfs-actions.pod:5573
12129 msgid "AIX disk labels."
12133 #: ../fish/guestfish-actions.pod:3650 ../src/guestfs-actions.pod:5575
12138 #: ../fish/guestfish-actions.pod:3652 ../src/guestfs-actions.pod:5577
12143 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5579
12144 msgid "Amiga \"Rigid Disk Block\" format."
12148 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5581
12153 #: ../fish/guestfish-actions.pod:3658 ../src/guestfs-actions.pod:5583
12154 msgid "BSD disk labels."
12158 #: ../fish/guestfish-actions.pod:3660 ../src/guestfs-actions.pod:5585
12163 #: ../fish/guestfish-actions.pod:3662 ../src/guestfs-actions.pod:5587
12164 msgid "DASD, used on IBM mainframes."
12168 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5589
12173 #: ../fish/guestfish-actions.pod:3666 ../src/guestfs-actions.pod:5591
12174 msgid "MIPS/SGI volumes."
12178 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5593
12183 #: ../fish/guestfish-actions.pod:3670 ../src/guestfs-actions.pod:5595
12184 msgid "Old Mac partition format. Modern Macs use C<gpt>."
12188 #: ../fish/guestfish-actions.pod:3672 ../src/guestfs-actions.pod:5597
12193 #: ../fish/guestfish-actions.pod:3674 ../src/guestfs-actions.pod:5599
12194 msgid "NEC PC-98 format, common in Japan apparently."
12198 #: ../fish/guestfish-actions.pod:3676 ../src/guestfs-actions.pod:5601
12203 #: ../fish/guestfish-actions.pod:3678 ../src/guestfs-actions.pod:5603
12204 msgid "Sun disk labels."
12208 #: ../fish/guestfish-actions.pod:3682
12213 #: ../fish/guestfish-actions.pod:3684
12216 " part-list device\n"
12221 #: ../fish/guestfish-actions.pod:3686 ../src/guestfs-actions.pod:5617
12223 "This command parses the partition table on C<device> and returns the list of "
12224 "partitions found."
12228 #: ../fish/guestfish-actions.pod:3689 ../src/guestfs-actions.pod:5620
12229 msgid "The fields in the returned structure are:"
12233 #: ../fish/guestfish-actions.pod:3693 ../src/guestfs-actions.pod:5624
12234 msgid "B<part_num>"
12238 #: ../fish/guestfish-actions.pod:3695 ../src/guestfs-actions.pod:5626
12239 msgid "Partition number, counting from 1."
12243 #: ../fish/guestfish-actions.pod:3697 ../src/guestfs-actions.pod:5628
12244 msgid "B<part_start>"
12248 #: ../fish/guestfish-actions.pod:3699
12250 "Start of the partition I<in bytes>. To get sectors you have to divide by "
12251 "the device's sector size, see L</blockdev-getss>."
12255 #: ../fish/guestfish-actions.pod:3702 ../src/guestfs-actions.pod:5633
12256 msgid "B<part_end>"
12260 #: ../fish/guestfish-actions.pod:3704 ../src/guestfs-actions.pod:5635
12261 msgid "End of the partition in bytes."
12265 #: ../fish/guestfish-actions.pod:3706 ../src/guestfs-actions.pod:5637
12266 msgid "B<part_size>"
12270 #: ../fish/guestfish-actions.pod:3708 ../src/guestfs-actions.pod:5639
12271 msgid "Size of the partition in bytes."
12275 #: ../fish/guestfish-actions.pod:3712
12276 msgid "part-set-bootable"
12280 #: ../fish/guestfish-actions.pod:3714
12283 " part-set-bootable device partnum true|false\n"
12288 #: ../fish/guestfish-actions.pod:3716 ../src/guestfs-actions.pod:5657
12290 "This sets the bootable flag on partition numbered C<partnum> on device "
12291 "C<device>. Note that partitions are numbered from 1."
12295 #: ../fish/guestfish-actions.pod:3719 ../src/guestfs-actions.pod:5660
12297 "The bootable flag is used by some operating systems (notably Windows) to "
12298 "determine which partition to boot from. It is by no means universally "
12303 #: ../fish/guestfish-actions.pod:3723
12304 msgid "part-set-mbr-id"
12308 #: ../fish/guestfish-actions.pod:3725
12311 " part-set-mbr-id device partnum idbyte\n"
12316 #: ../fish/guestfish-actions.pod:3727 ../src/guestfs-actions.pod:5676
12318 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12319 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12320 "documentation are in fact hexadecimal numbers, but usually documented "
12321 "without any leading \"0x\" which might be confusing."
12325 #: ../fish/guestfish-actions.pod:3737
12326 msgid "part-set-name"
12330 #: ../fish/guestfish-actions.pod:3739
12333 " part-set-name device partnum name\n"
12338 #: ../fish/guestfish-actions.pod:3741 ../src/guestfs-actions.pod:5698
12340 "This sets the partition name on partition numbered C<partnum> on device "
12341 "C<device>. Note that partitions are numbered from 1."
12345 #: ../fish/guestfish-actions.pod:3744 ../src/guestfs-actions.pod:5701
12347 "The partition name can only be set on certain types of partition table. "
12348 "This works on C<gpt> but not on C<mbr> partitions."
12352 #: ../fish/guestfish-actions.pod:3747
12353 msgid "part-to-dev"
12357 #: ../fish/guestfish-actions.pod:3749
12360 " part-to-dev partition\n"
12365 #: ../fish/guestfish-actions.pod:3751 ../src/guestfs-actions.pod:5714
12367 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12368 "partition number, returning the device name (eg. \"/dev/sdb\")."
12372 #: ../fish/guestfish-actions.pod:3755
12374 "The named partition must exist, for example as a string returned from L</"
12375 "list-partitions>."
12379 #: ../fish/guestfish-actions.pod:3758
12380 msgid "ping-daemon"
12384 #: ../fish/guestfish-actions.pod:3760
12392 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5731
12394 "This is a test probe into the guestfs daemon running inside the qemu "
12395 "subprocess. Calling this function checks that the daemon responds to the "
12396 "ping message, without affecting the daemon or attached block device(s) in "
12401 #: ../fish/guestfish-actions.pod:3767
12406 #: ../fish/guestfish-actions.pod:3769
12409 " pread path count offset\n"
12414 #: ../fish/guestfish-actions.pod:3771 ../src/guestfs-actions.pod:5749
12416 "This command lets you read part of a file. It reads C<count> bytes of the "
12417 "file, starting at C<offset>, from file C<path>."
12421 #: ../fish/guestfish-actions.pod:3774 ../fish/guestfish-actions.pod:3789
12422 #: ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5778
12424 "This may read fewer bytes than requested. For further details see the "
12425 "L<pread(2)> system call."
12429 #: ../fish/guestfish-actions.pod:3777
12430 msgid "See also L</pwrite>, L</pread-device>."
12434 #: ../fish/guestfish-actions.pod:3782
12435 msgid "pread-device"
12439 #: ../fish/guestfish-actions.pod:3784
12442 " pread-device device count offset\n"
12447 #: ../fish/guestfish-actions.pod:3786 ../src/guestfs-actions.pod:5775
12449 "This command lets you read part of a file. It reads C<count> bytes of "
12450 "C<device>, starting at C<offset>."
12454 #: ../fish/guestfish-actions.pod:3792
12455 msgid "See also L</pread>."
12459 #: ../fish/guestfish-actions.pod:3797
12464 #: ../fish/guestfish-actions.pod:3799
12467 " pvcreate device\n"
12472 #: ../fish/guestfish-actions.pod:3801 ../src/guestfs-actions.pod:5798
12474 "This creates an LVM physical volume on the named C<device>, where C<device> "
12475 "should usually be a partition name such as C</dev/sda1>."
12479 #: ../fish/guestfish-actions.pod:3805
12484 #: ../fish/guestfish-actions.pod:3807
12487 " pvremove device\n"
12492 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5812
12494 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12499 #: ../fish/guestfish-actions.pod:3812 ../src/guestfs-actions.pod:5815
12501 "The implementation uses the C<pvremove> command which refuses to wipe "
12502 "physical volumes that contain any volume groups, so you have to remove those "
12507 #: ../fish/guestfish-actions.pod:3816
12512 #: ../fish/guestfish-actions.pod:3818
12515 " pvresize device\n"
12520 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5829
12522 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12523 "the new size of the underlying device."
12527 #: ../fish/guestfish-actions.pod:3823
12528 msgid "pvresize-size"
12532 #: ../fish/guestfish-actions.pod:3825
12535 " pvresize-size device size\n"
12540 #: ../fish/guestfish-actions.pod:3827
12542 "This command is the same as L</pvresize> except that it allows you to "
12543 "specify the new size (in bytes) explicitly."
12547 #: ../fish/guestfish-actions.pod:3830
12552 #: ../fish/guestfish-actions.pod:3832
12560 #: ../fish/guestfish-actions.pod:3834 ../src/guestfs-actions.pod:5855
12562 "List all the physical volumes detected. This is the equivalent of the L<pvs"
12567 #: ../fish/guestfish-actions.pod:3837 ../src/guestfs-actions.pod:5858
12569 "This returns a list of just the device names that contain PVs (eg. C</dev/"
12574 #: ../fish/guestfish-actions.pod:3840
12575 msgid "See also L</pvs-full>."
12579 #: ../fish/guestfish-actions.pod:3842
12584 #: ../fish/guestfish-actions.pod:3844
12592 #: ../fish/guestfish-actions.pod:3846 ../src/guestfs-actions.pod:5874
12594 "List all the physical volumes detected. This is the equivalent of the L<pvs"
12595 "(8)> command. The \"full\" version includes all fields."
12599 #: ../fish/guestfish-actions.pod:3849
12604 #: ../fish/guestfish-actions.pod:3851
12612 #: ../fish/guestfish-actions.pod:3853 ../src/guestfs-actions.pod:5889
12613 msgid "This command returns the UUID of the LVM PV C<device>."
12617 #: ../fish/guestfish-actions.pod:3855
12622 #: ../fish/guestfish-actions.pod:3857
12625 " pwrite path content offset\n"
12630 #: ../fish/guestfish-actions.pod:3859 ../src/guestfs-actions.pod:5905
12632 "This command writes to part of a file. It writes the data buffer C<content> "
12633 "to the file C<path> starting at offset C<offset>."
12637 #: ../fish/guestfish-actions.pod:3862 ../src/guestfs-actions.pod:5908
12639 "This command implements the L<pwrite(2)> system call, and like that system "
12640 "call it may not write the full data requested. The return value is the "
12641 "number of bytes that were actually written to the file. This could even be "
12642 "0, although short writes are unlikely for regular files in ordinary "
12647 #: ../fish/guestfish-actions.pod:3868
12648 msgid "See also L</pread>, L</pwrite-device>."
12652 #: ../fish/guestfish-actions.pod:3873
12653 msgid "pwrite-device"
12657 #: ../fish/guestfish-actions.pod:3875
12660 " pwrite-device device content offset\n"
12665 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:5932
12667 "This command writes to part of a device. It writes the data buffer "
12668 "C<content> to C<device> starting at offset C<offset>."
12672 #: ../fish/guestfish-actions.pod:3880 ../src/guestfs-actions.pod:5935
12674 "This command implements the L<pwrite(2)> system call, and like that system "
12675 "call it may not write the full data requested (although short writes to disk "
12676 "devices and partitions are probably impossible with standard Linux kernels)."
12680 #: ../fish/guestfish-actions.pod:3885
12681 msgid "See also L</pwrite>."
12685 #: ../fish/guestfish-actions.pod:3890
12690 #: ../fish/guestfish-actions.pod:3892
12693 " read-file path\n"
12698 #: ../fish/guestfish-actions.pod:3894 ../src/guestfs-actions.pod:5956
12699 msgid "This calls returns the contents of the file C<path> as a buffer."
12703 #: ../fish/guestfish-actions.pod:3897
12705 "Unlike L</cat>, this function can correctly handle files that contain "
12706 "embedded ASCII NUL characters. However unlike L</download>, this function "
12707 "is limited in the total size of file that can be handled."
12711 #: ../fish/guestfish-actions.pod:3905
12716 #: ../fish/guestfish-actions.pod:3907
12719 " read-lines path\n"
12724 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:5981
12726 "The file contents are returned as a list of lines. Trailing C<LF> and "
12727 "C<CRLF> character sequences are I<not> returned."
12731 #: ../fish/guestfish-actions.pod:3914
12733 "Note that this function cannot correctly handle binary files (specifically, "
12734 "files containing C<\\0> character which is treated as end of line). For "
12735 "those you need to use the L</read-file> function which has a more complex "
12740 #: ../fish/guestfish-actions.pod:3919
12745 #: ../fish/guestfish-actions.pod:3921
12753 #: ../fish/guestfish-actions.pod:3923 ../src/guestfs-actions.pod:6001
12754 msgid "This returns the list of directory entries in directory C<dir>."
12758 #: ../fish/guestfish-actions.pod:3925 ../src/guestfs-actions.pod:6003
12760 "All entries in the directory are returned, including C<.> and C<..>. The "
12761 "entries are I<not> sorted, but returned in the same order as the underlying "
12766 #: ../fish/guestfish-actions.pod:3929 ../src/guestfs-actions.pod:6007
12768 "Also this call returns basic file type information about each file. The "
12769 "C<ftyp> field will contain one of the following characters:"
12773 #: ../fish/guestfish-actions.pod:3934 ../src/guestfs-actions.pod:6012
12778 #: ../fish/guestfish-actions.pod:3936 ../src/guestfs-actions.pod:6014
12779 msgid "Block special"
12783 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6016
12788 #: ../fish/guestfish-actions.pod:3940 ../src/guestfs-actions.pod:6018
12789 msgid "Char special"
12793 #: ../fish/guestfish-actions.pod:3942 ../src/guestfs-actions.pod:6020
12798 #: ../fish/guestfish-actions.pod:3944 ../src/guestfs-actions.pod:6022
12803 #: ../fish/guestfish-actions.pod:3946 ../src/guestfs-actions.pod:6024
12808 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6026
12809 msgid "FIFO (named pipe)"
12813 #: ../fish/guestfish-actions.pod:3950 ../src/guestfs-actions.pod:6028
12818 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6030
12819 msgid "Symbolic link"
12823 #: ../fish/guestfish-actions.pod:3954 ../src/guestfs-actions.pod:6032
12828 #: ../fish/guestfish-actions.pod:3956 ../src/guestfs-actions.pod:6034
12829 msgid "Regular file"
12833 #: ../fish/guestfish-actions.pod:3958 ../src/guestfs-actions.pod:6036
12838 #: ../fish/guestfish-actions.pod:3960 ../src/guestfs-actions.pod:6038
12843 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6040
12848 #: ../fish/guestfish-actions.pod:3964 ../src/guestfs-actions.pod:6042
12849 msgid "Unknown file type"
12853 #: ../fish/guestfish-actions.pod:3966 ../src/guestfs-actions.pod:6044
12858 #: ../fish/guestfish-actions.pod:3968 ../src/guestfs-actions.pod:6046
12860 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12864 #: ../fish/guestfish-actions.pod:3973
12866 "This function is primarily intended for use by programs. To get a simple "
12867 "list of names, use L</ls>. To get a printable directory for human "
12868 "consumption, use L</ll>."
12872 #: ../fish/guestfish-actions.pod:3977
12877 #: ../fish/guestfish-actions.pod:3979
12885 #: ../fish/guestfish-actions.pod:3981 ../src/guestfs-actions.pod:6067
12886 msgid "This command reads the target of a symbolic link."
12890 #: ../fish/guestfish-actions.pod:3983
12891 msgid "readlinklist"
12895 #: ../fish/guestfish-actions.pod:3985
12898 " readlinklist path 'names ...'\n"
12903 #: ../fish/guestfish-actions.pod:3987 ../src/guestfs-actions.pod:6081
12905 "This call allows you to do a C<readlink> operation on multiple files, where "
12906 "all files are in the directory C<path>. C<names> is the list of files from "
12911 #: ../fish/guestfish-actions.pod:3991 ../src/guestfs-actions.pod:6085
12913 "On return you get a list of strings, with a one-to-one correspondence to the "
12914 "C<names> list. Each string is the value of the symbolic link."
12918 #: ../fish/guestfish-actions.pod:3995 ../src/guestfs-actions.pod:6089
12920 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12921 "result string is the empty string C<\"\">. However the whole operation is "
12922 "completed even if there were C<readlink(2)> errors, and so you can call this "
12923 "function with names where you don't know if they are symbolic links already "
12924 "(albeit slightly less efficient)."
12928 #: ../fish/guestfish-actions.pod:4002 ../src/guestfs-actions.pod:6096
12930 "This call is intended for programs that want to efficiently list a directory "
12931 "contents without making many round-trips. Very long directory listings "
12932 "might cause the protocol message size to be exceeded, causing this call to "
12933 "fail. The caller must split up such requests into smaller groups of names."
12937 #: ../fish/guestfish-actions.pod:4009
12942 #: ../fish/guestfish-actions.pod:4011
12950 #: ../fish/guestfish-actions.pod:4013 ../src/guestfs-actions.pod:6115
12952 "Return the canonicalized absolute pathname of C<path>. The returned path "
12953 "has no C<.>, C<..> or symbolic link path elements."
12957 #: ../fish/guestfish-actions.pod:4016
12958 msgid "removexattr"
12962 #: ../fish/guestfish-actions.pod:4018
12965 " removexattr xattr path\n"
12970 #: ../fish/guestfish-actions.pod:4020 ../src/guestfs-actions.pod:6130
12972 "This call removes the extended attribute named C<xattr> of the file C<path>."
12976 #: ../fish/guestfish-actions.pod:4023
12977 msgid "See also: L</lremovexattr>, L<attr(5)>."
12981 #: ../fish/guestfish-actions.pod:4025
12986 #: ../fish/guestfish-actions.pod:4027
12989 " resize2fs device\n"
12994 #: ../fish/guestfish-actions.pod:4029 ../src/guestfs-actions.pod:6145
12996 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12997 "underlying device."
13001 #: ../fish/guestfish-actions.pod:4032
13003 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
13004 "before calling this command. For unknown reasons C<resize2fs> sometimes "
13005 "gives an error about this and sometimes not. In any case, it is always safe "
13006 "to call L</e2fsck-f> before calling this function."
13010 #: ../fish/guestfish-actions.pod:4038
13011 msgid "resize2fs-M"
13015 #: ../fish/guestfish-actions.pod:4040
13018 " resize2fs-M device\n"
13023 #: ../fish/guestfish-actions.pod:4042
13025 "This command is the same as L</resize2fs>, but the filesystem is resized to "
13026 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
13031 #: ../fish/guestfish-actions.pod:4046
13033 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
13034 "and read the C<Block size> and C<Block count> values. These two numbers, "
13035 "multiplied together, give the resulting size of the minimal filesystem in "
13040 #: ../fish/guestfish-actions.pod:4051
13041 msgid "resize2fs-size"
13045 #: ../fish/guestfish-actions.pod:4053
13048 " resize2fs-size device size\n"
13053 #: ../fish/guestfish-actions.pod:4055
13055 "This command is the same as L</resize2fs> except that it allows you to "
13056 "specify the new size (in bytes) explicitly."
13060 #: ../fish/guestfish-actions.pod:4058
13065 #: ../fish/guestfish-actions.pod:4060
13073 #: ../fish/guestfish-actions.pod:4062 ../src/guestfs-actions.pod:6197
13074 msgid "Remove the single file C<path>."
13078 #: ../fish/guestfish-actions.pod:4064
13083 #: ../fish/guestfish-actions.pod:4066
13091 #: ../fish/guestfish-actions.pod:4068 ../src/guestfs-actions.pod:6209
13093 "Remove the file or directory C<path>, recursively removing the contents if "
13094 "its a directory. This is like the C<rm -rf> shell command."
13098 #: ../fish/guestfish-actions.pod:4072
13103 #: ../fish/guestfish-actions.pod:4074
13111 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6223
13112 msgid "Remove the single directory C<path>."
13116 #: ../fish/guestfish-actions.pod:4078
13117 msgid "rmmountpoint"
13121 #: ../fish/guestfish-actions.pod:4080
13124 " rmmountpoint exemptpath\n"
13129 #: ../fish/guestfish-actions.pod:4082
13131 "This calls removes a mountpoint that was previously created with L</"
13132 "mkmountpoint>. See L</mkmountpoint> for full details."
13136 #: ../fish/guestfish-actions.pod:4086
13137 msgid "scrub-device"
13141 #: ../fish/guestfish-actions.pod:4088
13144 " scrub-device device\n"
13149 #: ../fish/guestfish-actions.pod:4090 ../src/guestfs-actions.pod:6249
13151 "This command writes patterns over C<device> to make data retrieval more "
13156 #: ../fish/guestfish-actions.pod:4093 ../fish/guestfish-actions.pod:4108
13157 #: ../fish/guestfish-actions.pod:4121 ../src/guestfs-actions.pod:6252
13158 #: ../src/guestfs-actions.pod:6273 ../src/guestfs-actions.pod:6292
13160 "It is an interface to the L<scrub(1)> program. See that manual page for "
13165 #: ../fish/guestfish-actions.pod:4099
13170 #: ../fish/guestfish-actions.pod:4101
13173 " scrub-file file\n"
13178 #: ../fish/guestfish-actions.pod:4103 ../src/guestfs-actions.pod:6268
13180 "This command writes patterns over a file to make data retrieval more "
13185 #: ../fish/guestfish-actions.pod:4106 ../src/guestfs-actions.pod:6271
13186 msgid "The file is I<removed> after scrubbing."
13190 #: ../fish/guestfish-actions.pod:4111
13191 msgid "scrub-freespace"
13195 #: ../fish/guestfish-actions.pod:4113
13198 " scrub-freespace dir\n"
13203 #: ../fish/guestfish-actions.pod:4115
13205 "This command creates the directory C<dir> and then fills it with files until "
13206 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
13207 "deletes them. The intention is to scrub any free space on the partition "
13208 "containing C<dir>."
13212 #: ../fish/guestfish-actions.pod:4124
13217 #: ../fish/guestfish-actions.pod:4126
13222 #: ../fish/guestfish-actions.pod:4128
13225 " set-append append\n"
13230 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6305
13232 "This function is used to add additional options to the guest kernel command "
13237 #: ../fish/guestfish-actions.pod:4133 ../src/guestfs-actions.pod:6308
13239 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
13240 "environment variable."
13244 #: ../fish/guestfish-actions.pod:4136 ../src/guestfs-actions.pod:6311
13246 "Setting C<append> to C<NULL> means I<no> additional options are passed "
13247 "(libguestfs always adds a few of its own)."
13251 #: ../fish/guestfish-actions.pod:4139
13252 msgid "set-attach-method"
13256 #: ../fish/guestfish-actions.pod:4141
13257 msgid "attach-method"
13261 #: ../fish/guestfish-actions.pod:4143
13264 " set-attach-method attachmethod\n"
13269 #: ../fish/guestfish-actions.pod:4145 ../src/guestfs-actions.pod:6324
13271 "Set the method that libguestfs uses to connect to the back end guestfsd "
13272 "daemon. Possible methods are:"
13276 #: ../fish/guestfish-actions.pod:4150 ../src/guestfs-actions.pod:6329
13277 #: ../src/guestfs.pod:2823
13278 msgid "C<appliance>"
13282 #: ../fish/guestfish-actions.pod:4152 ../src/guestfs-actions.pod:6331
13284 "Launch an appliance and connect to it. This is the ordinary method and the "
13289 #: ../fish/guestfish-actions.pod:4155 ../src/guestfs-actions.pod:6334
13290 msgid "C<unix:I<path>>"
13294 #: ../fish/guestfish-actions.pod:4157 ../src/guestfs-actions.pod:6336
13295 msgid "Connect to the Unix domain socket I<path>."
13299 #: ../fish/guestfish-actions.pod:4159 ../src/guestfs-actions.pod:6338
13301 "This method lets you connect to an existing daemon or (using virtio-serial) "
13302 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
13303 "RUNNING DAEMONS>."
13307 #: ../fish/guestfish-actions.pod:4165
13308 msgid "set-autosync"
13312 #: ../fish/guestfish-actions.pod:4167
13317 #: ../fish/guestfish-actions.pod:4169
13320 " set-autosync true|false\n"
13325 #: ../fish/guestfish-actions.pod:4171 ../src/guestfs-actions.pod:6354
13327 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13328 "effort attempt to make filesystems consistent and synchronized when the "
13329 "handle is closed (also if the program exits without closing handles)."
13333 #: ../fish/guestfish-actions.pod:4176 ../src/guestfs-actions.pod:6359
13335 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13336 "disabled by default)."
13340 #: ../fish/guestfish-actions.pod:4179
13345 #: ../fish/guestfish-actions.pod:4181
13350 #: ../fish/guestfish-actions.pod:4183
13353 " set-direct true|false\n"
13358 #: ../fish/guestfish-actions.pod:4185 ../src/guestfs-actions.pod:6372
13360 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13361 "passed directly through to the appliance once it is launched."
13365 #: ../fish/guestfish-actions.pod:4189
13367 "One consequence of this is that log messages aren't caught by the library "
13368 "and handled by L</set-log-message-callback>, but go straight to stdout."
13372 #: ../fish/guestfish-actions.pod:4193 ../src/guestfs-actions.pod:6380
13373 msgid "You probably don't want to use this unless you know what you are doing."
13377 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6383
13378 msgid "The default is disabled."
13382 #: ../fish/guestfish-actions.pod:4198
13383 msgid "set-e2label"
13387 #: ../fish/guestfish-actions.pod:4200
13390 " set-e2label device label\n"
13395 #: ../fish/guestfish-actions.pod:4202 ../src/guestfs-actions.pod:6396
13397 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13398 "C<label>. Filesystem labels are limited to 16 characters."
13402 #: ../fish/guestfish-actions.pod:4206
13404 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
13405 "label on a filesystem."
13409 #: ../fish/guestfish-actions.pod:4209
13414 #: ../fish/guestfish-actions.pod:4211
13417 " set-e2uuid device uuid\n"
13422 #: ../fish/guestfish-actions.pod:4213 ../src/guestfs-actions.pod:6414
13424 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13425 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13426 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13430 #: ../fish/guestfish-actions.pod:4218
13432 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
13433 "UUID of a filesystem."
13437 #: ../fish/guestfish-actions.pod:4221
13438 msgid "set-memsize"
13442 #: ../fish/guestfish-actions.pod:4223
13447 #: ../fish/guestfish-actions.pod:4225
13450 " set-memsize memsize\n"
13455 #: ../fish/guestfish-actions.pod:4227
13457 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13458 "This only has any effect if called before L</launch>."
13462 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6436
13464 "You can also change this by setting the environment variable "
13465 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
13469 #: ../fish/guestfish-actions.pod:4238
13470 msgid "set-network"
13474 #: ../fish/guestfish-actions.pod:4240
13479 #: ../fish/guestfish-actions.pod:4242
13482 " set-network true|false\n"
13487 #: ../fish/guestfish-actions.pod:4244 ../src/guestfs-actions.pod:6453
13489 "If C<network> is true, then the network is enabled in the libguestfs "
13490 "appliance. The default is false."
13494 #: ../fish/guestfish-actions.pod:4247 ../src/guestfs-actions.pod:6456
13496 "This affects whether commands are able to access the network (see L<guestfs"
13497 "(3)/RUNNING COMMANDS>)."
13501 #: ../fish/guestfish-actions.pod:4250
13503 "You must call this before calling L</launch>, otherwise it has no effect."
13507 #: ../fish/guestfish-actions.pod:4253
13512 #: ../fish/guestfish-actions.pod:4257
13515 " set-path searchpath\n"
13520 #: ../fish/guestfish-actions.pod:4259 ../src/guestfs-actions.pod:6472
13521 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13525 #: ../fish/guestfish-actions.pod:4261 ../src/guestfs-actions.pod:6474
13527 "The default is C<$libdir/guestfs> unless overridden by setting "
13528 "C<LIBGUESTFS_PATH> environment variable."
13532 #: ../fish/guestfish-actions.pod:4264 ../src/guestfs-actions.pod:6477
13533 msgid "Setting C<path> to C<NULL> restores the default path."
13537 #: ../fish/guestfish-actions.pod:4266
13542 #: ../fish/guestfish-actions.pod:4268
13547 #: ../fish/guestfish-actions.pod:4270
13550 " set-pgroup true|false\n"
13555 #: ../fish/guestfish-actions.pod:4272 ../src/guestfs-actions.pod:6489
13557 "If C<pgroup> is true, child processes are placed into their own process "
13562 #: ../fish/guestfish-actions.pod:4275 ../src/guestfs-actions.pod:6492
13564 "The practical upshot of this is that signals like C<SIGINT> (from users "
13565 "pressing C<^C>) won't be received by the child process."
13569 #: ../fish/guestfish-actions.pod:4278 ../src/guestfs-actions.pod:6495
13571 "The default for this flag is false, because usually you want C<^C> to kill "
13576 #: ../fish/guestfish-actions.pod:4281
13581 #: ../fish/guestfish-actions.pod:4283
13586 #: ../fish/guestfish-actions.pod:4285
13594 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6508
13595 msgid "Set the qemu binary that we will use."
13599 #: ../fish/guestfish-actions.pod:4289 ../src/guestfs-actions.pod:6510
13601 "The default is chosen when the library was compiled by the configure script."
13605 #: ../fish/guestfish-actions.pod:4292 ../src/guestfs-actions.pod:6513
13607 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13612 #: ../fish/guestfish-actions.pod:4295 ../src/guestfs-actions.pod:6516
13613 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13617 #: ../fish/guestfish-actions.pod:4297 ../src/guestfs-actions.pod:6518
13619 "Note that you should call this function as early as possible after creating "
13620 "the handle. This is because some pre-launch operations depend on testing "
13621 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13622 "don't retest features, and so you might see inconsistent results. Using the "
13623 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13624 "the qemu binary at the same time as the handle is created."
13628 #: ../fish/guestfish-actions.pod:4305
13629 msgid "set-recovery-proc"
13633 #: ../fish/guestfish-actions.pod:4307
13634 msgid "recovery-proc"
13638 #: ../fish/guestfish-actions.pod:4309
13641 " set-recovery-proc true|false\n"
13646 #: ../fish/guestfish-actions.pod:4311
13648 "If this is called with the parameter C<false> then L</launch> does not "
13649 "create a recovery process. The purpose of the recovery process is to stop "
13650 "runaway qemu processes in the case where the main program aborts abruptly."
13654 #: ../fish/guestfish-actions.pod:4316
13656 "This only has any effect if called before L</launch>, and the default is "
13661 #: ../fish/guestfish-actions.pod:4319 ../src/guestfs-actions.pod:6544
13663 "About the only time when you would want to disable this is if the main "
13664 "process will fork itself into the background (\"daemonize\" itself). In "
13665 "this case the recovery process thinks that the main program has disappeared "
13666 "and so kills qemu, which is not very helpful."
13670 #: ../fish/guestfish-actions.pod:4325
13671 msgid "set-selinux"
13675 #: ../fish/guestfish-actions.pod:4327
13680 #: ../fish/guestfish-actions.pod:4329
13683 " set-selinux true|false\n"
13688 #: ../fish/guestfish-actions.pod:4331 ../src/guestfs-actions.pod:6560
13690 "This sets the selinux flag that is passed to the appliance at boot time. "
13691 "The default is C<selinux=0> (disabled)."
13695 #: ../fish/guestfish-actions.pod:4334 ../src/guestfs-actions.pod:6563
13697 "Note that if SELinux is enabled, it is always in Permissive mode "
13698 "(C<enforcing=0>)."
13702 #: ../fish/guestfish-actions.pod:4340
13707 #: ../fish/guestfish-actions.pod:4342
13712 #: ../fish/guestfish-actions.pod:4344
13720 #: ../fish/guestfish-actions.pod:4346 ../src/guestfs-actions.pod:6579
13722 "Change the number of virtual CPUs assigned to the appliance. The default is "
13723 "C<1>. Increasing this may improve performance, though often it has no "
13728 #: ../fish/guestfish-actions.pod:4350
13729 msgid "This function must be called before L</launch>."
13733 #: ../fish/guestfish-actions.pod:4352
13738 #: ../fish/guestfish-actions.pod:4354
13743 #: ../fish/guestfish-actions.pod:4356
13746 " set-trace true|false\n"
13751 #: ../fish/guestfish-actions.pod:4358 ../src/guestfs-actions.pod:6593
13753 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
13754 "return values are traced."
13758 #: ../fish/guestfish-actions.pod:4361 ../src/guestfs-actions.pod:6596
13760 "If you want to trace C API calls into libguestfs (and other libraries) then "
13761 "possibly a better way is to use the external ltrace(1) command."
13765 #: ../fish/guestfish-actions.pod:4365 ../src/guestfs-actions.pod:6600
13767 "Command traces are disabled unless the environment variable "
13768 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13772 #: ../fish/guestfish-actions.pod:4368
13774 "Trace messages are normally sent to C<stderr>, unless you register a "
13775 "callback to send them somewhere else (see L</set-event-callback>)."
13779 #: ../fish/guestfish-actions.pod:4372
13780 msgid "set-verbose"
13784 #: ../fish/guestfish-actions.pod:4374
13789 #: ../fish/guestfish-actions.pod:4376
13792 " set-verbose true|false\n"
13797 #: ../fish/guestfish-actions.pod:4378 ../src/guestfs-actions.pod:6617
13798 msgid "If C<verbose> is true, this turns on verbose messages."
13802 #: ../fish/guestfish-actions.pod:4380 ../src/guestfs-actions.pod:6619
13804 "Verbose messages are disabled unless the environment variable "
13805 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13809 #: ../fish/guestfish-actions.pod:4383
13811 "Verbose messages are normally sent to C<stderr>, unless you register a "
13812 "callback to send them somewhere else (see L</set-event-callback>)."
13816 #: ../fish/guestfish-actions.pod:4387
13821 #: ../fish/guestfish-actions.pod:4389
13824 " setcon context\n"
13829 #: ../fish/guestfish-actions.pod:4391 ../src/guestfs-actions.pod:6636
13831 "This sets the SELinux security context of the daemon to the string "
13836 #: ../fish/guestfish-actions.pod:4394 ../src/guestfs-actions.pod:6639
13837 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13841 #: ../fish/guestfish-actions.pod:4396
13846 #: ../fish/guestfish-actions.pod:4398
13849 " setxattr xattr val vallen path\n"
13854 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6654
13856 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13857 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13861 #: ../fish/guestfish-actions.pod:4404
13862 msgid "See also: L</lsetxattr>, L<attr(5)>."
13866 #: ../fish/guestfish-actions.pod:4406
13871 #: ../fish/guestfish-actions.pod:4408
13874 " sfdisk device cyls heads sectors 'lines ...'\n"
13879 #: ../fish/guestfish-actions.pod:4410 ../src/guestfs-actions.pod:6681
13881 "This is a direct interface to the L<sfdisk(8)> program for creating "
13882 "partitions on block devices."
13886 #: ../fish/guestfish-actions.pod:4413 ../src/guestfs-actions.pod:6684
13887 msgid "C<device> should be a block device, for example C</dev/sda>."
13891 #: ../fish/guestfish-actions.pod:4415 ../src/guestfs-actions.pod:6686
13893 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13894 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
13895 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13896 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13897 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13898 "the kernel) cannot work out the right geometry and you will need to tell it."
13902 #: ../fish/guestfish-actions.pod:4423 ../src/guestfs-actions.pod:6694
13904 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13905 "refer to the L<sfdisk(8)> manpage."
13909 #: ../fish/guestfish-actions.pod:4426 ../src/guestfs-actions.pod:6697
13911 "To create a single partition occupying the whole disk, you would pass "
13912 "C<lines> as a single element list, when the single element being the string "
13917 #: ../fish/guestfish-actions.pod:4430
13918 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
13922 #: ../fish/guestfish-actions.pod:4436 ../fish/guestfish-actions.pod:4459
13923 #: ../fish/guestfish-actions.pod:4481
13925 "I<This function is deprecated.> In new code, use the L</part_add> call "
13930 #: ../fish/guestfish-actions.pod:4443
13935 #: ../fish/guestfish-actions.pod:4445
13938 " sfdiskM device 'lines ...'\n"
13943 #: ../fish/guestfish-actions.pod:4447
13945 "This is a simplified interface to the L</sfdisk> command, where partition "
13946 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
13947 "you don't need to specify the cyls, heads and sectors parameters which were "
13948 "rarely if ever used anyway."
13952 #: ../fish/guestfish-actions.pod:4453
13953 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
13957 #: ../fish/guestfish-actions.pod:4466
13962 #: ../fish/guestfish-actions.pod:4468
13965 " sfdisk-N device partnum cyls heads sectors line\n"
13970 #: ../fish/guestfish-actions.pod:4470 ../src/guestfs-actions.pod:6759
13972 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13973 "(note: C<n> counts from 1)."
13977 #: ../fish/guestfish-actions.pod:4473
13979 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
13980 "cyls/heads/sectors parameters."
13984 #: ../fish/guestfish-actions.pod:4476
13985 msgid "See also: L</part-add>"
13989 #: ../fish/guestfish-actions.pod:4488
13990 msgid "sfdisk-disk-geometry"
13994 #: ../fish/guestfish-actions.pod:4490
13997 " sfdisk-disk-geometry device\n"
14002 #: ../fish/guestfish-actions.pod:4492
14004 "This displays the disk geometry of C<device> read from the partition table. "
14005 "Especially in the case where the underlying block device has been resized, "
14006 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
14007 "kernel-geometry>)."
14011 #: ../fish/guestfish-actions.pod:4497 ../fish/guestfish-actions.pod:4506
14012 #: ../src/guestfs-actions.pod:6785 ../src/guestfs-actions.pod:6801
14013 msgid "The result is in human-readable format, and not designed to be parsed."
14017 #: ../fish/guestfish-actions.pod:4500
14018 msgid "sfdisk-kernel-geometry"
14022 #: ../fish/guestfish-actions.pod:4502
14025 " sfdisk-kernel-geometry device\n"
14030 #: ../fish/guestfish-actions.pod:4504 ../src/guestfs-actions.pod:6799
14031 msgid "This displays the kernel's idea of the geometry of C<device>."
14035 #: ../fish/guestfish-actions.pod:4509
14040 #: ../fish/guestfish-actions.pod:4511
14043 " sfdisk-l device\n"
14048 #: ../fish/guestfish-actions.pod:4513 ../src/guestfs-actions.pod:6822
14050 "This displays the partition table on C<device>, in the human-readable output "
14051 "of the L<sfdisk(8)> command. It is not intended to be parsed."
14055 #: ../fish/guestfish-actions.pod:4517
14056 msgid "See also: L</part-list>"
14060 #: ../fish/guestfish-actions.pod:4519
14062 "I<This function is deprecated.> In new code, use the L</part_list> call "
14067 #: ../fish/guestfish-actions.pod:4526
14072 #: ../fish/guestfish-actions.pod:4528
14080 #: ../fish/guestfish-actions.pod:4530 ../src/guestfs-actions.pod:6839
14082 "This call runs a command from the guest filesystem via the guest's C</bin/"
14087 #: ../fish/guestfish-actions.pod:4533
14088 msgid "This is like L</command>, but passes the command to:"
14092 #: ../fish/guestfish-actions.pod:4535 ../src/guestfs-actions.pod:6844
14095 " /bin/sh -c \"command\"\n"
14100 #: ../fish/guestfish-actions.pod:4537 ../src/guestfs-actions.pod:6846
14102 "Depending on the guest's shell, this usually results in wildcards being "
14103 "expanded, shell expressions being interpolated and so on."
14107 #: ../fish/guestfish-actions.pod:4541
14108 msgid "All the provisos about L</command> apply to this call."
14112 #: ../fish/guestfish-actions.pod:4543
14117 #: ../fish/guestfish-actions.pod:4545
14120 " sh-lines command\n"
14125 #: ../fish/guestfish-actions.pod:4547
14126 msgid "This is the same as L</sh>, but splits the result into a list of lines."
14130 #: ../fish/guestfish-actions.pod:4550
14131 msgid "See also: L</command-lines>"
14135 #: ../fish/guestfish-actions.pod:4552
14140 #: ../fish/guestfish-actions.pod:4554
14148 #: ../fish/guestfish-actions.pod:4556 ../src/guestfs-actions.pod:6880
14149 msgid "Sleep for C<secs> seconds."
14153 #: ../fish/guestfish-actions.pod:4558
14158 #: ../fish/guestfish-actions.pod:4560
14166 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:6894
14167 msgid "This is the same as the C<stat(2)> system call."
14171 #: ../fish/guestfish-actions.pod:4566
14176 #: ../fish/guestfish-actions.pod:4568
14184 #: ../fish/guestfish-actions.pod:4570 ../src/guestfs-actions.pod:6908
14186 "Returns file system statistics for any mounted file system. C<path> should "
14187 "be a file or directory in the mounted file system (typically it is the mount "
14188 "point itself, but it doesn't need to be)."
14192 #: ../fish/guestfish-actions.pod:4574 ../src/guestfs-actions.pod:6912
14193 msgid "This is the same as the C<statvfs(2)> system call."
14197 #: ../fish/guestfish-actions.pod:4576
14202 #: ../fish/guestfish-actions.pod:4578
14210 #: ../fish/guestfish-actions.pod:4580 ../src/guestfs-actions.pod:6926
14212 "This runs the L<strings(1)> command on a file and returns the list of "
14213 "printable strings found."
14217 #: ../fish/guestfish-actions.pod:4586
14222 #: ../fish/guestfish-actions.pod:4588
14225 " strings-e encoding path\n"
14230 #: ../fish/guestfish-actions.pod:4590
14232 "This is like the L</strings> command, but allows you to specify the encoding "
14233 "of strings that are looked for in the source file C<path>."
14237 #: ../fish/guestfish-actions.pod:4594 ../src/guestfs-actions.pod:6949
14238 msgid "Allowed encodings are:"
14242 #: ../fish/guestfish-actions.pod:4598 ../src/guestfs-actions.pod:6953
14247 #: ../fish/guestfish-actions.pod:4600
14249 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
14250 "ISO-8859-X (this is what L</strings> uses)."
14254 #: ../fish/guestfish-actions.pod:4603 ../src/guestfs-actions.pod:6958
14259 #: ../fish/guestfish-actions.pod:4605 ../src/guestfs-actions.pod:6960
14260 msgid "Single 8-bit-byte characters."
14264 #: ../fish/guestfish-actions.pod:4607 ../src/guestfs-actions.pod:6962
14269 #: ../fish/guestfish-actions.pod:4609 ../src/guestfs-actions.pod:6964
14270 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
14274 #: ../fish/guestfish-actions.pod:4612 ../src/guestfs-actions.pod:6967
14275 msgid "l (lower case letter L)"
14279 #: ../fish/guestfish-actions.pod:4614 ../src/guestfs-actions.pod:6969
14281 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
14282 "examining binaries in Windows guests."
14286 #: ../fish/guestfish-actions.pod:4617 ../src/guestfs-actions.pod:6972
14291 #: ../fish/guestfish-actions.pod:4619 ../src/guestfs-actions.pod:6974
14292 msgid "32-bit big endian such as UCS-4BE."
14296 #: ../fish/guestfish-actions.pod:4621 ../src/guestfs-actions.pod:6976
14301 #: ../fish/guestfish-actions.pod:4623 ../src/guestfs-actions.pod:6978
14302 msgid "32-bit little endian such as UCS-4LE."
14306 #: ../fish/guestfish-actions.pod:4627 ../src/guestfs-actions.pod:6982
14307 msgid "The returned strings are transcoded to UTF-8."
14311 #: ../fish/guestfish-actions.pod:4632
14312 msgid "swapoff-device"
14316 #: ../fish/guestfish-actions.pod:4634
14319 " swapoff-device device\n"
14324 #: ../fish/guestfish-actions.pod:4636
14326 "This command disables the libguestfs appliance swap device or partition "
14327 "named C<device>. See L</swapon-device>."
14331 #: ../fish/guestfish-actions.pod:4640
14332 msgid "swapoff-file"
14336 #: ../fish/guestfish-actions.pod:4642
14339 " swapoff-file file\n"
14344 #: ../fish/guestfish-actions.pod:4644 ../src/guestfs-actions.pod:7013
14345 msgid "This command disables the libguestfs appliance swap on file."
14349 #: ../fish/guestfish-actions.pod:4646
14350 msgid "swapoff-label"
14354 #: ../fish/guestfish-actions.pod:4648
14357 " swapoff-label label\n"
14362 #: ../fish/guestfish-actions.pod:4650 ../src/guestfs-actions.pod:7025
14364 "This command disables the libguestfs appliance swap on labeled swap "
14369 #: ../fish/guestfish-actions.pod:4653
14370 msgid "swapoff-uuid"
14374 #: ../fish/guestfish-actions.pod:4655
14377 " swapoff-uuid uuid\n"
14382 #: ../fish/guestfish-actions.pod:4657 ../src/guestfs-actions.pod:7038
14384 "This command disables the libguestfs appliance swap partition with the given "
14389 #: ../fish/guestfish-actions.pod:4660
14390 msgid "swapon-device"
14394 #: ../fish/guestfish-actions.pod:4662
14397 " swapon-device device\n"
14402 #: ../fish/guestfish-actions.pod:4664
14404 "This command enables the libguestfs appliance to use the swap device or "
14405 "partition named C<device>. The increased memory is made available for all "
14406 "commands, for example those run using L</command> or L</sh>."
14410 #: ../fish/guestfish-actions.pod:4669 ../src/guestfs-actions.pod:7056
14412 "Note that you should not swap to existing guest swap partitions unless you "
14413 "know what you are doing. They may contain hibernation information, or other "
14414 "information that the guest doesn't want you to trash. You also risk leaking "
14415 "information about the host to the guest this way. Instead, attach a new "
14416 "host device to the guest and swap on that."
14420 #: ../fish/guestfish-actions.pod:4676
14421 msgid "swapon-file"
14425 #: ../fish/guestfish-actions.pod:4678
14428 " swapon-file file\n"
14433 #: ../fish/guestfish-actions.pod:4680
14435 "This command enables swap to a file. See L</swapon-device> for other notes."
14439 #: ../fish/guestfish-actions.pod:4683
14440 msgid "swapon-label"
14444 #: ../fish/guestfish-actions.pod:4685
14447 " swapon-label label\n"
14452 #: ../fish/guestfish-actions.pod:4687
14454 "This command enables swap to a labeled swap partition. See L</swapon-"
14455 "device> for other notes."
14459 #: ../fish/guestfish-actions.pod:4690
14460 msgid "swapon-uuid"
14464 #: ../fish/guestfish-actions.pod:4692
14467 " swapon-uuid uuid\n"
14472 #: ../fish/guestfish-actions.pod:4694
14474 "This command enables swap to a swap partition with the given UUID. See L</"
14475 "swapon-device> for other notes."
14479 #: ../fish/guestfish-actions.pod:4697
14484 #: ../fish/guestfish-actions.pod:4699
14492 #: ../fish/guestfish-actions.pod:4701 ../src/guestfs-actions.pod:7111
14494 "This syncs the disk, so that any writes are flushed through to the "
14495 "underlying disk image."
14499 #: ../fish/guestfish-actions.pod:4704 ../src/guestfs-actions.pod:7114
14501 "You should always call this if you have modified a disk image, before "
14502 "closing the handle."
14506 #: ../fish/guestfish-actions.pod:4707
14511 #: ../fish/guestfish-actions.pod:4709
14519 #: ../fish/guestfish-actions.pod:4711 ../src/guestfs-actions.pod:7127
14521 "This command returns up to the last 10 lines of a file as a list of strings."
14525 #: ../fish/guestfish-actions.pod:4717
14530 #: ../fish/guestfish-actions.pod:4719
14533 " tail-n nrlines path\n"
14538 #: ../fish/guestfish-actions.pod:4721 ../src/guestfs-actions.pod:7146
14540 "If the parameter C<nrlines> is a positive number, this returns the last "
14541 "C<nrlines> lines of the file C<path>."
14545 #: ../fish/guestfish-actions.pod:4724 ../src/guestfs-actions.pod:7149
14547 "If the parameter C<nrlines> is a negative number, this returns lines from "
14548 "the file C<path>, starting with the C<-nrlines>th line."
14552 #: ../fish/guestfish-actions.pod:4732
14557 #: ../fish/guestfish-actions.pod:4734
14560 " tar-in (tarfile|-) directory\n"
14565 #: ../fish/guestfish-actions.pod:4736 ../src/guestfs-actions.pod:7170
14567 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14568 "tar file) into C<directory>."
14572 #: ../fish/guestfish-actions.pod:4739
14573 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
14577 #: ../fish/guestfish-actions.pod:4744
14582 #: ../fish/guestfish-actions.pod:4746
14585 " tar-out directory (tarfile|-)\n"
14590 #: ../fish/guestfish-actions.pod:4748 ../src/guestfs-actions.pod:7187
14592 "This command packs the contents of C<directory> and downloads it to local "
14597 #: ../fish/guestfish-actions.pod:4751
14598 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
14602 #: ../fish/guestfish-actions.pod:4756
14607 #: ../fish/guestfish-actions.pod:4758
14610 " tgz-in (tarball|-) directory\n"
14615 #: ../fish/guestfish-actions.pod:4760 ../src/guestfs-actions.pod:7204
14617 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14618 "tar file) into C<directory>."
14622 #: ../fish/guestfish-actions.pod:4763
14623 msgid "To upload an uncompressed tarball, use L</tar-in>."
14627 #: ../fish/guestfish-actions.pod:4767
14632 #: ../fish/guestfish-actions.pod:4769
14635 " tgz-out directory (tarball|-)\n"
14640 #: ../fish/guestfish-actions.pod:4771 ../src/guestfs-actions.pod:7220
14642 "This command packs the contents of C<directory> and downloads it to local "
14647 #: ../fish/guestfish-actions.pod:4774
14648 msgid "To download an uncompressed tarball, use L</tar-out>."
14652 #: ../fish/guestfish-actions.pod:4778
14657 #: ../fish/guestfish-actions.pod:4780
14665 #: ../fish/guestfish-actions.pod:4782 ../src/guestfs-actions.pod:7235
14667 "Touch acts like the L<touch(1)> command. It can be used to update the "
14668 "timestamps on a file, or, if the file does not exist, to create a new zero-"
14673 #: ../fish/guestfish-actions.pod:4786 ../src/guestfs-actions.pod:7239
14675 "This command only works on regular files, and will fail on other file types "
14676 "such as directories, symbolic links, block special etc."
14680 #: ../fish/guestfish-actions.pod:4789
14685 #: ../fish/guestfish-actions.pod:4791
14693 #: ../fish/guestfish-actions.pod:4793 ../src/guestfs-actions.pod:7252
14695 "This command truncates C<path> to a zero-length file. The file must exist "
14700 #: ../fish/guestfish-actions.pod:4796
14701 msgid "truncate-size"
14705 #: ../fish/guestfish-actions.pod:4798
14708 " truncate-size path size\n"
14713 #: ../fish/guestfish-actions.pod:4800 ../src/guestfs-actions.pod:7266
14715 "This command truncates C<path> to size C<size> bytes. The file must exist "
14720 #: ../fish/guestfish-actions.pod:4803
14722 "If the current file size is less than C<size> then the file is extended to "
14723 "the required size with zero bytes. This creates a sparse file (ie. disk "
14724 "blocks are not allocated for the file until you write to it). To create a "
14725 "non-sparse file of zeroes, use L</fallocate64> instead."
14729 #: ../fish/guestfish-actions.pod:4809
14734 #: ../fish/guestfish-actions.pod:4811
14737 " tune2fs-l device\n"
14742 #: ../fish/guestfish-actions.pod:4813 ../src/guestfs-actions.pod:7285
14744 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14749 #: ../fish/guestfish-actions.pod:4816 ../src/guestfs-actions.pod:7288
14751 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14752 "for more details. The list of fields returned isn't clearly defined, and "
14753 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14754 "and the filesystem itself."
14758 #: ../fish/guestfish-actions.pod:4821
14763 #: ../fish/guestfish-actions.pod:4823
14766 " txz-in (tarball|-) directory\n"
14771 #: ../fish/guestfish-actions.pod:4825 ../src/guestfs-actions.pod:7308
14773 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14774 "tar file) into C<directory>."
14778 #: ../fish/guestfish-actions.pod:4830
14783 #: ../fish/guestfish-actions.pod:4832
14786 " txz-out directory (tarball|-)\n"
14791 #: ../fish/guestfish-actions.pod:4834 ../src/guestfs-actions.pod:7322
14793 "This command packs the contents of C<directory> and downloads it to local "
14794 "file C<tarball> (as an xz compressed tar archive)."
14798 #: ../fish/guestfish-actions.pod:4839
14803 #: ../fish/guestfish-actions.pod:4841
14811 #: ../fish/guestfish-actions.pod:4843 ../src/guestfs-actions.pod:7335
14813 "This function sets the mask used for creating new files and device nodes to "
14818 #: ../fish/guestfish-actions.pod:4846 ../src/guestfs-actions.pod:7338
14820 "Typical umask values would be C<022> which creates new files with "
14821 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14822 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14826 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7343
14828 "The default umask is C<022>. This is important because it means that "
14829 "directories and device nodes will be created with C<0644> or C<0755> mode "
14830 "even if you specify C<0777>."
14834 #: ../fish/guestfish-actions.pod:4855
14835 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
14839 #: ../fish/guestfish-actions.pod:4858 ../src/guestfs-actions.pod:7350
14840 msgid "This call returns the previous umask."
14844 #: ../fish/guestfish-actions.pod:4860
14849 #: ../fish/guestfish-actions.pod:4862
14854 #: ../fish/guestfish-actions.pod:4864
14857 " umount pathordevice\n"
14862 #: ../fish/guestfish-actions.pod:4866 ../src/guestfs-actions.pod:7362
14864 "This unmounts the given filesystem. The filesystem may be specified either "
14865 "by its mountpoint (path) or the device which contains the filesystem."
14869 #: ../fish/guestfish-actions.pod:4870
14874 #: ../fish/guestfish-actions.pod:4872
14875 msgid "unmount-all"
14879 #: ../fish/guestfish-actions.pod:4874
14887 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7375
14888 msgid "This unmounts all mounted filesystems."
14892 #: ../fish/guestfish-actions.pod:4878 ../src/guestfs-actions.pod:7377
14893 msgid "Some internal mounts are not unmounted by this call."
14897 #: ../fish/guestfish-actions.pod:4880
14902 #: ../fish/guestfish-actions.pod:4882
14905 " upload (filename|-) remotefilename\n"
14910 #: ../fish/guestfish-actions.pod:4884 ../fish/guestfish-actions.pod:4897
14911 #: ../src/guestfs-actions.pod:7390 ../src/guestfs-actions.pod:7414
14912 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14916 #: ../fish/guestfish-actions.pod:4889
14917 msgid "See also L</download>."
14921 #: ../fish/guestfish-actions.pod:4893
14922 msgid "upload-offset"
14926 #: ../fish/guestfish-actions.pod:4895
14929 " upload-offset (filename|-) remotefilename offset\n"
14934 #: ../fish/guestfish-actions.pod:4900 ../src/guestfs-actions.pod:7417
14936 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14937 "The intention is to overwrite parts of existing files or devices, although "
14938 "if a non-existant file is specified then it is created with a \"hole\" "
14939 "before C<offset>. The size of the data written is implicit in the size of "
14940 "the source C<filename>."
14944 #: ../fish/guestfish-actions.pod:4907
14946 "Note that there is no limit on the amount of data that can be uploaded with "
14947 "this call, unlike with L</pwrite>, and this call always writes the full "
14948 "amount unless an error occurs."
14952 #: ../fish/guestfish-actions.pod:4912
14953 msgid "See also L</upload>, L</pwrite>."
14957 #: ../fish/guestfish-actions.pod:4916
14962 #: ../fish/guestfish-actions.pod:4918
14965 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
14970 #: ../fish/guestfish-actions.pod:4920 ../src/guestfs-actions.pod:7450
14971 msgid "This command sets the timestamps of a file with nanosecond precision."
14975 #: ../fish/guestfish-actions.pod:4923 ../src/guestfs-actions.pod:7453
14977 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14982 #: ../fish/guestfish-actions.pod:4926 ../src/guestfs-actions.pod:7456
14984 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14985 "nanoseconds from the epoch."
14989 #: ../fish/guestfish-actions.pod:4929 ../src/guestfs-actions.pod:7459
14991 "If the C<*nsecs> field contains the special value C<-1> then the "
14992 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14993 "ignored in this case)."
14997 #: ../fish/guestfish-actions.pod:4933 ../src/guestfs-actions.pod:7463
14999 "If the C<*nsecs> field contains the special value C<-2> then the "
15000 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
15005 #: ../fish/guestfish-actions.pod:4937
15010 #: ../fish/guestfish-actions.pod:4939
15018 #: ../fish/guestfish-actions.pod:4941 ../src/guestfs-actions.pod:7476
15020 "Return the libguestfs version number that the program is linked against."
15024 #: ../fish/guestfish-actions.pod:4944 ../src/guestfs-actions.pod:7479
15026 "Note that because of dynamic linking this is not necessarily the version of "
15027 "libguestfs that you compiled against. You can compile the program, and then "
15028 "at runtime dynamically link against a completely different C<libguestfs.so> "
15033 #: ../fish/guestfish-actions.pod:4949 ../src/guestfs-actions.pod:7484
15035 "This call was added in version C<1.0.58>. In previous versions of "
15036 "libguestfs there was no way to get the version number. From C code you can "
15037 "use dynamic linker functions to find out if this symbol exists (if it "
15038 "doesn't, then it's an earlier version)."
15042 #: ../fish/guestfish-actions.pod:4955 ../src/guestfs-actions.pod:7490
15044 "The call returns a structure with four elements. The first three (C<major>, "
15045 "C<minor> and C<release>) are numbers and correspond to the usual version "
15046 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
15047 "but may be used for distro-specific information."
15051 #: ../fish/guestfish-actions.pod:4961 ../src/guestfs-actions.pod:7496
15053 "To construct the original version string: C<$major.$minor.$release$extra>"
15057 #: ../fish/guestfish-actions.pod:4964 ../src/guestfs-actions.pod:7499
15058 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
15062 #: ../fish/guestfish-actions.pod:4966
15064 "I<Note:> Don't use this call to test for availability of features. In "
15065 "enterprise distributions we backport features from later versions into "
15066 "earlier versions, making this an unreliable way to test for features. Use "
15067 "L</available> instead."
15071 #: ../fish/guestfish-actions.pod:4972
15076 #: ../fish/guestfish-actions.pod:4974
15079 " vfs-label device\n"
15084 #: ../fish/guestfish-actions.pod:4976 ../src/guestfs-actions.pod:7519
15085 msgid "This returns the filesystem label of the filesystem on C<device>."
15089 #: ../fish/guestfish-actions.pod:4979 ../src/guestfs-actions.pod:7522
15090 msgid "If the filesystem is unlabeled, this returns the empty string."
15094 #: ../fish/guestfish-actions.pod:4981
15095 msgid "To find a filesystem from the label, use L</findfs-label>."
15099 #: ../fish/guestfish-actions.pod:4983
15104 #: ../fish/guestfish-actions.pod:4985
15107 " vfs-type device\n"
15112 #: ../fish/guestfish-actions.pod:4987 ../src/guestfs-actions.pod:7537
15114 "This command gets the filesystem type corresponding to the filesystem on "
15119 #: ../fish/guestfish-actions.pod:4990 ../src/guestfs-actions.pod:7540
15121 "For most filesystems, the result is the name of the Linux VFS module which "
15122 "would be used to mount this filesystem if you mounted it without specifying "
15123 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
15127 #: ../fish/guestfish-actions.pod:4995
15132 #: ../fish/guestfish-actions.pod:4997
15135 " vfs-uuid device\n"
15140 #: ../fish/guestfish-actions.pod:4999 ../src/guestfs-actions.pod:7556
15141 msgid "This returns the filesystem UUID of the filesystem on C<device>."
15145 #: ../fish/guestfish-actions.pod:5002 ../src/guestfs-actions.pod:7559
15146 msgid "If the filesystem does not have a UUID, this returns the empty string."
15150 #: ../fish/guestfish-actions.pod:5004
15151 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
15155 #: ../fish/guestfish-actions.pod:5006
15156 msgid "vg-activate"
15160 #: ../fish/guestfish-actions.pod:5008
15163 " vg-activate true|false 'volgroups ...'\n"
15168 #: ../fish/guestfish-actions.pod:5010 ../src/guestfs-actions.pod:7575
15170 "This command activates or (if C<activate> is false) deactivates all logical "
15171 "volumes in the listed volume groups C<volgroups>."
15175 #: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7578
15176 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
15180 #: ../fish/guestfish-actions.pod:5015 ../src/guestfs-actions.pod:7580
15182 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
15183 "activated or deactivated."
15187 #: ../fish/guestfish-actions.pod:5018
15188 msgid "vg-activate-all"
15192 #: ../fish/guestfish-actions.pod:5020
15195 " vg-activate-all true|false\n"
15200 #: ../fish/guestfish-actions.pod:5022 ../src/guestfs-actions.pod:7593
15202 "This command activates or (if C<activate> is false) deactivates all logical "
15203 "volumes in all volume groups."
15207 #: ../fish/guestfish-actions.pod:5025 ../src/guestfs-actions.pod:7596
15208 msgid "This command is the same as running C<vgchange -a y|n>"
15212 #: ../fish/guestfish-actions.pod:5027
15217 #: ../fish/guestfish-actions.pod:5029
15220 " vgcreate volgroup 'physvols ...'\n"
15225 #: ../fish/guestfish-actions.pod:5031 ../src/guestfs-actions.pod:7609
15227 "This creates an LVM volume group called C<volgroup> from the non-empty list "
15228 "of physical volumes C<physvols>."
15232 #: ../fish/guestfish-actions.pod:5034
15237 #: ../fish/guestfish-actions.pod:5036
15240 " vglvuuids vgname\n"
15245 #: ../fish/guestfish-actions.pod:5038 ../src/guestfs-actions.pod:7622
15247 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
15248 "volumes created in this volume group."
15252 #: ../fish/guestfish-actions.pod:5041
15254 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
15255 "logical volumes and volume groups."
15259 #: ../fish/guestfish-actions.pod:5044
15260 msgid "See also L</vgpvuuids>."
15264 #: ../fish/guestfish-actions.pod:5046
15269 #: ../fish/guestfish-actions.pod:5048
15272 " vgpvuuids vgname\n"
15277 #: ../fish/guestfish-actions.pod:5050 ../src/guestfs-actions.pod:7642
15279 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
15280 "volumes that this volume group resides on."
15284 #: ../fish/guestfish-actions.pod:5053
15286 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
15287 "physical volumes and volume groups."
15291 #: ../fish/guestfish-actions.pod:5056
15292 msgid "See also L</vglvuuids>."
15296 #: ../fish/guestfish-actions.pod:5058
15301 #: ../fish/guestfish-actions.pod:5060
15304 " vgremove vgname\n"
15309 #: ../fish/guestfish-actions.pod:5062 ../src/guestfs-actions.pod:7662
15310 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15314 #: ../fish/guestfish-actions.pod:5064 ../src/guestfs-actions.pod:7664
15316 "This also forcibly removes all logical volumes in the volume group (if any)."
15320 #: ../fish/guestfish-actions.pod:5067
15325 #: ../fish/guestfish-actions.pod:5069
15328 " vgrename volgroup newvolgroup\n"
15333 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7678
15334 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15338 #: ../fish/guestfish-actions.pod:5073
15343 #: ../fish/guestfish-actions.pod:5075
15351 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7689
15353 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
15358 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7692
15360 "This returns a list of just the volume group names that were detected (eg. "
15365 #: ../fish/guestfish-actions.pod:5083
15366 msgid "See also L</vgs-full>."
15370 #: ../fish/guestfish-actions.pod:5085
15375 #: ../fish/guestfish-actions.pod:5087
15383 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7708
15385 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
15386 "> command. The \"full\" version includes all fields."
15390 #: ../fish/guestfish-actions.pod:5092
15395 #: ../fish/guestfish-actions.pod:5094
15403 #: ../fish/guestfish-actions.pod:5096 ../src/guestfs-actions.pod:7722
15405 "This rescans all block devices and rebuilds the list of LVM physical "
15406 "volumes, volume groups and logical volumes."
15410 #: ../fish/guestfish-actions.pod:5099
15415 #: ../fish/guestfish-actions.pod:5101
15423 #: ../fish/guestfish-actions.pod:5103 ../src/guestfs-actions.pod:7735
15424 msgid "This command returns the UUID of the LVM VG named C<vgname>."
15428 #: ../fish/guestfish-actions.pod:5105
15433 #: ../fish/guestfish-actions.pod:5107
15441 #: ../fish/guestfish-actions.pod:5109 ../src/guestfs-actions.pod:7775
15443 "This command counts the characters in a file, using the C<wc -c> external "
15448 #: ../fish/guestfish-actions.pod:5112
15453 #: ../fish/guestfish-actions.pod:5114
15461 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7788
15463 "This command counts the lines in a file, using the C<wc -l> external command."
15467 #: ../fish/guestfish-actions.pod:5119
15472 #: ../fish/guestfish-actions.pod:5121
15480 #: ../fish/guestfish-actions.pod:5123 ../src/guestfs-actions.pod:7801
15482 "This command counts the words in a file, using the C<wc -w> external command."
15486 #: ../fish/guestfish-actions.pod:5126
15491 #: ../fish/guestfish-actions.pod:5128
15494 " write path content\n"
15499 #: ../fish/guestfish-actions.pod:5130 ../src/guestfs-actions.pod:7816
15501 "This call creates a file called C<path>. The content of the file is the "
15502 "string C<content> (which can contain any 8 bit data)."
15506 #: ../fish/guestfish-actions.pod:5133
15507 msgid "See also L</write-append>."
15511 #: ../fish/guestfish-actions.pod:5138
15512 msgid "write-append"
15516 #: ../fish/guestfish-actions.pod:5140
15519 " write-append path content\n"
15524 #: ../fish/guestfish-actions.pod:5142 ../src/guestfs-actions.pod:7836
15526 "This call appends C<content> to the end of file C<path>. If C<path> does "
15527 "not exist, then a new file is created."
15531 #: ../fish/guestfish-actions.pod:5145
15532 msgid "See also L</write>."
15536 #: ../fish/guestfish-actions.pod:5150
15541 #: ../fish/guestfish-actions.pod:5152
15544 " write-file path content size\n"
15549 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7863
15551 "This call creates a file called C<path>. The contents of the file is the "
15552 "string C<content> (which can contain any 8 bit data), with length C<size>."
15556 #: ../fish/guestfish-actions.pod:5158 ../src/guestfs-actions.pod:7867
15558 "As a special case, if C<size> is C<0> then the length is calculated using "
15559 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15563 #: ../fish/guestfish-actions.pod:5162 ../src/guestfs-actions.pod:7871
15565 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15566 "I<not> work, even if the length is specified."
15570 #: ../fish/guestfish-actions.pod:5168
15572 "I<This function is deprecated.> In new code, use the L</write> call instead."
15576 #: ../fish/guestfish-actions.pod:5175
15581 #: ../fish/guestfish-actions.pod:5177
15584 " zegrep regex path\n"
15589 #: ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:7888
15591 "This calls the external C<zegrep> program and returns the matching lines."
15595 #: ../fish/guestfish-actions.pod:5185
15600 #: ../fish/guestfish-actions.pod:5187
15603 " zegrepi regex path\n"
15608 #: ../fish/guestfish-actions.pod:5189 ../src/guestfs-actions.pod:7907
15610 "This calls the external C<zegrep -i> program and returns the matching lines."
15614 #: ../fish/guestfish-actions.pod:5195
15619 #: ../fish/guestfish-actions.pod:5197
15627 #: ../fish/guestfish-actions.pod:5199 ../src/guestfs-actions.pod:7925
15628 msgid "This command writes zeroes over the first few blocks of C<device>."
15632 #: ../fish/guestfish-actions.pod:5201 ../src/guestfs-actions.pod:7927
15634 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15635 "securely wipe the device). It should be sufficient to remove any partition "
15636 "tables, filesystem superblocks and so on."
15640 #: ../fish/guestfish-actions.pod:5205 ../fish/guestfish-actions.pod:5220
15641 #: ../src/guestfs-actions.pod:7931 ../src/guestfs-actions.pod:7957
15643 "If blocks are already zero, then this command avoids writing zeroes. This "
15644 "prevents the underlying device from becoming non-sparse or growing "
15649 #: ../fish/guestfish-actions.pod:5209
15650 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
15654 #: ../fish/guestfish-actions.pod:5212
15655 msgid "zero-device"
15659 #: ../fish/guestfish-actions.pod:5214
15662 " zero-device device\n"
15667 #: ../fish/guestfish-actions.pod:5216
15669 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
15670 "which just zeroes the first few blocks of a device."
15674 #: ../fish/guestfish-actions.pod:5227
15679 #: ../fish/guestfish-actions.pod:5229
15682 " zerofree device\n"
15687 #: ../fish/guestfish-actions.pod:5231 ../src/guestfs-actions.pod:7979
15689 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15690 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15691 "possible to compress the filesystem more effectively."
15695 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:7984
15696 msgid "You should B<not> run this program if the filesystem is mounted."
15700 #: ../fish/guestfish-actions.pod:5239 ../src/guestfs-actions.pod:7987
15702 "It is possible that using this program can damage the filesystem or data on "
15707 #: ../fish/guestfish-actions.pod:5242
15712 #: ../fish/guestfish-actions.pod:5244
15715 " zfgrep pattern path\n"
15720 #: ../fish/guestfish-actions.pod:5246 ../src/guestfs-actions.pod:8001
15722 "This calls the external C<zfgrep> program and returns the matching lines."
15726 #: ../fish/guestfish-actions.pod:5252
15731 #: ../fish/guestfish-actions.pod:5254
15734 " zfgrepi pattern path\n"
15739 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8020
15741 "This calls the external C<zfgrep -i> program and returns the matching lines."
15745 #: ../fish/guestfish-actions.pod:5262
15750 #: ../fish/guestfish-actions.pod:5264
15753 " zfile meth path\n"
15758 #: ../fish/guestfish-actions.pod:5266 ../src/guestfs-actions.pod:8046
15760 "This command runs C<file> after first decompressing C<path> using C<method>."
15764 #: ../fish/guestfish-actions.pod:5269 ../src/guestfs-actions.pod:8049
15765 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15769 #: ../fish/guestfish-actions.pod:5271
15771 "Since 1.0.63, use L</file> instead which can now process compressed files."
15775 #: ../fish/guestfish-actions.pod:5274
15777 "I<This function is deprecated.> In new code, use the L</file> call instead."
15781 #: ../fish/guestfish-actions.pod:5281
15786 #: ../fish/guestfish-actions.pod:5283
15789 " zgrep regex path\n"
15794 #: ../fish/guestfish-actions.pod:5285 ../src/guestfs-actions.pod:8066
15796 "This calls the external C<zgrep> program and returns the matching lines."
15800 #: ../fish/guestfish-actions.pod:5291
15805 #: ../fish/guestfish-actions.pod:5293
15808 " zgrepi regex path\n"
15813 #: ../fish/guestfish-actions.pod:5295 ../src/guestfs-actions.pod:8085
15815 "This calls the external C<zgrep -i> program and returns the matching lines."
15819 #: ../fish/guestfish-commands.pod:1
15824 #: ../fish/guestfish-commands.pod:3
15829 #: ../fish/guestfish-commands.pod:5
15832 " alloc filename size\n"
15837 #: ../fish/guestfish-commands.pod:7
15839 "This creates an empty (zeroed) file of the given size, and then adds so it "
15840 "can be further examined."
15844 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
15845 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
15849 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
15850 msgid "Size can be specified using standard suffixes, eg. C<1M>."
15854 #: ../fish/guestfish-commands.pod:14
15856 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
15857 "image, see L</PREPARED DISK IMAGES>."
15861 #: ../fish/guestfish-commands.pod:17
15866 #: ../fish/guestfish-commands.pod:19
15869 " copy-in local [local ...] /remotedir\n"
15874 #: ../fish/guestfish-commands.pod:21
15876 "C<copy-in> copies local files or directories recursively into the disk "
15877 "image, placing them in the directory called C</remotedir> (which must "
15878 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
15879 "other commands as necessary."
15883 #: ../fish/guestfish-commands.pod:26
15885 "Multiple local files and directories can be specified, but the last "
15886 "parameter must always be a remote directory. Wildcards cannot be used."
15890 #: ../fish/guestfish-commands.pod:30
15895 #: ../fish/guestfish-commands.pod:32
15898 " copy-out remote [remote ...] localdir\n"
15903 #: ../fish/guestfish-commands.pod:34
15905 "C<copy-out> copies remote files or directories recursively out of the disk "
15906 "image, placing them on the host disk in a local directory called C<localdir> "
15907 "(which must exist). This guestfish meta-command turns into a sequence of L</"
15908 "download>, L</tar-out> and other commands as necessary."
15912 #: ../fish/guestfish-commands.pod:40
15914 "Multiple remote files and directories can be specified, but the last "
15915 "parameter must always be a local directory. To download to the current "
15916 "directory, use C<.> as in:"
15920 #: ../fish/guestfish-commands.pod:44
15923 " copy-out /home .\n"
15928 #: ../fish/guestfish-commands.pod:46
15930 "Wildcards cannot be used in the ordinary command, but you can use them with "
15931 "the help of L</glob> like this:"
15935 #: ../fish/guestfish-commands.pod:49
15938 " glob copy-out /home/* .\n"
15943 #: ../fish/guestfish-commands.pod:51
15948 #: ../fish/guestfish-commands.pod:53
15951 " display filename\n"
15956 #: ../fish/guestfish-commands.pod:55
15958 "Use C<display> (a graphical display program) to display an image file. It "
15959 "downloads the file, and runs C<display> on it."
15963 #: ../fish/guestfish-commands.pod:58
15965 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
15966 "environment variable. For example to use the GNOME display program:"
15970 #: ../fish/guestfish-commands.pod:61
15973 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
15978 #: ../fish/guestfish-commands.pod:63
15979 msgid "See also L<display(1)>."
15983 #: ../fish/guestfish-commands.pod:65
15988 #: ../fish/guestfish-commands.pod:67
15991 " echo [params ...]\n"
15996 #: ../fish/guestfish-commands.pod:69
15997 msgid "This echos the parameters to the terminal."
16001 #: ../fish/guestfish-commands.pod:71
16006 #: ../fish/guestfish-commands.pod:73
16011 #: ../fish/guestfish-commands.pod:75
16016 #: ../fish/guestfish-commands.pod:77
16024 #: ../fish/guestfish-commands.pod:79
16026 "This is used to edit a file. It downloads the file, edits it locally using "
16027 "your editor, then uploads the result."
16031 #: ../fish/guestfish-commands.pod:82
16033 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
16034 "or C<emacs> you will get those corresponding editors."
16038 #: ../fish/guestfish-commands.pod:86
16043 #: ../fish/guestfish-commands.pod:88
16046 " glob command args...\n"
16051 #: ../fish/guestfish-commands.pod:90
16053 "Expand wildcards in any paths in the args list, and run C<command> "
16054 "repeatedly on each matching path."
16058 #: ../fish/guestfish-commands.pod:93
16059 msgid "See L</WILDCARDS AND GLOBBING>."
16063 #: ../fish/guestfish-commands.pod:95
16068 #: ../fish/guestfish-commands.pod:97
16071 " hexedit <filename|device>\n"
16072 " hexedit <filename|device> <max>\n"
16073 " hexedit <filename|device> <start> <max>\n"
16078 #: ../fish/guestfish-commands.pod:101
16080 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
16085 #: ../fish/guestfish-commands.pod:104
16087 "This command works by downloading potentially the whole file or device, "
16088 "editing it locally, then uploading it. If the file or device is large, you "
16089 "have to specify which part you wish to edit by using C<max> and/or C<start> "
16090 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
16091 "usual modifiers allowed such as C<1M> (1 megabyte)."
16095 #: ../fish/guestfish-commands.pod:111
16096 msgid "For example to edit the first few sectors of a disk you might do:"
16100 #: ../fish/guestfish-commands.pod:114
16103 " hexedit /dev/sda 1M\n"
16108 #: ../fish/guestfish-commands.pod:116
16110 "which would allow you to edit anywhere within the first megabyte of the disk."
16114 #: ../fish/guestfish-commands.pod:119
16115 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
16119 #: ../fish/guestfish-commands.pod:121
16122 " hexedit /dev/sda1 0x400 0x400\n"
16127 #: ../fish/guestfish-commands.pod:123
16128 msgid "(assuming the superblock is in the standard location)."
16132 #: ../fish/guestfish-commands.pod:125
16134 "This command requires the external L<hexedit(1)> program. You can specify "
16135 "another program to use by setting the C<HEXEDITOR> environment variable."
16139 #: ../fish/guestfish-commands.pod:129
16140 msgid "See also L</hexdump>."
16144 #: ../fish/guestfish-commands.pod:131
16149 #: ../fish/guestfish-commands.pod:133
16157 #: ../fish/guestfish-commands.pod:135
16159 "Change the local directory, ie. the current directory of guestfish itself."
16163 #: ../fish/guestfish-commands.pod:138
16164 msgid "Note that C<!cd> won't do what you might expect."
16168 #: ../fish/guestfish-commands.pod:140
16173 #: ../fish/guestfish-commands.pod:142
16178 #: ../fish/guestfish-commands.pod:144
16186 #: ../fish/guestfish-commands.pod:146
16187 msgid "Opens the manual page for guestfish."
16191 #: ../fish/guestfish-commands.pod:148
16196 #: ../fish/guestfish-commands.pod:150
16201 #: ../fish/guestfish-commands.pod:152
16209 #: ../fish/guestfish-commands.pod:154
16217 #: ../fish/guestfish-commands.pod:156
16218 msgid "This is used to view a file."
16222 #: ../fish/guestfish-commands.pod:158
16224 "The default viewer is C<$PAGER>. However if you use the alternate command "
16225 "C<less> you will get the C<less> command specifically."
16229 #: ../fish/guestfish-commands.pod:161
16234 #: ../fish/guestfish-commands.pod:163
16242 #: ../fish/guestfish-commands.pod:165
16244 "Close and reopen the libguestfs handle. It is not necessary to use this "
16245 "normally, because the handle is closed properly when guestfish exits. "
16246 "However this is occasionally useful for testing."
16250 #: ../fish/guestfish-commands.pod:169
16255 #: ../fish/guestfish-commands.pod:171
16258 " setenv VAR value\n"
16263 #: ../fish/guestfish-commands.pod:173
16264 msgid "Set the environment variable C<VAR> to the string C<value>."
16268 #: ../fish/guestfish-commands.pod:175
16270 "To print the value of an environment variable use a shell command such as:"
16274 #: ../fish/guestfish-commands.pod:178
16282 #: ../fish/guestfish-commands.pod:180
16287 #: ../fish/guestfish-commands.pod:182
16290 " sparse filename size\n"
16295 #: ../fish/guestfish-commands.pod:184
16297 "This creates an empty sparse file of the given size, and then adds so it can "
16298 "be further examined."
16302 #: ../fish/guestfish-commands.pod:187
16304 "In all respects it works the same as the L</alloc> command, except that the "
16305 "image file is allocated sparsely, which means that disk blocks are not "
16306 "assigned to the file until they are needed. Sparse disk files only use "
16307 "space when written to, but they are slower and there is a danger you could "
16308 "run out of real disk space during a write operation."
16312 #: ../fish/guestfish-commands.pod:197
16317 #: ../fish/guestfish-commands.pod:199
16325 #: ../fish/guestfish-commands.pod:201
16327 "This command returns a list of the optional groups known to the daemon, and "
16328 "indicates which ones are supported by this build of the libguestfs appliance."
16332 #: ../fish/guestfish-commands.pod:205
16333 msgid "See also L<guestfs(3)/AVAILABILITY>."
16337 #: ../fish/guestfish-commands.pod:207
16342 #: ../fish/guestfish-commands.pod:209
16345 " time command args...\n"
16350 #: ../fish/guestfish-commands.pod:211
16352 "Run the command as usual, but print the elapsed time afterwards. This can "
16353 "be useful for benchmarking operations."
16357 #: ../fish/guestfish-commands.pod:214
16362 #: ../fish/guestfish-commands.pod:216
16370 #: ../fish/guestfish-commands.pod:218
16371 msgid "Remove C<VAR> from the environment."
16375 #: ../fish/guestfish.pod:5
16376 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16380 #: ../fish/guestfish.pod:9
16383 " guestfish [--options] [commands]\n"
16388 #: ../fish/guestfish.pod:11
16396 #: ../fish/guestfish.pod:13
16399 " guestfish [--ro|--rw] -a disk.img\n"
16404 #: ../fish/guestfish.pod:15
16407 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16412 #: ../fish/guestfish.pod:17
16415 " guestfish -d libvirt-domain\n"
16420 #: ../fish/guestfish.pod:19
16423 " guestfish [--ro|--rw] -a disk.img -i\n"
16428 #: ../fish/guestfish.pod:21
16431 " guestfish -d libvirt-domain -i\n"
16436 #: ../fish/guestfish.pod:25
16438 "Using guestfish in read/write mode on live virtual machines can be "
16439 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16440 "option to use guestfish safely if the disk image or virtual machine might be "
16445 #: ../fish/guestfish.pod:32
16447 "Guestfish is a shell and command-line tool for examining and modifying "
16448 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16449 "functionality of the guestfs API, see L<guestfs(3)>."
16453 #: ../fish/guestfish.pod:36
16455 "Guestfish gives you structured access to the libguestfs API, from shell "
16456 "scripts or the command line or interactively. If you want to rescue a "
16457 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16462 #: ../fish/guestfish.pod:43
16463 msgid "As an interactive shell"
16467 #: ../fish/guestfish.pod:45
16475 #: ../fish/guestfish.pod:47
16478 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16479 " editing virtual machine filesystems.\n"
16484 #: ../fish/guestfish.pod:50
16487 " Type: 'help' for a list of commands\n"
16488 " 'man' to read the manual\n"
16489 " 'quit' to quit the shell\n"
16494 #: ../fish/guestfish.pod:54
16497 " ><fs> add-ro disk.img\n"
16499 " ><fs> list-filesystems\n"
16500 " /dev/sda1: ext4\n"
16501 " /dev/vg_guest/lv_root: ext4\n"
16502 " /dev/vg_guest/lv_swap: swap\n"
16503 " ><fs> mount /dev/vg_guest/lv_root /\n"
16504 " ><fs> cat /etc/fstab\n"
16506 " # Created by anaconda\n"
16513 #: ../fish/guestfish.pod:67
16514 msgid "From shell scripts"
16518 #: ../fish/guestfish.pod:69
16519 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16523 #: ../fish/guestfish.pod:71
16526 " guestfish <<_EOF_\n"
16529 " mount /dev/vg_guest/lv_root /\n"
16530 " write /etc/motd \"Welcome, new users\"\n"
16536 #: ../fish/guestfish.pod:78
16537 msgid "List the LVM logical volumes in a disk image:"
16541 #: ../fish/guestfish.pod:80
16544 " guestfish -a disk.img --ro <<_EOF_\n"
16552 #: ../fish/guestfish.pod:85
16553 msgid "List all the filesystems in a disk image:"
16557 #: ../fish/guestfish.pod:87
16560 " guestfish -a disk.img --ro <<_EOF_\n"
16562 " list-filesystems\n"
16568 #: ../fish/guestfish.pod:92
16569 msgid "On one command line"
16573 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
16574 msgid "Update C</etc/resolv.conf> in a guest:"
16578 #: ../fish/guestfish.pod:96
16582 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16583 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16588 #: ../fish/guestfish.pod:100
16589 msgid "Edit C</boot/grub/grub.conf> interactively:"
16593 #: ../fish/guestfish.pod:102
16596 " guestfish --rw --add disk.img \\\n"
16597 " --mount /dev/vg_guest/lv_root \\\n"
16598 " --mount /dev/sda1:/boot \\\n"
16599 " edit /boot/grub/grub.conf\n"
16604 #: ../fish/guestfish.pod:107
16605 msgid "Mount disks automatically"
16609 #: ../fish/guestfish.pod:109
16611 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
16615 #: ../fish/guestfish.pod:112
16618 " guestfish --ro -a disk.img -i cat /etc/group\n"
16623 #: ../fish/guestfish.pod:114
16626 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16631 #: ../fish/guestfish.pod:116
16632 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16636 #: ../fish/guestfish.pod:118
16639 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16644 #: ../fish/guestfish.pod:120
16645 msgid "As a script interpreter"
16649 #: ../fish/guestfish.pod:122
16650 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16654 #: ../fish/guestfish.pod:124
16657 " #!/usr/bin/guestfish -f\n"
16658 " sparse test1.img 100M\n"
16660 " part-disk /dev/sda mbr\n"
16661 " mkfs ext2 /dev/sda1\n"
16666 #: ../fish/guestfish.pod:130
16667 msgid "Start with a prepared disk"
16671 #: ../fish/guestfish.pod:132
16673 "An alternate way to create a 100MB disk called C<test1.img> containing a "
16674 "single ext2-formatted partition:"
16678 #: ../fish/guestfish.pod:135
16681 " guestfish -N fs\n"
16686 #: ../fish/guestfish.pod:137
16687 msgid "To list what is available do:"
16691 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1009
16694 " guestfish -N help | less\n"
16699 #: ../fish/guestfish.pod:141
16700 msgid "Remote control"
16704 #: ../fish/guestfish.pod:143
16707 " eval \"`guestfish --listen`\"\n"
16708 " guestfish --remote add-ro disk.img\n"
16709 " guestfish --remote run\n"
16710 " guestfish --remote lvs\n"
16715 #: ../fish/guestfish.pod:154
16716 msgid "Displays general help on options."
16720 #: ../fish/guestfish.pod:158
16721 msgid "B<--cmd-help>"
16725 #: ../fish/guestfish.pod:160
16726 msgid "Lists all available guestfish commands."
16730 #: ../fish/guestfish.pod:162
16735 #: ../fish/guestfish.pod:164
16736 msgid "B<--cmd-help cmd>"
16740 #: ../fish/guestfish.pod:166
16741 msgid "Displays detailed help on a single command C<cmd>."
16745 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:87
16746 msgid "B<-a image>"
16750 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:89
16751 msgid "B<--add image>"
16755 #: ../fish/guestfish.pod:172
16756 msgid "Add a block device or virtual machine image to the shell."
16760 #: ../fish/guestfish.pod:177
16762 "Using this flag is mostly equivalent to using the C<add> command, with "
16763 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
16764 "the I<--format=...> flag was given."
16768 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:100
16770 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16771 "URI to use. The default is to use the default libvirt connection."
16775 #: ../fish/guestfish.pod:189
16780 #: ../fish/guestfish.pod:191
16782 "If using the I<--listen> option and a csh-like shell, use this option. See "
16783 "section L</REMOTE CONTROL AND CSH> below."
16787 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:104
16788 msgid "B<-d libvirt-domain>"
16792 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:106
16793 msgid "B<--domain libvirt-domain>"
16797 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:108
16799 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16800 "used, then any libvirt domain can be used. However in write mode, only "
16801 "libvirt domains which are shut down can be named here."
16805 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:112
16806 msgid "Domain UUIDs can be used instead of names."
16810 #: ../fish/guestfish.pod:204
16812 "Using this flag is mostly equivalent to using the C<add-domain> command, "
16813 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
16814 "if the I<--format:...> flag was given."
16818 #: ../fish/guestfish.pod:208
16823 #: ../fish/guestfish.pod:210
16824 msgid "B<--no-dest-paths>"
16828 #: ../fish/guestfish.pod:212
16830 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16831 "to hit the tab key to complete paths on the guest filesystem, but this "
16832 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16833 "allow this feature to be disabled."
16837 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:128
16839 "When prompting for keys and passphrases, guestfish normally turns echoing "
16840 "off so you cannot see what you are typing. If you are not worried about "
16841 "Tempest attacks and there is no one else in the room you can specify this "
16842 "flag to see what you are typing."
16846 #: ../fish/guestfish.pod:224
16851 #: ../fish/guestfish.pod:226
16852 msgid "B<--file file>"
16856 #: ../fish/guestfish.pod:228
16857 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16861 #: ../fish/guestfish.pod:231
16864 " #!/usr/bin/guestfish -f\n"
16869 #: ../fish/guestfish.pod:244
16872 " guestfish --format=raw -a disk.img\n"
16877 #: ../fish/guestfish.pod:248
16880 " guestfish --format=raw -a disk.img --format -a another.img\n"
16885 #: ../fish/guestfish.pod:253
16887 "If you have untrusted raw-format guest disk images, you should use this "
16888 "option to specify the disk format. This avoids a possible security problem "
16889 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16893 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:157
16894 msgid "B<--inspector>"
16898 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:159
16900 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16901 "system and mount filesystems as they would be mounted on the real virtual "
16906 #: ../fish/guestfish.pod:266
16907 msgid "Typical usage is either:"
16911 #: ../fish/guestfish.pod:268
16914 " guestfish -d myguest -i\n"
16919 #: ../fish/guestfish.pod:270
16920 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16924 #: ../fish/guestfish.pod:272
16927 " guestfish --ro -d myguest -i\n"
16932 #: ../fish/guestfish.pod:274
16933 msgid "(for active domains, readonly), or specify the block device directly:"
16937 #: ../fish/guestfish.pod:276
16940 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
16945 #: ../fish/guestfish.pod:278
16947 "Note that the command line syntax changed slightly over older versions of "
16948 "guestfish. You can still use the old syntax:"
16952 #: ../fish/guestfish.pod:281
16955 " guestfish [--ro] -i disk.img\n"
16960 #: ../fish/guestfish.pod:283
16963 " guestfish [--ro] -i libvirt-domain\n"
16968 #: ../fish/guestfish.pod:285
16970 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
16971 "then using other commands to mount the filesystems that were found."
16975 #: ../fish/guestfish.pod:294
16976 msgid "B<--listen>"
16980 #: ../fish/guestfish.pod:296
16982 "Fork into the background and listen for remote commands. See section L</"
16983 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16987 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:168
16992 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:170
16994 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
16995 "ATTACHING TO RUNNING DAEMONS>)."
16999 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:173
17000 msgid "B<-m dev[:mountpoint[:options]]>"
17004 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:175
17005 msgid "B<--mount dev[:mountpoint[:options]]>"
17009 #: ../fish/guestfish.pod:308
17010 msgid "Mount the named partition or logical volume on the given mountpoint."
17014 #: ../fish/guestfish.pod:310
17015 msgid "If the mountpoint is omitted, it defaults to C</>."
17019 #: ../fish/guestfish.pod:312
17020 msgid "You have to mount something on C</> before most commands will work."
17024 #: ../fish/guestfish.pod:314
17026 "If any I<-m> or I<--mount> options are given, the guest is automatically "
17031 #: ../fish/guestfish.pod:317
17033 "If you don't know what filesystems a disk image contains, you can either run "
17034 "guestfish without this option, then list the partitions, filesystems and LVs "
17035 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
17036 "commands), or you can use the L<virt-filesystems(1)> program."
17040 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:183
17042 "The third (and rarely used) part of the mount parameter is the list of mount "
17043 "options used to mount the underlying filesystem. If this is not given, then "
17044 "the mount options are either the empty string or C<ro> (the latter if the "
17045 "I<--ro> flag is used). By specifying the mount options, you override this "
17046 "default choice. Probably the only time you would use this is to enable ACLs "
17047 "and/or extended attributes if the filesystem can support them:"
17051 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:191
17054 " -m /dev/sda1:/:acl,user_xattr\n"
17059 #: ../fish/guestfish.pod:333
17060 msgid "Using this flag is equivalent to using the C<mount-options> command."
17064 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:193
17065 #: ../resize/virt-resize.pod:358
17070 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:195
17071 msgid "B<--no-sync>"
17075 #: ../fish/guestfish.pod:339
17077 "Disable autosync. This is enabled by default. See the discussion of "
17078 "autosync in the L<guestfs(3)> manpage."
17082 #: ../fish/guestfish.pod:342
17087 #: ../fish/guestfish.pod:344
17088 msgid "B<--new type>"
17092 #: ../fish/guestfish.pod:346
17097 #: ../fish/guestfish.pod:348
17099 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
17100 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
17101 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
17106 #: ../fish/guestfish.pod:353
17107 msgid "B<--progress-bars>"
17111 #: ../fish/guestfish.pod:355
17112 msgid "Enable progress bars, even when guestfish is used non-interactively."
17116 #: ../fish/guestfish.pod:357
17118 "Progress bars are enabled by default when guestfish is used as an "
17119 "interactive shell."
17123 #: ../fish/guestfish.pod:360
17124 msgid "B<--no-progress-bars>"
17128 #: ../fish/guestfish.pod:362
17129 msgid "Disable progress bars."
17133 #: ../fish/guestfish.pod:364
17134 msgid "B<--remote[=pid]>"
17138 #: ../fish/guestfish.pod:366
17140 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
17141 "CONTROL GUESTFISH OVER A SOCKET> below."
17145 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:239
17146 #: ../rescue/virt-rescue.pod:161
17151 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:241
17152 #: ../rescue/virt-rescue.pod:163
17157 #: ../fish/guestfish.pod:373
17159 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
17160 "mounts are done read-only."
17164 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
17166 "The option must always be used if the disk image or virtual machine might be "
17167 "running, and is generally recommended in cases where you don't need write "
17168 "access to the disk."
17172 #: ../fish/guestfish.pod:380
17174 "Note that prepared disk images created with I<-N> are not affected by this "
17175 "option. Also commands like C<add> are not affected - you have to specify "
17176 "the C<readonly:true> option explicitly if you need it."
17180 #: ../fish/guestfish.pod:384
17181 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
17185 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:253
17186 #: ../rescue/virt-rescue.pod:173
17187 msgid "B<--selinux>"
17191 #: ../fish/guestfish.pod:388
17192 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
17196 #: ../fish/guestfish.pod:394
17198 "Enable very verbose messages. This is particularly useful if you find a bug."
17202 #: ../fish/guestfish.pod:401
17203 msgid "Display the guestfish / libguestfs version number and exit."
17207 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:269
17208 #: ../rescue/virt-rescue.pod:194
17213 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:271
17214 #: ../rescue/virt-rescue.pod:196
17219 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:273
17221 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
17222 "mounts are done read-write."
17226 #: ../fish/guestfish.pod:410
17227 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
17231 #: ../fish/guestfish.pod:414
17232 msgid "Echo each command before executing it."
17236 #: ../fish/guestfish.pod:418
17237 msgid "COMMANDS ON COMMAND LINE"
17241 #: ../fish/guestfish.pod:420
17243 "Any additional (non-option) arguments are treated as commands to execute."
17247 #: ../fish/guestfish.pod:423
17249 "Commands to execute should be separated by a colon (C<:>), where the colon "
17250 "is a separate parameter. Thus:"
17254 #: ../fish/guestfish.pod:426
17257 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
17262 #: ../fish/guestfish.pod:428
17264 "If there are no additional arguments, then we enter a shell, either an "
17265 "interactive shell with a prompt (if the input is a terminal) or a non-"
17266 "interactive shell."
17270 #: ../fish/guestfish.pod:432
17272 "In either command line mode or non-interactive shell, the first command that "
17273 "gives an error causes the whole shell to exit. In interactive mode (with a "
17274 "prompt) if a command fails, you can continue to enter commands."
17278 #: ../fish/guestfish.pod:437
17279 msgid "USING launch (OR run)"
17283 #: ../fish/guestfish.pod:439
17285 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
17286 "then launch it, then mount any disks you need, and finally issue actions/"
17287 "commands. So the general order of the day is:"
17291 #: ../fish/guestfish.pod:447
17292 msgid "add or -a/--add"
17296 #: ../fish/guestfish.pod:451
17297 msgid "launch (aka run)"
17301 #: ../fish/guestfish.pod:455
17302 msgid "mount or -m/--mount"
17306 #: ../fish/guestfish.pod:459
17307 msgid "any other commands"
17311 #: ../fish/guestfish.pod:463
17313 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
17314 "guest before mounting or performing any other commands."
17318 #: ../fish/guestfish.pod:466
17320 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
17321 "I<--new> options were given then C<run> is done automatically, simply "
17322 "because guestfish can't perform the action you asked for without doing this."
17326 #: ../fish/guestfish.pod:471
17327 msgid "OPENING DISKS FOR READ AND WRITE"
17331 #: ../fish/guestfish.pod:473
17333 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
17334 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
17335 "I<-i> and I<-m> open disk images read-only or for writing."
17339 #: ../fish/guestfish.pod:478
17341 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
17342 "opening disk images supplied on the command line for write. To open a disk "
17343 "image read-only you have to do I<-a image --ro>."
17347 #: ../fish/guestfish.pod:482
17349 "This matters: If you accidentally open a live VM disk image writable then "
17350 "you will cause irreversible disk corruption."
17354 #: ../fish/guestfish.pod:485
17356 "In a future libguestfs we intend to change the default the other way. Disk "
17357 "images will be opened read-only. You will have to either specify "
17358 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
17359 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
17360 "access for disk images specified by those other command line options."
17364 #: ../fish/guestfish.pod:492
17366 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
17367 "which does nothing (it is already the default). However it is highly "
17368 "recommended that you use this option to indicate that you need write access, "
17369 "and prepare your scripts for the day when this option will be required for "
17374 #: ../fish/guestfish.pod:498
17376 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17377 "other libguestfs program apart from guestfish and guestmount."
17381 #: ../fish/guestfish.pod:501
17386 #: ../fish/guestfish.pod:503
17388 "You can quote ordinary parameters using either single or double quotes. For "
17393 #: ../fish/guestfish.pod:506
17396 " add \"file with a space.img\"\n"
17401 #: ../fish/guestfish.pod:508
17404 " rm '/file name'\n"
17409 #: ../fish/guestfish.pod:510
17417 #: ../fish/guestfish.pod:512
17419 "A few commands require a list of strings to be passed. For these, use a "
17420 "whitespace-separated list, enclosed in quotes. Strings containing "
17421 "whitespace to be passed through must be enclosed in single quotes. A "
17422 "literal single quote must be escaped with a backslash."
17426 #: ../fish/guestfish.pod:517
17429 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17430 " command \"/bin/echo 'foo bar'\"\n"
17431 " command \"/bin/echo \\'foo\\'\"\n"
17436 #: ../fish/guestfish.pod:521
17437 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
17441 #: ../fish/guestfish.pod:523
17443 "In double-quoted arguments (only) use backslash to insert special characters:"
17447 #: ../fish/guestfish.pod:528
17452 #: ../fish/guestfish.pod:530
17453 msgid "Alert (bell) character."
17457 #: ../fish/guestfish.pod:532
17462 #: ../fish/guestfish.pod:534
17463 msgid "Backspace character."
17467 #: ../fish/guestfish.pod:536
17472 #: ../fish/guestfish.pod:538
17473 msgid "Form feed character."
17477 #: ../fish/guestfish.pod:540
17482 #: ../fish/guestfish.pod:542
17483 msgid "Newline character."
17487 #: ../fish/guestfish.pod:544
17492 #: ../fish/guestfish.pod:546
17493 msgid "Carriage return character."
17497 #: ../fish/guestfish.pod:548
17502 #: ../fish/guestfish.pod:550
17503 msgid "Horizontal tab character."
17507 #: ../fish/guestfish.pod:552
17512 #: ../fish/guestfish.pod:554
17513 msgid "Vertical tab character."
17517 #: ../fish/guestfish.pod:556
17522 #: ../fish/guestfish.pod:558
17523 msgid "A literal double quote character."
17527 #: ../fish/guestfish.pod:560
17532 #: ../fish/guestfish.pod:562
17534 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
17539 #: ../fish/guestfish.pod:565
17544 #: ../fish/guestfish.pod:567
17546 "A character with hex value I<hh>. There must be precisely 2 hex digits."
17550 #: ../fish/guestfish.pod:570
17552 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
17557 #: ../fish/guestfish.pod:573
17562 #: ../fish/guestfish.pod:575
17563 msgid "A literal backslash character."
17567 #: ../fish/guestfish.pod:579
17568 msgid "OPTIONAL ARGUMENTS"
17572 #: ../fish/guestfish.pod:581
17574 "Some commands take optional arguments. These arguments appear in this "
17575 "documentation as C<[argname:..]>. You can use them as in these examples:"
17579 #: ../fish/guestfish.pod:585
17582 " add-drive-opts filename\n"
17587 #: ../fish/guestfish.pod:587
17590 " add-drive-opts filename readonly:true\n"
17595 #: ../fish/guestfish.pod:589
17598 " add-drive-opts filename format:qcow2 readonly:false\n"
17603 #: ../fish/guestfish.pod:591
17605 "Each optional argument can appear at most once. All optional arguments must "
17606 "appear after the required ones."
17610 #: ../fish/guestfish.pod:594
17615 #: ../fish/guestfish.pod:596
17617 "This section applies to all commands which can take integers as parameters."
17621 #: ../fish/guestfish.pod:599
17622 msgid "SIZE SUFFIX"
17626 #: ../fish/guestfish.pod:601
17628 "When the command takes a parameter measured in bytes, you can use one of the "
17629 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17633 #: ../fish/guestfish.pod:607
17634 msgid "B<k> or B<K> or B<KiB>"
17638 #: ../fish/guestfish.pod:609
17639 msgid "The size in kilobytes (multiplied by 1024)."
17643 #: ../fish/guestfish.pod:611
17648 #: ../fish/guestfish.pod:613
17649 msgid "The size in SI 1000 byte units."
17653 #: ../fish/guestfish.pod:615
17654 msgid "B<M> or B<MiB>"
17658 #: ../fish/guestfish.pod:617
17659 msgid "The size in megabytes (multiplied by 1048576)."
17663 #: ../fish/guestfish.pod:619
17668 #: ../fish/guestfish.pod:621
17669 msgid "The size in SI 1000000 byte units."
17673 #: ../fish/guestfish.pod:623
17674 msgid "B<G> or B<GiB>"
17678 #: ../fish/guestfish.pod:625
17679 msgid "The size in gigabytes (multiplied by 2**30)."
17683 #: ../fish/guestfish.pod:627
17688 #: ../fish/guestfish.pod:629
17689 msgid "The size in SI 10**9 byte units."
17693 #: ../fish/guestfish.pod:631
17694 msgid "B<T> or B<TiB>"
17698 #: ../fish/guestfish.pod:633
17699 msgid "The size in terabytes (multiplied by 2**40)."
17703 #: ../fish/guestfish.pod:635
17708 #: ../fish/guestfish.pod:637
17709 msgid "The size in SI 10**12 byte units."
17713 #: ../fish/guestfish.pod:639
17714 msgid "B<P> or B<PiB>"
17718 #: ../fish/guestfish.pod:641
17719 msgid "The size in petabytes (multiplied by 2**50)."
17723 #: ../fish/guestfish.pod:643
17728 #: ../fish/guestfish.pod:645
17729 msgid "The size in SI 10**15 byte units."
17733 #: ../fish/guestfish.pod:647
17734 msgid "B<E> or B<EiB>"
17738 #: ../fish/guestfish.pod:649
17739 msgid "The size in exabytes (multiplied by 2**60)."
17743 #: ../fish/guestfish.pod:651
17748 #: ../fish/guestfish.pod:653
17749 msgid "The size in SI 10**18 byte units."
17753 #: ../fish/guestfish.pod:655
17754 msgid "B<Z> or B<ZiB>"
17758 #: ../fish/guestfish.pod:657
17759 msgid "The size in zettabytes (multiplied by 2**70)."
17763 #: ../fish/guestfish.pod:659
17768 #: ../fish/guestfish.pod:661
17769 msgid "The size in SI 10**21 byte units."
17773 #: ../fish/guestfish.pod:663
17774 msgid "B<Y> or B<YiB>"
17778 #: ../fish/guestfish.pod:665
17779 msgid "The size in yottabytes (multiplied by 2**80)."
17783 #: ../fish/guestfish.pod:667
17788 #: ../fish/guestfish.pod:669
17789 msgid "The size in SI 10**24 byte units."
17793 #: ../fish/guestfish.pod:675
17796 " truncate-size /file 1G\n"
17801 #: ../fish/guestfish.pod:677
17802 msgid "would truncate the file to 1 gigabyte."
17806 #: ../fish/guestfish.pod:679
17808 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
17809 "the parameter to L</memsize> is specified in megabytes already). Adding a "
17810 "suffix will probably not do what you expect."
17814 #: ../fish/guestfish.pod:683
17815 msgid "OCTAL AND HEXADECIMAL NUMBERS"
17819 #: ../fish/guestfish.pod:685
17821 "For specifying the radix (base) use the C convention: C<0> to prefix an "
17822 "octal number or C<0x> to prefix a hexadecimal number. For example:"
17826 #: ../fish/guestfish.pod:688
17829 " 1234 decimal number 1234\n"
17830 " 02322 octal number, equivalent to decimal 1234\n"
17831 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
17836 #: ../fish/guestfish.pod:692
17838 "When using the C<chmod> command, you almost always want to specify an octal "
17839 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
17840 "L<chmod(1)> program):"
17844 #: ../fish/guestfish.pod:696
17847 " chmod 0777 /public # OK\n"
17848 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
17853 #: ../fish/guestfish.pod:699
17855 "Commands that return numbers usually print them in decimal, but some "
17856 "commands print numbers in other radices (eg. C<umask> prints the mode in "
17857 "octal, preceeded by C<0>)."
17861 #: ../fish/guestfish.pod:703
17862 msgid "WILDCARDS AND GLOBBING"
17866 #: ../fish/guestfish.pod:705
17868 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
17869 "(globbing) by default. So for example the following will not do what you "
17874 #: ../fish/guestfish.pod:709
17882 #: ../fish/guestfish.pod:711
17884 "Assuming you don't have a directory called literally C</home/*> then the "
17885 "above command will return an error."
17889 #: ../fish/guestfish.pod:714
17890 msgid "To perform wildcard expansion, use the C<glob> command."
17894 #: ../fish/guestfish.pod:716
17897 " glob rm-rf /home/*\n"
17902 #: ../fish/guestfish.pod:718
17904 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
17905 "many times), equivalent to:"
17909 #: ../fish/guestfish.pod:721
17912 " rm-rf /home/jim\n"
17913 " rm-rf /home/joe\n"
17914 " rm-rf /home/mary\n"
17919 #: ../fish/guestfish.pod:725
17920 msgid "C<glob> only works on simple guest paths and not on device names."
17924 #: ../fish/guestfish.pod:727
17926 "If you have several parameters, each containing a wildcard, then glob will "
17927 "perform a Cartesian product."
17931 #: ../fish/guestfish.pod:730
17936 #: ../fish/guestfish.pod:732
17938 "Any line which starts with a I<#> character is treated as a comment and "
17939 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
17940 "a command. For example:"
17944 #: ../fish/guestfish.pod:736
17947 " # this is a comment\n"
17948 " # this is a comment\n"
17949 " foo # NOT a comment\n"
17954 #: ../fish/guestfish.pod:740
17955 msgid "Blank lines are also ignored."
17959 #: ../fish/guestfish.pod:742
17960 msgid "RUNNING COMMANDS LOCALLY"
17964 #: ../fish/guestfish.pod:744
17966 "Any line which starts with a I<!> character is treated as a command sent to "
17967 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
17971 #: ../fish/guestfish.pod:748
17975 " tgz-out /remote local/remote-data.tar.gz\n"
17980 #: ../fish/guestfish.pod:751
17982 "will create a directory C<local> on the host, and then export the contents "
17983 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
17984 "(See C<tgz-out>)."
17988 #: ../fish/guestfish.pod:755
17990 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
17991 "effect, due to the way that subprocesses work in Unix."
17995 #: ../fish/guestfish.pod:758
17996 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
18000 #: ../fish/guestfish.pod:760
18002 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
18003 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
18004 "and executed as guestfish commands."
18008 #: ../fish/guestfish.pod:764
18010 "Thus you can use shell script to construct arbitrary guestfish commands "
18011 "which are then parsed by guestfish."
18015 #: ../fish/guestfish.pod:767
18017 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
18018 "through C</foo.100>) using guestfish commands alone. However this is simple "
18019 "if we use a shell script to create the guestfish commands for us:"
18023 #: ../fish/guestfish.pod:772
18026 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
18031 #: ../fish/guestfish.pod:774
18032 msgid "or with names like C</foo.001>:"
18036 #: ../fish/guestfish.pod:776
18039 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
18044 #: ../fish/guestfish.pod:778
18046 "When using guestfish interactively it can be helpful to just run the shell "
18047 "script first (ie. remove the initial C<E<lt>> character so it is just an "
18048 "ordinary I<!> local command), see what guestfish commands it would run, and "
18049 "when you are happy with those prepend the C<E<lt>> character to run the "
18050 "guestfish commands for real."
18054 #: ../fish/guestfish.pod:784
18059 #: ../fish/guestfish.pod:786
18061 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
18062 "command (a guestfish command) to the second command (any host command). For "
18067 #: ../fish/guestfish.pod:790
18070 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
18075 #: ../fish/guestfish.pod:792
18077 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
18078 "program). The above command would list all accounts in the guest filesystem "
18079 "which have UID 0, ie. root accounts including backdoors. Other examples:"
18083 #: ../fish/guestfish.pod:797
18086 " hexdump /bin/ls | head\n"
18087 " list-devices | tail -1\n"
18088 " tgz-out / - | tar ztf -\n"
18093 #: ../fish/guestfish.pod:801
18095 "The space before the pipe symbol is required, any space after the pipe "
18096 "symbol is optional. Everything after the pipe symbol is just passed "
18097 "straight to the host shell, so it can contain redirections, globs and "
18098 "anything else that makes sense on the host side."
18102 #: ../fish/guestfish.pod:806
18104 "To use a literal argument which begins with a pipe symbol, you have to quote "
18109 #: ../fish/guestfish.pod:809
18117 #: ../fish/guestfish.pod:811
18118 msgid "HOME DIRECTORIES"
18122 #: ../fish/guestfish.pod:813
18124 "If a parameter starts with the character C<~> then the tilde may be expanded "
18125 "as a home directory path (either C<~> for the current user's home directory, "
18126 "or C<~user> for another user)."
18130 #: ../fish/guestfish.pod:817
18132 "Note that home directory expansion happens for users known I<on the host>, "
18133 "not in the guest filesystem."
18137 #: ../fish/guestfish.pod:820
18139 "To use a literal argument which begins with a tilde, you have to quote it, "
18144 #: ../fish/guestfish.pod:823
18152 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:519
18153 msgid "ENCRYPTED DISKS"
18157 #: ../fish/guestfish.pod:827
18159 "Libguestfs has some support for Linux guests encrypted according to the "
18160 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
18161 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
18162 "LUKS is supported."
18166 #: ../fish/guestfish.pod:832
18167 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
18171 #: ../fish/guestfish.pod:834
18174 " ><fs> vfs-type /dev/sda2\n"
18180 #: ../fish/guestfish.pod:837
18182 "Then open those devices using L</luks-open>. This creates a device-mapper "
18183 "device called C</dev/mapper/luksdev>."
18187 #: ../fish/guestfish.pod:840
18190 " ><fs> luks-open /dev/sda2 luksdev\n"
18191 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
18196 #: ../fish/guestfish.pod:843
18198 "Finally you have to tell LVM to scan for volume groups on the newly created "
18203 #: ../fish/guestfish.pod:846
18207 " vg-activate-all true\n"
18212 #: ../fish/guestfish.pod:849
18213 msgid "The logical volume(s) can now be mounted in the usual way."
18217 #: ../fish/guestfish.pod:851
18219 "Before closing a LUKS device you must unmount any logical volumes on it and "
18220 "deactivate the volume groups by calling C<vg-activate false VG> on each "
18221 "one. Then you can close the mapper device:"
18225 #: ../fish/guestfish.pod:855
18228 " vg-activate false /dev/VG\n"
18229 " luks-close /dev/mapper/luksdev\n"
18234 #: ../fish/guestfish.pod:860
18236 "If a path is prefixed with C<win:> then you can use Windows-style drive "
18237 "letters and paths (with some limitations). The following commands are "
18242 #: ../fish/guestfish.pod:864
18245 " file /WINDOWS/system32/config/system.LOG\n"
18250 #: ../fish/guestfish.pod:866
18253 " file win:\\windows\\system32\\config\\system.log\n"
18258 #: ../fish/guestfish.pod:868
18261 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
18266 #: ../fish/guestfish.pod:870
18268 "The parameter is rewritten \"behind the scenes\" by looking up the position "
18269 "where the drive is mounted, prepending that to the path, changing all "
18270 "backslash characters to forward slash, then resolving the result using L</"
18271 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
18272 "the parameter might be rewritten like this:"
18276 #: ../fish/guestfish.pod:876
18279 " win:e:\\foo\\bar => /e/FOO/bar\n"
18284 #: ../fish/guestfish.pod:878
18285 msgid "This only works in argument positions that expect a path."
18289 #: ../fish/guestfish.pod:880
18290 msgid "UPLOADING AND DOWNLOADING FILES"
18294 #: ../fish/guestfish.pod:882
18296 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
18297 "others which upload from or download to a local file, you can use the "
18298 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
18302 #: ../fish/guestfish.pod:886
18310 #: ../fish/guestfish.pod:888
18312 "reads stdin and creates from that a file C</foo> in the disk image, and:"
18316 #: ../fish/guestfish.pod:891
18319 " tar-out /etc - | tar tf -\n"
18324 #: ../fish/guestfish.pod:893
18326 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18327 "command (see L</PIPES>)."
18331 #: ../fish/guestfish.pod:896
18333 "When using C<-> to read from stdin, the input is read up to the end of "
18334 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
18335 "some arbitrary end marker:"
18339 #: ../fish/guestfish.pod:900
18342 " upload -<<END /foo\n"
18351 #: ../fish/guestfish.pod:906
18353 "Any string of characters can be used instead of C<END>. The end marker must "
18354 "appear on a line of its own, without any preceeding or following characters "
18355 "(not even spaces)."
18359 #: ../fish/guestfish.pod:910
18361 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
18362 "upload local files (so-called \"FileIn\" parameters in the generator)."
18366 #: ../fish/guestfish.pod:913
18367 msgid "EXIT ON ERROR BEHAVIOUR"
18371 #: ../fish/guestfish.pod:915
18373 "By default, guestfish will ignore any errors when in interactive mode (ie. "
18374 "taking commands from a human over a tty), and will exit on the first error "
18375 "in non-interactive mode (scripts, commands given on the command line)."
18379 #: ../fish/guestfish.pod:920
18381 "If you prefix a command with a I<-> character, then that command will not "
18382 "cause guestfish to exit, even if that (one) command returns an error."
18386 #: ../fish/guestfish.pod:924
18387 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
18391 #: ../fish/guestfish.pod:926
18393 "Guestfish can be remote-controlled over a socket. This is useful "
18394 "particularly in shell scripts where you want to make several different "
18395 "changes to a filesystem, but you don't want the overhead of starting up a "
18396 "guestfish process each time."
18400 #: ../fish/guestfish.pod:931
18401 msgid "Start a guestfish server process using:"
18405 #: ../fish/guestfish.pod:933
18408 " eval \"`guestfish --listen`\"\n"
18413 #: ../fish/guestfish.pod:935
18414 msgid "and then send it commands by doing:"
18418 #: ../fish/guestfish.pod:937
18421 " guestfish --remote cmd [...]\n"
18426 #: ../fish/guestfish.pod:939
18427 msgid "To cause the server to exit, send it the exit command:"
18431 #: ../fish/guestfish.pod:943
18433 "Note that the server will normally exit if there is an error in a command. "
18434 "You can change this in the usual way. See section L</EXIT ON ERROR "
18439 #: ../fish/guestfish.pod:947
18440 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
18444 #: ../fish/guestfish.pod:949
18446 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
18447 "is how the I<--remote> option knows where to send the commands. You can "
18448 "have several guestfish listener processes running using:"
18452 #: ../fish/guestfish.pod:953
18455 " eval \"`guestfish --listen`\"\n"
18456 " pid1=$GUESTFISH_PID\n"
18457 " eval \"`guestfish --listen`\"\n"
18458 " pid2=$GUESTFISH_PID\n"
18460 " guestfish --remote=$pid1 cmd\n"
18461 " guestfish --remote=$pid2 cmd\n"
18466 #: ../fish/guestfish.pod:961
18467 msgid "REMOTE CONTROL AND CSH"
18471 #: ../fish/guestfish.pod:963
18473 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
18478 #: ../fish/guestfish.pod:966
18481 " eval \"`guestfish --listen --csh`\"\n"
18486 #: ../fish/guestfish.pod:968
18487 msgid "REMOTE CONTROL DETAILS"
18491 #: ../fish/guestfish.pod:970
18493 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
18494 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
18495 "and C<$PID> is the process ID of the server."
18499 #: ../fish/guestfish.pod:974
18500 msgid "Guestfish client and server versions must match exactly."
18504 #: ../fish/guestfish.pod:976
18505 msgid "REMOTE CONTROL RUN COMMAND HANGING"
18509 #: ../fish/guestfish.pod:978
18511 "Using the C<run> (or C<launch>) command remotely in a command substitution "
18512 "context hangs, ie. don't do (note the backquotes):"
18516 #: ../fish/guestfish.pod:981
18519 " a=`guestfish --remote run`\n"
18524 #: ../fish/guestfish.pod:983
18526 "Since the C<run> command produces no output on stdout, this is not useful "
18527 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
18532 #: ../fish/guestfish.pod:987
18533 msgid "PREPARED DISK IMAGES"
18537 #: ../fish/guestfish.pod:989
18539 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
18540 "preformatted disk images that guestfish can make for you to save typing. "
18541 "This is particularly useful for testing purposes. This option is used "
18542 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
18543 "can be mixed with I<-a>)."
18547 #: ../fish/guestfish.pod:995
18549 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
18550 "the second and so on. Existing files in the current directory are "
18555 #: ../fish/guestfish.pod:999
18557 "The type briefly describes how the disk should be sized, partitioned, how "
18558 "filesystem(s) should be created, and how content should be added. "
18559 "Optionally the type can be followed by extra parameters, separated by C<:> "
18560 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
18561 "allocated disk, containing a single partition, with the partition formatted "
18562 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
18567 #: ../fish/guestfish.pod:1007
18568 msgid "To list the available types and any extra parameters they take, run:"
18572 #: ../fish/guestfish.pod:1011
18574 "Note that the prepared filesystem is not mounted. You would usually have to "
18575 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18579 #: ../fish/guestfish.pod:1015
18581 "If any I<-N> or I<--new> options are given, the guest is automatically "
18586 #: ../fish/guestfish.pod:1020
18587 msgid "Create a 100MB disk with an ext4-formatted partition:"
18591 #: ../fish/guestfish.pod:1022
18594 " guestfish -N fs:ext4\n"
18599 #: ../fish/guestfish.pod:1024
18600 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18604 #: ../fish/guestfish.pod:1026
18607 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18612 #: ../fish/guestfish.pod:1028
18613 msgid "Create a blank 200MB disk:"
18617 #: ../fish/guestfish.pod:1030
18620 " guestfish -N disk:200M\n"
18625 #: ../fish/guestfish.pod:1032
18626 msgid "PROGRESS BARS"
18630 #: ../fish/guestfish.pod:1034
18632 "Some (not all) long-running commands send progress notification messages as "
18633 "they are running. Guestfish turns these messages into progress bars."
18637 #: ../fish/guestfish.pod:1038
18639 "When a command that supports progress bars takes longer than two seconds to "
18640 "run, and if progress bars are enabled, then you will see one appearing below "
18645 #: ../fish/guestfish.pod:1042
18648 " ><fs> copy-size /large-file /another-file 2048M\n"
18649 " / 10% [#####-----------------------------------------] 00:30\n"
18654 #: ../fish/guestfish.pod:1045
18656 "The spinner on the left hand side moves round once for every progress "
18657 "notification received from the backend. This is a (reasonably) golden "
18658 "assurance that the command is \"doing something\" even if the progress bar "
18659 "is not moving, because the command is able to send the progress "
18660 "notifications. When the bar reaches 100% and the command finishes, the "
18661 "spinner disappears."
18665 #: ../fish/guestfish.pod:1052
18667 "Progress bars are enabled by default when guestfish is used interactively. "
18668 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18669 "and you can disable them completely using I<--no-progress-bars>."
18673 #: ../fish/guestfish.pod:1057
18674 msgid "GUESTFISH COMMANDS"
18678 #: ../fish/guestfish.pod:1059
18680 "The commands in this section are guestfish convenience commands, in other "
18681 "words, they are not part of the L<guestfs(3)> API."
18685 #: ../fish/guestfish.pod:1062
18690 #: ../fish/guestfish.pod:1064
18699 #: ../fish/guestfish.pod:1067
18700 msgid "Without any parameter, this provides general help."
18704 #: ../fish/guestfish.pod:1069
18705 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18709 #: ../fish/guestfish.pod:1071
18710 msgid "quit | exit"
18714 #: ../fish/guestfish.pod:1073
18715 msgid "This exits guestfish. You can also use C<^D> key."
18719 #: ../fish/guestfish.pod:1075
18720 msgid "@FISH_COMMANDS@"
18724 #: ../fish/guestfish.pod:1077
18729 #: ../fish/guestfish.pod:1079 ../src/guestfs.pod:1502
18734 #: ../fish/guestfish.pod:1083
18736 "guestfish returns 0 if the commands completed without error, or 1 if there "
18741 #: ../fish/guestfish.pod:1090
18746 #: ../fish/guestfish.pod:1092
18748 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18753 #: ../fish/guestfish.pod:1095 ../src/guestfs.pod:3107
18754 msgid "FEBOOTSTRAP_KERNEL"
18758 #: ../fish/guestfish.pod:1097 ../src/guestfs.pod:3109
18759 msgid "FEBOOTSTRAP_MODULES"
18763 #: ../fish/guestfish.pod:1099 ../src/guestfs.pod:3111
18765 "These two environment variables allow the kernel that libguestfs uses in the "
18766 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
18767 "most recent host kernel is chosen. For more information about kernel "
18768 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
18769 "available in febootstrap E<ge> 3.8."
18773 #: ../fish/guestfish.pod:1105
18774 msgid "GUESTFISH_DISPLAY_IMAGE"
18778 #: ../fish/guestfish.pod:1107
18780 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
18781 "If not set, it uses L<display(1)>."
18785 #: ../fish/guestfish.pod:1110
18786 msgid "GUESTFISH_PID"
18790 #: ../fish/guestfish.pod:1112
18792 "Used with the I<--remote> option to specify the remote guestfish process to "
18793 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18797 #: ../fish/guestfish.pod:1116
18802 #: ../fish/guestfish.pod:1118
18804 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18805 "not specified, the external L<hexedit(1)> program is used."
18809 #: ../fish/guestfish.pod:1122
18814 #: ../fish/guestfish.pod:1124
18816 "If compiled with GNU readline support, various files in the home directory "
18817 "can be used. See L</FILES>."
18821 #: ../fish/guestfish.pod:1127 ../src/guestfs.pod:3117
18822 msgid "LIBGUESTFS_APPEND"
18826 #: ../fish/guestfish.pod:1129 ../src/guestfs.pod:3119
18827 msgid "Pass additional options to the guest kernel."
18831 #: ../fish/guestfish.pod:1131 ../src/guestfs.pod:3121
18832 msgid "LIBGUESTFS_DEBUG"
18836 #: ../fish/guestfish.pod:1133
18838 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18839 "effect as using the B<-v> option."
18843 #: ../fish/guestfish.pod:1136 ../src/guestfs.pod:3126
18844 msgid "LIBGUESTFS_MEMSIZE"
18848 #: ../fish/guestfish.pod:1138 ../src/guestfs.pod:3128
18850 "Set the memory allocated to the qemu process, in megabytes. For example:"
18854 #: ../fish/guestfish.pod:1141 ../src/guestfs.pod:3131
18857 " LIBGUESTFS_MEMSIZE=700\n"
18862 #: ../fish/guestfish.pod:1143 ../src/guestfs.pod:3133
18863 msgid "LIBGUESTFS_PATH"
18867 #: ../fish/guestfish.pod:1145
18869 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18870 "the discussion of paths in L<guestfs(3)>."
18874 #: ../fish/guestfish.pod:1148 ../src/guestfs.pod:3138
18875 msgid "LIBGUESTFS_QEMU"
18879 #: ../fish/guestfish.pod:1150 ../src/guestfs.pod:3140
18881 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
18882 "which was found at compile time by the configure script is used."
18886 #: ../fish/guestfish.pod:1154 ../src/guestfs.pod:3146
18887 msgid "LIBGUESTFS_TRACE"
18891 #: ../fish/guestfish.pod:1156
18892 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18896 #: ../fish/guestfish.pod:1158
18901 #: ../fish/guestfish.pod:1160
18903 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18908 #: ../fish/guestfish.pod:1163 ../src/guestfs.pod:3151
18913 #: ../fish/guestfish.pod:1165 ../src/guestfs.pod:3153
18915 "Location of temporary directory, defaults to C</tmp> except for the cached "
18916 "supermin appliance which defaults to C</var/tmp>."
18920 #: ../fish/guestfish.pod:1168 ../src/guestfs.pod:3156
18922 "If libguestfs was compiled to use the supermin appliance then the real "
18923 "appliance is cached in this directory, shared between all handles belonging "
18924 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
18925 "use in case C</var/tmp> is not large enough."
18929 #: ../fish/guestfish.pod:1176 ../fuse/guestmount.pod:288
18930 #: ../rescue/virt-rescue.pod:273
18935 #: ../fish/guestfish.pod:1180 ../fuse/guestmount.pod:292
18936 #: ../rescue/virt-rescue.pod:277
18937 msgid "$HOME/.libguestfs-tools.rc"
18941 #: ../fish/guestfish.pod:1182 ../fuse/guestmount.pod:294
18942 #: ../rescue/virt-rescue.pod:279
18943 msgid "/etc/libguestfs-tools.conf"
18947 #: ../fish/guestfish.pod:1184 ../fuse/guestmount.pod:296
18948 #: ../rescue/virt-rescue.pod:281
18950 "This configuration file controls the default read-only or read-write mode "
18951 "(I<--ro> or I<--rw>)."
18955 #: ../fish/guestfish.pod:1187
18956 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
18960 #: ../fish/guestfish.pod:1189
18961 msgid "$HOME/.guestfish"
18965 #: ../fish/guestfish.pod:1191
18967 "If compiled with GNU readline support, then the command history is saved in "
18972 #: ../fish/guestfish.pod:1194
18973 msgid "$HOME/.inputrc"
18977 #: ../fish/guestfish.pod:1196
18978 msgid "/etc/inputrc"
18982 #: ../fish/guestfish.pod:1198
18984 "If compiled with GNU readline support, then these files can be used to "
18985 "configure readline. For further information, please see L<readline(3)/"
18986 "INITIALIZATION FILE>."
18990 #: ../fish/guestfish.pod:1202
18991 msgid "To write rules which only apply to guestfish, use:"
18995 #: ../fish/guestfish.pod:1204
19005 #: ../fish/guestfish.pod:1208
19007 "Variables that you can set in inputrc that change the behaviour of guestfish "
19008 "in useful ways include:"
19012 #: ../fish/guestfish.pod:1213
19013 msgid "completion-ignore-case (default: on)"
19017 #: ../fish/guestfish.pod:1215
19019 "By default, guestfish will ignore case when tab-completing paths on the "
19024 #: ../fish/guestfish.pod:1218
19027 " set completion-ignore-case off\n"
19032 #: ../fish/guestfish.pod:1220
19033 msgid "to make guestfish case sensitive."
19037 #: ../fish/guestfish.pod:1224
19042 #: ../fish/guestfish.pod:1226
19043 msgid "test2.img (etc)"
19047 #: ../fish/guestfish.pod:1228
19049 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
19050 "will be created in the file C<test1.img> in the current directory. The "
19051 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
19052 "the same name will be overwritten."
19056 #: ../fish/guestfish.pod:1237
19058 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
19059 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
19060 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
19061 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
19062 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
19063 ">, L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
19067 #: ../fish/guestfish.pod:1266 ../src/guestfs.pod:3243
19068 #: ../test-tool/libguestfs-test-tool.pod:112
19069 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
19073 #: ../fish/virt-copy-in.pod:5
19075 "virt-copy-in - Copy files and directories into a virtual machine disk image."
19079 #: ../fish/virt-copy-in.pod:9
19082 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
19087 #: ../fish/virt-copy-in.pod:11
19090 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
19095 #: ../fish/virt-copy-in.pod:15
19097 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
19098 "causing disk corruption. The virtual machine must be shut down before you "
19099 "use this command."
19103 #: ../fish/virt-copy-in.pod:21
19105 "C<virt-copy-in> copies files and directories from the local disk into a "
19106 "virtual machine disk image or named libvirt domain."
19110 #: ../fish/virt-copy-in.pod:24
19112 "You can give one of more filenames and directories on the command line. "
19113 "Directories are copied in recursively. The final parameter must be the "
19114 "destination directory in the disk image which must be an absolute path "
19115 "starting with a C</> character."
19119 #: ../fish/virt-copy-in.pod:33
19122 " virt-copy-in -d MyGuest resolv.conf /etc\n"
19127 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
19128 msgid "Upload a home directory to a guest:"
19132 #: ../fish/virt-copy-in.pod:37
19135 " virt-copy-in -d MyGuest skel /home\n"
19140 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
19141 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
19142 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
19146 #: ../fish/virt-copy-in.pod:41
19148 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19149 "> C<copy-in> command. For anything more complex than a trivial copy, you "
19150 "are probably better off using guestfish directly."
19154 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
19155 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
19157 "Since the shell script just passes options straight to guestfish, read "
19158 "L<guestfish(1)> to see the full list of options."
19162 #: ../fish/virt-copy-in.pod:52
19164 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
19165 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
19169 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
19170 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
19171 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
19175 #: ../fish/virt-copy-out.pod:5
19177 "virt-copy-out - Copy files and directories out of a virtual machine disk "
19182 #: ../fish/virt-copy-out.pod:9
19185 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
19190 #: ../fish/virt-copy-out.pod:11
19193 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
19198 #: ../fish/virt-copy-out.pod:15
19200 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
19201 "image or named libvirt domain."
19205 #: ../fish/virt-copy-out.pod:18
19207 "You can give one of more filenames and directories on the command line. "
19208 "Directories are copied out recursively."
19212 #: ../fish/virt-copy-out.pod:23
19213 msgid "Download the home directories from a virtual machine:"
19217 #: ../fish/virt-copy-out.pod:25
19221 " virt-copy-out -d MyGuest /home homes\n"
19226 #: ../fish/virt-copy-out.pod:30
19228 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19229 "> C<copy-out> command. For anything more complex than a trivial copy, you "
19230 "are probably better off using guestfish directly."
19234 #: ../fish/virt-copy-out.pod:41
19236 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
19237 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
19241 #: ../fish/virt-tar-in.pod:5
19242 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
19246 #: ../fish/virt-tar-in.pod:9
19249 " virt-tar-in -a disk.img data.tar /destination\n"
19254 #: ../fish/virt-tar-in.pod:11
19257 " virt-tar-in -d domain data.tar /destination\n"
19262 #: ../fish/virt-tar-in.pod:13
19265 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
19270 #: ../fish/virt-tar-in.pod:17
19272 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
19273 "causing disk corruption. The virtual machine must be shut down before you "
19274 "use this command."
19278 #: ../fish/virt-tar-in.pod:23
19280 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
19281 "image or named libvirt domain."
19285 #: ../fish/virt-tar-in.pod:26
19287 "The first parameter is the tar file. Use C<-> to read the tar file from "
19288 "standard input. The second parameter is the absolute target directory to "
19293 #: ../fish/virt-tar-in.pod:34
19296 " virt-tar-in -d MyGuest homes.tar /home\n"
19301 #: ../fish/virt-tar-in.pod:38
19303 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19304 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
19305 "probably better off using guestfish directly."
19309 #: ../fish/virt-tar-in.pod:49
19311 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
19312 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
19317 #: ../fish/virt-tar-out.pod:5
19319 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
19323 #: ../fish/virt-tar-out.pod:9
19326 " virt-tar-out -a disk.img /dir files.tar\n"
19331 #: ../fish/virt-tar-out.pod:11
19334 " virt-tar-out -d domain /dir files.tar\n"
19339 #: ../fish/virt-tar-out.pod:13
19342 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
19347 #: ../fish/virt-tar-out.pod:17
19349 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
19353 #: ../fish/virt-tar-out.pod:20
19355 "The first parameter is the absolute path of the virtual machine directory. "
19356 "The second parameter is the tar file to write. Use C<-> to write to "
19361 #: ../fish/virt-tar-out.pod:26
19362 msgid "Download the home directories from a guest:"
19366 #: ../fish/virt-tar-out.pod:28
19369 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
19374 #: ../fish/virt-tar-out.pod:32
19376 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19377 "> C<tar-out> command. For anything more complex than a trivial copy, you "
19378 "are probably better off using guestfish directly."
19382 #: ../fish/virt-tar-out.pod:43
19384 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
19385 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
19389 #: ../fuse/guestmount.pod:5
19391 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
19395 #: ../fuse/guestmount.pod:9
19398 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
19403 #: ../fuse/guestmount.pod:11
19406 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
19411 #: ../fuse/guestmount.pod:13
19414 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
19419 #: ../fuse/guestmount.pod:17
19421 "You must I<not> use C<guestmount> in read-write mode on live virtual "
19422 "machines. If you do this, you risk disk corruption in the VM."
19426 #: ../fuse/guestmount.pod:22
19428 "The guestmount program can be used to mount virtual machine filesystems and "
19429 "other disk images on the host. It uses libguestfs for access to the guest "
19430 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
19431 "a mountable device."
19435 #: ../fuse/guestmount.pod:27
19437 "Along with other options, you have to give at least one device (I<-a> "
19438 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
19439 "option) or use the I<-i> inspection option. How this works is better "
19440 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
19445 #: ../fuse/guestmount.pod:33
19447 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
19448 "by you, and the filesystem will not be visible to any other users unless you "
19449 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
19450 "the filesystem, use the C<fusermount -u> command."
19454 #: ../fuse/guestmount.pod:41
19456 "For a typical Windows guest which has its main filesystem on the first "
19461 #: ../fuse/guestmount.pod:44
19464 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
19469 #: ../fuse/guestmount.pod:46
19471 "For a typical Linux guest which has a /boot filesystem on the first "
19472 "partition, and the root filesystem on a logical volume:"
19476 #: ../fuse/guestmount.pod:49
19479 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
19484 #: ../fuse/guestmount.pod:51
19485 msgid "To get libguestfs to detect guest mountpoints for you:"
19489 #: ../fuse/guestmount.pod:53
19492 " guestmount -a guest.img -i --ro /mnt\n"
19497 #: ../fuse/guestmount.pod:55
19498 msgid "For a libvirt guest called \"Guest\" you could do:"
19502 #: ../fuse/guestmount.pod:57
19505 " guestmount -d Guest -i --ro /mnt\n"
19510 #: ../fuse/guestmount.pod:59
19512 "If you don't know what filesystems are contained in a guest or disk image, "
19513 "use L<virt-filesystems(1)> first:"
19517 #: ../fuse/guestmount.pod:62
19520 " virt-filesystems MyGuest\n"
19525 #: ../fuse/guestmount.pod:64
19527 "If you want to trace the libguestfs calls but without excessive debugging "
19528 "information, we recommend:"
19532 #: ../fuse/guestmount.pod:67
19535 " guestmount [...] --trace /mnt\n"
19540 #: ../fuse/guestmount.pod:69
19541 msgid "If you want to debug the program, we recommend:"
19545 #: ../fuse/guestmount.pod:71
19548 " guestmount [...] --trace --verbose /mnt\n"
19553 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
19554 #: ../resize/virt-resize.pod:544
19559 #: ../fuse/guestmount.pod:75
19560 msgid "Other users cannot see the filesystem by default"
19564 #: ../fuse/guestmount.pod:77
19566 "If you mount a filesystem as one user (eg. root), then other users will not "
19567 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
19568 "option when mounting:"
19572 #: ../fuse/guestmount.pod:81
19575 " sudo guestmount [...] -o allow_other /mnt\n"
19580 #: ../fuse/guestmount.pod:91
19581 msgid "Add a block device or virtual machine image."
19585 #: ../fuse/guestmount.pod:114
19586 msgid "B<--dir-cache-timeout N>"
19590 #: ../fuse/guestmount.pod:116
19592 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
19593 "seconds. The readdir cache [actually, there are several semi-independent "
19594 "caches] is populated after a readdir(2) call with the stat and extended "
19595 "attributes of the files in the directory, in anticipation that they will be "
19596 "requested soon after."
19600 #: ../fuse/guestmount.pod:122
19602 "There is also a different attribute cache implemented by FUSE (see the FUSE "
19603 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
19604 "requests, only cache existing ones."
19608 #: ../fuse/guestmount.pod:142
19610 "If you have untrusted raw-format guest disk images, you should use this "
19611 "option to specify the disk format. This avoids a possible security problem "
19612 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
19613 "guestfs_add_drive_opts>."
19617 #: ../fuse/guestmount.pod:147
19618 msgid "B<--fuse-help>"
19622 #: ../fuse/guestmount.pod:149
19623 msgid "Display help on special FUSE options (see I<-o> below)."
19627 #: ../fuse/guestmount.pod:153
19628 msgid "Display brief help and exit."
19632 #: ../fuse/guestmount.pod:177
19634 "Mount the named partition or logical volume on the given mountpoint B<in the "
19635 "guest> (this has nothing to do with mountpoints in the host)."
19639 #: ../fuse/guestmount.pod:180
19641 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
19642 "something on C</>."
19646 #: ../fuse/guestmount.pod:197
19648 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
19649 "unmounted. If you specify this option, then we don't attempt to sync the "
19650 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
19654 #: ../fuse/guestmount.pod:202
19655 msgid "B<-o option>"
19659 #: ../fuse/guestmount.pod:204
19660 msgid "B<--option option>"
19664 #: ../fuse/guestmount.pod:206
19665 msgid "Pass extra options to FUSE."
19669 #: ../fuse/guestmount.pod:208
19671 "To get a list of all the extra options supported by FUSE, use the command "
19672 "below. Note that only the FUSE I<-o> options can be passed, and only some "
19673 "of them are a good idea."
19677 #: ../fuse/guestmount.pod:212
19680 " guestmount --fuse-help\n"
19685 #: ../fuse/guestmount.pod:214
19686 msgid "Some potentially useful FUSE options:"
19690 #: ../fuse/guestmount.pod:218
19691 msgid "B<-o allow_other>"
19695 #: ../fuse/guestmount.pod:220
19696 msgid "Allow other users to see the filesystem."
19700 #: ../fuse/guestmount.pod:222
19701 msgid "B<-o attr_timeout=N>"
19705 #: ../fuse/guestmount.pod:224
19706 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
19710 #: ../fuse/guestmount.pod:226
19711 msgid "B<-o kernel_cache>"
19715 #: ../fuse/guestmount.pod:228
19717 "Allow the kernel to cache files (reduces the number of reads that have to go "
19718 "through the L<guestfs(3)> API). This is generally a good idea if you can "
19719 "afford the extra memory usage."
19723 #: ../fuse/guestmount.pod:232
19724 msgid "B<-o uid=N> B<-o gid=N>"
19728 #: ../fuse/guestmount.pod:234
19730 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
19731 "the chosen values."
19735 #: ../fuse/guestmount.pod:243
19737 "Add devices and mount everything read-only. Also disallow writes and make "
19738 "the disk appear read-only to FUSE."
19742 #: ../fuse/guestmount.pod:246
19744 "This is highly recommended if you are not going to edit the guest disk. If "
19745 "the guest is running and this option is I<not> supplied, then there is a "
19746 "strong risk of disk corruption in the guest. We try to prevent this from "
19747 "happening, but it is not always possible."
19751 #: ../fuse/guestmount.pod:251 ../rescue/virt-rescue.pod:171
19752 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
19756 #: ../fuse/guestmount.pod:255
19757 msgid "Enable SELinux support for the guest."
19761 #: ../fuse/guestmount.pod:261
19762 msgid "Enable verbose messages from underlying libguestfs."
19766 #: ../fuse/guestmount.pod:267
19767 msgid "Display the program version and exit."
19771 #: ../fuse/guestmount.pod:276 ../fuse/guestmount.pod:299
19772 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
19773 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
19777 #: ../fuse/guestmount.pod:280
19782 #: ../fuse/guestmount.pod:282
19783 msgid "Trace libguestfs calls and entry into each FUSE function."
19787 #: ../fuse/guestmount.pod:284
19788 msgid "This also stops the daemon from forking into the background."
19792 #: ../fuse/guestmount.pod:310
19794 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
19795 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
19800 #: ../fuse/guestmount.pod:325
19801 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
19805 #: ../inspector/virt-inspector.pod:5
19807 "virt-inspector - Display operating system version and other information "
19808 "about a virtual machine"
19812 #: ../inspector/virt-inspector.pod:9
19815 " virt-inspector [--options] -d domname\n"
19820 #: ../inspector/virt-inspector.pod:11
19823 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
19828 #: ../inspector/virt-inspector.pod:15
19831 " virt-inspector domname\n"
19836 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
19839 " virt-inspector disk.img [disk.img ...]\n"
19844 #: ../inspector/virt-inspector.pod:21
19846 "B<virt-inspector> examines a virtual machine or disk image and tries to "
19847 "determine the version of the operating system and other information about "
19848 "the virtual machine."
19852 #: ../inspector/virt-inspector.pod:25
19853 msgid "Virt-inspector produces XML output for feeding into other programs."
19857 #: ../inspector/virt-inspector.pod:27
19859 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
19860 "the libvirt domain (see: C<virsh list --all>)."
19864 #: ../inspector/virt-inspector.pod:30
19866 "You can also run virt-inspector directly on disk images from a single "
19867 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
19868 "has several block devices, in which case you should list several I<-a> "
19869 "options one after another, with the first corresponding to the guest's C</"
19870 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
19874 #: ../inspector/virt-inspector.pod:37
19876 "You can also run virt-inspector on install disks, live CDs, bootable USB "
19877 "keys and similar."
19881 #: ../inspector/virt-inspector.pod:40
19883 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
19884 "inspect several virtual machines, you have to run virt-inspector several "
19885 "times (for example, from a shell script for-loop)."
19889 #: ../inspector/virt-inspector.pod:45
19891 "Because virt-inspector needs direct access to guest images, it won't "
19892 "normally work over remote libvirt connections."
19896 #: ../inspector/virt-inspector.pod:48
19898 "All of the information available from virt-inspector is also available "
19899 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
19900 "The same information can also be fetched using guestfish or via libguestfs "
19901 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
19902 "WITH OTHER PROGRAMMING LANGUAGES>)."
19906 #: ../inspector/virt-inspector.pod:81
19908 "Libvirt is only used if you specify a C<domname> on the command line. If "
19909 "you specify guest block devices directly (I<-a>), then libvirt is not used "
19914 #: ../inspector/virt-inspector.pod:94
19916 "When prompting for keys and passphrases, virt-inspector normally turns "
19917 "echoing off so you cannot see what you are typing. If you are not worried "
19918 "about Tempest attacks and there is no one else in the room you can specify "
19919 "this flag to see what you are typing."
19923 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
19924 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
19925 #: ../tools/virt-win-reg.pl:144
19927 "Specify the format of disk images given on the command line. If this is "
19928 "omitted then the format is autodetected from the content of the disk image."
19932 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
19933 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
19934 #: ../tools/virt-win-reg.pl:148
19936 "If disk images are requested from libvirt, then this program asks libvirt "
19937 "for this information. In this case, the value of the format parameter is "
19942 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:314
19943 #: ../resize/virt-resize.pod:406 ../tools/virt-list-filesystems.pl:101
19944 #: ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151
19945 #: ../tools/virt-win-reg.pl:152
19947 "If working with untrusted raw-format guest disk images, you should ensure "
19948 "the format is always specified."
19952 #: ../inspector/virt-inspector.pod:139
19953 msgid "Previous versions of virt-inspector allowed you to write either:"
19957 #: ../inspector/virt-inspector.pod:145
19960 " virt-inspector guestname\n"
19965 #: ../inspector/virt-inspector.pod:153
19970 #: ../inspector/virt-inspector.pod:155
19972 "The virt-inspector XML is described precisely in a RELAX NG schema file "
19973 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
19974 "just an overview."
19978 #: ../inspector/virt-inspector.pod:159
19980 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
19981 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
19982 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
19983 "which is vanishingly rare in real world VMs."
19987 #: ../inspector/virt-inspector.pod:164
19988 msgid "E<lt>operatingsystemE<gt>"
19992 #: ../inspector/virt-inspector.pod:166
19994 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
19995 "describe the operating system, its architecture, the descriptive \"product "
19996 "name\" string, the type of OS and so on, as in this example:"
20000 #: ../inspector/virt-inspector.pod:170
20003 " <operatingsystems>\n"
20004 " <operatingsystem>\n"
20005 " <root>/dev/sda2</root>\n"
20006 " <name>windows</name>\n"
20007 " <arch>i386</arch>\n"
20008 " <distro>windows</distro>\n"
20009 " <product_name>Windows 7 Enterprise</product_name>\n"
20010 " <product_variant>Client</product_variant>\n"
20011 " <major_version>6</major_version>\n"
20012 " <minor_version>1</minor_version>\n"
20013 " <windows_systemroot>/Windows</windows_systemroot>\n"
20014 " <format>installed</format>\n"
20019 #: ../inspector/virt-inspector.pod:183
20021 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
20022 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
20023 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
20024 "architecture. The other fields are fairly self-explanatory, but because "
20025 "these fields are taken directly from the libguestfs inspection API you can "
20026 "find precise information from L<guestfs(3)/INSPECTION>."
20030 #: ../inspector/virt-inspector.pod:191
20032 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
20033 "of view of libguestfs (block devices may have completely different names "
20034 "inside the VM itself)."
20038 #: ../inspector/virt-inspector.pod:195
20039 msgid "E<lt>mountpointsE<gt>"
20043 #: ../inspector/virt-inspector.pod:197
20045 "Un*x-like guests typically have multiple filesystems which are mounted at "
20046 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
20047 "element which looks like this:"
20051 #: ../inspector/virt-inspector.pod:201
20054 " <operatingsystems>\n"
20055 " <operatingsystem>\n"
20058 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
20059 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
20060 " </mountpoints>\n"
20065 #: ../inspector/virt-inspector.pod:209
20067 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
20068 "and may have completely different names inside the guest. Only mountable "
20069 "filesystems appear in this list, not things like swap devices."
20073 #: ../inspector/virt-inspector.pod:214
20074 msgid "E<lt>filesystemsE<gt>"
20078 #: ../inspector/virt-inspector.pod:216
20080 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
20081 "filesystems belonging to the guest, including swap and empty partitions. "
20082 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
20083 "this OS or shared with this OS and other OSes)."
20087 #: ../inspector/virt-inspector.pod:222
20088 msgid "You might see something like this:"
20092 #: ../inspector/virt-inspector.pod:224
20095 " <operatingsystems>\n"
20096 " <operatingsystem>\n"
20099 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
20100 " <type>ext4</type>\n"
20101 " <label>Fedora-13-x86_64</label>\n"
20102 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
20108 #: ../inspector/virt-inspector.pod:234
20110 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
20111 "the label, and the UUID."
20115 #: ../inspector/virt-inspector.pod:237
20116 msgid "E<lt>applicationsE<gt>"
20120 #: ../inspector/virt-inspector.pod:239
20122 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
20123 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
20128 #: ../inspector/virt-inspector.pod:243
20130 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
20131 "Typical values would be C<rpm> and C<deb>."
20135 #: ../inspector/virt-inspector.pod:246
20137 "E<lt>package_managementE<gt>, if present, describes the package manager. "
20138 "Typical values include C<yum>, C<up2date> and C<apt>"
20142 #: ../inspector/virt-inspector.pod:249
20143 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
20147 #: ../inspector/virt-inspector.pod:252
20150 " <operatingsystems>\n"
20151 " <operatingsystem>\n"
20153 " <applications>\n"
20155 " <name>coreutils</name>\n"
20156 " <version>8.5</version>\n"
20157 " <release>1</release>\n"
20158 " </application>\n"
20163 #: ../inspector/virt-inspector.pod:262
20165 "The version and release fields may not be available for some types guests. "
20166 "Other fields are possible, see L<guestfs(3)/"
20167 "guestfs_inspect_list_applications>."
20171 #: ../inspector/virt-inspector.pod:266
20172 msgid "E<lt>drive_mappingsE<gt>"
20176 #: ../inspector/virt-inspector.pod:268
20178 "For operating systems like Windows which use drive letters, virt-inspector "
20179 "is able to find out how drive letters map to filesystems."
20183 #: ../inspector/virt-inspector.pod:272
20186 " <operatingsystems>\n"
20187 " <operatingsystem>\n"
20189 " <drive_mappings>\n"
20190 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
20191 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
20192 " </drive_mappings>\n"
20197 #: ../inspector/virt-inspector.pod:280
20199 "In the example above, drive C maps to the filesystem on the second partition "
20200 "on the first disk, and drive E maps to the filesystem on the first partition "
20201 "on the second disk."
20205 #: ../inspector/virt-inspector.pod:284
20207 "Note that this only covers permanent local filesystem mappings, not things "
20208 "like network shares. Furthermore NTFS volume mount points may not be listed "
20213 #: ../inspector/virt-inspector.pod:288
20214 msgid "E<lt>iconE<gt>"
20218 #: ../inspector/virt-inspector.pod:290
20220 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
20221 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
20222 "very large and high quality."
20226 #: ../inspector/virt-inspector.pod:294
20229 " <operatingsystems>\n"
20230 " <operatingsystem>\n"
20233 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
20234 " [... many lines of base64 data ...]\n"
20240 #: ../inspector/virt-inspector.pod:302
20242 "To display the icon, you have to extract it and convert the base64 data back "
20243 "to a binary file. Use an XPath query or simply an editor to extract the "
20244 "data, then use the coreutils L<base64(1)> program to do the conversion back "
20249 #: ../inspector/virt-inspector.pod:307
20252 " base64 -i -d < icon.data > icon.png\n"
20257 #: ../inspector/virt-inspector.pod:309
20258 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
20262 #: ../inspector/virt-inspector.pod:311
20264 "Virt-inspector can detect some operating system installers on install disks, "
20265 "live CDs, bootable USB keys and more."
20269 #: ../inspector/virt-inspector.pod:314
20271 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
20272 "fields may be present to indicate a live CD, network installer, or one part "
20273 "of a multipart CD. For example:"
20277 #: ../inspector/virt-inspector.pod:318
20280 " <operatingsystems>\n"
20281 " <operatingsystem>\n"
20282 " <root>/dev/sda</root>\n"
20283 " <name>linux</name>\n"
20284 " <arch>i386</arch>\n"
20285 " <distro>ubuntu</distro>\n"
20286 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
20287 " <major_version>10</major_version>\n"
20288 " <minor_version>10</minor_version>\n"
20289 " <format>installer</format>\n"
20295 #: ../inspector/virt-inspector.pod:330
20296 msgid "USING XPATH"
20300 #: ../inspector/virt-inspector.pod:332
20302 "You can use the XPath query language to select parts of the XML. We "
20303 "recommend using C<xmlstarlet> to perform XPath queries from the command line."
20307 #: ../inspector/virt-inspector.pod:338
20310 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
20312 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
20313 " <type>ext4</type>\n"
20319 #: ../inspector/virt-inspector.pod:344
20322 " $ virt-inspector -d Guest | \\\n"
20323 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
20329 #: ../inspector/virt-inspector.pod:348
20332 " $ virt-inspector -d Guest | \\\n"
20333 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
20334 " [displays the guest icon, if there is one]\n"
20339 #: ../inspector/virt-inspector.pod:359
20340 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
20344 #: ../inspector/virt-inspector.pod:361
20346 "Early versions of libguestfs shipped with a different virt-inspector program "
20347 "written in Perl (the current version is written in C). The XML output of "
20348 "the Perl virt-inspector was different and it could also output in other "
20349 "formats like text."
20353 #: ../inspector/virt-inspector.pod:366
20355 "The old virt-inspector is no longer supported or shipped with libguestfs."
20359 #: ../inspector/virt-inspector.pod:369
20361 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
20362 "versions of virt-inspector with different names:"
20366 #: ../inspector/virt-inspector.pod:372
20369 " virt-inspector Old Perl version.\n"
20370 " virt-inspector2 New C version.\n"
20375 #: ../inspector/virt-inspector.pod:382
20377 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
20378 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
20382 #: ../inspector/virt-inspector.pod:399
20383 msgid "Matthew Booth L<mbooth@redhat.com>"
20387 #: ../java/examples/guestfs-java.pod:5
20388 msgid "guestfs-java - How to use libguestfs from Java"
20392 #: ../java/examples/guestfs-java.pod:9
20395 " import com.redhat.et.libguestfs.*;\n"
20400 #: ../java/examples/guestfs-java.pod:11
20403 " GuestFS g = new GuestFS ();\n"
20404 " g.add_drive_opts (\"disk.img\", null);\n"
20410 #: ../java/examples/guestfs-java.pod:17
20412 "This manual page documents how to call libguestfs from the Java programming "
20413 "language. This page just documents the differences from the C API and gives "
20414 "some examples. If you are not familiar with using libguestfs, you also need "
20415 "to read L<guestfs(3)>."
20419 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
20420 msgid "CLOSING THE HANDLE"
20424 #: ../java/examples/guestfs-java.pod:24
20426 "The handle is closed when it is reaped by the garbage collector. Because "
20427 "libguestfs handles include a lot of state, it is also possible to close (and "
20428 "hence free) them explicitly by calling the C<close> method."
20432 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
20433 #: ../python/examples/guestfs-python.pod:21
20434 #: ../ruby/examples/guestfs-ruby.pod:22
20439 #: ../java/examples/guestfs-java.pod:31
20441 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
20442 "exception. This has a single parameter which is the error message (a "
20447 #: ../java/examples/guestfs-java.pod:35
20448 msgid "Calling any method on a closed handle raises the same exception."
20452 #: ../java/examples/guestfs-java.pod:47
20454 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
20455 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
20456 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
20460 #: ../ocaml/examples/guestfs-ocaml.pod:5
20461 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
20465 #: ../ocaml/examples/guestfs-ocaml.pod:9
20466 msgid "Module style:"
20470 #: ../ocaml/examples/guestfs-ocaml.pod:11
20473 " let g = Guestfs.create () in\n"
20474 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
20475 " Guestfs.launch g;\n"
20480 #: ../ocaml/examples/guestfs-ocaml.pod:15
20481 msgid "Object-oriented style:"
20485 #: ../ocaml/examples/guestfs-ocaml.pod:17
20488 " let g = new Guestfs.guestfs () in\n"
20489 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
20495 #: ../ocaml/examples/guestfs-ocaml.pod:21
20498 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
20500 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
20505 #: ../ocaml/examples/guestfs-ocaml.pod:27
20507 "This manual page documents how to call libguestfs from the OCaml programming "
20508 "language. This page just documents the differences from the C API and gives "
20509 "some examples. If you are not familiar with using libguestfs, you also need "
20510 "to read L<guestfs(3)>."
20514 #: ../ocaml/examples/guestfs-ocaml.pod:32
20515 msgid "PROGRAMMING STYLES"
20519 #: ../ocaml/examples/guestfs-ocaml.pod:34
20521 "There are two different programming styles supported by the OCaml bindings. "
20522 "You can use a module style, with each C function mapped to an OCaml function:"
20526 #: ../ocaml/examples/guestfs-ocaml.pod:38
20529 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
20534 #: ../ocaml/examples/guestfs-ocaml.pod:40
20539 #: ../ocaml/examples/guestfs-ocaml.pod:42
20542 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
20547 #: ../ocaml/examples/guestfs-ocaml.pod:44
20549 "Alternately you can use an object-oriented style, calling methods on the "
20550 "class C<Guestfs.guestfs>:"
20554 #: ../ocaml/examples/guestfs-ocaml.pod:47
20557 " method set_verbose : bool -> unit\n"
20562 #: ../ocaml/examples/guestfs-ocaml.pod:49
20564 "The object-oriented style is usually briefer, and the minor performance "
20565 "penalty isn't noticable in the general overhead of performing libguestfs "
20570 #: ../ocaml/examples/guestfs-ocaml.pod:55
20572 "The handle is closed when it is reaped by the garbage collector. Because "
20573 "libguestfs handles include a lot of state, it is also possible to close (and "
20574 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
20579 #: ../ocaml/examples/guestfs-ocaml.pod:62
20581 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
20582 "exception. This has a single parameter which is the error message (a "
20587 #: ../ocaml/examples/guestfs-ocaml.pod:66
20589 "Calling any function/method on a closed handle raises C<Guestfs."
20590 "Handle_closed>. The single parameter is the name of the function that you "
20595 #: ../ocaml/examples/guestfs-ocaml.pod:80
20597 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
20598 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
20599 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
20603 #: ../perl/examples/guestfs-perl.pod:5
20604 msgid "guestfs-perl - How to use libguestfs from Perl"
20608 #: ../perl/examples/guestfs-perl.pod:9
20611 " use Sys::Guestfs;\n"
20616 #: ../perl/examples/guestfs-perl.pod:11
20619 " my $h = Sys::Guestfs->new ();\n"
20620 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
20621 " $h->launch ();\n"
20622 " $h->mount_options ('', '/dev/sda1', '/');\n"
20623 " $h->touch ('/hello');\n"
20629 #: ../perl/examples/guestfs-perl.pod:20
20631 "This manual page documents how to call libguestfs from the Perl programming "
20632 "language. This page just documents the differences from the C API and gives "
20633 "some examples. If you are not familiar with using libguestfs, you also need "
20634 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
20638 #: ../perl/examples/guestfs-perl.pod:26
20643 #: ../perl/examples/guestfs-perl.pod:28
20645 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
20650 #: ../perl/examples/guestfs-perl.pod:41
20652 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
20653 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
20654 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
20658 #: ../python/examples/guestfs-python.pod:5
20659 msgid "guestfs-python - How to use libguestfs from Python"
20663 #: ../python/examples/guestfs-python.pod:9
20666 " import guestfs\n"
20667 " g = guestfs.GuestFS ()\n"
20668 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
20674 #: ../python/examples/guestfs-python.pod:16
20676 "This manual page documents how to call libguestfs from the Python "
20677 "programming language. This page just documents the differences from the C "
20678 "API and gives some examples. If you are not familiar with using libguestfs, "
20679 "you also need to read L<guestfs(3)>."
20683 #: ../python/examples/guestfs-python.pod:23
20685 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
20686 "single string argument which is the error message."
20690 #: ../python/examples/guestfs-python.pod:26
20691 msgid "MORE DOCUMENTATION"
20695 #: ../python/examples/guestfs-python.pod:28
20700 #: ../python/examples/guestfs-python.pod:30
20704 " >>> import guestfs\n"
20705 " >>> help (guestfs)\n"
20710 #: ../python/examples/guestfs-python.pod:44
20712 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
20713 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
20714 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
20718 #: ../rescue/virt-rescue.pod:5
20719 msgid "virt-rescue - Run a rescue shell on a virtual machine"
20723 #: ../rescue/virt-rescue.pod:9
20726 " virt-rescue [--options] -d domname\n"
20731 #: ../rescue/virt-rescue.pod:11
20734 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
20739 #: ../rescue/virt-rescue.pod:15
20742 " virt-rescue [--options] domname\n"
20747 #: ../rescue/virt-rescue.pod:17
20750 " virt-rescue [--options] disk.img [disk.img ...]\n"
20755 #: ../rescue/virt-rescue.pod:21
20757 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
20758 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
20759 "you from doing this, but doesn't catch all cases."
20763 #: ../rescue/virt-rescue.pod:25
20765 "However if you use the I<--ro> (read only) option, then you can attach a "
20766 "shell to a live virtual machine. The results might be strange or "
20767 "inconsistent at times but you won't get disk corruption."
20771 #: ../rescue/virt-rescue.pod:31
20773 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
20774 "need for a CD. virt-rescue gives you a rescue shell and some simple "
20775 "recovery tools which you can use to examine or rescue a virtual machine or "
20780 #: ../rescue/virt-rescue.pod:36
20782 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
20783 "on disk image(s):"
20787 #: ../rescue/virt-rescue.pod:39
20790 " virt-rescue -d GuestName\n"
20795 #: ../rescue/virt-rescue.pod:41
20798 " virt-rescue --ro -a /path/to/disk.img\n"
20803 #: ../rescue/virt-rescue.pod:43
20806 " virt-rescue -a /dev/sdc\n"
20811 #: ../rescue/virt-rescue.pod:45
20812 msgid "For live VMs you I<must> use the --ro option."
20816 #: ../rescue/virt-rescue.pod:47
20818 "When you run virt-rescue on a virtual machine or disk image, you are placed "
20819 "in an interactive bash shell where you can use many ordinary Linux "
20820 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
20821 "appliance. You must mount the virtual machine's filesystems by hand. There "
20822 "is an empty directory called C</sysroot> where you can mount filesystems."
20826 #: ../rescue/virt-rescue.pod:54
20828 "In the example below, we list logical volumes, then choose one to mount "
20829 "under C</sysroot>:"
20833 #: ../rescue/virt-rescue.pod:57
20837 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
20838 " lv_root vg_f11x64 -wi-a- 8.83G\n"
20839 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
20840 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
20841 " ><rescue> ls /sysroot\n"
20846 #: ../rescue/virt-rescue.pod:64
20848 "If you don't know what filesystems are available on the virtual machine then "
20849 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
20853 #: ../rescue/virt-rescue.pod:70
20855 "Virt-rescue can be used on I<any> disk image file or device, not just a "
20856 "virtual machine. For example you can use it on a blank file if you want to "
20857 "partition that file (although we would recommend using L<guestfish(1)> "
20858 "instead as it is more suitable for this purpose). You can even use virt-"
20859 "rescue on things like SD cards."
20863 #: ../rescue/virt-rescue.pod:76
20865 "Virt-rescue does not require root. You only need to run it as root if you "
20866 "need root to open the disk image."
20870 #: ../rescue/virt-rescue.pod:79
20872 "This tool is just designed for quick interactive hacking on a virtual "
20873 "machine. For more structured access to a virtual machine disk image, you "
20874 "should use L<guestfs(3)>. To get a structured shell that you can use to "
20875 "make scripted changes to guests, use L<guestfish(1)>."
20879 #: ../rescue/virt-rescue.pod:103
20880 msgid "B<--append kernelopts>"
20884 #: ../rescue/virt-rescue.pod:105
20885 msgid "Pass additional options to the rescue kernel."
20889 #: ../rescue/virt-rescue.pod:135
20892 " virt-rescue --format=raw -a disk.img\n"
20897 #: ../rescue/virt-rescue.pod:139
20900 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
20905 #: ../rescue/virt-rescue.pod:148
20910 #: ../rescue/virt-rescue.pod:150
20911 msgid "B<--memsize MB>"
20915 #: ../rescue/virt-rescue.pod:152
20917 "Change the amount of memory allocated to the rescue system. The default is "
20918 "set by libguestfs and is small but adequate for running system tools. The "
20919 "occasional program might need more memory. The parameter is specified in "
20924 #: ../rescue/virt-rescue.pod:157
20925 msgid "B<--network>"
20929 #: ../rescue/virt-rescue.pod:159
20930 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
20934 #: ../rescue/virt-rescue.pod:165
20935 msgid "Open the image read-only."
20939 #: ../rescue/virt-rescue.pod:175
20941 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
20942 "SELINUX> before using this option."
20946 #: ../rescue/virt-rescue.pod:178
20951 #: ../rescue/virt-rescue.pod:180
20952 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
20956 #: ../rescue/virt-rescue.pod:198
20958 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
20959 "are done read-write."
20963 #: ../rescue/virt-rescue.pod:211
20964 msgid "Previous versions of virt-rescue allowed you to write either:"
20968 #: ../rescue/virt-rescue.pod:213
20971 " virt-rescue disk.img [disk.img ...]\n"
20976 #: ../rescue/virt-rescue.pod:217
20979 " virt-rescue guestname\n"
20984 #: ../rescue/virt-rescue.pod:225
20989 #: ../rescue/virt-rescue.pod:227
20991 "Adding the I<--network> option enables QEMU user networking in the rescue "
20992 "appliance. There are some differences between user networking and ordinary "
20997 #: ../rescue/virt-rescue.pod:233
20998 msgid "ping does not work"
21002 #: ../rescue/virt-rescue.pod:235
21004 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
21005 "send the ping packets, and because virt-rescue must be able to run as non-"
21006 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
21007 "The ping command will appear to resolve addresses but will not be able to "
21008 "send or receive any packets. This does not mean that the network is not "
21013 #: ../rescue/virt-rescue.pod:242
21014 msgid "cannot receive connections"
21018 #: ../rescue/virt-rescue.pod:244
21019 msgid "QEMU user networking cannot receive incoming connections."
21023 #: ../rescue/virt-rescue.pod:246
21024 msgid "making TCP connections"
21028 #: ../rescue/virt-rescue.pod:248
21030 "The virt-rescue appliance needs to be small and so does not include many "
21031 "network tools. In particular there is no L<telnet(1)> command. You can "
21032 "make TCP connections from the shell using the magical C</dev/tcp/"
21033 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
21037 #: ../rescue/virt-rescue.pod:253
21040 " exec 3<>/dev/tcp/redhat.com/80\n"
21041 " echo \"GET /\" >&3\n"
21047 #: ../rescue/virt-rescue.pod:257
21048 msgid "See L<bash(1)> for more details."
21052 #: ../rescue/virt-rescue.pod:263
21054 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
21055 "ENVIRONMENT VARIABLES> for the complete list."
21059 #: ../rescue/virt-rescue.pod:290
21061 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<http://"
21062 "libguestfs.org/>."
21066 #: ../resize/virt-resize.pod:5
21067 msgid "virt-resize - Resize a virtual machine disk"
21071 #: ../resize/virt-resize.pod:9
21074 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
21075 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
21076 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
21081 #: ../resize/virt-resize.pod:15
21083 "Virt-resize is a tool which can resize a virtual machine disk, making it "
21084 "larger or smaller overall, and resizing or deleting any partitions contained "
21089 #: ../resize/virt-resize.pod:19
21091 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
21092 "not> be used on live virtual machines - for consistent results, shut the "
21093 "virtual machine down before resizing it."
21097 #: ../resize/virt-resize.pod:23
21099 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
21100 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
21104 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:520
21105 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1284 ../src/guestfs.pod:1423
21106 #: ../src/guestfs.pod:2601
21111 #: ../resize/virt-resize.pod:33
21113 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
21114 "fill the extra 5GB of space."
21118 #: ../resize/virt-resize.pod:36
21121 " virt-filesystems --long -h --all -a olddisk\n"
21126 #: ../resize/virt-resize.pod:38
21129 " truncate -r olddisk newdisk\n"
21130 " truncate -s +5G newdisk\n"
21135 #: ../resize/virt-resize.pod:41
21138 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
21139 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
21144 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:527
21145 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1288 ../src/guestfs.pod:1427
21146 #: ../src/guestfs.pod:2626
21151 #: ../resize/virt-resize.pod:46
21153 "As above, but make the /boot partition 200MB bigger, while giving the "
21154 "remaining space to /dev/sda2:"
21158 #: ../resize/virt-resize.pod:49
21161 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
21162 " olddisk newdisk\n"
21167 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:533
21168 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1433
21173 #: ../resize/virt-resize.pod:54
21175 "As in the first example, but expand a logical volume as the final step. "
21176 "This is what you would typically use for Linux guests that use LVM:"
21180 #: ../resize/virt-resize.pod:58
21183 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
21184 " olddisk newdisk\n"
21189 #: ../resize/virt-resize.pod:61
21194 #: ../resize/virt-resize.pod:63
21196 "As in the first example, but the output format will be qcow2 instead of a "
21201 #: ../resize/virt-resize.pod:66
21204 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
21205 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
21210 #: ../resize/virt-resize.pod:71
21211 msgid "DETAILED USAGE"
21215 #: ../resize/virt-resize.pod:73
21216 msgid "EXPANDING A VIRTUAL MACHINE DISK"
21220 #: ../resize/virt-resize.pod:77
21221 msgid "1. Shut down the virtual machine"
21225 #: ../resize/virt-resize.pod:79
21226 msgid "2. Locate input disk image"
21230 #: ../resize/virt-resize.pod:81
21232 "Locate the input disk image (ie. the file or device on the host containing "
21233 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
21234 "dumpxml> like this to find the disk image name:"
21238 #: ../resize/virt-resize.pod:85
21241 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
21242 " Found 1 nodes:\n"
21244 " <source dev=\"/dev/vg/lv_guest\" />\n"
21249 #: ../resize/virt-resize.pod:90
21250 msgid "3. Look at current sizing"
21254 #: ../resize/virt-resize.pod:92
21255 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
21259 #: ../resize/virt-resize.pod:95
21262 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
21263 " Name Type Size Parent\n"
21264 " /dev/sda1 partition 101M /dev/sda\n"
21265 " /dev/sda2 partition 7.9G /dev/sda\n"
21266 " /dev/sda device 8.0G -\n"
21271 #: ../resize/virt-resize.pod:101
21273 "(This example is a virtual machine with an 8 GB disk which we would like to "
21274 "expand up to 10 GB)."
21278 #: ../resize/virt-resize.pod:104
21279 msgid "4. Create output disk"
21283 #: ../resize/virt-resize.pod:106
21285 "Virt-resize cannot do in-place disk modifications. You have to have space "
21286 "to store the resized output disk."
21290 #: ../resize/virt-resize.pod:109
21292 "To store the resized disk image in a file, create a file of a suitable size:"
21296 #: ../resize/virt-resize.pod:112
21299 " # rm -f outdisk\n"
21300 " # truncate -s 10G outdisk\n"
21305 #: ../resize/virt-resize.pod:115
21306 msgid "Or use L<lvcreate(1)> to create a logical volume:"
21310 #: ../resize/virt-resize.pod:117
21313 " # lvcreate -L 10G -n lv_name vg_name\n"
21318 #: ../resize/virt-resize.pod:119
21319 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
21323 #: ../resize/virt-resize.pod:121
21326 " # virsh pool-list\n"
21327 " # virsh vol-create-as poolname newvol 10G\n"
21332 #: ../resize/virt-resize.pod:124
21337 #: ../resize/virt-resize.pod:126
21339 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
21340 "file) and the output disk. The output disk is the one created in the "
21345 #: ../resize/virt-resize.pod:130
21348 " # virt-resize indisk outdisk\n"
21353 #: ../resize/virt-resize.pod:132
21355 "This command just copies disk image C<indisk> to disk image C<outdisk> "
21356 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
21357 "larger, then an extra, empty partition is created at the end of the disk "
21358 "covering the extra space. If C<outdisk> is smaller, then it will give an "
21363 #: ../resize/virt-resize.pod:138
21365 "More realistically you'd want to expand existing partitions in the disk "
21366 "image by passing extra options (for the full list see the L</OPTIONS> "
21371 #: ../resize/virt-resize.pod:142
21373 "L</--expand> is the most useful option. It expands the named partition "
21374 "within the disk to fill any extra space:"
21378 #: ../resize/virt-resize.pod:145
21381 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
21386 #: ../resize/virt-resize.pod:147
21388 "(In this case, an extra partition is I<not> created at the end of the disk, "
21389 "because there will be no unused space)."
21393 #: ../resize/virt-resize.pod:150
21395 "L</--resize> is the other commonly used option. The following would "
21396 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
21397 "rest of the available space:"
21401 #: ../resize/virt-resize.pod:154
21404 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
21405 " indisk outdisk\n"
21410 #: ../resize/virt-resize.pod:157
21412 "If the expanded partition in the image contains a filesystem or LVM PV, then "
21413 "if virt-resize knows how, it will resize the contents, the equivalent of "
21414 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
21415 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
21416 "filesystems, so you would have to online resize them after booting the guest."
21420 #: ../resize/virt-resize.pod:164
21421 msgid "Other options are covered below."
21425 #: ../resize/virt-resize.pod:166
21430 #: ../resize/virt-resize.pod:168
21431 msgid "Thoroughly test the new disk image I<before> discarding the old one."
21435 #: ../resize/virt-resize.pod:170
21436 msgid "If you are using libvirt, edit the XML to point at the new disk:"
21440 #: ../resize/virt-resize.pod:172
21443 " # virsh edit guestname\n"
21448 #: ../resize/virt-resize.pod:174
21450 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
21451 "html#elementsDisks>"
21455 #: ../resize/virt-resize.pod:177
21456 msgid "Then start up the domain with the new, resized disk:"
21460 #: ../resize/virt-resize.pod:179
21463 " # virsh start guestname\n"
21468 #: ../resize/virt-resize.pod:181
21470 "and check that it still works. See also the L</NOTES> section below for "
21471 "additional information."
21475 #: ../resize/virt-resize.pod:184
21476 msgid "7. Resize LVs etc inside the guest"
21480 #: ../resize/virt-resize.pod:186
21481 msgid "(This can also be done offline using L<guestfish(1)>)"
21485 #: ../resize/virt-resize.pod:188
21487 "Once the guest has booted you should see the new space available, at least "
21488 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
21489 "may need to resize LVs inside PVs, and also resize filesystem types that "
21490 "virt-resize does not know how to expand."
21494 #: ../resize/virt-resize.pod:195
21495 msgid "SHRINKING A VIRTUAL MACHINE DISK"
21499 #: ../resize/virt-resize.pod:197
21501 "Shrinking is somewhat more complex than expanding, and only an overview is "
21506 #: ../resize/virt-resize.pod:200
21508 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
21509 "filesystems). The user has to shrink content before passing the disk image "
21510 "to virt-resize, and virt-resize will check that the content has been shrunk "
21515 #: ../resize/virt-resize.pod:205
21516 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
21520 #: ../resize/virt-resize.pod:207
21522 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
21523 "steps 3 and 4 above to allocate a new disk image."
21527 #: ../resize/virt-resize.pod:210
21529 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
21533 #: ../resize/virt-resize.pod:213
21534 msgid "IGNORING OR DELETING PARTITIONS"
21538 #: ../resize/virt-resize.pod:215
21540 "virt-resize also gives a convenient way to ignore or delete partitions when "
21541 "copying from the input disk to the output disk. Ignoring a partition speeds "
21542 "up the copy where you don't care about the existing contents of a "
21543 "partition. Deleting a partition removes it completely, but note that it "
21544 "also renumbers any partitions after the one which is deleted, which can "
21545 "leave some guests unbootable."
21549 #: ../resize/virt-resize.pod:222
21550 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
21554 #: ../resize/virt-resize.pod:224
21556 "If the input disk is in qcow2 format, then you may prefer that the output is "
21557 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
21558 "the fly. The output format is simply determined by the format of the empty "
21559 "output container that you provide. Thus to create qcow2 output, use:"
21563 #: ../resize/virt-resize.pod:230
21566 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
21571 #: ../resize/virt-resize.pod:232
21572 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
21576 #: ../resize/virt-resize.pod:234
21577 msgid "Similarly, to get non-sparse raw output use:"
21581 #: ../resize/virt-resize.pod:236
21584 " fallocate -l size outdisk\n"
21589 #: ../resize/virt-resize.pod:238
21591 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
21592 "dev/zero of=outdisk bs=1M count=..>)"
21596 #: ../resize/virt-resize.pod:247
21597 msgid "Display help."
21601 #: ../resize/virt-resize.pod:249
21606 #: ../resize/virt-resize.pod:251 ../tools/virt-make-fs.pl:177
21607 #: ../tools/virt-win-reg.pl:120
21612 #: ../resize/virt-resize.pod:253 ../tools/virt-win-reg.pl:122
21613 msgid "Enable debugging messages."
21617 #: ../resize/virt-resize.pod:255
21618 msgid "B<--delete part>"
21622 #: ../resize/virt-resize.pod:257
21624 "Delete the named partition. It would be more accurate to describe this as "
21625 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
21626 "the original disk image is left intact."
21630 #: ../resize/virt-resize.pod:261
21632 "Note that when you delete a partition, then anything contained in the "
21633 "partition is also deleted. Furthermore, this causes any partitions that "
21634 "come after to be I<renumbered>, which can easily make your guest unbootable."
21638 #: ../resize/virt-resize.pod:266 ../resize/virt-resize.pod:327
21639 #: ../resize/virt-resize.pod:454
21640 msgid "You can give this option multiple times."
21644 #: ../resize/virt-resize.pod:268
21645 msgid "B<--expand part>"
21649 #: ../resize/virt-resize.pod:270
21651 "Expand the named partition so it uses up all extra space (space left over "
21652 "after any other resize changes that you request have been done)."
21656 #: ../resize/virt-resize.pod:273
21658 "If virt-resize knows how, it will expand the direct content of the "
21659 "partition. For example, if the partition is an LVM PV, it will expand the "
21660 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
21661 "content it doesn't know about alone."
21665 #: ../resize/virt-resize.pod:278
21666 msgid "Currently virt-resize can resize:"
21670 #: ../resize/virt-resize.pod:284
21671 msgid "ext2, ext3 and ext4 filesystems."
21675 #: ../resize/virt-resize.pod:288
21676 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
21680 #: ../resize/virt-resize.pod:290
21682 "The filesystem must have been shut down consistently last time it was used. "
21683 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
21684 "consistency check, so at the first boot after resizing Windows will check "
21689 #: ../resize/virt-resize.pod:297
21691 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
21692 "inside the PV, but see the I<--LV-expand> option. The user could also "
21693 "resize LVs as desired after boot."
21697 #: ../resize/virt-resize.pod:303
21698 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
21702 #: ../resize/virt-resize.pod:307 ../resize/virt-resize.pod:482
21703 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
21707 #: ../resize/virt-resize.pod:309 ../tools/virt-list-filesystems.pl:91
21708 #: ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141
21709 #: ../tools/virt-win-reg.pl:142
21710 msgid "B<--format> raw"
21714 #: ../resize/virt-resize.pod:311
21716 "Specify the format of the input disk image. If this flag is not given then "
21717 "it is auto-detected from the image itself."
21721 #: ../resize/virt-resize.pod:317
21723 "Note that this option I<does not> affect the output format. See L</QCOW2 "
21724 "AND NON-SPARSE RAW FORMATS>."
21728 #: ../resize/virt-resize.pod:320
21729 msgid "B<--ignore part>"
21733 #: ../resize/virt-resize.pod:322
21735 "Ignore the named partition. Effectively this means the partition is "
21736 "allocated on the destination disk, but the content is not copied across from "
21737 "the source disk. The content of the partition will be blank (all zero "
21742 #: ../resize/virt-resize.pod:329
21743 msgid "B<--LV-expand logvol>"
21747 #: ../resize/virt-resize.pod:331
21749 "This takes the logical volume and, as a final step, expands it to fill all "
21750 "the space available in its volume group. A typical usage, assuming a Linux "
21751 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
21752 "lv_root> would be:"
21756 #: ../resize/virt-resize.pod:336
21759 " virt-resize indisk outdisk \\\n"
21760 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
21765 #: ../resize/virt-resize.pod:339
21767 "This would first expand the partition (and PV), and then expand the root "
21768 "device to fill the extra space in the PV."
21772 #: ../resize/virt-resize.pod:342
21774 "The contents of the LV are also resized if virt-resize knows how to do "
21775 "that. You can stop virt-resize from trying to expand the content by using "
21776 "the option I<--no-expand-content>."
21780 #: ../resize/virt-resize.pod:346
21781 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
21785 #: ../resize/virt-resize.pod:348
21787 "You can give this option multiple times, I<but> it doesn't make sense to do "
21788 "this unless the logical volumes you specify are all in different volume "
21793 #: ../resize/virt-resize.pod:352
21794 msgid "B<--machine-readable>"
21798 #: ../resize/virt-resize.pod:354
21800 "This option is used to make the output more machine friendly when being "
21801 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
21805 #: ../resize/virt-resize.pod:360
21806 msgid "B<--dryrun>"
21810 #: ../resize/virt-resize.pod:362
21811 msgid "Print a summary of what would be done, but don't do anything."
21815 #: ../resize/virt-resize.pod:364
21816 msgid "B<--no-copy-boot-loader>"
21820 #: ../resize/virt-resize.pod:366
21822 "By default, virt-resize copies over some sectors at the start of the disk "
21823 "(up to the beginning of the first partition). Commonly these sectors "
21824 "contain the Master Boot Record (MBR) and the boot loader, and are required "
21825 "in order for the guest to boot correctly."
21829 #: ../resize/virt-resize.pod:371
21831 "If you specify this flag, then this initial copy is not done. You may need "
21832 "to reinstall the boot loader in this case."
21836 #: ../resize/virt-resize.pod:374
21837 msgid "B<--no-extra-partition>"
21841 #: ../resize/virt-resize.pod:376
21843 "By default, virt-resize creates an extra partition if there is any extra, "
21844 "unused space after all resizing has happened. Use this option to prevent "
21845 "the extra partition from being created. If you do this then the extra space "
21846 "will be inaccessible until you run fdisk, parted, or some other partitioning "
21847 "tool in the guest."
21851 #: ../resize/virt-resize.pod:382
21853 "Note that if the surplus space is smaller than 10 MB, no extra partition "
21858 #: ../resize/virt-resize.pod:385
21859 msgid "B<--no-expand-content>"
21863 #: ../resize/virt-resize.pod:387
21865 "By default, virt-resize will try to expand the direct contents of "
21866 "partitions, if it knows how (see I<--expand> option above)."
21870 #: ../resize/virt-resize.pod:390
21872 "If you give the I<--no-expand-content> option then virt-resize will not "
21877 #: ../resize/virt-resize.pod:393
21878 msgid "B<--ntfsresize-force>"
21882 #: ../resize/virt-resize.pod:395
21884 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
21885 "the NTFS disk is marked as needing a consistency check. You have to use "
21886 "this option if you want to resize a Windows guest multiple times without "
21887 "booting into Windows between each resize."
21891 #: ../resize/virt-resize.pod:401
21892 msgid "B<--output-format> raw"
21896 #: ../resize/virt-resize.pod:403
21898 "Specify the format of the output disk image. If this flag is not given then "
21899 "it is auto-detected from the image itself."
21903 #: ../resize/virt-resize.pod:409
21905 "Note that this option I<does not create> the output format. This option "
21906 "just tells libguestfs what it is so it doesn't try to guess it. You still "
21907 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
21908 "SPARSE RAW FORMATS>."
21912 #: ../resize/virt-resize.pod:414
21917 #: ../resize/virt-resize.pod:416
21922 #: ../resize/virt-resize.pod:418
21923 msgid "Don't print the summary."
21927 #: ../resize/virt-resize.pod:420
21928 msgid "B<--resize part=size>"
21932 #: ../resize/virt-resize.pod:422
21934 "Resize the named partition (expanding or shrinking it) so that it has the "
21939 #: ../resize/virt-resize.pod:425
21941 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
21942 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
21943 "size; or as a relative number or percentage. For example:"
21947 #: ../resize/virt-resize.pod:431
21950 " --resize /dev/sda2=10G\n"
21955 #: ../resize/virt-resize.pod:433
21958 " --resize /dev/sda4=90%\n"
21963 #: ../resize/virt-resize.pod:435
21966 " --resize /dev/sda2=+1G\n"
21971 #: ../resize/virt-resize.pod:437
21974 " --resize /dev/sda2=-200M\n"
21979 #: ../resize/virt-resize.pod:439
21982 " --resize /dev/sda1=+128K\n"
21987 #: ../resize/virt-resize.pod:441
21990 " --resize /dev/sda1=+10%\n"
21995 #: ../resize/virt-resize.pod:443
21998 " --resize /dev/sda1=-10%\n"
22003 #: ../resize/virt-resize.pod:445
22005 "You can increase the size of any partition. Virt-resize will expand the "
22006 "direct content of the partition if it knows how (see I<--expand> below)."
22010 #: ../resize/virt-resize.pod:449
22012 "You can only I<decrease> the size of partitions that contain filesystems or "
22013 "PVs which have already been shrunk. Virt-resize will check this has been "
22014 "done before proceeding, or else will print an error (see also I<--resize-"
22019 #: ../resize/virt-resize.pod:456
22020 msgid "B<--resize-force part=size>"
22024 #: ../resize/virt-resize.pod:458
22026 "This is the same as I<--resize> except that it will let you decrease the "
22027 "size of any partition. Generally this means you will lose any data which "
22028 "was at the end of the partition you shrink, but you may not care about that "
22029 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
22030 "as a swap partition)."
22034 #: ../resize/virt-resize.pod:464
22035 msgid "See also the I<--ignore> option."
22039 #: ../resize/virt-resize.pod:466
22040 msgid "B<--shrink part>"
22044 #: ../resize/virt-resize.pod:468
22046 "Shrink the named partition until the overall disk image fits in the "
22047 "destination. The named partition B<must> contain a filesystem or PV which "
22048 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
22049 "online tools). Virt-resize will check this and give an error if it has not "
22054 #: ../resize/virt-resize.pod:474
22056 "The amount by which the overall disk must be shrunk (after carrying out all "
22057 "other operations requested by the user) is called the \"deficit\". For "
22058 "example, a straight copy (assume no other operations) from a 5GB disk image "
22059 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
22060 "would give an error unless the user specified a partition to shrink and that "
22061 "partition had more than a gigabyte of free space."
22065 #: ../resize/virt-resize.pod:492
22066 msgid "MACHINE READABLE OUTPUT"
22070 #: ../resize/virt-resize.pod:494
22072 "The I<--machine-readable> option can be used to make the output more machine "
22073 "friendly, which is useful when calling virt-resize from other programs, GUIs "
22078 #: ../resize/virt-resize.pod:498
22079 msgid "There are two ways to use this option."
22083 #: ../resize/virt-resize.pod:500
22085 "Firstly use the option on its own to query the capabilities of the virt-"
22086 "resize binary. Typical output looks like this:"
22090 #: ../resize/virt-resize.pod:503
22093 " $ virt-resize --machine-readable\n"
22095 " ntfsresize-force\n"
22103 #: ../resize/virt-resize.pod:510
22105 "A list of features is printed, one per line, and the program exits with "
22110 #: ../resize/virt-resize.pod:513
22112 "Secondly use the option in conjunction with other options to make the "
22113 "regular program output more machine friendly."
22117 #: ../resize/virt-resize.pod:516
22118 msgid "At the moment this means:"
22122 #: ../resize/virt-resize.pod:522
22124 "Progress bar messages can be parsed from stdout by looking for this regular "
22129 #: ../resize/virt-resize.pod:525
22132 " ^[0-9]+/[0-9]+$\n"
22137 #: ../resize/virt-resize.pod:529
22139 "The calling program should treat messages sent to stdout (except for "
22140 "progress bar messages) as status messages. They can be logged and/or "
22141 "displayed to the user."
22145 #: ../resize/virt-resize.pod:535
22147 "The calling program should treat messages sent to stderr as error messages. "
22148 "In addition, virt-resize exits with a non-zero status code if there was a "
22153 #: ../resize/virt-resize.pod:541
22155 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
22156 "readable> option and will return an error."
22160 #: ../resize/virt-resize.pod:546
22161 msgid "\"Partition 1 does not end on cylinder boundary.\""
22165 #: ../resize/virt-resize.pod:548
22167 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
22168 "means the partitions will not be aligned to the ancient CHS geometry. "
22169 "However CHS geometry is meaningless for disks manufactured since the early "
22170 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
22171 "cylinders is not required by any modern operating system."
22175 #: ../resize/virt-resize.pod:555
22176 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
22180 #: ../resize/virt-resize.pod:557
22182 "In Windows Vista and later versions, Microsoft switched to using a separate "
22183 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
22184 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
22185 "the boot partition. Doing so seems to break the guest completely. However "
22186 "expanding the second partition (ie. C: drive) should work."
22190 #: ../resize/virt-resize.pod:564
22192 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
22193 "NTFS partitions have been expanded. This is just a safety check and (unless "
22194 "it find errors) is nothing to worry about."
22198 #: ../resize/virt-resize.pod:568
22199 msgid "GUEST BOOT STUCK AT \"GRUB\""
22203 #: ../resize/virt-resize.pod:570
22205 "If a Linux guest does not boot after resizing, and the boot is stuck after "
22206 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
22207 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
22208 "although we think is to do with partition alignment."
22212 #: ../resize/virt-resize.pod:575
22215 " guestfish -i -a newdisk\n"
22216 " ><fs> cat /boot/grub/device.map\n"
22217 " # check the contents of this file are sensible or\n"
22218 " # edit the file if necessary\n"
22219 " ><fs> grub-install / /dev/vda\n"
22225 #: ../resize/virt-resize.pod:582
22227 "For more flexible guest reconfiguration, including if you need to specify "
22228 "other parameters to grub-install, use L<virt-rescue(1)>."
22232 #: ../resize/virt-resize.pod:585
22233 msgid "ALTERNATIVE TOOLS"
22237 #: ../resize/virt-resize.pod:587
22239 "There are several proprietary tools for resizing partitions. We won't "
22240 "mention any here."
22244 #: ../resize/virt-resize.pod:590
22246 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
22247 "operations on disk images. They can resize and move partitions, but I don't "
22248 "think they can do anything with the contents, and they certainly don't "
22253 #: ../resize/virt-resize.pod:595
22255 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
22256 "but at a much lower level. You will probably end up hand-calculating sector "
22257 "offsets, which is something that virt-resize was designed to avoid. If you "
22258 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
22263 #: ../resize/virt-resize.pod:615
22265 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
22266 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
22267 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
22268 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<http://libguestfs.org/>."
22272 #: ../ruby/examples/guestfs-ruby.pod:5
22273 msgid "guestfs-ruby - How to use libguestfs from Ruby"
22277 #: ../ruby/examples/guestfs-ruby.pod:9
22280 " require 'guestfs'\n"
22281 " g = Guestfs::Guestfs.new()\n"
22282 " g.add_drive_opts(\"disk.img\",\n"
22283 " :readonly => 1, :format => \"raw\")\n"
22289 #: ../ruby/examples/guestfs-ruby.pod:17
22291 "This manual page documents how to call libguestfs from the Ruby programming "
22292 "language. This page just documents the differences from the C API and gives "
22293 "some examples. If you are not familiar with using libguestfs, you also need "
22294 "to read L<guestfs(3)>."
22298 #: ../ruby/examples/guestfs-ruby.pod:24
22300 "Errors from libguestfs functions are mapped into the C<Error> exception. "
22301 "This has a single parameter which is the error message (a string)."
22305 #: ../ruby/examples/guestfs-ruby.pod:38
22307 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22308 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22309 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
22313 #: ../src/guestfs-actions.pod:1
22314 msgid "guestfs_add_cdrom"
22318 #: ../src/guestfs-actions.pod:3
22322 " guestfs_add_cdrom (guestfs_h *g,\n"
22323 " const char *filename);\n"
22328 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:249
22329 #: ../src/guestfs-actions.pod:270
22331 "I<This function is deprecated.> In new code, use the L</"
22332 "guestfs_add_drive_opts> call instead."
22336 #: ../src/guestfs-actions.pod:24
22338 "This call checks for the existence of C<filename>. This stops you from "
22339 "specifying other types of drive which are supported by qemu such as C<nbd:> "
22340 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
22345 #: ../src/guestfs-actions.pod:31
22347 "If you just want to add an ISO file (often you use this as an efficient way "
22348 "to transfer large files into the guest), then you should probably use "
22349 "C<guestfs_add_drive_ro> instead."
22353 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:140
22354 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
22355 #: ../src/guestfs-actions.pod:259 ../src/guestfs-actions.pod:280
22356 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
22357 #: ../src/guestfs-actions.pod:427 ../src/guestfs-actions.pod:447
22358 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:506
22359 #: ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:552
22360 #: ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:652
22361 #: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:681
22362 #: ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798
22363 #: ../src/guestfs-actions.pod:812 ../src/guestfs-actions.pod:826
22364 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:1046
22365 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1084
22366 #: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1231
22367 #: ../src/guestfs-actions.pod:1275 ../src/guestfs-actions.pod:1293
22368 #: ../src/guestfs-actions.pod:1312 ../src/guestfs-actions.pod:1326
22369 #: ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:1416
22370 #: ../src/guestfs-actions.pod:1447 ../src/guestfs-actions.pod:1472
22371 #: ../src/guestfs-actions.pod:1514 ../src/guestfs-actions.pod:1627
22372 #: ../src/guestfs-actions.pod:1654 ../src/guestfs-actions.pod:1869
22373 #: ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1978
22374 #: ../src/guestfs-actions.pod:2484 ../src/guestfs-actions.pod:2628
22375 #: ../src/guestfs-actions.pod:2689 ../src/guestfs-actions.pod:2724
22376 #: ../src/guestfs-actions.pod:3768 ../src/guestfs-actions.pod:3783
22377 #: ../src/guestfs-actions.pod:3808 ../src/guestfs-actions.pod:3997
22378 #: ../src/guestfs-actions.pod:4011 ../src/guestfs-actions.pod:4024
22379 #: ../src/guestfs-actions.pod:4038 ../src/guestfs-actions.pod:4053
22380 #: ../src/guestfs-actions.pod:4089 ../src/guestfs-actions.pod:4161
22381 #: ../src/guestfs-actions.pod:4181 ../src/guestfs-actions.pod:4198
22382 #: ../src/guestfs-actions.pod:4221 ../src/guestfs-actions.pod:4244
22383 #: ../src/guestfs-actions.pod:4279 ../src/guestfs-actions.pod:4298
22384 #: ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4352
22385 #: ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4400
22386 #: ../src/guestfs-actions.pod:4416 ../src/guestfs-actions.pod:4429
22387 #: ../src/guestfs-actions.pod:4444 ../src/guestfs-actions.pod:4461
22388 #: ../src/guestfs-actions.pod:4554 ../src/guestfs-actions.pod:4574
22389 #: ../src/guestfs-actions.pod:4587 ../src/guestfs-actions.pod:4638
22390 #: ../src/guestfs-actions.pod:4656 ../src/guestfs-actions.pod:4674
22391 #: ../src/guestfs-actions.pod:4690 ../src/guestfs-actions.pod:4704
22392 #: ../src/guestfs-actions.pod:4718 ../src/guestfs-actions.pod:4735
22393 #: ../src/guestfs-actions.pod:4750 ../src/guestfs-actions.pod:4777
22394 #: ../src/guestfs-actions.pod:4840 ../src/guestfs-actions.pod:4913
22395 #: ../src/guestfs-actions.pod:4944 ../src/guestfs-actions.pod:4963
22396 #: ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:4994
22397 #: ../src/guestfs-actions.pod:5011 ../src/guestfs-actions.pod:5024
22398 #: ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5054
22399 #: ../src/guestfs-actions.pod:5096 ../src/guestfs-actions.pod:5122
22400 #: ../src/guestfs-actions.pod:5161 ../src/guestfs-actions.pod:5181
22401 #: ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5212
22402 #: ../src/guestfs-actions.pod:5261 ../src/guestfs-actions.pod:5314
22403 #: ../src/guestfs-actions.pod:5361 ../src/guestfs-actions.pod:5404
22404 #: ../src/guestfs-actions.pod:5432 ../src/guestfs-actions.pod:5449
22405 #: ../src/guestfs-actions.pod:5467 ../src/guestfs-actions.pod:5607
22406 #: ../src/guestfs-actions.pod:5664 ../src/guestfs-actions.pod:5686
22407 #: ../src/guestfs-actions.pod:5704 ../src/guestfs-actions.pod:5736
22408 #: ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:5819
22409 #: ../src/guestfs-actions.pod:5832 ../src/guestfs-actions.pod:5846
22410 #: ../src/guestfs-actions.pod:6135 ../src/guestfs-actions.pod:6154
22411 #: ../src/guestfs-actions.pod:6173 ../src/guestfs-actions.pod:6187
22412 #: ../src/guestfs-actions.pod:6199 ../src/guestfs-actions.pod:6213
22413 #: ../src/guestfs-actions.pod:6225 ../src/guestfs-actions.pod:6239
22414 #: ../src/guestfs-actions.pod:6255 ../src/guestfs-actions.pod:6276
22415 #: ../src/guestfs-actions.pod:6295 ../src/guestfs-actions.pod:6314
22416 #: ../src/guestfs-actions.pod:6344 ../src/guestfs-actions.pod:6362
22417 #: ../src/guestfs-actions.pod:6385 ../src/guestfs-actions.pod:6403
22418 #: ../src/guestfs-actions.pod:6422 ../src/guestfs-actions.pod:6443
22419 #: ../src/guestfs-actions.pod:6462 ../src/guestfs-actions.pod:6479
22420 #: ../src/guestfs-actions.pod:6498 ../src/guestfs-actions.pod:6526
22421 #: ../src/guestfs-actions.pod:6550 ../src/guestfs-actions.pod:6569
22422 #: ../src/guestfs-actions.pod:6585 ../src/guestfs-actions.pod:6607
22423 #: ../src/guestfs-actions.pod:6626 ../src/guestfs-actions.pod:6641
22424 #: ../src/guestfs-actions.pod:6660 ../src/guestfs-actions.pod:6704
22425 #: ../src/guestfs-actions.pod:6734 ../src/guestfs-actions.pod:6767
22426 #: ../src/guestfs-actions.pod:6882 ../src/guestfs-actions.pod:7003
22427 #: ../src/guestfs-actions.pod:7015 ../src/guestfs-actions.pod:7028
22428 #: ../src/guestfs-actions.pod:7041 ../src/guestfs-actions.pod:7063
22429 #: ../src/guestfs-actions.pod:7076 ../src/guestfs-actions.pod:7089
22430 #: ../src/guestfs-actions.pod:7102 ../src/guestfs-actions.pod:7117
22431 #: ../src/guestfs-actions.pod:7176 ../src/guestfs-actions.pod:7193
22432 #: ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7225
22433 #: ../src/guestfs-actions.pod:7242 ../src/guestfs-actions.pod:7255
22434 #: ../src/guestfs-actions.pod:7275 ../src/guestfs-actions.pod:7311
22435 #: ../src/guestfs-actions.pod:7325 ../src/guestfs-actions.pod:7366
22436 #: ../src/guestfs-actions.pod:7379 ../src/guestfs-actions.pod:7397
22437 #: ../src/guestfs-actions.pod:7431 ../src/guestfs-actions.pod:7467
22438 #: ../src/guestfs-actions.pod:7583 ../src/guestfs-actions.pod:7598
22439 #: ../src/guestfs-actions.pod:7612 ../src/guestfs-actions.pod:7667
22440 #: ../src/guestfs-actions.pod:7680 ../src/guestfs-actions.pod:7725
22441 #: ../src/guestfs-actions.pod:7765 ../src/guestfs-actions.pod:7821
22442 #: ../src/guestfs-actions.pod:7841 ../src/guestfs-actions.pod:7874
22443 #: ../src/guestfs-actions.pod:7938 ../src/guestfs-actions.pod:7961
22444 #: ../src/guestfs-actions.pod:7990
22445 msgid "This function returns 0 on success or -1 on error."
22449 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
22450 #: ../src/guestfs-actions.pod:1277 ../src/guestfs-actions.pod:2092
22451 #: ../src/guestfs-actions.pod:2190 ../src/guestfs-actions.pod:2313
22452 #: ../src/guestfs-actions.pod:3770 ../src/guestfs-actions.pod:3790
22453 #: ../src/guestfs-actions.pod:5098 ../src/guestfs-actions.pod:6364
22454 #: ../src/guestfs-actions.pod:6481 ../src/guestfs-actions.pod:6628
22455 #: ../src/guestfs-actions.pod:7119 ../src/guestfs-actions.pod:7244
22456 #: ../src/guestfs-actions.pod:7767
22457 msgid "(Added in 0.3)"
22461 #: ../src/guestfs-actions.pod:41
22462 msgid "guestfs_add_domain"
22466 #: ../src/guestfs-actions.pod:43
22470 " guestfs_add_domain (guestfs_h *g,\n"
22471 " const char *dom,\n"
22477 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
22478 #: ../src/guestfs-actions.pod:837 ../src/guestfs-actions.pod:1161
22479 #: ../src/guestfs-actions.pod:1211 ../src/guestfs-actions.pod:2973
22480 #: ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:5108
22481 #: ../src/guestfs-actions.pod:5325
22483 "You may supply a list of optional arguments to this call. Use zero or more "
22484 "of the following pairs of parameters, and terminate the list with C<-1> on "
22485 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
22489 #: ../src/guestfs-actions.pod:53
22492 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
22493 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
22494 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
22495 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
22496 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
22501 #: ../src/guestfs-actions.pod:59
22503 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
22504 "It works by connecting to libvirt, requesting the domain and domain XML from "
22505 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
22510 #: ../src/guestfs-actions.pod:94
22512 "The other optional parameters are passed directly through to "
22513 "C<guestfs_add_drive_opts>."
22517 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
22518 #: ../src/guestfs-actions.pod:520 ../src/guestfs-actions.pod:698
22519 #: ../src/guestfs-actions.pod:729 ../src/guestfs-actions.pod:747
22520 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1492
22521 #: ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:2051
22522 #: ../src/guestfs-actions.pod:2162 ../src/guestfs-actions.pod:2213
22523 #: ../src/guestfs-actions.pod:2265 ../src/guestfs-actions.pod:2277
22524 #: ../src/guestfs-actions.pod:2300 ../src/guestfs-actions.pod:2615
22525 #: ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3109
22526 #: ../src/guestfs-actions.pod:5284 ../src/guestfs-actions.pod:5504
22527 #: ../src/guestfs-actions.pod:5916 ../src/guestfs-actions.pod:5942
22528 #: ../src/guestfs-actions.pod:7352 ../src/guestfs-actions.pod:7778
22529 #: ../src/guestfs-actions.pod:7791 ../src/guestfs-actions.pod:7804
22530 msgid "On error this function returns -1."
22534 #: ../src/guestfs-actions.pod:99
22535 msgid "(Added in 1.7.4)"
22539 #: ../src/guestfs-actions.pod:101
22540 msgid "guestfs_add_domain_va"
22544 #: ../src/guestfs-actions.pod:103
22548 " guestfs_add_domain_va (guestfs_h *g,\n"
22549 " const char *dom,\n"
22550 " va_list args);\n"
22555 #: ../src/guestfs-actions.pod:108
22556 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
22560 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
22561 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
22562 #: ../src/guestfs-actions.pod:876 ../src/guestfs-actions.pod:887
22563 #: ../src/guestfs-actions.pod:1187 ../src/guestfs-actions.pod:1200
22564 #: ../src/guestfs-actions.pod:1244 ../src/guestfs-actions.pod:1257
22565 #: ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3069
22566 #: ../src/guestfs-actions.pod:4854 ../src/guestfs-actions.pod:4866
22567 #: ../src/guestfs-actions.pod:5136 ../src/guestfs-actions.pod:5148
22568 #: ../src/guestfs-actions.pod:5374 ../src/guestfs-actions.pod:5385
22569 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
22573 #: ../src/guestfs-actions.pod:112
22574 msgid "guestfs_add_domain_argv"
22578 #: ../src/guestfs-actions.pod:114
22582 " guestfs_add_domain_argv (guestfs_h *g,\n"
22583 " const char *dom,\n"
22584 " const struct guestfs_add_domain_argv *optargs);\n"
22589 #: ../src/guestfs-actions.pod:119
22590 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
22594 #: ../src/guestfs-actions.pod:123
22595 msgid "guestfs_add_drive"
22599 #: ../src/guestfs-actions.pod:125
22603 " guestfs_add_drive (guestfs_h *g,\n"
22604 " const char *filename);\n"
22609 #: ../src/guestfs-actions.pod:129
22611 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
22612 "optional parameters, so the disk is added writable, with the format being "
22613 "detected automatically."
22617 #: ../src/guestfs-actions.pod:133
22619 "Automatic detection of the format opens you up to a potential security hole "
22620 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
22621 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
22622 "you should think about replacing calls to this function with calls to "
22623 "C<guestfs_add_drive_opts>, and specifying the format."
22627 #: ../src/guestfs-actions.pod:144
22628 msgid "guestfs_add_drive_opts"
22632 #: ../src/guestfs-actions.pod:146
22636 " guestfs_add_drive_opts (guestfs_h *g,\n"
22637 " const char *filename,\n"
22643 #: ../src/guestfs-actions.pod:156
22646 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
22647 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
22648 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
22653 #: ../src/guestfs-actions.pod:185
22655 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
22656 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
22657 "Possible formats include C<raw> and C<qcow2>."
22661 #: ../src/guestfs-actions.pod:196
22663 "This rarely-used option lets you emulate the behaviour of the deprecated "
22664 "C<guestfs_add_drive_with_if> call (q.v.)"
22668 #: ../src/guestfs-actions.pod:203
22669 msgid "(Added in 1.5.23)"
22673 #: ../src/guestfs-actions.pod:205
22674 msgid "guestfs_add_drive_opts_va"
22678 #: ../src/guestfs-actions.pod:207
22682 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
22683 " const char *filename,\n"
22684 " va_list args);\n"
22689 #: ../src/guestfs-actions.pod:212
22690 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
22694 #: ../src/guestfs-actions.pod:216
22695 msgid "guestfs_add_drive_opts_argv"
22699 #: ../src/guestfs-actions.pod:218
22703 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
22704 " const char *filename,\n"
22705 " const struct guestfs_add_drive_opts_argv *optargs);\n"
22710 #: ../src/guestfs-actions.pod:223
22711 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
22715 #: ../src/guestfs-actions.pod:227
22716 msgid "guestfs_add_drive_ro"
22720 #: ../src/guestfs-actions.pod:229
22724 " guestfs_add_drive_ro (guestfs_h *g,\n"
22725 " const char *filename);\n"
22730 #: ../src/guestfs-actions.pod:233
22732 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
22733 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
22734 "disk is added read-only, with the format being detected automatically."
22738 #: ../src/guestfs-actions.pod:240
22739 msgid "(Added in 1.0.38)"
22743 #: ../src/guestfs-actions.pod:242
22744 msgid "guestfs_add_drive_ro_with_if"
22748 #: ../src/guestfs-actions.pod:244
22752 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
22753 " const char *filename,\n"
22754 " const char *iface);\n"
22759 #: ../src/guestfs-actions.pod:256
22761 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
22762 "QEMU interface emulation to use at run time."
22766 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
22767 #: ../src/guestfs-actions.pod:2574
22768 msgid "(Added in 1.0.84)"
22772 #: ../src/guestfs-actions.pod:263
22773 msgid "guestfs_add_drive_with_if"
22777 #: ../src/guestfs-actions.pod:265
22781 " guestfs_add_drive_with_if (guestfs_h *g,\n"
22782 " const char *filename,\n"
22783 " const char *iface);\n"
22788 #: ../src/guestfs-actions.pod:277
22790 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
22791 "QEMU interface emulation to use at run time."
22795 #: ../src/guestfs-actions.pod:284
22796 msgid "guestfs_aug_clear"
22800 #: ../src/guestfs-actions.pod:286
22804 " guestfs_aug_clear (guestfs_h *g,\n"
22805 " const char *augpath);\n"
22810 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2302
22811 msgid "(Added in 1.3.4)"
22815 #: ../src/guestfs-actions.pod:297
22816 msgid "guestfs_aug_close"
22820 #: ../src/guestfs-actions.pod:299
22824 " guestfs_aug_close (guestfs_h *g);\n"
22829 #: ../src/guestfs-actions.pod:302
22831 "Close the current Augeas handle and free up any resources used by it. After "
22832 "calling this, you have to call C<guestfs_aug_init> again before you can use "
22833 "any other Augeas functions."
22837 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
22838 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
22839 #: ../src/guestfs-actions.pod:429 ../src/guestfs-actions.pod:449
22840 #: ../src/guestfs-actions.pod:463 ../src/guestfs-actions.pod:494
22841 #: ../src/guestfs-actions.pod:508 ../src/guestfs-actions.pod:522
22842 #: ../src/guestfs-actions.pod:536 ../src/guestfs-actions.pod:554
22843 #: ../src/guestfs-actions.pod:5993
22844 msgid "(Added in 0.7)"
22848 #: ../src/guestfs-actions.pod:311
22849 msgid "guestfs_aug_defnode"
22853 #: ../src/guestfs-actions.pod:313
22856 " struct guestfs_int_bool *\n"
22857 " guestfs_aug_defnode (guestfs_h *g,\n"
22858 " const char *name,\n"
22859 " const char *expr,\n"
22860 " const char *val);\n"
22865 #: ../src/guestfs-actions.pod:322
22867 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
22868 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
22869 "containing that single node."
22873 #: ../src/guestfs-actions.pod:330
22875 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
22876 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
22880 #: ../src/guestfs-actions.pod:336
22881 msgid "guestfs_aug_defvar"
22885 #: ../src/guestfs-actions.pod:338
22889 " guestfs_aug_defvar (guestfs_h *g,\n"
22890 " const char *name,\n"
22891 " const char *expr);\n"
22896 #: ../src/guestfs-actions.pod:354
22897 msgid "guestfs_aug_get"
22901 #: ../src/guestfs-actions.pod:356
22905 " guestfs_aug_get (guestfs_h *g,\n"
22906 " const char *augpath);\n"
22911 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:927
22912 #: ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1005
22913 #: ../src/guestfs-actions.pod:1021 ../src/guestfs-actions.pod:1124
22914 #: ../src/guestfs-actions.pod:1361 ../src/guestfs-actions.pod:1378
22915 #: ../src/guestfs-actions.pod:1397 ../src/guestfs-actions.pod:1531
22916 #: ../src/guestfs-actions.pod:1719 ../src/guestfs-actions.pod:1831
22917 #: ../src/guestfs-actions.pod:1994 ../src/guestfs-actions.pod:2011
22918 #: ../src/guestfs-actions.pod:2078 ../src/guestfs-actions.pod:2121
22919 #: ../src/guestfs-actions.pod:2142 ../src/guestfs-actions.pod:2325
22920 #: ../src/guestfs-actions.pod:2539 ../src/guestfs-actions.pod:2743
22921 #: ../src/guestfs-actions.pod:2837 ../src/guestfs-actions.pod:2941
22922 #: ../src/guestfs-actions.pod:2960 ../src/guestfs-actions.pod:3174
22923 #: ../src/guestfs-actions.pod:3202 ../src/guestfs-actions.pod:3223
22924 #: ../src/guestfs-actions.pod:3257 ../src/guestfs-actions.pod:3316
22925 #: ../src/guestfs-actions.pod:3336 ../src/guestfs-actions.pod:3356
22926 #: ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:4336
22927 #: ../src/guestfs-actions.pod:4506 ../src/guestfs-actions.pod:4616
22928 #: ../src/guestfs-actions.pod:5522 ../src/guestfs-actions.pod:5721
22929 #: ../src/guestfs-actions.pod:5891 ../src/guestfs-actions.pod:6069
22930 #: ../src/guestfs-actions.pod:6118 ../src/guestfs-actions.pod:6788
22931 #: ../src/guestfs-actions.pod:6804 ../src/guestfs-actions.pod:6828
22932 #: ../src/guestfs-actions.pod:6852 ../src/guestfs-actions.pod:7526
22933 #: ../src/guestfs-actions.pod:7545 ../src/guestfs-actions.pod:7563
22934 #: ../src/guestfs-actions.pod:7737 ../src/guestfs-actions.pod:8054
22936 "This function returns a string, or NULL on error. I<The caller must free "
22937 "the returned string after use>."
22941 #: ../src/guestfs-actions.pod:368
22942 msgid "guestfs_aug_init"
22946 #: ../src/guestfs-actions.pod:370
22950 " guestfs_aug_init (guestfs_h *g,\n"
22951 " const char *root,\n"
22957 #: ../src/guestfs-actions.pod:379
22958 msgid "You must call this before using any other C<guestfs_aug_*> commands."
22962 #: ../src/guestfs-actions.pod:404
22964 "This option is only useful when debugging Augeas lenses. Use of this option "
22965 "may require additional memory for the libguestfs appliance. You may need to "
22966 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
22967 "C<guestfs_set_memsize>."
22971 #: ../src/guestfs-actions.pod:419
22972 msgid "Do not load the tree in C<guestfs_aug_init>."
22976 #: ../src/guestfs-actions.pod:423
22977 msgid "To close the handle, you can call C<guestfs_aug_close>."
22981 #: ../src/guestfs-actions.pod:431
22982 msgid "guestfs_aug_insert"
22986 #: ../src/guestfs-actions.pod:433
22990 " guestfs_aug_insert (guestfs_h *g,\n"
22991 " const char *augpath,\n"
22992 " const char *label,\n"
22998 #: ../src/guestfs-actions.pod:451
22999 msgid "guestfs_aug_load"
23003 #: ../src/guestfs-actions.pod:453
23007 " guestfs_aug_load (guestfs_h *g);\n"
23012 #: ../src/guestfs-actions.pod:465
23013 msgid "guestfs_aug_ls"
23017 #: ../src/guestfs-actions.pod:467
23021 " guestfs_aug_ls (guestfs_h *g,\n"
23022 " const char *augpath);\n"
23027 #: ../src/guestfs-actions.pod:471
23029 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
23030 "sorting the resulting nodes into alphabetical order."
23034 #: ../src/guestfs-actions.pod:474 ../src/guestfs-actions.pod:490
23035 #: ../src/guestfs-actions.pod:636 ../src/guestfs-actions.pod:1143
23036 #: ../src/guestfs-actions.pod:1546 ../src/guestfs-actions.pod:1565
23037 #: ../src/guestfs-actions.pod:1668 ../src/guestfs-actions.pod:1687
23038 #: ../src/guestfs-actions.pod:1933 ../src/guestfs-actions.pod:2397
23039 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:2432
23040 #: ../src/guestfs-actions.pod:2497 ../src/guestfs-actions.pod:2521
23041 #: ../src/guestfs-actions.pod:2592 ../src/guestfs-actions.pod:2641
23042 #: ../src/guestfs-actions.pod:2902 ../src/guestfs-actions.pod:3276
23043 #: ../src/guestfs-actions.pod:3552 ../src/guestfs-actions.pod:3866
23044 #: ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3903
23045 #: ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:4070
23046 #: ../src/guestfs-actions.pod:4478 ../src/guestfs-actions.pod:5245
23047 #: ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5989
23048 #: ../src/guestfs-actions.pod:6103 ../src/guestfs-actions.pod:6868
23049 #: ../src/guestfs-actions.pod:6929 ../src/guestfs-actions.pod:6984
23050 #: ../src/guestfs-actions.pod:7130 ../src/guestfs-actions.pod:7154
23051 #: ../src/guestfs-actions.pod:7630 ../src/guestfs-actions.pod:7650
23052 #: ../src/guestfs-actions.pod:7697 ../src/guestfs-actions.pod:7891
23053 #: ../src/guestfs-actions.pod:7910 ../src/guestfs-actions.pod:8004
23054 #: ../src/guestfs-actions.pod:8023 ../src/guestfs-actions.pod:8069
23055 #: ../src/guestfs-actions.pod:8088
23057 "This function returns a NULL-terminated array of strings (like L<environ(3)"
23058 ">), or NULL if there was an error. I<The caller must free the strings and "
23059 "the array after use>."
23063 #: ../src/guestfs-actions.pod:478 ../src/guestfs-actions.pod:1068
23064 #: ../src/guestfs-actions.pod:1086 ../src/guestfs-actions.pod:1603
23065 #: ../src/guestfs-actions.pod:3630 ../src/guestfs-actions.pod:3661
23066 #: ../src/guestfs-actions.pod:4319 ../src/guestfs-actions.pod:4369
23067 #: ../src/guestfs-actions.pod:4556 ../src/guestfs-actions.pod:4589
23068 #: ../src/guestfs-actions.pod:4752 ../src/guestfs-actions.pod:5249
23069 #: ../src/guestfs-actions.pod:5804 ../src/guestfs-actions.pod:6201
23070 #: ../src/guestfs-actions.pod:6215 ../src/guestfs-actions.pod:6227
23071 #: ../src/guestfs-actions.pod:6709 ../src/guestfs-actions.pod:7368
23072 #: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:7614
23073 #: ../src/guestfs-actions.pod:7879
23074 msgid "(Added in 0.8)"
23078 #: ../src/guestfs-actions.pod:480
23079 msgid "guestfs_aug_match"
23083 #: ../src/guestfs-actions.pod:482
23087 " guestfs_aug_match (guestfs_h *g,\n"
23088 " const char *augpath);\n"
23093 #: ../src/guestfs-actions.pod:496
23094 msgid "guestfs_aug_mv"
23098 #: ../src/guestfs-actions.pod:498
23102 " guestfs_aug_mv (guestfs_h *g,\n"
23103 " const char *src,\n"
23104 " const char *dest);\n"
23109 #: ../src/guestfs-actions.pod:510
23110 msgid "guestfs_aug_rm"
23114 #: ../src/guestfs-actions.pod:512
23118 " guestfs_aug_rm (guestfs_h *g,\n"
23119 " const char *augpath);\n"
23124 #: ../src/guestfs-actions.pod:524
23125 msgid "guestfs_aug_save"
23129 #: ../src/guestfs-actions.pod:526
23133 " guestfs_aug_save (guestfs_h *g);\n"
23138 #: ../src/guestfs-actions.pod:531
23140 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
23145 #: ../src/guestfs-actions.pod:538
23146 msgid "guestfs_aug_set"
23150 #: ../src/guestfs-actions.pod:540
23154 " guestfs_aug_set (guestfs_h *g,\n"
23155 " const char *augpath,\n"
23156 " const char *val);\n"
23161 #: ../src/guestfs-actions.pod:547
23163 "In the Augeas API, it is possible to clear a node by setting the value to "
23164 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
23165 "this call. Instead you must use the C<guestfs_aug_clear> call."
23169 #: ../src/guestfs-actions.pod:556
23170 msgid "guestfs_available"
23174 #: ../src/guestfs-actions.pod:558
23178 " guestfs_available (guestfs_h *g,\n"
23179 " char *const *groups);\n"
23184 #: ../src/guestfs-actions.pod:566
23186 "The libguestfs groups, and the functions that those groups correspond to, "
23187 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
23188 "runtime by calling C<guestfs_available_all_groups>."
23192 #: ../src/guestfs-actions.pod:590
23193 msgid "You must call C<guestfs_launch> before calling this function."
23197 #: ../src/guestfs-actions.pod:612
23199 "This call was added in version C<1.0.80>. In previous versions of "
23200 "libguestfs all you could do would be to speculatively execute a command to "
23201 "find out if the daemon implemented it. See also C<guestfs_version>."
23205 #: ../src/guestfs-actions.pod:621 ../src/guestfs-actions.pod:1348
23206 msgid "(Added in 1.0.80)"
23210 #: ../src/guestfs-actions.pod:623
23211 msgid "guestfs_available_all_groups"
23215 #: ../src/guestfs-actions.pod:625
23219 " guestfs_available_all_groups (guestfs_h *g);\n"
23224 #: ../src/guestfs-actions.pod:628
23226 "This command returns a list of all optional groups that this daemon knows "
23227 "about. Note this returns both supported and unsupported groups. To find "
23228 "out which ones the daemon can actually support you have to call "
23229 "C<guestfs_available> on each member of the returned list."
23233 #: ../src/guestfs-actions.pod:634
23234 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
23238 #: ../src/guestfs-actions.pod:640
23239 msgid "(Added in 1.3.15)"
23243 #: ../src/guestfs-actions.pod:642
23244 msgid "guestfs_base64_in"
23248 #: ../src/guestfs-actions.pod:644
23252 " guestfs_base64_in (guestfs_h *g,\n"
23253 " const char *base64file,\n"
23254 " const char *filename);\n"
23259 #: ../src/guestfs-actions.pod:654 ../src/guestfs-actions.pod:668
23260 msgid "(Added in 1.3.5)"
23264 #: ../src/guestfs-actions.pod:656
23265 msgid "guestfs_base64_out"
23269 #: ../src/guestfs-actions.pod:658
23273 " guestfs_base64_out (guestfs_h *g,\n"
23274 " const char *filename,\n"
23275 " const char *base64file);\n"
23280 #: ../src/guestfs-actions.pod:670
23281 msgid "guestfs_blockdev_flushbufs"
23285 #: ../src/guestfs-actions.pod:672
23289 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
23290 " const char *device);\n"
23295 #: ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:700
23296 #: ../src/guestfs-actions.pod:715 ../src/guestfs-actions.pod:731
23297 #: ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:768
23298 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
23299 #: ../src/guestfs-actions.pod:814 ../src/guestfs-actions.pod:828
23300 msgid "(Added in 0.9.3)"
23304 #: ../src/guestfs-actions.pod:685
23305 msgid "guestfs_blockdev_getbsz"
23309 #: ../src/guestfs-actions.pod:687
23313 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
23314 " const char *device);\n"
23319 #: ../src/guestfs-actions.pod:702
23320 msgid "guestfs_blockdev_getro"
23324 #: ../src/guestfs-actions.pod:704
23328 " guestfs_blockdev_getro (guestfs_h *g,\n"
23329 " const char *device);\n"
23334 #: ../src/guestfs-actions.pod:713 ../src/guestfs-actions.pod:1586
23335 #: ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:2090
23336 #: ../src/guestfs-actions.pod:2101 ../src/guestfs-actions.pod:2173
23337 #: ../src/guestfs-actions.pod:2199 ../src/guestfs-actions.pod:2239
23338 #: ../src/guestfs-actions.pod:2254 ../src/guestfs-actions.pod:2288
23339 #: ../src/guestfs-actions.pod:2311 ../src/guestfs-actions.pod:3373
23340 #: ../src/guestfs-actions.pod:3389 ../src/guestfs-actions.pod:3407
23341 #: ../src/guestfs-actions.pod:3569 ../src/guestfs-actions.pod:3583
23342 #: ../src/guestfs-actions.pod:3598 ../src/guestfs-actions.pod:3612
23343 #: ../src/guestfs-actions.pod:3628 ../src/guestfs-actions.pod:3643
23344 #: ../src/guestfs-actions.pod:3659 ../src/guestfs-actions.pod:3673
23345 #: ../src/guestfs-actions.pod:3686 ../src/guestfs-actions.pod:3700
23346 #: ../src/guestfs-actions.pod:3715 ../src/guestfs-actions.pod:3730
23347 #: ../src/guestfs-actions.pod:3743 ../src/guestfs-actions.pod:3757
23348 #: ../src/guestfs-actions.pod:5486
23349 msgid "This function returns a C truth value on success or -1 on error."
23353 #: ../src/guestfs-actions.pod:717
23354 msgid "guestfs_blockdev_getsize64"
23358 #: ../src/guestfs-actions.pod:719
23362 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
23363 " const char *device);\n"
23368 #: ../src/guestfs-actions.pod:725
23369 msgid "See also C<guestfs_blockdev_getsz>."
23373 #: ../src/guestfs-actions.pod:733
23374 msgid "guestfs_blockdev_getss"
23378 #: ../src/guestfs-actions.pod:735
23382 " guestfs_blockdev_getss (guestfs_h *g,\n"
23383 " const char *device);\n"
23388 #: ../src/guestfs-actions.pod:742
23390 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
23395 #: ../src/guestfs-actions.pod:751
23396 msgid "guestfs_blockdev_getsz"
23400 #: ../src/guestfs-actions.pod:753
23404 " guestfs_blockdev_getsz (guestfs_h *g,\n"
23405 " const char *device);\n"
23410 #: ../src/guestfs-actions.pod:760
23412 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
23413 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
23417 #: ../src/guestfs-actions.pod:770
23418 msgid "guestfs_blockdev_rereadpt"
23422 #: ../src/guestfs-actions.pod:772
23426 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
23427 " const char *device);\n"
23432 #: ../src/guestfs-actions.pod:784
23433 msgid "guestfs_blockdev_setbsz"
23437 #: ../src/guestfs-actions.pod:786
23441 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
23442 " const char *device,\n"
23443 " int blocksize);\n"
23448 #: ../src/guestfs-actions.pod:802
23449 msgid "guestfs_blockdev_setro"
23453 #: ../src/guestfs-actions.pod:804
23457 " guestfs_blockdev_setro (guestfs_h *g,\n"
23458 " const char *device);\n"
23463 #: ../src/guestfs-actions.pod:816
23464 msgid "guestfs_blockdev_setrw"
23468 #: ../src/guestfs-actions.pod:818
23472 " guestfs_blockdev_setrw (guestfs_h *g,\n"
23473 " const char *device);\n"
23478 #: ../src/guestfs-actions.pod:830
23479 msgid "guestfs_btrfs_filesystem_resize"
23483 #: ../src/guestfs-actions.pod:832
23487 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
23488 " const char *mountpoint,\n"
23494 #: ../src/guestfs-actions.pod:842
23497 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
23502 #: ../src/guestfs-actions.pod:865
23503 msgid "(Added in 1.11.17)"
23507 #: ../src/guestfs-actions.pod:867
23508 msgid "guestfs_btrfs_filesystem_resize_va"
23512 #: ../src/guestfs-actions.pod:869
23516 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
23517 " const char *mountpoint,\n"
23518 " va_list args);\n"
23523 #: ../src/guestfs-actions.pod:874
23524 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
23528 #: ../src/guestfs-actions.pod:878
23529 msgid "guestfs_btrfs_filesystem_resize_argv"
23533 #: ../src/guestfs-actions.pod:880
23537 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
23538 " const char *mountpoint,\n"
23539 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
23544 #: ../src/guestfs-actions.pod:885
23545 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
23549 #: ../src/guestfs-actions.pod:889
23550 msgid "guestfs_case_sensitive_path"
23554 #: ../src/guestfs-actions.pod:891
23558 " guestfs_case_sensitive_path (guestfs_h *g,\n"
23559 " const char *path);\n"
23564 #: ../src/guestfs-actions.pod:917
23566 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
23567 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
23568 "how the directories were originally created under Windows)."
23572 #: ../src/guestfs-actions.pod:925
23573 msgid "See also C<guestfs_realpath>."
23577 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:7548
23578 msgid "(Added in 1.0.75)"
23582 #: ../src/guestfs-actions.pod:932
23583 msgid "guestfs_cat"
23587 #: ../src/guestfs-actions.pod:934
23591 " guestfs_cat (guestfs_h *g,\n"
23592 " const char *path);\n"
23597 #: ../src/guestfs-actions.pod:940
23599 "Note that this function cannot correctly handle binary files (specifically, "
23600 "files containing C<\\0> character which is treated as end of string). For "
23601 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
23602 "functions which have a more complex interface."
23606 #: ../src/guestfs-actions.pod:951 ../src/guestfs-actions.pod:3887
23607 #: ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:3986
23608 #: ../src/guestfs-actions.pod:4074 ../src/guestfs-actions.pod:4482
23609 #: ../src/guestfs-actions.pod:4496 ../src/guestfs-actions.pod:5867
23610 #: ../src/guestfs-actions.pod:5881 ../src/guestfs-actions.pod:7701
23611 #: ../src/guestfs-actions.pod:7715
23612 msgid "(Added in 0.4)"
23616 #: ../src/guestfs-actions.pod:953
23617 msgid "guestfs_checksum"
23621 #: ../src/guestfs-actions.pod:955
23625 " guestfs_checksum (guestfs_h *g,\n"
23626 " const char *csumtype,\n"
23627 " const char *path);\n"
23632 #: ../src/guestfs-actions.pod:1001
23633 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
23637 #: ../src/guestfs-actions.pod:1003
23638 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
23642 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1423
23643 #: ../src/guestfs-actions.pod:2279 ../src/guestfs-actions.pod:3585
23644 #: ../src/guestfs-actions.pod:3614 ../src/guestfs-actions.pod:3675
23645 #: ../src/guestfs-actions.pod:3702 ../src/guestfs-actions.pod:7404
23646 msgid "(Added in 1.0.2)"
23650 #: ../src/guestfs-actions.pod:1010
23651 msgid "guestfs_checksum_device"
23655 #: ../src/guestfs-actions.pod:1012
23659 " guestfs_checksum_device (guestfs_h *g,\n"
23660 " const char *csumtype,\n"
23661 " const char *device);\n"
23666 #: ../src/guestfs-actions.pod:1017
23668 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
23669 "device named C<device>. For the types of checksums supported see the "
23670 "C<guestfs_checksum> command."
23674 #: ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:5316
23675 #: ../src/guestfs-actions.pod:5451 ../src/guestfs-actions.pod:5488
23676 #: ../src/guestfs-actions.pod:5506 ../src/guestfs-actions.pod:5688
23677 #: ../src/guestfs-actions.pod:7313 ../src/guestfs-actions.pod:7327
23678 #: ../src/guestfs-actions.pod:7727
23679 msgid "(Added in 1.3.2)"
23683 #: ../src/guestfs-actions.pod:1026
23684 msgid "guestfs_checksums_out"
23688 #: ../src/guestfs-actions.pod:1028
23692 " guestfs_checksums_out (guestfs_h *g,\n"
23693 " const char *csumtype,\n"
23694 " const char *directory,\n"
23695 " const char *sumsfile);\n"
23700 #: ../src/guestfs-actions.pod:1048
23701 msgid "(Added in 1.3.7)"
23705 #: ../src/guestfs-actions.pod:1050
23706 msgid "guestfs_chmod"
23710 #: ../src/guestfs-actions.pod:1052
23714 " guestfs_chmod (guestfs_h *g,\n"
23716 " const char *path);\n"
23721 #: ../src/guestfs-actions.pod:1070
23722 msgid "guestfs_chown"
23726 #: ../src/guestfs-actions.pod:1072
23730 " guestfs_chown (guestfs_h *g,\n"
23733 " const char *path);\n"
23738 #: ../src/guestfs-actions.pod:1088
23739 msgid "guestfs_command"
23743 #: ../src/guestfs-actions.pod:1090
23747 " guestfs_command (guestfs_h *g,\n"
23748 " char *const *arguments);\n"
23753 #: ../src/guestfs-actions.pod:1099
23755 "The single parameter is an argv-style list of arguments. The first element "
23756 "is the name of the program to run. Subsequent elements are parameters. The "
23757 "list must be non-empty (ie. must contain a program name). Note that the "
23758 "command runs directly, and is I<not> invoked via the shell (see "
23763 #: ../src/guestfs-actions.pod:1130 ../src/guestfs-actions.pod:1150
23764 #: ../src/guestfs-actions.pod:1722
23765 msgid "(Added in 0.9.1)"
23769 #: ../src/guestfs-actions.pod:1132
23770 msgid "guestfs_command_lines"
23774 #: ../src/guestfs-actions.pod:1134
23778 " guestfs_command_lines (guestfs_h *g,\n"
23779 " char *const *arguments);\n"
23784 #: ../src/guestfs-actions.pod:1138
23786 "This is the same as C<guestfs_command>, but splits the result into a list of "
23791 #: ../src/guestfs-actions.pod:1141
23792 msgid "See also: C<guestfs_sh_lines>"
23796 #: ../src/guestfs-actions.pod:1152
23797 msgid "guestfs_compress_device_out"
23801 #: ../src/guestfs-actions.pod:1154
23805 " guestfs_compress_device_out (guestfs_h *g,\n"
23806 " const char *ctype,\n"
23807 " const char *device,\n"
23808 " const char *zdevice,\n"
23814 #: ../src/guestfs-actions.pod:1166
23817 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
23822 #: ../src/guestfs-actions.pod:1171
23824 "The C<ctype> and optional C<level> parameters have the same meaning as in "
23825 "C<guestfs_compress_out>."
23829 #: ../src/guestfs-actions.pod:1176
23830 msgid "guestfs_compress_device_out_va"
23834 #: ../src/guestfs-actions.pod:1178
23838 " guestfs_compress_device_out_va (guestfs_h *g,\n"
23839 " const char *ctype,\n"
23840 " const char *device,\n"
23841 " const char *zdevice,\n"
23842 " va_list args);\n"
23847 #: ../src/guestfs-actions.pod:1185
23848 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
23852 #: ../src/guestfs-actions.pod:1189
23853 msgid "guestfs_compress_device_out_argv"
23857 #: ../src/guestfs-actions.pod:1191
23861 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
23862 " const char *ctype,\n"
23863 " const char *device,\n"
23864 " const char *zdevice,\n"
23865 " const struct guestfs_compress_device_out_argv *optargs);\n"
23870 #: ../src/guestfs-actions.pod:1198
23871 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
23875 #: ../src/guestfs-actions.pod:1202
23876 msgid "guestfs_compress_out"
23880 #: ../src/guestfs-actions.pod:1204
23884 " guestfs_compress_out (guestfs_h *g,\n"
23885 " const char *ctype,\n"
23886 " const char *file,\n"
23887 " const char *zfile,\n"
23893 #: ../src/guestfs-actions.pod:1216
23896 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
23901 #: ../src/guestfs-actions.pod:1233
23902 msgid "guestfs_compress_out_va"
23906 #: ../src/guestfs-actions.pod:1235
23910 " guestfs_compress_out_va (guestfs_h *g,\n"
23911 " const char *ctype,\n"
23912 " const char *file,\n"
23913 " const char *zfile,\n"
23914 " va_list args);\n"
23919 #: ../src/guestfs-actions.pod:1242
23920 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
23924 #: ../src/guestfs-actions.pod:1246
23925 msgid "guestfs_compress_out_argv"
23929 #: ../src/guestfs-actions.pod:1248
23933 " guestfs_compress_out_argv (guestfs_h *g,\n"
23934 " const char *ctype,\n"
23935 " const char *file,\n"
23936 " const char *zfile,\n"
23937 " const struct guestfs_compress_out_argv *optargs);\n"
23942 #: ../src/guestfs-actions.pod:1255
23943 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
23947 #: ../src/guestfs-actions.pod:1259
23948 msgid "guestfs_config"
23952 #: ../src/guestfs-actions.pod:1261
23956 " guestfs_config (guestfs_h *g,\n"
23957 " const char *qemuparam,\n"
23958 " const char *qemuvalue);\n"
23963 #: ../src/guestfs-actions.pod:1279
23964 msgid "guestfs_copy_size"
23968 #: ../src/guestfs-actions.pod:1281
23972 " guestfs_copy_size (guestfs_h *g,\n"
23973 " const char *src,\n"
23974 " const char *dest,\n"
23975 " int64_t size);\n"
23980 #: ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1418
23981 #: ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1494
23982 #: ../src/guestfs-actions.pod:1871 ../src/guestfs-actions.pod:1893
23983 #: ../src/guestfs-actions.pod:3785 ../src/guestfs-actions.pod:7399
23984 #: ../src/guestfs-actions.pod:7433 ../src/guestfs-actions.pod:7940
23985 #: ../src/guestfs-actions.pod:7963
23987 "This long-running command can generate progress notification messages so "
23988 "that the caller can display a progress bar or indicator. To receive these "
23989 "messages, the caller must register a progress event callback. See L<guestfs"
23990 "(3)/GUESTFS_EVENT_PROGRESS>."
23994 #: ../src/guestfs-actions.pod:1300 ../src/guestfs-actions.pod:4509
23995 #: ../src/guestfs-actions.pod:5894 ../src/guestfs-actions.pod:7634
23996 #: ../src/guestfs-actions.pod:7654 ../src/guestfs-actions.pod:7740
23997 msgid "(Added in 1.0.87)"
24001 #: ../src/guestfs-actions.pod:1302
24006 #: ../src/guestfs-actions.pod:1304
24010 " guestfs_cp (guestfs_h *g,\n"
24011 " const char *src,\n"
24012 " const char *dest);\n"
24017 #: ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1328
24018 #: ../src/guestfs-actions.pod:1400 ../src/guestfs-actions.pod:1474
24019 #: ../src/guestfs-actions.pod:1588 ../src/guestfs-actions.pod:5263
24020 #: ../src/guestfs-actions.pod:5738
24021 msgid "(Added in 1.0.18)"
24025 #: ../src/guestfs-actions.pod:1316
24026 msgid "guestfs_cp_a"
24030 #: ../src/guestfs-actions.pod:1318
24034 " guestfs_cp_a (guestfs_h *g,\n"
24035 " const char *src,\n"
24036 " const char *dest);\n"
24041 #: ../src/guestfs-actions.pod:1330
24046 #: ../src/guestfs-actions.pod:1332
24050 " guestfs_dd (guestfs_h *g,\n"
24051 " const char *src,\n"
24052 " const char *dest);\n"
24057 #: ../src/guestfs-actions.pod:1342
24059 "If the destination is a device, it must be as large or larger than the "
24060 "source file or device, otherwise the copy will fail. This command cannot do "
24061 "partial copies (see C<guestfs_copy_size>)."
24065 #: ../src/guestfs-actions.pod:1350
24070 #: ../src/guestfs-actions.pod:1352
24074 " guestfs_df (guestfs_h *g);\n"
24079 #: ../src/guestfs-actions.pod:1357 ../src/guestfs-actions.pod:1374
24081 "This command is mostly useful for interactive sessions. It is I<not> "
24082 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
24087 #: ../src/guestfs-actions.pod:1364 ../src/guestfs-actions.pod:1381
24088 #: ../src/guestfs-actions.pod:1499 ../src/guestfs-actions.pod:2504
24089 #: ../src/guestfs-actions.pod:2528 ../src/guestfs-actions.pod:2596
24090 #: ../src/guestfs-actions.pod:4619 ../src/guestfs-actions.pod:5163
24091 #: ../src/guestfs-actions.pod:7137 ../src/guestfs-actions.pod:7161
24092 #: ../src/guestfs-actions.pod:7780 ../src/guestfs-actions.pod:7793
24093 #: ../src/guestfs-actions.pod:7806
24094 msgid "(Added in 1.0.54)"
24098 #: ../src/guestfs-actions.pod:1366
24099 msgid "guestfs_df_h"
24103 #: ../src/guestfs-actions.pod:1368
24107 " guestfs_df_h (guestfs_h *g);\n"
24112 #: ../src/guestfs-actions.pod:1383
24113 msgid "guestfs_dmesg"
24117 #: ../src/guestfs-actions.pod:1385
24121 " guestfs_dmesg (guestfs_h *g);\n"
24126 #: ../src/guestfs-actions.pod:1392
24128 "Another way to get the same information is to enable verbose messages with "
24129 "C<guestfs_set_verbose> or by setting the environment variable "
24130 "C<LIBGUESTFS_DEBUG=1> before running the program."
24134 #: ../src/guestfs-actions.pod:1402
24135 msgid "guestfs_download"
24139 #: ../src/guestfs-actions.pod:1404
24143 " guestfs_download (guestfs_h *g,\n"
24144 " const char *remotefilename,\n"
24145 " const char *filename);\n"
24150 #: ../src/guestfs-actions.pod:1414
24151 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
24155 #: ../src/guestfs-actions.pod:1425
24156 msgid "guestfs_download_offset"
24160 #: ../src/guestfs-actions.pod:1427
24164 " guestfs_download_offset (guestfs_h *g,\n"
24165 " const char *remotefilename,\n"
24166 " const char *filename,\n"
24167 " int64_t offset,\n"
24168 " int64_t size);\n"
24173 #: ../src/guestfs-actions.pod:1440
24175 "Note that there is no limit on the amount of data that can be downloaded "
24176 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
24177 "full amount unless an error occurs."
24181 #: ../src/guestfs-actions.pod:1445
24182 msgid "See also C<guestfs_download>, C<guestfs_pread>."
24186 #: ../src/guestfs-actions.pod:1454 ../src/guestfs-actions.pod:7438
24187 msgid "(Added in 1.5.17)"
24191 #: ../src/guestfs-actions.pod:1456
24192 msgid "guestfs_drop_caches"
24196 #: ../src/guestfs-actions.pod:1458
24200 " guestfs_drop_caches (guestfs_h *g,\n"
24201 " int whattodrop);\n"
24206 #: ../src/guestfs-actions.pod:1476
24211 #: ../src/guestfs-actions.pod:1478
24215 " guestfs_du (guestfs_h *g,\n"
24216 " const char *path);\n"
24221 #: ../src/guestfs-actions.pod:1501
24222 msgid "guestfs_e2fsck_f"
24226 #: ../src/guestfs-actions.pod:1503
24230 " guestfs_e2fsck_f (guestfs_h *g,\n"
24231 " const char *device);\n"
24236 #: ../src/guestfs-actions.pod:1511
24238 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
24239 "Normally you should use C<guestfs_fsck>."
24243 #: ../src/guestfs-actions.pod:1516
24244 msgid "(Added in 1.0.29)"
24248 #: ../src/guestfs-actions.pod:1518
24249 msgid "guestfs_echo_daemon"
24253 #: ../src/guestfs-actions.pod:1520
24257 " guestfs_echo_daemon (guestfs_h *g,\n"
24258 " char *const *words);\n"
24263 #: ../src/guestfs-actions.pod:1529
24264 msgid "See also C<guestfs_ping_daemon>."
24268 #: ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:2290
24269 #: ../src/guestfs-actions.pod:6609
24270 msgid "(Added in 1.0.69)"
24274 #: ../src/guestfs-actions.pod:1536
24275 msgid "guestfs_egrep"
24279 #: ../src/guestfs-actions.pod:1538
24283 " guestfs_egrep (guestfs_h *g,\n"
24284 " const char *regex,\n"
24285 " const char *path);\n"
24290 #: ../src/guestfs-actions.pod:1553 ../src/guestfs-actions.pod:1572
24291 #: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1675
24292 #: ../src/guestfs-actions.pod:1694 ../src/guestfs-actions.pod:2420
24293 #: ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2617
24294 #: ../src/guestfs-actions.pod:2630 ../src/guestfs-actions.pod:2645
24295 #: ../src/guestfs-actions.pod:2691 ../src/guestfs-actions.pod:2713
24296 #: ../src/guestfs-actions.pod:2726 ../src/guestfs-actions.pod:3999
24297 #: ../src/guestfs-actions.pod:4013 ../src/guestfs-actions.pod:4026
24298 #: ../src/guestfs-actions.pod:4040 ../src/guestfs-actions.pod:5041
24299 #: ../src/guestfs-actions.pod:6072 ../src/guestfs-actions.pod:6121
24300 #: ../src/guestfs-actions.pod:7005 ../src/guestfs-actions.pod:7017
24301 #: ../src/guestfs-actions.pod:7030 ../src/guestfs-actions.pod:7043
24302 #: ../src/guestfs-actions.pod:7065 ../src/guestfs-actions.pod:7078
24303 #: ../src/guestfs-actions.pod:7091 ../src/guestfs-actions.pod:7104
24304 #: ../src/guestfs-actions.pod:7898 ../src/guestfs-actions.pod:7917
24305 #: ../src/guestfs-actions.pod:8011 ../src/guestfs-actions.pod:8030
24306 #: ../src/guestfs-actions.pod:8076 ../src/guestfs-actions.pod:8095
24307 msgid "(Added in 1.0.66)"
24311 #: ../src/guestfs-actions.pod:1555
24312 msgid "guestfs_egrepi"
24316 #: ../src/guestfs-actions.pod:1557
24320 " guestfs_egrepi (guestfs_h *g,\n"
24321 " const char *regex,\n"
24322 " const char *path);\n"
24327 #: ../src/guestfs-actions.pod:1574
24328 msgid "guestfs_equal"
24332 #: ../src/guestfs-actions.pod:1576
24336 " guestfs_equal (guestfs_h *g,\n"
24337 " const char *file1,\n"
24338 " const char *file2);\n"
24343 #: ../src/guestfs-actions.pod:1590
24344 msgid "guestfs_exists"
24348 #: ../src/guestfs-actions.pod:1592
24352 " guestfs_exists (guestfs_h *g,\n"
24353 " const char *path);\n"
24358 #: ../src/guestfs-actions.pod:1599
24359 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
24363 #: ../src/guestfs-actions.pod:1605
24364 msgid "guestfs_fallocate"
24368 #: ../src/guestfs-actions.pod:1607
24372 " guestfs_fallocate (guestfs_h *g,\n"
24373 " const char *path,\n"
24379 #: ../src/guestfs-actions.pod:1612
24381 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
24386 #: ../src/guestfs-actions.pod:1631
24387 msgid "guestfs_fallocate64"
24391 #: ../src/guestfs-actions.pod:1633
24395 " guestfs_fallocate64 (guestfs_h *g,\n"
24396 " const char *path,\n"
24402 #: ../src/guestfs-actions.pod:1642
24404 "Note that this call allocates disk blocks for the file. To create a sparse "
24405 "file use C<guestfs_truncate_size> instead."
24409 #: ../src/guestfs-actions.pod:1645
24411 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
24412 "oversight it only allowed 30 bit lengths to be specified, effectively "
24413 "limiting the maximum size of files created through that call to 1GB."
24417 #: ../src/guestfs-actions.pod:1656
24418 msgid "(Added in 1.3.17)"
24422 #: ../src/guestfs-actions.pod:1658
24423 msgid "guestfs_fgrep"
24427 #: ../src/guestfs-actions.pod:1660
24431 " guestfs_fgrep (guestfs_h *g,\n"
24432 " const char *pattern,\n"
24433 " const char *path);\n"
24438 #: ../src/guestfs-actions.pod:1677
24439 msgid "guestfs_fgrepi"
24443 #: ../src/guestfs-actions.pod:1679
24447 " guestfs_fgrepi (guestfs_h *g,\n"
24448 " const char *pattern,\n"
24449 " const char *path);\n"
24454 #: ../src/guestfs-actions.pod:1696
24455 msgid "guestfs_file"
24459 #: ../src/guestfs-actions.pod:1698
24463 " guestfs_file (guestfs_h *g,\n"
24464 " const char *path);\n"
24469 #: ../src/guestfs-actions.pod:1716
24471 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
24472 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
24476 #: ../src/guestfs-actions.pod:1724
24477 msgid "guestfs_file_architecture"
24481 #: ../src/guestfs-actions.pod:1726
24485 " guestfs_file_architecture (guestfs_h *g,\n"
24486 " const char *filename);\n"
24491 #: ../src/guestfs-actions.pod:1834 ../src/guestfs-actions.pod:1997
24492 #: ../src/guestfs-actions.pod:2014 ../src/guestfs-actions.pod:2746
24493 #: ../src/guestfs-actions.pod:2840 ../src/guestfs-actions.pod:2906
24494 #: ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3111
24495 #: ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:3226
24496 #: ../src/guestfs-actions.pod:3319 ../src/guestfs-actions.pod:3556
24497 #: ../src/guestfs-actions.pod:3688
24498 msgid "(Added in 1.5.3)"
24502 #: ../src/guestfs-actions.pod:1836
24503 msgid "guestfs_filesize"
24507 #: ../src/guestfs-actions.pod:1838
24511 " guestfs_filesize (guestfs_h *g,\n"
24512 " const char *file);\n"
24517 #: ../src/guestfs-actions.pod:1844
24519 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
24520 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
24521 "devices, use C<guestfs_blockdev_getsize64>."
24525 #: ../src/guestfs-actions.pod:1850
24526 msgid "(Added in 1.0.82)"
24530 #: ../src/guestfs-actions.pod:1852
24531 msgid "guestfs_fill"
24535 #: ../src/guestfs-actions.pod:1854
24539 " guestfs_fill (guestfs_h *g,\n"
24542 " const char *path);\n"
24547 #: ../src/guestfs-actions.pod:1864
24549 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
24550 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
24551 "bytes use C<guestfs_fill_pattern>."
24555 #: ../src/guestfs-actions.pod:1876
24556 msgid "(Added in 1.0.79)"
24560 #: ../src/guestfs-actions.pod:1878
24561 msgid "guestfs_fill_pattern"
24565 #: ../src/guestfs-actions.pod:1880
24569 " guestfs_fill_pattern (guestfs_h *g,\n"
24570 " const char *pattern,\n"
24572 " const char *path);\n"
24577 #: ../src/guestfs-actions.pod:1886
24579 "This function is like C<guestfs_fill> except that it creates a new file of "
24580 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
24581 "pattern is truncated if necessary to ensure the length of the file is "
24582 "exactly C<len> bytes."
24586 #: ../src/guestfs-actions.pod:1898
24587 msgid "(Added in 1.3.12)"
24591 #: ../src/guestfs-actions.pod:1900
24592 msgid "guestfs_find"
24596 #: ../src/guestfs-actions.pod:1902
24600 " guestfs_find (guestfs_h *g,\n"
24601 " const char *directory);\n"
24606 #: ../src/guestfs-actions.pod:1918
24608 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
24612 #: ../src/guestfs-actions.pod:1931
24613 msgid "See also C<guestfs_find0>."
24617 #: ../src/guestfs-actions.pod:1940 ../src/guestfs-actions.pod:4446
24618 #: ../src/guestfs-actions.pod:6156
24619 msgid "(Added in 1.0.27)"
24623 #: ../src/guestfs-actions.pod:1942
24624 msgid "guestfs_find0"
24628 #: ../src/guestfs-actions.pod:1944
24632 " guestfs_find0 (guestfs_h *g,\n"
24633 " const char *directory,\n"
24634 " const char *files);\n"
24639 #: ../src/guestfs-actions.pod:1953
24641 "This command works the same way as C<guestfs_find> with the following "
24646 #: ../src/guestfs-actions.pod:1980
24647 msgid "(Added in 1.0.74)"
24651 #: ../src/guestfs-actions.pod:1982
24652 msgid "guestfs_findfs_label"
24656 #: ../src/guestfs-actions.pod:1984
24660 " guestfs_findfs_label (guestfs_h *g,\n"
24661 " const char *label);\n"
24666 #: ../src/guestfs-actions.pod:1992
24667 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
24671 #: ../src/guestfs-actions.pod:1999
24672 msgid "guestfs_findfs_uuid"
24676 #: ../src/guestfs-actions.pod:2001
24680 " guestfs_findfs_uuid (guestfs_h *g,\n"
24681 " const char *uuid);\n"
24686 #: ../src/guestfs-actions.pod:2009
24687 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
24691 #: ../src/guestfs-actions.pod:2016
24692 msgid "guestfs_fsck"
24696 #: ../src/guestfs-actions.pod:2018
24700 " guestfs_fsck (guestfs_h *g,\n"
24701 " const char *fstype,\n"
24702 " const char *device);\n"
24707 #: ../src/guestfs-actions.pod:2053 ../src/guestfs-actions.pod:7945
24708 msgid "(Added in 1.0.16)"
24712 #: ../src/guestfs-actions.pod:2055
24713 msgid "guestfs_get_append"
24717 #: ../src/guestfs-actions.pod:2057
24721 " guestfs_get_append (guestfs_h *g);\n"
24726 #: ../src/guestfs-actions.pod:2065
24728 "This function returns a string which may be NULL. There is no way to return "
24729 "an error from this function. The string is owned by the guest handle and "
24730 "must I<not> be freed."
24734 #: ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:5834
24735 #: ../src/guestfs-actions.pod:6316 ../src/guestfs-actions.pod:6772
24736 #: ../src/guestfs-actions.pod:6791 ../src/guestfs-actions.pod:6807
24737 #: ../src/guestfs-actions.pod:6831 ../src/guestfs-actions.pod:7585
24738 #: ../src/guestfs-actions.pod:7600 ../src/guestfs-actions.pod:7992
24739 msgid "(Added in 1.0.26)"
24743 #: ../src/guestfs-actions.pod:2071
24744 msgid "guestfs_get_attach_method"
24748 #: ../src/guestfs-actions.pod:2073
24752 " guestfs_get_attach_method (guestfs_h *g);\n"
24757 #: ../src/guestfs-actions.pod:2076
24758 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
24762 #: ../src/guestfs-actions.pod:2081 ../src/guestfs-actions.pod:6346
24763 msgid "(Added in 1.9.8)"
24767 #: ../src/guestfs-actions.pod:2083
24768 msgid "guestfs_get_autosync"
24772 #: ../src/guestfs-actions.pod:2085
24776 " guestfs_get_autosync (guestfs_h *g);\n"
24781 #: ../src/guestfs-actions.pod:2094
24782 msgid "guestfs_get_direct"
24786 #: ../src/guestfs-actions.pod:2096
24790 " guestfs_get_direct (guestfs_h *g);\n"
24795 #: ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:6387
24796 msgid "(Added in 1.0.72)"
24800 #: ../src/guestfs-actions.pod:2105
24801 msgid "guestfs_get_e2label"
24805 #: ../src/guestfs-actions.pod:2107
24809 " guestfs_get_e2label (guestfs_h *g,\n"
24810 " const char *device);\n"
24815 #: ../src/guestfs-actions.pod:2111
24817 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
24822 #: ../src/guestfs-actions.pod:2124 ../src/guestfs-actions.pod:2145
24823 #: ../src/guestfs-actions.pod:6405 ../src/guestfs-actions.pod:6424
24824 msgid "(Added in 1.0.15)"
24828 #: ../src/guestfs-actions.pod:2126
24829 msgid "guestfs_get_e2uuid"
24833 #: ../src/guestfs-actions.pod:2128
24837 " guestfs_get_e2uuid (guestfs_h *g,\n"
24838 " const char *device);\n"
24843 #: ../src/guestfs-actions.pod:2132
24845 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
24850 #: ../src/guestfs-actions.pod:2147
24851 msgid "guestfs_get_memsize"
24855 #: ../src/guestfs-actions.pod:2149
24859 " guestfs_get_memsize (guestfs_h *g);\n"
24864 #: ../src/guestfs-actions.pod:2155
24866 "If C<guestfs_set_memsize> was not called on this handle, and if "
24867 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
24868 "value for memsize."
24872 #: ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:4737
24873 #: ../src/guestfs-actions.pod:4946 ../src/guestfs-actions.pod:4965
24874 #: ../src/guestfs-actions.pod:4984 ../src/guestfs-actions.pod:4996
24875 #: ../src/guestfs-actions.pod:5013 ../src/guestfs-actions.pod:5026
24876 #: ../src/guestfs-actions.pod:6059 ../src/guestfs-actions.pod:6445
24877 #: ../src/guestfs-actions.pod:6739 ../src/guestfs-actions.pod:7354
24878 msgid "(Added in 1.0.55)"
24882 #: ../src/guestfs-actions.pod:2166
24883 msgid "guestfs_get_network"
24887 #: ../src/guestfs-actions.pod:2168
24891 " guestfs_get_network (guestfs_h *g);\n"
24896 #: ../src/guestfs-actions.pod:2175 ../src/guestfs-actions.pod:6464
24897 msgid "(Added in 1.5.4)"
24901 #: ../src/guestfs-actions.pod:2177
24902 msgid "guestfs_get_path"
24906 #: ../src/guestfs-actions.pod:2179
24910 " guestfs_get_path (guestfs_h *g);\n"
24915 #: ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2227
24917 "This function returns a string, or NULL on error. The string is owned by "
24918 "the guest handle and must I<not> be freed."
24922 #: ../src/guestfs-actions.pod:2192
24923 msgid "guestfs_get_pgroup"
24927 #: ../src/guestfs-actions.pod:2194
24931 " guestfs_get_pgroup (guestfs_h *g);\n"
24936 #: ../src/guestfs-actions.pod:2201 ../src/guestfs-actions.pod:6500
24937 #: ../src/guestfs-actions.pod:7846
24938 msgid "(Added in 1.11.18)"
24942 #: ../src/guestfs-actions.pod:2203
24943 msgid "guestfs_get_pid"
24947 #: ../src/guestfs-actions.pod:2205
24951 " guestfs_get_pid (guestfs_h *g);\n"
24956 #: ../src/guestfs-actions.pod:2215
24957 msgid "(Added in 1.0.56)"
24961 #: ../src/guestfs-actions.pod:2217
24962 msgid "guestfs_get_qemu"
24966 #: ../src/guestfs-actions.pod:2219
24970 " guestfs_get_qemu (guestfs_h *g);\n"
24975 #: ../src/guestfs-actions.pod:2230 ../src/guestfs-actions.pod:6528
24976 msgid "(Added in 1.0.6)"
24980 #: ../src/guestfs-actions.pod:2232
24981 msgid "guestfs_get_recovery_proc"
24985 #: ../src/guestfs-actions.pod:2234
24989 " guestfs_get_recovery_proc (guestfs_h *g);\n"
24994 #: ../src/guestfs-actions.pod:2241 ../src/guestfs-actions.pod:3810
24995 #: ../src/guestfs-actions.pod:4141 ../src/guestfs-actions.pod:4544
24996 #: ../src/guestfs-actions.pod:4576 ../src/guestfs-actions.pod:5764
24997 #: ../src/guestfs-actions.pod:6107 ../src/guestfs-actions.pod:6552
24998 #: ../src/guestfs-actions.pod:7257 ../src/guestfs-actions.pod:7277
24999 #: ../src/guestfs-actions.pod:7469
25000 msgid "(Added in 1.0.77)"
25004 #: ../src/guestfs-actions.pod:2243
25005 msgid "guestfs_get_selinux"
25009 #: ../src/guestfs-actions.pod:2245
25013 " guestfs_get_selinux (guestfs_h *g);\n"
25018 #: ../src/guestfs-actions.pod:2248
25020 "This returns the current setting of the selinux flag which is passed to the "
25021 "appliance at boot time. See C<guestfs_set_selinux>."
25025 #: ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2328
25026 #: ../src/guestfs-actions.pod:6571 ../src/guestfs-actions.pod:6643
25027 msgid "(Added in 1.0.67)"
25031 #: ../src/guestfs-actions.pod:2258
25032 msgid "guestfs_get_smp"
25036 #: ../src/guestfs-actions.pod:2260
25040 " guestfs_get_smp (guestfs_h *g);\n"
25045 #: ../src/guestfs-actions.pod:2267
25046 msgid "guestfs_get_state"
25050 #: ../src/guestfs-actions.pod:2269
25054 " guestfs_get_state (guestfs_h *g);\n"
25059 #: ../src/guestfs-actions.pod:2281
25060 msgid "guestfs_get_trace"
25064 #: ../src/guestfs-actions.pod:2283
25068 " guestfs_get_trace (guestfs_h *g);\n"
25073 #: ../src/guestfs-actions.pod:2292
25074 msgid "guestfs_get_umask"
25078 #: ../src/guestfs-actions.pod:2294
25082 " guestfs_get_umask (guestfs_h *g);\n"
25087 #: ../src/guestfs-actions.pod:2297
25089 "Return the current umask. By default the umask is C<022> unless it has been "
25090 "set by calling C<guestfs_umask>."
25094 #: ../src/guestfs-actions.pod:2304
25095 msgid "guestfs_get_verbose"
25099 #: ../src/guestfs-actions.pod:2306
25103 " guestfs_get_verbose (guestfs_h *g);\n"
25108 #: ../src/guestfs-actions.pod:2315
25109 msgid "guestfs_getcon"
25113 #: ../src/guestfs-actions.pod:2317
25117 " guestfs_getcon (guestfs_h *g);\n"
25122 #: ../src/guestfs-actions.pod:2322
25124 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
25128 #: ../src/guestfs-actions.pod:2330
25129 msgid "guestfs_getxattr"
25133 #: ../src/guestfs-actions.pod:2332
25137 " guestfs_getxattr (guestfs_h *g,\n"
25138 " const char *path,\n"
25139 " const char *name,\n"
25140 " size_t *size_r);\n"
25145 #: ../src/guestfs-actions.pod:2338
25147 "Get a single extended attribute from file C<path> named C<name>. This call "
25148 "follows symlinks. If you want to lookup an extended attribute for the "
25149 "symlink itself, use C<guestfs_lgetxattr>."
25153 #: ../src/guestfs-actions.pod:2342 ../src/guestfs-actions.pod:3824
25155 "Normally it is better to get all extended attributes from a file in one go "
25156 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
25157 "implementations are buggy and do not provide a way to list out attributes. "
25158 "For these filesystems (notably ntfs-3g) you have to know the names of the "
25159 "extended attributes you want in advance and call this function."
25163 #: ../src/guestfs-actions.pod:2352
25164 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
25168 #: ../src/guestfs-actions.pod:2354 ../src/guestfs-actions.pod:2567
25169 #: ../src/guestfs-actions.pod:3041 ../src/guestfs-actions.pod:3836
25170 #: ../src/guestfs-actions.pod:5757 ../src/guestfs-actions.pod:5783
25171 #: ../src/guestfs-actions.pod:5964
25173 "This function returns a buffer, or NULL on error. The size of the returned "
25174 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
25179 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:3840
25180 msgid "(Added in 1.7.24)"
25184 #: ../src/guestfs-actions.pod:2360
25185 msgid "guestfs_getxattrs"
25189 #: ../src/guestfs-actions.pod:2362
25192 " struct guestfs_xattr_list *\n"
25193 " guestfs_getxattrs (guestfs_h *g,\n"
25194 " const char *path);\n"
25199 #: ../src/guestfs-actions.pod:2372
25200 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
25204 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:3852
25205 #: ../src/guestfs-actions.pod:4540
25207 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
25208 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
25212 #: ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:3856
25213 #: ../src/guestfs-actions.pod:4055 ../src/guestfs-actions.pod:4091
25214 #: ../src/guestfs-actions.pod:6137 ../src/guestfs-actions.pod:6662
25215 #: ../src/guestfs-actions.pod:8057
25216 msgid "(Added in 1.0.59)"
25220 #: ../src/guestfs-actions.pod:2380
25221 msgid "guestfs_glob_expand"
25225 #: ../src/guestfs-actions.pod:2382
25229 " guestfs_glob_expand (guestfs_h *g,\n"
25230 " const char *pattern);\n"
25235 #: ../src/guestfs-actions.pod:2401 ../src/guestfs-actions.pod:6855
25236 #: ../src/guestfs-actions.pod:6872
25237 msgid "(Added in 1.0.50)"
25241 #: ../src/guestfs-actions.pod:2403
25242 msgid "guestfs_grep"
25246 #: ../src/guestfs-actions.pod:2405
25250 " guestfs_grep (guestfs_h *g,\n"
25251 " const char *regex,\n"
25252 " const char *path);\n"
25257 #: ../src/guestfs-actions.pod:2422
25258 msgid "guestfs_grepi"
25262 #: ../src/guestfs-actions.pod:2424
25266 " guestfs_grepi (guestfs_h *g,\n"
25267 " const char *regex,\n"
25268 " const char *path);\n"
25273 #: ../src/guestfs-actions.pod:2441
25274 msgid "guestfs_grub_install"
25278 #: ../src/guestfs-actions.pod:2443
25282 " guestfs_grub_install (guestfs_h *g,\n"
25283 " const char *root,\n"
25284 " const char *device);\n"
25289 #: ../src/guestfs-actions.pod:2486
25290 msgid "(Added in 1.0.17)"
25294 #: ../src/guestfs-actions.pod:2488
25295 msgid "guestfs_head"
25299 #: ../src/guestfs-actions.pod:2490
25303 " guestfs_head (guestfs_h *g,\n"
25304 " const char *path);\n"
25309 #: ../src/guestfs-actions.pod:2506
25310 msgid "guestfs_head_n"
25314 #: ../src/guestfs-actions.pod:2508
25318 " guestfs_head_n (guestfs_h *g,\n"
25320 " const char *path);\n"
25325 #: ../src/guestfs-actions.pod:2530
25326 msgid "guestfs_hexdump"
25330 #: ../src/guestfs-actions.pod:2532
25334 " guestfs_hexdump (guestfs_h *g,\n"
25335 " const char *path);\n"
25340 #: ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:6936
25341 #: ../src/guestfs-actions.pod:6991
25342 msgid "(Added in 1.0.22)"
25346 #: ../src/guestfs-actions.pod:2547
25347 msgid "guestfs_initrd_cat"
25351 #: ../src/guestfs-actions.pod:2549
25355 " guestfs_initrd_cat (guestfs_h *g,\n"
25356 " const char *initrdpath,\n"
25357 " const char *filename,\n"
25358 " size_t *size_r);\n"
25363 #: ../src/guestfs-actions.pod:2565
25364 msgid "See also C<guestfs_initrd_list>."
25368 #: ../src/guestfs-actions.pod:2576
25369 msgid "guestfs_initrd_list"
25373 #: ../src/guestfs-actions.pod:2578
25377 " guestfs_initrd_list (guestfs_h *g,\n"
25378 " const char *path);\n"
25383 #: ../src/guestfs-actions.pod:2598
25384 msgid "guestfs_inotify_add_watch"
25388 #: ../src/guestfs-actions.pod:2600
25392 " guestfs_inotify_add_watch (guestfs_h *g,\n"
25393 " const char *path,\n"
25399 #: ../src/guestfs-actions.pod:2619
25400 msgid "guestfs_inotify_close"
25404 #: ../src/guestfs-actions.pod:2621
25408 " guestfs_inotify_close (guestfs_h *g);\n"
25413 #: ../src/guestfs-actions.pod:2632
25414 msgid "guestfs_inotify_files"
25418 #: ../src/guestfs-actions.pod:2634
25422 " guestfs_inotify_files (guestfs_h *g);\n"
25427 #: ../src/guestfs-actions.pod:2637
25429 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
25430 "returns a list of pathnames of objects that were touched. The returned "
25431 "pathnames are sorted and deduplicated."
25435 #: ../src/guestfs-actions.pod:2647
25436 msgid "guestfs_inotify_init"
25440 #: ../src/guestfs-actions.pod:2649
25444 " guestfs_inotify_init (guestfs_h *g,\n"
25445 " int maxevents);\n"
25450 #: ../src/guestfs-actions.pod:2657
25452 "C<maxevents> is the maximum number of events which will be queued up between "
25453 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
25454 "passed as C<0>, then the kernel (or previously set) default is used. For "
25455 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
25456 "throws away events, but records the fact that it threw them away by setting "
25457 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
25458 "C<guestfs_inotify_read>)."
25462 #: ../src/guestfs-actions.pod:2667
25464 "Before any events are generated, you have to add some watches to the "
25465 "internal watch list. See: C<guestfs_inotify_add_watch>, "
25466 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
25470 #: ../src/guestfs-actions.pod:2673
25472 "Queued up events should be read periodically by calling "
25473 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
25474 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
25475 "often enough then you risk the internal queue overflowing."
25479 #: ../src/guestfs-actions.pod:2680
25481 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
25482 "This also removes any watches automatically."
25486 #: ../src/guestfs-actions.pod:2693
25487 msgid "guestfs_inotify_read"
25491 #: ../src/guestfs-actions.pod:2695
25494 " struct guestfs_inotify_event_list *\n"
25495 " guestfs_inotify_read (guestfs_h *g);\n"
25500 #: ../src/guestfs-actions.pod:2709
25502 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
25503 "there was an error. I<The caller must call "
25504 "C<guestfs_free_inotify_event_list> after use>."
25508 #: ../src/guestfs-actions.pod:2715
25509 msgid "guestfs_inotify_rm_watch"
25513 #: ../src/guestfs-actions.pod:2717
25517 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
25523 #: ../src/guestfs-actions.pod:2721
25525 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
25529 #: ../src/guestfs-actions.pod:2728
25530 msgid "guestfs_inspect_get_arch"
25534 #: ../src/guestfs-actions.pod:2730
25538 " guestfs_inspect_get_arch (guestfs_h *g,\n"
25539 " const char *root);\n"
25544 #: ../src/guestfs-actions.pod:2734
25546 "This returns the architecture of the inspected operating system. The "
25547 "possible return values are listed under C<guestfs_file_architecture>."
25551 #: ../src/guestfs-actions.pod:2748
25552 msgid "guestfs_inspect_get_distro"
25556 #: ../src/guestfs-actions.pod:2750
25560 " guestfs_inspect_get_distro (guestfs_h *g,\n"
25561 " const char *root);\n"
25566 #: ../src/guestfs-actions.pod:2842
25567 msgid "guestfs_inspect_get_drive_mappings"
25571 #: ../src/guestfs-actions.pod:2844
25575 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
25576 " const char *root);\n"
25581 #: ../src/guestfs-actions.pod:2873
25583 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25584 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
25588 #: ../src/guestfs-actions.pod:2877 ../src/guestfs-actions.pod:3145
25589 #: ../src/guestfs-actions.pod:3943 ../src/guestfs-actions.pod:5225
25590 #: ../src/guestfs-actions.pod:7293
25592 "This function returns a NULL-terminated array of strings, or NULL if there "
25593 "was an error. The array of strings will always have length C<2n+1>, where "
25594 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
25595 "caller must free the strings and the array after use>."
25599 #: ../src/guestfs-actions.pod:2883 ../src/guestfs-actions.pod:3339
25600 msgid "(Added in 1.9.17)"
25604 #: ../src/guestfs-actions.pod:2885
25605 msgid "guestfs_inspect_get_filesystems"
25609 #: ../src/guestfs-actions.pod:2887
25613 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
25614 " const char *root);\n"
25619 #: ../src/guestfs-actions.pod:2899
25621 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25622 "C<guestfs_inspect_get_mountpoints>."
25626 #: ../src/guestfs-actions.pod:2908
25627 msgid "guestfs_inspect_get_format"
25631 #: ../src/guestfs-actions.pod:2910
25635 " guestfs_inspect_get_format (guestfs_h *g,\n"
25636 " const char *root);\n"
25641 #: ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:3375
25642 #: ../src/guestfs-actions.pod:3391 ../src/guestfs-actions.pod:3409
25643 #: ../src/guestfs-actions.pod:6175
25644 msgid "(Added in 1.9.4)"
25648 #: ../src/guestfs-actions.pod:2946
25649 msgid "guestfs_inspect_get_hostname"
25653 #: ../src/guestfs-actions.pod:2948
25657 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
25658 " const char *root);\n"
25663 #: ../src/guestfs-actions.pod:2963
25664 msgid "(Added in 1.7.9)"
25668 #: ../src/guestfs-actions.pod:2965
25669 msgid "guestfs_inspect_get_icon"
25673 #: ../src/guestfs-actions.pod:2967
25677 " guestfs_inspect_get_icon (guestfs_h *g,\n"
25678 " const char *root,\n"
25679 " size_t *size_r,\n"
25685 #: ../src/guestfs-actions.pod:2978
25688 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
25689 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
25694 #: ../src/guestfs-actions.pod:3045 ../src/guestfs-actions.pod:3870
25695 #: ../src/guestfs-actions.pod:5124
25696 msgid "(Added in 1.11.12)"
25700 #: ../src/guestfs-actions.pod:3047
25701 msgid "guestfs_inspect_get_icon_va"
25705 #: ../src/guestfs-actions.pod:3049
25709 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
25710 " const char *root,\n"
25711 " size_t *size_r,\n"
25712 " va_list args);\n"
25717 #: ../src/guestfs-actions.pod:3055
25718 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
25722 #: ../src/guestfs-actions.pod:3059
25723 msgid "guestfs_inspect_get_icon_argv"
25727 #: ../src/guestfs-actions.pod:3061
25731 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
25732 " const char *root,\n"
25733 " size_t *size_r,\n"
25734 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
25739 #: ../src/guestfs-actions.pod:3067
25740 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
25744 #: ../src/guestfs-actions.pod:3071
25745 msgid "guestfs_inspect_get_major_version"
25749 #: ../src/guestfs-actions.pod:3073
25753 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
25754 " const char *root);\n"
25759 #: ../src/guestfs-actions.pod:3095
25760 msgid "guestfs_inspect_get_minor_version"
25764 #: ../src/guestfs-actions.pod:3097
25768 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
25769 " const char *root);\n"
25774 #: ../src/guestfs-actions.pod:3106
25776 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25777 "C<guestfs_inspect_get_major_version>."
25781 #: ../src/guestfs-actions.pod:3113
25782 msgid "guestfs_inspect_get_mountpoints"
25786 #: ../src/guestfs-actions.pod:3115
25790 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
25791 " const char *root);\n"
25796 #: ../src/guestfs-actions.pod:3136
25798 "For operating systems like Windows which still use drive letters, this call "
25799 "will only return an entry for the first drive \"mounted on\" C</>. For "
25800 "information about the mapping of drive letters to partitions, see "
25801 "C<guestfs_inspect_get_drive_mappings>."
25805 #: ../src/guestfs-actions.pod:3142
25807 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25808 "C<guestfs_inspect_get_filesystems>."
25812 #: ../src/guestfs-actions.pod:3153
25813 msgid "guestfs_inspect_get_package_format"
25817 #: ../src/guestfs-actions.pod:3155
25821 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
25822 " const char *root);\n"
25827 #: ../src/guestfs-actions.pod:3159
25829 "This function and C<guestfs_inspect_get_package_management> return the "
25830 "package format and package management tool used by the inspected operating "
25831 "system. For example for Fedora these functions would return C<rpm> (package "
25832 "format) and C<yum> (package management)."
25836 #: ../src/guestfs-actions.pod:3177 ../src/guestfs-actions.pod:3205
25837 msgid "(Added in 1.7.5)"
25841 #: ../src/guestfs-actions.pod:3179
25842 msgid "guestfs_inspect_get_package_management"
25846 #: ../src/guestfs-actions.pod:3181
25850 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
25851 " const char *root);\n"
25856 #: ../src/guestfs-actions.pod:3185
25858 "C<guestfs_inspect_get_package_format> and this function return the package "
25859 "format and package management tool used by the inspected operating system. "
25860 "For example for Fedora these functions would return C<rpm> (package format) "
25861 "and C<yum> (package management)."
25865 #: ../src/guestfs-actions.pod:3207
25866 msgid "guestfs_inspect_get_product_name"
25870 #: ../src/guestfs-actions.pod:3209
25874 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
25875 " const char *root);\n"
25880 #: ../src/guestfs-actions.pod:3228
25881 msgid "guestfs_inspect_get_product_variant"
25885 #: ../src/guestfs-actions.pod:3230
25889 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
25890 " const char *root);\n"
25895 #: ../src/guestfs-actions.pod:3253
25897 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25898 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
25902 #: ../src/guestfs-actions.pod:3260
25903 msgid "(Added in 1.9.13)"
25907 #: ../src/guestfs-actions.pod:3262
25908 msgid "guestfs_inspect_get_roots"
25912 #: ../src/guestfs-actions.pod:3264
25916 " guestfs_inspect_get_roots (guestfs_h *g);\n"
25921 #: ../src/guestfs-actions.pod:3267
25923 "This function is a convenient way to get the list of root devices, as "
25924 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
25925 "the whole inspection process."
25929 #: ../src/guestfs-actions.pod:3271
25931 "This returns an empty list if either no root devices were found or the "
25932 "caller has not called C<guestfs_inspect_os>."
25936 #: ../src/guestfs-actions.pod:3280
25937 msgid "(Added in 1.7.3)"
25941 #: ../src/guestfs-actions.pod:3282
25942 msgid "guestfs_inspect_get_type"
25946 #: ../src/guestfs-actions.pod:3284
25950 " guestfs_inspect_get_type (guestfs_h *g,\n"
25951 " const char *root);\n"
25956 #: ../src/guestfs-actions.pod:3321
25957 msgid "guestfs_inspect_get_windows_current_control_set"
25961 #: ../src/guestfs-actions.pod:3323
25965 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
25966 " const char *root);\n"
25971 #: ../src/guestfs-actions.pod:3341
25972 msgid "guestfs_inspect_get_windows_systemroot"
25976 #: ../src/guestfs-actions.pod:3343
25980 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
25981 " const char *root);\n"
25986 #: ../src/guestfs-actions.pod:3359
25987 msgid "(Added in 1.5.25)"
25991 #: ../src/guestfs-actions.pod:3361
25992 msgid "guestfs_inspect_is_live"
25996 #: ../src/guestfs-actions.pod:3363
26000 " guestfs_inspect_is_live (guestfs_h *g,\n"
26001 " const char *root);\n"
26006 #: ../src/guestfs-actions.pod:3367
26008 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
26009 "disk), then this returns true if a live image was detected on the disk."
26013 #: ../src/guestfs-actions.pod:3377
26014 msgid "guestfs_inspect_is_multipart"
26018 #: ../src/guestfs-actions.pod:3379
26022 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
26023 " const char *root);\n"
26028 #: ../src/guestfs-actions.pod:3383
26030 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
26031 "disk), then this returns true if the disk is part of a set."
26035 #: ../src/guestfs-actions.pod:3393
26036 msgid "guestfs_inspect_is_netinst"
26040 #: ../src/guestfs-actions.pod:3395
26044 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
26045 " const char *root);\n"
26050 #: ../src/guestfs-actions.pod:3399
26052 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
26053 "disk), then this returns true if the disk is a network installer, ie. not a "
26054 "self-contained install CD but one which is likely to require network access "
26055 "to complete the install."
26059 #: ../src/guestfs-actions.pod:3411
26060 msgid "guestfs_inspect_list_applications"
26064 #: ../src/guestfs-actions.pod:3413
26067 " struct guestfs_application_list *\n"
26068 " guestfs_inspect_list_applications (guestfs_h *g,\n"
26069 " const char *root);\n"
26074 #: ../src/guestfs-actions.pod:3419
26076 "I<Note:> This call works differently from other parts of the inspection "
26077 "API. You have to call C<guestfs_inspect_os>, then "
26078 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
26079 "this. Listing applications is a significantly more difficult operation "
26080 "which requires access to the full filesystem. Also note that unlike the "
26081 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
26082 "the libguestfs handle, this call actually reads parts of the mounted "
26083 "filesystems during the call."
26087 #: ../src/guestfs-actions.pod:3509
26089 "This function returns a C<struct guestfs_application_list *>, or NULL if "
26090 "there was an error. I<The caller must call C<guestfs_free_application_list> "
26095 #: ../src/guestfs-actions.pod:3513
26096 msgid "(Added in 1.7.8)"
26100 #: ../src/guestfs-actions.pod:3515
26101 msgid "guestfs_inspect_os"
26105 #: ../src/guestfs-actions.pod:3517
26109 " guestfs_inspect_os (guestfs_h *g);\n"
26114 #: ../src/guestfs-actions.pod:3533
26116 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
26117 "functions in order to query further information about each operating system, "
26118 "such as the name and version."
26122 #: ../src/guestfs-actions.pod:3538
26124 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
26125 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
26126 "the contents. This should be called with no disks currently mounted. The "
26127 "function may also use Augeas, so any existing Augeas handle will be closed."
26131 #: ../src/guestfs-actions.pod:3550 ../src/guestfs-actions.pod:3881
26132 #: ../src/guestfs-actions.pod:3963
26133 msgid "See also C<guestfs_list_filesystems>."
26137 #: ../src/guestfs-actions.pod:3558
26138 msgid "guestfs_is_blockdev"
26142 #: ../src/guestfs-actions.pod:3560
26146 " guestfs_is_blockdev (guestfs_h *g,\n"
26147 " const char *path);\n"
26152 #: ../src/guestfs-actions.pod:3567 ../src/guestfs-actions.pod:3596
26153 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:3641
26154 #: ../src/guestfs-actions.pod:3657 ../src/guestfs-actions.pod:3713
26155 #: ../src/guestfs-actions.pod:3728
26156 msgid "See also C<guestfs_stat>."
26160 #: ../src/guestfs-actions.pod:3571 ../src/guestfs-actions.pod:3600
26161 #: ../src/guestfs-actions.pod:3645 ../src/guestfs-actions.pod:3717
26162 #: ../src/guestfs-actions.pod:3732
26163 msgid "(Added in 1.5.10)"
26167 #: ../src/guestfs-actions.pod:3573
26168 msgid "guestfs_is_busy"
26172 #: ../src/guestfs-actions.pod:3575
26176 " guestfs_is_busy (guestfs_h *g);\n"
26181 #: ../src/guestfs-actions.pod:3587
26182 msgid "guestfs_is_chardev"
26186 #: ../src/guestfs-actions.pod:3589
26190 " guestfs_is_chardev (guestfs_h *g,\n"
26191 " const char *path);\n"
26196 #: ../src/guestfs-actions.pod:3602
26197 msgid "guestfs_is_config"
26201 #: ../src/guestfs-actions.pod:3604
26205 " guestfs_is_config (guestfs_h *g);\n"
26210 #: ../src/guestfs-actions.pod:3616
26211 msgid "guestfs_is_dir"
26215 #: ../src/guestfs-actions.pod:3618
26219 " guestfs_is_dir (guestfs_h *g,\n"
26220 " const char *path);\n"
26225 #: ../src/guestfs-actions.pod:3632
26226 msgid "guestfs_is_fifo"
26230 #: ../src/guestfs-actions.pod:3634
26234 " guestfs_is_fifo (guestfs_h *g,\n"
26235 " const char *path);\n"
26240 #: ../src/guestfs-actions.pod:3647
26241 msgid "guestfs_is_file"
26245 #: ../src/guestfs-actions.pod:3649
26249 " guestfs_is_file (guestfs_h *g,\n"
26250 " const char *path);\n"
26255 #: ../src/guestfs-actions.pod:3663
26256 msgid "guestfs_is_launching"
26260 #: ../src/guestfs-actions.pod:3665
26264 " guestfs_is_launching (guestfs_h *g);\n"
26269 #: ../src/guestfs-actions.pod:3677
26270 msgid "guestfs_is_lv"
26274 #: ../src/guestfs-actions.pod:3679
26278 " guestfs_is_lv (guestfs_h *g,\n"
26279 " const char *device);\n"
26284 #: ../src/guestfs-actions.pod:3690
26285 msgid "guestfs_is_ready"
26289 #: ../src/guestfs-actions.pod:3692
26293 " guestfs_is_ready (guestfs_h *g);\n"
26298 #: ../src/guestfs-actions.pod:3704
26299 msgid "guestfs_is_socket"
26303 #: ../src/guestfs-actions.pod:3706
26307 " guestfs_is_socket (guestfs_h *g,\n"
26308 " const char *path);\n"
26313 #: ../src/guestfs-actions.pod:3719
26314 msgid "guestfs_is_symlink"
26318 #: ../src/guestfs-actions.pod:3721
26322 " guestfs_is_symlink (guestfs_h *g,\n"
26323 " const char *path);\n"
26328 #: ../src/guestfs-actions.pod:3734
26329 msgid "guestfs_is_zero"
26333 #: ../src/guestfs-actions.pod:3736
26337 " guestfs_is_zero (guestfs_h *g,\n"
26338 " const char *path);\n"
26343 #: ../src/guestfs-actions.pod:3745 ../src/guestfs-actions.pod:3759
26344 msgid "(Added in 1.11.8)"
26348 #: ../src/guestfs-actions.pod:3747
26349 msgid "guestfs_is_zero_device"
26353 #: ../src/guestfs-actions.pod:3749
26357 " guestfs_is_zero_device (guestfs_h *g,\n"
26358 " const char *device);\n"
26363 #: ../src/guestfs-actions.pod:3761
26364 msgid "guestfs_kill_subprocess"
26368 #: ../src/guestfs-actions.pod:3763
26372 " guestfs_kill_subprocess (guestfs_h *g);\n"
26377 #: ../src/guestfs-actions.pod:3772
26378 msgid "guestfs_launch"
26382 #: ../src/guestfs-actions.pod:3774
26386 " guestfs_launch (guestfs_h *g);\n"
26391 #: ../src/guestfs-actions.pod:3792
26392 msgid "guestfs_lchown"
26396 #: ../src/guestfs-actions.pod:3794
26400 " guestfs_lchown (guestfs_h *g,\n"
26403 " const char *path);\n"
26408 #: ../src/guestfs-actions.pod:3800
26410 "Change the file owner to C<owner> and group to C<group>. This is like "
26411 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
26412 "changed, not the target."
26416 #: ../src/guestfs-actions.pod:3812
26417 msgid "guestfs_lgetxattr"
26421 #: ../src/guestfs-actions.pod:3814
26425 " guestfs_lgetxattr (guestfs_h *g,\n"
26426 " const char *path,\n"
26427 " const char *name,\n"
26428 " size_t *size_r);\n"
26433 #: ../src/guestfs-actions.pod:3834
26434 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
26438 #: ../src/guestfs-actions.pod:3842
26439 msgid "guestfs_lgetxattrs"
26443 #: ../src/guestfs-actions.pod:3844
26446 " struct guestfs_xattr_list *\n"
26447 " guestfs_lgetxattrs (guestfs_h *g,\n"
26448 " const char *path);\n"
26453 #: ../src/guestfs-actions.pod:3848
26455 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
26456 "then it returns the extended attributes of the link itself."
26460 #: ../src/guestfs-actions.pod:3858
26461 msgid "guestfs_list_9p"
26465 #: ../src/guestfs-actions.pod:3860
26469 " guestfs_list_9p (guestfs_h *g);\n"
26474 #: ../src/guestfs-actions.pod:3872
26475 msgid "guestfs_list_devices"
26479 #: ../src/guestfs-actions.pod:3874
26483 " guestfs_list_devices (guestfs_h *g);\n"
26488 #: ../src/guestfs-actions.pod:3889
26489 msgid "guestfs_list_dm_devices"
26493 #: ../src/guestfs-actions.pod:3891
26497 " guestfs_list_dm_devices (guestfs_h *g);\n"
26502 #: ../src/guestfs-actions.pod:3896
26504 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
26505 "previous call to C<guestfs_luks_open>."
26509 #: ../src/guestfs-actions.pod:3899
26511 "Device mapper devices which correspond to logical volumes are I<not> "
26512 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
26517 #: ../src/guestfs-actions.pod:3907 ../src/guestfs-actions.pod:5363
26518 msgid "(Added in 1.11.15)"
26522 #: ../src/guestfs-actions.pod:3909
26523 msgid "guestfs_list_filesystems"
26527 #: ../src/guestfs-actions.pod:3911
26531 " guestfs_list_filesystems (guestfs_h *g);\n"
26536 #: ../src/guestfs-actions.pod:3931
26538 "This command runs other libguestfs commands, which might include "
26539 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
26540 "soon after launch and only when nothing is mounted."
26544 #: ../src/guestfs-actions.pod:3935
26546 "Not all of the filesystems returned will be mountable. In particular, swap "
26547 "partitions are returned in the list. Also this command does not check that "
26548 "each filesystem found is valid and mountable, and some filesystems might be "
26549 "mountable but require special options. Filesystems may not all belong to a "
26550 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
26554 #: ../src/guestfs-actions.pod:3949 ../src/guestfs-actions.pod:5724
26555 msgid "(Added in 1.5.15)"
26559 #: ../src/guestfs-actions.pod:3951
26560 msgid "guestfs_list_partitions"
26564 #: ../src/guestfs-actions.pod:3953
26568 " guestfs_list_partitions (guestfs_h *g);\n"
26573 #: ../src/guestfs-actions.pod:3960
26575 "This does not return logical volumes. For that you will need to call "
26580 #: ../src/guestfs-actions.pod:3971
26585 #: ../src/guestfs-actions.pod:3973
26589 " guestfs_ll (guestfs_h *g,\n"
26590 " const char *directory);\n"
26595 #: ../src/guestfs-actions.pod:3988
26600 #: ../src/guestfs-actions.pod:3990
26604 " guestfs_ln (guestfs_h *g,\n"
26605 " const char *target,\n"
26606 " const char *linkname);\n"
26611 #: ../src/guestfs-actions.pod:4001
26612 msgid "guestfs_ln_f"
26616 #: ../src/guestfs-actions.pod:4003
26620 " guestfs_ln_f (guestfs_h *g,\n"
26621 " const char *target,\n"
26622 " const char *linkname);\n"
26627 #: ../src/guestfs-actions.pod:4015
26628 msgid "guestfs_ln_s"
26632 #: ../src/guestfs-actions.pod:4017
26636 " guestfs_ln_s (guestfs_h *g,\n"
26637 " const char *target,\n"
26638 " const char *linkname);\n"
26643 #: ../src/guestfs-actions.pod:4028
26644 msgid "guestfs_ln_sf"
26648 #: ../src/guestfs-actions.pod:4030
26652 " guestfs_ln_sf (guestfs_h *g,\n"
26653 " const char *target,\n"
26654 " const char *linkname);\n"
26659 #: ../src/guestfs-actions.pod:4042
26660 msgid "guestfs_lremovexattr"
26664 #: ../src/guestfs-actions.pod:4044
26668 " guestfs_lremovexattr (guestfs_h *g,\n"
26669 " const char *xattr,\n"
26670 " const char *path);\n"
26675 #: ../src/guestfs-actions.pod:4049
26677 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
26678 "link, then it removes an extended attribute of the link itself."
26682 #: ../src/guestfs-actions.pod:4057
26687 #: ../src/guestfs-actions.pod:4059
26691 " guestfs_ls (guestfs_h *g,\n"
26692 " const char *directory);\n"
26697 #: ../src/guestfs-actions.pod:4067
26699 "This command is mostly useful for interactive sessions. Programs should "
26700 "probably use C<guestfs_readdir> instead."
26704 #: ../src/guestfs-actions.pod:4076
26705 msgid "guestfs_lsetxattr"
26709 #: ../src/guestfs-actions.pod:4078
26713 " guestfs_lsetxattr (guestfs_h *g,\n"
26714 " const char *xattr,\n"
26715 " const char *val,\n"
26717 " const char *path);\n"
26722 #: ../src/guestfs-actions.pod:4085
26724 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
26725 "then it sets an extended attribute of the link itself."
26729 #: ../src/guestfs-actions.pod:4093
26730 msgid "guestfs_lstat"
26734 #: ../src/guestfs-actions.pod:4095
26737 " struct guestfs_stat *\n"
26738 " guestfs_lstat (guestfs_h *g,\n"
26739 " const char *path);\n"
26744 #: ../src/guestfs-actions.pod:4101
26746 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
26747 "link, then the link is stat-ed, not the file it refers to."
26751 #: ../src/guestfs-actions.pod:4107 ../src/guestfs-actions.pod:6896
26753 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
26754 "error. I<The caller must call C<guestfs_free_stat> after use>."
26758 #: ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:6900
26759 #: ../src/guestfs-actions.pod:6918 ../src/guestfs-actions.pod:7299
26760 msgid "(Added in 0.9.2)"
26764 #: ../src/guestfs-actions.pod:4113
26765 msgid "guestfs_lstatlist"
26769 #: ../src/guestfs-actions.pod:4115
26772 " struct guestfs_stat_list *\n"
26773 " guestfs_lstatlist (guestfs_h *g,\n"
26774 " const char *path,\n"
26775 " char *const *names);\n"
26780 #: ../src/guestfs-actions.pod:4120
26782 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
26783 "files, where all files are in the directory C<path>. C<names> is the list "
26784 "of files from this directory."
26788 #: ../src/guestfs-actions.pod:4129
26790 "This call is intended for programs that want to efficiently list a directory "
26791 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
26792 "for a similarly efficient call for getting extended attributes. Very long "
26793 "directory listings might cause the protocol message size to be exceeded, "
26794 "causing this call to fail. The caller must split up such requests into "
26795 "smaller groups of names."
26799 #: ../src/guestfs-actions.pod:4137
26801 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
26802 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
26806 #: ../src/guestfs-actions.pod:4143
26807 msgid "guestfs_luks_add_key"
26811 #: ../src/guestfs-actions.pod:4145
26815 " guestfs_luks_add_key (guestfs_h *g,\n"
26816 " const char *device,\n"
26817 " const char *key,\n"
26818 " const char *newkey,\n"
26824 #: ../src/guestfs-actions.pod:4157
26826 "Note that if C<keyslot> already contains a key, then this command will "
26827 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
26831 #: ../src/guestfs-actions.pod:4163 ../src/guestfs-actions.pod:4203
26832 #: ../src/guestfs-actions.pod:4226 ../src/guestfs-actions.pod:4246
26833 #: ../src/guestfs-actions.pod:4281 ../src/guestfs-actions.pod:4300
26835 "This function takes a key or passphrase parameter which could contain "
26836 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
26841 #: ../src/guestfs-actions.pod:4167 ../src/guestfs-actions.pod:4207
26842 #: ../src/guestfs-actions.pod:4230 ../src/guestfs-actions.pod:4250
26843 msgid "(Added in 1.5.2)"
26847 #: ../src/guestfs-actions.pod:4169
26848 msgid "guestfs_luks_close"
26852 #: ../src/guestfs-actions.pod:4171
26856 " guestfs_luks_close (guestfs_h *g,\n"
26857 " const char *device);\n"
26862 #: ../src/guestfs-actions.pod:4175
26864 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
26865 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
26866 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
26867 "underlying block device."
26871 #: ../src/guestfs-actions.pod:4183 ../src/guestfs-actions.pod:4285
26872 #: ../src/guestfs-actions.pod:4304 ../src/guestfs-actions.pod:4354
26873 #: ../src/guestfs-actions.pod:4402
26874 msgid "(Added in 1.5.1)"
26878 #: ../src/guestfs-actions.pod:4185
26879 msgid "guestfs_luks_format"
26883 #: ../src/guestfs-actions.pod:4187
26887 " guestfs_luks_format (guestfs_h *g,\n"
26888 " const char *device,\n"
26889 " const char *key,\n"
26895 #: ../src/guestfs-actions.pod:4209
26896 msgid "guestfs_luks_format_cipher"
26900 #: ../src/guestfs-actions.pod:4211
26904 " guestfs_luks_format_cipher (guestfs_h *g,\n"
26905 " const char *device,\n"
26906 " const char *key,\n"
26908 " const char *cipher);\n"
26913 #: ../src/guestfs-actions.pod:4218
26915 "This command is the same as C<guestfs_luks_format> but it also allows you to "
26916 "set the C<cipher> used."
26920 #: ../src/guestfs-actions.pod:4232
26921 msgid "guestfs_luks_kill_slot"
26925 #: ../src/guestfs-actions.pod:4234
26929 " guestfs_luks_kill_slot (guestfs_h *g,\n"
26930 " const char *device,\n"
26931 " const char *key,\n"
26937 #: ../src/guestfs-actions.pod:4252
26938 msgid "guestfs_luks_open"
26942 #: ../src/guestfs-actions.pod:4254
26946 " guestfs_luks_open (guestfs_h *g,\n"
26947 " const char *device,\n"
26948 " const char *key,\n"
26949 " const char *mapname);\n"
26954 #: ../src/guestfs-actions.pod:4272
26956 "If this block device contains LVM volume groups, then calling "
26957 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
26962 #: ../src/guestfs-actions.pod:4276
26963 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
26967 #: ../src/guestfs-actions.pod:4287
26968 msgid "guestfs_luks_open_ro"
26972 #: ../src/guestfs-actions.pod:4289
26976 " guestfs_luks_open_ro (guestfs_h *g,\n"
26977 " const char *device,\n"
26978 " const char *key,\n"
26979 " const char *mapname);\n"
26984 #: ../src/guestfs-actions.pod:4295
26986 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
26991 #: ../src/guestfs-actions.pod:4306
26992 msgid "guestfs_lvcreate"
26996 #: ../src/guestfs-actions.pod:4308
27000 " guestfs_lvcreate (guestfs_h *g,\n"
27001 " const char *logvol,\n"
27002 " const char *volgroup,\n"
27008 #: ../src/guestfs-actions.pod:4321
27009 msgid "guestfs_lvm_canonical_lv_name"
27013 #: ../src/guestfs-actions.pod:4323
27017 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
27018 " const char *lvname);\n"
27023 #: ../src/guestfs-actions.pod:4334
27024 msgid "See also C<guestfs_is_lv>."
27028 #: ../src/guestfs-actions.pod:4339
27029 msgid "(Added in 1.5.24)"
27033 #: ../src/guestfs-actions.pod:4341
27034 msgid "guestfs_lvm_clear_filter"
27038 #: ../src/guestfs-actions.pod:4343
27042 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
27047 #: ../src/guestfs-actions.pod:4346
27049 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
27050 "see every block device."
27054 #: ../src/guestfs-actions.pod:4356
27055 msgid "guestfs_lvm_remove_all"
27059 #: ../src/guestfs-actions.pod:4358
27063 " guestfs_lvm_remove_all (guestfs_h *g);\n"
27068 #: ../src/guestfs-actions.pod:4371
27069 msgid "guestfs_lvm_set_filter"
27073 #: ../src/guestfs-actions.pod:4373
27077 " guestfs_lvm_set_filter (guestfs_h *g,\n"
27078 " char *const *devices);\n"
27083 #: ../src/guestfs-actions.pod:4404
27084 msgid "guestfs_lvremove"
27088 #: ../src/guestfs-actions.pod:4406
27092 " guestfs_lvremove (guestfs_h *g,\n"
27093 " const char *device);\n"
27098 #: ../src/guestfs-actions.pod:4418 ../src/guestfs-actions.pod:5821
27099 #: ../src/guestfs-actions.pod:7669
27100 msgid "(Added in 1.0.13)"
27104 #: ../src/guestfs-actions.pod:4420
27105 msgid "guestfs_lvrename"
27109 #: ../src/guestfs-actions.pod:4422
27113 " guestfs_lvrename (guestfs_h *g,\n"
27114 " const char *logvol,\n"
27115 " const char *newlogvol);\n"
27120 #: ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:7682
27121 msgid "(Added in 1.0.83)"
27125 #: ../src/guestfs-actions.pod:4433
27126 msgid "guestfs_lvresize"
27130 #: ../src/guestfs-actions.pod:4435
27134 " guestfs_lvresize (guestfs_h *g,\n"
27135 " const char *device,\n"
27141 #: ../src/guestfs-actions.pod:4448
27142 msgid "guestfs_lvresize_free"
27146 #: ../src/guestfs-actions.pod:4450
27150 " guestfs_lvresize_free (guestfs_h *g,\n"
27151 " const char *lv,\n"
27157 #: ../src/guestfs-actions.pod:4463
27158 msgid "(Added in 1.3.3)"
27162 #: ../src/guestfs-actions.pod:4465
27163 msgid "guestfs_lvs"
27167 #: ../src/guestfs-actions.pod:4467
27171 " guestfs_lvs (guestfs_h *g);\n"
27176 #: ../src/guestfs-actions.pod:4476
27177 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
27181 #: ../src/guestfs-actions.pod:4484
27182 msgid "guestfs_lvs_full"
27186 #: ../src/guestfs-actions.pod:4486
27189 " struct guestfs_lvm_lv_list *\n"
27190 " guestfs_lvs_full (guestfs_h *g);\n"
27195 #: ../src/guestfs-actions.pod:4492
27197 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
27198 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
27202 #: ../src/guestfs-actions.pod:4498
27203 msgid "guestfs_lvuuid"
27207 #: ../src/guestfs-actions.pod:4500
27211 " guestfs_lvuuid (guestfs_h *g,\n"
27212 " const char *device);\n"
27217 #: ../src/guestfs-actions.pod:4511
27218 msgid "guestfs_lxattrlist"
27222 #: ../src/guestfs-actions.pod:4513
27225 " struct guestfs_xattr_list *\n"
27226 " guestfs_lxattrlist (guestfs_h *g,\n"
27227 " const char *path,\n"
27228 " char *const *names);\n"
27233 #: ../src/guestfs-actions.pod:4532
27235 "This call is intended for programs that want to efficiently list a directory "
27236 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
27237 "a similarly efficient call for getting standard stats. Very long directory "
27238 "listings might cause the protocol message size to be exceeded, causing this "
27239 "call to fail. The caller must split up such requests into smaller groups of "
27244 #: ../src/guestfs-actions.pod:4546
27245 msgid "guestfs_mkdir"
27249 #: ../src/guestfs-actions.pod:4548
27253 " guestfs_mkdir (guestfs_h *g,\n"
27254 " const char *path);\n"
27259 #: ../src/guestfs-actions.pod:4558
27260 msgid "guestfs_mkdir_mode"
27264 #: ../src/guestfs-actions.pod:4560
27268 " guestfs_mkdir_mode (guestfs_h *g,\n"
27269 " const char *path,\n"
27275 #: ../src/guestfs-actions.pod:4572
27276 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
27280 #: ../src/guestfs-actions.pod:4578
27281 msgid "guestfs_mkdir_p"
27285 #: ../src/guestfs-actions.pod:4580
27289 " guestfs_mkdir_p (guestfs_h *g,\n"
27290 " const char *path);\n"
27295 #: ../src/guestfs-actions.pod:4591
27296 msgid "guestfs_mkdtemp"
27300 #: ../src/guestfs-actions.pod:4593
27304 " guestfs_mkdtemp (guestfs_h *g,\n"
27305 " const char *template);\n"
27310 #: ../src/guestfs-actions.pod:4621
27311 msgid "guestfs_mke2fs_J"
27315 #: ../src/guestfs-actions.pod:4623
27319 " guestfs_mke2fs_J (guestfs_h *g,\n"
27320 " const char *fstype,\n"
27321 " int blocksize,\n"
27322 " const char *device,\n"
27323 " const char *journal);\n"
27328 #: ../src/guestfs-actions.pod:4636
27329 msgid "See also C<guestfs_mke2journal>."
27333 #: ../src/guestfs-actions.pod:4640 ../src/guestfs-actions.pod:4658
27334 #: ../src/guestfs-actions.pod:4676 ../src/guestfs-actions.pod:4692
27335 #: ../src/guestfs-actions.pod:4706 ../src/guestfs-actions.pod:4720
27336 #: ../src/guestfs-actions.pod:4779 ../src/guestfs-actions.pod:5056
27337 msgid "(Added in 1.0.68)"
27341 #: ../src/guestfs-actions.pod:4642
27342 msgid "guestfs_mke2fs_JL"
27346 #: ../src/guestfs-actions.pod:4644
27350 " guestfs_mke2fs_JL (guestfs_h *g,\n"
27351 " const char *fstype,\n"
27352 " int blocksize,\n"
27353 " const char *device,\n"
27354 " const char *label);\n"
27359 #: ../src/guestfs-actions.pod:4654
27360 msgid "See also C<guestfs_mke2journal_L>."
27364 #: ../src/guestfs-actions.pod:4660
27365 msgid "guestfs_mke2fs_JU"
27369 #: ../src/guestfs-actions.pod:4662
27373 " guestfs_mke2fs_JU (guestfs_h *g,\n"
27374 " const char *fstype,\n"
27375 " int blocksize,\n"
27376 " const char *device,\n"
27377 " const char *uuid);\n"
27382 #: ../src/guestfs-actions.pod:4672
27383 msgid "See also C<guestfs_mke2journal_U>."
27387 #: ../src/guestfs-actions.pod:4678
27388 msgid "guestfs_mke2journal"
27392 #: ../src/guestfs-actions.pod:4680
27396 " guestfs_mke2journal (guestfs_h *g,\n"
27397 " int blocksize,\n"
27398 " const char *device);\n"
27403 #: ../src/guestfs-actions.pod:4694
27404 msgid "guestfs_mke2journal_L"
27408 #: ../src/guestfs-actions.pod:4696
27412 " guestfs_mke2journal_L (guestfs_h *g,\n"
27413 " int blocksize,\n"
27414 " const char *label,\n"
27415 " const char *device);\n"
27420 #: ../src/guestfs-actions.pod:4708
27421 msgid "guestfs_mke2journal_U"
27425 #: ../src/guestfs-actions.pod:4710
27429 " guestfs_mke2journal_U (guestfs_h *g,\n"
27430 " int blocksize,\n"
27431 " const char *uuid,\n"
27432 " const char *device);\n"
27437 #: ../src/guestfs-actions.pod:4722
27438 msgid "guestfs_mkfifo"
27442 #: ../src/guestfs-actions.pod:4724
27446 " guestfs_mkfifo (guestfs_h *g,\n"
27448 " const char *path);\n"
27453 #: ../src/guestfs-actions.pod:4729
27455 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
27456 "is just a convenient wrapper around C<guestfs_mknod>."
27460 #: ../src/guestfs-actions.pod:4739
27461 msgid "guestfs_mkfs"
27465 #: ../src/guestfs-actions.pod:4741
27469 " guestfs_mkfs (guestfs_h *g,\n"
27470 " const char *fstype,\n"
27471 " const char *device);\n"
27476 #: ../src/guestfs-actions.pod:4754
27477 msgid "guestfs_mkfs_b"
27481 #: ../src/guestfs-actions.pod:4756
27485 " guestfs_mkfs_b (guestfs_h *g,\n"
27486 " const char *fstype,\n"
27487 " int blocksize,\n"
27488 " const char *device);\n"
27493 #: ../src/guestfs-actions.pod:4762
27495 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
27500 #: ../src/guestfs-actions.pod:4769
27502 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
27503 "block size of the resulting filesystem. Supported block sizes depend on the "
27504 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
27508 #: ../src/guestfs-actions.pod:4781
27509 msgid "guestfs_mkfs_opts"
27513 #: ../src/guestfs-actions.pod:4783
27517 " guestfs_mkfs_opts (guestfs_h *g,\n"
27518 " const char *fstype,\n"
27519 " const char *device,\n"
27525 #: ../src/guestfs-actions.pod:4794
27528 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
27529 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
27530 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
27531 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
27536 #: ../src/guestfs-actions.pod:4842
27537 msgid "(Added in 1.7.19)"
27541 #: ../src/guestfs-actions.pod:4844
27542 msgid "guestfs_mkfs_opts_va"
27546 #: ../src/guestfs-actions.pod:4846
27550 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
27551 " const char *fstype,\n"
27552 " const char *device,\n"
27553 " va_list args);\n"
27558 #: ../src/guestfs-actions.pod:4852
27559 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
27563 #: ../src/guestfs-actions.pod:4856
27564 msgid "guestfs_mkfs_opts_argv"
27568 #: ../src/guestfs-actions.pod:4858
27572 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
27573 " const char *fstype,\n"
27574 " const char *device,\n"
27575 " const struct guestfs_mkfs_opts_argv *optargs);\n"
27580 #: ../src/guestfs-actions.pod:4864
27581 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
27585 #: ../src/guestfs-actions.pod:4868
27586 msgid "guestfs_mkmountpoint"
27590 #: ../src/guestfs-actions.pod:4870
27594 " guestfs_mkmountpoint (guestfs_h *g,\n"
27595 " const char *exemptpath);\n"
27600 #: ../src/guestfs-actions.pod:4874
27602 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
27603 "that can be used to create extra mountpoints before mounting the first "
27608 #: ../src/guestfs-actions.pod:4898
27610 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
27611 "may get unexpected errors if you try to mix these calls. It is safest to "
27612 "manually unmount filesystems and remove mountpoints after use."
27616 #: ../src/guestfs-actions.pod:4902
27618 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
27619 "first, so for this to work for manual mountpoints, you must ensure that the "
27620 "innermost mountpoints have the longest pathnames, as in the example code "
27625 #: ../src/guestfs-actions.pod:4909
27627 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
27628 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
27629 "can also trigger these issues."
27633 #: ../src/guestfs-actions.pod:4915 ../src/guestfs-actions.pod:5231
27634 #: ../src/guestfs-actions.pod:6241
27635 msgid "(Added in 1.0.62)"
27639 #: ../src/guestfs-actions.pod:4917
27640 msgid "guestfs_mknod"
27644 #: ../src/guestfs-actions.pod:4919
27648 " guestfs_mknod (guestfs_h *g,\n"
27652 " const char *path);\n"
27657 #: ../src/guestfs-actions.pod:4934
27659 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
27660 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
27661 "regular file). These constants are available in the standard Linux header "
27662 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
27663 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
27664 "the appropriate constant for you."
27668 #: ../src/guestfs-actions.pod:4948
27669 msgid "guestfs_mknod_b"
27673 #: ../src/guestfs-actions.pod:4950
27677 " guestfs_mknod_b (guestfs_h *g,\n"
27681 " const char *path);\n"
27686 #: ../src/guestfs-actions.pod:4957
27688 "This call creates a block device node called C<path> with mode C<mode> and "
27689 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27690 "wrapper around C<guestfs_mknod>."
27694 #: ../src/guestfs-actions.pod:4967
27695 msgid "guestfs_mknod_c"
27699 #: ../src/guestfs-actions.pod:4969
27703 " guestfs_mknod_c (guestfs_h *g,\n"
27707 " const char *path);\n"
27712 #: ../src/guestfs-actions.pod:4976
27714 "This call creates a char device node called C<path> with mode C<mode> and "
27715 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27716 "wrapper around C<guestfs_mknod>."
27720 #: ../src/guestfs-actions.pod:4986
27721 msgid "guestfs_mkswap"
27725 #: ../src/guestfs-actions.pod:4988
27729 " guestfs_mkswap (guestfs_h *g,\n"
27730 " const char *device);\n"
27735 #: ../src/guestfs-actions.pod:4998
27736 msgid "guestfs_mkswap_L"
27740 #: ../src/guestfs-actions.pod:5000
27744 " guestfs_mkswap_L (guestfs_h *g,\n"
27745 " const char *label,\n"
27746 " const char *device);\n"
27751 #: ../src/guestfs-actions.pod:5015
27752 msgid "guestfs_mkswap_U"
27756 #: ../src/guestfs-actions.pod:5017
27760 " guestfs_mkswap_U (guestfs_h *g,\n"
27761 " const char *uuid,\n"
27762 " const char *device);\n"
27767 #: ../src/guestfs-actions.pod:5028
27768 msgid "guestfs_mkswap_file"
27772 #: ../src/guestfs-actions.pod:5030
27776 " guestfs_mkswap_file (guestfs_h *g,\n"
27777 " const char *path);\n"
27782 #: ../src/guestfs-actions.pod:5036
27784 "This command just writes a swap file signature to an existing file. To "
27785 "create the file itself, use something like C<guestfs_fallocate>."
27789 #: ../src/guestfs-actions.pod:5043
27790 msgid "guestfs_modprobe"
27794 #: ../src/guestfs-actions.pod:5045
27798 " guestfs_modprobe (guestfs_h *g,\n"
27799 " const char *modulename);\n"
27804 #: ../src/guestfs-actions.pod:5058
27805 msgid "guestfs_mount"
27809 #: ../src/guestfs-actions.pod:5060
27813 " guestfs_mount (guestfs_h *g,\n"
27814 " const char *device,\n"
27815 " const char *mountpoint);\n"
27820 #: ../src/guestfs-actions.pod:5065
27822 "I<This function is deprecated.> In new code, use the L</"
27823 "guestfs_mount_options> call instead."
27827 #: ../src/guestfs-actions.pod:5086
27829 "B<Important note:> When you use this call, the filesystem options C<sync> "
27830 "and C<noatime> are set implicitly. This was originally done because we "
27831 "thought it would improve reliability, but it turns out that I<-o sync> has a "
27832 "very large negative performance impact and negligible effect on "
27833 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
27834 "in any code that needs performance, and instead use C<guestfs_mount_options> "
27835 "(use an empty string for the first parameter if you don't want any options)."
27839 #: ../src/guestfs-actions.pod:5100
27840 msgid "guestfs_mount_9p"
27844 #: ../src/guestfs-actions.pod:5102
27848 " guestfs_mount_9p (guestfs_h *g,\n"
27849 " const char *mounttag,\n"
27850 " const char *mountpoint,\n"
27856 #: ../src/guestfs-actions.pod:5113
27859 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
27864 #: ../src/guestfs-actions.pod:5126
27865 msgid "guestfs_mount_9p_va"
27869 #: ../src/guestfs-actions.pod:5128
27873 " guestfs_mount_9p_va (guestfs_h *g,\n"
27874 " const char *mounttag,\n"
27875 " const char *mountpoint,\n"
27876 " va_list args);\n"
27881 #: ../src/guestfs-actions.pod:5134
27882 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
27886 #: ../src/guestfs-actions.pod:5138
27887 msgid "guestfs_mount_9p_argv"
27891 #: ../src/guestfs-actions.pod:5140
27895 " guestfs_mount_9p_argv (guestfs_h *g,\n"
27896 " const char *mounttag,\n"
27897 " const char *mountpoint,\n"
27898 " const struct guestfs_mount_9p_argv *optargs);\n"
27903 #: ../src/guestfs-actions.pod:5146
27904 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
27908 #: ../src/guestfs-actions.pod:5150
27909 msgid "guestfs_mount_loop"
27913 #: ../src/guestfs-actions.pod:5152
27917 " guestfs_mount_loop (guestfs_h *g,\n"
27918 " const char *file,\n"
27919 " const char *mountpoint);\n"
27924 #: ../src/guestfs-actions.pod:5165
27925 msgid "guestfs_mount_options"
27929 #: ../src/guestfs-actions.pod:5167
27933 " guestfs_mount_options (guestfs_h *g,\n"
27934 " const char *options,\n"
27935 " const char *device,\n"
27936 " const char *mountpoint);\n"
27941 #: ../src/guestfs-actions.pod:5173
27943 "This is the same as the C<guestfs_mount> command, but it allows you to set "
27944 "the mount options as for the L<mount(8)> I<-o> flag."
27948 #: ../src/guestfs-actions.pod:5183 ../src/guestfs-actions.pod:5197
27949 #: ../src/guestfs-actions.pod:5214
27950 msgid "(Added in 1.0.10)"
27954 #: ../src/guestfs-actions.pod:5185
27955 msgid "guestfs_mount_ro"
27959 #: ../src/guestfs-actions.pod:5187
27963 " guestfs_mount_ro (guestfs_h *g,\n"
27964 " const char *device,\n"
27965 " const char *mountpoint);\n"
27970 #: ../src/guestfs-actions.pod:5192
27972 "This is the same as the C<guestfs_mount> command, but it mounts the "
27973 "filesystem with the read-only (I<-o ro>) flag."
27977 #: ../src/guestfs-actions.pod:5199
27978 msgid "guestfs_mount_vfs"
27982 #: ../src/guestfs-actions.pod:5201
27986 " guestfs_mount_vfs (guestfs_h *g,\n"
27987 " const char *options,\n"
27988 " const char *vfstype,\n"
27989 " const char *device,\n"
27990 " const char *mountpoint);\n"
27995 #: ../src/guestfs-actions.pod:5208
27997 "This is the same as the C<guestfs_mount> command, but it allows you to set "
27998 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
28003 #: ../src/guestfs-actions.pod:5216
28004 msgid "guestfs_mountpoints"
28008 #: ../src/guestfs-actions.pod:5218
28012 " guestfs_mountpoints (guestfs_h *g);\n"
28017 #: ../src/guestfs-actions.pod:5221
28019 "This call is similar to C<guestfs_mounts>. That call returns a list of "
28020 "devices. This one returns a hash table (map) of device name to directory "
28021 "where the device is mounted."
28025 #: ../src/guestfs-actions.pod:5233
28026 msgid "guestfs_mounts"
28030 #: ../src/guestfs-actions.pod:5235
28034 " guestfs_mounts (guestfs_h *g);\n"
28039 #: ../src/guestfs-actions.pod:5243
28040 msgid "See also: C<guestfs_mountpoints>"
28044 #: ../src/guestfs-actions.pod:5251
28049 #: ../src/guestfs-actions.pod:5253
28053 " guestfs_mv (guestfs_h *g,\n"
28054 " const char *src,\n"
28055 " const char *dest);\n"
28060 #: ../src/guestfs-actions.pod:5265
28061 msgid "guestfs_ntfs_3g_probe"
28065 #: ../src/guestfs-actions.pod:5267
28069 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
28071 " const char *device);\n"
28076 #: ../src/guestfs-actions.pod:5286
28077 msgid "(Added in 1.0.43)"
28081 #: ../src/guestfs-actions.pod:5288
28082 msgid "guestfs_ntfsresize"
28086 #: ../src/guestfs-actions.pod:5290
28090 " guestfs_ntfsresize (guestfs_h *g,\n"
28091 " const char *device);\n"
28096 #: ../src/guestfs-actions.pod:5294 ../src/guestfs-actions.pod:5394
28098 "I<This function is deprecated.> In new code, use the L</"
28099 "guestfs_ntfsresize_opts> call instead."
28103 #: ../src/guestfs-actions.pod:5318
28104 msgid "guestfs_ntfsresize_opts"
28108 #: ../src/guestfs-actions.pod:5320
28112 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
28113 " const char *device,\n"
28119 #: ../src/guestfs-actions.pod:5330
28122 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
28123 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
28128 #: ../src/guestfs-actions.pod:5350
28130 "After the resize operation, the filesystem is always marked as requiring a "
28131 "consistency check (for safety). You have to boot into Windows to perform "
28132 "this check and clear this condition. If you I<don't> set the C<force> "
28133 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
28134 "times on a single filesystem without booting into Windows between each "
28139 #: ../src/guestfs-actions.pod:5365
28140 msgid "guestfs_ntfsresize_opts_va"
28144 #: ../src/guestfs-actions.pod:5367
28148 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
28149 " const char *device,\n"
28150 " va_list args);\n"
28155 #: ../src/guestfs-actions.pod:5372
28156 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
28160 #: ../src/guestfs-actions.pod:5376
28161 msgid "guestfs_ntfsresize_opts_argv"
28165 #: ../src/guestfs-actions.pod:5378
28169 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
28170 " const char *device,\n"
28171 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
28176 #: ../src/guestfs-actions.pod:5383
28177 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
28181 #: ../src/guestfs-actions.pod:5387
28182 msgid "guestfs_ntfsresize_size"
28186 #: ../src/guestfs-actions.pod:5389
28190 " guestfs_ntfsresize_size (guestfs_h *g,\n"
28191 " const char *device,\n"
28192 " int64_t size);\n"
28197 #: ../src/guestfs-actions.pod:5401
28199 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
28200 "to specify the new size (in bytes) explicitly."
28204 #: ../src/guestfs-actions.pod:5406 ../src/guestfs-actions.pod:5848
28205 #: ../src/guestfs-actions.pod:5921 ../src/guestfs-actions.pod:6189
28206 #: ../src/guestfs-actions.pod:7826
28207 msgid "(Added in 1.3.14)"
28211 #: ../src/guestfs-actions.pod:5408
28212 msgid "guestfs_part_add"
28216 #: ../src/guestfs-actions.pod:5410
28220 " guestfs_part_add (guestfs_h *g,\n"
28221 " const char *device,\n"
28222 " const char *prlogex,\n"
28223 " int64_t startsect,\n"
28224 " int64_t endsect);\n"
28229 #: ../src/guestfs-actions.pod:5417
28231 "This command adds a partition to C<device>. If there is no partition table "
28232 "on the device, call C<guestfs_part_init> first."
28236 #: ../src/guestfs-actions.pod:5429
28238 "Creating a partition which covers the whole disk is not so easy. Use "
28239 "C<guestfs_part_disk> to do that."
28243 #: ../src/guestfs-actions.pod:5434 ../src/guestfs-actions.pod:5472
28244 #: ../src/guestfs-actions.pod:5525 ../src/guestfs-actions.pod:5609
28245 #: ../src/guestfs-actions.pod:5647 ../src/guestfs-actions.pod:5666
28246 #: ../src/guestfs-actions.pod:5706
28247 msgid "(Added in 1.0.78)"
28251 #: ../src/guestfs-actions.pod:5436
28252 msgid "guestfs_part_del"
28256 #: ../src/guestfs-actions.pod:5438
28260 " guestfs_part_del (guestfs_h *g,\n"
28261 " const char *device,\n"
28267 #: ../src/guestfs-actions.pod:5453
28268 msgid "guestfs_part_disk"
28272 #: ../src/guestfs-actions.pod:5455
28276 " guestfs_part_disk (guestfs_h *g,\n"
28277 " const char *device,\n"
28278 " const char *parttype);\n"
28283 #: ../src/guestfs-actions.pod:5460
28285 "This command is simply a combination of C<guestfs_part_init> followed by "
28286 "C<guestfs_part_add> to create a single primary partition covering the whole "
28291 #: ../src/guestfs-actions.pod:5464
28293 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
28294 "possible values are described in C<guestfs_part_init>."
28298 #: ../src/guestfs-actions.pod:5474
28299 msgid "guestfs_part_get_bootable"
28303 #: ../src/guestfs-actions.pod:5476
28307 " guestfs_part_get_bootable (guestfs_h *g,\n"
28308 " const char *device,\n"
28314 #: ../src/guestfs-actions.pod:5484
28315 msgid "See also C<guestfs_part_set_bootable>."
28319 #: ../src/guestfs-actions.pod:5490
28320 msgid "guestfs_part_get_mbr_id"
28324 #: ../src/guestfs-actions.pod:5492
28328 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
28329 " const char *device,\n"
28335 #: ../src/guestfs-actions.pod:5500 ../src/guestfs-actions.pod:5682
28337 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
28338 "undefined results for other partition table types (see "
28339 "C<guestfs_part_get_parttype>)."
28343 #: ../src/guestfs-actions.pod:5508
28344 msgid "guestfs_part_get_parttype"
28348 #: ../src/guestfs-actions.pod:5510
28352 " guestfs_part_get_parttype (guestfs_h *g,\n"
28353 " const char *device);\n"
28358 #: ../src/guestfs-actions.pod:5517
28360 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
28361 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
28362 "possible, although unusual. See C<guestfs_part_init> for a full list."
28366 #: ../src/guestfs-actions.pod:5527
28367 msgid "guestfs_part_init"
28371 #: ../src/guestfs-actions.pod:5529
28375 " guestfs_part_init (guestfs_h *g,\n"
28376 " const char *device,\n"
28377 " const char *parttype);\n"
28382 #: ../src/guestfs-actions.pod:5538
28384 "Initially there are no partitions. Following this, you should call "
28385 "C<guestfs_part_add> for each partition required."
28389 #: ../src/guestfs-actions.pod:5611
28390 msgid "guestfs_part_list"
28394 #: ../src/guestfs-actions.pod:5613
28397 " struct guestfs_partition_list *\n"
28398 " guestfs_part_list (guestfs_h *g,\n"
28399 " const char *device);\n"
28404 #: ../src/guestfs-actions.pod:5630
28406 "Start of the partition I<in bytes>. To get sectors you have to divide by "
28407 "the device's sector size, see C<guestfs_blockdev_getss>."
28411 #: ../src/guestfs-actions.pod:5643
28413 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
28414 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
28419 #: ../src/guestfs-actions.pod:5649
28420 msgid "guestfs_part_set_bootable"
28424 #: ../src/guestfs-actions.pod:5651
28428 " guestfs_part_set_bootable (guestfs_h *g,\n"
28429 " const char *device,\n"
28431 " int bootable);\n"
28436 #: ../src/guestfs-actions.pod:5668
28437 msgid "guestfs_part_set_mbr_id"
28441 #: ../src/guestfs-actions.pod:5670
28445 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
28446 " const char *device,\n"
28453 #: ../src/guestfs-actions.pod:5690
28454 msgid "guestfs_part_set_name"
28458 #: ../src/guestfs-actions.pod:5692
28462 " guestfs_part_set_name (guestfs_h *g,\n"
28463 " const char *device,\n"
28465 " const char *name);\n"
28470 #: ../src/guestfs-actions.pod:5708
28471 msgid "guestfs_part_to_dev"
28475 #: ../src/guestfs-actions.pod:5710
28479 " guestfs_part_to_dev (guestfs_h *g,\n"
28480 " const char *partition);\n"
28485 #: ../src/guestfs-actions.pod:5718
28487 "The named partition must exist, for example as a string returned from "
28488 "C<guestfs_list_partitions>."
28492 #: ../src/guestfs-actions.pod:5726
28493 msgid "guestfs_ping_daemon"
28497 #: ../src/guestfs-actions.pod:5728
28501 " guestfs_ping_daemon (guestfs_h *g);\n"
28506 #: ../src/guestfs-actions.pod:5740
28507 msgid "guestfs_pread"
28511 #: ../src/guestfs-actions.pod:5742
28515 " guestfs_pread (guestfs_h *g,\n"
28516 " const char *path,\n"
28518 " int64_t offset,\n"
28519 " size_t *size_r);\n"
28524 #: ../src/guestfs-actions.pod:5755
28525 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
28529 #: ../src/guestfs-actions.pod:5766
28530 msgid "guestfs_pread_device"
28534 #: ../src/guestfs-actions.pod:5768
28538 " guestfs_pread_device (guestfs_h *g,\n"
28539 " const char *device,\n"
28541 " int64_t offset,\n"
28542 " size_t *size_r);\n"
28547 #: ../src/guestfs-actions.pod:5781
28548 msgid "See also C<guestfs_pread>."
28552 #: ../src/guestfs-actions.pod:5790
28553 msgid "(Added in 1.5.21)"
28557 #: ../src/guestfs-actions.pod:5792
28558 msgid "guestfs_pvcreate"
28562 #: ../src/guestfs-actions.pod:5794
28566 " guestfs_pvcreate (guestfs_h *g,\n"
28567 " const char *device);\n"
28572 #: ../src/guestfs-actions.pod:5806
28573 msgid "guestfs_pvremove"
28577 #: ../src/guestfs-actions.pod:5808
28581 " guestfs_pvremove (guestfs_h *g,\n"
28582 " const char *device);\n"
28587 #: ../src/guestfs-actions.pod:5823
28588 msgid "guestfs_pvresize"
28592 #: ../src/guestfs-actions.pod:5825
28596 " guestfs_pvresize (guestfs_h *g,\n"
28597 " const char *device);\n"
28602 #: ../src/guestfs-actions.pod:5836
28603 msgid "guestfs_pvresize_size"
28607 #: ../src/guestfs-actions.pod:5838
28611 " guestfs_pvresize_size (guestfs_h *g,\n"
28612 " const char *device,\n"
28613 " int64_t size);\n"
28618 #: ../src/guestfs-actions.pod:5843
28620 "This command is the same as C<guestfs_pvresize> except that it allows you to "
28621 "specify the new size (in bytes) explicitly."
28625 #: ../src/guestfs-actions.pod:5850
28626 msgid "guestfs_pvs"
28630 #: ../src/guestfs-actions.pod:5852
28634 " guestfs_pvs (guestfs_h *g);\n"
28639 #: ../src/guestfs-actions.pod:5861
28640 msgid "See also C<guestfs_pvs_full>."
28644 #: ../src/guestfs-actions.pod:5869
28645 msgid "guestfs_pvs_full"
28649 #: ../src/guestfs-actions.pod:5871
28652 " struct guestfs_lvm_pv_list *\n"
28653 " guestfs_pvs_full (guestfs_h *g);\n"
28658 #: ../src/guestfs-actions.pod:5877
28660 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
28661 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
28665 #: ../src/guestfs-actions.pod:5883
28666 msgid "guestfs_pvuuid"
28670 #: ../src/guestfs-actions.pod:5885
28674 " guestfs_pvuuid (guestfs_h *g,\n"
28675 " const char *device);\n"
28680 #: ../src/guestfs-actions.pod:5896
28681 msgid "guestfs_pwrite"
28685 #: ../src/guestfs-actions.pod:5898
28689 " guestfs_pwrite (guestfs_h *g,\n"
28690 " const char *path,\n"
28691 " const char *content,\n"
28692 " size_t content_size,\n"
28693 " int64_t offset);\n"
28698 #: ../src/guestfs-actions.pod:5914
28699 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
28703 #: ../src/guestfs-actions.pod:5923
28704 msgid "guestfs_pwrite_device"
28708 #: ../src/guestfs-actions.pod:5925
28712 " guestfs_pwrite_device (guestfs_h *g,\n"
28713 " const char *device,\n"
28714 " const char *content,\n"
28715 " size_t content_size,\n"
28716 " int64_t offset);\n"
28721 #: ../src/guestfs-actions.pod:5940
28722 msgid "See also C<guestfs_pwrite>."
28726 #: ../src/guestfs-actions.pod:5947
28727 msgid "(Added in 1.5.20)"
28731 #: ../src/guestfs-actions.pod:5949
28732 msgid "guestfs_read_file"
28736 #: ../src/guestfs-actions.pod:5951
28740 " guestfs_read_file (guestfs_h *g,\n"
28741 " const char *path,\n"
28742 " size_t *size_r);\n"
28747 #: ../src/guestfs-actions.pod:5959
28749 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
28750 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
28751 "function is limited in the total size of file that can be handled."
28755 #: ../src/guestfs-actions.pod:5971
28756 msgid "(Added in 1.0.63)"
28760 #: ../src/guestfs-actions.pod:5973
28761 msgid "guestfs_read_lines"
28765 #: ../src/guestfs-actions.pod:5975
28769 " guestfs_read_lines (guestfs_h *g,\n"
28770 " const char *path);\n"
28775 #: ../src/guestfs-actions.pod:5984
28777 "Note that this function cannot correctly handle binary files (specifically, "
28778 "files containing C<\\0> character which is treated as end of line). For "
28779 "those you need to use the C<guestfs_read_file> function which has a more "
28780 "complex interface."
28784 #: ../src/guestfs-actions.pod:5995
28785 msgid "guestfs_readdir"
28789 #: ../src/guestfs-actions.pod:5997
28792 " struct guestfs_dirent_list *\n"
28793 " guestfs_readdir (guestfs_h *g,\n"
28794 " const char *dir);\n"
28799 #: ../src/guestfs-actions.pod:6051
28801 "This function is primarily intended for use by programs. To get a simple "
28802 "list of names, use C<guestfs_ls>. To get a printable directory for human "
28803 "consumption, use C<guestfs_ll>."
28807 #: ../src/guestfs-actions.pod:6055
28809 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
28810 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
28814 #: ../src/guestfs-actions.pod:6061
28815 msgid "guestfs_readlink"
28819 #: ../src/guestfs-actions.pod:6063
28823 " guestfs_readlink (guestfs_h *g,\n"
28824 " const char *path);\n"
28829 #: ../src/guestfs-actions.pod:6074
28830 msgid "guestfs_readlinklist"
28834 #: ../src/guestfs-actions.pod:6076
28838 " guestfs_readlinklist (guestfs_h *g,\n"
28839 " const char *path,\n"
28840 " char *const *names);\n"
28845 #: ../src/guestfs-actions.pod:6109
28846 msgid "guestfs_realpath"
28850 #: ../src/guestfs-actions.pod:6111
28854 " guestfs_realpath (guestfs_h *g,\n"
28855 " const char *path);\n"
28860 #: ../src/guestfs-actions.pod:6123
28861 msgid "guestfs_removexattr"
28865 #: ../src/guestfs-actions.pod:6125
28869 " guestfs_removexattr (guestfs_h *g,\n"
28870 " const char *xattr,\n"
28871 " const char *path);\n"
28876 #: ../src/guestfs-actions.pod:6133
28877 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
28881 #: ../src/guestfs-actions.pod:6139
28882 msgid "guestfs_resize2fs"
28886 #: ../src/guestfs-actions.pod:6141
28890 " guestfs_resize2fs (guestfs_h *g,\n"
28891 " const char *device);\n"
28896 #: ../src/guestfs-actions.pod:6148
28898 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
28899 "C<device> before calling this command. For unknown reasons C<resize2fs> "
28900 "sometimes gives an error about this and sometimes not. In any case, it is "
28901 "always safe to call C<guestfs_e2fsck_f> before calling this function."
28905 #: ../src/guestfs-actions.pod:6158
28906 msgid "guestfs_resize2fs_M"
28910 #: ../src/guestfs-actions.pod:6160
28914 " guestfs_resize2fs_M (guestfs_h *g,\n"
28915 " const char *device);\n"
28920 #: ../src/guestfs-actions.pod:6164
28922 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
28923 "resized to its minimum size. This works like the I<-M> option to the "
28924 "C<resize2fs> command."
28928 #: ../src/guestfs-actions.pod:6168
28930 "To get the resulting size of the filesystem you should call "
28931 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
28932 "These two numbers, multiplied together, give the resulting size of the "
28933 "minimal filesystem in bytes."
28937 #: ../src/guestfs-actions.pod:6177
28938 msgid "guestfs_resize2fs_size"
28942 #: ../src/guestfs-actions.pod:6179
28946 " guestfs_resize2fs_size (guestfs_h *g,\n"
28947 " const char *device,\n"
28948 " int64_t size);\n"
28953 #: ../src/guestfs-actions.pod:6184
28955 "This command is the same as C<guestfs_resize2fs> except that it allows you "
28956 "to specify the new size (in bytes) explicitly."
28960 #: ../src/guestfs-actions.pod:6191
28965 #: ../src/guestfs-actions.pod:6193
28969 " guestfs_rm (guestfs_h *g,\n"
28970 " const char *path);\n"
28975 #: ../src/guestfs-actions.pod:6203
28976 msgid "guestfs_rm_rf"
28980 #: ../src/guestfs-actions.pod:6205
28984 " guestfs_rm_rf (guestfs_h *g,\n"
28985 " const char *path);\n"
28990 #: ../src/guestfs-actions.pod:6217
28991 msgid "guestfs_rmdir"
28995 #: ../src/guestfs-actions.pod:6219
28999 " guestfs_rmdir (guestfs_h *g,\n"
29000 " const char *path);\n"
29005 #: ../src/guestfs-actions.pod:6229
29006 msgid "guestfs_rmmountpoint"
29010 #: ../src/guestfs-actions.pod:6231
29014 " guestfs_rmmountpoint (guestfs_h *g,\n"
29015 " const char *exemptpath);\n"
29020 #: ../src/guestfs-actions.pod:6235
29022 "This calls removes a mountpoint that was previously created with "
29023 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
29027 #: ../src/guestfs-actions.pod:6243
29028 msgid "guestfs_scrub_device"
29032 #: ../src/guestfs-actions.pod:6245
29036 " guestfs_scrub_device (guestfs_h *g,\n"
29037 " const char *device);\n"
29042 #: ../src/guestfs-actions.pod:6260 ../src/guestfs-actions.pod:6278
29043 #: ../src/guestfs-actions.pod:6297
29044 msgid "(Added in 1.0.52)"
29048 #: ../src/guestfs-actions.pod:6262
29049 msgid "guestfs_scrub_file"
29053 #: ../src/guestfs-actions.pod:6264
29057 " guestfs_scrub_file (guestfs_h *g,\n"
29058 " const char *file);\n"
29063 #: ../src/guestfs-actions.pod:6280
29064 msgid "guestfs_scrub_freespace"
29068 #: ../src/guestfs-actions.pod:6282
29072 " guestfs_scrub_freespace (guestfs_h *g,\n"
29073 " const char *dir);\n"
29078 #: ../src/guestfs-actions.pod:6286
29080 "This command creates the directory C<dir> and then fills it with files until "
29081 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
29082 "and deletes them. The intention is to scrub any free space on the partition "
29083 "containing C<dir>."
29087 #: ../src/guestfs-actions.pod:6299
29088 msgid "guestfs_set_append"
29092 #: ../src/guestfs-actions.pod:6301
29096 " guestfs_set_append (guestfs_h *g,\n"
29097 " const char *append);\n"
29102 #: ../src/guestfs-actions.pod:6318
29103 msgid "guestfs_set_attach_method"
29107 #: ../src/guestfs-actions.pod:6320
29111 " guestfs_set_attach_method (guestfs_h *g,\n"
29112 " const char *attachmethod);\n"
29117 #: ../src/guestfs-actions.pod:6348
29118 msgid "guestfs_set_autosync"
29122 #: ../src/guestfs-actions.pod:6350
29126 " guestfs_set_autosync (guestfs_h *g,\n"
29127 " int autosync);\n"
29132 #: ../src/guestfs-actions.pod:6366
29133 msgid "guestfs_set_direct"
29137 #: ../src/guestfs-actions.pod:6368
29141 " guestfs_set_direct (guestfs_h *g,\n"
29147 #: ../src/guestfs-actions.pod:6376
29149 "One consequence of this is that log messages aren't caught by the library "
29150 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
29155 #: ../src/guestfs-actions.pod:6389
29156 msgid "guestfs_set_e2label"
29160 #: ../src/guestfs-actions.pod:6391
29164 " guestfs_set_e2label (guestfs_h *g,\n"
29165 " const char *device,\n"
29166 " const char *label);\n"
29171 #: ../src/guestfs-actions.pod:6400
29173 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
29174 "the existing label on a filesystem."
29178 #: ../src/guestfs-actions.pod:6407
29179 msgid "guestfs_set_e2uuid"
29183 #: ../src/guestfs-actions.pod:6409
29187 " guestfs_set_e2uuid (guestfs_h *g,\n"
29188 " const char *device,\n"
29189 " const char *uuid);\n"
29194 #: ../src/guestfs-actions.pod:6419
29196 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
29197 "the existing UUID of a filesystem."
29201 #: ../src/guestfs-actions.pod:6426
29202 msgid "guestfs_set_memsize"
29206 #: ../src/guestfs-actions.pod:6428
29210 " guestfs_set_memsize (guestfs_h *g,\n"
29216 #: ../src/guestfs-actions.pod:6432
29218 "This sets the memory size in megabytes allocated to the qemu subprocess. "
29219 "This only has any effect if called before C<guestfs_launch>."
29223 #: ../src/guestfs-actions.pod:6447
29224 msgid "guestfs_set_network"
29228 #: ../src/guestfs-actions.pod:6449
29232 " guestfs_set_network (guestfs_h *g,\n"
29238 #: ../src/guestfs-actions.pod:6459
29240 "You must call this before calling C<guestfs_launch>, otherwise it has no "
29245 #: ../src/guestfs-actions.pod:6466
29246 msgid "guestfs_set_path"
29250 #: ../src/guestfs-actions.pod:6468
29254 " guestfs_set_path (guestfs_h *g,\n"
29255 " const char *searchpath);\n"
29260 #: ../src/guestfs-actions.pod:6483
29261 msgid "guestfs_set_pgroup"
29265 #: ../src/guestfs-actions.pod:6485
29269 " guestfs_set_pgroup (guestfs_h *g,\n"
29275 #: ../src/guestfs-actions.pod:6502
29276 msgid "guestfs_set_qemu"
29280 #: ../src/guestfs-actions.pod:6504
29284 " guestfs_set_qemu (guestfs_h *g,\n"
29285 " const char *qemu);\n"
29290 #: ../src/guestfs-actions.pod:6530
29291 msgid "guestfs_set_recovery_proc"
29295 #: ../src/guestfs-actions.pod:6532
29299 " guestfs_set_recovery_proc (guestfs_h *g,\n"
29300 " int recoveryproc);\n"
29305 #: ../src/guestfs-actions.pod:6536
29307 "If this is called with the parameter C<false> then C<guestfs_launch> does "
29308 "not create a recovery process. The purpose of the recovery process is to "
29309 "stop runaway qemu processes in the case where the main program aborts "
29314 #: ../src/guestfs-actions.pod:6541
29316 "This only has any effect if called before C<guestfs_launch>, and the default "
29321 #: ../src/guestfs-actions.pod:6554
29322 msgid "guestfs_set_selinux"
29326 #: ../src/guestfs-actions.pod:6556
29330 " guestfs_set_selinux (guestfs_h *g,\n"
29336 #: ../src/guestfs-actions.pod:6573
29337 msgid "guestfs_set_smp"
29341 #: ../src/guestfs-actions.pod:6575
29345 " guestfs_set_smp (guestfs_h *g,\n"
29351 #: ../src/guestfs-actions.pod:6583
29352 msgid "This function must be called before C<guestfs_launch>."
29356 #: ../src/guestfs-actions.pod:6587
29357 msgid "guestfs_set_trace"
29361 #: ../src/guestfs-actions.pod:6589
29365 " guestfs_set_trace (guestfs_h *g,\n"
29371 #: ../src/guestfs-actions.pod:6603
29373 "Trace messages are normally sent to C<stderr>, unless you register a "
29374 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
29378 #: ../src/guestfs-actions.pod:6611
29379 msgid "guestfs_set_verbose"
29383 #: ../src/guestfs-actions.pod:6613
29387 " guestfs_set_verbose (guestfs_h *g,\n"
29393 #: ../src/guestfs-actions.pod:6622
29395 "Verbose messages are normally sent to C<stderr>, unless you register a "
29396 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
29400 #: ../src/guestfs-actions.pod:6630
29401 msgid "guestfs_setcon"
29405 #: ../src/guestfs-actions.pod:6632
29409 " guestfs_setcon (guestfs_h *g,\n"
29410 " const char *context);\n"
29415 #: ../src/guestfs-actions.pod:6645
29416 msgid "guestfs_setxattr"
29420 #: ../src/guestfs-actions.pod:6647
29424 " guestfs_setxattr (guestfs_h *g,\n"
29425 " const char *xattr,\n"
29426 " const char *val,\n"
29428 " const char *path);\n"
29433 #: ../src/guestfs-actions.pod:6658
29434 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
29438 #: ../src/guestfs-actions.pod:6664
29439 msgid "guestfs_sfdisk"
29443 #: ../src/guestfs-actions.pod:6666
29447 " guestfs_sfdisk (guestfs_h *g,\n"
29448 " const char *device,\n"
29452 " char *const *lines);\n"
29457 #: ../src/guestfs-actions.pod:6674 ../src/guestfs-actions.pod:6718
29458 #: ../src/guestfs-actions.pod:6752
29460 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
29465 #: ../src/guestfs-actions.pod:6701
29467 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
29471 #: ../src/guestfs-actions.pod:6711
29472 msgid "guestfs_sfdiskM"
29476 #: ../src/guestfs-actions.pod:6713
29480 " guestfs_sfdiskM (guestfs_h *g,\n"
29481 " const char *device,\n"
29482 " char *const *lines);\n"
29487 #: ../src/guestfs-actions.pod:6725
29489 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
29490 "partition sizes are specified in megabytes only (rounded to the nearest "
29491 "cylinder) and you don't need to specify the cyls, heads and sectors "
29492 "parameters which were rarely if ever used anyway."
29496 #: ../src/guestfs-actions.pod:6731
29498 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
29499 "C<guestfs_part_disk>"
29503 #: ../src/guestfs-actions.pod:6741
29504 msgid "guestfs_sfdisk_N"
29508 #: ../src/guestfs-actions.pod:6743
29512 " guestfs_sfdisk_N (guestfs_h *g,\n"
29513 " const char *device,\n"
29518 " const char *line);\n"
29523 #: ../src/guestfs-actions.pod:6762
29525 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
29526 "for the cyls/heads/sectors parameters."
29530 #: ../src/guestfs-actions.pod:6765
29531 msgid "See also: C<guestfs_part_add>"
29535 #: ../src/guestfs-actions.pod:6774
29536 msgid "guestfs_sfdisk_disk_geometry"
29540 #: ../src/guestfs-actions.pod:6776
29544 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
29545 " const char *device);\n"
29550 #: ../src/guestfs-actions.pod:6780
29552 "This displays the disk geometry of C<device> read from the partition table. "
29553 "Especially in the case where the underlying block device has been resized, "
29554 "this can be different from the kernel's idea of the geometry (see "
29555 "C<guestfs_sfdisk_kernel_geometry>)."
29559 #: ../src/guestfs-actions.pod:6793
29560 msgid "guestfs_sfdisk_kernel_geometry"
29564 #: ../src/guestfs-actions.pod:6795
29568 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
29569 " const char *device);\n"
29574 #: ../src/guestfs-actions.pod:6809
29575 msgid "guestfs_sfdisk_l"
29579 #: ../src/guestfs-actions.pod:6811
29583 " guestfs_sfdisk_l (guestfs_h *g,\n"
29584 " const char *device);\n"
29589 #: ../src/guestfs-actions.pod:6815
29591 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
29596 #: ../src/guestfs-actions.pod:6826
29597 msgid "See also: C<guestfs_part_list>"
29601 #: ../src/guestfs-actions.pod:6833
29606 #: ../src/guestfs-actions.pod:6835
29610 " guestfs_sh (guestfs_h *g,\n"
29611 " const char *command);\n"
29616 #: ../src/guestfs-actions.pod:6842
29617 msgid "This is like C<guestfs_command>, but passes the command to:"
29621 #: ../src/guestfs-actions.pod:6850
29622 msgid "All the provisos about C<guestfs_command> apply to this call."
29626 #: ../src/guestfs-actions.pod:6857
29627 msgid "guestfs_sh_lines"
29631 #: ../src/guestfs-actions.pod:6859
29635 " guestfs_sh_lines (guestfs_h *g,\n"
29636 " const char *command);\n"
29641 #: ../src/guestfs-actions.pod:6863
29643 "This is the same as C<guestfs_sh>, but splits the result into a list of "
29648 #: ../src/guestfs-actions.pod:6866
29649 msgid "See also: C<guestfs_command_lines>"
29653 #: ../src/guestfs-actions.pod:6874
29654 msgid "guestfs_sleep"
29658 #: ../src/guestfs-actions.pod:6876
29662 " guestfs_sleep (guestfs_h *g,\n"
29668 #: ../src/guestfs-actions.pod:6884
29669 msgid "(Added in 1.0.41)"
29673 #: ../src/guestfs-actions.pod:6886 ../src/guestfs-structs.pod:109
29674 msgid "guestfs_stat"
29678 #: ../src/guestfs-actions.pod:6888
29681 " struct guestfs_stat *\n"
29682 " guestfs_stat (guestfs_h *g,\n"
29683 " const char *path);\n"
29688 #: ../src/guestfs-actions.pod:6902 ../src/guestfs-structs.pod:135
29689 msgid "guestfs_statvfs"
29693 #: ../src/guestfs-actions.pod:6904
29696 " struct guestfs_statvfs *\n"
29697 " guestfs_statvfs (guestfs_h *g,\n"
29698 " const char *path);\n"
29703 #: ../src/guestfs-actions.pod:6914
29705 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
29706 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
29710 #: ../src/guestfs-actions.pod:6920
29711 msgid "guestfs_strings"
29715 #: ../src/guestfs-actions.pod:6922
29719 " guestfs_strings (guestfs_h *g,\n"
29720 " const char *path);\n"
29725 #: ../src/guestfs-actions.pod:6938
29726 msgid "guestfs_strings_e"
29730 #: ../src/guestfs-actions.pod:6940
29734 " guestfs_strings_e (guestfs_h *g,\n"
29735 " const char *encoding,\n"
29736 " const char *path);\n"
29741 #: ../src/guestfs-actions.pod:6945
29743 "This is like the C<guestfs_strings> command, but allows you to specify the "
29744 "encoding of strings that are looked for in the source file C<path>."
29748 #: ../src/guestfs-actions.pod:6955
29750 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
29751 "ISO-8859-X (this is what C<guestfs_strings> uses)."
29755 #: ../src/guestfs-actions.pod:6993
29756 msgid "guestfs_swapoff_device"
29760 #: ../src/guestfs-actions.pod:6995
29764 " guestfs_swapoff_device (guestfs_h *g,\n"
29765 " const char *device);\n"
29770 #: ../src/guestfs-actions.pod:6999
29772 "This command disables the libguestfs appliance swap device or partition "
29773 "named C<device>. See C<guestfs_swapon_device>."
29777 #: ../src/guestfs-actions.pod:7007
29778 msgid "guestfs_swapoff_file"
29782 #: ../src/guestfs-actions.pod:7009
29786 " guestfs_swapoff_file (guestfs_h *g,\n"
29787 " const char *file);\n"
29792 #: ../src/guestfs-actions.pod:7019
29793 msgid "guestfs_swapoff_label"
29797 #: ../src/guestfs-actions.pod:7021
29801 " guestfs_swapoff_label (guestfs_h *g,\n"
29802 " const char *label);\n"
29807 #: ../src/guestfs-actions.pod:7032
29808 msgid "guestfs_swapoff_uuid"
29812 #: ../src/guestfs-actions.pod:7034
29816 " guestfs_swapoff_uuid (guestfs_h *g,\n"
29817 " const char *uuid);\n"
29822 #: ../src/guestfs-actions.pod:7045
29823 msgid "guestfs_swapon_device"
29827 #: ../src/guestfs-actions.pod:7047
29831 " guestfs_swapon_device (guestfs_h *g,\n"
29832 " const char *device);\n"
29837 #: ../src/guestfs-actions.pod:7051
29839 "This command enables the libguestfs appliance to use the swap device or "
29840 "partition named C<device>. The increased memory is made available for all "
29841 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
29845 #: ../src/guestfs-actions.pod:7067
29846 msgid "guestfs_swapon_file"
29850 #: ../src/guestfs-actions.pod:7069
29854 " guestfs_swapon_file (guestfs_h *g,\n"
29855 " const char *file);\n"
29860 #: ../src/guestfs-actions.pod:7073
29862 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
29867 #: ../src/guestfs-actions.pod:7080
29868 msgid "guestfs_swapon_label"
29872 #: ../src/guestfs-actions.pod:7082
29876 " guestfs_swapon_label (guestfs_h *g,\n"
29877 " const char *label);\n"
29882 #: ../src/guestfs-actions.pod:7086
29884 "This command enables swap to a labeled swap partition. See "
29885 "C<guestfs_swapon_device> for other notes."
29889 #: ../src/guestfs-actions.pod:7093
29890 msgid "guestfs_swapon_uuid"
29894 #: ../src/guestfs-actions.pod:7095
29898 " guestfs_swapon_uuid (guestfs_h *g,\n"
29899 " const char *uuid);\n"
29904 #: ../src/guestfs-actions.pod:7099
29906 "This command enables swap to a swap partition with the given UUID. See "
29907 "C<guestfs_swapon_device> for other notes."
29911 #: ../src/guestfs-actions.pod:7106
29912 msgid "guestfs_sync"
29916 #: ../src/guestfs-actions.pod:7108
29920 " guestfs_sync (guestfs_h *g);\n"
29925 #: ../src/guestfs-actions.pod:7121
29926 msgid "guestfs_tail"
29930 #: ../src/guestfs-actions.pod:7123
29934 " guestfs_tail (guestfs_h *g,\n"
29935 " const char *path);\n"
29940 #: ../src/guestfs-actions.pod:7139
29941 msgid "guestfs_tail_n"
29945 #: ../src/guestfs-actions.pod:7141
29949 " guestfs_tail_n (guestfs_h *g,\n"
29951 " const char *path);\n"
29956 #: ../src/guestfs-actions.pod:7163
29957 msgid "guestfs_tar_in"
29961 #: ../src/guestfs-actions.pod:7165
29965 " guestfs_tar_in (guestfs_h *g,\n"
29966 " const char *tarfile,\n"
29967 " const char *directory);\n"
29972 #: ../src/guestfs-actions.pod:7173
29974 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
29978 #: ../src/guestfs-actions.pod:7178 ../src/guestfs-actions.pod:7195
29979 #: ../src/guestfs-actions.pod:7211 ../src/guestfs-actions.pod:7227
29980 msgid "(Added in 1.0.3)"
29984 #: ../src/guestfs-actions.pod:7180
29985 msgid "guestfs_tar_out"
29989 #: ../src/guestfs-actions.pod:7182
29993 " guestfs_tar_out (guestfs_h *g,\n"
29994 " const char *directory,\n"
29995 " const char *tarfile);\n"
30000 #: ../src/guestfs-actions.pod:7190
30002 "To download a compressed tarball, use C<guestfs_tgz_out> or "
30003 "C<guestfs_txz_out>."
30007 #: ../src/guestfs-actions.pod:7197
30008 msgid "guestfs_tgz_in"
30012 #: ../src/guestfs-actions.pod:7199
30016 " guestfs_tgz_in (guestfs_h *g,\n"
30017 " const char *tarball,\n"
30018 " const char *directory);\n"
30023 #: ../src/guestfs-actions.pod:7207
30024 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
30028 #: ../src/guestfs-actions.pod:7213
30029 msgid "guestfs_tgz_out"
30033 #: ../src/guestfs-actions.pod:7215
30037 " guestfs_tgz_out (guestfs_h *g,\n"
30038 " const char *directory,\n"
30039 " const char *tarball);\n"
30044 #: ../src/guestfs-actions.pod:7223
30045 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
30049 #: ../src/guestfs-actions.pod:7229
30050 msgid "guestfs_touch"
30054 #: ../src/guestfs-actions.pod:7231
30058 " guestfs_touch (guestfs_h *g,\n"
30059 " const char *path);\n"
30064 #: ../src/guestfs-actions.pod:7246
30065 msgid "guestfs_truncate"
30069 #: ../src/guestfs-actions.pod:7248
30073 " guestfs_truncate (guestfs_h *g,\n"
30074 " const char *path);\n"
30079 #: ../src/guestfs-actions.pod:7259
30080 msgid "guestfs_truncate_size"
30084 #: ../src/guestfs-actions.pod:7261
30088 " guestfs_truncate_size (guestfs_h *g,\n"
30089 " const char *path,\n"
30090 " int64_t size);\n"
30095 #: ../src/guestfs-actions.pod:7269
30097 "If the current file size is less than C<size> then the file is extended to "
30098 "the required size with zero bytes. This creates a sparse file (ie. disk "
30099 "blocks are not allocated for the file until you write to it). To create a "
30100 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
30104 #: ../src/guestfs-actions.pod:7279
30105 msgid "guestfs_tune2fs_l"
30109 #: ../src/guestfs-actions.pod:7281
30113 " guestfs_tune2fs_l (guestfs_h *g,\n"
30114 " const char *device);\n"
30119 #: ../src/guestfs-actions.pod:7301
30120 msgid "guestfs_txz_in"
30124 #: ../src/guestfs-actions.pod:7303
30128 " guestfs_txz_in (guestfs_h *g,\n"
30129 " const char *tarball,\n"
30130 " const char *directory);\n"
30135 #: ../src/guestfs-actions.pod:7315
30136 msgid "guestfs_txz_out"
30140 #: ../src/guestfs-actions.pod:7317
30144 " guestfs_txz_out (guestfs_h *g,\n"
30145 " const char *directory,\n"
30146 " const char *tarball);\n"
30151 #: ../src/guestfs-actions.pod:7329
30152 msgid "guestfs_umask"
30156 #: ../src/guestfs-actions.pod:7331
30160 " guestfs_umask (guestfs_h *g,\n"
30166 #: ../src/guestfs-actions.pod:7347
30168 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
30169 "C<guestfs_mkdir>."
30173 #: ../src/guestfs-actions.pod:7356
30174 msgid "guestfs_umount"
30178 #: ../src/guestfs-actions.pod:7358
30182 " guestfs_umount (guestfs_h *g,\n"
30183 " const char *pathordevice);\n"
30188 #: ../src/guestfs-actions.pod:7370
30189 msgid "guestfs_umount_all"
30193 #: ../src/guestfs-actions.pod:7372
30197 " guestfs_umount_all (guestfs_h *g);\n"
30202 #: ../src/guestfs-actions.pod:7383
30203 msgid "guestfs_upload"
30207 #: ../src/guestfs-actions.pod:7385
30211 " guestfs_upload (guestfs_h *g,\n"
30212 " const char *filename,\n"
30213 " const char *remotefilename);\n"
30218 #: ../src/guestfs-actions.pod:7395
30219 msgid "See also C<guestfs_download>."
30223 #: ../src/guestfs-actions.pod:7406
30224 msgid "guestfs_upload_offset"
30228 #: ../src/guestfs-actions.pod:7408
30232 " guestfs_upload_offset (guestfs_h *g,\n"
30233 " const char *filename,\n"
30234 " const char *remotefilename,\n"
30235 " int64_t offset);\n"
30240 #: ../src/guestfs-actions.pod:7424
30242 "Note that there is no limit on the amount of data that can be uploaded with "
30243 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
30244 "full amount unless an error occurs."
30248 #: ../src/guestfs-actions.pod:7429
30249 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
30253 #: ../src/guestfs-actions.pod:7440
30254 msgid "guestfs_utimens"
30258 #: ../src/guestfs-actions.pod:7442
30262 " guestfs_utimens (guestfs_h *g,\n"
30263 " const char *path,\n"
30264 " int64_t atsecs,\n"
30265 " int64_t atnsecs,\n"
30266 " int64_t mtsecs,\n"
30267 " int64_t mtnsecs);\n"
30272 #: ../src/guestfs-actions.pod:7471 ../src/guestfs-structs.pod:175
30273 msgid "guestfs_version"
30277 #: ../src/guestfs-actions.pod:7473
30280 " struct guestfs_version *\n"
30281 " guestfs_version (guestfs_h *g);\n"
30286 #: ../src/guestfs-actions.pod:7501
30288 "I<Note:> Don't use this call to test for availability of features. In "
30289 "enterprise distributions we backport features from later versions into "
30290 "earlier versions, making this an unreliable way to test for features. Use "
30291 "C<guestfs_available> instead."
30295 #: ../src/guestfs-actions.pod:7507
30297 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
30298 "error. I<The caller must call C<guestfs_free_version> after use>."
30302 #: ../src/guestfs-actions.pod:7511
30303 msgid "(Added in 1.0.58)"
30307 #: ../src/guestfs-actions.pod:7513
30308 msgid "guestfs_vfs_label"
30312 #: ../src/guestfs-actions.pod:7515
30316 " guestfs_vfs_label (guestfs_h *g,\n"
30317 " const char *device);\n"
30322 #: ../src/guestfs-actions.pod:7524
30323 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
30327 #: ../src/guestfs-actions.pod:7529 ../src/guestfs-actions.pod:7566
30328 msgid "(Added in 1.3.18)"
30332 #: ../src/guestfs-actions.pod:7531
30333 msgid "guestfs_vfs_type"
30337 #: ../src/guestfs-actions.pod:7533
30341 " guestfs_vfs_type (guestfs_h *g,\n"
30342 " const char *device);\n"
30347 #: ../src/guestfs-actions.pod:7550
30348 msgid "guestfs_vfs_uuid"
30352 #: ../src/guestfs-actions.pod:7552
30356 " guestfs_vfs_uuid (guestfs_h *g,\n"
30357 " const char *device);\n"
30362 #: ../src/guestfs-actions.pod:7561
30363 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
30367 #: ../src/guestfs-actions.pod:7568
30368 msgid "guestfs_vg_activate"
30372 #: ../src/guestfs-actions.pod:7570
30376 " guestfs_vg_activate (guestfs_h *g,\n"
30378 " char *const *volgroups);\n"
30383 #: ../src/guestfs-actions.pod:7587
30384 msgid "guestfs_vg_activate_all"
30388 #: ../src/guestfs-actions.pod:7589
30392 " guestfs_vg_activate_all (guestfs_h *g,\n"
30393 " int activate);\n"
30398 #: ../src/guestfs-actions.pod:7602
30399 msgid "guestfs_vgcreate"
30403 #: ../src/guestfs-actions.pod:7604
30407 " guestfs_vgcreate (guestfs_h *g,\n"
30408 " const char *volgroup,\n"
30409 " char *const *physvols);\n"
30414 #: ../src/guestfs-actions.pod:7616
30415 msgid "guestfs_vglvuuids"
30419 #: ../src/guestfs-actions.pod:7618
30423 " guestfs_vglvuuids (guestfs_h *g,\n"
30424 " const char *vgname);\n"
30429 #: ../src/guestfs-actions.pod:7625
30431 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
30432 "associate logical volumes and volume groups."
30436 #: ../src/guestfs-actions.pod:7628
30437 msgid "See also C<guestfs_vgpvuuids>."
30441 #: ../src/guestfs-actions.pod:7636
30442 msgid "guestfs_vgpvuuids"
30446 #: ../src/guestfs-actions.pod:7638
30450 " guestfs_vgpvuuids (guestfs_h *g,\n"
30451 " const char *vgname);\n"
30456 #: ../src/guestfs-actions.pod:7645
30458 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
30459 "associate physical volumes and volume groups."
30463 #: ../src/guestfs-actions.pod:7648
30464 msgid "See also C<guestfs_vglvuuids>."
30468 #: ../src/guestfs-actions.pod:7656
30469 msgid "guestfs_vgremove"
30473 #: ../src/guestfs-actions.pod:7658
30477 " guestfs_vgremove (guestfs_h *g,\n"
30478 " const char *vgname);\n"
30483 #: ../src/guestfs-actions.pod:7671
30484 msgid "guestfs_vgrename"
30488 #: ../src/guestfs-actions.pod:7673
30492 " guestfs_vgrename (guestfs_h *g,\n"
30493 " const char *volgroup,\n"
30494 " const char *newvolgroup);\n"
30499 #: ../src/guestfs-actions.pod:7684
30500 msgid "guestfs_vgs"
30504 #: ../src/guestfs-actions.pod:7686
30508 " guestfs_vgs (guestfs_h *g);\n"
30513 #: ../src/guestfs-actions.pod:7695
30514 msgid "See also C<guestfs_vgs_full>."
30518 #: ../src/guestfs-actions.pod:7703
30519 msgid "guestfs_vgs_full"
30523 #: ../src/guestfs-actions.pod:7705
30526 " struct guestfs_lvm_vg_list *\n"
30527 " guestfs_vgs_full (guestfs_h *g);\n"
30532 #: ../src/guestfs-actions.pod:7711
30534 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
30535 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
30539 #: ../src/guestfs-actions.pod:7717
30540 msgid "guestfs_vgscan"
30544 #: ../src/guestfs-actions.pod:7719
30548 " guestfs_vgscan (guestfs_h *g);\n"
30553 #: ../src/guestfs-actions.pod:7729
30554 msgid "guestfs_vguuid"
30558 #: ../src/guestfs-actions.pod:7731
30562 " guestfs_vguuid (guestfs_h *g,\n"
30563 " const char *vgname);\n"
30568 #: ../src/guestfs-actions.pod:7742
30569 msgid "guestfs_wait_ready"
30573 #: ../src/guestfs-actions.pod:7744
30577 " guestfs_wait_ready (guestfs_h *g);\n"
30582 #: ../src/guestfs-actions.pod:7747
30584 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
30589 #: ../src/guestfs-actions.pod:7754
30590 msgid "This function is a no op."
30594 #: ../src/guestfs-actions.pod:7756
30596 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
30597 "calling C<guestfs_launch> to wait for the launch to complete. However this "
30598 "is no longer necessary because C<guestfs_launch> now does the waiting."
30602 #: ../src/guestfs-actions.pod:7761
30604 "If you see any calls to this function in code then you can just remove them, "
30605 "unless you want to retain compatibility with older versions of the API."
30609 #: ../src/guestfs-actions.pod:7769
30610 msgid "guestfs_wc_c"
30614 #: ../src/guestfs-actions.pod:7771
30618 " guestfs_wc_c (guestfs_h *g,\n"
30619 " const char *path);\n"
30624 #: ../src/guestfs-actions.pod:7782
30625 msgid "guestfs_wc_l"
30629 #: ../src/guestfs-actions.pod:7784
30633 " guestfs_wc_l (guestfs_h *g,\n"
30634 " const char *path);\n"
30639 #: ../src/guestfs-actions.pod:7795
30640 msgid "guestfs_wc_w"
30644 #: ../src/guestfs-actions.pod:7797
30648 " guestfs_wc_w (guestfs_h *g,\n"
30649 " const char *path);\n"
30654 #: ../src/guestfs-actions.pod:7808
30655 msgid "guestfs_write"
30659 #: ../src/guestfs-actions.pod:7810
30663 " guestfs_write (guestfs_h *g,\n"
30664 " const char *path,\n"
30665 " const char *content,\n"
30666 " size_t content_size);\n"
30671 #: ../src/guestfs-actions.pod:7819
30672 msgid "See also C<guestfs_write_append>."
30676 #: ../src/guestfs-actions.pod:7828
30677 msgid "guestfs_write_append"
30681 #: ../src/guestfs-actions.pod:7830
30685 " guestfs_write_append (guestfs_h *g,\n"
30686 " const char *path,\n"
30687 " const char *content,\n"
30688 " size_t content_size);\n"
30693 #: ../src/guestfs-actions.pod:7839
30694 msgid "See also C<guestfs_write>."
30698 #: ../src/guestfs-actions.pod:7848
30699 msgid "guestfs_write_file"
30703 #: ../src/guestfs-actions.pod:7850
30707 " guestfs_write_file (guestfs_h *g,\n"
30708 " const char *path,\n"
30709 " const char *content,\n"
30715 #: ../src/guestfs-actions.pod:7856
30717 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
30722 #: ../src/guestfs-actions.pod:7881
30723 msgid "guestfs_zegrep"
30727 #: ../src/guestfs-actions.pod:7883
30731 " guestfs_zegrep (guestfs_h *g,\n"
30732 " const char *regex,\n"
30733 " const char *path);\n"
30738 #: ../src/guestfs-actions.pod:7900
30739 msgid "guestfs_zegrepi"
30743 #: ../src/guestfs-actions.pod:7902
30747 " guestfs_zegrepi (guestfs_h *g,\n"
30748 " const char *regex,\n"
30749 " const char *path);\n"
30754 #: ../src/guestfs-actions.pod:7919
30755 msgid "guestfs_zero"
30759 #: ../src/guestfs-actions.pod:7921
30763 " guestfs_zero (guestfs_h *g,\n"
30764 " const char *device);\n"
30769 #: ../src/guestfs-actions.pod:7935
30771 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
30772 "C<guestfs_is_zero_device>"
30776 #: ../src/guestfs-actions.pod:7947
30777 msgid "guestfs_zero_device"
30781 #: ../src/guestfs-actions.pod:7949
30785 " guestfs_zero_device (guestfs_h *g,\n"
30786 " const char *device);\n"
30791 #: ../src/guestfs-actions.pod:7953
30793 "This command writes zeroes over the entire C<device>. Compare with "
30794 "C<guestfs_zero> which just zeroes the first few blocks of a device."
30798 #: ../src/guestfs-actions.pod:7971
30799 msgid "(Added in 1.3.1)"
30803 #: ../src/guestfs-actions.pod:7973
30804 msgid "guestfs_zerofree"
30808 #: ../src/guestfs-actions.pod:7975
30812 " guestfs_zerofree (guestfs_h *g,\n"
30813 " const char *device);\n"
30818 #: ../src/guestfs-actions.pod:7994
30819 msgid "guestfs_zfgrep"
30823 #: ../src/guestfs-actions.pod:7996
30827 " guestfs_zfgrep (guestfs_h *g,\n"
30828 " const char *pattern,\n"
30829 " const char *path);\n"
30834 #: ../src/guestfs-actions.pod:8013
30835 msgid "guestfs_zfgrepi"
30839 #: ../src/guestfs-actions.pod:8015
30843 " guestfs_zfgrepi (guestfs_h *g,\n"
30844 " const char *pattern,\n"
30845 " const char *path);\n"
30850 #: ../src/guestfs-actions.pod:8032
30851 msgid "guestfs_zfile"
30855 #: ../src/guestfs-actions.pod:8034
30859 " guestfs_zfile (guestfs_h *g,\n"
30860 " const char *meth,\n"
30861 " const char *path);\n"
30866 #: ../src/guestfs-actions.pod:8039
30868 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
30873 #: ../src/guestfs-actions.pod:8051
30875 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
30880 #: ../src/guestfs-actions.pod:8059
30881 msgid "guestfs_zgrep"
30885 #: ../src/guestfs-actions.pod:8061
30889 " guestfs_zgrep (guestfs_h *g,\n"
30890 " const char *regex,\n"
30891 " const char *path);\n"
30896 #: ../src/guestfs-actions.pod:8078
30897 msgid "guestfs_zgrepi"
30901 #: ../src/guestfs-actions.pod:8080
30905 " guestfs_zgrepi (guestfs_h *g,\n"
30906 " const char *regex,\n"
30907 " const char *path);\n"
30912 #: ../src/guestfs-availability.pod:3
30917 #: ../src/guestfs-availability.pod:5
30919 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
30920 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
30921 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
30922 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
30923 "L</guestfs_aug_save> L</guestfs_aug_set>"
30927 #: ../src/guestfs-availability.pod:21
30932 #: ../src/guestfs-availability.pod:23
30933 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
30937 #: ../src/guestfs-availability.pod:26
30942 #: ../src/guestfs-availability.pod:28
30943 msgid "The following functions: L</guestfs_grub_install>"
30947 #: ../src/guestfs-availability.pod:31
30952 #: ../src/guestfs-availability.pod:33
30954 "The following functions: L</guestfs_inotify_add_watch> L</"
30955 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
30956 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
30960 #: ../src/guestfs-availability.pod:41
30961 msgid "B<linuxfsuuid>"
30965 #: ../src/guestfs-availability.pod:43
30967 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
30968 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
30972 #: ../src/guestfs-availability.pod:50
30973 msgid "B<linuxmodules>"
30977 #: ../src/guestfs-availability.pod:52
30978 msgid "The following functions: L</guestfs_modprobe>"
30982 #: ../src/guestfs-availability.pod:55
30983 msgid "B<linuxxattrs>"
30987 #: ../src/guestfs-availability.pod:57
30989 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
30990 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
30991 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
30992 "guestfs_setxattr>"
30996 #: ../src/guestfs-availability.pod:68
31001 #: ../src/guestfs-availability.pod:70
31003 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
31004 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
31005 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
31009 #: ../src/guestfs-availability.pod:79
31014 #: ../src/guestfs-availability.pod:81
31016 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
31017 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
31018 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
31019 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
31020 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
31021 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
31022 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
31026 #: ../src/guestfs-availability.pod:104
31031 #: ../src/guestfs-availability.pod:106
31033 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
31034 "guestfs_mknod_b> L</guestfs_mknod_c>"
31038 #: ../src/guestfs-availability.pod:112
31043 #: ../src/guestfs-availability.pod:114
31044 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
31048 #: ../src/guestfs-availability.pod:117
31049 msgid "B<ntfsprogs>"
31053 #: ../src/guestfs-availability.pod:119
31055 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
31056 "L</guestfs_ntfsresize_size>"
31060 #: ../src/guestfs-availability.pod:124
31061 msgid "B<realpath>"
31065 #: ../src/guestfs-availability.pod:126
31066 msgid "The following functions: L</guestfs_realpath>"
31070 #: ../src/guestfs-availability.pod:129
31075 #: ../src/guestfs-availability.pod:131
31077 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
31078 "guestfs_scrub_freespace>"
31082 #: ../src/guestfs-availability.pod:136
31087 #: ../src/guestfs-availability.pod:138
31088 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
31092 #: ../src/guestfs-availability.pod:142
31097 #: ../src/guestfs-availability.pod:144
31098 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
31102 #: ../src/guestfs-availability.pod:148
31103 msgid "B<zerofree>"
31107 #: ../src/guestfs-availability.pod:150
31108 msgid "The following functions: L</guestfs_zerofree>"
31112 #: ../src/guestfs-structs.pod:1
31113 msgid "guestfs_int_bool"
31117 #: ../src/guestfs-structs.pod:3
31120 " struct guestfs_int_bool {\n"
31128 #: ../src/guestfs-structs.pod:8
31131 " struct guestfs_int_bool_list {\n"
31132 " uint32_t len; /* Number of elements in list. */\n"
31133 " struct guestfs_int_bool *val; /* Elements. */\n"
31139 #: ../src/guestfs-structs.pod:13
31142 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
31143 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
31148 #: ../src/guestfs-structs.pod:16
31149 msgid "guestfs_lvm_pv"
31153 #: ../src/guestfs-structs.pod:18
31156 " struct guestfs_lvm_pv {\n"
31157 " char *pv_name;\n"
31158 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
31159 " char pv_uuid[32];\n"
31161 " uint64_t pv_size;\n"
31162 " uint64_t dev_size;\n"
31163 " uint64_t pv_free;\n"
31164 " uint64_t pv_used;\n"
31165 " char *pv_attr;\n"
31166 " int64_t pv_pe_count;\n"
31167 " int64_t pv_pe_alloc_count;\n"
31168 " char *pv_tags;\n"
31169 " uint64_t pe_start;\n"
31170 " int64_t pv_mda_count;\n"
31171 " uint64_t pv_mda_free;\n"
31177 #: ../src/guestfs-structs.pod:36
31180 " struct guestfs_lvm_pv_list {\n"
31181 " uint32_t len; /* Number of elements in list. */\n"
31182 " struct guestfs_lvm_pv *val; /* Elements. */\n"
31188 #: ../src/guestfs-structs.pod:41
31191 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
31192 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
31197 #: ../src/guestfs-structs.pod:44
31198 msgid "guestfs_lvm_vg"
31202 #: ../src/guestfs-structs.pod:46
31205 " struct guestfs_lvm_vg {\n"
31206 " char *vg_name;\n"
31207 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
31208 " char vg_uuid[32];\n"
31210 " char *vg_attr;\n"
31211 " uint64_t vg_size;\n"
31212 " uint64_t vg_free;\n"
31213 " char *vg_sysid;\n"
31214 " uint64_t vg_extent_size;\n"
31215 " int64_t vg_extent_count;\n"
31216 " int64_t vg_free_count;\n"
31217 " int64_t max_lv;\n"
31218 " int64_t max_pv;\n"
31219 " int64_t pv_count;\n"
31220 " int64_t lv_count;\n"
31221 " int64_t snap_count;\n"
31222 " int64_t vg_seqno;\n"
31223 " char *vg_tags;\n"
31224 " int64_t vg_mda_count;\n"
31225 " uint64_t vg_mda_free;\n"
31231 #: ../src/guestfs-structs.pod:69
31234 " struct guestfs_lvm_vg_list {\n"
31235 " uint32_t len; /* Number of elements in list. */\n"
31236 " struct guestfs_lvm_vg *val; /* Elements. */\n"
31242 #: ../src/guestfs-structs.pod:74
31245 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
31246 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
31251 #: ../src/guestfs-structs.pod:77
31252 msgid "guestfs_lvm_lv"
31256 #: ../src/guestfs-structs.pod:79
31259 " struct guestfs_lvm_lv {\n"
31260 " char *lv_name;\n"
31261 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
31262 " char lv_uuid[32];\n"
31263 " char *lv_attr;\n"
31264 " int64_t lv_major;\n"
31265 " int64_t lv_minor;\n"
31266 " int64_t lv_kernel_major;\n"
31267 " int64_t lv_kernel_minor;\n"
31268 " uint64_t lv_size;\n"
31269 " int64_t seg_count;\n"
31271 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
31272 " float snap_percent;\n"
31273 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
31274 " float copy_percent;\n"
31275 " char *move_pv;\n"
31276 " char *lv_tags;\n"
31277 " char *mirror_log;\n"
31278 " char *modules;\n"
31284 #: ../src/guestfs-structs.pod:101
31287 " struct guestfs_lvm_lv_list {\n"
31288 " uint32_t len; /* Number of elements in list. */\n"
31289 " struct guestfs_lvm_lv *val; /* Elements. */\n"
31295 #: ../src/guestfs-structs.pod:106
31298 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
31299 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
31304 #: ../src/guestfs-structs.pod:111
31307 " struct guestfs_stat {\n"
31311 " int64_t nlink;\n"
31316 " int64_t blksize;\n"
31317 " int64_t blocks;\n"
31318 " int64_t atime;\n"
31319 " int64_t mtime;\n"
31320 " int64_t ctime;\n"
31326 #: ../src/guestfs-structs.pod:127
31329 " struct guestfs_stat_list {\n"
31330 " uint32_t len; /* Number of elements in list. */\n"
31331 " struct guestfs_stat *val; /* Elements. */\n"
31337 #: ../src/guestfs-structs.pod:132
31340 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
31341 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
31346 #: ../src/guestfs-structs.pod:137
31349 " struct guestfs_statvfs {\n"
31350 " int64_t bsize;\n"
31351 " int64_t frsize;\n"
31352 " int64_t blocks;\n"
31353 " int64_t bfree;\n"
31354 " int64_t bavail;\n"
31355 " int64_t files;\n"
31356 " int64_t ffree;\n"
31357 " int64_t favail;\n"
31360 " int64_t namemax;\n"
31366 #: ../src/guestfs-structs.pod:151
31369 " struct guestfs_statvfs_list {\n"
31370 " uint32_t len; /* Number of elements in list. */\n"
31371 " struct guestfs_statvfs *val; /* Elements. */\n"
31377 #: ../src/guestfs-structs.pod:156
31380 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
31381 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
31386 #: ../src/guestfs-structs.pod:159
31387 msgid "guestfs_dirent"
31391 #: ../src/guestfs-structs.pod:161
31394 " struct guestfs_dirent {\n"
31403 #: ../src/guestfs-structs.pod:167
31406 " struct guestfs_dirent_list {\n"
31407 " uint32_t len; /* Number of elements in list. */\n"
31408 " struct guestfs_dirent *val; /* Elements. */\n"
31414 #: ../src/guestfs-structs.pod:172
31417 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
31418 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
31423 #: ../src/guestfs-structs.pod:177
31426 " struct guestfs_version {\n"
31427 " int64_t major;\n"
31428 " int64_t minor;\n"
31429 " int64_t release;\n"
31436 #: ../src/guestfs-structs.pod:184
31439 " struct guestfs_version_list {\n"
31440 " uint32_t len; /* Number of elements in list. */\n"
31441 " struct guestfs_version *val; /* Elements. */\n"
31447 #: ../src/guestfs-structs.pod:189
31450 " void guestfs_free_version (struct guestfs_free_version *);\n"
31451 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
31456 #: ../src/guestfs-structs.pod:192
31457 msgid "guestfs_xattr"
31461 #: ../src/guestfs-structs.pod:194
31464 " struct guestfs_xattr {\n"
31465 " char *attrname;\n"
31466 " /* The next two fields describe a byte array. */\n"
31467 " uint32_t attrval_len;\n"
31468 " char *attrval;\n"
31474 #: ../src/guestfs-structs.pod:201
31477 " struct guestfs_xattr_list {\n"
31478 " uint32_t len; /* Number of elements in list. */\n"
31479 " struct guestfs_xattr *val; /* Elements. */\n"
31485 #: ../src/guestfs-structs.pod:206
31488 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
31489 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
31494 #: ../src/guestfs-structs.pod:209
31495 msgid "guestfs_inotify_event"
31499 #: ../src/guestfs-structs.pod:211
31502 " struct guestfs_inotify_event {\n"
31503 " int64_t in_wd;\n"
31504 " uint32_t in_mask;\n"
31505 " uint32_t in_cookie;\n"
31506 " char *in_name;\n"
31512 #: ../src/guestfs-structs.pod:218
31515 " struct guestfs_inotify_event_list {\n"
31516 " uint32_t len; /* Number of elements in list. */\n"
31517 " struct guestfs_inotify_event *val; /* Elements. */\n"
31523 #: ../src/guestfs-structs.pod:223
31526 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
31527 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
31532 #: ../src/guestfs-structs.pod:226
31533 msgid "guestfs_partition"
31537 #: ../src/guestfs-structs.pod:228
31540 " struct guestfs_partition {\n"
31541 " int32_t part_num;\n"
31542 " uint64_t part_start;\n"
31543 " uint64_t part_end;\n"
31544 " uint64_t part_size;\n"
31550 #: ../src/guestfs-structs.pod:235
31553 " struct guestfs_partition_list {\n"
31554 " uint32_t len; /* Number of elements in list. */\n"
31555 " struct guestfs_partition *val; /* Elements. */\n"
31561 #: ../src/guestfs-structs.pod:240
31564 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
31565 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
31570 #: ../src/guestfs-structs.pod:243
31571 msgid "guestfs_application"
31575 #: ../src/guestfs-structs.pod:245
31578 " struct guestfs_application {\n"
31579 " char *app_name;\n"
31580 " char *app_display_name;\n"
31581 " int32_t app_epoch;\n"
31582 " char *app_version;\n"
31583 " char *app_release;\n"
31584 " char *app_install_path;\n"
31585 " char *app_trans_path;\n"
31586 " char *app_publisher;\n"
31587 " char *app_url;\n"
31588 " char *app_source_package;\n"
31589 " char *app_summary;\n"
31590 " char *app_description;\n"
31596 #: ../src/guestfs-structs.pod:260
31599 " struct guestfs_application_list {\n"
31600 " uint32_t len; /* Number of elements in list. */\n"
31601 " struct guestfs_application *val; /* Elements. */\n"
31607 #: ../src/guestfs-structs.pod:265
31610 " void guestfs_free_application (struct guestfs_free_application *);\n"
31611 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
31616 #: ../src/guestfs.pod:5
31617 msgid "guestfs - Library for accessing and modifying virtual machine images"
31621 #: ../src/guestfs.pod:11
31624 " guestfs_h *g = guestfs_create ();\n"
31625 " guestfs_add_drive (g, \"guest.img\");\n"
31626 " guestfs_launch (g);\n"
31627 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
31628 " guestfs_touch (g, \"/hello\");\n"
31629 " guestfs_umount (g, \"/\");\n"
31630 " guestfs_close (g);\n"
31635 #: ../src/guestfs.pod:25
31637 "Libguestfs is a library for accessing and modifying guest disk images. "
31638 "Amongst the things this is good for: making batch configuration changes to "
31639 "guests, getting disk used/free statistics (see also: virt-df), migrating "
31640 "between virtualization systems (see also: virt-p2v), performing partial "
31641 "backups, performing partial guest clones, cloning guests and changing "
31642 "registry/UUID/hostname info, and much else besides."
31646 #: ../src/guestfs.pod:33
31648 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
31649 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
31650 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
31655 #: ../src/guestfs.pod:38
31657 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
31658 "what filesystem is in each LV, etc.). It can also run commands in the "
31659 "context of the guest. Also you can access filesystems over FUSE."
31663 #: ../src/guestfs.pod:43
31665 "Libguestfs is a library that can be linked with C and C++ management "
31666 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
31667 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
31672 #: ../src/guestfs.pod:48
31674 "You don't need to be root to use libguestfs, although obviously you do need "
31675 "enough permissions to access the disk images."
31679 #: ../src/guestfs.pod:51
31681 "Libguestfs is a large API because it can do many things. For a gentle "
31682 "introduction, please read the L</API OVERVIEW> section next."
31686 #: ../src/guestfs.pod:54
31688 "There are also some example programs in the L<guestfs-examples(3)> manual "
31693 #: ../src/guestfs.pod:57
31694 msgid "API OVERVIEW"
31698 #: ../src/guestfs.pod:59
31700 "This section provides a gentler overview of the libguestfs API. We also try "
31701 "to group API calls together, where that may not be obvious from reading "
31702 "about the individual calls in the main section of this manual."
31706 #: ../src/guestfs.pod:64
31711 #: ../src/guestfs.pod:66
31713 "Before you can use libguestfs calls, you have to create a handle. Then you "
31714 "must add at least one disk image to the handle, followed by launching the "
31715 "handle, then performing whatever operations you want, and finally closing "
31716 "the handle. By convention we use the single letter C<g> for the name of the "
31717 "handle variable, although of course you can use any name you want."
31721 #: ../src/guestfs.pod:73
31722 msgid "The general structure of all libguestfs-using programs looks like this:"
31726 #: ../src/guestfs.pod:76
31729 " guestfs_h *g = guestfs_create ();\n"
31734 #: ../src/guestfs.pod:78
31737 " /* Call guestfs_add_drive additional times if there are\n"
31738 " * multiple disk images.\n"
31740 " guestfs_add_drive (g, \"guest.img\");\n"
31745 #: ../src/guestfs.pod:83
31748 " /* Most manipulation calls won't work until you've launched\n"
31749 " * the handle 'g'. You have to do this _after_ adding drives\n"
31750 " * and _before_ other commands.\n"
31752 " guestfs_launch (g);\n"
31757 #: ../src/guestfs.pod:89
31760 " /* Now you can examine what partitions, LVs etc are available.\n"
31762 " char **partitions = guestfs_list_partitions (g);\n"
31763 " char **logvols = guestfs_lvs (g);\n"
31768 #: ../src/guestfs.pod:94
31771 " /* To access a filesystem in the image, you must mount it.\n"
31773 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
31778 #: ../src/guestfs.pod:98
31781 " /* Now you can perform filesystem actions on the guest\n"
31784 " guestfs_touch (g, \"/hello\");\n"
31789 #: ../src/guestfs.pod:103
31792 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
31793 " * it is done automatically when you close the handle. See\n"
31794 " * discussion of autosync in this page.\n"
31796 " guestfs_sync (g);\n"
31801 #: ../src/guestfs.pod:109
31804 " /* Close the handle 'g'. */\n"
31805 " guestfs_close (g);\n"
31810 #: ../src/guestfs.pod:112
31812 "The code above doesn't include any error checking. In real code you should "
31813 "check return values carefully for errors. In general all functions that "
31814 "return integers return C<-1> on error, and all functions that return "
31815 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
31816 "how to handle errors, and consult the documentation for each function call "
31817 "below to see precisely how they return error indications. See L<guestfs-"
31818 "examples(3)> for fully worked examples."
31822 #: ../src/guestfs.pod:121
31823 msgid "DISK IMAGES"
31827 #: ../src/guestfs.pod:123
31829 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
31830 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
31831 "actual block device, or simply an empty file of zeroes that you have created "
31832 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
31837 #: ../src/guestfs.pod:129
31839 "The call you should use in modern code for adding drives is L</"
31840 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
31841 "specifying that the format is raw, do:"
31845 #: ../src/guestfs.pod:133
31848 " guestfs_add_drive_opts (g, filename,\n"
31849 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
31855 #: ../src/guestfs.pod:137
31856 msgid "You can add a disk read-only using:"
31860 #: ../src/guestfs.pod:139
31863 " guestfs_add_drive_opts (g, filename,\n"
31864 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
31865 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
31871 #: ../src/guestfs.pod:144
31873 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
31874 "libguestfs won't modify the file."
31878 #: ../src/guestfs.pod:147
31880 "Be extremely cautious if the disk image is in use, eg. if it is being used "
31881 "by a virtual machine. Adding it read-write will almost certainly cause disk "
31882 "corruption, but adding it read-only is safe."
31886 #: ../src/guestfs.pod:151
31888 "You must add at least one disk image, and you may add multiple disk images. "
31889 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
31890 "first one you added), C</dev/sdb> (for the second one you added), etc."
31894 #: ../src/guestfs.pod:156
31896 "Once L</guestfs_launch> has been called you cannot add any more images. You "
31897 "can call L</guestfs_list_devices> to get a list of the device names, in the "
31898 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
31902 #: ../src/guestfs.pod:161
31907 #: ../src/guestfs.pod:163
31909 "Before you can read or write files, create directories and so on in a disk "
31910 "image that contains filesystems, you have to mount those filesystems using "
31911 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
31912 "a disk image contains (for example) one partition with a filesystem on that "
31913 "partition, then you can mount it directly:"
31917 #: ../src/guestfs.pod:170
31920 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
31925 #: ../src/guestfs.pod:172
31927 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
31928 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
31929 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
31930 "that these are libguestfs virtual devices, and are nothing to do with host "
31935 #: ../src/guestfs.pod:178
31937 "If you are given a disk image and you don't know what it contains then you "
31938 "have to find out. Libguestfs can do that too: use L</"
31939 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
31940 "LVs, and either try mounting each to see what is mountable, or else examine "
31941 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
31942 "filesystems, use L</guestfs_list_filesystems>."
31946 #: ../src/guestfs.pod:186
31948 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
31949 "L</INSPECTION> below). But you might find it easier to look at higher level "
31950 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
31954 #: ../src/guestfs.pod:191
31956 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
31957 "several other variations of the C<guestfs_mount_*> call."
31961 #: ../src/guestfs.pod:194
31962 msgid "FILESYSTEM ACCESS AND MODIFICATION"
31966 #: ../src/guestfs.pod:196
31968 "The majority of the libguestfs API consists of fairly low-level calls for "
31969 "accessing and modifying the files, directories, symlinks etc on mounted "
31970 "filesystems. There are over a hundred such calls which you can find listed "
31971 "in detail below in this man page, and we don't even pretend to cover them "
31972 "all in this overview."
31976 #: ../src/guestfs.pod:202
31978 "Specify filenames as full paths, starting with C<\"/\"> and including the "
31983 #: ../src/guestfs.pod:205
31985 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
31986 "the file called C<\"etc/passwd\"> then you could do:"
31990 #: ../src/guestfs.pod:208
31993 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
31998 #: ../src/guestfs.pod:210
32000 "This would return C<data> as a newly allocated buffer containing the full "
32001 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
32002 "or C<NULL> if there was an error."
32006 #: ../src/guestfs.pod:214
32008 "As another example, to create a top-level directory on that filesystem "
32009 "called C<\"var\"> you would do:"
32013 #: ../src/guestfs.pod:217
32016 " guestfs_mkdir (g, \"/var\");\n"
32021 #: ../src/guestfs.pod:219
32022 msgid "To create a symlink you could do:"
32026 #: ../src/guestfs.pod:221
32029 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
32030 " \"/etc/rc3.d/S30portmap\");\n"
32035 #: ../src/guestfs.pod:224
32037 "Libguestfs will reject attempts to use relative paths and there is no "
32038 "concept of a current working directory."
32042 #: ../src/guestfs.pod:227
32044 "Libguestfs can return errors in many situations: for example if the "
32045 "filesystem isn't writable, or if a file or directory that you requested "
32046 "doesn't exist. If you are using the C API (documented here) you have to "
32047 "check for those error conditions after each call. (Other language bindings "
32048 "turn these errors into exceptions)."
32052 #: ../src/guestfs.pod:233
32054 "File writes are affected by the per-handle umask, set by calling L</"
32055 "guestfs_umask> and defaulting to 022. See L</UMASK>."
32059 #: ../src/guestfs.pod:236
32060 msgid "PARTITIONING"
32064 #: ../src/guestfs.pod:238
32066 "Libguestfs contains API calls to read, create and modify partition tables on "
32071 #: ../src/guestfs.pod:241
32073 "In the common case where you want to create a single partition covering the "
32074 "whole disk, you should use the L</guestfs_part_disk> call:"
32078 #: ../src/guestfs.pod:245
32081 " const char *parttype = \"mbr\";\n"
32082 " if (disk_is_larger_than_2TB)\n"
32083 " parttype = \"gpt\";\n"
32084 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
32089 #: ../src/guestfs.pod:250
32091 "Obviously this effectively wipes anything that was on that disk image before."
32095 #: ../src/guestfs.pod:253
32100 #: ../src/guestfs.pod:255
32102 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
32103 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
32104 "you familiarize yourself with the concepts of physical volumes, volume "
32105 "groups and logical volumes."
32109 #: ../src/guestfs.pod:260
32111 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
32112 "tldp.org/HOWTO/LVM-HOWTO/>."
32116 #: ../src/guestfs.pod:263
32117 msgid "DOWNLOADING"
32121 #: ../src/guestfs.pod:265
32123 "Use L</guestfs_cat> to download small, text only files. This call is "
32124 "limited to files which are less than 2 MB and which cannot contain any ASCII "
32125 "NUL (C<\\0>) characters. However the API is very simple to use."
32129 #: ../src/guestfs.pod:269
32131 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
32132 "bit data, since it returns a (pointer, size) pair. However it is still "
32133 "limited to \"small\" files, less than 2 MB."
32137 #: ../src/guestfs.pod:273
32139 "L</guestfs_download> can be used to download any file, with no limits on "
32140 "content or size (even files larger than 4 GB)."
32144 #: ../src/guestfs.pod:276
32146 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
32150 #: ../src/guestfs.pod:279
32155 #: ../src/guestfs.pod:281
32157 "It's often the case that you want to write a file or files to the disk image."
32161 #: ../src/guestfs.pod:284
32163 "To write a small file with fixed content, use L</guestfs_write>. To create "
32164 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
32165 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
32166 "of other functions for creating test files, for example L</guestfs_fill> and "
32167 "L</guestfs_fill_pattern>."
32171 #: ../src/guestfs.pod:290
32173 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
32174 "file content or size (even files larger than 4 GB)."
32178 #: ../src/guestfs.pod:293
32180 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
32184 #: ../src/guestfs.pod:295
32186 "However the fastest way to upload I<large numbers of arbitrary files> is to "
32187 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
32188 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
32189 "in a predictable way (eg. adding it last after all other drives) then you "
32190 "can get the device name from L</guestfs_list_devices> and mount it directly "
32191 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
32192 "portable between kernel versions, and they don't support labels or UUIDs. "
32193 "If you want to pre-build an image or you need to mount it using a label or "
32194 "UUID, use an ISO image instead."
32198 #: ../src/guestfs.pod:306
32203 #: ../src/guestfs.pod:308
32205 "There are various different commands for copying between files and devices "
32206 "and in and out of the guest filesystem. These are summarised in the table "
32211 #: ../src/guestfs.pod:314
32212 msgid "B<file> to B<file>"
32216 #: ../src/guestfs.pod:316
32218 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
32219 "directories recursively."
32223 #: ../src/guestfs.pod:319
32224 msgid "B<file or device> to B<file or device>"
32228 #: ../src/guestfs.pod:321
32230 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
32231 "devices in the guest."
32235 #: ../src/guestfs.pod:324
32236 msgid "Example: duplicate the contents of an LV:"
32240 #: ../src/guestfs.pod:326
32243 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
32248 #: ../src/guestfs.pod:328
32250 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
32251 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
32252 "guestfs_copy_size>."
32256 #: ../src/guestfs.pod:332
32257 msgid "B<file on the host> to B<file or device>"
32261 #: ../src/guestfs.pod:334
32262 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
32266 #: ../src/guestfs.pod:336
32267 msgid "B<file or device> to B<file on the host>"
32271 #: ../src/guestfs.pod:338
32272 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
32276 #: ../src/guestfs.pod:342
32277 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
32281 #: ../src/guestfs.pod:344
32283 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
32284 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
32285 "appears you can only upload and download to files. However many Un*x-like "
32286 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
32287 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
32288 "and arbitrary file descriptor N."
32292 #: ../src/guestfs.pod:352
32293 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
32297 #: ../src/guestfs.pod:355
32300 " guestfs_download (g, filename, \"/dev/stdout\");\n"
32305 #: ../src/guestfs.pod:357
32306 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
32310 #: ../src/guestfs.pod:359
32313 " char devfd[64];\n"
32314 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
32315 " guestfs_tar_out (g, \"/\", devfd);\n"
32320 #: ../src/guestfs.pod:363
32321 msgid "LISTING FILES"
32325 #: ../src/guestfs.pod:365
32327 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
32328 "L<guestfish(1)>-equivalent command C<ll>)."
32332 #: ../src/guestfs.pod:368
32334 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
32335 "programs, as a flat list of strings."
32339 #: ../src/guestfs.pod:371
32341 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
32342 "directory, plus additional information about each one. It is more "
32343 "equivalent to using the L<readdir(3)> call on a local filesystem."
32347 #: ../src/guestfs.pod:375
32349 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
32353 #: ../src/guestfs.pod:378
32354 msgid "RUNNING COMMANDS"
32358 #: ../src/guestfs.pod:380
32360 "Although libguestfs is primarily an API for manipulating files inside guest "
32361 "images, we also provide some limited facilities for running commands inside "
32366 #: ../src/guestfs.pod:384
32367 msgid "There are many limitations to this:"
32371 #: ../src/guestfs.pod:390
32373 "The kernel version that the command runs under will be different from what "
32378 #: ../src/guestfs.pod:395
32380 "If the command needs to communicate with daemons, then most likely they "
32381 "won't be running."
32385 #: ../src/guestfs.pod:400
32386 msgid "The command will be running in limited memory."
32390 #: ../src/guestfs.pod:404
32392 "The network may not be available unless you enable it (see L</"
32393 "guestfs_set_network>)."
32397 #: ../src/guestfs.pod:409
32398 msgid "Only supports Linux guests (not Windows, BSD, etc)."
32402 #: ../src/guestfs.pod:413
32404 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
32408 #: ../src/guestfs.pod:418
32410 "For SELinux guests, you may need to enable SELinux and load policy first. "
32411 "See L</SELINUX> in this manpage."
32415 #: ../src/guestfs.pod:423
32417 "I<Security:> It is not safe to run commands from untrusted, possibly "
32418 "malicious guests. These commands may attempt to exploit your program by "
32419 "sending unexpected output. They could also try to exploit the Linux kernel "
32420 "or qemu provided by the libguestfs appliance. They could use the network "
32421 "provided by the libguestfs appliance to bypass ordinary network partitions "
32422 "and firewalls. They could use the elevated privileges or different SELinux "
32423 "context of your program to their advantage."
32427 #: ../src/guestfs.pod:432
32429 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
32430 "(a script which runs when the guest next boots normally), and to have this "
32431 "script run the commands you want in the normal context of the running guest, "
32432 "network security and so on. For information about other security issues, "
32433 "see L</SECURITY>."
32437 #: ../src/guestfs.pod:440
32439 "The two main API calls to run commands are L</guestfs_command> and L</"
32440 "guestfs_sh> (there are also variations)."
32444 #: ../src/guestfs.pod:443
32446 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
32447 "shell globs, redirections, etc will work."
32451 #: ../src/guestfs.pod:446
32452 msgid "CONFIGURATION FILES"
32456 #: ../src/guestfs.pod:448
32458 "To read and write configuration files in Linux guest filesystems, we "
32459 "strongly recommend using Augeas. For example, Augeas understands how to "
32460 "read and write, say, a Linux shadow password file or X.org configuration "
32461 "file, and so avoids you having to write that code."
32465 #: ../src/guestfs.pod:453
32467 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
32468 "document Augeas itself here because there is excellent documentation on the "
32469 "L<http://augeas.net/> website."
32473 #: ../src/guestfs.pod:457
32475 "If you don't want to use Augeas (you fool!) then try calling L</"
32476 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
32481 #: ../src/guestfs.pod:461
32486 #: ../src/guestfs.pod:463
32488 "We support SELinux guests. To ensure that labeling happens correctly in "
32489 "SELinux guests, you need to enable SELinux and load the guest's policy:"
32493 #: ../src/guestfs.pod:471
32494 msgid "Before launching, do:"
32498 #: ../src/guestfs.pod:473
32501 " guestfs_set_selinux (g, 1);\n"
32506 #: ../src/guestfs.pod:477
32508 "After mounting the guest's filesystem(s), load the policy. This is best "
32509 "done by running the L<load_policy(8)> command in the guest itself:"
32513 #: ../src/guestfs.pod:481
32516 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
32521 #: ../src/guestfs.pod:483
32523 "(Older versions of C<load_policy> require you to specify the name of the "
32528 #: ../src/guestfs.pod:488
32530 "Optionally, set the security context for the API. The correct security "
32531 "context to use can only be known by inspecting the guest. As an example:"
32535 #: ../src/guestfs.pod:492
32538 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
32543 #: ../src/guestfs.pod:496
32544 msgid "This will work for running commands and editing existing files."
32548 #: ../src/guestfs.pod:498
32550 "When new files are created, you may need to label them explicitly, for "
32551 "example by running the external command C<restorecon pathname>."
32555 #: ../src/guestfs.pod:502
32560 #: ../src/guestfs.pod:504
32562 "Certain calls are affected by the current file mode creation mask (the "
32563 "\"umask\"). In particular ones which create files or directories, such as "
32564 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
32565 "either the default mode that the file is created with or modifies the mode "
32570 #: ../src/guestfs.pod:510
32572 "The default umask is C<022>, so files are created with modes such as C<0644> "
32573 "and directories with C<0755>."
32577 #: ../src/guestfs.pod:513
32579 "There are two ways to avoid being affected by umask. Either set umask to 0 "
32580 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
32581 "guestfs_chmod> after creating each file or directory."
32585 #: ../src/guestfs.pod:517
32586 msgid "For more information about umask, see L<umask(2)>."
32590 #: ../src/guestfs.pod:521
32592 "Libguestfs allows you to access Linux guests which have been encrypted using "
32593 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
32594 "standard. This includes nearly all whole disk encryption systems used by "
32595 "modern Linux guests."
32599 #: ../src/guestfs.pod:527
32601 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
32602 "returns the string C<crypto_LUKS>)."
32606 #: ../src/guestfs.pod:530
32608 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
32609 "will require the passphrase!"
32613 #: ../src/guestfs.pod:533
32615 "Opening a LUKS device creates a new device mapper device called C</dev/"
32616 "mapper/mapname> (where C<mapname> is the string you supply to L</"
32617 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
32618 "from and encrypted to the underlying block device respectively."
32622 #: ../src/guestfs.pod:539
32624 "LVM volume groups on the device can be made visible by calling L</"
32625 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
32626 "(s) can now be mounted in the usual way."
32630 #: ../src/guestfs.pod:543
32632 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
32633 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
32634 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
32635 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
32636 "underlying encrypted block device)."
32640 #: ../src/guestfs.pod:550
32645 #: ../src/guestfs.pod:552
32647 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
32648 "contains operating systems, an install CD or a live CD. (These APIs used to "
32649 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
32650 "version 1.5.3 the most frequently used part of this library has been "
32651 "rewritten in C and moved into the core code)."
32655 #: ../src/guestfs.pod:559
32657 "Add all disks belonging to the unknown virtual machine and call L</"
32658 "guestfs_launch> in the usual way."
32662 #: ../src/guestfs.pod:562
32664 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
32665 "and certain heuristics, and returns a list of operating systems that were "
32666 "found. An empty list means none were found. A single element is the root "
32667 "filesystem of the operating system. For dual- or multi-boot guests, "
32668 "multiple roots can be returned, each one corresponding to a separate "
32669 "operating system. (Multi-boot virtual machines are extremely rare in the "
32670 "world of virtualization, but since this scenario can happen, we have built "
32671 "libguestfs to deal with it.)"
32675 #: ../src/guestfs.pod:571
32677 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
32678 "to get additional details about that operating system. For example, call L</"
32679 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
32680 "Windows and Linux-based operating systems respectively."
32684 #: ../src/guestfs.pod:577
32686 "Un*x-like and Linux-based operating systems usually consist of several "
32687 "filesystems which are mounted at boot time (for example, a separate boot "
32688 "partition mounted on C</boot>). The inspection rules are able to detect how "
32689 "filesystems correspond to mount points. Call "
32690 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
32691 "hash table like this example:"
32695 #: ../src/guestfs.pod:584
32698 " /boot => /dev/sda1\n"
32699 " / => /dev/vg_guest/lv_root\n"
32700 " /usr => /dev/vg_guest/lv_usr\n"
32705 #: ../src/guestfs.pod:588
32707 "The caller can then make calls to L</guestfs_mount_options> to mount the "
32708 "filesystems as suggested."
32712 #: ../src/guestfs.pod:591
32714 "Be careful to mount filesystems in the right order (eg. C</> before C</"
32715 "usr>). Sorting the keys of the hash by length, shortest first, should work."
32719 #: ../src/guestfs.pod:595
32721 "Inspection currently only works for some common operating systems. "
32722 "Contributors are welcome to send patches for other operating systems that we "
32723 "currently cannot detect."
32727 #: ../src/guestfs.pod:599
32729 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
32730 "for more details. The L</guestfs_inspect_os> function just ignores any "
32731 "encrypted devices."
32735 #: ../src/guestfs.pod:603
32737 "A note on the implementation: The call L</guestfs_inspect_os> performs "
32738 "inspection and caches the results in the guest handle. Subsequent calls to "
32739 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
32740 "read the disks. If you change the content of the guest disks, you can redo "
32741 "inspection by calling L</guestfs_inspect_os> again. (L</"
32742 "guestfs_inspect_list_applications> works a little differently from the other "
32743 "calls and does read the disks. See documentation for that function for "
32748 #: ../src/guestfs.pod:612
32749 msgid "INSPECTING INSTALL DISKS"
32753 #: ../src/guestfs.pod:614
32755 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
32760 #: ../src/guestfs.pod:617
32762 "Call L</guestfs_inspect_get_format> to return the format of the operating "
32763 "system, which currently can be C<installed> (a regular operating system) or "
32764 "C<installer> (some sort of install disk)."
32768 #: ../src/guestfs.pod:621
32770 "Further information is available about the operating system that can be "
32771 "installed using the regular inspection APIs like L</"
32772 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
32776 #: ../src/guestfs.pod:626
32778 "Some additional information specific to installer disks is also available "
32779 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
32780 "guestfs_inspect_is_multipart> calls."
32784 #: ../src/guestfs.pod:631
32785 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
32789 #: ../src/guestfs.pod:633
32791 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
32792 "ntfs-3g.org/> driver."
32796 #: ../src/guestfs.pod:636
32797 msgid "DRIVE LETTERS AND PATHS"
32801 #: ../src/guestfs.pod:638
32803 "DOS and Windows still use drive letters, and the filesystems are always "
32804 "treated as case insensitive by Windows itself, and therefore you might find "
32805 "a Windows configuration file referring to a path like C<c:\\windows"
32806 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
32807 "might be referred to as C</WINDOWS/System32>."
32811 #: ../src/guestfs.pod:644
32813 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
32814 "L</guestfs_inspect_get_drive_mappings>)"
32818 #: ../src/guestfs.pod:647
32820 "Dealing with separator characters (backslash vs forward slash) is outside "
32821 "the scope of libguestfs, but usually a simple character replacement will "
32826 #: ../src/guestfs.pod:651
32828 "To resolve the case insensitivity of paths, call L</"
32829 "guestfs_case_sensitive_path>."
32833 #: ../src/guestfs.pod:654
32834 msgid "ACCESSING THE WINDOWS REGISTRY"
32838 #: ../src/guestfs.pod:656
32840 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
32841 "files, through the library C<hivex> which is part of the libguestfs project "
32842 "although ships as a separate tarball. You have to locate and download the "
32843 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
32844 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
32845 "reg(1)> for more help on this issue."
32849 #: ../src/guestfs.pod:664
32850 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
32854 #: ../src/guestfs.pod:666
32856 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
32857 "provide something which looks like a Linux symlink. The way it tries to do "
32858 "the rewriting is described here:"
32862 #: ../src/guestfs.pod:670
32864 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
32869 #: ../src/guestfs.pod:672
32871 "The essential problem is that ntfs-3g simply does not have enough "
32872 "information to do a correct job. NTFS links can contain drive letters and "
32873 "references to external device GUIDs that ntfs-3g has no way of resolving. "
32874 "It is almost certainly the case that libguestfs callers should ignore what "
32875 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
32879 #: ../src/guestfs.pod:679
32881 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
32882 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
32883 "attribute, and read the raw reparse data from that (you can find the format "
32884 "documented in various places around the web)."
32888 #: ../src/guestfs.pod:684
32889 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
32893 #: ../src/guestfs.pod:686
32895 "There are other useful extended attributes that can be read from ntfs-3g "
32896 "filesystems (using L</guestfs_getxattr>). See:"
32900 #: ../src/guestfs.pod:689
32902 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
32906 #: ../src/guestfs.pod:691
32907 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
32911 #: ../src/guestfs.pod:693
32913 "Although we don't want to discourage you from using the C API, we will "
32914 "mention here that the same API is also available in other languages."
32918 #: ../src/guestfs.pod:696
32920 "The API is broadly identical in all supported languages. This means that "
32921 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
32922 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
32923 "OCaml. In other words, a straightforward, predictable isomorphism between "
32928 #: ../src/guestfs.pod:702
32930 "Error messages are automatically transformed into exceptions if the language "
32935 #: ../src/guestfs.pod:705
32937 "We don't try to \"object orientify\" parts of the API in OO languages, "
32938 "although contributors are welcome to write higher level APIs above what we "
32939 "provide in their favourite languages if they wish."
32943 #: ../src/guestfs.pod:711
32948 #: ../src/guestfs.pod:713
32950 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
32951 "identical to the C API. C++ classes and exceptions are not used."
32955 #: ../src/guestfs.pod:717
32960 #: ../src/guestfs.pod:719
32962 "The C# bindings are highly experimental. Please read the warnings at the "
32963 "top of C<csharp/Libguestfs.cs>."
32967 #: ../src/guestfs.pod:722
32972 #: ../src/guestfs.pod:724
32973 msgid "See L<guestfs-erlang(3)>."
32977 #: ../src/guestfs.pod:726
32982 #: ../src/guestfs.pod:728
32984 "This is the only language binding that is working but incomplete. Only "
32985 "calls which return simple integers have been bound in Haskell, and we are "
32986 "looking for help to complete this binding."
32990 #: ../src/guestfs.pod:732
32995 #: ../src/guestfs.pod:734
32997 "Full documentation is contained in the Javadoc which is distributed with "
32998 "libguestfs. For examples, see L<guestfs-java(3)>."
33002 #: ../src/guestfs.pod:737
33007 #: ../src/guestfs.pod:739
33008 msgid "See L<guestfs-ocaml(3)>."
33012 #: ../src/guestfs.pod:741
33017 #: ../src/guestfs.pod:743
33018 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
33022 #: ../src/guestfs.pod:745
33027 #: ../src/guestfs.pod:747
33029 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
33030 "the php-libguestfs package for your distribution."
33034 #: ../src/guestfs.pod:750
33035 msgid "The PHP binding only works correctly on 64 bit machines."
33039 #: ../src/guestfs.pod:752
33044 #: ../src/guestfs.pod:754
33045 msgid "See L<guestfs-python(3)>."
33049 #: ../src/guestfs.pod:756
33054 #: ../src/guestfs.pod:758
33055 msgid "See L<guestfs-ruby(3)>."
33059 #: ../src/guestfs.pod:760
33060 msgid "B<shell scripts>"
33064 #: ../src/guestfs.pod:762
33065 msgid "See L<guestfish(1)>."
33069 #: ../src/guestfs.pod:766
33070 msgid "LIBGUESTFS GOTCHAS"
33074 #: ../src/guestfs.pod:768
33076 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
33077 "system [...] that works in the way it is documented but is counterintuitive "
33078 "and almost invites mistakes.\""
33082 #: ../src/guestfs.pod:772
33084 "Since we developed libguestfs and the associated tools, there are several "
33085 "things we would have designed differently, but are now stuck with for "
33086 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
33087 "release, you can expect these to change. Beware of them."
33091 #: ../src/guestfs.pod:780
33092 msgid "Autosync / forgetting to sync."
33096 #: ../src/guestfs.pod:782
33098 "I<Update:> Autosync is enabled by default for all API users starting from "
33099 "libguestfs 1.5.24. This section only applies to older versions."
33103 #: ../src/guestfs.pod:785
33105 "When modifying a filesystem from C or another language, you B<must> unmount "
33106 "all filesystems and call L</guestfs_sync> explicitly before you close the "
33107 "libguestfs handle. You can also call:"
33111 #: ../src/guestfs.pod:789
33114 " guestfs_set_autosync (g, 1);\n"
33119 #: ../src/guestfs.pod:791
33121 "to have the unmount/sync done automatically for you when the handle 'g' is "
33122 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
33126 #: ../src/guestfs.pod:795
33128 "If you forget to do this, then it is entirely possible that your changes "
33129 "won't be written out, or will be partially written, or (very rarely) that "
33130 "you'll get disk corruption."
33134 #: ../src/guestfs.pod:799
33136 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
33137 "guestfish scripts that forget to sync will work just fine, which can make "
33138 "this very puzzling if you are trying to debug a problem."
33142 #: ../src/guestfs.pod:803
33143 msgid "Mount option C<-o sync> should not be the default."
33147 #: ../src/guestfs.pod:805
33149 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
33150 "However C<-o sync> does not add any reliability benefit, but does have a "
33151 "very large performance impact."
33155 #: ../src/guestfs.pod:809
33157 "The work around is to use L</guestfs_mount_options> and set the mount "
33158 "options that you actually want to use."
33162 #: ../src/guestfs.pod:812
33163 msgid "Read-only should be the default."
33167 #: ../src/guestfs.pod:814
33169 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
33170 "specify I<--rw> if you want to make changes to the image."
33174 #: ../src/guestfs.pod:817
33175 msgid "This would reduce the potential to corrupt live VM images."
33179 #: ../src/guestfs.pod:819
33181 "Note that many filesystems change the disk when you just mount and unmount, "
33182 "even if you didn't perform any writes. You need to use L</"
33183 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
33187 #: ../src/guestfs.pod:823
33188 msgid "guestfish command line is hard to use."
33192 #: ../src/guestfs.pod:825
33194 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
33195 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
33196 "exist, so it fails. In earlier versions of guestfish the error message was "
33197 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
33198 "we should have used C<guestfish -c command> to run commands."
33202 #: ../src/guestfs.pod:832
33203 msgid "guestfish megabyte modifiers don't work right on all commands"
33207 #: ../src/guestfs.pod:834
33209 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
33210 "other modifiers). What guestfish actually does is to multiply the number "
33211 "part by the modifier part and pass the result to the C API. However this "
33212 "doesn't work for a few APIs which aren't expecting bytes, but are already "
33213 "expecting some other unit (eg. megabytes)."
33217 #: ../src/guestfs.pod:841
33218 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
33222 #: ../src/guestfs.pod:843
33225 " lvcreate LV VG 100M\n"
33230 #: ../src/guestfs.pod:845
33232 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
33233 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
33234 "megabytes * megabytes) logical volume. The error message you get from this "
33235 "is also a little obscure."
33239 #: ../src/guestfs.pod:850
33241 "This could be fixed in the generator by specially marking parameters and "
33242 "return values which take bytes or other units."
33246 #: ../src/guestfs.pod:853
33247 msgid "Ambiguity between devices and paths"
33251 #: ../src/guestfs.pod:855
33253 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
33254 "sdb2>) and a similar pathname. A file might just happen to be called "
33255 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
33259 #: ../src/guestfs.pod:860
33261 "In the current API we usually resolve this ambiguity by having two separate "
33262 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
33263 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
33264 "detecting if the path supplied begins with C</dev/>."
33268 #: ../src/guestfs.pod:866
33270 "To avoid both the ambiguity and the need to duplicate some calls, we could "
33271 "make paths/devices into structured names. One way to do this would be to "
33272 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
33273 "aspect of grub. Another way would be to use a structured type, equivalent "
33274 "to this OCaml type:"
33278 #: ../src/guestfs.pod:872
33281 " type path = Path of string | Device of int | Partition of int * int\n"
33286 #: ../src/guestfs.pod:874
33287 msgid "which would allow you to pass arguments like:"
33291 #: ../src/guestfs.pod:876
33294 " Path \"/foo/bar\"\n"
33295 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
33296 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
33297 " Path \"/dev/sdb2\" (* not a device *)\n"
33302 #: ../src/guestfs.pod:881
33304 "As you can see there are still problems to resolve even with this "
33305 "representation. Also consider how it might work in guestfish."
33309 #: ../src/guestfs.pod:886
33310 msgid "KEYS AND PASSPHRASES"
33314 #: ../src/guestfs.pod:888
33316 "Certain libguestfs calls take a parameter that contains sensitive key "
33317 "material, passed in as a C string."
33321 #: ../src/guestfs.pod:891
33323 "In the future we would hope to change the libguestfs implementation so that "
33324 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
33325 "swap. However this is I<not> done at the moment, because of the complexity "
33326 "of such an implementation."
33330 #: ../src/guestfs.pod:896
33332 "Therefore you should be aware that any key parameter you pass to libguestfs "
33333 "might end up being written out to the swap partition. If this is a concern, "
33334 "scrub the swap partition or don't use libguestfs on encrypted devices."
33338 #: ../src/guestfs.pod:901
33339 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
33343 #: ../src/guestfs.pod:903
33345 "All high-level libguestfs actions are synchronous. If you want to use "
33346 "libguestfs asynchronously then you must create a thread."
33350 #: ../src/guestfs.pod:906
33352 "Only use the handle from a single thread. Either use the handle exclusively "
33353 "from one thread, or provide your own mutex so that two threads cannot issue "
33354 "calls on the same handle at the same time."
33358 #: ../src/guestfs.pod:910
33360 "See the graphical program guestfs-browser for one possible architecture for "
33361 "multithreaded programs using libvirt and libguestfs."
33365 #: ../src/guestfs.pod:913
33370 #: ../src/guestfs.pod:915
33372 "Libguestfs needs a supermin appliance, which it finds by looking along an "
33377 #: ../src/guestfs.pod:918
33379 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
33380 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
33384 #: ../src/guestfs.pod:921
33386 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
33387 "to change the directories that libguestfs will search in. The value is a "
33388 "colon-separated list of paths. The current directory is I<not> searched "
33389 "unless the path contains an empty element or C<.>. For example "
33390 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
33391 "then C</usr/lib/guestfs>."
33395 #: ../src/guestfs.pod:928
33396 msgid "QEMU WRAPPERS"
33400 #: ../src/guestfs.pod:930
33402 "If you want to compile your own qemu, run qemu from a non-standard location, "
33403 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
33408 #: ../src/guestfs.pod:934
33410 "There is one important rule to remember: you I<must C<exec qemu>> as the "
33411 "last command in the shell script (so that qemu replaces the shell and "
33412 "becomes the direct child of the libguestfs-using program). If you don't do "
33413 "this, then the qemu process won't be cleaned up correctly."
33417 #: ../src/guestfs.pod:939
33419 "Here is an example of a wrapper, where I have built my own copy of qemu from "
33424 #: ../src/guestfs.pod:942
33428 " qemudir=/home/rjones/d/qemu\n"
33429 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
33434 #: ../src/guestfs.pod:946
33436 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
33437 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
33442 #: ../src/guestfs.pod:950
33445 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
33450 #: ../src/guestfs.pod:952
33452 "Note that libguestfs also calls qemu with the -help and -version options in "
33453 "order to determine features."
33457 #: ../src/guestfs.pod:955
33459 "Wrappers can also be used to edit the options passed to qemu. In the "
33460 "following example, the C<-machine ...> option (C<-machine> and the following "
33461 "argument) are removed from the command line and replaced with C<-machine pc,"
33462 "accel=tcg>. The while loop iterates over the options until it finds the "
33463 "right one to remove, putting the remaining options into the C<args> array."
33467 #: ../src/guestfs.pod:962
33475 #: ../src/guestfs.pod:964
33479 " while [ $# -gt 0 ]; do\n"
33480 " case \"$1\" in\n"
33484 " args[i]=\"$1\"\n"
33493 #: ../src/guestfs.pod:976
33496 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
33501 #: ../src/guestfs.pod:978
33502 msgid "ATTACHING TO RUNNING DAEMONS"
33506 #: ../src/guestfs.pod:980
33508 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
33509 "babies. Use with caution."
33513 #: ../src/guestfs.pod:983
33515 "I<Note (2):> This section explains how to attach to a running daemon from a "
33516 "low level perspective. For most users, simply using virt tools such as "
33517 "L<guestfish(1)> with the I<--live> option will \"just work\"."
33521 #: ../src/guestfs.pod:987
33522 msgid "Using guestfs_set_attach_method"
33526 #: ../src/guestfs.pod:989
33528 "By calling L</guestfs_set_attach_method> you can change how the library "
33529 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
33530 "ARCHITECTURE> for some background)."
33534 #: ../src/guestfs.pod:993
33536 "The normal attach method is C<appliance>, where a small appliance is created "
33537 "containing the daemon, and then the library connects to this."
33541 #: ../src/guestfs.pod:996
33543 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
33544 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
33545 "daemon over the Unix domain socket."
33549 #: ../src/guestfs.pod:1000
33551 "The normal use for this is to connect to a running virtual machine that "
33552 "contains a C<guestfsd> daemon, and send commands so you can read and write "
33553 "files inside the live virtual machine."
33557 #: ../src/guestfs.pod:1004
33558 msgid "Using guestfs_add_domain with live flag"
33562 #: ../src/guestfs.pod:1006
33564 "L</guestfs_add_domain> provides some help for getting the correct attach "
33565 "method. If you pass the C<live> option to this function, then (if the "
33566 "virtual machine is running) it will examine the libvirt XML looking for a "
33567 "virtio-serial channel to connect to:"
33571 #: ../src/guestfs.pod:1012
33578 " <channel type='unix'>\n"
33579 " <source mode='bind' path='/path/to/socket'/>\n"
33580 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
33589 #: ../src/guestfs.pod:1024
33591 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
33592 "method to C<unix:/path/to/socket>."
33596 #: ../src/guestfs.pod:1027
33598 "Some of the libguestfs tools (including guestfish) support a I<--live> "
33599 "option which is passed through to L</guestfs_add_domain> thus allowing you "
33600 "to attach to and modify live virtual machines."
33604 #: ../src/guestfs.pod:1031
33606 "The virtual machine needs to have been set up beforehand so that it has the "
33607 "virtio-serial channel and so that guestfsd is running inside it."
33611 #: ../src/guestfs.pod:1035
33612 msgid "ABI GUARANTEE"
33616 #: ../src/guestfs.pod:1037
33618 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
33619 "actions as outlined in this section. Although we will deprecate some "
33620 "actions, for example if they get replaced by newer calls, we will keep the "
33621 "old actions forever. This allows you the developer to program in confidence "
33622 "against the libguestfs API."
33626 #: ../src/guestfs.pod:1043
33627 msgid "BLOCK DEVICE NAMING"
33631 #: ../src/guestfs.pod:1045
33633 "In the kernel there is now quite a profusion of schemata for naming block "
33634 "devices (in this context, by I<block device> I mean a physical or virtual "
33635 "hard drive). The original Linux IDE driver used names starting with C</dev/"
33636 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
33637 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
33638 "for the old IDE driver (particularly for SATA devices) those devices also "
33639 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
33640 "paravirtualized drivers. This has created several different naming systems, "
33641 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
33645 #: ../src/guestfs.pod:1057
33647 "As discussed above, libguestfs uses a qemu appliance running an embedded "
33648 "Linux kernel to access block devices. We can run a variety of appliances "
33649 "based on a variety of Linux kernels."
33653 #: ../src/guestfs.pod:1061
33655 "This causes a problem for libguestfs because many API calls use device or "
33656 "partition names. Working scripts and the recipe (example) scripts that we "
33657 "make available over the internet could fail if the naming scheme changes."
33661 #: ../src/guestfs.pod:1066
33663 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
33664 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
33665 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
33666 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
33670 #: ../src/guestfs.pod:1072
33672 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
33673 "L</guestfs_list_partitions> and similar calls return the true names of the "
33674 "devices and partitions as known to the appliance."
33678 #: ../src/guestfs.pod:1077
33679 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
33683 #: ../src/guestfs.pod:1079
33685 "Usually this translation is transparent. However in some (very rare) cases "
33686 "you may need to know the exact algorithm. Such cases include where you use "
33687 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
33688 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
33692 #: ../src/guestfs.pod:1085
33694 "The algorithm is applied only to I<parameters> which are known to be either "
33695 "device or partition names. Return values from functions such as L</"
33696 "guestfs_list_devices> are never changed."
33700 #: ../src/guestfs.pod:1093
33701 msgid "Is the string a parameter which is a device or partition name?"
33705 #: ../src/guestfs.pod:1097
33706 msgid "Does the string begin with C</dev/sd>?"
33710 #: ../src/guestfs.pod:1101
33712 "Does the named device exist? If so, we use that device. However if I<not> "
33713 "then we continue with this algorithm."
33717 #: ../src/guestfs.pod:1106
33718 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
33722 #: ../src/guestfs.pod:1108
33723 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
33727 #: ../src/guestfs.pod:1110
33728 msgid "If that named device exists, use it. If not, continue."
33732 #: ../src/guestfs.pod:1114
33733 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
33737 #: ../src/guestfs.pod:1116
33738 msgid "If that named device exists, use it. If not, return an error."
33742 #: ../src/guestfs.pod:1120
33743 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
33747 #: ../src/guestfs.pod:1122
33749 "Although the standard naming scheme and automatic translation is useful for "
33750 "simple programs and guestfish scripts, for larger programs it is best not to "
33751 "rely on this mechanism."
33755 #: ../src/guestfs.pod:1126
33757 "Where possible for maximum future portability programs using libguestfs "
33758 "should use these future-proof techniques:"
33762 #: ../src/guestfs.pod:1133
33764 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
33765 "device names, and then use those names directly."
33769 #: ../src/guestfs.pod:1136
33771 "Since those device names exist by definition, they will never be translated."
33775 #: ../src/guestfs.pod:1141
33777 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
33778 "filesystem labels."
33782 #: ../src/guestfs.pod:1146
33787 #: ../src/guestfs.pod:1148
33789 "This section discusses security implications of using libguestfs, "
33790 "particularly with untrusted or malicious guests or disk images."
33794 #: ../src/guestfs.pod:1151
33795 msgid "GENERAL SECURITY CONSIDERATIONS"
33799 #: ../src/guestfs.pod:1153
33801 "Be careful with any files or data that you download from a guest (by "
33802 "\"download\" we mean not just the L</guestfs_download> command but any "
33803 "command that reads files, filenames, directories or anything else from a "
33804 "disk image). An attacker could manipulate the data to fool your program "
33805 "into doing the wrong thing. Consider cases such as:"
33809 #: ../src/guestfs.pod:1163
33810 msgid "the data (file etc) not being present"
33814 #: ../src/guestfs.pod:1167
33815 msgid "being present but empty"
33819 #: ../src/guestfs.pod:1171
33820 msgid "being much larger than normal"
33824 #: ../src/guestfs.pod:1175
33825 msgid "containing arbitrary 8 bit data"
33829 #: ../src/guestfs.pod:1179
33830 msgid "being in an unexpected character encoding"
33834 #: ../src/guestfs.pod:1183
33835 msgid "containing homoglyphs."
33839 #: ../src/guestfs.pod:1187
33840 msgid "SECURITY OF MOUNTING FILESYSTEMS"
33844 #: ../src/guestfs.pod:1189
33846 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
33847 "(VFS) module can sometimes be escalated into exploits by deliberately "
33848 "creating a malicious, malformed filesystem. These exploits are very severe "
33849 "for two reasons. Firstly there are very many filesystem drivers in the "
33850 "kernel, and many of them are infrequently used and not much developer "
33851 "attention has been paid to the code. Linux userspace helps potential "
33852 "crackers by detecting the filesystem type and automatically choosing the "
33853 "right VFS driver, even if that filesystem type is obscure or unexpected for "
33854 "the administrator. Secondly, a kernel-level exploit is like a local root "
33855 "exploit (worse in some ways), giving immediate and total access to the "
33856 "system right down to the hardware level."
33860 #: ../src/guestfs.pod:1202
33862 "That explains why you should never mount a filesystem from an untrusted "
33863 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
33864 "inside a qemu virtual machine, usually running as a non-root user. The "
33865 "attacker would need to write a filesystem which first exploited the kernel, "
33866 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
33867 "the libguestfs protocol, and finally to be as serious as the host kernel "
33868 "exploit it would need to escalate its privileges to root. This multi-step "
33869 "escalation, performed by a static piece of data, is thought to be extremely "
33870 "hard to do, although we never say 'never' about security issues."
33874 #: ../src/guestfs.pod:1213
33876 "In any case callers can reduce the attack surface by forcing the filesystem "
33877 "type when mounting (use L</guestfs_mount_vfs>)."
33881 #: ../src/guestfs.pod:1216
33882 msgid "PROTOCOL SECURITY"
33886 #: ../src/guestfs.pod:1218
33888 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
33889 "defined upper message size. However a program that uses libguestfs must "
33890 "also take care - for example you can write a program that downloads a binary "
33891 "from a disk image and executes it locally, and no amount of protocol "
33892 "security will save you from the consequences."
33896 #: ../src/guestfs.pod:1224
33897 msgid "INSPECTION SECURITY"
33901 #: ../src/guestfs.pod:1226
33903 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
33904 "directly from the guest, and these could contain any 8 bit data. Callers "
33905 "should be careful to escape these before printing them to a structured file "
33906 "(for example, use HTML escaping if creating a web page)."
33910 #: ../src/guestfs.pod:1232
33912 "Guest configuration may be altered in unusual ways by the administrator of "
33913 "the virtual machine, and may not reflect reality (particularly for untrusted "
33914 "or actively malicious guests). For example we parse the hostname from "
33915 "configuration files like C</etc/sysconfig/network> that we find in the "
33916 "guest, but the guest administrator can easily manipulate these files to "
33917 "provide the wrong hostname."
33921 #: ../src/guestfs.pod:1240
33923 "The inspection API parses guest configuration using two external libraries: "
33924 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
33925 "designed to be robust in the face of malicious data, although denial of "
33926 "service attacks are still possible, for example with oversized configuration "
33931 #: ../src/guestfs.pod:1246
33932 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
33936 #: ../src/guestfs.pod:1248
33938 "Be very cautious about running commands from the guest. By running a "
33939 "command in the guest, you are giving CPU time to a binary that you do not "
33940 "control, under the same user account as the library, albeit wrapped in qemu "
33941 "virtualization. More information and alternatives can be found in the "
33942 "section L</RUNNING COMMANDS>."
33946 #: ../src/guestfs.pod:1254
33947 msgid "CVE-2010-3851"
33951 #: ../src/guestfs.pod:1256
33952 msgid "https://bugzilla.redhat.com/642934"
33956 #: ../src/guestfs.pod:1258
33958 "This security bug concerns the automatic disk format detection that qemu "
33959 "does on disk images."
33963 #: ../src/guestfs.pod:1261
33965 "A raw disk image is just the raw bytes, there is no header. Other disk "
33966 "images like qcow2 contain a special header. Qemu deals with this by looking "
33967 "for one of the known headers, and if none is found then assuming the disk "
33968 "image must be raw."
33972 #: ../src/guestfs.pod:1266
33974 "This allows a guest which has been given a raw disk image to write some "
33975 "other header. At next boot (or when the disk image is accessed by "
33976 "libguestfs) qemu would do autodetection and think the disk image format was, "
33977 "say, qcow2 based on the header written by the guest."
33981 #: ../src/guestfs.pod:1271
33983 "This in itself would not be a problem, but qcow2 offers many features, one "
33984 "of which is to allow a disk image to refer to another image (called the "
33985 "\"backing disk\"). It does this by placing the path to the backing disk "
33986 "into the qcow2 header. This path is not validated and could point to any "
33987 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
33988 "\"holes\" in the qcow2 disk image, which of course is completely under the "
33989 "control of the attacker."
33993 #: ../src/guestfs.pod:1279
33995 "In libguestfs this is rather hard to exploit except under two circumstances:"
33999 #: ../src/guestfs.pod:1286
34000 msgid "You have enabled the network or have opened the disk in write mode."
34004 #: ../src/guestfs.pod:1290
34006 "You are also running untrusted code from the guest (see L</RUNNING "
34011 #: ../src/guestfs.pod:1295
34013 "The way to avoid this is to specify the expected disk format when adding "
34014 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
34015 "should always do this if the disk is raw format, and it's a good idea for "
34020 #: ../src/guestfs.pod:1300
34022 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
34023 "format is fetched from libvirt and passed through."
34027 #: ../src/guestfs.pod:1303
34029 "For libguestfs tools, use the I<--format> command line parameter as "
34034 #: ../src/guestfs.pod:1306
34035 msgid "CONNECTION MANAGEMENT"
34039 #: ../src/guestfs.pod:1308
34040 msgid "guestfs_h *"
34044 #: ../src/guestfs.pod:1310
34046 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
34047 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
34048 "handle and release all resources used."
34052 #: ../src/guestfs.pod:1314
34054 "For information on using multiple handles and threads, see the section L</"
34055 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
34059 #: ../src/guestfs.pod:1317
34060 msgid "guestfs_create"
34064 #: ../src/guestfs.pod:1319
34067 " guestfs_h *guestfs_create (void);\n"
34072 #: ../src/guestfs.pod:1321
34073 msgid "Create a connection handle."
34077 #: ../src/guestfs.pod:1323
34079 "On success this returns a non-NULL pointer to a handle. On error it returns "
34084 #: ../src/guestfs.pod:1326
34086 "You have to \"configure\" the handle after creating it. This includes "
34087 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
34088 "handle at least once."
34092 #: ../src/guestfs.pod:1330
34093 msgid "After configuring the handle, you have to call L</guestfs_launch>."
34097 #: ../src/guestfs.pod:1332
34099 "You may also want to configure error handling for the handle. See the L</"
34100 "ERROR HANDLING> section below."
34104 #: ../src/guestfs.pod:1335
34105 msgid "guestfs_close"
34109 #: ../src/guestfs.pod:1337
34112 " void guestfs_close (guestfs_h *g);\n"
34117 #: ../src/guestfs.pod:1339
34118 msgid "This closes the connection handle and frees up all resources used."
34122 #: ../src/guestfs.pod:1341
34124 "If autosync was set on the handle and the handle was launched, then this "
34125 "implicitly calls various functions to unmount filesystems and sync the "
34126 "disk. See L</guestfs_set_autosync> for more details."
34130 #: ../src/guestfs.pod:1345
34131 msgid "If a close callback was set on the handle, then it is called."
34135 #: ../src/guestfs.pod:1347
34136 msgid "ERROR HANDLING"
34140 #: ../src/guestfs.pod:1349
34142 "API functions can return errors. For example, almost all functions that "
34143 "return C<int> will return C<-1> to indicate an error."
34147 #: ../src/guestfs.pod:1352
34149 "Additional information is available for errors: an error message string and "
34150 "optionally an error number (errno) if the thing that failed was a system "
34155 #: ../src/guestfs.pod:1356
34157 "You can get at the additional information about the last error on the handle "
34158 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
34159 "up an error handler with L</guestfs_set_error_handler>."
34163 #: ../src/guestfs.pod:1361
34165 "When the handle is created, a default error handler is installed which "
34166 "prints the error message string to C<stderr>. For small short-running "
34167 "command line programs it is sufficient to do:"
34171 #: ../src/guestfs.pod:1365
34174 " if (guestfs_launch (g) == -1)\n"
34175 " exit (EXIT_FAILURE);\n"
34180 #: ../src/guestfs.pod:1368
34182 "since the default error handler will ensure that an error message has been "
34183 "printed to C<stderr> before the program exits."
34187 #: ../src/guestfs.pod:1371
34189 "For other programs the caller will almost certainly want to install an "
34190 "alternate error handler or do error handling in-line like this:"
34194 #: ../src/guestfs.pod:1374
34197 " /* This disables the default behaviour of printing errors\n"
34199 " guestfs_set_error_handler (g, NULL, NULL);\n"
34204 #: ../src/guestfs.pod:1378
34207 " if (guestfs_launch (g) == -1) {\n"
34208 " /* Examine the error message and print it etc. */\n"
34209 " char *msg = guestfs_last_error (g);\n"
34210 " int errnum = guestfs_last_errno (g);\n"
34211 " fprintf (stderr, \"%s\", msg);\n"
34212 " if (errnum != 0)\n"
34213 " fprintf (stderr, \": %s\", strerror (errnum));\n"
34214 " fprintf (stderr, \"\\n\");\n"
34221 #: ../src/guestfs.pod:1389
34223 "Out of memory errors are handled differently. The default action is to call "
34224 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
34225 "guestfs_set_out_of_memory_handler>."
34229 #: ../src/guestfs.pod:1393
34231 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
34232 "because there is no handle if this happens there is no way to get additional "
34233 "error information. However L</guestfs_create> is supposed to be a "
34234 "lightweight operation which can only fail because of insufficient memory (it "
34235 "returns NULL in this case)."
34239 #: ../src/guestfs.pod:1399
34240 msgid "guestfs_last_error"
34244 #: ../src/guestfs.pod:1401
34247 " const char *guestfs_last_error (guestfs_h *g);\n"
34252 #: ../src/guestfs.pod:1403
34254 "This returns the last error message that happened on C<g>. If there has not "
34255 "been an error since the handle was created, then this returns C<NULL>."
34259 #: ../src/guestfs.pod:1407
34261 "The lifetime of the returned string is until the next error occurs, or L</"
34262 "guestfs_close> is called."
34266 #: ../src/guestfs.pod:1410
34267 msgid "guestfs_last_errno"
34271 #: ../src/guestfs.pod:1412
34274 " int guestfs_last_errno (guestfs_h *g);\n"
34279 #: ../src/guestfs.pod:1414
34280 msgid "This returns the last error number (errno) that happened on C<g>."
34284 #: ../src/guestfs.pod:1416
34285 msgid "If successful, an errno integer not equal to zero is returned."
34289 #: ../src/guestfs.pod:1418
34291 "If no error, this returns 0. This call can return 0 in three situations:"
34295 #: ../src/guestfs.pod:1425
34296 msgid "There has not been any error on the handle."
34300 #: ../src/guestfs.pod:1429
34302 "There has been an error but the errno was meaningless. This corresponds to "
34303 "the case where the error did not come from a failed system call, but for "
34304 "some other reason."
34308 #: ../src/guestfs.pod:1435
34310 "There was an error from a failed system call, but for some reason the errno "
34311 "was not captured and returned. This usually indicates a bug in libguestfs."
34315 #: ../src/guestfs.pod:1441
34317 "Libguestfs tries to convert the errno from inside the applicance into a "
34318 "corresponding errno for the caller (not entirely trivial: the appliance "
34319 "might be running a completely different operating system from the library "
34320 "and error numbers are not standardized across Un*xen). If this could not be "
34321 "done, then the error is translated to C<EINVAL>. In practice this should "
34322 "only happen in very rare circumstances."
34326 #: ../src/guestfs.pod:1449
34327 msgid "guestfs_set_error_handler"
34331 #: ../src/guestfs.pod:1451
34334 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
34336 " const char *msg);\n"
34337 " void guestfs_set_error_handler (guestfs_h *g,\n"
34338 " guestfs_error_handler_cb cb,\n"
34339 " void *opaque);\n"
34344 #: ../src/guestfs.pod:1458
34346 "The callback C<cb> will be called if there is an error. The parameters "
34347 "passed to the callback are an opaque data pointer and the error message "
34352 #: ../src/guestfs.pod:1462
34354 "C<errno> is not passed to the callback. To get that the callback must call "
34355 "L</guestfs_last_errno>."
34359 #: ../src/guestfs.pod:1465
34361 "Note that the message string C<msg> is freed as soon as the callback "
34362 "function returns, so if you want to stash it somewhere you must make your "
34367 #: ../src/guestfs.pod:1469
34368 msgid "The default handler prints messages on C<stderr>."
34372 #: ../src/guestfs.pod:1471
34373 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
34377 #: ../src/guestfs.pod:1473
34378 msgid "guestfs_get_error_handler"
34382 #: ../src/guestfs.pod:1475
34385 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
34386 " void **opaque_rtn);\n"
34391 #: ../src/guestfs.pod:1478
34392 msgid "Returns the current error handler callback."
34396 #: ../src/guestfs.pod:1480
34397 msgid "guestfs_set_out_of_memory_handler"
34401 #: ../src/guestfs.pod:1482
34404 " typedef void (*guestfs_abort_cb) (void);\n"
34405 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
34406 " guestfs_abort_cb);\n"
34411 #: ../src/guestfs.pod:1486
34413 "The callback C<cb> will be called if there is an out of memory situation. "
34414 "I<Note this callback must not return>."
34418 #: ../src/guestfs.pod:1489
34419 msgid "The default is to call L<abort(3)>."
34423 #: ../src/guestfs.pod:1491
34425 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
34429 #: ../src/guestfs.pod:1494
34430 msgid "guestfs_get_out_of_memory_handler"
34434 #: ../src/guestfs.pod:1496
34437 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
34442 #: ../src/guestfs.pod:1498
34443 msgid "This returns the current out of memory handler."
34447 #: ../src/guestfs.pod:1500
34452 #: ../src/guestfs.pod:1504
34457 #: ../src/guestfs.pod:1506
34462 #: ../src/guestfs.pod:1508
34463 msgid "AVAILABILITY"
34467 #: ../src/guestfs.pod:1510
34468 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
34472 #: ../src/guestfs.pod:1512
34474 "Using L</guestfs_available> you can test availability of the following "
34475 "groups of functions. This test queries the appliance to see if the "
34476 "appliance you are currently using supports the functionality."
34480 #: ../src/guestfs.pod:1517
34481 msgid "@AVAILABILITY@"
34485 #: ../src/guestfs.pod:1519
34486 msgid "GUESTFISH supported COMMAND"
34490 #: ../src/guestfs.pod:1521
34492 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
34493 "prints out the available groups and whether they are supported by this build "
34494 "of libguestfs. Note however that you have to do C<run> first."
34498 #: ../src/guestfs.pod:1526
34499 msgid "SINGLE CALLS AT COMPILE TIME"
34503 #: ../src/guestfs.pod:1528
34505 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
34506 "function, such as:"
34510 #: ../src/guestfs.pod:1531
34513 " #define LIBGUESTFS_HAVE_DD 1\n"
34518 #: ../src/guestfs.pod:1533
34519 msgid "if L</guestfs_dd> is available."
34523 #: ../src/guestfs.pod:1535
34525 "Before version 1.5.8, if you needed to test whether a single libguestfs "
34526 "function is available at compile time, we recommended using build tools such "
34527 "as autoconf or cmake. For example in autotools you could use:"
34531 #: ../src/guestfs.pod:1540
34534 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
34535 " AC_CHECK_FUNCS([guestfs_dd])\n"
34540 #: ../src/guestfs.pod:1543
34542 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
34547 #: ../src/guestfs.pod:1546
34548 msgid "SINGLE CALLS AT RUN TIME"
34552 #: ../src/guestfs.pod:1548
34554 "Testing at compile time doesn't guarantee that a function really exists in "
34555 "the library. The reason is that you might be dynamically linked against a "
34556 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
34557 "This situation unfortunately results in a segmentation fault, which is a "
34558 "shortcoming of the C dynamic linking system itself."
34562 #: ../src/guestfs.pod:1555
34564 "You can use L<dlopen(3)> to test if a function is available at run time, as "
34565 "in this example program (note that you still need the compile time check as "
34570 #: ../src/guestfs.pod:1559
34573 " #include <stdio.h>\n"
34574 " #include <stdlib.h>\n"
34575 " #include <unistd.h>\n"
34576 " #include <dlfcn.h>\n"
34577 " #include <guestfs.h>\n"
34582 #: ../src/guestfs.pod:1565
34587 " #ifdef LIBGUESTFS_HAVE_DD\n"
34589 " int has_function;\n"
34594 #: ../src/guestfs.pod:1571
34597 " /* Test if the function guestfs_dd is really available. */\n"
34598 " dl = dlopen (NULL, RTLD_LAZY);\n"
34600 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
34601 " exit (EXIT_FAILURE);\n"
34603 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
34609 #: ../src/guestfs.pod:1580
34612 " if (!has_function)\n"
34613 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
34615 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
34616 " /* Now it's safe to call\n"
34617 " guestfs_dd (g, \"foo\", \"bar\");\n"
34621 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
34628 #: ../src/guestfs.pod:1593
34630 "You may think the above is an awful lot of hassle, and it is. There are "
34631 "other ways outside of the C linking system to ensure that this kind of "
34632 "incompatibility never arises, such as using package versioning:"
34636 #: ../src/guestfs.pod:1598
34639 " Requires: libguestfs >= 1.0.80\n"
34644 #: ../src/guestfs.pod:1600
34645 msgid "CALLS WITH OPTIONAL ARGUMENTS"
34649 #: ../src/guestfs.pod:1602
34651 "A recent feature of the API is the introduction of calls which take optional "
34652 "arguments. In C these are declared 3 ways. The main way is as a call which "
34653 "takes variable arguments (ie. C<...>), as in this example:"
34657 #: ../src/guestfs.pod:1607
34660 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
34665 #: ../src/guestfs.pod:1609
34667 "Call this with a list of optional arguments, terminated by C<-1>. So to "
34668 "call with no optional arguments specified:"
34672 #: ../src/guestfs.pod:1612
34675 " guestfs_add_drive_opts (g, filename, -1);\n"
34680 #: ../src/guestfs.pod:1614
34681 msgid "With a single optional argument:"
34685 #: ../src/guestfs.pod:1616
34688 " guestfs_add_drive_opts (g, filename,\n"
34689 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
34695 #: ../src/guestfs.pod:1620
34700 #: ../src/guestfs.pod:1622
34703 " guestfs_add_drive_opts (g, filename,\n"
34704 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
34705 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34711 #: ../src/guestfs.pod:1627
34713 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
34718 #: ../src/guestfs.pod:1630
34719 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
34723 #: ../src/guestfs.pod:1632
34725 "The second variant has the same name with the suffix C<_va>, which works the "
34726 "same way but takes a C<va_list>. See the C manual for details. For the "
34727 "example function, this is declared:"
34731 #: ../src/guestfs.pod:1636
34734 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
34735 " va_list args);\n"
34740 #: ../src/guestfs.pod:1639
34741 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
34745 #: ../src/guestfs.pod:1641
34747 "The third variant is useful where you need to construct these calls. You "
34748 "pass in a structure where you fill in the optional fields. The structure "
34749 "has a bitmask as the first element which you must set to indicate which "
34750 "fields you have filled in. For our example function the structure and call "
34755 #: ../src/guestfs.pod:1647
34758 " struct guestfs_add_drive_opts_argv {\n"
34759 " uint64_t bitmask;\n"
34761 " const char *format;\n"
34764 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
34765 " const struct guestfs_add_drive_opts_argv *optargs);\n"
34770 #: ../src/guestfs.pod:1656
34771 msgid "You could call it like this:"
34775 #: ../src/guestfs.pod:1658
34778 " struct guestfs_add_drive_opts_argv optargs = {\n"
34779 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
34780 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
34781 " .readonly = 1,\n"
34782 " .format = \"qcow2\"\n"
34788 #: ../src/guestfs.pod:1665
34791 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
34796 #: ../src/guestfs.pod:1673
34797 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
34801 #: ../src/guestfs.pod:1678
34802 msgid "You do not need to fill in all fields of the structure."
34806 #: ../src/guestfs.pod:1682
34808 "There must be a one-to-one correspondence between fields of the structure "
34809 "that are filled in, and bits set in the bitmask."
34813 #: ../src/guestfs.pod:1687
34814 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
34818 #: ../src/guestfs.pod:1689
34820 "In other languages, optional arguments are expressed in the way that is "
34821 "natural for that language. We refer you to the language-specific "
34822 "documentation for more details on that."
34826 #: ../src/guestfs.pod:1693
34827 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
34831 #: ../src/guestfs.pod:1695
34832 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
34836 #: ../src/guestfs.pod:1697
34838 "B<Note:> This section documents the generic event mechanism introduced in "
34839 "libguestfs 1.10, which you should use in new code if possible. The old "
34840 "functions C<guestfs_set_log_message_callback>, "
34841 "C<guestfs_set_subprocess_quit_callback>, "
34842 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
34843 "C<guestfs_set_progress_callback> are no longer documented in this manual "
34844 "page. Because of the ABI guarantee, the old functions continue to work."
34848 #: ../src/guestfs.pod:1706
34850 "Handles generate events when certain things happen, such as log messages "
34851 "being generated, progress messages during long-running operations, or the "
34852 "handle being closed. The API calls described below let you register a "
34853 "callback to be called when events happen. You can register multiple "
34854 "callbacks (for the same, different or overlapping sets of events), and "
34855 "individually remove callbacks. If callbacks are not removed, then they "
34856 "remain in force until the handle is closed."
34860 #: ../src/guestfs.pod:1714
34862 "In the current implementation, events are only generated synchronously: that "
34863 "means that events (and hence callbacks) can only happen while you are in the "
34864 "middle of making another libguestfs call. The callback is called in the "
34869 #: ../src/guestfs.pod:1719
34871 "Events may contain a payload, usually nothing (void), an array of 64 bit "
34872 "unsigned integers, or a message buffer. Payloads are discussed later on."
34876 #: ../src/guestfs.pod:1723
34877 msgid "CLASSES OF EVENTS"
34881 #: ../src/guestfs.pod:1727
34882 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
34886 #: ../src/guestfs.pod:1730
34888 "The callback function will be called while the handle is being closed "
34889 "(synchronously from L</guestfs_close>)."
34893 #: ../src/guestfs.pod:1733
34895 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
34896 "handles that are open when the program exits. This means that this callback "
34897 "might be called indirectly from L<exit(3)>, which can cause unexpected "
34898 "problems in higher-level languages (eg. if your HLL interpreter has already "
34899 "been cleaned up by the time this is called, and if your callback then jumps "
34900 "into some HLL function)."
34904 #: ../src/guestfs.pod:1740
34906 "If no callback is registered: the handle is closed without any callback "
34911 #: ../src/guestfs.pod:1743
34912 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
34916 #: ../src/guestfs.pod:1746
34918 "The callback function will be called when the child process quits, either "
34919 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
34920 "corresponds to a transition from any state to the CONFIG state)."
34924 #: ../src/guestfs.pod:1750 ../src/guestfs.pod:1759 ../src/guestfs.pod:1876
34925 msgid "If no callback is registered: the event is ignored."
34929 #: ../src/guestfs.pod:1752
34930 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
34934 #: ../src/guestfs.pod:1755
34936 "The callback function will be called when the child process becomes ready "
34937 "first time after it has been launched. (This corresponds to a transition "
34938 "from LAUNCHING to the READY state)."
34942 #: ../src/guestfs.pod:1761
34943 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
34947 #: ../src/guestfs.pod:1764
34949 "Some long-running operations can generate progress messages. If this "
34950 "callback is registered, then it will be called each time a progress message "
34951 "is generated (usually two seconds after the operation started, and three "
34952 "times per second thereafter until it completes, although the frequency may "
34953 "change in future versions)."
34957 #: ../src/guestfs.pod:1770
34959 "The callback receives in the payload four unsigned 64 bit numbers which are "
34960 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
34964 #: ../src/guestfs.pod:1773
34966 "The units of C<total> are not defined, although for some operations C<total> "
34967 "may relate in some way to the amount of data to be transferred (eg. in bytes "
34968 "or megabytes), and C<position> may be the portion which has been transferred."
34972 #: ../src/guestfs.pod:1778
34973 msgid "The only defined and stable parts of the API are:"
34977 #: ../src/guestfs.pod:1784
34979 "The callback can display to the user some type of progress bar or indicator "
34980 "which shows the ratio of C<position>:C<total>."
34984 #: ../src/guestfs.pod:1789
34985 msgid "0 E<lt>= C<position> E<lt>= C<total>"
34989 #: ../src/guestfs.pod:1793
34991 "If any progress notification is sent during a call, then a final progress "
34992 "notification is always sent when C<position> = C<total> (I<unless> the call "
34993 "fails with an error)."
34997 #: ../src/guestfs.pod:1797
34999 "This is to simplify caller code, so callers can easily set the progress "
35000 "indicator to \"100%\" at the end of the operation, without requiring special "
35001 "code to detect this case."
35005 #: ../src/guestfs.pod:1803
35007 "For some calls we are unable to estimate the progress of the call, but we "
35008 "can still generate progress messages to indicate activity. This is known as "
35009 "\"pulse mode\", and is directly supported by certain progress bar "
35010 "implementations (eg. GtkProgressBar)."
35014 #: ../src/guestfs.pod:1808
35016 "For these calls, zero or more progress messages are generated with "
35017 "C<position = 0> and C<total = 1>, followed by a final message with "
35018 "C<position = total = 1>."
35022 #: ../src/guestfs.pod:1812
35024 "As noted above, if the call fails with an error then the final message may "
35025 "not be generated."
35029 #: ../src/guestfs.pod:1817
35031 "The callback also receives the procedure number (C<proc_nr>) and serial "
35032 "number (C<serial>) of the call. These are only useful for debugging "
35033 "protocol issues, and the callback can normally ignore them. The callback "
35034 "may want to print these numbers in error messages or debugging messages."
35038 #: ../src/guestfs.pod:1823
35039 msgid "If no callback is registered: progress messages are discarded."
35043 #: ../src/guestfs.pod:1825
35044 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
35048 #: ../src/guestfs.pod:1828
35050 "The callback function is called whenever a log message is generated by qemu, "
35051 "the appliance kernel, guestfsd (daemon), or utility programs."
35055 #: ../src/guestfs.pod:1831
35057 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
35058 "guestfs_launch>) then additional debug messages are generated."
35062 #: ../src/guestfs.pod:1834 ../src/guestfs.pod:1848
35064 "If no callback is registered: the messages are discarded unless the verbose "
35065 "flag is set in which case they are sent to stderr. You can override the "
35066 "printing of verbose messages to stderr by setting up a callback."
35070 #: ../src/guestfs.pod:1839
35071 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
35075 #: ../src/guestfs.pod:1842
35077 "The callback function is called whenever a log message is generated by the "
35078 "library part of libguestfs."
35082 #: ../src/guestfs.pod:1845
35084 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
35085 "messages are generated."
35089 #: ../src/guestfs.pod:1853
35090 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
35094 #: ../src/guestfs.pod:1856
35096 "The callback function is called whenever a trace message is generated. This "
35097 "only applies if the trace flag (L</guestfs_set_trace>) is set."
35101 #: ../src/guestfs.pod:1859
35103 "If no callback is registered: the messages are sent to stderr. You can "
35104 "override the printing of trace messages to stderr by setting up a callback."
35108 #: ../src/guestfs.pod:1863
35109 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
35113 #: ../src/guestfs.pod:1866
35115 "The callback function is called whenever a libguestfs function is entered."
35119 #: ../src/guestfs.pod:1869
35121 "The payload is a string which contains the name of the function that we are "
35122 "entering (not including C<guestfs_> prefix)."
35126 #: ../src/guestfs.pod:1872
35128 "Note that libguestfs functions can call themselves, so you may see many "
35129 "events from a single call. A few libguestfs functions do not generate this "
35134 #: ../src/guestfs.pod:1880
35135 msgid "guestfs_set_event_callback"
35139 #: ../src/guestfs.pod:1882
35142 " int guestfs_set_event_callback (guestfs_h *g,\n"
35143 " guestfs_event_callback cb,\n"
35144 " uint64_t event_bitmask,\n"
35146 " void *opaque);\n"
35151 #: ../src/guestfs.pod:1888
35153 "This function registers a callback (C<cb>) for all event classes in the "
35154 "C<event_bitmask>."
35158 #: ../src/guestfs.pod:1891
35160 "For example, to register for all log message events, you could call this "
35161 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
35162 "To register a single callback for all possible classes of events, use "
35163 "C<GUESTFS_EVENT_ALL>."
35167 #: ../src/guestfs.pod:1897
35168 msgid "C<flags> should always be passed as 0."
35172 #: ../src/guestfs.pod:1899
35174 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
35175 "it for any purpose."
35179 #: ../src/guestfs.pod:1902
35181 "The return value is the event handle (an integer) which you can use to "
35182 "delete the callback (see below)."
35186 #: ../src/guestfs.pod:1905
35188 "If there is an error, this function returns C<-1>, and sets the error in the "
35189 "handle in the usual way (see L</guestfs_last_error> etc.)"
35193 #: ../src/guestfs.pod:1908
35195 "Callbacks remain in effect until they are deleted, or until the handle is "
35200 #: ../src/guestfs.pod:1911
35202 "In the case where multiple callbacks are registered for a particular event "
35203 "class, all of the callbacks are called. The order in which multiple "
35204 "callbacks are called is not defined."
35208 #: ../src/guestfs.pod:1915
35209 msgid "guestfs_delete_event_callback"
35213 #: ../src/guestfs.pod:1917
35216 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
35221 #: ../src/guestfs.pod:1919
35223 "Delete a callback that was previously registered. C<event_handle> should be "
35224 "the integer that was returned by a previous call to "
35225 "C<guestfs_set_event_callback> on the same handle."
35229 #: ../src/guestfs.pod:1923
35230 msgid "guestfs_event_callback"
35234 #: ../src/guestfs.pod:1925
35237 " typedef void (*guestfs_event_callback) (\n"
35240 " uint64_t event,\n"
35241 " int event_handle,\n"
35243 " const char *buf, size_t buf_len,\n"
35244 " const uint64_t *array, size_t array_len);\n"
35249 #: ../src/guestfs.pod:1934
35251 "This is the type of the event callback function that you have to provide."
35255 #: ../src/guestfs.pod:1937
35257 "The basic parameters are: the handle (C<g>), the opaque user pointer "
35258 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
35259 "handle, and C<flags> which in the current API you should ignore."
35263 #: ../src/guestfs.pod:1941
35265 "The remaining parameters contain the event payload (if any). Each event may "
35266 "contain a payload, which usually relates to the event class, but for future "
35267 "proofing your code should be written to handle any payload for any event "
35272 #: ../src/guestfs.pod:1946
35274 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
35275 "there is no message buffer). Note that this message buffer can contain "
35276 "arbitrary 8 bit data, including NUL bytes."
35280 #: ../src/guestfs.pod:1950
35282 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
35283 "moment this is only used for progress messages."
35287 #: ../src/guestfs.pod:1953
35288 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
35292 #: ../src/guestfs.pod:1955
35294 "One motivation for the generic event API was to allow GUI programs to "
35295 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
35296 "unconditionally to C<stderr>."
35300 #: ../src/guestfs.pod:1959
35302 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
35303 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
35304 "messages are not events; you must capture error messages separately)."
35308 #: ../src/guestfs.pod:1964
35310 "Programs have to set up a callback to capture the classes of events of "
35315 #: ../src/guestfs.pod:1967
35319 " guestfs_set_event_callback\n"
35320 " (g, message_callback,\n"
35321 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
35322 " GUESTFS_EVENT_TRACE,\n"
35323 " 0, NULL) == -1)\n"
35324 " if (eh == -1) {\n"
35325 " // handle error in the usual way\n"
35331 #: ../src/guestfs.pod:1977
35333 "The callback can then direct messages to the appropriate place. In this "
35334 "example, messages are directed to syslog:"
35338 #: ../src/guestfs.pod:1980
35342 " message_callback (\n"
35345 " uint64_t event,\n"
35346 " int event_handle,\n"
35348 " const char *buf, size_t buf_len,\n"
35349 " const uint64_t *array, size_t array_len)\n"
35351 " const int priority = LOG_USER|LOG_INFO;\n"
35352 " if (buf_len > 0)\n"
35353 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
35359 #: ../src/guestfs.pod:1995
35360 msgid "CANCELLING LONG TRANSFERS"
35364 #: ../src/guestfs.pod:1997
35366 "Some operations can be cancelled by the caller while they are in progress. "
35367 "Currently only operations that involve uploading or downloading data can be "
35368 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
35369 "parameters in the generator)."
35373 #: ../src/guestfs.pod:2002
35374 msgid "guestfs_user_cancel"
35378 #: ../src/guestfs.pod:2004
35381 " void guestfs_user_cancel (guestfs_h *g);\n"
35386 #: ../src/guestfs.pod:2006
35388 "C<guestfs_user_cancel> cancels the current upload or download operation."
35392 #: ../src/guestfs.pod:2009
35394 "Unlike most other libguestfs calls, this function is signal safe and thread "
35395 "safe. You can call it from a signal handler or from another thread, without "
35396 "needing to do any locking."
35400 #: ../src/guestfs.pod:2013
35402 "The transfer that was in progress (if there is one) will stop shortly "
35403 "afterwards, and will return an error. The errno (see L</"
35404 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
35405 "out if the operation was cancelled or failed because of another error."
35409 #: ../src/guestfs.pod:2019
35411 "No cleanup is performed: for example, if a file was being uploaded then "
35412 "after cancellation there may be a partially uploaded file. It is the "
35413 "caller's responsibility to clean up if necessary."
35417 #: ../src/guestfs.pod:2023
35418 msgid "There are two common places that you might call C<guestfs_user_cancel>."
35422 #: ../src/guestfs.pod:2025
35424 "In an interactive text-based program, you might call it from a C<SIGINT> "
35425 "signal handler so that pressing C<^C> cancels the current operation. (You "
35426 "also need to call L</guestfs_set_pgroup> so that child processes don't "
35427 "receive the C<^C> signal)."
35431 #: ../src/guestfs.pod:2030
35433 "In a graphical program, when the main thread is displaying a progress bar "
35434 "with a cancel button, wire up the cancel button to call this function."
35438 #: ../src/guestfs.pod:2034
35439 msgid "PRIVATE DATA AREA"
35443 #: ../src/guestfs.pod:2036
35445 "You can attach named pieces of private data to the libguestfs handle, fetch "
35446 "them by name, and walk over them, for the lifetime of the handle. This is "
35447 "called the private data area and is only available from the C API."
35451 #: ../src/guestfs.pod:2041
35452 msgid "To attach a named piece of data, use the following call:"
35456 #: ../src/guestfs.pod:2043
35459 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
35464 #: ../src/guestfs.pod:2045
35466 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
35467 "pointer (which can be C<NULL>). Any previous item with the same key is "
35472 #: ../src/guestfs.pod:2049
35474 "You can use any C<key> you want, but your key should I<not> start with an "
35475 "underscore character. Keys beginning with an underscore character are "
35476 "reserved for internal libguestfs purposes (eg. for implementing language "
35477 "bindings). It is recommended that you prefix the key with some unique "
35478 "string to avoid collisions with other users."
35482 #: ../src/guestfs.pod:2055
35483 msgid "To retrieve the pointer, use:"
35487 #: ../src/guestfs.pod:2057
35490 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
35495 #: ../src/guestfs.pod:2059
35497 "This function returns C<NULL> if either no data is found associated with "
35498 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
35503 #: ../src/guestfs.pod:2063
35505 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
35506 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
35507 "all. In particular, libguestfs does I<not> try to free the data when the "
35508 "handle is closed. If the data must be freed, then the caller must either "
35509 "free it before calling L</guestfs_close> or must set up a close callback to "
35510 "do it (see L</GUESTFS_EVENT_CLOSE>)."
35514 #: ../src/guestfs.pod:2070
35515 msgid "To walk over all entries, use these two functions:"
35519 #: ../src/guestfs.pod:2072
35522 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
35527 #: ../src/guestfs.pod:2074
35530 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
35535 #: ../src/guestfs.pod:2076
35537 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
35538 "not have any particular meaning -- keys are not returned in any defined "
35539 "order). A pointer to the key is returned in C<*key_rtn> and the "
35540 "corresponding data pointer is returned from the function. C<NULL> is "
35541 "returned if there are no keys stored in the handle."
35545 #: ../src/guestfs.pod:2082
35547 "C<guestfs_next_private> returns the next key, pointer pair. The return "
35548 "value of this function is also C<NULL> is there are no further entries to "
35553 #: ../src/guestfs.pod:2086
35554 msgid "Notes about walking over entries:"
35558 #: ../src/guestfs.pod:2092
35560 "You must not call C<guestfs_set_private> while walking over the entries."
35564 #: ../src/guestfs.pod:2097
35566 "The handle maintains an internal iterator which is reset when you call "
35567 "C<guestfs_first_private>. This internal iterator is invalidated when you "
35568 "call C<guestfs_set_private>."
35572 #: ../src/guestfs.pod:2103
35573 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
35577 #: ../src/guestfs.pod:2105
35580 " guestfs_set_private (g, key, NULL);\n"
35585 #: ../src/guestfs.pod:2107
35586 msgid "then that C<key> is not returned when walking."
35590 #: ../src/guestfs.pod:2111
35592 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
35593 "C<guestfs_next_private> or C<guestfs_set_private>."
35597 #: ../src/guestfs.pod:2117
35599 "The following example code shows how to print all keys and data pointers "
35600 "that are associated with the handle C<g>:"
35604 #: ../src/guestfs.pod:2120
35607 " const char *key;\n"
35608 " void *data = guestfs_first_private (g, &key);\n"
35609 " while (data != NULL)\n"
35611 " printf (\"key = %s, data = %p\\n\", key, data);\n"
35612 " data = guestfs_next_private (g, &key);\n"
35618 #: ../src/guestfs.pod:2128
35620 "More commonly you are only interested in keys that begin with an application-"
35621 "specific prefix C<foo_>. Modify the loop like so:"
35625 #: ../src/guestfs.pod:2131
35628 " const char *key;\n"
35629 " void *data = guestfs_first_private (g, &key);\n"
35630 " while (data != NULL)\n"
35632 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
35633 " printf (\"key = %s, data = %p\\n\", key, data);\n"
35634 " data = guestfs_next_private (g, &key);\n"
35640 #: ../src/guestfs.pod:2140
35642 "If you need to modify keys while walking, then you have to jump back to the "
35643 "beginning of the loop. For example, to delete all keys prefixed with "
35648 #: ../src/guestfs.pod:2144
35651 " const char *key;\n"
35654 " data = guestfs_first_private (g, &key);\n"
35655 " while (data != NULL)\n"
35657 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
35659 " guestfs_set_private (g, key, NULL);\n"
35660 " /* note that 'key' pointer is now invalid, and so is\n"
35661 " the internal iterator */\n"
35664 " data = guestfs_next_private (g, &key);\n"
35670 #: ../src/guestfs.pod:2160
35672 "Note that the above loop is guaranteed to terminate because the keys are "
35673 "being deleted, but other manipulations of keys within the loop might not "
35674 "terminate unless you also maintain an indication of which keys have been "
35679 #: ../src/guestfs.pod:2165 ../src/guestfs.pod:2170
35684 #: ../src/guestfs.pod:2167
35686 "<!-- old anchor for the next section --> <a name="
35687 "\"state_machine_and_low_level_event_api\"/>"
35691 #: ../src/guestfs.pod:2172
35692 msgid "ARCHITECTURE"
35696 #: ../src/guestfs.pod:2174
35698 "Internally, libguestfs is implemented by running an appliance (a special "
35699 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
35700 "process of the main program."
35704 #: ../src/guestfs.pod:2178
35707 " ___________________\n"
35709 " | main program |\n"
35711 " | | child process / appliance\n"
35712 " | | __________________________\n"
35714 " +-------------------+ RPC | +-----------------+ |\n"
35715 " | libguestfs <--------------------> guestfsd | |\n"
35716 " | | | +-----------------+ |\n"
35717 " \\___________________/ | | Linux kernel | |\n"
35718 " | +--^--------------+ |\n"
35719 " \\_________|________________/\n"
35721 " _______v______\n"
35724 " | disk image |\n"
35725 " \\______________/\n"
35730 #: ../src/guestfs.pod:2198
35732 "The library, linked to the main program, creates the child process and hence "
35733 "the appliance in the L</guestfs_launch> function."
35737 #: ../src/guestfs.pod:2201
35739 "Inside the appliance is a Linux kernel and a complete stack of userspace "
35740 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
35741 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
35742 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
35743 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
35744 "attached to the qemu process which translates device access by the "
35745 "appliance's Linux kernel into accesses to the image."
35749 #: ../src/guestfs.pod:2210
35751 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
35752 "Although the disk image you are attached to might also be used by some "
35753 "virtual machine, libguestfs doesn't know or care about this. (But you will "
35754 "care if both libguestfs's qemu process and your virtual machine are trying "
35755 "to update the disk image at the same time, since these usually results in "
35756 "massive disk corruption)."
35760 #: ../src/guestfs.pod:2217
35761 msgid "STATE MACHINE"
35765 #: ../src/guestfs.pod:2219
35766 msgid "libguestfs uses a state machine to model the child process:"
35770 #: ../src/guestfs.pod:2221
35774 " guestfs_create\n"
35782 " / | \\ \\ guestfs_launch\n"
35783 " / | _\\__V______\n"
35785 " / | | LAUNCHING |\n"
35786 " / | \\___________/\n"
35788 " / | guestfs_launch\n"
35790 " ______ / __|____V\n"
35791 " / \\ ------> / \\\n"
35792 " | BUSY | | READY |\n"
35793 " \\______/ <------ \\________/\n"
35798 #: ../src/guestfs.pod:2243
35800 "The normal transitions are (1) CONFIG (when the handle is created, but there "
35801 "is no child process), (2) LAUNCHING (when the child process is booting up), "
35802 "(3) alternating between READY and BUSY as commands are issued to, and "
35803 "carried out by, the child process."
35807 #: ../src/guestfs.pod:2248
35809 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
35810 "asynchronously at any time (eg. due to some internal error), and that causes "
35811 "the state to transition back to CONFIG."
35815 #: ../src/guestfs.pod:2252
35817 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
35818 "issued when in the CONFIG state."
35822 #: ../src/guestfs.pod:2255
35824 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
35825 "L</guestfs_launch> blocks until the child process is READY to accept "
35826 "commands (or until some failure or timeout). L</guestfs_launch> internally "
35827 "moves the state from CONFIG to LAUNCHING while it is running."
35831 #: ../src/guestfs.pod:2261
35833 "API actions such as L</guestfs_mount> can only be issued when in the READY "
35834 "state. These API calls block waiting for the command to be carried out (ie. "
35835 "the state to transition to BUSY and then back to READY). There are no non-"
35836 "blocking versions, and no way to issue more than one command per handle at "
35841 #: ../src/guestfs.pod:2267
35843 "Finally, the child process sends asynchronous messages back to the main "
35844 "program, such as kernel log messages. You can register a callback to "
35845 "receive these messages."
35849 #: ../src/guestfs.pod:2271
35854 #: ../src/guestfs.pod:2273
35855 msgid "APPLIANCE BOOT PROCESS"
35859 #: ../src/guestfs.pod:2275
35861 "This process has evolved and continues to evolve. The description here "
35862 "corresponds only to the current version of libguestfs and is provided for "
35863 "information only."
35867 #: ../src/guestfs.pod:2279
35869 "In order to follow the stages involved below, enable libguestfs debugging "
35870 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
35874 #: ../src/guestfs.pod:2284
35875 msgid "Create the appliance"
35879 #: ../src/guestfs.pod:2286
35881 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
35882 "initrd and the appliance."
35886 #: ../src/guestfs.pod:2289
35888 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
35889 "directory if C<TMPDIR> is set)."
35893 #: ../src/guestfs.pod:2292
35895 "For a complete description of how the appliance is created and cached, read "
35896 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
35900 #: ../src/guestfs.pod:2296
35901 msgid "Start qemu and boot the kernel"
35905 #: ../src/guestfs.pod:2298
35906 msgid "qemu is invoked to boot the kernel."
35910 #: ../src/guestfs.pod:2300
35911 msgid "Run the initrd"
35915 #: ../src/guestfs.pod:2302
35917 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
35918 "appliance. The purpose of the initrd is to load enough kernel modules in "
35919 "order that the appliance itself can be mounted and started."
35923 #: ../src/guestfs.pod:2306
35925 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
35930 #: ../src/guestfs.pod:2309
35932 "When the initrd has started you will see messages showing that kernel "
35933 "modules are being loaded, similar to this:"
35937 #: ../src/guestfs.pod:2312
35940 " febootstrap: ext2 mini initrd starting up\n"
35941 " febootstrap: mounting /sys\n"
35942 " febootstrap: internal insmod libcrc32c.ko\n"
35943 " febootstrap: internal insmod crc32c-intel.ko\n"
35948 #: ../src/guestfs.pod:2317
35949 msgid "Find and mount the appliance device"
35953 #: ../src/guestfs.pod:2319
35955 "The appliance is a sparse file containing an ext2 filesystem which contains "
35956 "a familiar (although reduced in size) Linux operating system. It would "
35957 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
35961 #: ../src/guestfs.pod:2323
35963 "The regular disks being inspected by libguestfs are the first devices "
35964 "exposed by qemu (eg. as C</dev/vda>)."
35968 #: ../src/guestfs.pod:2326
35970 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
35971 "there was only one regular disk)."
35975 #: ../src/guestfs.pod:2329
35977 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
35978 "and switch root into the appliance, and run C</init> from the appliance."
35982 #: ../src/guestfs.pod:2333
35983 msgid "If this works successfully you will see messages such as:"
35987 #: ../src/guestfs.pod:2335
35990 " febootstrap: picked /sys/block/vdb/dev as root device\n"
35991 " febootstrap: creating /dev/root as block special 252:16\n"
35992 " febootstrap: mounting new root on /root\n"
35993 " febootstrap: chroot\n"
35994 " Starting /init script ...\n"
35999 #: ../src/guestfs.pod:2341
36001 "Note that C<Starting /init script ...> indicates that the appliance's init "
36002 "script is now running."
36006 #: ../src/guestfs.pod:2344
36007 msgid "Initialize the appliance"
36011 #: ../src/guestfs.pod:2346
36013 "The appliance itself now initializes itself. This involves starting certain "
36014 "processes like C<udev>, possibly printing some debug information, and "
36015 "finally running the daemon (C<guestfsd>)."
36019 #: ../src/guestfs.pod:2350
36024 #: ../src/guestfs.pod:2352
36026 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
36031 #: ../src/guestfs.pod:2355
36034 " verbose daemon enabled\n"
36039 #: ../src/guestfs.pod:2357
36041 "The daemon expects to see a named virtio-serial port exposed by qemu and "
36042 "connected on the other end to the library."
36046 #: ../src/guestfs.pod:2360
36048 "The daemon connects to this port (and hence to the library) and sends a four "
36049 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
36050 "protocol (see below)."
36054 #: ../src/guestfs.pod:2366
36055 msgid "COMMUNICATION PROTOCOL"
36059 #: ../src/guestfs.pod:2368
36061 "Don't rely on using this protocol directly. This section documents how it "
36062 "currently works, but it may change at any time."
36066 #: ../src/guestfs.pod:2371
36068 "The protocol used to talk between the library and the daemon running inside "
36069 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
36070 "1014, RFC 1832, RFC 4506)."
36074 #: ../src/guestfs.pod:2375
36076 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
36077 "this file is automatically generated)."
36081 #: ../src/guestfs.pod:2378
36083 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
36084 "and C<FileOut> parameters, which are handled with very simple request/reply "
36085 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
36086 "parameters, which use the same request and reply messages, but they may also "
36087 "be followed by files sent using a chunked encoding."
36091 #: ../src/guestfs.pod:2385
36092 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
36096 #: ../src/guestfs.pod:2387
36097 msgid "For ordinary functions, the request message is:"
36101 #: ../src/guestfs.pod:2389
36104 " total length (header + arguments,\n"
36105 " but not including the length word itself)\n"
36106 " struct guestfs_message_header (encoded as XDR)\n"
36107 " struct guestfs_<foo>_args (encoded as XDR)\n"
36112 #: ../src/guestfs.pod:2394
36114 "The total length field allows the daemon to allocate a fixed size buffer "
36115 "into which it slurps the rest of the message. As a result, the total length "
36116 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
36117 "effective size of any request is limited to somewhere under this size."
36121 #: ../src/guestfs.pod:2400
36123 "Note also that many functions don't take any arguments, in which case the "
36124 "C<guestfs_I<foo>_args> is completely omitted."
36128 #: ../src/guestfs.pod:2403
36130 "The header contains the procedure number (C<guestfs_proc>) which is how the "
36131 "receiver knows what type of args structure to expect, or none at all."
36135 #: ../src/guestfs.pod:2407
36137 "For functions that take optional arguments, the optional arguments are "
36138 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
36139 "arguments. A bitmask in the header indicates which optional arguments are "
36140 "meaningful. The bitmask is also checked to see if it contains bits set "
36141 "which the daemon does not know about (eg. if more optional arguments were "
36142 "added in a later version of the library), and this causes the call to be "
36147 #: ../src/guestfs.pod:2415
36148 msgid "The reply message for ordinary functions is:"
36152 #: ../src/guestfs.pod:2417
36155 " total length (header + ret,\n"
36156 " but not including the length word itself)\n"
36157 " struct guestfs_message_header (encoded as XDR)\n"
36158 " struct guestfs_<foo>_ret (encoded as XDR)\n"
36163 #: ../src/guestfs.pod:2422
36165 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
36166 "functions that return no formal return values."
36170 #: ../src/guestfs.pod:2425
36172 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
36176 #: ../src/guestfs.pod:2428
36178 "In the case of an error, a flag is set in the header, and the reply message "
36179 "is slightly changed:"
36183 #: ../src/guestfs.pod:2431
36186 " total length (header + error,\n"
36187 " but not including the length word itself)\n"
36188 " struct guestfs_message_header (encoded as XDR)\n"
36189 " struct guestfs_message_error (encoded as XDR)\n"
36194 #: ../src/guestfs.pod:2436
36196 "The C<guestfs_message_error> structure contains the error message as a "
36201 #: ../src/guestfs.pod:2439
36202 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
36206 #: ../src/guestfs.pod:2441
36208 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
36209 "The normal request message is sent (see above). However this is followed by "
36210 "a sequence of file chunks."
36214 #: ../src/guestfs.pod:2445
36217 " total length (header + arguments,\n"
36218 " but not including the length word itself,\n"
36219 " and not including the chunks)\n"
36220 " struct guestfs_message_header (encoded as XDR)\n"
36221 " struct guestfs_<foo>_args (encoded as XDR)\n"
36222 " sequence of chunks for FileIn param #0\n"
36223 " sequence of chunks for FileIn param #1 etc.\n"
36228 #: ../src/guestfs.pod:2453
36229 msgid "The \"sequence of chunks\" is:"
36233 #: ../src/guestfs.pod:2455
36236 " length of chunk (not including length word itself)\n"
36237 " struct guestfs_chunk (encoded as XDR)\n"
36238 " length of chunk\n"
36239 " struct guestfs_chunk (encoded as XDR)\n"
36241 " length of chunk\n"
36242 " struct guestfs_chunk (with data.data_len == 0)\n"
36247 #: ../src/guestfs.pod:2463
36249 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
36250 "is set in the final chunk to indicate either successful completion or early "
36255 #: ../src/guestfs.pod:2467
36257 "At time of writing there are no functions that have more than one FileIn "
36258 "parameter. However this is (theoretically) supported, by sending the "
36259 "sequence of chunks for each FileIn parameter one after another (from left to "
36264 #: ../src/guestfs.pod:2472
36266 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
36267 "transfer. The library does this by sending a chunk with a special flag set "
36268 "to indicate cancellation. When the daemon sees this, it cancels the whole "
36269 "RPC, does I<not> send any reply, and goes back to reading the next request."
36273 #: ../src/guestfs.pod:2478
36275 "The daemon may also cancel. It does this by writing a special word "
36276 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
36277 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
36278 "cancel chunk). The special word is chosen so that even if cancellation "
36279 "happens right at the end of the transfer (after the library has finished "
36280 "writing and has started listening for the reply), the \"spurious\" cancel "
36281 "flag will not be confused with the reply message."
36285 #: ../src/guestfs.pod:2487
36287 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
36288 "limit), and also files where the size is not known in advance (eg. from "
36289 "pipes or sockets). However the chunks are rather small "
36290 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
36291 "to keep much in memory."
36295 #: ../src/guestfs.pod:2493
36296 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
36300 #: ../src/guestfs.pod:2495
36302 "The protocol for FileOut parameters is exactly the same as for FileIn "
36303 "parameters, but with the roles of daemon and library reversed."
36307 #: ../src/guestfs.pod:2498
36310 " total length (header + ret,\n"
36311 " but not including the length word itself,\n"
36312 " and not including the chunks)\n"
36313 " struct guestfs_message_header (encoded as XDR)\n"
36314 " struct guestfs_<foo>_ret (encoded as XDR)\n"
36315 " sequence of chunks for FileOut param #0\n"
36316 " sequence of chunks for FileOut param #1 etc.\n"
36321 #: ../src/guestfs.pod:2506
36322 msgid "INITIAL MESSAGE"
36326 #: ../src/guestfs.pod:2508
36328 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
36329 "which indicates that the guest and daemon is alive. This is what L</"
36330 "guestfs_launch> waits for."
36334 #: ../src/guestfs.pod:2512
36335 msgid "PROGRESS NOTIFICATION MESSAGES"
36339 #: ../src/guestfs.pod:2514
36341 "The daemon may send progress notification messages at any time. These are "
36342 "distinguished by the normal length word being replaced by "
36343 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
36347 #: ../src/guestfs.pod:2518
36349 "The library turns them into progress callbacks (see L</"
36350 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
36355 #: ../src/guestfs.pod:2522
36357 "The daemon self-limits the frequency of progress messages it sends (see "
36358 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
36363 #: ../src/guestfs.pod:2526
36364 msgid "LIBGUESTFS VERSION NUMBERS"
36368 #: ../src/guestfs.pod:2528
36370 "Since April 2010, libguestfs has started to make separate development and "
36371 "stable releases, along with corresponding branches in our git repository. "
36372 "These separate releases can be identified by version number:"
36376 #: ../src/guestfs.pod:2533
36379 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
36380 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
36386 " | `-------- sub-version\n"
36388 " `------ always '1' because we don't change the ABI\n"
36393 #: ../src/guestfs.pod:2544
36394 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
36398 #: ../src/guestfs.pod:2546
36400 "As time passes we cherry pick fixes from the development branch and backport "
36401 "those into the stable branch, the effect being that the stable branch should "
36402 "get more stable and less buggy over time. So the stable releases are ideal "
36403 "for people who don't need new features but would just like the software to "
36408 #: ../src/guestfs.pod:2552
36409 msgid "Our criteria for backporting changes are:"
36413 #: ../src/guestfs.pod:2558
36415 "Documentation changes which don't affect any code are backported unless the "
36416 "documentation refers to a future feature which is not in stable."
36420 #: ../src/guestfs.pod:2564
36422 "Bug fixes which are not controversial, fix obvious problems, and have been "
36423 "well tested are backported."
36427 #: ../src/guestfs.pod:2569
36429 "Simple rearrangements of code which shouldn't affect how it works get "
36430 "backported. This is so that the code in the two branches doesn't get too "
36431 "far out of step, allowing us to backport future fixes more easily."
36435 #: ../src/guestfs.pod:2575
36437 "We I<don't> backport new features, new APIs, new tools etc, except in one "
36438 "exceptional case: the new feature is required in order to implement an "
36439 "important bug fix."
36443 #: ../src/guestfs.pod:2581
36445 "A new stable branch starts when we think the new features in development are "
36446 "substantial and compelling enough over the current stable branch to warrant "
36447 "it. When that happens we create new stable and development versions 1.N.0 "
36448 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
36449 "stable at this point, but by backporting fixes from development, that branch "
36450 "will stabilize over time."
36454 #: ../src/guestfs.pod:2589
36455 msgid "EXTENDING LIBGUESTFS"
36459 #: ../src/guestfs.pod:2591
36460 msgid "ADDING A NEW API ACTION"
36464 #: ../src/guestfs.pod:2593
36466 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
36467 "documentation) are generated, and this makes it easy to extend the "
36472 #: ../src/guestfs.pod:2597
36473 msgid "To add a new API action there are two changes:"
36477 #: ../src/guestfs.pod:2603
36479 "You need to add a description of the call (name, parameters, return type, "
36480 "tests, documentation) to C<generator/generator_actions.ml>."
36484 #: ../src/guestfs.pod:2606
36486 "There are two sorts of API action, depending on whether the call goes "
36487 "through to the daemon in the appliance, or is serviced entirely by the "
36488 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
36489 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
36490 "an example of the latter, since a trace flag is maintained in the handle and "
36491 "all tracing is done on the library side."
36495 #: ../src/guestfs.pod:2614
36497 "Most new actions are of the first type, and get added to the "
36498 "C<daemon_functions> list. Each function has a unique procedure number used "
36499 "in the RPC protocol which is assigned to that action when we publish "
36500 "libguestfs and cannot be reused. Take the latest procedure number and "
36505 #: ../src/guestfs.pod:2620
36507 "For library-only actions of the second type, add to the "
36508 "C<non_daemon_functions> list. Since these functions are serviced by the "
36509 "library and do not travel over the RPC mechanism to the daemon, these "
36510 "functions do not need a procedure number, and so the procedure number is set "
36515 #: ../src/guestfs.pod:2628
36516 msgid "Implement the action (in C):"
36520 #: ../src/guestfs.pod:2630
36522 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
36523 "C<daemon/> directory."
36527 #: ../src/guestfs.pod:2633
36529 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
36530 "(note: double underscore) in the C<src/> directory."
36534 #: ../src/guestfs.pod:2636
36535 msgid "In either case, use another function as an example of what to do."
36539 #: ../src/guestfs.pod:2640
36540 msgid "After making these changes, use C<make> to compile."
36544 #: ../src/guestfs.pod:2642
36546 "Note that you don't need to implement the RPC, language bindings, manual "
36547 "pages or anything else. It's all automatically generated from the OCaml "
36552 #: ../src/guestfs.pod:2646
36553 msgid "ADDING TESTS FOR AN API ACTION"
36557 #: ../src/guestfs.pod:2648
36559 "You can supply zero or as many tests as you want per API call. The tests "
36560 "can either be added as part of the API description (C<generator/"
36561 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
36562 "into C<regressions/>. Note that adding a script to C<regressions/> is "
36563 "slower, so if possible use the first method."
36567 #: ../src/guestfs.pod:2654
36569 "The following describes the test environment used when you add an API test "
36570 "in C<generator_actions.ml>."
36574 #: ../src/guestfs.pod:2657
36575 msgid "The test environment has 4 block devices:"
36579 #: ../src/guestfs.pod:2661
36580 msgid "C</dev/sda> 500MB"
36584 #: ../src/guestfs.pod:2663
36585 msgid "General block device for testing."
36589 #: ../src/guestfs.pod:2665
36590 msgid "C</dev/sdb> 50MB"
36594 #: ../src/guestfs.pod:2667
36596 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
36601 #: ../src/guestfs.pod:2670
36602 msgid "C</dev/sdc> 10MB"
36606 #: ../src/guestfs.pod:2672
36607 msgid "Used in a few tests where two block devices are needed."
36611 #: ../src/guestfs.pod:2674
36612 msgid "C</dev/sdd>"
36616 #: ../src/guestfs.pod:2676
36617 msgid "ISO with fixed content (see C<images/test.iso>)."
36621 #: ../src/guestfs.pod:2680
36623 "To be able to run the tests in a reasonable amount of time, the libguestfs "
36624 "appliance and block devices are reused between tests. So don't try testing "
36625 "L</guestfs_kill_subprocess> :-x"
36629 #: ../src/guestfs.pod:2684
36631 "Each test starts with an initial scenario, selected using one of the "
36632 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
36633 "initialize the disks mentioned above in a particular way as documented in "
36634 "C<generator_types.ml>. You should not assume anything about the previous "
36635 "contents of other disks that are not initialized."
36639 #: ../src/guestfs.pod:2690
36641 "You can add a prerequisite clause to any individual test. This is a run-"
36642 "time check, which, if it fails, causes the test to be skipped. Useful if "
36643 "testing a command which might not work on all variations of libguestfs "
36644 "builds. A test that has prerequisite of C<Always> means to run "
36649 #: ../src/guestfs.pod:2696
36651 "In addition, packagers can skip individual tests by setting environment "
36652 "variables before running C<make check>."
36656 #: ../src/guestfs.pod:2699
36659 " SKIP_TEST_<CMD>_<NUM>=1\n"
36664 #: ../src/guestfs.pod:2701
36665 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
36669 #: ../src/guestfs.pod:2703
36674 #: ../src/guestfs.pod:2705
36677 " SKIP_TEST_<CMD>=1\n"
36682 #: ../src/guestfs.pod:2707
36683 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
36687 #: ../src/guestfs.pod:2709
36688 msgid "Packagers can run only certain tests by setting for example:"
36692 #: ../src/guestfs.pod:2711
36695 " TEST_ONLY=\"vfs_type zerofree\"\n"
36700 #: ../src/guestfs.pod:2713
36702 "See C<capitests/tests.c> for more details of how these environment variables "
36707 #: ../src/guestfs.pod:2716
36708 msgid "DEBUGGING NEW API ACTIONS"
36712 #: ../src/guestfs.pod:2718
36713 msgid "Test new actions work before submitting them."
36717 #: ../src/guestfs.pod:2720
36718 msgid "You can use guestfish to try out new commands."
36722 #: ../src/guestfs.pod:2722
36724 "Debugging the daemon is a problem because it runs inside a minimal "
36725 "environment. However you can fprintf messages in the daemon to stderr, and "
36726 "they will show up if you use C<guestfish -v>."
36730 #: ../src/guestfs.pod:2726
36731 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
36735 #: ../src/guestfs.pod:2728
36737 "Our C source code generally adheres to some basic code-formatting "
36738 "conventions. The existing code base is not totally consistent on this "
36739 "front, but we do prefer that contributed code be formatted similarly. In "
36740 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
36741 "indentation level, and other than that, follow the K&R style."
36745 #: ../src/guestfs.pod:2734
36747 "If you use Emacs, add the following to one of one of your start-up files (e."
36748 "g., ~/.emacs), to help ensure that you get indentation right:"
36752 #: ../src/guestfs.pod:2737
36755 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
36756 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
36757 " (add-hook 'find-file-hook\n"
36758 " '(lambda () (if (and buffer-file-name\n"
36759 " (string-match \"/libguestfs\\\\>\"\n"
36760 " (buffer-file-name))\n"
36761 " (not (string-equal mode-name \"Change Log\"))\n"
36762 " (not (string-equal mode-name \"Makefile\")))\n"
36763 " (setq indent-tabs-mode nil))))\n"
36768 #: ../src/guestfs.pod:2747
36771 " ;;; When editing C sources in libguestfs, use this style.\n"
36772 " (defun libguestfs-c-mode ()\n"
36773 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
36775 " (c-set-style \"K&R\")\n"
36776 " (setq c-indent-level 2)\n"
36777 " (setq c-basic-offset 2))\n"
36778 " (add-hook 'c-mode-hook\n"
36779 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
36780 " (buffer-file-name))\n"
36781 " (libguestfs-c-mode))))\n"
36786 #: ../src/guestfs.pod:2759
36787 msgid "Enable warnings when compiling (and fix any problems this finds):"
36791 #: ../src/guestfs.pod:2762
36794 " ./configure --enable-gcc-warnings\n"
36799 #: ../src/guestfs.pod:2764
36800 msgid "Useful targets are:"
36804 #: ../src/guestfs.pod:2766
36807 " make syntax-check # checks the syntax of the C code\n"
36808 " make check # runs the test suite\n"
36813 #: ../src/guestfs.pod:2769
36814 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
36818 #: ../src/guestfs.pod:2771
36820 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
36821 "which are used to do shell quoting."
36825 #: ../src/guestfs.pod:2776
36830 #: ../src/guestfs.pod:2778
36832 "Simple shell quoted string. Any spaces or other shell characters are "
36837 #: ../src/guestfs.pod:2781
36842 #: ../src/guestfs.pod:2783
36844 "Same as C<%Q> except the string is treated as a path which is prefixed by "
36849 #: ../src/guestfs.pod:2790
36852 " asprintf (&cmd, \"cat %R\", path);\n"
36857 #: ../src/guestfs.pod:2792
36858 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
36862 #: ../src/guestfs.pod:2794
36864 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
36865 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
36866 "they are not passed via the shell (instead, straight to exec). You probably "
36867 "want to use the C<sysroot_path()> function however."
36871 #: ../src/guestfs.pod:2800
36872 msgid "SUBMITTING YOUR NEW API ACTIONS"
36876 #: ../src/guestfs.pod:2802
36878 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
36879 "libguestfs> and CC to L<rjones@redhat.com>."
36883 #: ../src/guestfs.pod:2806
36884 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
36888 #: ../src/guestfs.pod:2808
36889 msgid "We support i18n (gettext anyhow) in the library."
36893 #: ../src/guestfs.pod:2810
36895 "However many messages come from the daemon, and we don't translate those at "
36896 "the moment. One reason is that the appliance generally has all locale files "
36897 "removed from it, because they take up a lot of space. So we'd have to readd "
36898 "some of those, as well as copying our PO files into the appliance."
36902 #: ../src/guestfs.pod:2816
36904 "Debugging messages are never translated, since they are intended for the "
36909 #: ../src/guestfs.pod:2819
36910 msgid "SOURCE CODE SUBDIRECTORIES"
36914 #: ../src/guestfs.pod:2825
36915 msgid "The libguestfs appliance, build scripts and so on."
36919 #: ../src/guestfs.pod:2827
36920 msgid "C<capitests>"
36924 #: ../src/guestfs.pod:2829
36925 msgid "Automated tests of the C API."
36929 #: ../src/guestfs.pod:2831
36934 #: ../src/guestfs.pod:2833
36936 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
36941 #: ../src/guestfs.pod:2836
36946 #: ../src/guestfs.pod:2838
36948 "Safety and liveness tests of components that libguestfs depends upon (not of "
36949 "libguestfs itself). Mainly this is for qemu and the kernel."
36953 #: ../src/guestfs.pod:2841
36958 #: ../src/guestfs.pod:2843
36959 msgid "Outside contributions, experimental parts."
36963 #: ../src/guestfs.pod:2845
36968 #: ../src/guestfs.pod:2847
36970 "The daemon that runs inside the libguestfs appliance and carries out actions."
36974 #: ../src/guestfs.pod:2850
36979 #: ../src/guestfs.pod:2852
36980 msgid "L<virt-df(1)> command and documentation."
36984 #: ../src/guestfs.pod:2854
36989 #: ../src/guestfs.pod:2856
36990 msgid "L<virt-edit(1)> command and documentation."
36994 #: ../src/guestfs.pod:2858
36995 msgid "C<examples>"
36999 #: ../src/guestfs.pod:2860
37000 msgid "C API example code."
37004 #: ../src/guestfs.pod:2862
37009 #: ../src/guestfs.pod:2864
37011 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
37012 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
37013 "L<virt-tar-out(1)>."
37017 #: ../src/guestfs.pod:2868
37022 #: ../src/guestfs.pod:2870
37024 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
37028 #: ../src/guestfs.pod:2872
37029 msgid "C<generator>"
37033 #: ../src/guestfs.pod:2874
37035 "The crucially important generator, used to automatically generate large "
37036 "amounts of boilerplate C code for things like RPC and bindings."
37040 #: ../src/guestfs.pod:2877
37045 #: ../src/guestfs.pod:2879
37046 msgid "Files used by the test suite."
37050 #: ../src/guestfs.pod:2881
37051 msgid "Some \"phony\" guest images which we test against."
37055 #: ../src/guestfs.pod:2883
37056 msgid "C<inspector>"
37060 #: ../src/guestfs.pod:2885
37061 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
37065 #: ../src/guestfs.pod:2887
37070 #: ../src/guestfs.pod:2889
37071 msgid "Logo used on the website. The fish is called Arthur by the way."
37075 #: ../src/guestfs.pod:2891
37080 #: ../src/guestfs.pod:2893
37081 msgid "M4 macros used by autoconf."
37085 #: ../src/guestfs.pod:2895
37090 #: ../src/guestfs.pod:2897
37091 msgid "Translations of simple gettext strings."
37095 #: ../src/guestfs.pod:2899
37100 #: ../src/guestfs.pod:2901
37102 "The build infrastructure and PO files for translations of manpages and POD "
37103 "files. Eventually this will be combined with the C<po> directory, but that "
37104 "is rather complicated."
37108 #: ../src/guestfs.pod:2905
37109 msgid "C<regressions>"
37113 #: ../src/guestfs.pod:2907
37114 msgid "Regression tests."
37118 #: ../src/guestfs.pod:2909
37123 #: ../src/guestfs.pod:2911
37124 msgid "L<virt-rescue(1)> command and documentation."
37128 #: ../src/guestfs.pod:2913
37133 #: ../src/guestfs.pod:2915
37134 msgid "Source code to the C library."
37138 #: ../src/guestfs.pod:2917
37143 #: ../src/guestfs.pod:2919
37144 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
37148 #: ../src/guestfs.pod:2921
37149 msgid "C<test-tool>"
37153 #: ../src/guestfs.pod:2923
37155 "Test tool for end users to test if their qemu/kernel combination will work "
37160 #: ../src/guestfs.pod:2926
37165 #: ../src/guestfs.pod:2928
37170 #: ../src/guestfs.pod:2930
37175 #: ../src/guestfs.pod:2932
37180 #: ../src/guestfs.pod:2934
37185 #: ../src/guestfs.pod:2936
37190 #: ../src/guestfs.pod:2938
37195 #: ../src/guestfs.pod:2940
37200 #: ../src/guestfs.pod:2942
37205 #: ../src/guestfs.pod:2944
37206 msgid "Language bindings."
37210 #: ../src/guestfs.pod:2948
37211 msgid "MAKING A STABLE RELEASE"
37215 #: ../src/guestfs.pod:2950
37217 "When we make a stable release, there are several steps documented here. See "
37218 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
37223 #: ../src/guestfs.pod:2958
37225 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
37229 #: ../src/guestfs.pod:2963
37230 msgid "Finalize RELEASE-NOTES."
37234 #: ../src/guestfs.pod:2967
37235 msgid "Update ROADMAP."
37239 #: ../src/guestfs.pod:2971
37240 msgid "Run C<src/api-support/update-from-tarballs.sh>."
37244 #: ../src/guestfs.pod:2975
37245 msgid "Push and pull from Transifex."
37249 #: ../src/guestfs.pod:2977
37254 #: ../src/guestfs.pod:2979
37262 #: ../src/guestfs.pod:2981
37263 msgid "to push the latest POT files to Transifex. Then run:"
37267 #: ../src/guestfs.pod:2983
37275 #: ../src/guestfs.pod:2985
37276 msgid "which is a wrapper to pull the latest translated C<*.po> files."
37280 #: ../src/guestfs.pod:2989
37282 "Create new stable and development directories under L<http://libguestfs.org/"
37287 #: ../src/guestfs.pod:2994
37288 msgid "Create the branch in git:"
37292 #: ../src/guestfs.pod:2996
37295 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
37296 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
37297 " git branch stable-1.XX\n"
37298 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
37303 #: ../src/guestfs.pod:3003
37308 #: ../src/guestfs.pod:3005
37309 msgid "PROTOCOL LIMITS"
37313 #: ../src/guestfs.pod:3007
37315 "Internally libguestfs uses a message-based protocol to pass API calls and "
37316 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
37317 "plenty more detail about this). The maximum message size used by the "
37318 "protocol is slightly less than 4 MB. For some API calls you may need to be "
37319 "aware of this limit. The API calls which may be affected are individually "
37320 "documented, with a link back to this section of the documentation."
37324 #: ../src/guestfs.pod:3015
37326 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
37327 "a simple string. Because this string is at some point internally encoded as "
37328 "a message, the maximum size that it can return is slightly under 4 MB. If "
37329 "the requested file is larger than this then you will get an error."
37333 #: ../src/guestfs.pod:3021
37335 "In order to transfer large files into and out of the guest filesystem, you "
37336 "need to use particular calls that support this. The sections L</UPLOADING> "
37337 "and L</DOWNLOADING> document how to do this."
37341 #: ../src/guestfs.pod:3025
37343 "You might also consider mounting the disk image using our FUSE filesystem "
37344 "support (L<guestmount(1)>)."
37348 #: ../src/guestfs.pod:3028
37349 msgid "MAXIMUM NUMBER OF DISKS"
37353 #: ../src/guestfs.pod:3030
37354 msgid "When using virtio disks (the default) the current limit is B<25> disks."
37358 #: ../src/guestfs.pod:3033
37360 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
37361 "slots. However febootstrap only understands disks with names C</dev/vda> "
37362 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
37367 #: ../src/guestfs.pod:3038
37369 "We are working to substantially raise this limit in future versions but it "
37370 "requires complex changes to qemu."
37374 #: ../src/guestfs.pod:3041
37376 "In future versions of libguestfs it should also be possible to \"hot plug\" "
37377 "disks (add and remove disks after calling L</guestfs_launch>). This also "
37378 "requires changes to qemu."
37382 #: ../src/guestfs.pod:3045
37383 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
37387 #: ../src/guestfs.pod:3047
37388 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
37392 #: ../src/guestfs.pod:3049
37394 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
37395 "vda>, and C</dev/vda1> through C</dev/vda15>)."
37399 #: ../src/guestfs.pod:3052
37401 "If you attach a disk with more than 15 partitions, the extra partitions are "
37402 "ignored by libguestfs."
37406 #: ../src/guestfs.pod:3055
37407 msgid "MAXIMUM SIZE OF A DISK"
37411 #: ../src/guestfs.pod:3057
37412 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
37416 #: ../src/guestfs.pod:3059
37418 "We have tested block devices up to 1 exabyte (2**60 or "
37419 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
37424 #: ../src/guestfs.pod:3063
37426 "Although libguestfs probably does not impose any limit, the underlying host "
37427 "storage will. If you store disk images on a host ext4 filesystem, then the "
37428 "maximum size will be limited by the maximum ext4 file size (currently 16 "
37429 "TB). If you store disk images as host logical volumes then you are limited "
37430 "by the maximum size of an LV."
37434 #: ../src/guestfs.pod:3069
37436 "For the hugest disk image files, we recommend using XFS on the host for "
37441 #: ../src/guestfs.pod:3072
37442 msgid "MAXIMUM SIZE OF A PARTITION"
37446 #: ../src/guestfs.pod:3074
37448 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
37449 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
37450 "address a partition located beyond 2 TB on the disk."
37454 #: ../src/guestfs.pod:3078
37456 "It is recommended that you use GPT partitions on disks which are larger than "
37457 "this size. GPT uses 64 bit sector numbers and so can address partitions "
37458 "which are theoretically larger than the largest disk we could support."
37462 #: ../src/guestfs.pod:3083
37463 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
37467 #: ../src/guestfs.pod:3085
37469 "This depends on the filesystem type. libguestfs itself does not impose any "
37470 "known limit. Consult Wikipedia or the filesystem documentation to find out "
37471 "what these limits are."
37475 #: ../src/guestfs.pod:3089
37476 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
37480 #: ../src/guestfs.pod:3091
37482 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
37483 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
37484 "uploads and downloads."
37488 #: ../src/guestfs.pod:3095
37489 msgid "INSPECTION LIMITS"
37493 #: ../src/guestfs.pod:3097
37495 "The inspection code has several arbitrary limits on things like the size of "
37496 "Windows Registry hive it will read, and the length of product name. These "
37497 "are intended to stop a malicious guest from consuming arbitrary amounts of "
37498 "memory and disk space on the host, and should not be reached in practice. "
37499 "See the source code for more information."
37503 #: ../src/guestfs.pod:3123
37505 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
37506 "effect as calling C<guestfs_set_verbose (g, 1)>."
37510 #: ../src/guestfs.pod:3135
37512 "Set the path that libguestfs uses to search for a supermin appliance. See "
37513 "the discussion of paths in section L</PATH> above."
37517 #: ../src/guestfs.pod:3144
37518 msgid "See also L</QEMU WRAPPERS> above."
37522 #: ../src/guestfs.pod:3148
37524 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
37525 "effect as calling C<guestfs_set_trace (g, 1)>."
37529 #: ../src/guestfs.pod:3166
37531 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
37532 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
37533 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
37534 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
37535 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)"
37536 ">, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-tar(1)>, "
37537 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
37538 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<http://"
37539 "libguestfs.org/>."
37543 #: ../src/guestfs.pod:3197
37545 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
37546 "(8)>, L<disktype(1)>."
37550 #: ../src/guestfs.pod:3204 ../tools/virt-make-fs.pl:553
37551 #: ../tools/virt-win-reg.pl:761
37556 #: ../src/guestfs.pod:3206
37557 msgid "To get a list of bugs against libguestfs use this link:"
37561 #: ../src/guestfs.pod:3208
37563 "L<https://bugzilla.redhat.com/buglist.cgi?"
37564 "component=libguestfs&product=Virtualization+Tools>"
37568 #: ../src/guestfs.pod:3210
37569 msgid "To report a new bug against libguestfs use this link:"
37573 #: ../src/guestfs.pod:3212
37575 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
37576 "component=libguestfs&product=Virtualization+Tools>"
37580 #: ../src/guestfs.pod:3214
37581 msgid "When reporting a bug, please check:"
37585 #: ../src/guestfs.pod:3220
37586 msgid "That the bug hasn't been reported already."
37590 #: ../src/guestfs.pod:3224
37591 msgid "That you are testing a recent version."
37595 #: ../src/guestfs.pod:3228
37596 msgid "Describe the bug accurately, and give a way to reproduce it."
37600 #: ../src/guestfs.pod:3232
37602 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
37607 #: ../test-tool/libguestfs-test-tool.pod:5
37608 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
37612 #: ../test-tool/libguestfs-test-tool.pod:9
37615 " libguestfs-test-tool [--options]\n"
37620 #: ../test-tool/libguestfs-test-tool.pod:13
37622 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
37623 "to check basic libguestfs functionality is working. This is needed because "
37624 "libguestfs occasionally breaks for reasons beyond our control: usually "
37625 "because of changes in the underlying qemu or kernel packages, or the host "
37630 #: ../test-tool/libguestfs-test-tool.pod:19
37631 msgid "If you suspect a problem in libguestfs, then just run:"
37635 #: ../test-tool/libguestfs-test-tool.pod:21
37638 " libguestfs-test-tool\n"
37643 #: ../test-tool/libguestfs-test-tool.pod:23
37644 msgid "It will print lots of diagnostic messages."
37648 #: ../test-tool/libguestfs-test-tool.pod:25
37649 msgid "If it runs to completion successfully, you will see this near the end:"
37653 #: ../test-tool/libguestfs-test-tool.pod:27
37656 " ===== TEST FINISHED OK =====\n"
37661 #: ../test-tool/libguestfs-test-tool.pod:29
37662 msgid "and the test tool will exit with code 0."
37666 #: ../test-tool/libguestfs-test-tool.pod:31
37668 "If it fails (and/or exits with non-zero error code), please paste the "
37669 "I<complete, unedited> output of the test tool into a bug report. More "
37670 "information about reporting bugs can be found on the L<http://libguestfs.org/"
37675 #: ../test-tool/libguestfs-test-tool.pod:42
37676 msgid "Display short usage information and exit."
37680 #: ../test-tool/libguestfs-test-tool.pod:44
37681 msgid "B<--qemu qemu_binary>"
37685 #: ../test-tool/libguestfs-test-tool.pod:46
37687 "If you have downloaded another qemu binary, point this option at the full "
37688 "path of the binary to try it."
37692 #: ../test-tool/libguestfs-test-tool.pod:49
37693 msgid "B<--qemudir qemu_source_dir>"
37697 #: ../test-tool/libguestfs-test-tool.pod:51
37699 "If you have compiled qemu from source, point this option at the source "
37700 "directory to try it."
37704 #: ../test-tool/libguestfs-test-tool.pod:54
37709 #: ../test-tool/libguestfs-test-tool.pod:56
37710 msgid "B<--timeout N>"
37714 #: ../test-tool/libguestfs-test-tool.pod:58
37716 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
37717 "minutes) which does not usually need to be adjusted."
37721 #: ../test-tool/libguestfs-test-tool.pod:63
37722 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
37726 #: ../test-tool/libguestfs-test-tool.pod:65
37728 "If you have compiled another version of qemu from source and would like to "
37729 "try that, then you can use the I<--qemudir> option to point to the qemu "
37730 "source directory."
37734 #: ../test-tool/libguestfs-test-tool.pod:69
37736 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
37737 "option to point to the binary."
37741 #: ../test-tool/libguestfs-test-tool.pod:72
37743 "Note when using these options, you can ignore the business of qemu wrapper "
37744 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
37745 "wrapper script for you if one is needed."
37749 #: ../test-tool/libguestfs-test-tool.pod:76
37750 msgid "TRYING OUT A DIFFERENT KERNEL"
37754 #: ../test-tool/libguestfs-test-tool.pod:78
37756 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
37757 "libguestfs tries. You do this by setting the environment variables "
37758 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
37762 #: ../test-tool/libguestfs-test-tool.pod:82
37764 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
37769 #: ../test-tool/libguestfs-test-tool.pod:85
37770 msgid "SELF-DIAGNOSIS"
37774 #: ../test-tool/libguestfs-test-tool.pod:87
37776 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
37777 "produced by libguestfs-test-tool and/or possible errors."
37781 #: ../test-tool/libguestfs-test-tool.pod:92
37783 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
37784 "I<1> if there was an error."
37788 #: ../test-tool/libguestfs-test-tool.pod:97
37790 "For the full list of environment variables which may affect libguestfs, "
37791 "please see the L<guestfs(3)> manual page."
37795 #: ../test-tool/libguestfs-test-tool.pod:102
37796 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
37800 #: ../tools/virt-list-filesystems.pl:32
37802 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
37806 #: ../tools/virt-list-filesystems.pl:36
37809 " virt-list-filesystems [--options] domname\n"
37814 #: ../tools/virt-list-filesystems.pl:38
37817 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
37822 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
37824 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
37829 #: ../tools/virt-list-filesystems.pl:45
37831 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
37832 "are contained in a virtual machine or disk image."
37836 #: ../tools/virt-list-filesystems.pl:49
37838 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
37839 "functionality. For more complex cases you should look at the L<guestfish(1)"
37844 #: ../tools/virt-list-filesystems.pl:112
37846 "With this option, C<virt-list-filesystems> displays the type of each "
37847 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
37851 #: ../tools/virt-list-filesystems.pl:119
37856 #: ../tools/virt-list-filesystems.pl:123
37858 "Normally we only show mountable filesystems. If this option is given then "
37859 "swap devices are shown too."
37863 #: ../tools/virt-list-filesystems.pl:197
37865 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
37866 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
37867 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
37871 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
37872 msgid "Copyright (C) 2009 Red Hat Inc."
37876 #: ../tools/virt-list-partitions.pl:32
37878 "virt-list-partitions - List partitions in a virtual machine or disk image"
37882 #: ../tools/virt-list-partitions.pl:36
37885 " virt-list-partitions [--options] domname\n"
37890 #: ../tools/virt-list-partitions.pl:38
37893 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
37898 #: ../tools/virt-list-partitions.pl:45
37900 "C<virt-list-partitions> is a command line tool to list the partitions that "
37901 "are contained in a virtual machine or disk image. It is mainly useful as a "
37902 "first step to using L<virt-resize(1)>."
37906 #: ../tools/virt-list-partitions.pl:50
37908 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
37909 "functionality. For more complex cases you should look at the L<guestfish(1)"
37914 #: ../tools/virt-list-partitions.pl:113
37915 msgid "Show sizes in human-readable form (eg. \"1G\")."
37919 #: ../tools/virt-list-partitions.pl:123
37921 "With this option, C<virt-list-partitions> displays the type and size of each "
37922 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
37926 #: ../tools/virt-list-partitions.pl:130
37931 #: ../tools/virt-list-partitions.pl:132
37936 #: ../tools/virt-list-partitions.pl:134
37938 "Display the total size of each block device (as a separate row or rows)."
37942 #: ../tools/virt-list-partitions.pl:267
37944 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
37945 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
37946 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
37950 #: ../tools/virt-list-partitions.pl:283
37951 msgid "Copyright (C) 2009-2010 Red Hat Inc."
37955 #: ../tools/virt-make-fs.pl:37
37956 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
37960 #: ../tools/virt-make-fs.pl:41
37963 " virt-make-fs [--options] input.tar output.img\n"
37968 #: ../tools/virt-make-fs.pl:43
37971 " virt-make-fs [--options] input.tar.gz output.img\n"
37976 #: ../tools/virt-make-fs.pl:45
37979 " virt-make-fs [--options] directory output.img\n"
37984 #: ../tools/virt-make-fs.pl:49
37986 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
37987 "archive or some files in a directory. It is similar to tools like L<mkisofs"
37988 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
37989 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
37990 "you want to attach these filesystems to existing virtual machines (eg. to "
37991 "import large amounts of read-only data to a VM)."
37995 #: ../tools/virt-make-fs.pl:57
37996 msgid "Basic usage is:"
38000 #: ../tools/virt-make-fs.pl:59
38003 " virt-make-fs input output\n"
38008 #: ../tools/virt-make-fs.pl:61
38010 "where C<input> is either a directory containing files that you want to add, "
38011 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
38012 "C<output> is a disk image. The input type is detected automatically. The "
38013 "output disk image defaults to a raw ext2 image unless you specify extra "
38014 "flags (see L</OPTIONS> below)."
38018 #: ../tools/virt-make-fs.pl:67
38019 msgid "EXTRA SPACE"
38023 #: ../tools/virt-make-fs.pl:69
38025 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
38026 "the files that it contains, but might have extra space. Depending on how "
38027 "you are going to use the output, you might think this extra space is wasted "
38028 "and want to minimize it, or you might want to leave space so that more files "
38029 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
38030 "but you can use the I<--size> flag to leave space in the filesystem if you "
38035 #: ../tools/virt-make-fs.pl:77
38037 "An alternative way to leave extra space but not make the output image any "
38038 "bigger is to use an alternative disk image format (instead of the default "
38039 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
38040 "image format (check your hypervisor supports this before using it). This "
38041 "allows you to choose a large I<--size> but the extra space won't actually be "
38042 "allocated in the image until you try to store something in it."
38046 #: ../tools/virt-make-fs.pl:85
38048 "Don't forget that you can also use local commands including L<resize2fs(8)> "
38049 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
38050 "to build another image from scratch."
38054 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
38055 #: ../tools/virt-make-fs.pl:142
38060 #: ../tools/virt-make-fs.pl:91
38063 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
38068 #: ../tools/virt-make-fs.pl:93
38069 msgid "FILESYSTEM TYPE"
38073 #: ../tools/virt-make-fs.pl:95
38075 "The default filesystem type is C<ext2>. Just about any filesystem type that "
38076 "libguestfs supports can be used (but I<not> read-only formats like "
38077 "ISO9660). Here are some of the more common choices:"
38081 #: ../tools/virt-make-fs.pl:101
38086 #: ../tools/virt-make-fs.pl:103
38088 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
38089 "you are not going to use the filesystem in a way that requires the journal, "
38090 "then this is just wasted overhead."
38094 #: ../tools/virt-make-fs.pl:107
38095 msgid "I<ntfs> or I<vfat>"
38099 #: ../tools/virt-make-fs.pl:109
38100 msgid "Useful if exporting data to a Windows guest."
38104 #: ../tools/virt-make-fs.pl:111
38106 "I<Note for vfat>: The tar archive or local directory must only contain files "
38107 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
38108 "program running within libguestfs is unable to change the ownership of non-"
38109 "root files, since vfat itself does not support this."
38113 #: ../tools/virt-make-fs.pl:116
38118 #: ../tools/virt-make-fs.pl:118
38120 "Lower overhead than C<ext2>, but certain limitations on filename length and "
38121 "total filesystem size."
38125 #: ../tools/virt-make-fs.pl:125
38128 " virt-make-fs --type=minix input minixfs.img\n"
38133 #: ../tools/virt-make-fs.pl:127
38134 msgid "TO PARTITION OR NOT TO PARTITION"
38138 #: ../tools/virt-make-fs.pl:129
38139 msgid "Optionally virt-make-fs can add a partition table to the output disk."
38143 #: ../tools/virt-make-fs.pl:131
38145 "Adding a partition can make the disk image more compatible with certain "
38146 "virtualized operating systems which don't expect to see a filesystem "
38147 "directly located on a block device (Linux doesn't care and will happily "
38148 "handle both types)."
38152 #: ../tools/virt-make-fs.pl:136
38154 "On the other hand, if you have a partition table then the output image is no "
38155 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
38156 "directly on a partitioned disk image. (However libguestfs tools such as "
38157 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
38161 #: ../tools/virt-make-fs.pl:144
38162 msgid "Add an MBR partition:"
38166 #: ../tools/virt-make-fs.pl:146
38169 " virt-make-fs --partition -- input disk.img\n"
38174 #: ../tools/virt-make-fs.pl:148
38176 "If the output disk image could be terabyte-sized or larger, it's better to "
38177 "use an EFI/GPT-compatible partition table:"
38181 #: ../tools/virt-make-fs.pl:151
38184 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
38189 #: ../tools/virt-make-fs.pl:179
38190 msgid "Enable debugging information."
38194 #: ../tools/virt-make-fs.pl:185
38195 msgid "B<--size=E<lt>NE<gt>>"
38199 #: ../tools/virt-make-fs.pl:187
38200 msgid "B<--size=+E<lt>NE<gt>>"
38204 #: ../tools/virt-make-fs.pl:189
38205 msgid "B<-s E<lt>NE<gt>>"
38209 #: ../tools/virt-make-fs.pl:191
38210 msgid "B<-s +E<lt>NE<gt>>"
38214 #: ../tools/virt-make-fs.pl:193
38216 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
38220 #: ../tools/virt-make-fs.pl:196
38222 "If this option is I<not> given, then the output image will be just large "
38223 "enough to contain all the files, with not much wasted space."
38227 #: ../tools/virt-make-fs.pl:199
38229 "To choose a fixed size output disk, specify an absolute number followed by b/"
38230 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
38231 "Petabytes or Exabytes. This must be large enough to contain all the input "
38232 "files, else you will get an error."
38236 #: ../tools/virt-make-fs.pl:204
38238 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
38239 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
38240 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
38241 "the input files, and (approximately) an extra 200 MB free space."
38245 #: ../tools/virt-make-fs.pl:210
38247 "Note that virt-make-fs estimates free space, and therefore will not produce "
38248 "filesystems containing precisely the free space requested. (It is much more "
38249 "expensive and time-consuming to produce a filesystem which has precisely the "
38250 "desired free space)."
38254 #: ../tools/virt-make-fs.pl:219
38255 msgid "B<--format=E<lt>fmtE<gt>>"
38259 #: ../tools/virt-make-fs.pl:221
38260 msgid "B<-F E<lt>fmtE<gt>>"
38264 #: ../tools/virt-make-fs.pl:223
38265 msgid "Choose the output disk image format."
38269 #: ../tools/virt-make-fs.pl:225
38270 msgid "The default is C<raw> (raw disk image)."
38274 #: ../tools/virt-make-fs.pl:227
38276 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
38277 "that would really make sense here is C<qcow2>."
38281 #: ../tools/virt-make-fs.pl:234
38282 msgid "B<--type=E<lt>fsE<gt>>"
38286 #: ../tools/virt-make-fs.pl:236
38287 msgid "B<-t E<lt>fsE<gt>>"
38291 #: ../tools/virt-make-fs.pl:238
38292 msgid "Choose the output filesystem type."
38296 #: ../tools/virt-make-fs.pl:240
38297 msgid "The default is C<ext2>."
38301 #: ../tools/virt-make-fs.pl:242
38303 "Any filesystem which is supported read-write by libguestfs can be used here."
38307 #: ../tools/virt-make-fs.pl:249
38308 msgid "B<--partition>"
38312 #: ../tools/virt-make-fs.pl:251
38313 msgid "B<--partition=E<lt>parttypeE<gt>>"
38317 #: ../tools/virt-make-fs.pl:253
38319 "If specified, this flag adds an MBR partition table to the output disk image."
38323 #: ../tools/virt-make-fs.pl:256
38325 "You can change the partition table type, eg. I<--partition=gpt> for large "
38330 #: ../tools/virt-make-fs.pl:259
38332 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
38333 "might consider the next parameter to be the partition type. For example:"
38337 #: ../tools/virt-make-fs.pl:263
38340 " virt-make-fs --partition input.tar ...\n"
38345 #: ../tools/virt-make-fs.pl:265
38347 "would cause virt-make-fs to think you wanted to use a partition type of "
38348 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
38349 "dash) between options and the input file argument:"
38353 #: ../tools/virt-make-fs.pl:269
38356 " virt-make-fs --partition -- input.tar ...\n"
38361 #: ../tools/virt-make-fs.pl:541
38363 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
38364 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
38365 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
38369 #: ../tools/virt-make-fs.pl:555 ../tools/virt-win-reg.pl:763
38371 "When reporting bugs, please enable debugging and capture the I<complete> "
38376 #: ../tools/virt-make-fs.pl:558
38379 " export LIBGUESTFS_DEBUG=1\n"
38380 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
38385 #: ../tools/virt-make-fs.pl:561
38387 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
38392 #: ../tools/virt-tar.pl:33
38393 msgid "virt-tar - Extract or upload files to a virtual machine"
38397 #: ../tools/virt-tar.pl:37
38400 " virt-tar [--options] -x domname directory tarball\n"
38405 #: ../tools/virt-tar.pl:39
38408 " virt-tar [--options] -u domname tarball directory\n"
38413 #: ../tools/virt-tar.pl:41
38416 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
38421 #: ../tools/virt-tar.pl:43
38424 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
38429 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
38434 #: ../tools/virt-tar.pl:47
38436 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
38437 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
38441 #: ../tools/virt-tar.pl:52
38442 msgid "Download C</home> from the VM into a local tarball:"
38446 #: ../tools/virt-tar.pl:54
38449 " virt-tar -x domname /home home.tar\n"
38454 #: ../tools/virt-tar.pl:56
38457 " virt-tar -zx domname /home home.tar.gz\n"
38462 #: ../tools/virt-tar.pl:58
38463 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
38467 #: ../tools/virt-tar.pl:60
38470 " virt-tar -u domname uploadstuff.tar /tmp\n"
38475 #: ../tools/virt-tar.pl:62
38478 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
38483 #: ../tools/virt-tar.pl:66
38485 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
38486 "virtual machines. If you do this, you risk disk corruption in the VM. "
38487 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
38491 #: ../tools/virt-tar.pl:71
38493 "You can use I<-x> (extract) on live virtual machines, but you might get "
38494 "inconsistent results or errors if there is filesystem activity inside the "
38495 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
38496 "work, but the only way to guarantee consistent results is if the virtual "
38497 "machine is shut down."
38501 #: ../tools/virt-tar.pl:79
38503 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
38504 "parts of a guest filesystem. There are many possibilities: making backups, "
38505 "uploading data files, snooping on guest activity, fixing or customizing "
38510 #: ../tools/virt-tar.pl:84
38512 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
38513 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
38514 "should look at the L<guestfish(1)> tool."
38518 #: ../tools/virt-tar.pl:88
38520 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
38521 "its contents (recursively) from the virtual machine into a local tarball. "
38522 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
38523 "virtual machine. You cannot use these two options together."
38527 #: ../tools/virt-tar.pl:94
38529 "In addition, you may need to use the I<-z> (gZip) option to enable "
38530 "compression. When uploading, you have to specify I<-z> if the upload file "
38531 "is compressed because virt-tar won't detect this on its own."
38535 #: ../tools/virt-tar.pl:98
38537 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
38538 "example it cannot do PKZip files or bzip2 compression. If you want that "
38539 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
38540 "the L<libguestfs(3)> API)."
38544 #: ../tools/virt-tar.pl:160
38545 msgid "B<--extract>"
38549 #: ../tools/virt-tar.pl:162
38550 msgid "B<--download>"
38554 #: ../tools/virt-tar.pl:164
38559 #: ../tools/virt-tar.pl:166
38560 msgid "B<--upload>"
38564 #: ../tools/virt-tar.pl:168
38566 "Use I<-x> to extract (download) a directory from a virtual machine to a "
38571 #: ../tools/virt-tar.pl:171
38573 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
38574 "Please read the L</WARNING> section above before using this option."
38578 #: ../tools/virt-tar.pl:175
38579 msgid "You must specify exactly one of these options."
38583 #: ../tools/virt-tar.pl:181
38588 #: ../tools/virt-tar.pl:183
38593 #: ../tools/virt-tar.pl:185
38594 msgid "Specify that the input or output tarball is gzip-compressed."
38598 #: ../tools/virt-tar.pl:298
38600 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
38601 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
38602 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
38607 #: ../tools/virt-win-reg.pl:37
38609 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
38613 #: ../tools/virt-win-reg.pl:41
38616 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
38621 #: ../tools/virt-win-reg.pl:43
38624 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
38629 #: ../tools/virt-win-reg.pl:45
38632 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
38637 #: ../tools/virt-win-reg.pl:47
38640 " virt-win-reg --merge domname [input.reg ...]\n"
38645 #: ../tools/virt-win-reg.pl:49
38648 " virt-win-reg [--options] disk.img ... # instead of domname\n"
38653 #: ../tools/virt-win-reg.pl:53
38655 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
38656 "virtual machines. If you do this, you I<will> get irreversible disk "
38657 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
38658 "but doesn't catch all cases."
38662 #: ../tools/virt-win-reg.pl:58
38664 "Modifying the Windows Registry is an inherently risky operation. The format "
38665 "is deliberately obscure and undocumented, and Registry changes can leave the "
38666 "system unbootable. Therefore when using the I<--merge> option, make sure "
38667 "you have a reliable backup first."
38671 #: ../tools/virt-win-reg.pl:65
38673 "This program can export and merge Windows Registry entries from a Windows "
38678 #: ../tools/virt-win-reg.pl:68
38680 "The first parameter is the libvirt guest name or the raw disk image of a "
38685 #: ../tools/virt-win-reg.pl:71
38687 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
38688 "exported (recursively). For example:"
38692 #: ../tools/virt-win-reg.pl:74
38695 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
38700 #: ../tools/virt-win-reg.pl:76
38702 "You can also display single values from within registry keys, for example:"
38706 #: ../tools/virt-win-reg.pl:79
38709 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
38710 " $ virt-win-reg Windows7 $cvkey ProductName\n"
38711 " Windows 7 Enterprise\n"
38716 #: ../tools/virt-win-reg.pl:83
38718 "With I<--merge>, you can merge a textual regedit file into the Windows "
38723 #: ../tools/virt-win-reg.pl:86
38726 " $ virt-win-reg --merge Windows7 changes.reg\n"
38731 #: ../tools/virt-win-reg.pl:90
38733 "This program is only meant for simple access to the registry. If you want "
38734 "to do complicated things with the registry, we suggest you download the "
38735 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
38736 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
38737 "L<hivexregedit(1)>."
38741 #: ../tools/virt-win-reg.pl:159
38746 #: ../tools/virt-win-reg.pl:161
38748 "In merge mode, this merges a textual regedit file into the Windows Registry "
38749 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
38750 "displays or exports Registry entries instead."
38754 #: ../tools/virt-win-reg.pl:165
38756 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
38757 "result in disk corruption. However exporting (without this flag) is always "
38762 #: ../tools/virt-win-reg.pl:173
38763 msgid "B<--encoding> UTF-16LE|ASCII"
38767 #: ../tools/virt-win-reg.pl:175
38769 "When merging (only), you may need to specify the encoding for strings to be "
38770 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
38771 "(3)/ENCODING STRINGS>."
38775 #: ../tools/virt-win-reg.pl:179
38777 "The default is to use UTF-16LE, which should work with recent versions of "
38782 #: ../tools/virt-win-reg.pl:186
38783 msgid "B<--unsafe-printable-strings>"
38787 #: ../tools/virt-win-reg.pl:188
38789 "When exporting (only), assume strings are UTF-16LE and print them as strings "
38790 "instead of hex sequences. Remove the final zero codepoint from strings if "
38795 #: ../tools/virt-win-reg.pl:192
38797 "This is unsafe and does not preserve the fidelity of strings in the original "
38798 "Registry for various reasons:"
38802 #: ../tools/virt-win-reg.pl:199
38804 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
38805 "other encodings will be corrupted by this transformation."
38809 #: ../tools/virt-win-reg.pl:204
38811 "Assumes that everything which has type 1 or 2 is really a string and that "
38812 "everything else is not a string, but the type field in real Registries is "
38817 #: ../tools/virt-win-reg.pl:210
38819 "Loses information about whether a zero codepoint followed the string in the "
38824 #: ../tools/virt-win-reg.pl:215
38826 "This all happens because the Registry itself contains no information about "
38827 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
38831 #: ../tools/virt-win-reg.pl:219
38833 "You should only use this option for quick hacking and debugging of the "
38834 "Registry contents, and I<never> use it if the output is going to be passed "
38835 "into another program or stored in another Registry."
38839 #: ../tools/virt-win-reg.pl:556
38840 msgid "SUPPORTED SYSTEMS"
38844 #: ../tools/virt-win-reg.pl:558
38846 "The program currently supports Windows NT-derived guests starting with "
38847 "Windows XP through to at least Windows 7."
38851 #: ../tools/virt-win-reg.pl:561
38852 msgid "The following Registry keys are supported:"
38856 #: ../tools/virt-win-reg.pl:565
38857 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
38861 #: ../tools/virt-win-reg.pl:567
38862 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
38866 #: ../tools/virt-win-reg.pl:569
38867 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
38871 #: ../tools/virt-win-reg.pl:571
38872 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
38876 #: ../tools/virt-win-reg.pl:573
38877 msgid "C<HKEY_USERS\\.DEFAULT>"
38881 #: ../tools/virt-win-reg.pl:575
38882 msgid "C<HKEY_USERS\\I<SID>>"
38886 #: ../tools/virt-win-reg.pl:577
38887 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
38891 #: ../tools/virt-win-reg.pl:579
38892 msgid "C<HKEY_USERS\\I<username>>"
38896 #: ../tools/virt-win-reg.pl:581
38898 "where I<username> is a local user name (this is a libguestfs extension)."
38902 #: ../tools/virt-win-reg.pl:585
38904 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
38909 #: ../tools/virt-win-reg.pl:588
38911 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
38912 "supported (there is no \"current user\")."
38916 #: ../tools/virt-win-reg.pl:591
38921 #: ../tools/virt-win-reg.pl:593
38923 "C<virt-win-reg> expects that regedit files have already been reencoded in "
38924 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
38925 "style line endings. Since Windows regedit files are often in UTF-16LE with "
38926 "Windows-style line endings, you may need to reencode the whole file before "
38927 "or after processing."
38931 #: ../tools/virt-win-reg.pl:599
38933 "To reencode a file from Windows format to Linux (before processing it with "
38934 "the I<--merge> option), you would do something like this:"
38938 #: ../tools/virt-win-reg.pl:602
38941 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
38946 #: ../tools/virt-win-reg.pl:604
38948 "To go in the opposite direction, after exporting and before sending the file "
38949 "to a Windows user, do something like this:"
38953 #: ../tools/virt-win-reg.pl:607
38956 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
38961 #: ../tools/virt-win-reg.pl:609
38962 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
38966 #: ../tools/virt-win-reg.pl:611
38968 "If you are unsure about the current encoding, use the L<file(1)> command. "
38969 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
38970 "style (CRLF) line endings, like this:"
38974 #: ../tools/virt-win-reg.pl:615
38977 " $ file software.reg\n"
38978 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
38979 " with CRLF line terminators\n"
38984 #: ../tools/virt-win-reg.pl:619
38985 msgid "This file would need conversion before you could I<--merge> it."
38989 #: ../tools/virt-win-reg.pl:621
38990 msgid "CurrentControlSet etc."
38994 #: ../tools/virt-win-reg.pl:623
38996 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
38997 "Registry at the level of the hive file, and therefore you cannot modify "
39002 #: ../tools/virt-win-reg.pl:627
39004 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
39005 "circumstances it might refer to another control set. The way to find out is "
39006 "to look at the C<HKLM\\SYSTEM\\Select> key:"
39010 #: ../tools/virt-win-reg.pl:631
39013 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
39014 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
39015 " \"Current\"=dword:00000001\n"
39016 " \"Default\"=dword:00000001\n"
39017 " \"Failed\"=dword:00000000\n"
39018 " \"LastKnownGood\"=dword:00000002\n"
39023 #: ../tools/virt-win-reg.pl:638
39024 msgid "\"Current\" is the one which Windows will choose when it boots."
39028 #: ../tools/virt-win-reg.pl:640
39030 "Similarly, other C<Current...> keys in the path may need to be replaced."
39034 #: ../tools/virt-win-reg.pl:643
39035 msgid "WINDOWS TIPS"
39039 #: ../tools/virt-win-reg.pl:645
39041 "Note that some of these tips modify the guest disk image. The guest I<must> "
39042 "be shut off, else you will get disk corruption."
39046 #: ../tools/virt-win-reg.pl:648
39047 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
39051 #: ../tools/virt-win-reg.pl:650
39053 "Prepare a DOS batch script, VBScript or executable. Upload this using "
39054 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
39055 "is uploaded into C<C:\\>:"
39059 #: ../tools/virt-win-reg.pl:654
39062 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
39067 #: ../tools/virt-win-reg.pl:656
39068 msgid "Prepare a regedit file containing the registry change:"
39072 #: ../tools/virt-win-reg.pl:658
39075 " cat > test.reg <<'EOF'\n"
39076 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
39077 " \"Test\"=\"c:\\\\test.bat\"\n"
39083 #: ../tools/virt-win-reg.pl:663
39085 "In this example we use the key C<RunOnce> which means that the script will "
39086 "run precisely once when the first user logs in. If you want it to run every "
39087 "time a user logs in, replace C<RunOnce> with C<Run>."
39091 #: ../tools/virt-win-reg.pl:667
39092 msgid "Now update the registry:"
39096 #: ../tools/virt-win-reg.pl:669
39099 " virt-win-reg --merge WindowsGuest test.reg\n"
39104 #: ../tools/virt-win-reg.pl:671
39105 msgid "INSTALLING A SERVICE"
39109 #: ../tools/virt-win-reg.pl:673
39111 "This section assumes you are familiar with Windows services, and you either "
39112 "have a program which handles the Windows Service Control Protocol directly "
39113 "or you want to run any program using a service wrapper like SrvAny or the "
39118 #: ../tools/virt-win-reg.pl:678
39120 "First upload the program and optionally the service wrapper. In this case "
39121 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
39125 #: ../tools/virt-win-reg.pl:682
39128 " guestfish -i -d WindowsGuest <<EOF\n"
39129 " upload rhsrvany.exe /rhsrvany.exe\n"
39130 " upload test.exe /test.exe\n"
39136 #: ../tools/virt-win-reg.pl:687
39138 "Prepare a regedit file containing the registry changes. In this example, "
39139 "the first registry change is needed for the service itself or the service "
39140 "wrapper (if used). The second registry change is only needed because I am "
39141 "using the RHSrvAny service wrapper."
39145 #: ../tools/virt-win-reg.pl:692
39148 " cat > service.reg <<'EOF'\n"
39149 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
39150 " \"Type\"=dword:00000010\n"
39151 " \"Start\"=dword:00000002\n"
39152 " \"ErrorControl\"=dword:00000001\n"
39153 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
39154 " \"DisplayName\"=\"RHSrvAny\"\n"
39155 " \"ObjectName\"=\"NetworkService\"\n"
39160 #: ../tools/virt-win-reg.pl:701
39163 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
39164 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
39165 " \"PWD\"=\"c:\\\\Temp\"\n"
39171 #: ../tools/virt-win-reg.pl:712
39173 "For use of C<ControlSet001> see the section above in this manual page. You "
39174 "may need to adjust this according to the control set that is in use by the "
39179 #: ../tools/virt-win-reg.pl:718
39181 "C<\"ObjectName\"> controls the privileges that the service will have. An "
39182 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
39183 "privileged account."
39187 #: ../tools/virt-win-reg.pl:724
39189 "For the meaning of the magic numbers, see this Microsoft KB article: "
39190 "L<http://support.microsoft.com/kb/103000>."
39194 #: ../tools/virt-win-reg.pl:729
39195 msgid "Update the registry:"
39199 #: ../tools/virt-win-reg.pl:731
39202 " virt-win-reg --merge WindowsGuest service.reg\n"
39207 #: ../tools/virt-win-reg.pl:735
39209 "Be careful when passing parameters containing C<\\> (backslash) in the "
39210 "shell. Usually you will have to use 'single quotes' or double backslashes "
39211 "(but not both) to protect them from the shell."
39215 #: ../tools/virt-win-reg.pl:739
39216 msgid "Paths and value names are case-insensitive."
39220 #: ../tools/virt-win-reg.pl:748
39222 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
39223 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
39224 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
39228 #: ../tools/virt-win-reg.pl:766
39231 " export LIBGUESTFS_DEBUG=1\n"
39232 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
39237 #: ../tools/virt-win-reg.pl:769
39239 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."