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-10-01 14:27+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:2791
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:3167 ../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:3244 ../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:4245
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:1094
2439 #: ../src/guestfs.pod:1098 ../src/guestfs.pod:1102 ../src/guestfs.pod:1107
2440 #: ../src/guestfs.pod:1115 ../src/guestfs.pod:1134 ../src/guestfs.pod:1142
2441 #: ../src/guestfs.pod:1164 ../src/guestfs.pod:1168 ../src/guestfs.pod:1172
2442 #: ../src/guestfs.pod:1176 ../src/guestfs.pod:1180 ../src/guestfs.pod:1184
2443 #: ../src/guestfs.pod:1674 ../src/guestfs.pod:1679 ../src/guestfs.pod:1683
2444 #: ../src/guestfs.pod:1785 ../src/guestfs.pod:1790 ../src/guestfs.pod:1794
2445 #: ../src/guestfs.pod:1804 ../src/guestfs.pod:2093 ../src/guestfs.pod:2098
2446 #: ../src/guestfs.pod:2104 ../src/guestfs.pod:2112 ../src/guestfs.pod:2559
2447 #: ../src/guestfs.pod:2565 ../src/guestfs.pod:2570 ../src/guestfs.pod:2576
2448 #: ../src/guestfs.pod:2959 ../src/guestfs.pod:2964 ../src/guestfs.pod:2968
2449 #: ../src/guestfs.pod:2972 ../src/guestfs.pod:2976 ../src/guestfs.pod:2990
2450 #: ../src/guestfs.pod:2995 ../src/guestfs.pod:3221 ../src/guestfs.pod:3225
2451 #: ../src/guestfs.pod:3229 ../src/guestfs.pod:3233
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:3106
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:3240
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:3242
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:3249
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:3254
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:3259
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:1670
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:3468
4348 #: ../fish/guestfish-actions.pod:3516 ../fish/guestfish-actions.pod:4429
4349 #: ../fish/guestfish-actions.pod:4452 ../fish/guestfish-actions.pod:4474
4350 #: ../fish/guestfish-actions.pod:4512 ../fish/guestfish-actions.pod:5161
4351 #: ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:10
4352 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
4353 #: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:2114
4354 #: ../src/guestfs-actions.pod:2135 ../src/guestfs-actions.pod:4765
4355 #: ../src/guestfs-actions.pod:5287 ../src/guestfs-actions.pod:5387
4356 #: ../src/guestfs-actions.pod:6667 ../src/guestfs-actions.pod:6711
4357 #: ../src/guestfs-actions.pod:6745 ../src/guestfs-actions.pod:6808
4358 #: ../src/guestfs-actions.pod:7740 ../src/guestfs-actions.pod:7849
4359 #: ../src/guestfs-actions.pod:8032
4361 "Deprecated functions will not be removed from the API, but the fact that "
4362 "they are deprecated indicates that there are problems with correct use of "
4367 #: ../fish/guestfish-actions.pod:35
4372 #: ../fish/guestfish-actions.pod:37
4377 #: ../fish/guestfish-actions.pod:39
4380 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
4385 #: ../fish/guestfish-actions.pod:41
4387 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4388 "It works by connecting to libvirt, requesting the domain and domain XML from "
4389 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
4393 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64
4395 "The number of disks added is returned. This operation is atomic: if an "
4396 "error is returned, then no disks are added."
4400 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67
4402 "This function does some minimal checks to make sure the libvirt domain is "
4403 "not running (unless C<readonly> is true). In a future version we will try "
4404 "to acquire the libvirt lock on each disk."
4408 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71
4410 "Disks must be accessible locally. This often means that adding disks from a "
4411 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4412 "unless those disks are accessible via the same device path locally too."
4416 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76
4418 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
4419 "libvirt.org/uri.html>). If this is not set then we connect to the default "
4420 "libvirt URI (or one set through an environment variable, see the libvirt "
4421 "documentation for full details)."
4425 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82
4427 "The optional C<live> flag controls whether this call will try to connect to "
4428 "a running virtual machine C<guestfsd> process if it sees a suitable "
4429 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
4430 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
4431 "DAEMONS> for more information."
4435 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89
4437 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
4438 "passed instead of the domain name. The C<dom> string is treated as a UUID "
4439 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
4444 #: ../fish/guestfish-actions.pod:76
4446 "The other optional parameters are passed directly through to L</add-drive-"
4451 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
4452 #: ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:784
4453 #: ../fish/guestfish-actions.pod:805 ../fish/guestfish-actions.pod:2040
4454 #: ../fish/guestfish-actions.pod:3206 ../fish/guestfish-actions.pod:3369
4455 #: ../fish/guestfish-actions.pod:3504
4457 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
4461 #: ../fish/guestfish-actions.pod:81
4466 #: ../fish/guestfish-actions.pod:83
4469 " add-drive filename\n"
4474 #: ../fish/guestfish-actions.pod:85
4476 "This function is the equivalent of calling L</add-drive-opts> with no "
4477 "optional parameters, so the disk is added writable, with the format being "
4478 "detected automatically."
4482 #: ../fish/guestfish-actions.pod:89
4484 "Automatic detection of the format opens you up to a potential security hole "
4485 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4486 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4487 "you should think about replacing calls to this function with calls to L</add-"
4488 "drive-opts>, and specifying the format."
4492 #: ../fish/guestfish-actions.pod:96
4493 msgid "add-drive-opts"
4497 #: ../fish/guestfish-actions.pod:98
4502 #: ../fish/guestfish-actions.pod:100
4505 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
4510 #: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:160
4512 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4513 "The first time you call this function, the disk appears as C</dev/sda>, the "
4514 "second time as C</dev/sdb>, and so on."
4518 #: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:165
4520 "You don't necessarily need to be root when using libguestfs. However you "
4521 "obviously do need sufficient permissions to access the filename for whatever "
4522 "operations you want to perform (ie. read access if you just want to read the "
4523 "image or write access if you want to modify the image)."
4527 #: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:171
4528 msgid "This call checks that C<filename> exists."
4532 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3168
4533 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4802
4534 msgid "The optional arguments are:"
4538 #: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:177
4543 #: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:179
4545 "If true then the image is treated as read-only. Writes are still allowed, "
4546 "but they are stored in a temporary snapshot overlay which is discarded at "
4547 "the end. The disk that you add is not modified."
4551 #: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:183
4556 #: ../fish/guestfish-actions.pod:127
4558 "This forces the image format. If you omit this (or use L</add-drive> or L</"
4559 "add-drive-ro>) then the format is automatically detected. Possible formats "
4560 "include C<raw> and C<qcow2>."
4564 #: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:189
4566 "Automatic detection of the format opens you up to a potential security hole "
4567 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4568 "RHBZ#642934. Specifying the format closes this security hole."
4572 #: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:194
4577 #: ../fish/guestfish-actions.pod:138
4579 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
4580 "add-drive-with-if> call (q.v.)"
4584 #: ../fish/guestfish-actions.pod:145
4585 msgid "add-drive-ro"
4589 #: ../fish/guestfish-actions.pod:147
4594 #: ../fish/guestfish-actions.pod:149
4597 " add-drive-ro filename\n"
4602 #: ../fish/guestfish-actions.pod:151
4604 "This function is the equivalent of calling L</add-drive-opts> with the "
4605 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
4606 "is added read-only, with the format being detected automatically."
4610 #: ../fish/guestfish-actions.pod:156
4611 msgid "add-drive-ro-with-if"
4615 #: ../fish/guestfish-actions.pod:158
4618 " add-drive-ro-with-if filename iface\n"
4623 #: ../fish/guestfish-actions.pod:160
4625 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
4626 "interface emulation to use at run time."
4630 #: ../fish/guestfish-actions.pod:170
4631 msgid "add-drive-with-if"
4635 #: ../fish/guestfish-actions.pod:172
4638 " add-drive-with-if filename iface\n"
4643 #: ../fish/guestfish-actions.pod:174
4645 "This is the same as L</add-drive> but it allows you to specify the QEMU "
4646 "interface emulation to use at run time."
4650 #: ../fish/guestfish-actions.pod:184
4655 #: ../fish/guestfish-actions.pod:186
4658 " aug-clear augpath\n"
4663 #: ../fish/guestfish-actions.pod:188 ../src/guestfs-actions.pod:290
4665 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4666 "L<augtool(1)> C<clear> command."
4670 #: ../fish/guestfish-actions.pod:191
4675 #: ../fish/guestfish-actions.pod:193
4683 #: ../fish/guestfish-actions.pod:195
4685 "Close the current Augeas handle and free up any resources used by it. After "
4686 "calling this, you have to call L</aug-init> again before you can use any "
4687 "other Augeas functions."
4691 #: ../fish/guestfish-actions.pod:200
4696 #: ../fish/guestfish-actions.pod:202
4699 " aug-defnode name expr val\n"
4704 #: ../fish/guestfish-actions.pod:204 ../src/guestfs-actions.pod:319
4706 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4710 #: ../fish/guestfish-actions.pod:207
4712 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4713 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
4714 "containing that single node."
4718 #: ../fish/guestfish-actions.pod:211 ../src/guestfs-actions.pod:326
4720 "On success this returns a pair containing the number of nodes in the "
4721 "nodeset, and a boolean flag if a node was created."
4725 #: ../fish/guestfish-actions.pod:215
4730 #: ../fish/guestfish-actions.pod:217
4733 " aug-defvar name expr\n"
4738 #: ../fish/guestfish-actions.pod:219 ../src/guestfs-actions.pod:343
4740 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4741 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4745 #: ../fish/guestfish-actions.pod:223 ../src/guestfs-actions.pod:347
4747 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4748 "evaluates to something which is not a nodeset."
4752 #: ../fish/guestfish-actions.pod:226
4757 #: ../fish/guestfish-actions.pod:228
4760 " aug-get augpath\n"
4765 #: ../fish/guestfish-actions.pod:230 ../src/guestfs-actions.pod:360
4767 "Look up the value associated with C<path>. If C<path> matches exactly one "
4768 "node, the C<value> is returned."
4772 #: ../fish/guestfish-actions.pod:233
4777 #: ../fish/guestfish-actions.pod:235
4780 " aug-init root flags\n"
4785 #: ../fish/guestfish-actions.pod:237 ../src/guestfs-actions.pod:375
4787 "Create a new Augeas handle for editing configuration files. If there was "
4788 "any previous Augeas handle associated with this guestfs session, then it is "
4793 #: ../fish/guestfish-actions.pod:241
4794 msgid "You must call this before using any other L</aug-*> commands."
4798 #: ../fish/guestfish-actions.pod:244 ../src/guestfs-actions.pod:382
4800 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4804 #: ../fish/guestfish-actions.pod:247 ../src/guestfs-actions.pod:385
4806 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4807 "logical I<or> of the following integers:"
4811 #: ../fish/guestfish-actions.pod:253 ../src/guestfs-actions.pod:391
4812 msgid "C<AUG_SAVE_BACKUP> = 1"
4816 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:393
4817 msgid "Keep the original file with a C<.augsave> extension."
4821 #: ../fish/guestfish-actions.pod:257 ../src/guestfs-actions.pod:395
4822 msgid "C<AUG_SAVE_NEWFILE> = 2"
4826 #: ../fish/guestfish-actions.pod:259 ../src/guestfs-actions.pod:397
4828 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4829 "original. Overrides C<AUG_SAVE_BACKUP>."
4833 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:400
4834 msgid "C<AUG_TYPE_CHECK> = 4"
4838 #: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:402
4839 msgid "Typecheck lenses."
4843 #: ../fish/guestfish-actions.pod:266
4845 "This option is only useful when debugging Augeas lenses. Use of this option "
4846 "may require additional memory for the libguestfs appliance. You may need to "
4847 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
4851 #: ../fish/guestfish-actions.pod:271 ../src/guestfs-actions.pod:409
4852 msgid "C<AUG_NO_STDINC> = 8"
4856 #: ../fish/guestfish-actions.pod:273 ../src/guestfs-actions.pod:411
4857 msgid "Do not use standard load path for modules."
4861 #: ../fish/guestfish-actions.pod:275 ../src/guestfs-actions.pod:413
4862 msgid "C<AUG_SAVE_NOOP> = 16"
4866 #: ../fish/guestfish-actions.pod:277 ../src/guestfs-actions.pod:415
4867 msgid "Make save a no-op, just record what would have been changed."
4871 #: ../fish/guestfish-actions.pod:279 ../src/guestfs-actions.pod:417
4872 msgid "C<AUG_NO_LOAD> = 32"
4876 #: ../fish/guestfish-actions.pod:281
4877 msgid "Do not load the tree in L</aug-init>."
4881 #: ../fish/guestfish-actions.pod:285
4882 msgid "To close the handle, you can call L</aug-close>."
4886 #: ../fish/guestfish-actions.pod:287 ../src/guestfs-actions.pod:425
4887 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4891 #: ../fish/guestfish-actions.pod:289
4896 #: ../fish/guestfish-actions.pod:291
4899 " aug-insert augpath label true|false\n"
4904 #: ../fish/guestfish-actions.pod:293 ../src/guestfs-actions.pod:439
4906 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4907 "or after C<path> (depending on the boolean flag C<before>)."
4911 #: ../fish/guestfish-actions.pod:297 ../src/guestfs-actions.pod:443
4913 "C<path> must match exactly one existing node in the tree, and C<label> must "
4914 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4918 #: ../fish/guestfish-actions.pod:301
4923 #: ../fish/guestfish-actions.pod:303
4931 #: ../fish/guestfish-actions.pod:305 ../src/guestfs-actions.pod:456
4932 msgid "Load files into the tree."
4936 #: ../fish/guestfish-actions.pod:307 ../src/guestfs-actions.pod:458
4937 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4941 #: ../fish/guestfish-actions.pod:310
4946 #: ../fish/guestfish-actions.pod:312
4954 #: ../fish/guestfish-actions.pod:314
4956 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
4957 "resulting nodes into alphabetical order."
4961 #: ../fish/guestfish-actions.pod:317
4966 #: ../fish/guestfish-actions.pod:319
4969 " aug-match augpath\n"
4974 #: ../fish/guestfish-actions.pod:321 ../src/guestfs-actions.pod:486
4976 "Returns a list of paths which match the path expression C<path>. The "
4977 "returned paths are sufficiently qualified so that they match exactly one "
4978 "node in the current tree."
4982 #: ../fish/guestfish-actions.pod:325
4987 #: ../fish/guestfish-actions.pod:327
4990 " aug-mv src dest\n"
4995 #: ../fish/guestfish-actions.pod:329 ../src/guestfs-actions.pod:503
4997 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4998 "C<dest> is overwritten if it exists."
5002 #: ../fish/guestfish-actions.pod:332
5007 #: ../fish/guestfish-actions.pod:334
5015 #: ../fish/guestfish-actions.pod:336 ../src/guestfs-actions.pod:516
5016 msgid "Remove C<path> and all of its children."
5020 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:518
5021 msgid "On success this returns the number of entries which were removed."
5025 #: ../fish/guestfish-actions.pod:340
5030 #: ../fish/guestfish-actions.pod:342
5038 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:529
5039 msgid "This writes all pending changes to disk."
5043 #: ../fish/guestfish-actions.pod:346
5045 "The flags which were passed to L</aug-init> affect exactly how files are "
5050 #: ../fish/guestfish-actions.pod:349
5055 #: ../fish/guestfish-actions.pod:351
5058 " aug-set augpath val\n"
5063 #: ../fish/guestfish-actions.pod:353 ../src/guestfs-actions.pod:545
5064 msgid "Set the value associated with C<path> to C<val>."
5068 #: ../fish/guestfish-actions.pod:355
5070 "In the Augeas API, it is possible to clear a node by setting the value to "
5071 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5072 "this call. Instead you must use the L</aug-clear> call."
5076 #: ../fish/guestfish-actions.pod:360
5081 #: ../fish/guestfish-actions.pod:362
5084 " available 'groups ...'\n"
5089 #: ../fish/guestfish-actions.pod:364 ../src/guestfs-actions.pod:562
5091 "This command is used to check the availability of some groups of "
5092 "functionality in the appliance, which not all builds of the libguestfs "
5093 "appliance will be able to provide."
5097 #: ../fish/guestfish-actions.pod:368
5099 "The libguestfs groups, and the functions that those groups correspond to, "
5100 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5101 "runtime by calling L</available-all-groups>."
5105 #: ../fish/guestfish-actions.pod:373 ../src/guestfs-actions.pod:571
5107 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
5108 "\"]> would check for the availability of the Linux inotify functions and "
5109 "Augeas (configuration file editing) functions."
5113 #: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:576
5114 msgid "The command returns no error if I<all> requested groups are available."
5118 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:578
5120 "It fails with an error if one or more of the requested groups is unavailable "
5125 #: ../fish/guestfish-actions.pod:383 ../src/guestfs-actions.pod:581
5127 "If an unknown group name is included in the list of groups then an error is "
5132 #: ../fish/guestfish-actions.pod:386 ../src/guestfs-actions.pod:584
5137 #: ../fish/guestfish-actions.pod:392
5138 msgid "You must call L</launch> before calling this function."
5142 #: ../fish/guestfish-actions.pod:394 ../src/guestfs-actions.pod:592
5144 "The reason is because we don't know what groups are supported by the "
5145 "appliance/daemon until it is running and can be queried."
5149 #: ../fish/guestfish-actions.pod:400 ../src/guestfs-actions.pod:598
5151 "If a group of functions is available, this does not necessarily mean that "
5152 "they will work. You still have to check for errors when calling individual "
5153 "API functions even if they are available."
5157 #: ../fish/guestfish-actions.pod:407 ../src/guestfs-actions.pod:605
5159 "It is usually the job of distro packagers to build complete functionality "
5160 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5161 "with all requirements satisfied, will support everything."
5165 #: ../fish/guestfish-actions.pod:414
5167 "This call was added in version C<1.0.80>. In previous versions of "
5168 "libguestfs all you could do would be to speculatively execute a command to "
5169 "find out if the daemon implemented it. See also L</version>."
5173 #: ../fish/guestfish-actions.pod:421
5174 msgid "available-all-groups"
5178 #: ../fish/guestfish-actions.pod:423
5181 " available-all-groups\n"
5186 #: ../fish/guestfish-actions.pod:425
5188 "This command returns a list of all optional groups that this daemon knows "
5189 "about. Note this returns both supported and unsupported groups. To find "
5190 "out which ones the daemon can actually support you have to call L</"
5191 "available> on each member of the returned list."
5195 #: ../fish/guestfish-actions.pod:431
5196 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
5200 #: ../fish/guestfish-actions.pod:433
5205 #: ../fish/guestfish-actions.pod:435
5208 " base64-in (base64file|-) filename\n"
5213 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:649
5215 "This command uploads base64-encoded data from C<base64file> to C<filename>."
5219 #: ../fish/guestfish-actions.pod:440 ../fish/guestfish-actions.pod:449
5220 #: ../fish/guestfish-actions.pod:698 ../fish/guestfish-actions.pod:782
5221 #: ../fish/guestfish-actions.pod:803 ../fish/guestfish-actions.pod:902
5222 #: ../fish/guestfish-actions.pod:921 ../fish/guestfish-actions.pod:1295
5223 #: ../fish/guestfish-actions.pod:4732 ../fish/guestfish-actions.pod:4744
5224 #: ../fish/guestfish-actions.pod:4755 ../fish/guestfish-actions.pod:4766
5225 #: ../fish/guestfish-actions.pod:4818 ../fish/guestfish-actions.pod:4827
5226 #: ../fish/guestfish-actions.pod:4881 ../fish/guestfish-actions.pod:4904
5227 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
5231 #: ../fish/guestfish-actions.pod:442
5236 #: ../fish/guestfish-actions.pod:444
5239 " base64-out filename (base64file|-)\n"
5244 #: ../fish/guestfish-actions.pod:446 ../src/guestfs-actions.pod:663
5246 "This command downloads the contents of C<filename>, writing it out to local "
5247 "file C<base64file> encoded as base64."
5251 #: ../fish/guestfish-actions.pod:451
5252 msgid "blockdev-flushbufs"
5256 #: ../fish/guestfish-actions.pod:453
5259 " blockdev-flushbufs device\n"
5264 #: ../fish/guestfish-actions.pod:455 ../src/guestfs-actions.pod:676
5266 "This tells the kernel to flush internal buffers associated with C<device>."
5270 #: ../fish/guestfish-actions.pod:458 ../fish/guestfish-actions.pod:469
5271 #: ../fish/guestfish-actions.pod:478 ../fish/guestfish-actions.pod:488
5272 #: ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:513
5273 #: ../fish/guestfish-actions.pod:521 ../fish/guestfish-actions.pod:532
5274 #: ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:548
5275 #: ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:696
5276 #: ../src/guestfs-actions.pod:711 ../src/guestfs-actions.pod:727
5277 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:764
5278 #: ../src/guestfs-actions.pod:778 ../src/guestfs-actions.pod:796
5279 #: ../src/guestfs-actions.pod:810 ../src/guestfs-actions.pod:824
5280 msgid "This uses the L<blockdev(8)> command."
5284 #: ../fish/guestfish-actions.pod:460
5285 msgid "blockdev-getbsz"
5289 #: ../fish/guestfish-actions.pod:462
5292 " blockdev-getbsz device\n"
5297 #: ../fish/guestfish-actions.pod:464 ../src/guestfs-actions.pod:691
5298 msgid "This returns the block size of a device."
5302 #: ../fish/guestfish-actions.pod:466 ../fish/guestfish-actions.pod:529
5303 #: ../src/guestfs-actions.pod:693 ../src/guestfs-actions.pod:793
5305 "(Note this is different from both I<size in blocks> and I<filesystem block "
5310 #: ../fish/guestfish-actions.pod:471
5311 msgid "blockdev-getro"
5315 #: ../fish/guestfish-actions.pod:473
5318 " blockdev-getro device\n"
5323 #: ../fish/guestfish-actions.pod:475 ../src/guestfs-actions.pod:708
5325 "Returns a boolean indicating if the block device is read-only (true if read-"
5326 "only, false if not)."
5330 #: ../fish/guestfish-actions.pod:480
5331 msgid "blockdev-getsize64"
5335 #: ../fish/guestfish-actions.pod:482
5338 " blockdev-getsize64 device\n"
5343 #: ../fish/guestfish-actions.pod:484 ../src/guestfs-actions.pod:723
5344 msgid "This returns the size of the device in bytes."
5348 #: ../fish/guestfish-actions.pod:486
5349 msgid "See also L</blockdev-getsz>."
5353 #: ../fish/guestfish-actions.pod:490
5354 msgid "blockdev-getss"
5358 #: ../fish/guestfish-actions.pod:492
5361 " blockdev-getss device\n"
5366 #: ../fish/guestfish-actions.pod:494 ../src/guestfs-actions.pod:739
5368 "This returns the size of sectors on a block device. Usually 512, but can be "
5369 "larger for modern devices."
5373 #: ../fish/guestfish-actions.pod:497
5375 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
5379 #: ../fish/guestfish-actions.pod:502
5380 msgid "blockdev-getsz"
5384 #: ../fish/guestfish-actions.pod:504
5387 " blockdev-getsz device\n"
5392 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:757
5394 "This returns the size of the device in units of 512-byte sectors (even if "
5395 "the sectorsize isn't 512 bytes ... weird)."
5399 #: ../fish/guestfish-actions.pod:509
5401 "See also L</blockdev-getss> for the real sector size of the device, and L</"
5402 "blockdev-getsize64> for the more useful I<size in bytes>."
5406 #: ../fish/guestfish-actions.pod:515
5407 msgid "blockdev-rereadpt"
5411 #: ../fish/guestfish-actions.pod:517
5414 " blockdev-rereadpt device\n"
5419 #: ../fish/guestfish-actions.pod:519 ../src/guestfs-actions.pod:776
5420 msgid "Reread the partition table on C<device>."
5424 #: ../fish/guestfish-actions.pod:523
5425 msgid "blockdev-setbsz"
5429 #: ../fish/guestfish-actions.pod:525
5432 " blockdev-setbsz device blocksize\n"
5437 #: ../fish/guestfish-actions.pod:527 ../src/guestfs-actions.pod:791
5438 msgid "This sets the block size of a device."
5442 #: ../fish/guestfish-actions.pod:534
5443 msgid "blockdev-setro"
5447 #: ../fish/guestfish-actions.pod:536
5450 " blockdev-setro device\n"
5455 #: ../fish/guestfish-actions.pod:538 ../src/guestfs-actions.pod:808
5456 msgid "Sets the block device named C<device> to read-only."
5460 #: ../fish/guestfish-actions.pod:542
5461 msgid "blockdev-setrw"
5465 #: ../fish/guestfish-actions.pod:544
5468 " blockdev-setrw device\n"
5473 #: ../fish/guestfish-actions.pod:546 ../src/guestfs-actions.pod:822
5474 msgid "Sets the block device named C<device> to read-write."
5478 #: ../fish/guestfish-actions.pod:550
5479 msgid "btrfs-filesystem-resize"
5483 #: ../fish/guestfish-actions.pod:552
5486 " btrfs-filesystem-resize mountpoint [size:..]\n"
5491 #: ../fish/guestfish-actions.pod:554 ../src/guestfs-actions.pod:844
5492 msgid "This command resizes a btrfs filesystem."
5496 #: ../fish/guestfish-actions.pod:556 ../src/guestfs-actions.pod:846
5498 "Note that unlike other resize calls, the filesystem has to be mounted and "
5499 "the parameter is the mountpoint not the device (this is a requirement of "
5504 #: ../fish/guestfish-actions.pod:560 ../fish/guestfish-actions.pod:3479
5505 #: ../src/guestfs-actions.pod:850 ../src/guestfs-actions.pod:5326
5506 msgid "The optional parameters are:"
5510 #: ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:3483
5511 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:5330
5516 #: ../fish/guestfish-actions.pod:566 ../src/guestfs-actions.pod:856
5518 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
5519 "resized to the maximum size."
5523 #: ../fish/guestfish-actions.pod:571 ../src/guestfs-actions.pod:861
5524 msgid "See also L<btrfs(8)>."
5528 #: ../fish/guestfish-actions.pod:575
5529 msgid "case-sensitive-path"
5533 #: ../fish/guestfish-actions.pod:577
5536 " case-sensitive-path path\n"
5541 #: ../fish/guestfish-actions.pod:579 ../src/guestfs-actions.pod:895
5543 "This can be used to resolve case insensitive paths on a filesystem which is "
5544 "case sensitive. The use case is to resolve paths which you have read from "
5545 "Windows configuration files or the Windows Registry, to the true path."
5549 #: ../fish/guestfish-actions.pod:584 ../src/guestfs-actions.pod:900
5551 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5552 "(and probably others), which is that although the underlying filesystem is "
5553 "case-insensitive, the driver exports the filesystem to Linux as case-"
5558 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:905
5560 "One consequence of this is that special directories such as C<c:\\windows> "
5561 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5562 "precise details of how they were created. In Windows itself this would not "
5567 #: ../fish/guestfish-actions.pod:595 ../src/guestfs-actions.pod:911
5569 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
5574 #: ../fish/guestfish-actions.pod:598 ../src/guestfs-actions.pod:914
5576 "This function resolves the true case of each element in the path and returns "
5577 "the case-sensitive path."
5581 #: ../fish/guestfish-actions.pod:601
5583 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
5584 "WINDOWS/system32\"> (the exact return value would depend on details of how "
5585 "the directories were originally created under Windows)."
5589 #: ../fish/guestfish-actions.pod:606 ../src/guestfs-actions.pod:922
5590 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5594 #: ../fish/guestfish-actions.pod:609
5595 msgid "See also L</realpath>."
5599 #: ../fish/guestfish-actions.pod:611
5604 #: ../fish/guestfish-actions.pod:613
5612 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3899
5613 #: ../src/guestfs-actions.pod:938 ../src/guestfs-actions.pod:5969
5614 msgid "Return the contents of the file named C<path>."
5618 #: ../fish/guestfish-actions.pod:617
5620 "Note that this function cannot correctly handle binary files (specifically, "
5621 "files containing C<\\0> character which is treated as end of string). For "
5622 "those you need to use the L</read-file> or L</download> functions which have "
5623 "a more complex interface."
5627 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:757
5628 #: ../fish/guestfish-actions.pod:769 ../fish/guestfish-actions.pod:980
5629 #: ../fish/guestfish-actions.pod:990 ../fish/guestfish-actions.pod:1057
5630 #: ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1259
5631 #: ../fish/guestfish-actions.pod:1572 ../fish/guestfish-actions.pod:1582
5632 #: ../fish/guestfish-actions.pod:1632 ../fish/guestfish-actions.pod:1647
5633 #: ../fish/guestfish-actions.pod:1657 ../fish/guestfish-actions.pod:1676
5634 #: ../fish/guestfish-actions.pod:3769 ../fish/guestfish-actions.pod:3784
5635 #: ../fish/guestfish-actions.pod:3860 ../fish/guestfish-actions.pod:3877
5636 #: ../fish/guestfish-actions.pod:3892 ../fish/guestfish-actions.pod:4573
5637 #: ../fish/guestfish-actions.pod:4619 ../fish/guestfish-actions.pod:4704
5638 #: ../fish/guestfish-actions.pod:4719 ../fish/guestfish-actions.pod:5125
5639 #: ../fish/guestfish-actions.pod:5137 ../fish/guestfish-actions.pod:5155
5640 #: ../fish/guestfish-actions.pod:5172 ../fish/guestfish-actions.pod:5182
5641 #: ../fish/guestfish-actions.pod:5239 ../fish/guestfish-actions.pod:5249
5642 #: ../fish/guestfish-actions.pod:5278 ../fish/guestfish-actions.pod:5288
5643 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:1127
5644 #: ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1550
5645 #: ../src/guestfs-actions.pod:1569 ../src/guestfs-actions.pod:1672
5646 #: ../src/guestfs-actions.pod:1691 ../src/guestfs-actions.pod:1937
5647 #: ../src/guestfs-actions.pod:2417 ../src/guestfs-actions.pod:2436
5648 #: ../src/guestfs-actions.pod:2501 ../src/guestfs-actions.pod:2525
5649 #: ../src/guestfs-actions.pod:2542 ../src/guestfs-actions.pod:2571
5650 #: ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5777
5651 #: ../src/guestfs-actions.pod:5908 ../src/guestfs-actions.pod:5934
5652 #: ../src/guestfs-actions.pod:5958 ../src/guestfs-actions.pod:6923
5653 #: ../src/guestfs-actions.pod:6978 ../src/guestfs-actions.pod:7124
5654 #: ../src/guestfs-actions.pod:7148 ../src/guestfs-actions.pod:7813
5655 #: ../src/guestfs-actions.pod:7833 ../src/guestfs-actions.pod:7866
5656 #: ../src/guestfs-actions.pod:7885 ../src/guestfs-actions.pod:7904
5657 #: ../src/guestfs-actions.pod:7998 ../src/guestfs-actions.pod:8017
5658 #: ../src/guestfs-actions.pod:8063 ../src/guestfs-actions.pod:8082
5660 "Because of the message protocol, there is a transfer limit of somewhere "
5661 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5665 #: ../fish/guestfish-actions.pod:625
5670 #: ../fish/guestfish-actions.pod:627
5673 " checksum csumtype path\n"
5678 #: ../fish/guestfish-actions.pod:629 ../src/guestfs-actions.pod:960
5680 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5684 #: ../fish/guestfish-actions.pod:632 ../src/guestfs-actions.pod:963
5686 "The type of checksum to compute is given by the C<csumtype> parameter which "
5687 "must have one of the following values:"
5691 #: ../fish/guestfish-actions.pod:637 ../src/guestfs-actions.pod:968
5696 #: ../fish/guestfish-actions.pod:639 ../src/guestfs-actions.pod:970
5698 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5703 #: ../fish/guestfish-actions.pod:642 ../src/guestfs-actions.pod:973
5708 #: ../fish/guestfish-actions.pod:644 ../src/guestfs-actions.pod:975
5709 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5713 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:977
5718 #: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:979
5719 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5723 #: ../fish/guestfish-actions.pod:650 ../src/guestfs-actions.pod:981
5728 #: ../fish/guestfish-actions.pod:652 ../src/guestfs-actions.pod:983
5729 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5733 #: ../fish/guestfish-actions.pod:654 ../src/guestfs-actions.pod:985
5738 #: ../fish/guestfish-actions.pod:656 ../src/guestfs-actions.pod:987
5739 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5743 #: ../fish/guestfish-actions.pod:658 ../src/guestfs-actions.pod:989
5748 #: ../fish/guestfish-actions.pod:660 ../src/guestfs-actions.pod:991
5749 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5753 #: ../fish/guestfish-actions.pod:662 ../src/guestfs-actions.pod:993
5758 #: ../fish/guestfish-actions.pod:664 ../src/guestfs-actions.pod:995
5759 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5763 #: ../fish/guestfish-actions.pod:668 ../src/guestfs-actions.pod:999
5764 msgid "The checksum is returned as a printable string."
5768 #: ../fish/guestfish-actions.pod:670
5769 msgid "To get the checksum for a device, use L</checksum-device>."
5773 #: ../fish/guestfish-actions.pod:672
5774 msgid "To get the checksums for many files, use L</checksums-out>."
5778 #: ../fish/guestfish-actions.pod:674
5779 msgid "checksum-device"
5783 #: ../fish/guestfish-actions.pod:676
5786 " checksum-device csumtype device\n"
5791 #: ../fish/guestfish-actions.pod:678
5793 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5794 "device named C<device>. For the types of checksums supported see the L</"
5795 "checksum> command."
5799 #: ../fish/guestfish-actions.pod:682
5800 msgid "checksums-out"
5804 #: ../fish/guestfish-actions.pod:684
5807 " checksums-out csumtype directory (sumsfile|-)\n"
5812 #: ../fish/guestfish-actions.pod:686 ../src/guestfs-actions.pod:1034
5814 "This command computes the checksums of all regular files in C<directory> and "
5815 "then emits a list of those checksums to the local output file C<sumsfile>."
5819 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1038
5821 "This can be used for verifying the integrity of a virtual machine. However "
5822 "to be properly secure you should pay attention to the output of the checksum "
5823 "command (it uses the ones from GNU coreutils). In particular when the "
5824 "filename is not printable, coreutils uses a special backslash syntax. For "
5825 "more information, see the GNU coreutils info file."
5829 #: ../fish/guestfish-actions.pod:700
5834 #: ../fish/guestfish-actions.pod:702
5837 " chmod mode path\n"
5842 #: ../fish/guestfish-actions.pod:704 ../src/guestfs-actions.pod:1057
5844 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5849 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1060
5851 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5852 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5857 #: ../fish/guestfish-actions.pod:711 ../fish/guestfish-actions.pod:3132
5858 #: ../fish/guestfish-actions.pod:3271 ../fish/guestfish-actions.pod:3281
5859 #: ../fish/guestfish-actions.pod:3291 ../src/guestfs-actions.pod:1064
5860 #: ../src/guestfs-actions.pod:4733 ../src/guestfs-actions.pod:4942
5861 #: ../src/guestfs-actions.pod:4961 ../src/guestfs-actions.pod:4980
5862 msgid "The mode actually set is affected by the umask."
5866 #: ../fish/guestfish-actions.pod:713
5871 #: ../fish/guestfish-actions.pod:715
5874 " chown owner group path\n"
5879 #: ../fish/guestfish-actions.pod:717 ../src/guestfs-actions.pod:1078
5880 msgid "Change the file owner to C<owner> and group to C<group>."
5884 #: ../fish/guestfish-actions.pod:719 ../fish/guestfish-actions.pod:2567
5885 #: ../src/guestfs-actions.pod:1080 ../src/guestfs-actions.pod:3804
5887 "Only numeric uid and gid are supported. If you want to use names, you will "
5888 "need to locate and parse the password file yourself (Augeas support makes "
5889 "this relatively easy)."
5893 #: ../fish/guestfish-actions.pod:723
5898 #: ../fish/guestfish-actions.pod:725
5901 " command 'arguments ...'\n"
5906 #: ../fish/guestfish-actions.pod:727 ../src/guestfs-actions.pod:1094
5908 "This call runs a command from the guest filesystem. The filesystem must be "
5909 "mounted, and must contain a compatible operating system (ie. something "
5910 "Linux, with the same or compatible processor architecture)."
5914 #: ../fish/guestfish-actions.pod:732
5916 "The single parameter is an argv-style list of arguments. The first element "
5917 "is the name of the program to run. Subsequent elements are parameters. The "
5918 "list must be non-empty (ie. must contain a program name). Note that the "
5919 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
5923 #: ../fish/guestfish-actions.pod:739 ../src/guestfs-actions.pod:1106
5924 msgid "The return value is anything printed to I<stdout> by the command."
5928 #: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1109
5930 "If the command returns a non-zero exit status, then this function returns an "
5931 "error message. The error message string is the content of I<stderr> from "
5936 #: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1113
5938 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5939 "bin>. If you require a program from another location, you should provide "
5940 "the full path in the first parameter."
5944 #: ../fish/guestfish-actions.pod:751 ../src/guestfs-actions.pod:1118
5946 "Shared libraries and data files required by the program must be available on "
5947 "filesystems which are mounted in the correct places. It is the caller's "
5948 "responsibility to ensure all filesystems that are needed are mounted at the "
5953 #: ../fish/guestfish-actions.pod:760
5954 msgid "command-lines"
5958 #: ../fish/guestfish-actions.pod:762
5961 " command-lines 'arguments ...'\n"
5966 #: ../fish/guestfish-actions.pod:764
5968 "This is the same as L</command>, but splits the result into a list of lines."
5972 #: ../fish/guestfish-actions.pod:767
5973 msgid "See also: L</sh-lines>"
5977 #: ../fish/guestfish-actions.pod:772
5978 msgid "compress-device-out"
5982 #: ../fish/guestfish-actions.pod:774
5985 " compress-device-out ctype device (zdevice|-) [level:..]\n"
5990 #: ../fish/guestfish-actions.pod:776 ../src/guestfs-actions.pod:1168
5992 "This command compresses C<device> and writes it out to the local file "
5997 #: ../fish/guestfish-actions.pod:779
5999 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
6004 #: ../fish/guestfish-actions.pod:786
6005 msgid "compress-out"
6009 #: ../fish/guestfish-actions.pod:788
6012 " compress-out ctype file (zfile|-) [level:..]\n"
6017 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1218
6019 "This command compresses C<file> and writes it out to the local file C<zfile>."
6023 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1221
6025 "The compression program used is controlled by the C<ctype> parameter. "
6026 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
6027 "Some compression types may not be supported by particular builds of "
6028 "libguestfs, in which case you will get an error containing the substring "
6029 "\"not supported\"."
6033 #: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1227
6035 "The optional C<level> parameter controls compression level. The meaning and "
6036 "default for this parameter depends on the compression program being used."
6040 #: ../fish/guestfish-actions.pod:807
6045 #: ../fish/guestfish-actions.pod:809
6048 " config qemuparam qemuvalue\n"
6053 #: ../fish/guestfish-actions.pod:811 ../src/guestfs-actions.pod:1266
6055 "This can be used to add arbitrary qemu command line parameters of the form "
6056 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
6057 "setting some parameters which would interfere with parameters that we use."
6061 #: ../fish/guestfish-actions.pod:816 ../src/guestfs-actions.pod:1271
6062 msgid "The first character of C<param> string must be a C<-> (dash)."
6066 #: ../fish/guestfish-actions.pod:818 ../src/guestfs-actions.pod:1273
6067 msgid "C<value> can be NULL."
6071 #: ../fish/guestfish-actions.pod:820
6076 #: ../fish/guestfish-actions.pod:822
6079 " copy-size src dest size\n"
6084 #: ../fish/guestfish-actions.pod:824 ../src/guestfs-actions.pod:1287
6086 "This command copies exactly C<size> bytes from one source device or file "
6087 "C<src> to another destination device or file C<dest>."
6091 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1290
6093 "Note this will fail if the source is too short or if the destination is not "
6098 #: ../fish/guestfish-actions.pod:830
6103 #: ../fish/guestfish-actions.pod:832
6111 #: ../fish/guestfish-actions.pod:834 ../src/guestfs-actions.pod:1309
6113 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6114 "destination filename or destination directory."
6118 #: ../fish/guestfish-actions.pod:837
6123 #: ../fish/guestfish-actions.pod:839
6131 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1323
6133 "This copies a file or directory from C<src> to C<dest> recursively using the "
6138 #: ../fish/guestfish-actions.pod:844
6143 #: ../fish/guestfish-actions.pod:846
6151 #: ../fish/guestfish-actions.pod:848 ../src/guestfs-actions.pod:1337
6153 "This command copies from one source device or file C<src> to another "
6154 "destination device or file C<dest>. Normally you would use this to copy to "
6155 "or from a device or partition, for example to duplicate a filesystem."
6159 #: ../fish/guestfish-actions.pod:853
6161 "If the destination is a device, it must be as large or larger than the "
6162 "source file or device, otherwise the copy will fail. This command cannot do "
6163 "partial copies (see L</copy-size>)."
6167 #: ../fish/guestfish-actions.pod:857
6172 #: ../fish/guestfish-actions.pod:859
6180 #: ../fish/guestfish-actions.pod:861 ../src/guestfs-actions.pod:1355
6181 msgid "This command runs the C<df> command to report disk space used."
6185 #: ../fish/guestfish-actions.pod:863 ../fish/guestfish-actions.pod:874
6187 "This command is mostly useful for interactive sessions. It is I<not> "
6188 "intended that you try to parse the output string. Use L</statvfs> from "
6193 #: ../fish/guestfish-actions.pod:867
6198 #: ../fish/guestfish-actions.pod:869
6206 #: ../fish/guestfish-actions.pod:871 ../src/guestfs-actions.pod:1371
6208 "This command runs the C<df -h> command to report disk space used in human-"
6213 #: ../fish/guestfish-actions.pod:878
6218 #: ../fish/guestfish-actions.pod:880
6226 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1388
6228 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6229 "This is sometimes useful for extended debugging of problems."
6233 #: ../fish/guestfish-actions.pod:886
6235 "Another way to get the same information is to enable verbose messages with "
6236 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
6237 "before running the program."
6241 #: ../fish/guestfish-actions.pod:891
6246 #: ../fish/guestfish-actions.pod:893
6249 " download remotefilename (filename|-)\n"
6254 #: ../fish/guestfish-actions.pod:895 ../fish/guestfish-actions.pod:908
6255 #: ../src/guestfs-actions.pod:1409 ../src/guestfs-actions.pod:1434
6257 "Download file C<remotefilename> and save it as C<filename> on the local "
6262 #: ../fish/guestfish-actions.pod:898 ../fish/guestfish-actions.pod:4877
6263 #: ../src/guestfs-actions.pod:1412 ../src/guestfs-actions.pod:7383
6264 msgid "C<filename> can also be a named pipe."
6268 #: ../fish/guestfish-actions.pod:900
6269 msgid "See also L</upload>, L</cat>."
6273 #: ../fish/guestfish-actions.pod:904
6274 msgid "download-offset"
6278 #: ../fish/guestfish-actions.pod:906
6281 " download-offset remotefilename (filename|-) offset size\n"
6286 #: ../fish/guestfish-actions.pod:911 ../src/guestfs-actions.pod:1437
6288 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6289 "region must be within the file or device)."
6293 #: ../fish/guestfish-actions.pod:914
6295 "Note that there is no limit on the amount of data that can be downloaded "
6296 "with this call, unlike with L</pread>, and this call always reads the full "
6297 "amount unless an error occurs."
6301 #: ../fish/guestfish-actions.pod:919
6302 msgid "See also L</download>, L</pread>."
6306 #: ../fish/guestfish-actions.pod:923
6311 #: ../fish/guestfish-actions.pod:925
6314 " drop-caches whattodrop\n"
6319 #: ../fish/guestfish-actions.pod:927 ../src/guestfs-actions.pod:1462
6321 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6322 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6323 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6327 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1467
6328 msgid "Setting C<whattodrop> to 3 should drop everything."
6332 #: ../fish/guestfish-actions.pod:934 ../src/guestfs-actions.pod:1469
6334 "This automatically calls L<sync(2)> before the operation, so that the "
6335 "maximum guest memory is freed."
6339 #: ../fish/guestfish-actions.pod:937
6344 #: ../fish/guestfish-actions.pod:939
6352 #: ../fish/guestfish-actions.pod:941 ../src/guestfs-actions.pod:1482
6354 "This command runs the C<du -s> command to estimate file space usage for "
6359 #: ../fish/guestfish-actions.pod:944 ../src/guestfs-actions.pod:1485
6361 "C<path> can be a file or a directory. If C<path> is a directory then the "
6362 "estimate includes the contents of the directory and all subdirectories "
6367 #: ../fish/guestfish-actions.pod:948 ../src/guestfs-actions.pod:1489
6369 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6373 #: ../fish/guestfish-actions.pod:951
6378 #: ../fish/guestfish-actions.pod:953
6381 " e2fsck-f device\n"
6386 #: ../fish/guestfish-actions.pod:955 ../src/guestfs-actions.pod:1507
6388 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6389 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
6394 #: ../fish/guestfish-actions.pod:959
6396 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
6397 "should use L</fsck>."
6401 #: ../fish/guestfish-actions.pod:962
6406 #: ../fish/guestfish-actions.pod:964
6409 " echo-daemon 'words ...'\n"
6414 #: ../fish/guestfish-actions.pod:966 ../src/guestfs-actions.pod:1524
6416 "This command concatenates the list of C<words> passed with single spaces "
6417 "between them and returns the resulting string."
6421 #: ../fish/guestfish-actions.pod:969 ../src/guestfs-actions.pod:1527
6422 msgid "You can use this command to test the connection through to the daemon."
6426 #: ../fish/guestfish-actions.pod:971
6427 msgid "See also L</ping-daemon>."
6431 #: ../fish/guestfish-actions.pod:973
6436 #: ../fish/guestfish-actions.pod:975
6439 " egrep regex path\n"
6444 #: ../fish/guestfish-actions.pod:977 ../src/guestfs-actions.pod:1543
6446 "This calls the external C<egrep> program and returns the matching lines."
6450 #: ../fish/guestfish-actions.pod:983
6455 #: ../fish/guestfish-actions.pod:985
6458 " egrepi regex path\n"
6463 #: ../fish/guestfish-actions.pod:987 ../src/guestfs-actions.pod:1562
6465 "This calls the external C<egrep -i> program and returns the matching lines."
6469 #: ../fish/guestfish-actions.pod:993
6474 #: ../fish/guestfish-actions.pod:995
6477 " equal file1 file2\n"
6482 #: ../fish/guestfish-actions.pod:997 ../src/guestfs-actions.pod:1581
6484 "This compares the two files C<file1> and C<file2> and returns true if their "
6485 "content is exactly equal, or false otherwise."
6489 #: ../fish/guestfish-actions.pod:1000 ../src/guestfs-actions.pod:1584
6490 msgid "The external L<cmp(1)> program is used for the comparison."
6494 #: ../fish/guestfish-actions.pod:1002
6499 #: ../fish/guestfish-actions.pod:1004
6507 #: ../fish/guestfish-actions.pod:1006 ../src/guestfs-actions.pod:1596
6509 "This returns C<true> if and only if there is a file, directory (or anything) "
6510 "with the given C<path> name."
6514 #: ../fish/guestfish-actions.pod:1009
6515 msgid "See also L</is-file>, L</is-dir>, L</stat>."
6519 #: ../fish/guestfish-actions.pod:1011
6524 #: ../fish/guestfish-actions.pod:1013
6527 " fallocate path len\n"
6532 #: ../fish/guestfish-actions.pod:1015 ../fish/guestfish-actions.pod:1034
6533 #: ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:1638
6535 "This command preallocates a file (containing zero bytes) named C<path> of "
6536 "size C<len> bytes. If the file exists already, it is overwritten."
6540 #: ../fish/guestfish-actions.pod:1019 ../src/guestfs-actions.pod:1623
6542 "Do not confuse this with the guestfish-specific C<alloc> command which "
6543 "allocates a file in the host and attaches it as a device."
6547 #: ../fish/guestfish-actions.pod:1023
6549 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
6554 #: ../fish/guestfish-actions.pod:1030
6559 #: ../fish/guestfish-actions.pod:1032
6562 " fallocate64 path len\n"
6567 #: ../fish/guestfish-actions.pod:1038
6569 "Note that this call allocates disk blocks for the file. To create a sparse "
6570 "file use L</truncate-size> instead."
6574 #: ../fish/guestfish-actions.pod:1041
6576 "The deprecated call L</fallocate> does the same, but owing to an oversight "
6577 "it only allowed 30 bit lengths to be specified, effectively limiting the "
6578 "maximum size of files created through that call to 1GB."
6582 #: ../fish/guestfish-actions.pod:1046 ../src/guestfs-actions.pod:1650
6584 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6585 "commands which create a file in the host and attach it as a device."
6589 #: ../fish/guestfish-actions.pod:1050
6594 #: ../fish/guestfish-actions.pod:1052
6597 " fgrep pattern path\n"
6602 #: ../fish/guestfish-actions.pod:1054 ../src/guestfs-actions.pod:1665
6604 "This calls the external C<fgrep> program and returns the matching lines."
6608 #: ../fish/guestfish-actions.pod:1060
6613 #: ../fish/guestfish-actions.pod:1062
6616 " fgrepi pattern path\n"
6621 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1684
6623 "This calls the external C<fgrep -i> program and returns the matching lines."
6627 #: ../fish/guestfish-actions.pod:1070
6632 #: ../fish/guestfish-actions.pod:1072
6640 #: ../fish/guestfish-actions.pod:1074 ../src/guestfs-actions.pod:1702
6642 "This call uses the standard L<file(1)> command to determine the type or "
6643 "contents of the file."
6647 #: ../fish/guestfish-actions.pod:1077 ../src/guestfs-actions.pod:1705
6649 "This call will also transparently look inside various types of compressed "
6654 #: ../fish/guestfish-actions.pod:1080 ../src/guestfs-actions.pod:1708
6656 "The exact command which runs is C<file -zb path>. Note in particular that "
6657 "the filename is not prepended to the output (the I<-b> option)."
6661 #: ../fish/guestfish-actions.pod:1084 ../src/guestfs-actions.pod:1712
6663 "The output depends on the output of the underlying L<file(1)> command and it "
6664 "can change in future in ways beyond our control. In other words, the output "
6665 "is not guaranteed by the ABI."
6669 #: ../fish/guestfish-actions.pod:1088
6671 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
6672 "(etc), L</is-zero>."
6676 #: ../fish/guestfish-actions.pod:1091
6677 msgid "file-architecture"
6681 #: ../fish/guestfish-actions.pod:1093
6684 " file-architecture filename\n"
6689 #: ../fish/guestfish-actions.pod:1095 ../src/guestfs-actions.pod:1730
6691 "This detects the architecture of the binary C<filename>, and returns it if "
6696 #: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1733
6697 msgid "Currently defined architectures are:"
6701 #: ../fish/guestfish-actions.pod:1102 ../src/guestfs-actions.pod:1737
6706 #: ../fish/guestfish-actions.pod:1104 ../src/guestfs-actions.pod:1739
6708 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6709 "irrespective of the precise processor requirements of the binary."
6713 #: ../fish/guestfish-actions.pod:1107 ../src/guestfs-actions.pod:1742
6718 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1744
6719 msgid "64 bit x86-64."
6723 #: ../fish/guestfish-actions.pod:1111 ../src/guestfs-actions.pod:1746
6728 #: ../fish/guestfish-actions.pod:1113 ../src/guestfs-actions.pod:1748
6729 msgid "32 bit SPARC."
6733 #: ../fish/guestfish-actions.pod:1115 ../src/guestfs-actions.pod:1750
6738 #: ../fish/guestfish-actions.pod:1117 ../src/guestfs-actions.pod:1752
6739 msgid "64 bit SPARC V9 and above."
6743 #: ../fish/guestfish-actions.pod:1119 ../src/guestfs-actions.pod:1754
6748 #: ../fish/guestfish-actions.pod:1121 ../src/guestfs-actions.pod:1756
6749 msgid "Intel Itanium."
6753 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1758
6758 #: ../fish/guestfish-actions.pod:1125 ../src/guestfs-actions.pod:1760
6759 msgid "32 bit Power PC."
6763 #: ../fish/guestfish-actions.pod:1127 ../src/guestfs-actions.pod:1762
6768 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1764
6769 msgid "64 bit Power PC."
6773 #: ../fish/guestfish-actions.pod:1133 ../src/guestfs-actions.pod:1768
6774 msgid "Libguestfs may return other architecture strings in future."
6778 #: ../fish/guestfish-actions.pod:1135 ../src/guestfs-actions.pod:1770
6779 msgid "The function works on at least the following types of files:"
6783 #: ../fish/guestfish-actions.pod:1141 ../src/guestfs-actions.pod:1776
6784 msgid "many types of Un*x and Linux binary"
6788 #: ../fish/guestfish-actions.pod:1145 ../src/guestfs-actions.pod:1780
6789 msgid "many types of Un*x and Linux shared library"
6793 #: ../fish/guestfish-actions.pod:1149 ../src/guestfs-actions.pod:1784
6794 msgid "Windows Win32 and Win64 binaries"
6798 #: ../fish/guestfish-actions.pod:1153 ../src/guestfs-actions.pod:1788
6799 msgid "Windows Win32 and Win64 DLLs"
6803 #: ../fish/guestfish-actions.pod:1155 ../src/guestfs-actions.pod:1790
6804 msgid "Win32 binaries and DLLs return C<i386>."
6808 #: ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1792
6809 msgid "Win64 binaries and DLLs return C<x86_64>."
6813 #: ../fish/guestfish-actions.pod:1161 ../src/guestfs-actions.pod:1796
6814 msgid "Linux kernel modules"
6818 #: ../fish/guestfish-actions.pod:1165 ../src/guestfs-actions.pod:1800
6819 msgid "Linux new-style initrd images"
6823 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1804
6824 msgid "some non-x86 Linux vmlinuz kernels"
6828 #: ../fish/guestfish-actions.pod:1173 ../src/guestfs-actions.pod:1808
6829 msgid "What it can't do currently:"
6833 #: ../fish/guestfish-actions.pod:1179 ../src/guestfs-actions.pod:1814
6834 msgid "static libraries (libfoo.a)"
6838 #: ../fish/guestfish-actions.pod:1183 ../src/guestfs-actions.pod:1818
6839 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6843 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1822
6844 msgid "x86 Linux vmlinuz kernels"
6848 #: ../fish/guestfish-actions.pod:1189 ../src/guestfs-actions.pod:1824
6850 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6851 "compressed code, and are horribly hard to unpack. If you want to find the "
6852 "architecture of a kernel, use the architecture of the associated initrd or "
6853 "kernel module(s) instead."
6857 #: ../fish/guestfish-actions.pod:1196
6862 #: ../fish/guestfish-actions.pod:1198
6870 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:1842
6871 msgid "This command returns the size of C<file> in bytes."
6875 #: ../fish/guestfish-actions.pod:1202
6877 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
6878 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
6882 #: ../fish/guestfish-actions.pod:1206
6887 #: ../fish/guestfish-actions.pod:1208
6890 " fill c len path\n"
6895 #: ../fish/guestfish-actions.pod:1210 ../src/guestfs-actions.pod:1860
6897 "This command creates a new file called C<path>. The initial content of the "
6898 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6903 #: ../fish/guestfish-actions.pod:1214
6905 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6906 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
6911 #: ../fish/guestfish-actions.pod:1219
6912 msgid "fill-pattern"
6916 #: ../fish/guestfish-actions.pod:1221
6919 " fill-pattern pattern len path\n"
6924 #: ../fish/guestfish-actions.pod:1223
6926 "This function is like L</fill> except that it creates a new file of length "
6927 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
6928 "is truncated if necessary to ensure the length of the file is exactly C<len> "
6933 #: ../fish/guestfish-actions.pod:1228
6938 #: ../fish/guestfish-actions.pod:1230
6946 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:1906
6948 "This command lists out all files and directories, recursively, starting at "
6949 "C<directory>. It is essentially equivalent to running the shell command "
6950 "C<find directory -print> but some post-processing happens on the output, "
6955 #: ../fish/guestfish-actions.pod:1237 ../src/guestfs-actions.pod:1911
6957 "This returns a list of strings I<without any prefix>. Thus if the directory "
6962 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:1914
6972 #: ../fish/guestfish-actions.pod:1244
6973 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
6977 #: ../fish/guestfish-actions.pod:1247 ../src/guestfs-actions.pod:1921
6988 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:1926
6989 msgid "If C<directory> is not a directory, then this command returns an error."
6993 #: ../fish/guestfish-actions.pod:1255 ../src/guestfs-actions.pod:1929
6994 msgid "The returned list is sorted."
6998 #: ../fish/guestfish-actions.pod:1257
6999 msgid "See also L</find0>."
7003 #: ../fish/guestfish-actions.pod:1262
7008 #: ../fish/guestfish-actions.pod:1264
7011 " find0 directory (files|-)\n"
7016 #: ../fish/guestfish-actions.pod:1266 ../src/guestfs-actions.pod:1949
7018 "This command lists out all files and directories, recursively, starting at "
7019 "C<directory>, placing the resulting list in the external file called "
7024 #: ../fish/guestfish-actions.pod:1270
7026 "This command works the same way as L</find> with the following exceptions:"
7030 #: ../fish/guestfish-actions.pod:1277 ../src/guestfs-actions.pod:1960
7031 msgid "The resulting list is written to an external file."
7035 #: ../fish/guestfish-actions.pod:1281 ../src/guestfs-actions.pod:1964
7037 "Items (filenames) in the result are separated by C<\\0> characters. See "
7038 "L<find(1)> option I<-print0>."
7042 #: ../fish/guestfish-actions.pod:1286 ../src/guestfs-actions.pod:1969
7043 msgid "This command is not limited in the number of names that it can return."
7047 #: ../fish/guestfish-actions.pod:1291 ../src/guestfs-actions.pod:1974
7048 msgid "The result list is not sorted."
7052 #: ../fish/guestfish-actions.pod:1297
7053 msgid "findfs-label"
7057 #: ../fish/guestfish-actions.pod:1299
7060 " findfs-label label\n"
7065 #: ../fish/guestfish-actions.pod:1301 ../src/guestfs-actions.pod:1988
7067 "This command searches the filesystems and returns the one which has the "
7068 "given label. An error is returned if no such filesystem can be found."
7072 #: ../fish/guestfish-actions.pod:1305
7073 msgid "To find the label of a filesystem, use L</vfs-label>."
7077 #: ../fish/guestfish-actions.pod:1307
7082 #: ../fish/guestfish-actions.pod:1309
7085 " findfs-uuid uuid\n"
7090 #: ../fish/guestfish-actions.pod:1311 ../src/guestfs-actions.pod:2005
7092 "This command searches the filesystems and returns the one which has the "
7093 "given UUID. An error is returned if no such filesystem can be found."
7097 #: ../fish/guestfish-actions.pod:1315
7098 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
7102 #: ../fish/guestfish-actions.pod:1317
7107 #: ../fish/guestfish-actions.pod:1319
7110 " fsck fstype device\n"
7115 #: ../fish/guestfish-actions.pod:1321 ../src/guestfs-actions.pod:2023
7117 "This runs the filesystem checker (fsck) on C<device> which should have "
7118 "filesystem type C<fstype>."
7122 #: ../fish/guestfish-actions.pod:1324 ../src/guestfs-actions.pod:2026
7124 "The returned integer is the status. See L<fsck(8)> for the list of status "
7125 "codes from C<fsck>."
7129 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2035
7130 msgid "Multiple status codes can be summed together."
7134 #: ../fish/guestfish-actions.pod:1337 ../src/guestfs-actions.pod:2039
7136 "A non-zero return code can mean \"success\", for example if errors have been "
7137 "corrected on the filesystem."
7141 #: ../fish/guestfish-actions.pod:1342 ../src/guestfs-actions.pod:2044
7142 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7146 #: ../fish/guestfish-actions.pod:1347 ../src/guestfs-actions.pod:2049
7148 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7152 #: ../fish/guestfish-actions.pod:1349
7157 #: ../fish/guestfish-actions.pod:1351
7165 #: ../fish/guestfish-actions.pod:1353 ../src/guestfs-actions.pod:2060
7167 "Return the additional kernel options which are added to the guest kernel "
7172 #: ../fish/guestfish-actions.pod:1356 ../src/guestfs-actions.pod:2063
7173 msgid "If C<NULL> then no options are added."
7177 #: ../fish/guestfish-actions.pod:1358
7178 msgid "get-attach-method"
7182 #: ../fish/guestfish-actions.pod:1360
7185 " get-attach-method\n"
7190 #: ../fish/guestfish-actions.pod:1362
7191 msgid "Return the current attach method. See L</set-attach-method>."
7195 #: ../fish/guestfish-actions.pod:1364
7196 msgid "get-autosync"
7200 #: ../fish/guestfish-actions.pod:1366
7208 #: ../fish/guestfish-actions.pod:1368 ../src/guestfs-actions.pod:2088
7209 msgid "Get the autosync flag."
7213 #: ../fish/guestfish-actions.pod:1370
7218 #: ../fish/guestfish-actions.pod:1372
7226 #: ../fish/guestfish-actions.pod:1374 ../src/guestfs-actions.pod:2099
7227 msgid "Return the direct appliance mode flag."
7231 #: ../fish/guestfish-actions.pod:1376
7236 #: ../fish/guestfish-actions.pod:1378
7239 " get-e2label device\n"
7244 #: ../fish/guestfish-actions.pod:1380 ../src/guestfs-actions.pod:2118
7246 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7250 #: ../fish/guestfish-actions.pod:1383
7252 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
7257 #: ../fish/guestfish-actions.pod:1390
7262 #: ../fish/guestfish-actions.pod:1392
7265 " get-e2uuid device\n"
7270 #: ../fish/guestfish-actions.pod:1394 ../src/guestfs-actions.pod:2139
7272 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7276 #: ../fish/guestfish-actions.pod:1397
7278 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
7283 #: ../fish/guestfish-actions.pod:1404
7288 #: ../fish/guestfish-actions.pod:1406
7296 #: ../fish/guestfish-actions.pod:1408 ../src/guestfs-actions.pod:2152
7298 "This gets the memory size in megabytes allocated to the qemu subprocess."
7302 #: ../fish/guestfish-actions.pod:1411
7304 "If L</set-memsize> was not called on this handle, and if "
7305 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7306 "value for memsize."
7310 #: ../fish/guestfish-actions.pod:1415 ../fish/guestfish-actions.pod:1472
7311 #: ../fish/guestfish-actions.pod:4225 ../fish/guestfish-actions.pod:4327
7312 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:2251
7313 #: ../src/guestfs-actions.pod:6430 ../src/guestfs-actions.pod:6556
7315 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7319 #: ../fish/guestfish-actions.pod:1418
7324 #: ../fish/guestfish-actions.pod:1420
7332 #: ../fish/guestfish-actions.pod:1422 ../src/guestfs-actions.pod:2171
7333 msgid "This returns the enable network flag."
7337 #: ../fish/guestfish-actions.pod:1424
7342 #: ../fish/guestfish-actions.pod:1426
7350 #: ../fish/guestfish-actions.pod:1428 ../src/guestfs-actions.pod:2182
7351 msgid "Return the current search path."
7355 #: ../fish/guestfish-actions.pod:1430 ../src/guestfs-actions.pod:2184
7357 "This is always non-NULL. If it wasn't set already, then this will return "
7362 #: ../fish/guestfish-actions.pod:1433
7367 #: ../fish/guestfish-actions.pod:1435
7375 #: ../fish/guestfish-actions.pod:1437 ../src/guestfs-actions.pod:2197
7376 msgid "This returns the process group flag."
7380 #: ../fish/guestfish-actions.pod:1439
7385 #: ../fish/guestfish-actions.pod:1441
7390 #: ../fish/guestfish-actions.pod:1443
7398 #: ../fish/guestfish-actions.pod:1445 ../src/guestfs-actions.pod:2208
7400 "Return the process ID of the qemu subprocess. If there is no qemu "
7401 "subprocess, then this will return an error."
7405 #: ../fish/guestfish-actions.pod:1448 ../src/guestfs-actions.pod:2211
7406 msgid "This is an internal call used for debugging and testing."
7410 #: ../fish/guestfish-actions.pod:1450
7415 #: ../fish/guestfish-actions.pod:1452
7423 #: ../fish/guestfish-actions.pod:1454 ../src/guestfs-actions.pod:2222
7424 msgid "Return the current qemu binary."
7428 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2224
7430 "This is always non-NULL. If it wasn't set already, then this will return "
7431 "the default qemu binary name."
7435 #: ../fish/guestfish-actions.pod:1459
7436 msgid "get-recovery-proc"
7440 #: ../fish/guestfish-actions.pod:1461
7443 " get-recovery-proc\n"
7448 #: ../fish/guestfish-actions.pod:1463 ../src/guestfs-actions.pod:2237
7449 msgid "Return the recovery process enabled flag."
7453 #: ../fish/guestfish-actions.pod:1465
7458 #: ../fish/guestfish-actions.pod:1467
7466 #: ../fish/guestfish-actions.pod:1469
7468 "This returns the current setting of the selinux flag which is passed to the "
7469 "appliance at boot time. See L</set-selinux>."
7473 #: ../fish/guestfish-actions.pod:1475
7478 #: ../fish/guestfish-actions.pod:1477
7486 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2263
7487 msgid "This returns the number of virtual CPUs assigned to the appliance."
7491 #: ../fish/guestfish-actions.pod:1481
7496 #: ../fish/guestfish-actions.pod:1483
7504 #: ../fish/guestfish-actions.pod:1485 ../src/guestfs-actions.pod:2272
7506 "This returns the current state as an opaque integer. This is only useful "
7507 "for printing debug and internal error messages."
7511 #: ../fish/guestfish-actions.pod:1488 ../fish/guestfish-actions.pod:2434
7512 #: ../fish/guestfish-actions.pod:2452 ../fish/guestfish-actions.pod:2490
7513 #: ../fish/guestfish-actions.pod:2506 ../src/guestfs-actions.pod:2275
7514 #: ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:3610
7515 #: ../src/guestfs-actions.pod:3671 ../src/guestfs-actions.pod:3698
7516 msgid "For more information on states, see L<guestfs(3)>."
7520 #: ../fish/guestfish-actions.pod:1490
7525 #: ../fish/guestfish-actions.pod:1492
7533 #: ../fish/guestfish-actions.pod:1494 ../src/guestfs-actions.pod:2286
7534 msgid "Return the command trace flag."
7538 #: ../fish/guestfish-actions.pod:1496
7543 #: ../fish/guestfish-actions.pod:1498
7551 #: ../fish/guestfish-actions.pod:1500
7553 "Return the current umask. By default the umask is C<022> unless it has been "
7554 "set by calling L</umask>."
7558 #: ../fish/guestfish-actions.pod:1503
7563 #: ../fish/guestfish-actions.pod:1505
7571 #: ../fish/guestfish-actions.pod:1507 ../src/guestfs-actions.pod:2309
7572 msgid "This returns the verbose messages flag."
7576 #: ../fish/guestfish-actions.pod:1509
7581 #: ../fish/guestfish-actions.pod:1511
7589 #: ../fish/guestfish-actions.pod:1513 ../src/guestfs-actions.pod:2320
7590 msgid "This gets the SELinux security context of the daemon."
7594 #: ../fish/guestfish-actions.pod:1515
7595 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
7599 #: ../fish/guestfish-actions.pod:1518
7604 #: ../fish/guestfish-actions.pod:1520
7607 " getxattr path name\n"
7612 #: ../fish/guestfish-actions.pod:1522
7614 "Get a single extended attribute from file C<path> named C<name>. This call "
7615 "follows symlinks. If you want to lookup an extended attribute for the "
7616 "symlink itself, use L</lgetxattr>."
7620 #: ../fish/guestfish-actions.pod:1526 ../fish/guestfish-actions.pod:2579
7622 "Normally it is better to get all extended attributes from a file in one go "
7623 "by calling L</getxattrs>. However some Linux filesystem implementations are "
7624 "buggy and do not provide a way to list out attributes. For these "
7625 "filesystems (notably ntfs-3g) you have to know the names of the extended "
7626 "attributes you want in advance and call this function."
7630 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:2586
7631 #: ../src/guestfs-actions.pod:2349 ../src/guestfs-actions.pod:3831
7633 "Extended attribute values are blobs of binary data. If there is no extended "
7634 "attribute named C<name>, this returns an error."
7638 #: ../fish/guestfish-actions.pod:1536
7639 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
7643 #: ../fish/guestfish-actions.pod:1538
7648 #: ../fish/guestfish-actions.pod:1540
7656 #: ../fish/guestfish-actions.pod:1542 ../src/guestfs-actions.pod:2366
7658 "This call lists the extended attributes of the file or directory C<path>."
7662 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2369
7664 "At the system call level, this is a combination of the L<listxattr(2)> and "
7665 "L<getxattr(2)> calls."
7669 #: ../fish/guestfish-actions.pod:1548
7670 msgid "See also: L</lgetxattrs>, L<attr(5)>."
7674 #: ../fish/guestfish-actions.pod:1550
7679 #: ../fish/guestfish-actions.pod:1552
7682 " glob-expand pattern\n"
7687 #: ../fish/guestfish-actions.pod:1554 ../src/guestfs-actions.pod:2386
7689 "This command searches for all the pathnames matching C<pattern> according to "
7690 "the wildcard expansion rules used by the shell."
7694 #: ../fish/guestfish-actions.pod:1558 ../src/guestfs-actions.pod:2390
7696 "If no paths match, then this returns an empty list (note: not an error)."
7700 #: ../fish/guestfish-actions.pod:1561 ../src/guestfs-actions.pod:2393
7702 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
7703 "GLOB_BRACE>. See that manual page for more details."
7707 #: ../fish/guestfish-actions.pod:1565
7712 #: ../fish/guestfish-actions.pod:1567
7715 " grep regex path\n"
7720 #: ../fish/guestfish-actions.pod:1569 ../src/guestfs-actions.pod:2410
7721 msgid "This calls the external C<grep> program and returns the matching lines."
7725 #: ../fish/guestfish-actions.pod:1575
7730 #: ../fish/guestfish-actions.pod:1577
7733 " grepi regex path\n"
7738 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2429
7740 "This calls the external C<grep -i> program and returns the matching lines."
7744 #: ../fish/guestfish-actions.pod:1585
7745 msgid "grub-install"
7749 #: ../fish/guestfish-actions.pod:1587
7752 " grub-install root device\n"
7757 #: ../fish/guestfish-actions.pod:1589 ../src/guestfs-actions.pod:2448
7759 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
7760 "with the root directory being C<root>."
7764 #: ../fish/guestfish-actions.pod:1598 ../src/guestfs-actions.pod:2457
7766 "There is currently no way in the API to install grub2, which is used by most "
7767 "modern Linux guests. It is possible to run the grub2 command from the "
7768 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
7772 #: ../fish/guestfish-actions.pod:1605 ../src/guestfs-actions.pod:2464
7774 "This uses C<grub-install> from the host. Unfortunately grub is not always "
7775 "compatible with itself, so this only works in rather narrow circumstances. "
7776 "Careful testing with each guest version is advisable."
7780 #: ../fish/guestfish-actions.pod:1612 ../src/guestfs-actions.pod:2471
7782 "If grub-install reports the error \"No suitable drive was found in the "
7783 "generated device map.\" it may be that you need to create a C</boot/grub/"
7784 "device.map> file first that contains the mapping between grub device names "
7785 "and Linux device names. It is usually sufficient to create a file "
7790 #: ../fish/guestfish-actions.pod:1619 ../src/guestfs-actions.pod:2478
7798 #: ../fish/guestfish-actions.pod:1621 ../src/guestfs-actions.pod:2480
7799 msgid "replacing C</dev/vda> with the name of the installation device."
7803 #: ../fish/guestfish-actions.pod:1625
7808 #: ../fish/guestfish-actions.pod:1627
7816 #: ../fish/guestfish-actions.pod:1629 ../src/guestfs-actions.pod:2494
7818 "This command returns up to the first 10 lines of a file as a list of strings."
7822 #: ../fish/guestfish-actions.pod:1635
7827 #: ../fish/guestfish-actions.pod:1637
7830 " head-n nrlines path\n"
7835 #: ../fish/guestfish-actions.pod:1639 ../src/guestfs-actions.pod:2513
7837 "If the parameter C<nrlines> is a positive number, this returns the first "
7838 "C<nrlines> lines of the file C<path>."
7842 #: ../fish/guestfish-actions.pod:1642 ../src/guestfs-actions.pod:2516
7844 "If the parameter C<nrlines> is a negative number, this returns lines from "
7845 "the file C<path>, excluding the last C<nrlines> lines."
7849 #: ../fish/guestfish-actions.pod:1645 ../fish/guestfish-actions.pod:4717
7850 #: ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:7142
7851 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7855 #: ../fish/guestfish-actions.pod:1650
7860 #: ../fish/guestfish-actions.pod:1652
7868 #: ../fish/guestfish-actions.pod:1654 ../src/guestfs-actions.pod:2536
7870 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
7871 "readable, canonical hex dump of the file."
7875 #: ../fish/guestfish-actions.pod:1660
7880 #: ../fish/guestfish-actions.pod:1662
7883 " initrd-cat initrdpath filename\n"
7888 #: ../fish/guestfish-actions.pod:1664 ../src/guestfs-actions.pod:2555
7890 "This command unpacks the file C<filename> from the initrd file called "
7891 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7896 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2559
7898 "For example, in guestfish you could use the following command to examine the "
7899 "boot script (usually called C</init>) contained in a Linux initrd or "
7904 #: ../fish/guestfish-actions.pod:1672 ../src/guestfs-actions.pod:2563
7907 " initrd-cat /boot/initrd-<version>.img init\n"
7912 #: ../fish/guestfish-actions.pod:1674
7913 msgid "See also L</initrd-list>."
7917 #: ../fish/guestfish-actions.pod:1679
7922 #: ../fish/guestfish-actions.pod:1681
7925 " initrd-list path\n"
7930 #: ../fish/guestfish-actions.pod:1683 ../src/guestfs-actions.pod:2582
7931 msgid "This command lists out files contained in an initrd."
7935 #: ../fish/guestfish-actions.pod:1685 ../src/guestfs-actions.pod:2584
7937 "The files are listed without any initial C</> character. The files are "
7938 "listed in the order they appear (not necessarily alphabetical). Directory "
7939 "names are listed as separate items."
7943 #: ../fish/guestfish-actions.pod:1689 ../src/guestfs-actions.pod:2588
7945 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7946 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7951 #: ../fish/guestfish-actions.pod:1693
7952 msgid "inotify-add-watch"
7956 #: ../fish/guestfish-actions.pod:1695
7959 " inotify-add-watch path mask\n"
7964 #: ../fish/guestfish-actions.pod:1697 ../src/guestfs-actions.pod:2605
7965 msgid "Watch C<path> for the events listed in C<mask>."
7969 #: ../fish/guestfish-actions.pod:1699 ../src/guestfs-actions.pod:2607
7971 "Note that if C<path> is a directory then events within that directory are "
7972 "watched, but this does I<not> happen recursively (in subdirectories)."
7976 #: ../fish/guestfish-actions.pod:1703 ../src/guestfs-actions.pod:2611
7978 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7979 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7983 #: ../fish/guestfish-actions.pod:1707
7984 msgid "inotify-close"
7988 #: ../fish/guestfish-actions.pod:1709
7996 #: ../fish/guestfish-actions.pod:1711 ../src/guestfs-actions.pod:2624
7998 "This closes the inotify handle which was previously opened by inotify_init. "
7999 "It removes all watches, throws away any pending events, and deallocates all "
8004 #: ../fish/guestfish-actions.pod:1715
8005 msgid "inotify-files"
8009 #: ../fish/guestfish-actions.pod:1717
8017 #: ../fish/guestfish-actions.pod:1719
8019 "This function is a helpful wrapper around L</inotify-read> which just "
8020 "returns a list of pathnames of objects that were touched. The returned "
8021 "pathnames are sorted and deduplicated."
8025 #: ../fish/guestfish-actions.pod:1723
8026 msgid "inotify-init"
8030 #: ../fish/guestfish-actions.pod:1725
8033 " inotify-init maxevents\n"
8038 #: ../fish/guestfish-actions.pod:1727 ../src/guestfs-actions.pod:2653
8040 "This command creates a new inotify handle. The inotify subsystem can be "
8041 "used to notify events which happen to objects in the guest filesystem."
8045 #: ../fish/guestfish-actions.pod:1731
8047 "C<maxevents> is the maximum number of events which will be queued up between "
8048 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
8049 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
8050 "default was 16384 events. Beyond this limit, the kernel throws away events, "
8051 "but records the fact that it threw them away by setting a flag "
8052 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
8056 #: ../fish/guestfish-actions.pod:1741
8058 "Before any events are generated, you have to add some watches to the "
8059 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
8060 "L</inotify-watch-all>."
8064 #: ../fish/guestfish-actions.pod:1747
8066 "Queued up events should be read periodically by calling L</inotify-read> (or "
8067 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
8068 "If you don't read the events out often enough then you risk the internal "
8069 "queue overflowing."
8073 #: ../fish/guestfish-actions.pod:1754
8075 "The handle should be closed after use by calling L</inotify-close>. This "
8076 "also removes any watches automatically."
8080 #: ../fish/guestfish-actions.pod:1758 ../src/guestfs-actions.pod:2684
8082 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8083 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8084 "that there is one global inotify handle per libguestfs instance."
8088 #: ../fish/guestfish-actions.pod:1763
8089 msgid "inotify-read"
8093 #: ../fish/guestfish-actions.pod:1765
8101 #: ../fish/guestfish-actions.pod:1767 ../src/guestfs-actions.pod:2698
8103 "Return the complete queue of events that have happened since the previous "
8108 #: ../fish/guestfish-actions.pod:1770 ../src/guestfs-actions.pod:2701
8109 msgid "If no events have happened, this returns an empty list."
8113 #: ../fish/guestfish-actions.pod:1772 ../src/guestfs-actions.pod:2703
8115 "I<Note>: In order to make sure that all events have been read, you must call "
8116 "this function repeatedly until it returns an empty list. The reason is that "
8117 "the call will read events up to the maximum appliance-to-host message size "
8118 "and leave remaining events in the queue."
8122 #: ../fish/guestfish-actions.pod:1778
8123 msgid "inotify-rm-watch"
8127 #: ../fish/guestfish-actions.pod:1780
8130 " inotify-rm-watch wd\n"
8135 #: ../fish/guestfish-actions.pod:1782
8136 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
8140 #: ../fish/guestfish-actions.pod:1785
8141 msgid "inspect-get-arch"
8145 #: ../fish/guestfish-actions.pod:1787
8148 " inspect-get-arch root\n"
8153 #: ../fish/guestfish-actions.pod:1789
8155 "This returns the architecture of the inspected operating system. The "
8156 "possible return values are listed under L</file-architecture>."
8160 #: ../fish/guestfish-actions.pod:1793 ../src/guestfs-actions.pod:2738
8162 "If the architecture could not be determined, then the string C<unknown> is "
8167 #: ../fish/guestfish-actions.pod:1796 ../fish/guestfish-actions.pod:1883
8168 #: ../fish/guestfish-actions.pod:1962 ../fish/guestfish-actions.pod:1974
8169 #: ../fish/guestfish-actions.pod:2058 ../fish/guestfish-actions.pod:2119
8170 #: ../fish/guestfish-actions.pod:2140 ../fish/guestfish-actions.pod:2154
8171 #: ../fish/guestfish-actions.pod:2194 ../fish/guestfish-actions.pod:2226
8172 #: ../fish/guestfish-actions.pod:2239 ../fish/guestfish-actions.pod:2252
8173 #: ../fish/guestfish-actions.pod:2262 ../fish/guestfish-actions.pod:2272
8174 #: ../fish/guestfish-actions.pod:2284 ../fish/guestfish-actions.pod:2380
8175 #: ../fish/guestfish-actions.pod:2414 ../src/guestfs-actions.pod:2741
8176 #: ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2939
8177 #: ../src/guestfs-actions.pod:2958 ../src/guestfs-actions.pod:3089
8178 #: ../src/guestfs-actions.pod:3172 ../src/guestfs-actions.pod:3200
8179 #: ../src/guestfs-actions.pod:3221 ../src/guestfs-actions.pod:3274
8180 #: ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3334
8181 #: ../src/guestfs-actions.pod:3354 ../src/guestfs-actions.pod:3371
8182 #: ../src/guestfs-actions.pod:3387 ../src/guestfs-actions.pod:3405
8183 #: ../src/guestfs-actions.pod:3507 ../src/guestfs-actions.pod:3548
8184 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8188 #: ../fish/guestfish-actions.pod:1798
8189 msgid "inspect-get-distro"
8193 #: ../fish/guestfish-actions.pod:1800
8196 " inspect-get-distro root\n"
8201 #: ../fish/guestfish-actions.pod:1802 ../src/guestfs-actions.pod:2754
8203 "This returns the distro (distribution) of the inspected operating system."
8207 #: ../fish/guestfish-actions.pod:1805 ../src/guestfs-actions.pod:2757
8208 msgid "Currently defined distros are:"
8212 #: ../fish/guestfish-actions.pod:1809 ../src/guestfs-actions.pod:2761
8213 msgid "\"archlinux\""
8217 #: ../fish/guestfish-actions.pod:1811 ../src/guestfs-actions.pod:2763
8222 #: ../fish/guestfish-actions.pod:1813 ../src/guestfs-actions.pod:2765
8227 #: ../fish/guestfish-actions.pod:1815 ../src/guestfs-actions.pod:2767
8232 #: ../fish/guestfish-actions.pod:1817 ../src/guestfs-actions.pod:2769
8237 #: ../fish/guestfish-actions.pod:1819 ../src/guestfs-actions.pod:2771
8242 #: ../fish/guestfish-actions.pod:1821 ../src/guestfs-actions.pod:2773
8247 #: ../fish/guestfish-actions.pod:1823 ../src/guestfs-actions.pod:2775
8252 #: ../fish/guestfish-actions.pod:1825 ../src/guestfs-actions.pod:2777
8257 #: ../fish/guestfish-actions.pod:1827 ../src/guestfs-actions.pod:2779
8262 #: ../fish/guestfish-actions.pod:1829 ../src/guestfs-actions.pod:2781
8263 msgid "\"linuxmint\""
8267 #: ../fish/guestfish-actions.pod:1831 ../src/guestfs-actions.pod:2783
8272 #: ../fish/guestfish-actions.pod:1833 ../src/guestfs-actions.pod:2785
8273 msgid "\"mandriva\""
8277 #: ../fish/guestfish-actions.pod:1835 ../src/guestfs-actions.pod:2787
8282 #: ../fish/guestfish-actions.pod:1837 ../src/guestfs-actions.pod:2789
8287 #: ../fish/guestfish-actions.pod:1839 ../src/guestfs-actions.pod:2791
8292 #: ../fish/guestfish-actions.pod:1841 ../src/guestfs-actions.pod:2793
8297 #: ../fish/guestfish-actions.pod:1843 ../src/guestfs-actions.pod:2795
8302 #: ../fish/guestfish-actions.pod:1845 ../src/guestfs-actions.pod:2797
8303 msgid "\"redhat-based\""
8307 #: ../fish/guestfish-actions.pod:1847 ../src/guestfs-actions.pod:2799
8308 msgid "Some Red Hat-derived distro."
8312 #: ../fish/guestfish-actions.pod:1849 ../src/guestfs-actions.pod:2801
8317 #: ../fish/guestfish-actions.pod:1851 ../src/guestfs-actions.pod:2803
8318 msgid "Red Hat Enterprise Linux."
8322 #: ../fish/guestfish-actions.pod:1853 ../src/guestfs-actions.pod:2805
8323 msgid "\"scientificlinux\""
8327 #: ../fish/guestfish-actions.pod:1855 ../src/guestfs-actions.pod:2807
8328 msgid "Scientific Linux."
8332 #: ../fish/guestfish-actions.pod:1857 ../src/guestfs-actions.pod:2809
8333 msgid "\"slackware\""
8337 #: ../fish/guestfish-actions.pod:1859 ../src/guestfs-actions.pod:2811
8342 #: ../fish/guestfish-actions.pod:1861 ../src/guestfs-actions.pod:2813
8343 msgid "\"ttylinux\""
8347 #: ../fish/guestfish-actions.pod:1863 ../src/guestfs-actions.pod:2815
8352 #: ../fish/guestfish-actions.pod:1865 ../src/guestfs-actions.pod:2817
8357 #: ../fish/guestfish-actions.pod:1867 ../src/guestfs-actions.pod:2819
8362 #: ../fish/guestfish-actions.pod:1869 ../fish/guestfish-actions.pod:1953
8363 #: ../fish/guestfish-actions.pod:2217 ../src/guestfs-actions.pod:2821
8364 #: ../src/guestfs-actions.pod:2930 ../src/guestfs-actions.pod:3305
8369 #: ../fish/guestfish-actions.pod:1871 ../src/guestfs-actions.pod:2823
8370 msgid "The distro could not be determined."
8374 #: ../fish/guestfish-actions.pod:1873 ../fish/guestfish-actions.pod:2209
8375 #: ../src/guestfs-actions.pod:2825 ../src/guestfs-actions.pod:3297
8380 #: ../fish/guestfish-actions.pod:1875 ../src/guestfs-actions.pod:2827
8382 "Windows does not have distributions. This string is returned if the OS type "
8387 #: ../fish/guestfish-actions.pod:1880 ../fish/guestfish-actions.pod:1959
8388 #: ../fish/guestfish-actions.pod:2223 ../src/guestfs-actions.pod:2832
8389 #: ../src/guestfs-actions.pod:2936 ../src/guestfs-actions.pod:3311
8391 "Future versions of libguestfs may return other strings here. The caller "
8392 "should be prepared to handle any string."
8396 #: ../fish/guestfish-actions.pod:1885
8397 msgid "inspect-get-drive-mappings"
8401 #: ../fish/guestfish-actions.pod:1887
8404 " inspect-get-drive-mappings root\n"
8409 #: ../fish/guestfish-actions.pod:1889 ../src/guestfs-actions.pod:2848
8411 "This call is useful for Windows which uses a primitive system of assigning "
8412 "drive letters (like \"C:\") to partitions. This inspection API examines the "
8413 "Windows Registry to find out how disks/partitions are mapped to drive "
8414 "letters, and returns a hash table as in the example below:"
8418 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:2854
8428 #: ../fish/guestfish-actions.pod:1899 ../src/guestfs-actions.pod:2858
8430 "Note that keys are drive letters. For Windows, the key is case insensitive "
8431 "and just contains the drive letter, without the customary colon separator "
8436 #: ../fish/guestfish-actions.pod:1903 ../src/guestfs-actions.pod:2862
8438 "In future we may support other operating systems that also used drive "
8439 "letters, but the keys for those might not be case insensitive and might be "
8440 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
8445 #: ../fish/guestfish-actions.pod:1908 ../src/guestfs-actions.pod:2867
8447 "For Windows guests, currently only hard drive mappings are returned. "
8448 "Removable disks (eg. DVD-ROMs) are ignored."
8452 #: ../fish/guestfish-actions.pod:1911 ../src/guestfs-actions.pod:2870
8454 "For guests that do not use drive mappings, or if the drive mappings could "
8455 "not be determined, this returns an empty hash table."
8459 #: ../fish/guestfish-actions.pod:1914
8461 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8462 "get-mountpoints>, L</inspect-get-filesystems>."
8466 #: ../fish/guestfish-actions.pod:1918
8467 msgid "inspect-get-filesystems"
8471 #: ../fish/guestfish-actions.pod:1920
8474 " inspect-get-filesystems root\n"
8479 #: ../fish/guestfish-actions.pod:1922 ../src/guestfs-actions.pod:2891
8481 "This returns a list of all the filesystems that we think are associated with "
8482 "this operating system. This includes the root filesystem, other ordinary "
8483 "filesystems, and non-mounted devices like swap partitions."
8487 #: ../fish/guestfish-actions.pod:1927 ../src/guestfs-actions.pod:2896
8489 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8490 "to be shared between operating systems."
8494 #: ../fish/guestfish-actions.pod:1930
8496 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8501 #: ../fish/guestfish-actions.pod:1933
8502 msgid "inspect-get-format"
8506 #: ../fish/guestfish-actions.pod:1935
8509 " inspect-get-format root\n"
8514 #: ../fish/guestfish-actions.pod:1937 ../src/guestfs-actions.pod:2914
8516 "This returns the format of the inspected operating system. You can use it "
8517 "to detect install images, live CDs and similar."
8521 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:2917
8522 msgid "Currently defined formats are:"
8526 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:2921
8527 msgid "\"installed\""
8531 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:2923
8532 msgid "This is an installed operating system."
8536 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:2925
8537 msgid "\"installer\""
8541 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:2927
8543 "The disk image being inspected is not an installed operating system, but a "
8544 "I<bootable> install disk, live CD, or similar."
8548 #: ../fish/guestfish-actions.pod:1955 ../src/guestfs-actions.pod:2932
8549 msgid "The format of this disk image is not known."
8553 #: ../fish/guestfish-actions.pod:1964
8554 msgid "inspect-get-hostname"
8558 #: ../fish/guestfish-actions.pod:1966
8561 " inspect-get-hostname root\n"
8566 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:2952
8568 "This function returns the hostname of the operating system as found by "
8569 "inspection of the guest's configuration files."
8573 #: ../fish/guestfish-actions.pod:1971 ../src/guestfs-actions.pod:2955
8575 "If the hostname could not be determined, then the string C<unknown> is "
8580 #: ../fish/guestfish-actions.pod:1976
8581 msgid "inspect-get-icon"
8585 #: ../fish/guestfish-actions.pod:1978
8588 " inspect-get-icon root [favicon:..] [highquality:..]\n"
8593 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:2981
8595 "This function returns an icon corresponding to the inspected operating "
8596 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
8597 "to PNG if necessary)."
8601 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:2985
8603 "If it was not possible to get an icon this function returns a zero-length "
8604 "(non-NULL) buffer. I<Callers must check for this case>."
8608 #: ../fish/guestfish-actions.pod:1987 ../src/guestfs-actions.pod:2988
8610 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
8611 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
8612 "this file will be returned. You can disable favicons by passing the "
8613 "optional C<favicon> boolean as false (default is true)."
8617 #: ../fish/guestfish-actions.pod:1993 ../src/guestfs-actions.pod:2994
8619 "If finding the favicon fails, then we look in other places in the guest for "
8624 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:2997
8626 "If the optional C<highquality> boolean is true then only high quality icons "
8627 "are returned, which means only icons of high resolution with an alpha "
8628 "channel. The default (false) is to return any icon we can, even if it is of "
8629 "substandard quality."
8633 #: ../fish/guestfish-actions.pod:2007 ../src/guestfs-actions.pod:3008
8635 "Unlike most other inspection API calls, the guest's disks must be mounted up "
8636 "before you call this, since it needs to read information from the guest "
8637 "filesystem during the call."
8641 #: ../fish/guestfish-actions.pod:2013 ../src/guestfs-actions.pod:3014
8643 "B<Security:> The icon data comes from the untrusted guest, and should be "
8644 "treated with caution. PNG files have been known to contain exploits. "
8645 "Ensure that libpng (or other relevant libraries) are fully up to date before "
8646 "trying to process or display the icon."
8650 #: ../fish/guestfish-actions.pod:2021 ../src/guestfs-actions.pod:3022
8652 "The PNG image returned can be any size. It might not be square. Libguestfs "
8653 "tries to return the largest, highest quality icon available. The "
8654 "application must scale the icon to the required size."
8658 #: ../fish/guestfish-actions.pod:2028 ../src/guestfs-actions.pod:3029
8660 "Extracting icons from Windows guests requires the external C<wrestool> "
8661 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
8662 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
8663 "installed separately."
8667 #: ../fish/guestfish-actions.pod:2035 ../src/guestfs-actions.pod:3036
8669 "Operating system icons are usually trademarks. Seek legal advice before "
8670 "using trademarks in applications."
8674 #: ../fish/guestfish-actions.pod:2042
8675 msgid "inspect-get-major-version"
8679 #: ../fish/guestfish-actions.pod:2044
8682 " inspect-get-major-version root\n"
8687 #: ../fish/guestfish-actions.pod:2046 ../src/guestfs-actions.pod:3077
8689 "This returns the major version number of the inspected operating system."
8693 #: ../fish/guestfish-actions.pod:2049 ../src/guestfs-actions.pod:3080
8695 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8696 "popular public names used by the operating system. Notably the operating "
8697 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8698 "1). You can find out the real versions corresponding to releases of Windows "
8699 "by consulting Wikipedia or MSDN."
8703 #: ../fish/guestfish-actions.pod:2056 ../fish/guestfish-actions.pod:2067
8704 #: ../src/guestfs-actions.pod:3087 ../src/guestfs-actions.pod:3104
8705 msgid "If the version could not be determined, then C<0> is returned."
8709 #: ../fish/guestfish-actions.pod:2060
8710 msgid "inspect-get-minor-version"
8714 #: ../fish/guestfish-actions.pod:2062
8717 " inspect-get-minor-version root\n"
8722 #: ../fish/guestfish-actions.pod:2064 ../src/guestfs-actions.pod:3101
8724 "This returns the minor version number of the inspected operating system."
8728 #: ../fish/guestfish-actions.pod:2069
8730 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8731 "get-major-version>."
8735 #: ../fish/guestfish-actions.pod:2072
8736 msgid "inspect-get-mountpoints"
8740 #: ../fish/guestfish-actions.pod:2074
8743 " inspect-get-mountpoints root\n"
8748 #: ../fish/guestfish-actions.pod:2076 ../src/guestfs-actions.pod:3119
8750 "This returns a hash of where we think the filesystems associated with this "
8751 "operating system should be mounted. Callers should note that this is at "
8752 "best an educated guess made by reading configuration files such as C</etc/"
8753 "fstab>. I<In particular note> that this may return filesystems which are "
8754 "non-existent or not mountable and callers should be prepared to handle or "
8755 "ignore failures if they try to mount them."
8759 #: ../fish/guestfish-actions.pod:2085 ../src/guestfs-actions.pod:3128
8761 "Each element in the returned hashtable has a key which is the path of the "
8762 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8763 "mounted there (eg. C</dev/sda1>)."
8767 #: ../fish/guestfish-actions.pod:2090 ../src/guestfs-actions.pod:3133
8769 "Non-mounted devices such as swap devices are I<not> returned in this list."
8773 #: ../fish/guestfish-actions.pod:2093
8775 "For operating systems like Windows which still use drive letters, this call "
8776 "will only return an entry for the first drive \"mounted on\" C</>. For "
8777 "information about the mapping of drive letters to partitions, see L</inspect-"
8778 "get-drive-mappings>."
8782 #: ../fish/guestfish-actions.pod:2099
8784 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8789 #: ../fish/guestfish-actions.pod:2102
8790 msgid "inspect-get-package-format"
8794 #: ../fish/guestfish-actions.pod:2104
8797 " inspect-get-package-format root\n"
8802 #: ../fish/guestfish-actions.pod:2106
8804 "This function and L</inspect-get-package-management> return the package "
8805 "format and package management tool used by the inspected operating system. "
8806 "For example for Fedora these functions would return C<rpm> (package format) "
8807 "and C<yum> (package management)."
8811 #: ../fish/guestfish-actions.pod:2112 ../src/guestfs-actions.pod:3165
8813 "This returns the string C<unknown> if we could not determine the package "
8814 "format I<or> if the operating system does not have a real packaging system "
8819 #: ../fish/guestfish-actions.pod:2116 ../src/guestfs-actions.pod:3169
8821 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8822 "Future versions of libguestfs may return other strings."
8826 #: ../fish/guestfish-actions.pod:2121
8827 msgid "inspect-get-package-management"
8831 #: ../fish/guestfish-actions.pod:2123
8834 " inspect-get-package-management root\n"
8839 #: ../fish/guestfish-actions.pod:2125
8841 "L</inspect-get-package-format> and this function return the package format "
8842 "and package management tool used by the inspected operating system. For "
8843 "example for Fedora these functions would return C<rpm> (package format) and "
8844 "C<yum> (package management)."
8848 #: ../fish/guestfish-actions.pod:2131 ../src/guestfs-actions.pod:3191
8850 "This returns the string C<unknown> if we could not determine the package "
8851 "management tool I<or> if the operating system does not have a real packaging "
8852 "system (eg. Windows)."
8856 #: ../fish/guestfish-actions.pod:2135 ../src/guestfs-actions.pod:3195
8858 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8859 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
8860 "libguestfs may return other strings."
8864 #: ../fish/guestfish-actions.pod:2142
8865 msgid "inspect-get-product-name"
8869 #: ../fish/guestfish-actions.pod:2144
8872 " inspect-get-product-name root\n"
8877 #: ../fish/guestfish-actions.pod:2146 ../src/guestfs-actions.pod:3213
8879 "This returns the product name of the inspected operating system. The "
8880 "product name is generally some freeform string which can be displayed to the "
8881 "user, but should not be parsed by programs."
8885 #: ../fish/guestfish-actions.pod:2151 ../src/guestfs-actions.pod:3218
8887 "If the product name could not be determined, then the string C<unknown> is "
8892 #: ../fish/guestfish-actions.pod:2156
8893 msgid "inspect-get-product-variant"
8897 #: ../fish/guestfish-actions.pod:2158
8900 " inspect-get-product-variant root\n"
8905 #: ../fish/guestfish-actions.pod:2160 ../src/guestfs-actions.pod:3234
8906 msgid "This returns the product variant of the inspected operating system."
8910 #: ../fish/guestfish-actions.pod:2163 ../src/guestfs-actions.pod:3237
8912 "For Windows guests, this returns the contents of the Registry key C<HKLM"
8913 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
8914 "is usually a string such as C<Client> or C<Server> (other values are "
8915 "possible). This can be used to distinguish consumer and enterprise versions "
8916 "of Windows that have the same version number (for example, Windows 7 and "
8917 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
8918 "the latter is C<Server>)."
8922 #: ../fish/guestfish-actions.pod:2172 ../src/guestfs-actions.pod:3246
8924 "For enterprise Linux guests, in future we intend this to return the product "
8925 "variant such as C<Desktop>, C<Server> and so on. But this is not "
8926 "implemented at present."
8930 #: ../fish/guestfish-actions.pod:2176 ../src/guestfs-actions.pod:3250
8932 "If the product variant could not be determined, then the string C<unknown> "
8937 #: ../fish/guestfish-actions.pod:2179
8939 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
8940 "get-product-name>, L</inspect-get-major-version>."
8944 #: ../fish/guestfish-actions.pod:2183
8945 msgid "inspect-get-roots"
8949 #: ../fish/guestfish-actions.pod:2185
8952 " inspect-get-roots\n"
8957 #: ../fish/guestfish-actions.pod:2187
8959 "This function is a convenient way to get the list of root devices, as "
8960 "returned from a previous call to L</inspect-os>, but without redoing the "
8961 "whole inspection process."
8965 #: ../fish/guestfish-actions.pod:2191
8967 "This returns an empty list if either no root devices were found or the "
8968 "caller has not called L</inspect-os>."
8972 #: ../fish/guestfish-actions.pod:2196
8973 msgid "inspect-get-type"
8977 #: ../fish/guestfish-actions.pod:2198
8980 " inspect-get-type root\n"
8985 #: ../fish/guestfish-actions.pod:2200 ../src/guestfs-actions.pod:3288
8987 "This returns the type of the inspected operating system. Currently defined "
8992 #: ../fish/guestfish-actions.pod:2205 ../src/guestfs-actions.pod:3293
8997 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3295
8998 msgid "Any Linux-based operating system."
9002 #: ../fish/guestfish-actions.pod:2211 ../src/guestfs-actions.pod:3299
9003 msgid "Any Microsoft Windows operating system."
9007 #: ../fish/guestfish-actions.pod:2213 ../src/guestfs-actions.pod:3301
9012 #: ../fish/guestfish-actions.pod:2215 ../src/guestfs-actions.pod:3303
9017 #: ../fish/guestfish-actions.pod:2219 ../src/guestfs-actions.pod:3307
9018 msgid "The operating system type could not be determined."
9022 #: ../fish/guestfish-actions.pod:2228
9023 msgid "inspect-get-windows-current-control-set"
9027 #: ../fish/guestfish-actions.pod:2230
9030 " inspect-get-windows-current-control-set root\n"
9035 #: ../fish/guestfish-actions.pod:2232 ../src/guestfs-actions.pod:3327
9037 "This returns the Windows CurrentControlSet of the inspected guest. The "
9038 "CurrentControlSet is a registry key name such as C<ControlSet001>."
9042 #: ../fish/guestfish-actions.pod:2235 ../src/guestfs-actions.pod:3330
9044 "This call assumes that the guest is Windows and that the Registry could be "
9045 "examined by inspection. If this is not the case then an error is returned."
9049 #: ../fish/guestfish-actions.pod:2241
9050 msgid "inspect-get-windows-systemroot"
9054 #: ../fish/guestfish-actions.pod:2243
9057 " inspect-get-windows-systemroot root\n"
9062 #: ../fish/guestfish-actions.pod:2245 ../src/guestfs-actions.pod:3347
9064 "This returns the Windows systemroot of the inspected guest. The systemroot "
9065 "is a directory path such as C</WINDOWS>."
9069 #: ../fish/guestfish-actions.pod:2248 ../src/guestfs-actions.pod:3350
9071 "This call assumes that the guest is Windows and that the systemroot could be "
9072 "determined by inspection. If this is not the case then an error is returned."
9076 #: ../fish/guestfish-actions.pod:2254
9077 msgid "inspect-is-live"
9081 #: ../fish/guestfish-actions.pod:2256
9084 " inspect-is-live root\n"
9089 #: ../fish/guestfish-actions.pod:2258
9091 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
9092 "then this returns true if a live image was detected on the disk."
9096 #: ../fish/guestfish-actions.pod:2264
9097 msgid "inspect-is-multipart"
9101 #: ../fish/guestfish-actions.pod:2266
9104 " inspect-is-multipart root\n"
9109 #: ../fish/guestfish-actions.pod:2268
9111 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
9112 "then this returns true if the disk is part of a set."
9116 #: ../fish/guestfish-actions.pod:2274
9117 msgid "inspect-is-netinst"
9121 #: ../fish/guestfish-actions.pod:2276
9124 " inspect-is-netinst root\n"
9129 #: ../fish/guestfish-actions.pod:2278
9131 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
9132 "then this returns true if the disk is a network installer, ie. not a self-"
9133 "contained install CD but one which is likely to require network access to "
9134 "complete the install."
9138 #: ../fish/guestfish-actions.pod:2286
9139 msgid "inspect-list-applications"
9143 #: ../fish/guestfish-actions.pod:2288
9146 " inspect-list-applications root\n"
9151 #: ../fish/guestfish-actions.pod:2290 ../src/guestfs-actions.pod:3417
9152 msgid "Return the list of applications installed in the operating system."
9156 #: ../fish/guestfish-actions.pod:2292
9158 "I<Note:> This call works differently from other parts of the inspection "
9159 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
9160 "then mount up the disks, before calling this. Listing applications is a "
9161 "significantly more difficult operation which requires access to the full "
9162 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
9163 "are just returning data cached in the libguestfs handle, this call actually "
9164 "reads parts of the mounted filesystems during the call."
9168 #: ../fish/guestfish-actions.pod:2302 ../src/guestfs-actions.pod:3429
9170 "This returns an empty list if the inspection code was not able to determine "
9171 "the list of applications."
9175 #: ../fish/guestfish-actions.pod:2305 ../src/guestfs-actions.pod:3432
9176 msgid "The application structure contains the following fields:"
9180 #: ../fish/guestfish-actions.pod:2309 ../src/guestfs-actions.pod:3436
9185 #: ../fish/guestfish-actions.pod:2311 ../src/guestfs-actions.pod:3438
9187 "The name of the application. For Red Hat-derived and Debian-derived Linux "
9188 "guests, this is the package name."
9192 #: ../fish/guestfish-actions.pod:2314 ../src/guestfs-actions.pod:3441
9193 msgid "C<app_display_name>"
9197 #: ../fish/guestfish-actions.pod:2316 ../src/guestfs-actions.pod:3443
9199 "The display name of the application, sometimes localized to the install "
9200 "language of the guest operating system."
9204 #: ../fish/guestfish-actions.pod:2319 ../src/guestfs-actions.pod:3446
9206 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
9207 "to display something can use C<app_name> instead."
9211 #: ../fish/guestfish-actions.pod:2322 ../src/guestfs-actions.pod:3449
9212 msgid "C<app_epoch>"
9216 #: ../fish/guestfish-actions.pod:2324 ../src/guestfs-actions.pod:3451
9218 "For package managers which use epochs, this contains the epoch of the "
9219 "package (an integer). If unavailable, this is returned as C<0>."
9223 #: ../fish/guestfish-actions.pod:2327 ../src/guestfs-actions.pod:3454
9224 msgid "C<app_version>"
9228 #: ../fish/guestfish-actions.pod:2329 ../src/guestfs-actions.pod:3456
9230 "The version string of the application or package. If unavailable this is "
9231 "returned as an empty string C<\"\">."
9235 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3459
9236 msgid "C<app_release>"
9240 #: ../fish/guestfish-actions.pod:2334 ../src/guestfs-actions.pod:3461
9242 "The release string of the application or package, for package managers that "
9243 "use this. If unavailable this is returned as an empty string C<\"\">."
9247 #: ../fish/guestfish-actions.pod:2338 ../src/guestfs-actions.pod:3465
9248 msgid "C<app_install_path>"
9252 #: ../fish/guestfish-actions.pod:2340 ../src/guestfs-actions.pod:3467
9254 "The installation path of the application (on operating systems such as "
9255 "Windows which use installation paths). This path is in the format used by "
9256 "the guest operating system, it is not a libguestfs path."
9260 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3472
9261 msgid "If unavailable this is returned as an empty string C<\"\">."
9265 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3474
9266 msgid "C<app_trans_path>"
9270 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3476
9272 "The install path translated into a libguestfs path. If unavailable this is "
9273 "returned as an empty string C<\"\">."
9277 #: ../fish/guestfish-actions.pod:2352 ../src/guestfs-actions.pod:3479
9278 msgid "C<app_publisher>"
9282 #: ../fish/guestfish-actions.pod:2354 ../src/guestfs-actions.pod:3481
9284 "The name of the publisher of the application, for package managers that use "
9285 "this. If unavailable this is returned as an empty string C<\"\">."
9289 #: ../fish/guestfish-actions.pod:2358 ../src/guestfs-actions.pod:3485
9294 #: ../fish/guestfish-actions.pod:2360 ../src/guestfs-actions.pod:3487
9296 "The URL (eg. upstream URL) of the application. If unavailable this is "
9297 "returned as an empty string C<\"\">."
9301 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3490
9302 msgid "C<app_source_package>"
9306 #: ../fish/guestfish-actions.pod:2365 ../src/guestfs-actions.pod:3492
9308 "For packaging systems which support this, the name of the source package. "
9309 "If unavailable this is returned as an empty string C<\"\">."
9313 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3495
9314 msgid "C<app_summary>"
9318 #: ../fish/guestfish-actions.pod:2370 ../src/guestfs-actions.pod:3497
9320 "A short (usually one line) description of the application or package. If "
9321 "unavailable this is returned as an empty string C<\"\">."
9325 #: ../fish/guestfish-actions.pod:2373 ../src/guestfs-actions.pod:3500
9326 msgid "C<app_description>"
9330 #: ../fish/guestfish-actions.pod:2375 ../src/guestfs-actions.pod:3502
9332 "A longer description of the application or package. If unavailable this is "
9333 "returned as an empty string C<\"\">."
9337 #: ../fish/guestfish-actions.pod:2382
9342 #: ../fish/guestfish-actions.pod:2384
9350 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3520
9352 "This function uses other libguestfs functions and certain heuristics to "
9353 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9354 "for operating systems."
9358 #: ../fish/guestfish-actions.pod:2390 ../src/guestfs-actions.pod:3524
9359 msgid "The list returned is empty if no operating systems were found."
9363 #: ../fish/guestfish-actions.pod:2392 ../src/guestfs-actions.pod:3526
9365 "If one operating system was found, then this returns a list with a single "
9366 "element, which is the name of the root filesystem of this operating system. "
9367 "It is also possible for this function to return a list containing more than "
9368 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9369 "element being the root filesystem of one of the operating systems."
9373 #: ../fish/guestfish-actions.pod:2399
9375 "You can pass the root string(s) returned to other L</inspect-get-*> "
9376 "functions in order to query further information about each operating system, "
9377 "such as the name and version."
9381 #: ../fish/guestfish-actions.pod:2404
9383 "This function uses other libguestfs features such as L</mount-ro> and L</"
9384 "umount-all> in order to mount and unmount filesystems and look at the "
9385 "contents. This should be called with no disks currently mounted. The "
9386 "function may also use Augeas, so any existing Augeas handle will be closed."
9390 #: ../fish/guestfish-actions.pod:2410 ../src/guestfs-actions.pod:3544
9392 "This function cannot decrypt encrypted disks. The caller must do that first "
9393 "(supplying the necessary keys) if the disk is encrypted."
9397 #: ../fish/guestfish-actions.pod:2416 ../fish/guestfish-actions.pod:2614
9398 #: ../fish/guestfish-actions.pod:2673
9399 msgid "See also L</list-filesystems>."
9403 #: ../fish/guestfish-actions.pod:2418
9408 #: ../fish/guestfish-actions.pod:2420
9411 " is-blockdev path\n"
9416 #: ../fish/guestfish-actions.pod:2422 ../src/guestfs-actions.pod:3564
9418 "This returns C<true> if and only if there is a block device with the given "
9423 #: ../fish/guestfish-actions.pod:2425 ../fish/guestfish-actions.pod:2443
9424 #: ../fish/guestfish-actions.pod:2462 ../fish/guestfish-actions.pod:2471
9425 #: ../fish/guestfish-actions.pod:2481 ../fish/guestfish-actions.pod:2515
9426 #: ../fish/guestfish-actions.pod:2524
9427 msgid "See also L</stat>."
9431 #: ../fish/guestfish-actions.pod:2427
9436 #: ../fish/guestfish-actions.pod:2429
9444 #: ../fish/guestfish-actions.pod:2431 ../src/guestfs-actions.pod:3578
9446 "This returns true iff this handle is busy processing a command (in the "
9451 #: ../fish/guestfish-actions.pod:2436
9456 #: ../fish/guestfish-actions.pod:2438
9459 " is-chardev path\n"
9464 #: ../fish/guestfish-actions.pod:2440 ../src/guestfs-actions.pod:3593
9466 "This returns C<true> if and only if there is a character device with the "
9467 "given C<path> name."
9471 #: ../fish/guestfish-actions.pod:2445
9476 #: ../fish/guestfish-actions.pod:2447
9484 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3607
9486 "This returns true iff this handle is being configured (in the C<CONFIG> "
9491 #: ../fish/guestfish-actions.pod:2454
9496 #: ../fish/guestfish-actions.pod:2456
9504 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3622
9506 "This returns C<true> if and only if there is a directory with the given "
9507 "C<path> name. Note that it returns false for other objects like files."
9511 #: ../fish/guestfish-actions.pod:2464
9516 #: ../fish/guestfish-actions.pod:2466
9524 #: ../fish/guestfish-actions.pod:2468 ../src/guestfs-actions.pod:3638
9526 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9527 "given C<path> name."
9531 #: ../fish/guestfish-actions.pod:2473
9536 #: ../fish/guestfish-actions.pod:2475
9544 #: ../fish/guestfish-actions.pod:2477 ../src/guestfs-actions.pod:3653
9546 "This returns C<true> if and only if there is a regular file with the given "
9547 "C<path> name. Note that it returns false for other objects like directories."
9551 #: ../fish/guestfish-actions.pod:2483
9552 msgid "is-launching"
9556 #: ../fish/guestfish-actions.pod:2485
9564 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3668
9566 "This returns true iff this handle is launching the subprocess (in the "
9567 "C<LAUNCHING> state)."
9571 #: ../fish/guestfish-actions.pod:2492
9576 #: ../fish/guestfish-actions.pod:2494
9584 #: ../fish/guestfish-actions.pod:2496 ../src/guestfs-actions.pod:3683
9586 "This command tests whether C<device> is a logical volume, and returns true "
9587 "iff this is the case."
9591 #: ../fish/guestfish-actions.pod:2499
9596 #: ../fish/guestfish-actions.pod:2501
9604 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3695
9606 "This returns true iff this handle is ready to accept commands (in the "
9611 #: ../fish/guestfish-actions.pod:2508
9616 #: ../fish/guestfish-actions.pod:2510
9624 #: ../fish/guestfish-actions.pod:2512 ../src/guestfs-actions.pod:3710
9626 "This returns C<true> if and only if there is a Unix domain socket with the "
9627 "given C<path> name."
9631 #: ../fish/guestfish-actions.pod:2517
9636 #: ../fish/guestfish-actions.pod:2519
9639 " is-symlink path\n"
9644 #: ../fish/guestfish-actions.pod:2521 ../src/guestfs-actions.pod:3725
9646 "This returns C<true> if and only if there is a symbolic link with the given "
9651 #: ../fish/guestfish-actions.pod:2526
9656 #: ../fish/guestfish-actions.pod:2528
9664 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3740
9666 "This returns true iff the file exists and the file is empty or it contains "
9671 #: ../fish/guestfish-actions.pod:2533
9672 msgid "is-zero-device"
9676 #: ../fish/guestfish-actions.pod:2535
9679 " is-zero-device device\n"
9684 #: ../fish/guestfish-actions.pod:2537 ../src/guestfs-actions.pod:3753
9685 msgid "This returns true iff the device exists and contains all zero bytes."
9689 #: ../fish/guestfish-actions.pod:2539 ../src/guestfs-actions.pod:3755
9690 msgid "Note that for large devices this can take a long time to run."
9694 #: ../fish/guestfish-actions.pod:2541
9695 msgid "kill-subprocess"
9699 #: ../fish/guestfish-actions.pod:2543
9702 " kill-subprocess\n"
9707 #: ../fish/guestfish-actions.pod:2545 ../src/guestfs-actions.pod:3766
9708 msgid "This kills the qemu subprocess. You should never need to call this."
9712 #: ../fish/guestfish-actions.pod:2547
9717 #: ../fish/guestfish-actions.pod:2549
9722 #: ../fish/guestfish-actions.pod:2551
9730 #: ../fish/guestfish-actions.pod:2553 ../src/guestfs-actions.pod:3777
9732 "Internally libguestfs is implemented by running a virtual machine using "
9737 #: ../fish/guestfish-actions.pod:2556 ../src/guestfs-actions.pod:3780
9739 "You should call this after configuring the handle (eg. adding drives) but "
9740 "before performing any actions."
9744 #: ../fish/guestfish-actions.pod:2559
9749 #: ../fish/guestfish-actions.pod:2561
9752 " lchown owner group path\n"
9757 #: ../fish/guestfish-actions.pod:2563
9759 "Change the file owner to C<owner> and group to C<group>. This is like L</"
9760 "chown> but if C<path> is a symlink then the link itself is changed, not the "
9765 #: ../fish/guestfish-actions.pod:2571
9770 #: ../fish/guestfish-actions.pod:2573
9773 " lgetxattr path name\n"
9778 #: ../fish/guestfish-actions.pod:2575 ../src/guestfs-actions.pod:3820
9780 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
9781 "is a symlink, then this call returns an extended attribute from the symlink."
9785 #: ../fish/guestfish-actions.pod:2589
9786 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
9790 #: ../fish/guestfish-actions.pod:2591
9795 #: ../fish/guestfish-actions.pod:2593
9798 " lgetxattrs path\n"
9803 #: ../fish/guestfish-actions.pod:2595
9805 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
9806 "it returns the extended attributes of the link itself."
9810 #: ../fish/guestfish-actions.pod:2599
9815 #: ../fish/guestfish-actions.pod:2601
9823 #: ../fish/guestfish-actions.pod:2603 ../src/guestfs-actions.pod:3863
9825 "List all 9p filesystems attached to the guest. A list of mount tags is "
9830 #: ../fish/guestfish-actions.pod:2606
9831 msgid "list-devices"
9835 #: ../fish/guestfish-actions.pod:2608
9843 #: ../fish/guestfish-actions.pod:2610 ../src/guestfs-actions.pod:3877
9844 msgid "List all the block devices."
9848 #: ../fish/guestfish-actions.pod:2612 ../src/guestfs-actions.pod:3879
9849 msgid "The full block device names are returned, eg. C</dev/sda>."
9853 #: ../fish/guestfish-actions.pod:2616
9854 msgid "list-dm-devices"
9858 #: ../fish/guestfish-actions.pod:2618
9861 " list-dm-devices\n"
9866 #: ../fish/guestfish-actions.pod:2620 ../src/guestfs-actions.pod:3894
9867 msgid "List all device mapper devices."
9871 #: ../fish/guestfish-actions.pod:2622
9873 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
9874 "previous call to L</luks-open>."
9878 #: ../fish/guestfish-actions.pod:2625
9880 "Device mapper devices which correspond to logical volumes are I<not> "
9881 "returned in this list. Call L</lvs> if you want to list logical volumes."
9885 #: ../fish/guestfish-actions.pod:2629
9886 msgid "list-filesystems"
9890 #: ../fish/guestfish-actions.pod:2631
9893 " list-filesystems\n"
9898 #: ../fish/guestfish-actions.pod:2633 ../src/guestfs-actions.pod:3914
9900 "This inspection command looks for filesystems on partitions, block devices "
9901 "and logical volumes, returning a list of devices containing filesystems and "
9906 #: ../fish/guestfish-actions.pod:2637 ../src/guestfs-actions.pod:3918
9908 "The return value is a hash, where the keys are the devices containing "
9909 "filesystems, and the values are the filesystem types. For example:"
9913 #: ../fish/guestfish-actions.pod:2641 ../src/guestfs-actions.pod:3922
9916 " \"/dev/sda1\" => \"ntfs\"\n"
9917 " \"/dev/sda2\" => \"ext2\"\n"
9918 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9919 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9924 #: ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:3927
9926 "The value can have the special value \"unknown\", meaning the content of the "
9927 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9931 #: ../fish/guestfish-actions.pod:2650
9933 "This command runs other libguestfs commands, which might include L</mount> "
9934 "and L</umount>, and therefore you should use this soon after launch and only "
9935 "when nothing is mounted."
9939 #: ../fish/guestfish-actions.pod:2654
9941 "Not all of the filesystems returned will be mountable. In particular, swap "
9942 "partitions are returned in the list. Also this command does not check that "
9943 "each filesystem found is valid and mountable, and some filesystems might be "
9944 "mountable but require special options. Filesystems may not all belong to a "
9945 "single logical operating system (use L</inspect-os> to look for OSes)."
9949 #: ../fish/guestfish-actions.pod:2662
9950 msgid "list-partitions"
9954 #: ../fish/guestfish-actions.pod:2664
9957 " list-partitions\n"
9962 #: ../fish/guestfish-actions.pod:2666 ../src/guestfs-actions.pod:3956
9963 msgid "List all the partitions detected on all block devices."
9967 #: ../fish/guestfish-actions.pod:2668 ../src/guestfs-actions.pod:3958
9968 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9972 #: ../fish/guestfish-actions.pod:2670
9974 "This does not return logical volumes. For that you will need to call L</"
9979 #: ../fish/guestfish-actions.pod:2675
9984 #: ../fish/guestfish-actions.pod:2677
9992 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:3977
9994 "List the files in C<directory> (relative to the root directory, there is no "
9995 "cwd) in the format of 'ls -la'."
9999 #: ../fish/guestfish-actions.pod:2682 ../src/guestfs-actions.pod:3980
10001 "This command is mostly useful for interactive sessions. It is I<not> "
10002 "intended that you try to parse the output string."
10006 #: ../fish/guestfish-actions.pod:2685
10011 #: ../fish/guestfish-actions.pod:2687
10014 " ln target linkname\n"
10019 #: ../fish/guestfish-actions.pod:2689 ../src/guestfs-actions.pod:3995
10020 msgid "This command creates a hard link using the C<ln> command."
10024 #: ../fish/guestfish-actions.pod:2691
10029 #: ../fish/guestfish-actions.pod:2693
10032 " ln-f target linkname\n"
10037 #: ../fish/guestfish-actions.pod:2695 ../src/guestfs-actions.pod:4008
10039 "This command creates a hard link using the C<ln -f> command. The I<-f> "
10040 "option removes the link (C<linkname>) if it exists already."
10044 #: ../fish/guestfish-actions.pod:2698
10049 #: ../fish/guestfish-actions.pod:2700
10052 " ln-s target linkname\n"
10057 #: ../fish/guestfish-actions.pod:2702 ../src/guestfs-actions.pod:4022
10058 msgid "This command creates a symbolic link using the C<ln -s> command."
10062 #: ../fish/guestfish-actions.pod:2704
10067 #: ../fish/guestfish-actions.pod:2706
10070 " ln-sf target linkname\n"
10075 #: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4035
10077 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
10078 "option removes the link (C<linkname>) if it exists already."
10082 #: ../fish/guestfish-actions.pod:2711
10083 msgid "lremovexattr"
10087 #: ../fish/guestfish-actions.pod:2713
10090 " lremovexattr xattr path\n"
10095 #: ../fish/guestfish-actions.pod:2715
10097 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
10098 "it removes an extended attribute of the link itself."
10102 #: ../fish/guestfish-actions.pod:2719
10107 #: ../fish/guestfish-actions.pod:2721
10115 #: ../fish/guestfish-actions.pod:2723 ../src/guestfs-actions.pod:4063
10117 "List the files in C<directory> (relative to the root directory, there is no "
10118 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
10122 #: ../fish/guestfish-actions.pod:2727
10124 "This command is mostly useful for interactive sessions. Programs should "
10125 "probably use L</readdir> instead."
10129 #: ../fish/guestfish-actions.pod:2730
10134 #: ../fish/guestfish-actions.pod:2732
10137 " lsetxattr xattr val vallen path\n"
10142 #: ../fish/guestfish-actions.pod:2734
10144 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
10145 "sets an extended attribute of the link itself."
10149 #: ../fish/guestfish-actions.pod:2738
10154 #: ../fish/guestfish-actions.pod:2740
10162 #: ../fish/guestfish-actions.pod:2742 ../fish/guestfish-actions.pod:4552
10163 #: ../src/guestfs-actions.pod:4099 ../src/guestfs-actions.pod:6882
10164 msgid "Returns file information for the given C<path>."
10168 #: ../fish/guestfish-actions.pod:2744
10170 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
10171 "the link is stat-ed, not the file it refers to."
10175 #: ../fish/guestfish-actions.pod:2748 ../src/guestfs-actions.pod:4105
10176 msgid "This is the same as the C<lstat(2)> system call."
10180 #: ../fish/guestfish-actions.pod:2750
10185 #: ../fish/guestfish-actions.pod:2752
10188 " lstatlist path 'names ...'\n"
10193 #: ../fish/guestfish-actions.pod:2754
10195 "This call allows you to perform the L</lstat> operation on multiple files, "
10196 "where all files are in the directory C<path>. C<names> is the list of files "
10197 "from this directory."
10201 #: ../fish/guestfish-actions.pod:2758 ../src/guestfs-actions.pod:4124
10203 "On return you get a list of stat structs, with a one-to-one correspondence "
10204 "to the C<names> list. If any name did not exist or could not be lstat'd, "
10205 "then the C<ino> field of that structure is set to C<-1>."
10209 #: ../fish/guestfish-actions.pod:2763
10211 "This call is intended for programs that want to efficiently list a directory "
10212 "contents without making many round-trips. See also L</lxattrlist> for a "
10213 "similarly efficient call for getting extended attributes. Very long "
10214 "directory listings might cause the protocol message size to be exceeded, "
10215 "causing this call to fail. The caller must split up such requests into "
10216 "smaller groups of names."
10220 #: ../fish/guestfish-actions.pod:2771
10221 msgid "luks-add-key"
10225 #: ../fish/guestfish-actions.pod:2773
10228 " luks-add-key device keyslot\n"
10233 #: ../fish/guestfish-actions.pod:2775 ../src/guestfs-actions.pod:4152
10235 "This command adds a new key on LUKS device C<device>. C<key> is any "
10236 "existing key, and is used to access the device. C<newkey> is the new key to "
10237 "add. C<keyslot> is the key slot that will be replaced."
10241 #: ../fish/guestfish-actions.pod:2780
10243 "Note that if C<keyslot> already contains a key, then this command will "
10244 "fail. You have to use L</luks-kill-slot> first to remove that key."
10248 #: ../fish/guestfish-actions.pod:2784 ../fish/guestfish-actions.pod:2806
10249 #: ../fish/guestfish-actions.pod:2819 ../fish/guestfish-actions.pod:2833
10250 #: ../fish/guestfish-actions.pod:2859 ../fish/guestfish-actions.pod:2869
10252 "This command has one or more key or passphrase parameters. Guestfish will "
10253 "prompt for these separately."
10257 #: ../fish/guestfish-actions.pod:2787
10262 #: ../fish/guestfish-actions.pod:2789
10265 " luks-close device\n"
10270 #: ../fish/guestfish-actions.pod:2791
10272 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
10273 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
10274 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
10279 #: ../fish/guestfish-actions.pod:2797
10280 msgid "luks-format"
10284 #: ../fish/guestfish-actions.pod:2799
10287 " luks-format device keyslot\n"
10292 #: ../fish/guestfish-actions.pod:2801 ../src/guestfs-actions.pod:4193
10294 "This command erases existing data on C<device> and formats the device as a "
10295 "LUKS encrypted device. C<key> is the initial key, which is added to key "
10296 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
10300 #: ../fish/guestfish-actions.pod:2809 ../fish/guestfish-actions.pod:2822
10301 #: ../fish/guestfish-actions.pod:2909 ../fish/guestfish-actions.pod:3560
10302 #: ../fish/guestfish-actions.pod:4086 ../fish/guestfish-actions.pod:4423
10303 #: ../fish/guestfish-actions.pod:4446 ../fish/guestfish-actions.pod:4468
10304 #: ../fish/guestfish-actions.pod:5214 ../src/guestfs-actions.pod:4200
10305 #: ../src/guestfs-actions.pod:4223 ../src/guestfs-actions.pod:4366
10306 #: ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:6247
10307 #: ../src/guestfs-actions.pod:6696 ../src/guestfs-actions.pod:6726
10308 #: ../src/guestfs-actions.pod:6759 ../src/guestfs-actions.pod:7958
10310 "B<This command is dangerous. Without careful use you can easily destroy all "
10315 #: ../fish/guestfish-actions.pod:2812
10316 msgid "luks-format-cipher"
10320 #: ../fish/guestfish-actions.pod:2814
10323 " luks-format-cipher device keyslot cipher\n"
10328 #: ../fish/guestfish-actions.pod:2816
10330 "This command is the same as L</luks-format> but it also allows you to set "
10331 "the C<cipher> used."
10335 #: ../fish/guestfish-actions.pod:2825
10336 msgid "luks-kill-slot"
10340 #: ../fish/guestfish-actions.pod:2827
10343 " luks-kill-slot device keyslot\n"
10348 #: ../fish/guestfish-actions.pod:2829 ../src/guestfs-actions.pod:4240
10350 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10351 "device C<device>. C<key> must be one of the I<other> keys."
10355 #: ../fish/guestfish-actions.pod:2836
10360 #: ../fish/guestfish-actions.pod:2838
10363 " luks-open device mapname\n"
10368 #: ../fish/guestfish-actions.pod:2840 ../src/guestfs-actions.pod:4260
10370 "This command opens a block device which has been encrypted according to the "
10371 "Linux Unified Key Setup (LUKS) standard."
10375 #: ../fish/guestfish-actions.pod:2843 ../src/guestfs-actions.pod:4263
10376 msgid "C<device> is the encrypted block device or partition."
10380 #: ../fish/guestfish-actions.pod:2845 ../src/guestfs-actions.pod:4265
10382 "The caller must supply one of the keys associated with the LUKS block "
10383 "device, in the C<key> parameter."
10387 #: ../fish/guestfish-actions.pod:2848 ../src/guestfs-actions.pod:4268
10389 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10390 "writes to this block device are decrypted from and encrypted to the "
10391 "underlying C<device> respectively."
10395 #: ../fish/guestfish-actions.pod:2852
10397 "If this block device contains LVM volume groups, then calling L</vgscan> "
10398 "followed by L</vg-activate-all> will make them visible."
10402 #: ../fish/guestfish-actions.pod:2856
10403 msgid "Use L</list-dm-devices> to list all device mapper devices."
10407 #: ../fish/guestfish-actions.pod:2862
10408 msgid "luks-open-ro"
10412 #: ../fish/guestfish-actions.pod:2864
10415 " luks-open-ro device mapname\n"
10420 #: ../fish/guestfish-actions.pod:2866
10422 "This is the same as L</luks-open> except that a read-only mapping is created."
10426 #: ../fish/guestfish-actions.pod:2872
10431 #: ../fish/guestfish-actions.pod:2874
10434 " lvcreate logvol volgroup mbytes\n"
10439 #: ../fish/guestfish-actions.pod:2876 ../src/guestfs-actions.pod:4314
10441 "This creates an LVM logical volume called C<logvol> on the volume group "
10442 "C<volgroup>, with C<size> megabytes."
10446 #: ../fish/guestfish-actions.pod:2879
10447 msgid "lvm-canonical-lv-name"
10451 #: ../fish/guestfish-actions.pod:2881
10454 " lvm-canonical-lv-name lvname\n"
10459 #: ../fish/guestfish-actions.pod:2883 ../src/guestfs-actions.pod:4327
10461 "This converts alternative naming schemes for LVs that you might find to the "
10462 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
10467 #: ../fish/guestfish-actions.pod:2887 ../src/guestfs-actions.pod:4331
10469 "This command returns an error if the C<lvname> parameter does not refer to a "
10474 #: ../fish/guestfish-actions.pod:2890
10475 msgid "See also L</is-lv>."
10479 #: ../fish/guestfish-actions.pod:2892
10480 msgid "lvm-clear-filter"
10484 #: ../fish/guestfish-actions.pod:2894
10487 " lvm-clear-filter\n"
10492 #: ../fish/guestfish-actions.pod:2896
10494 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
10499 #: ../fish/guestfish-actions.pod:2899 ../fish/guestfish-actions.pod:2930
10500 #: ../src/guestfs-actions.pod:4349 ../src/guestfs-actions.pod:4391
10502 "This command also clears the LVM cache and performs a volume group scan."
10506 #: ../fish/guestfish-actions.pod:2902
10507 msgid "lvm-remove-all"
10511 #: ../fish/guestfish-actions.pod:2904
10514 " lvm-remove-all\n"
10519 #: ../fish/guestfish-actions.pod:2906 ../src/guestfs-actions.pod:4361
10521 "This command removes all LVM logical volumes, volume groups and physical "
10526 #: ../fish/guestfish-actions.pod:2912
10527 msgid "lvm-set-filter"
10531 #: ../fish/guestfish-actions.pod:2914
10534 " lvm-set-filter 'devices ...'\n"
10539 #: ../fish/guestfish-actions.pod:2916 ../src/guestfs-actions.pod:4377
10541 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10542 "block devices in the list C<devices>, and will ignore all other attached "
10547 #: ../fish/guestfish-actions.pod:2920 ../src/guestfs-actions.pod:4381
10549 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10550 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10551 "there are two types of duplication possible: either cloned PVs/VGs which "
10552 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10553 "same name. In normal operation you cannot create this situation, but you "
10554 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10555 "inside the LVM metadata."
10559 #: ../fish/guestfish-actions.pod:2933 ../src/guestfs-actions.pod:4394
10560 msgid "You can filter whole block devices or individual partitions."
10564 #: ../fish/guestfish-actions.pod:2935 ../src/guestfs-actions.pod:4396
10566 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10567 "filesystem), even if you are not filtering out that VG."
10571 #: ../fish/guestfish-actions.pod:2939
10576 #: ../fish/guestfish-actions.pod:2941
10579 " lvremove device\n"
10584 #: ../fish/guestfish-actions.pod:2943 ../src/guestfs-actions.pod:4410
10586 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10587 "LV, such as C</dev/VG/LV>."
10591 #: ../fish/guestfish-actions.pod:2946 ../src/guestfs-actions.pod:4413
10593 "You can also remove all LVs in a volume group by specifying the VG name, C</"
10598 #: ../fish/guestfish-actions.pod:2949
10603 #: ../fish/guestfish-actions.pod:2951
10606 " lvrename logvol newlogvol\n"
10611 #: ../fish/guestfish-actions.pod:2953 ../src/guestfs-actions.pod:4427
10612 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10616 #: ../fish/guestfish-actions.pod:2955
10621 #: ../fish/guestfish-actions.pod:2957
10624 " lvresize device mbytes\n"
10629 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4440
10631 "This resizes (expands or shrinks) an existing LVM logical volume to "
10632 "C<mbytes>. When reducing, data in the reduced part is lost."
10636 #: ../fish/guestfish-actions.pod:2963
10637 msgid "lvresize-free"
10641 #: ../fish/guestfish-actions.pod:2965
10644 " lvresize-free lv percent\n"
10649 #: ../fish/guestfish-actions.pod:2967 ../src/guestfs-actions.pod:4455
10651 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10652 "remaining free space in the volume group. Commonly you would call this with "
10653 "pc = 100 which expands the logical volume as much as possible, using all "
10654 "remaining free space in the volume group."
10658 #: ../fish/guestfish-actions.pod:2973
10663 #: ../fish/guestfish-actions.pod:2975
10671 #: ../fish/guestfish-actions.pod:2977 ../src/guestfs-actions.pod:4470
10673 "List all the logical volumes detected. This is the equivalent of the L<lvs"
10678 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4473
10680 "This returns a list of the logical volume device names (eg. C</dev/"
10681 "VolGroup00/LogVol00>)."
10685 #: ../fish/guestfish-actions.pod:2983
10686 msgid "See also L</lvs-full>, L</list-filesystems>."
10690 #: ../fish/guestfish-actions.pod:2985
10695 #: ../fish/guestfish-actions.pod:2987
10703 #: ../fish/guestfish-actions.pod:2989 ../src/guestfs-actions.pod:4489
10705 "List all the logical volumes detected. This is the equivalent of the L<lvs"
10706 "(8)> command. The \"full\" version includes all fields."
10710 #: ../fish/guestfish-actions.pod:2992
10715 #: ../fish/guestfish-actions.pod:2994
10723 #: ../fish/guestfish-actions.pod:2996 ../src/guestfs-actions.pod:4504
10724 msgid "This command returns the UUID of the LVM LV C<device>."
10728 #: ../fish/guestfish-actions.pod:2998
10733 #: ../fish/guestfish-actions.pod:3000
10736 " lxattrlist path 'names ...'\n"
10741 #: ../fish/guestfish-actions.pod:3002 ../src/guestfs-actions.pod:4518
10743 "This call allows you to get the extended attributes of multiple files, where "
10744 "all files are in the directory C<path>. C<names> is the list of files from "
10749 #: ../fish/guestfish-actions.pod:3006 ../src/guestfs-actions.pod:4522
10751 "On return you get a flat list of xattr structs which must be interpreted "
10752 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10753 "C<attrval> in this struct is zero-length to indicate there was an error "
10754 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10755 "number (the number of following attributes for this file, which could be C<"
10756 "\"0\">). Then after the first xattr struct are the zero or more attributes "
10757 "for the first named file. This repeats for the second and subsequent files."
10761 #: ../fish/guestfish-actions.pod:3016
10763 "This call is intended for programs that want to efficiently list a directory "
10764 "contents without making many round-trips. See also L</lstatlist> for a "
10765 "similarly efficient call for getting standard stats. Very long directory "
10766 "listings might cause the protocol message size to be exceeded, causing this "
10767 "call to fail. The caller must split up such requests into smaller groups of "
10772 #: ../fish/guestfish-actions.pod:3024
10777 #: ../fish/guestfish-actions.pod:3026
10785 #: ../fish/guestfish-actions.pod:3028 ../src/guestfs-actions.pod:4552
10786 msgid "Create a directory named C<path>."
10790 #: ../fish/guestfish-actions.pod:3030
10795 #: ../fish/guestfish-actions.pod:3032
10798 " mkdir-mode path mode\n"
10803 #: ../fish/guestfish-actions.pod:3034 ../src/guestfs-actions.pod:4565
10805 "This command creates a directory, setting the initial permissions of the "
10806 "directory to C<mode>."
10810 #: ../fish/guestfish-actions.pod:3037 ../src/guestfs-actions.pod:4568
10812 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10813 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10818 #: ../fish/guestfish-actions.pod:3041
10819 msgid "See also L</mkdir>, L</umask>"
10823 #: ../fish/guestfish-actions.pod:3043
10828 #: ../fish/guestfish-actions.pod:3045
10836 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4584
10838 "Create a directory named C<path>, creating any parent directories as "
10839 "necessary. This is like the C<mkdir -p> shell command."
10843 #: ../fish/guestfish-actions.pod:3050
10848 #: ../fish/guestfish-actions.pod:3052
10851 " mkdtemp template\n"
10856 #: ../fish/guestfish-actions.pod:3054 ../src/guestfs-actions.pod:4597
10858 "This command creates a temporary directory. The C<template> parameter "
10859 "should be a full pathname for the temporary directory name with the final "
10860 "six characters being \"XXXXXX\"."
10864 #: ../fish/guestfish-actions.pod:3059 ../src/guestfs-actions.pod:4602
10866 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10867 "being suitable for Windows filesystems."
10871 #: ../fish/guestfish-actions.pod:3062 ../src/guestfs-actions.pod:4605
10872 msgid "The name of the temporary directory that was created is returned."
10876 #: ../fish/guestfish-actions.pod:3065 ../src/guestfs-actions.pod:4608
10877 msgid "The temporary directory is created with mode 0700 and is owned by root."
10881 #: ../fish/guestfish-actions.pod:3068 ../src/guestfs-actions.pod:4611
10883 "The caller is responsible for deleting the temporary directory and its "
10884 "contents after use."
10888 #: ../fish/guestfish-actions.pod:3071 ../src/guestfs-actions.pod:4614
10889 msgid "See also: L<mkdtemp(3)>"
10893 #: ../fish/guestfish-actions.pod:3073
10898 #: ../fish/guestfish-actions.pod:3075
10901 " mke2fs-J fstype blocksize device journal\n"
10906 #: ../fish/guestfish-actions.pod:3077 ../src/guestfs-actions.pod:4630
10908 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10909 "C<journal>. It is equivalent to the command:"
10913 #: ../fish/guestfish-actions.pod:3081 ../src/guestfs-actions.pod:4634
10916 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10921 #: ../fish/guestfish-actions.pod:3083
10922 msgid "See also L</mke2journal>."
10926 #: ../fish/guestfish-actions.pod:3085
10931 #: ../fish/guestfish-actions.pod:3087
10934 " mke2fs-JL fstype blocksize device label\n"
10939 #: ../fish/guestfish-actions.pod:3089 ../src/guestfs-actions.pod:4651
10941 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10942 "the journal labeled C<label>."
10946 #: ../fish/guestfish-actions.pod:3092
10947 msgid "See also L</mke2journal-L>."
10951 #: ../fish/guestfish-actions.pod:3094
10956 #: ../fish/guestfish-actions.pod:3096
10959 " mke2fs-JU fstype blocksize device uuid\n"
10964 #: ../fish/guestfish-actions.pod:3098 ../src/guestfs-actions.pod:4669
10966 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10967 "the journal with UUID C<uuid>."
10971 #: ../fish/guestfish-actions.pod:3101
10972 msgid "See also L</mke2journal-U>."
10976 #: ../fish/guestfish-actions.pod:3103
10977 msgid "mke2journal"
10981 #: ../fish/guestfish-actions.pod:3105
10984 " mke2journal blocksize device\n"
10989 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4685
10991 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10996 #: ../fish/guestfish-actions.pod:3110 ../src/guestfs-actions.pod:4688
10999 " mke2fs -O journal_dev -b blocksize device\n"
11004 #: ../fish/guestfish-actions.pod:3112
11005 msgid "mke2journal-L"
11009 #: ../fish/guestfish-actions.pod:3114
11012 " mke2journal-L blocksize label device\n"
11017 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4702
11018 msgid "This creates an ext2 external journal on C<device> with label C<label>."
11022 #: ../fish/guestfish-actions.pod:3118
11023 msgid "mke2journal-U"
11027 #: ../fish/guestfish-actions.pod:3120
11030 " mke2journal-U blocksize uuid device\n"
11035 #: ../fish/guestfish-actions.pod:3122 ../src/guestfs-actions.pod:4716
11036 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
11040 #: ../fish/guestfish-actions.pod:3124
11045 #: ../fish/guestfish-actions.pod:3126
11048 " mkfifo mode path\n"
11053 #: ../fish/guestfish-actions.pod:3128
11055 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
11056 "is just a convenient wrapper around L</mknod>."
11060 #: ../fish/guestfish-actions.pod:3134
11065 #: ../fish/guestfish-actions.pod:3136
11068 " mkfs fstype device\n"
11073 #: ../fish/guestfish-actions.pod:3138 ../src/guestfs-actions.pod:4746
11075 "This creates a filesystem on C<device> (usually a partition or LVM logical "
11076 "volume). The filesystem type is C<fstype>, for example C<ext3>."
11080 #: ../fish/guestfish-actions.pod:3142
11085 #: ../fish/guestfish-actions.pod:3144
11088 " mkfs-b fstype blocksize device\n"
11093 #: ../fish/guestfish-actions.pod:3146
11095 "This call is similar to L</mkfs>, but it allows you to control the block "
11096 "size of the resulting filesystem. Supported block sizes depend on the "
11097 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
11101 #: ../fish/guestfish-actions.pod:3151 ../fish/guestfish-actions.pod:3178
11102 #: ../src/guestfs-actions.pod:4774 ../src/guestfs-actions.pod:4812
11104 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
11109 #: ../fish/guestfish-actions.pod:3154
11111 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
11116 #: ../fish/guestfish-actions.pod:3161
11121 #: ../fish/guestfish-actions.pod:3163
11124 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
11129 #: ../fish/guestfish-actions.pod:3165 ../src/guestfs-actions.pod:4799
11131 "This function creates a filesystem on C<device>. The filesystem type is "
11132 "C<fstype>, for example C<ext3>."
11136 #: ../fish/guestfish-actions.pod:3172 ../src/guestfs-actions.pod:4806
11137 msgid "C<blocksize>"
11141 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4808
11143 "The filesystem block size. Supported block sizes depend on the filesystem "
11144 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
11149 #: ../fish/guestfish-actions.pod:3181 ../src/guestfs-actions.pod:4815
11150 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
11154 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4817
11155 msgid "C<features>"
11159 #: ../fish/guestfish-actions.pod:3185 ../src/guestfs-actions.pod:4819
11160 msgid "This passes the I<-O> parameter to the external mkfs program."
11164 #: ../fish/guestfish-actions.pod:3187 ../src/guestfs-actions.pod:4821
11166 "For certain filesystem types, this allows extra filesystem features to be "
11167 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
11171 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4825
11173 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
11178 #: ../fish/guestfish-actions.pod:3194 ../src/guestfs-actions.pod:4828
11183 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4830
11185 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
11186 "sets the inode size (only for ext2/3/4 filesystems at present)."
11190 #: ../fish/guestfish-actions.pod:3199 ../src/guestfs-actions.pod:4833
11191 msgid "C<sectorsize>"
11195 #: ../fish/guestfish-actions.pod:3201 ../src/guestfs-actions.pod:4835
11197 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
11198 "sets sector size for ufs filesystem."
11202 #: ../fish/guestfish-actions.pod:3208
11203 msgid "mkmountpoint"
11207 #: ../fish/guestfish-actions.pod:3210
11210 " mkmountpoint exemptpath\n"
11215 #: ../fish/guestfish-actions.pod:3212
11217 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
11218 "to create extra mountpoints before mounting the first filesystem."
11222 #: ../fish/guestfish-actions.pod:3216 ../src/guestfs-actions.pod:4878
11224 "These calls are I<only> necessary in some very limited circumstances, mainly "
11225 "the case where you want to mount a mix of unrelated and/or read-only "
11226 "filesystems together."
11230 #: ../fish/guestfish-actions.pod:3220 ../src/guestfs-actions.pod:4882
11232 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
11233 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
11234 "inside that. You can unpack this as follows in guestfish:"
11238 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4887
11241 " add-ro Fedora-11-i686-Live.iso\n"
11243 " mkmountpoint /cd\n"
11244 " mkmountpoint /sqsh\n"
11245 " mkmountpoint /ext3fs\n"
11246 " mount /dev/sda /cd\n"
11247 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
11248 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
11253 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4896
11254 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
11258 #: ../fish/guestfish-actions.pod:3236
11260 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
11261 "unexpected errors if you try to mix these calls. It is safest to manually "
11262 "unmount filesystems and remove mountpoints after use."
11266 #: ../fish/guestfish-actions.pod:3240
11268 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
11269 "for this to work for manual mountpoints, you must ensure that the innermost "
11270 "mountpoints have the longest pathnames, as in the example code above."
11274 #: ../fish/guestfish-actions.pod:3245 ../src/guestfs-actions.pod:4907
11276 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
11280 #: ../fish/guestfish-actions.pod:3247
11282 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
11283 "L</umount-all> to be called when the handle is closed which can also trigger "
11288 #: ../fish/guestfish-actions.pod:3251
11293 #: ../fish/guestfish-actions.pod:3253
11296 " mknod mode devmajor devminor path\n"
11301 #: ../fish/guestfish-actions.pod:3255 ../src/guestfs-actions.pod:4926
11303 "This call creates block or character special devices, or named pipes (FIFOs)."
11307 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:4929
11309 "The C<mode> parameter should be the mode, using the standard constants. "
11310 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11311 "used when creating block and character special devices."
11315 #: ../fish/guestfish-actions.pod:3263
11317 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11318 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11319 "regular file). These constants are available in the standard Linux header "
11320 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
11321 "wrappers around this command which bitwise OR in the appropriate constant "
11326 #: ../fish/guestfish-actions.pod:3273
11331 #: ../fish/guestfish-actions.pod:3275
11334 " mknod-b mode devmajor devminor path\n"
11339 #: ../fish/guestfish-actions.pod:3277
11341 "This call creates a block device node called C<path> with mode C<mode> and "
11342 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11343 "wrapper around L</mknod>."
11347 #: ../fish/guestfish-actions.pod:3283
11352 #: ../fish/guestfish-actions.pod:3285
11355 " mknod-c mode devmajor devminor path\n"
11360 #: ../fish/guestfish-actions.pod:3287
11362 "This call creates a char device node called C<path> with mode C<mode> and "
11363 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11364 "wrapper around L</mknod>."
11368 #: ../fish/guestfish-actions.pod:3293
11373 #: ../fish/guestfish-actions.pod:3295
11381 #: ../fish/guestfish-actions.pod:3297 ../src/guestfs-actions.pod:4992
11382 msgid "Create a swap partition on C<device>."
11386 #: ../fish/guestfish-actions.pod:3299
11391 #: ../fish/guestfish-actions.pod:3301
11394 " mkswap-L label device\n"
11399 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5005
11400 msgid "Create a swap partition on C<device> with label C<label>."
11404 #: ../fish/guestfish-actions.pod:3305 ../src/guestfs-actions.pod:5007
11406 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
11407 "sda>), just to a partition. This appears to be a limitation of the kernel "
11412 #: ../fish/guestfish-actions.pod:3309
11417 #: ../fish/guestfish-actions.pod:3311
11420 " mkswap-U uuid device\n"
11425 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5022
11426 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11430 #: ../fish/guestfish-actions.pod:3315
11431 msgid "mkswap-file"
11435 #: ../fish/guestfish-actions.pod:3317
11438 " mkswap-file path\n"
11443 #: ../fish/guestfish-actions.pod:3319 ../src/guestfs-actions.pod:5034
11444 msgid "Create a swap file."
11448 #: ../fish/guestfish-actions.pod:3321
11450 "This command just writes a swap file signature to an existing file. To "
11451 "create the file itself, use something like L</fallocate>."
11455 #: ../fish/guestfish-actions.pod:3324
11460 #: ../fish/guestfish-actions.pod:3326
11463 " modprobe modulename\n"
11468 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5049
11469 msgid "This loads a kernel module in the appliance."
11473 #: ../fish/guestfish-actions.pod:3330 ../src/guestfs-actions.pod:5051
11475 "The kernel module must have been whitelisted when libguestfs was built (see "
11476 "C<appliance/kmod.whitelist.in> in the source)."
11480 #: ../fish/guestfish-actions.pod:3333
11485 #: ../fish/guestfish-actions.pod:3335
11488 " mount device mountpoint\n"
11493 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5065
11495 "Mount a guest disk at a position in the filesystem. Block devices are named "
11496 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11497 "those block devices contain partitions, they will have the usual names (eg. "
11498 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11502 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5071
11504 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11505 "mounted on C</> before others can be mounted. Other filesystems can only be "
11506 "mounted on directories which already exist."
11510 #: ../fish/guestfish-actions.pod:3348 ../src/guestfs-actions.pod:5076
11512 "The mounted filesystem is writable, if we have sufficient permissions on the "
11513 "underlying device."
11517 #: ../fish/guestfish-actions.pod:3351
11519 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
11520 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
11521 "problems for users. If your program might need to work with older versions "
11522 "of libguestfs, use L</mount-options> instead (using an empty string for the "
11523 "first parameter if you don't want any options)."
11527 #: ../fish/guestfish-actions.pod:3358
11532 #: ../fish/guestfish-actions.pod:3360
11535 " mount-9p mounttag mountpoint [options:..]\n"
11540 #: ../fish/guestfish-actions.pod:3362 ../src/guestfs-actions.pod:5105
11542 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
11547 #: ../fish/guestfish-actions.pod:3365 ../src/guestfs-actions.pod:5108
11549 "If required, C<trans=virtio> will be automatically added to the options. "
11550 "Any other options required can be passed in the optional C<options> "
11555 #: ../fish/guestfish-actions.pod:3371
11560 #: ../fish/guestfish-actions.pod:3373
11563 " mount-loop file mountpoint\n"
11568 #: ../fish/guestfish-actions.pod:3375 ../src/guestfs-actions.pod:5147
11570 "This command lets you mount C<file> (a filesystem image in a file) on a "
11571 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11576 #: ../fish/guestfish-actions.pod:3379
11577 msgid "mount-options"
11581 #: ../fish/guestfish-actions.pod:3381
11584 " mount-options options device mountpoint\n"
11589 #: ../fish/guestfish-actions.pod:3383
11591 "This is the same as the L</mount> command, but it allows you to set the "
11592 "mount options as for the L<mount(8)> I<-o> flag."
11596 #: ../fish/guestfish-actions.pod:3387 ../src/guestfs-actions.pod:5167
11598 "If the C<options> parameter is an empty string, then no options are passed "
11599 "(all options default to whatever the filesystem uses)."
11603 #: ../fish/guestfish-actions.pod:3391
11608 #: ../fish/guestfish-actions.pod:3393
11611 " mount-ro device mountpoint\n"
11616 #: ../fish/guestfish-actions.pod:3395
11618 "This is the same as the L</mount> command, but it mounts the filesystem with "
11619 "the read-only (I<-o ro>) flag."
11623 #: ../fish/guestfish-actions.pod:3398
11628 #: ../fish/guestfish-actions.pod:3400
11631 " mount-vfs options vfstype device mountpoint\n"
11636 #: ../fish/guestfish-actions.pod:3402
11638 "This is the same as the L</mount> command, but it allows you to set both the "
11639 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
11643 #: ../fish/guestfish-actions.pod:3406
11644 msgid "mountpoints"
11648 #: ../fish/guestfish-actions.pod:3408
11656 #: ../fish/guestfish-actions.pod:3410
11658 "This call is similar to L</mounts>. That call returns a list of devices. "
11659 "This one returns a hash table (map) of device name to directory where the "
11660 "device is mounted."
11664 #: ../fish/guestfish-actions.pod:3414
11669 #: ../fish/guestfish-actions.pod:3416
11677 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5228
11679 "This returns the list of currently mounted filesystems. It returns the list "
11680 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11684 #: ../fish/guestfish-actions.pod:3421 ../src/guestfs-actions.pod:5231
11685 msgid "Some internal mounts are not shown."
11689 #: ../fish/guestfish-actions.pod:3423
11690 msgid "See also: L</mountpoints>"
11694 #: ../fish/guestfish-actions.pod:3425
11699 #: ../fish/guestfish-actions.pod:3427
11707 #: ../fish/guestfish-actions.pod:3429 ../src/guestfs-actions.pod:5248
11709 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11710 "destination filename or destination directory."
11714 #: ../fish/guestfish-actions.pod:3432
11715 msgid "ntfs-3g-probe"
11719 #: ../fish/guestfish-actions.pod:3434
11722 " ntfs-3g-probe true|false device\n"
11727 #: ../fish/guestfish-actions.pod:3436 ../src/guestfs-actions.pod:5262
11729 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11730 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
11731 "write, and some cannot be mounted at all)."
11735 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5266
11737 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11738 "can be mounted read-write. Set it to false if you want to test if the "
11739 "volume can be mounted read-only."
11743 #: ../fish/guestfish-actions.pod:3444 ../src/guestfs-actions.pod:5270
11745 "The return value is an integer which C<0> if the operation would succeed, or "
11746 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11750 #: ../fish/guestfish-actions.pod:3448
11755 #: ../fish/guestfish-actions.pod:3450
11758 " ntfsresize device\n"
11763 #: ../fish/guestfish-actions.pod:3452 ../fish/guestfish-actions.pod:3476
11764 #: ../src/guestfs-actions.pod:5291 ../src/guestfs-actions.pod:5323
11766 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11767 "size of the underlying device."
11771 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5294
11773 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
11774 "consistency check (for safety). You have to boot into Windows to perform "
11775 "this check and clear this condition. Furthermore, ntfsresize refuses to "
11776 "resize filesystems which have been marked in this way. So in effect it is "
11777 "not possible to call ntfsresize multiple times on a single filesystem "
11778 "without booting into Windows between each resize."
11782 #: ../fish/guestfish-actions.pod:3463 ../fish/guestfish-actions.pod:3502
11783 #: ../src/guestfs-actions.pod:5302 ../src/guestfs-actions.pod:5349
11784 msgid "See also L<ntfsresize(8)>."
11788 #: ../fish/guestfish-actions.pod:3465 ../fish/guestfish-actions.pod:3513
11790 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
11795 #: ../fish/guestfish-actions.pod:3472
11796 msgid "ntfsresize-opts"
11800 #: ../fish/guestfish-actions.pod:3474
11803 " ntfsresize-opts device [size:..] [force:..]\n"
11808 #: ../fish/guestfish-actions.pod:3485 ../src/guestfs-actions.pod:5332
11810 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
11811 "resized to fit the container (eg. partition)."
11815 #: ../fish/guestfish-actions.pod:3488 ../src/guestfs-actions.pod:5335
11820 #: ../fish/guestfish-actions.pod:3490 ../src/guestfs-actions.pod:5337
11822 "If this option is true, then force the resize of the filesystem even if the "
11823 "filesystem is marked as requiring a consistency check."
11827 #: ../fish/guestfish-actions.pod:3493
11829 "After the resize operation, the filesystem is always marked as requiring a "
11830 "consistency check (for safety). You have to boot into Windows to perform "
11831 "this check and clear this condition. If you I<don't> set the C<force> "
11832 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
11833 "a single filesystem without booting into Windows between each resize."
11837 #: ../fish/guestfish-actions.pod:3506
11838 msgid "ntfsresize-size"
11842 #: ../fish/guestfish-actions.pod:3508
11845 " ntfsresize-size device size\n"
11850 #: ../fish/guestfish-actions.pod:3510
11852 "This command is the same as L</ntfsresize> except that it allows you to "
11853 "specify the new size (in bytes) explicitly."
11857 #: ../fish/guestfish-actions.pod:3520
11862 #: ../fish/guestfish-actions.pod:3522
11865 " part-add device prlogex startsect endsect\n"
11870 #: ../fish/guestfish-actions.pod:3524
11872 "This command adds a partition to C<device>. If there is no partition table "
11873 "on the device, call L</part-init> first."
11877 #: ../fish/guestfish-actions.pod:3527 ../src/guestfs-actions.pod:5410
11879 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11880 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11881 "C<logical>) and C<e> (or C<extended>) partition types."
11885 #: ../fish/guestfish-actions.pod:3532 ../src/guestfs-actions.pod:5415
11887 "C<startsect> and C<endsect> are the start and end of the partition in "
11888 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11889 "from the end of the disk (C<-1> is the last sector)."
11893 #: ../fish/guestfish-actions.pod:3536
11895 "Creating a partition which covers the whole disk is not so easy. Use L</"
11896 "part-disk> to do that."
11900 #: ../fish/guestfish-actions.pod:3539
11905 #: ../fish/guestfish-actions.pod:3541
11908 " part-del device partnum\n"
11913 #: ../fish/guestfish-actions.pod:3543 ../src/guestfs-actions.pod:5433
11914 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11918 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5435
11920 "Note that in the case of MBR partitioning, deleting an extended partition "
11921 "also deletes any logical partitions it contains."
11925 #: ../fish/guestfish-actions.pod:3549
11930 #: ../fish/guestfish-actions.pod:3551
11933 " part-disk device parttype\n"
11938 #: ../fish/guestfish-actions.pod:3553
11940 "This command is simply a combination of L</part-init> followed by L</part-"
11941 "add> to create a single primary partition covering the whole disk."
11945 #: ../fish/guestfish-actions.pod:3557
11947 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11948 "possible values are described in L</part-init>."
11952 #: ../fish/guestfish-actions.pod:3563
11953 msgid "part-get-bootable"
11957 #: ../fish/guestfish-actions.pod:3565
11960 " part-get-bootable device partnum\n"
11965 #: ../fish/guestfish-actions.pod:3567 ../src/guestfs-actions.pod:5471
11967 "This command returns true if the partition C<partnum> on C<device> has the "
11968 "bootable flag set."
11972 #: ../fish/guestfish-actions.pod:3570
11973 msgid "See also L</part-set-bootable>."
11977 #: ../fish/guestfish-actions.pod:3572
11978 msgid "part-get-mbr-id"
11982 #: ../fish/guestfish-actions.pod:3574
11985 " part-get-mbr-id device partnum\n"
11990 #: ../fish/guestfish-actions.pod:3576 ../src/guestfs-actions.pod:5487
11992 "Returns the MBR type byte (also known as the ID byte) from the numbered "
11993 "partition C<partnum>."
11997 #: ../fish/guestfish-actions.pod:3579 ../fish/guestfish-actions.pod:3723
11999 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
12000 "undefined results for other partition table types (see L</part-get-"
12005 #: ../fish/guestfish-actions.pod:3583
12006 msgid "part-get-parttype"
12010 #: ../fish/guestfish-actions.pod:3585
12013 " part-get-parttype device\n"
12018 #: ../fish/guestfish-actions.pod:3587 ../src/guestfs-actions.pod:5504
12020 "This command examines the partition table on C<device> and returns the "
12021 "partition table type (format) being used."
12025 #: ../fish/guestfish-actions.pod:3590
12027 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
12028 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
12029 "possible, although unusual. See L</part-init> for a full list."
12033 #: ../fish/guestfish-actions.pod:3595
12038 #: ../fish/guestfish-actions.pod:3597
12041 " part-init device parttype\n"
12046 #: ../fish/guestfish-actions.pod:3599 ../src/guestfs-actions.pod:5524
12048 "This creates an empty partition table on C<device> of one of the partition "
12049 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
12050 "(for large disks)."
12054 #: ../fish/guestfish-actions.pod:3603
12056 "Initially there are no partitions. Following this, you should call L</part-"
12057 "add> for each partition required."
12061 #: ../fish/guestfish-actions.pod:3606 ../src/guestfs-actions.pod:5531
12062 msgid "Possible values for C<parttype> are:"
12066 #: ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:5535
12071 #: ../fish/guestfish-actions.pod:3612 ../src/guestfs-actions.pod:5537
12076 #: ../fish/guestfish-actions.pod:3614 ../src/guestfs-actions.pod:5539
12077 msgid "Intel EFI / GPT partition table."
12081 #: ../fish/guestfish-actions.pod:3616 ../src/guestfs-actions.pod:5541
12083 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
12084 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
12085 "the C<mbr> format."
12089 #: ../fish/guestfish-actions.pod:3620 ../src/guestfs-actions.pod:5545
12094 #: ../fish/guestfish-actions.pod:3622 ../src/guestfs-actions.pod:5547
12099 #: ../fish/guestfish-actions.pod:3624 ../src/guestfs-actions.pod:5549
12101 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
12102 "Windows. This partition type will B<only> work for device sizes up to 2 "
12103 "TB. For large disks we recommend using C<gpt>."
12107 #: ../fish/guestfish-actions.pod:3631 ../src/guestfs-actions.pod:5556
12109 "Other partition table types that may work but are not supported include:"
12113 #: ../fish/guestfish-actions.pod:3636 ../src/guestfs-actions.pod:5561
12118 #: ../fish/guestfish-actions.pod:3638 ../src/guestfs-actions.pod:5563
12119 msgid "AIX disk labels."
12123 #: ../fish/guestfish-actions.pod:3640 ../src/guestfs-actions.pod:5565
12128 #: ../fish/guestfish-actions.pod:3642 ../src/guestfs-actions.pod:5567
12133 #: ../fish/guestfish-actions.pod:3644 ../src/guestfs-actions.pod:5569
12134 msgid "Amiga \"Rigid Disk Block\" format."
12138 #: ../fish/guestfish-actions.pod:3646 ../src/guestfs-actions.pod:5571
12143 #: ../fish/guestfish-actions.pod:3648 ../src/guestfs-actions.pod:5573
12144 msgid "BSD disk labels."
12148 #: ../fish/guestfish-actions.pod:3650 ../src/guestfs-actions.pod:5575
12153 #: ../fish/guestfish-actions.pod:3652 ../src/guestfs-actions.pod:5577
12154 msgid "DASD, used on IBM mainframes."
12158 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5579
12163 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5581
12164 msgid "MIPS/SGI volumes."
12168 #: ../fish/guestfish-actions.pod:3658 ../src/guestfs-actions.pod:5583
12173 #: ../fish/guestfish-actions.pod:3660 ../src/guestfs-actions.pod:5585
12174 msgid "Old Mac partition format. Modern Macs use C<gpt>."
12178 #: ../fish/guestfish-actions.pod:3662 ../src/guestfs-actions.pod:5587
12183 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5589
12184 msgid "NEC PC-98 format, common in Japan apparently."
12188 #: ../fish/guestfish-actions.pod:3666 ../src/guestfs-actions.pod:5591
12193 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5593
12194 msgid "Sun disk labels."
12198 #: ../fish/guestfish-actions.pod:3672
12203 #: ../fish/guestfish-actions.pod:3674
12206 " part-list device\n"
12211 #: ../fish/guestfish-actions.pod:3676 ../src/guestfs-actions.pod:5607
12213 "This command parses the partition table on C<device> and returns the list of "
12214 "partitions found."
12218 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5610
12219 msgid "The fields in the returned structure are:"
12223 #: ../fish/guestfish-actions.pod:3683 ../src/guestfs-actions.pod:5614
12224 msgid "B<part_num>"
12228 #: ../fish/guestfish-actions.pod:3685 ../src/guestfs-actions.pod:5616
12229 msgid "Partition number, counting from 1."
12233 #: ../fish/guestfish-actions.pod:3687 ../src/guestfs-actions.pod:5618
12234 msgid "B<part_start>"
12238 #: ../fish/guestfish-actions.pod:3689
12240 "Start of the partition I<in bytes>. To get sectors you have to divide by "
12241 "the device's sector size, see L</blockdev-getss>."
12245 #: ../fish/guestfish-actions.pod:3692 ../src/guestfs-actions.pod:5623
12246 msgid "B<part_end>"
12250 #: ../fish/guestfish-actions.pod:3694 ../src/guestfs-actions.pod:5625
12251 msgid "End of the partition in bytes."
12255 #: ../fish/guestfish-actions.pod:3696 ../src/guestfs-actions.pod:5627
12256 msgid "B<part_size>"
12260 #: ../fish/guestfish-actions.pod:3698 ../src/guestfs-actions.pod:5629
12261 msgid "Size of the partition in bytes."
12265 #: ../fish/guestfish-actions.pod:3702
12266 msgid "part-set-bootable"
12270 #: ../fish/guestfish-actions.pod:3704
12273 " part-set-bootable device partnum true|false\n"
12278 #: ../fish/guestfish-actions.pod:3706 ../src/guestfs-actions.pod:5647
12280 "This sets the bootable flag on partition numbered C<partnum> on device "
12281 "C<device>. Note that partitions are numbered from 1."
12285 #: ../fish/guestfish-actions.pod:3709 ../src/guestfs-actions.pod:5650
12287 "The bootable flag is used by some operating systems (notably Windows) to "
12288 "determine which partition to boot from. It is by no means universally "
12293 #: ../fish/guestfish-actions.pod:3713
12294 msgid "part-set-mbr-id"
12298 #: ../fish/guestfish-actions.pod:3715
12301 " part-set-mbr-id device partnum idbyte\n"
12306 #: ../fish/guestfish-actions.pod:3717 ../src/guestfs-actions.pod:5666
12308 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12309 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12310 "documentation are in fact hexadecimal numbers, but usually documented "
12311 "without any leading \"0x\" which might be confusing."
12315 #: ../fish/guestfish-actions.pod:3727
12316 msgid "part-set-name"
12320 #: ../fish/guestfish-actions.pod:3729
12323 " part-set-name device partnum name\n"
12328 #: ../fish/guestfish-actions.pod:3731 ../src/guestfs-actions.pod:5688
12330 "This sets the partition name on partition numbered C<partnum> on device "
12331 "C<device>. Note that partitions are numbered from 1."
12335 #: ../fish/guestfish-actions.pod:3734 ../src/guestfs-actions.pod:5691
12337 "The partition name can only be set on certain types of partition table. "
12338 "This works on C<gpt> but not on C<mbr> partitions."
12342 #: ../fish/guestfish-actions.pod:3737
12343 msgid "part-to-dev"
12347 #: ../fish/guestfish-actions.pod:3739
12350 " part-to-dev partition\n"
12355 #: ../fish/guestfish-actions.pod:3741 ../src/guestfs-actions.pod:5704
12357 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12358 "partition number, returning the device name (eg. \"/dev/sdb\")."
12362 #: ../fish/guestfish-actions.pod:3745
12364 "The named partition must exist, for example as a string returned from L</"
12365 "list-partitions>."
12369 #: ../fish/guestfish-actions.pod:3748
12370 msgid "ping-daemon"
12374 #: ../fish/guestfish-actions.pod:3750
12382 #: ../fish/guestfish-actions.pod:3752 ../src/guestfs-actions.pod:5721
12384 "This is a test probe into the guestfs daemon running inside the qemu "
12385 "subprocess. Calling this function checks that the daemon responds to the "
12386 "ping message, without affecting the daemon or attached block device(s) in "
12391 #: ../fish/guestfish-actions.pod:3757
12396 #: ../fish/guestfish-actions.pod:3759
12399 " pread path count offset\n"
12404 #: ../fish/guestfish-actions.pod:3761 ../src/guestfs-actions.pod:5739
12406 "This command lets you read part of a file. It reads C<count> bytes of the "
12407 "file, starting at C<offset>, from file C<path>."
12411 #: ../fish/guestfish-actions.pod:3764 ../fish/guestfish-actions.pod:3779
12412 #: ../src/guestfs-actions.pod:5742 ../src/guestfs-actions.pod:5768
12414 "This may read fewer bytes than requested. For further details see the "
12415 "L<pread(2)> system call."
12419 #: ../fish/guestfish-actions.pod:3767
12420 msgid "See also L</pwrite>, L</pread-device>."
12424 #: ../fish/guestfish-actions.pod:3772
12425 msgid "pread-device"
12429 #: ../fish/guestfish-actions.pod:3774
12432 " pread-device device count offset\n"
12437 #: ../fish/guestfish-actions.pod:3776 ../src/guestfs-actions.pod:5765
12439 "This command lets you read part of a file. It reads C<count> bytes of "
12440 "C<device>, starting at C<offset>."
12444 #: ../fish/guestfish-actions.pod:3782
12445 msgid "See also L</pread>."
12449 #: ../fish/guestfish-actions.pod:3787
12454 #: ../fish/guestfish-actions.pod:3789
12457 " pvcreate device\n"
12462 #: ../fish/guestfish-actions.pod:3791 ../src/guestfs-actions.pod:5788
12464 "This creates an LVM physical volume on the named C<device>, where C<device> "
12465 "should usually be a partition name such as C</dev/sda1>."
12469 #: ../fish/guestfish-actions.pod:3795
12474 #: ../fish/guestfish-actions.pod:3797
12477 " pvremove device\n"
12482 #: ../fish/guestfish-actions.pod:3799 ../src/guestfs-actions.pod:5802
12484 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12489 #: ../fish/guestfish-actions.pod:3802 ../src/guestfs-actions.pod:5805
12491 "The implementation uses the C<pvremove> command which refuses to wipe "
12492 "physical volumes that contain any volume groups, so you have to remove those "
12497 #: ../fish/guestfish-actions.pod:3806
12502 #: ../fish/guestfish-actions.pod:3808
12505 " pvresize device\n"
12510 #: ../fish/guestfish-actions.pod:3810 ../src/guestfs-actions.pod:5819
12512 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12513 "the new size of the underlying device."
12517 #: ../fish/guestfish-actions.pod:3813
12518 msgid "pvresize-size"
12522 #: ../fish/guestfish-actions.pod:3815
12525 " pvresize-size device size\n"
12530 #: ../fish/guestfish-actions.pod:3817
12532 "This command is the same as L</pvresize> except that it allows you to "
12533 "specify the new size (in bytes) explicitly."
12537 #: ../fish/guestfish-actions.pod:3820
12542 #: ../fish/guestfish-actions.pod:3822
12550 #: ../fish/guestfish-actions.pod:3824 ../src/guestfs-actions.pod:5845
12552 "List all the physical volumes detected. This is the equivalent of the L<pvs"
12557 #: ../fish/guestfish-actions.pod:3827 ../src/guestfs-actions.pod:5848
12559 "This returns a list of just the device names that contain PVs (eg. C</dev/"
12564 #: ../fish/guestfish-actions.pod:3830
12565 msgid "See also L</pvs-full>."
12569 #: ../fish/guestfish-actions.pod:3832
12574 #: ../fish/guestfish-actions.pod:3834
12582 #: ../fish/guestfish-actions.pod:3836 ../src/guestfs-actions.pod:5864
12584 "List all the physical volumes detected. This is the equivalent of the L<pvs"
12585 "(8)> command. The \"full\" version includes all fields."
12589 #: ../fish/guestfish-actions.pod:3839
12594 #: ../fish/guestfish-actions.pod:3841
12602 #: ../fish/guestfish-actions.pod:3843 ../src/guestfs-actions.pod:5879
12603 msgid "This command returns the UUID of the LVM PV C<device>."
12607 #: ../fish/guestfish-actions.pod:3845
12612 #: ../fish/guestfish-actions.pod:3847
12615 " pwrite path content offset\n"
12620 #: ../fish/guestfish-actions.pod:3849 ../src/guestfs-actions.pod:5895
12622 "This command writes to part of a file. It writes the data buffer C<content> "
12623 "to the file C<path> starting at offset C<offset>."
12627 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:5898
12629 "This command implements the L<pwrite(2)> system call, and like that system "
12630 "call it may not write the full data requested. The return value is the "
12631 "number of bytes that were actually written to the file. This could even be "
12632 "0, although short writes are unlikely for regular files in ordinary "
12637 #: ../fish/guestfish-actions.pod:3858
12638 msgid "See also L</pread>, L</pwrite-device>."
12642 #: ../fish/guestfish-actions.pod:3863
12643 msgid "pwrite-device"
12647 #: ../fish/guestfish-actions.pod:3865
12650 " pwrite-device device content offset\n"
12655 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:5922
12657 "This command writes to part of a device. It writes the data buffer "
12658 "C<content> to C<device> starting at offset C<offset>."
12662 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:5925
12664 "This command implements the L<pwrite(2)> system call, and like that system "
12665 "call it may not write the full data requested (although short writes to disk "
12666 "devices and partitions are probably impossible with standard Linux kernels)."
12670 #: ../fish/guestfish-actions.pod:3875
12671 msgid "See also L</pwrite>."
12675 #: ../fish/guestfish-actions.pod:3880
12680 #: ../fish/guestfish-actions.pod:3882
12683 " read-file path\n"
12688 #: ../fish/guestfish-actions.pod:3884 ../src/guestfs-actions.pod:5946
12689 msgid "This calls returns the contents of the file C<path> as a buffer."
12693 #: ../fish/guestfish-actions.pod:3887
12695 "Unlike L</cat>, this function can correctly handle files that contain "
12696 "embedded ASCII NUL characters. However unlike L</download>, this function "
12697 "is limited in the total size of file that can be handled."
12701 #: ../fish/guestfish-actions.pod:3895
12706 #: ../fish/guestfish-actions.pod:3897
12709 " read-lines path\n"
12714 #: ../fish/guestfish-actions.pod:3901 ../src/guestfs-actions.pod:5971
12716 "The file contents are returned as a list of lines. Trailing C<LF> and "
12717 "C<CRLF> character sequences are I<not> returned."
12721 #: ../fish/guestfish-actions.pod:3904
12723 "Note that this function cannot correctly handle binary files (specifically, "
12724 "files containing C<\\0> character which is treated as end of line). For "
12725 "those you need to use the L</read-file> function which has a more complex "
12730 #: ../fish/guestfish-actions.pod:3909
12735 #: ../fish/guestfish-actions.pod:3911
12743 #: ../fish/guestfish-actions.pod:3913 ../src/guestfs-actions.pod:5991
12744 msgid "This returns the list of directory entries in directory C<dir>."
12748 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:5993
12750 "All entries in the directory are returned, including C<.> and C<..>. The "
12751 "entries are I<not> sorted, but returned in the same order as the underlying "
12756 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:5997
12758 "Also this call returns basic file type information about each file. The "
12759 "C<ftyp> field will contain one of the following characters:"
12763 #: ../fish/guestfish-actions.pod:3924 ../src/guestfs-actions.pod:6002
12768 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6004
12769 msgid "Block special"
12773 #: ../fish/guestfish-actions.pod:3928 ../src/guestfs-actions.pod:6006
12778 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6008
12779 msgid "Char special"
12783 #: ../fish/guestfish-actions.pod:3932 ../src/guestfs-actions.pod:6010
12788 #: ../fish/guestfish-actions.pod:3934 ../src/guestfs-actions.pod:6012
12793 #: ../fish/guestfish-actions.pod:3936 ../src/guestfs-actions.pod:6014
12798 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6016
12799 msgid "FIFO (named pipe)"
12803 #: ../fish/guestfish-actions.pod:3940 ../src/guestfs-actions.pod:6018
12808 #: ../fish/guestfish-actions.pod:3942 ../src/guestfs-actions.pod:6020
12809 msgid "Symbolic link"
12813 #: ../fish/guestfish-actions.pod:3944 ../src/guestfs-actions.pod:6022
12818 #: ../fish/guestfish-actions.pod:3946 ../src/guestfs-actions.pod:6024
12819 msgid "Regular file"
12823 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6026
12828 #: ../fish/guestfish-actions.pod:3950 ../src/guestfs-actions.pod:6028
12833 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6030
12838 #: ../fish/guestfish-actions.pod:3954 ../src/guestfs-actions.pod:6032
12839 msgid "Unknown file type"
12843 #: ../fish/guestfish-actions.pod:3956 ../src/guestfs-actions.pod:6034
12848 #: ../fish/guestfish-actions.pod:3958 ../src/guestfs-actions.pod:6036
12850 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12854 #: ../fish/guestfish-actions.pod:3963
12856 "This function is primarily intended for use by programs. To get a simple "
12857 "list of names, use L</ls>. To get a printable directory for human "
12858 "consumption, use L</ll>."
12862 #: ../fish/guestfish-actions.pod:3967
12867 #: ../fish/guestfish-actions.pod:3969
12875 #: ../fish/guestfish-actions.pod:3971 ../src/guestfs-actions.pod:6057
12876 msgid "This command reads the target of a symbolic link."
12880 #: ../fish/guestfish-actions.pod:3973
12881 msgid "readlinklist"
12885 #: ../fish/guestfish-actions.pod:3975
12888 " readlinklist path 'names ...'\n"
12893 #: ../fish/guestfish-actions.pod:3977 ../src/guestfs-actions.pod:6071
12895 "This call allows you to do a C<readlink> operation on multiple files, where "
12896 "all files are in the directory C<path>. C<names> is the list of files from "
12901 #: ../fish/guestfish-actions.pod:3981 ../src/guestfs-actions.pod:6075
12903 "On return you get a list of strings, with a one-to-one correspondence to the "
12904 "C<names> list. Each string is the value of the symbolic link."
12908 #: ../fish/guestfish-actions.pod:3985 ../src/guestfs-actions.pod:6079
12910 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12911 "result string is the empty string C<\"\">. However the whole operation is "
12912 "completed even if there were C<readlink(2)> errors, and so you can call this "
12913 "function with names where you don't know if they are symbolic links already "
12914 "(albeit slightly less efficient)."
12918 #: ../fish/guestfish-actions.pod:3992 ../src/guestfs-actions.pod:6086
12920 "This call is intended for programs that want to efficiently list a directory "
12921 "contents without making many round-trips. Very long directory listings "
12922 "might cause the protocol message size to be exceeded, causing this call to "
12923 "fail. The caller must split up such requests into smaller groups of names."
12927 #: ../fish/guestfish-actions.pod:3999
12932 #: ../fish/guestfish-actions.pod:4001
12940 #: ../fish/guestfish-actions.pod:4003 ../src/guestfs-actions.pod:6105
12942 "Return the canonicalized absolute pathname of C<path>. The returned path "
12943 "has no C<.>, C<..> or symbolic link path elements."
12947 #: ../fish/guestfish-actions.pod:4006
12948 msgid "removexattr"
12952 #: ../fish/guestfish-actions.pod:4008
12955 " removexattr xattr path\n"
12960 #: ../fish/guestfish-actions.pod:4010 ../src/guestfs-actions.pod:6120
12962 "This call removes the extended attribute named C<xattr> of the file C<path>."
12966 #: ../fish/guestfish-actions.pod:4013
12967 msgid "See also: L</lremovexattr>, L<attr(5)>."
12971 #: ../fish/guestfish-actions.pod:4015
12976 #: ../fish/guestfish-actions.pod:4017
12979 " resize2fs device\n"
12984 #: ../fish/guestfish-actions.pod:4019 ../src/guestfs-actions.pod:6135
12986 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12987 "underlying device."
12991 #: ../fish/guestfish-actions.pod:4022
12993 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
12994 "before calling this command. For unknown reasons C<resize2fs> sometimes "
12995 "gives an error about this and sometimes not. In any case, it is always safe "
12996 "to call L</e2fsck-f> before calling this function."
13000 #: ../fish/guestfish-actions.pod:4028
13001 msgid "resize2fs-M"
13005 #: ../fish/guestfish-actions.pod:4030
13008 " resize2fs-M device\n"
13013 #: ../fish/guestfish-actions.pod:4032
13015 "This command is the same as L</resize2fs>, but the filesystem is resized to "
13016 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
13021 #: ../fish/guestfish-actions.pod:4036
13023 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
13024 "and read the C<Block size> and C<Block count> values. These two numbers, "
13025 "multiplied together, give the resulting size of the minimal filesystem in "
13030 #: ../fish/guestfish-actions.pod:4041
13031 msgid "resize2fs-size"
13035 #: ../fish/guestfish-actions.pod:4043
13038 " resize2fs-size device size\n"
13043 #: ../fish/guestfish-actions.pod:4045
13045 "This command is the same as L</resize2fs> except that it allows you to "
13046 "specify the new size (in bytes) explicitly."
13050 #: ../fish/guestfish-actions.pod:4048
13055 #: ../fish/guestfish-actions.pod:4050
13063 #: ../fish/guestfish-actions.pod:4052 ../src/guestfs-actions.pod:6187
13064 msgid "Remove the single file C<path>."
13068 #: ../fish/guestfish-actions.pod:4054
13073 #: ../fish/guestfish-actions.pod:4056
13081 #: ../fish/guestfish-actions.pod:4058 ../src/guestfs-actions.pod:6199
13083 "Remove the file or directory C<path>, recursively removing the contents if "
13084 "its a directory. This is like the C<rm -rf> shell command."
13088 #: ../fish/guestfish-actions.pod:4062
13093 #: ../fish/guestfish-actions.pod:4064
13101 #: ../fish/guestfish-actions.pod:4066 ../src/guestfs-actions.pod:6213
13102 msgid "Remove the single directory C<path>."
13106 #: ../fish/guestfish-actions.pod:4068
13107 msgid "rmmountpoint"
13111 #: ../fish/guestfish-actions.pod:4070
13114 " rmmountpoint exemptpath\n"
13119 #: ../fish/guestfish-actions.pod:4072
13121 "This calls removes a mountpoint that was previously created with L</"
13122 "mkmountpoint>. See L</mkmountpoint> for full details."
13126 #: ../fish/guestfish-actions.pod:4076
13127 msgid "scrub-device"
13131 #: ../fish/guestfish-actions.pod:4078
13134 " scrub-device device\n"
13139 #: ../fish/guestfish-actions.pod:4080 ../src/guestfs-actions.pod:6239
13141 "This command writes patterns over C<device> to make data retrieval more "
13146 #: ../fish/guestfish-actions.pod:4083 ../fish/guestfish-actions.pod:4098
13147 #: ../fish/guestfish-actions.pod:4111 ../src/guestfs-actions.pod:6242
13148 #: ../src/guestfs-actions.pod:6263 ../src/guestfs-actions.pod:6282
13150 "It is an interface to the L<scrub(1)> program. See that manual page for "
13155 #: ../fish/guestfish-actions.pod:4089
13160 #: ../fish/guestfish-actions.pod:4091
13163 " scrub-file file\n"
13168 #: ../fish/guestfish-actions.pod:4093 ../src/guestfs-actions.pod:6258
13170 "This command writes patterns over a file to make data retrieval more "
13175 #: ../fish/guestfish-actions.pod:4096 ../src/guestfs-actions.pod:6261
13176 msgid "The file is I<removed> after scrubbing."
13180 #: ../fish/guestfish-actions.pod:4101
13181 msgid "scrub-freespace"
13185 #: ../fish/guestfish-actions.pod:4103
13188 " scrub-freespace dir\n"
13193 #: ../fish/guestfish-actions.pod:4105
13195 "This command creates the directory C<dir> and then fills it with files until "
13196 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
13197 "deletes them. The intention is to scrub any free space on the partition "
13198 "containing C<dir>."
13202 #: ../fish/guestfish-actions.pod:4114
13207 #: ../fish/guestfish-actions.pod:4116
13212 #: ../fish/guestfish-actions.pod:4118
13215 " set-append append\n"
13220 #: ../fish/guestfish-actions.pod:4120 ../src/guestfs-actions.pod:6295
13222 "This function is used to add additional options to the guest kernel command "
13227 #: ../fish/guestfish-actions.pod:4123 ../src/guestfs-actions.pod:6298
13229 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
13230 "environment variable."
13234 #: ../fish/guestfish-actions.pod:4126 ../src/guestfs-actions.pod:6301
13236 "Setting C<append> to C<NULL> means I<no> additional options are passed "
13237 "(libguestfs always adds a few of its own)."
13241 #: ../fish/guestfish-actions.pod:4129
13242 msgid "set-attach-method"
13246 #: ../fish/guestfish-actions.pod:4131
13247 msgid "attach-method"
13251 #: ../fish/guestfish-actions.pod:4133
13254 " set-attach-method attachmethod\n"
13259 #: ../fish/guestfish-actions.pod:4135 ../src/guestfs-actions.pod:6314
13261 "Set the method that libguestfs uses to connect to the back end guestfsd "
13262 "daemon. Possible methods are:"
13266 #: ../fish/guestfish-actions.pod:4140 ../src/guestfs-actions.pod:6319
13267 #: ../src/guestfs.pod:2826
13268 msgid "C<appliance>"
13272 #: ../fish/guestfish-actions.pod:4142 ../src/guestfs-actions.pod:6321
13274 "Launch an appliance and connect to it. This is the ordinary method and the "
13279 #: ../fish/guestfish-actions.pod:4145 ../src/guestfs-actions.pod:6324
13280 msgid "C<unix:I<path>>"
13284 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6326
13285 msgid "Connect to the Unix domain socket I<path>."
13289 #: ../fish/guestfish-actions.pod:4149 ../src/guestfs-actions.pod:6328
13291 "This method lets you connect to an existing daemon or (using virtio-serial) "
13292 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
13293 "RUNNING DAEMONS>."
13297 #: ../fish/guestfish-actions.pod:4155
13298 msgid "set-autosync"
13302 #: ../fish/guestfish-actions.pod:4157
13307 #: ../fish/guestfish-actions.pod:4159
13310 " set-autosync true|false\n"
13315 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6344
13317 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13318 "effort attempt to make filesystems consistent and synchronized when the "
13319 "handle is closed (also if the program exits without closing handles)."
13323 #: ../fish/guestfish-actions.pod:4166 ../src/guestfs-actions.pod:6349
13325 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13326 "disabled by default)."
13330 #: ../fish/guestfish-actions.pod:4169
13335 #: ../fish/guestfish-actions.pod:4171
13340 #: ../fish/guestfish-actions.pod:4173
13343 " set-direct true|false\n"
13348 #: ../fish/guestfish-actions.pod:4175 ../src/guestfs-actions.pod:6362
13350 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13351 "passed directly through to the appliance once it is launched."
13355 #: ../fish/guestfish-actions.pod:4179
13357 "One consequence of this is that log messages aren't caught by the library "
13358 "and handled by L</set-log-message-callback>, but go straight to stdout."
13362 #: ../fish/guestfish-actions.pod:4183 ../src/guestfs-actions.pod:6370
13363 msgid "You probably don't want to use this unless you know what you are doing."
13367 #: ../fish/guestfish-actions.pod:4186 ../src/guestfs-actions.pod:6373
13368 msgid "The default is disabled."
13372 #: ../fish/guestfish-actions.pod:4188
13373 msgid "set-e2label"
13377 #: ../fish/guestfish-actions.pod:4190
13380 " set-e2label device label\n"
13385 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6386
13387 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13388 "C<label>. Filesystem labels are limited to 16 characters."
13392 #: ../fish/guestfish-actions.pod:4196
13394 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
13395 "label on a filesystem."
13399 #: ../fish/guestfish-actions.pod:4199
13404 #: ../fish/guestfish-actions.pod:4201
13407 " set-e2uuid device uuid\n"
13412 #: ../fish/guestfish-actions.pod:4203 ../src/guestfs-actions.pod:6404
13414 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13415 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13416 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13420 #: ../fish/guestfish-actions.pod:4208
13422 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
13423 "UUID of a filesystem."
13427 #: ../fish/guestfish-actions.pod:4211
13428 msgid "set-memsize"
13432 #: ../fish/guestfish-actions.pod:4213
13437 #: ../fish/guestfish-actions.pod:4215
13440 " set-memsize memsize\n"
13445 #: ../fish/guestfish-actions.pod:4217
13447 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13448 "This only has any effect if called before L</launch>."
13452 #: ../fish/guestfish-actions.pod:4221 ../src/guestfs-actions.pod:6426
13454 "You can also change this by setting the environment variable "
13455 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
13459 #: ../fish/guestfish-actions.pod:4228
13460 msgid "set-network"
13464 #: ../fish/guestfish-actions.pod:4230
13469 #: ../fish/guestfish-actions.pod:4232
13472 " set-network true|false\n"
13477 #: ../fish/guestfish-actions.pod:4234 ../src/guestfs-actions.pod:6443
13479 "If C<network> is true, then the network is enabled in the libguestfs "
13480 "appliance. The default is false."
13484 #: ../fish/guestfish-actions.pod:4237 ../src/guestfs-actions.pod:6446
13486 "This affects whether commands are able to access the network (see L<guestfs"
13487 "(3)/RUNNING COMMANDS>)."
13491 #: ../fish/guestfish-actions.pod:4240
13493 "You must call this before calling L</launch>, otherwise it has no effect."
13497 #: ../fish/guestfish-actions.pod:4243
13502 #: ../fish/guestfish-actions.pod:4247
13505 " set-path searchpath\n"
13510 #: ../fish/guestfish-actions.pod:4249 ../src/guestfs-actions.pod:6462
13511 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13515 #: ../fish/guestfish-actions.pod:4251 ../src/guestfs-actions.pod:6464
13517 "The default is C<$libdir/guestfs> unless overridden by setting "
13518 "C<LIBGUESTFS_PATH> environment variable."
13522 #: ../fish/guestfish-actions.pod:4254 ../src/guestfs-actions.pod:6467
13523 msgid "Setting C<path> to C<NULL> restores the default path."
13527 #: ../fish/guestfish-actions.pod:4256
13532 #: ../fish/guestfish-actions.pod:4258
13537 #: ../fish/guestfish-actions.pod:4260
13540 " set-pgroup true|false\n"
13545 #: ../fish/guestfish-actions.pod:4262 ../src/guestfs-actions.pod:6479
13547 "If C<pgroup> is true, child processes are placed into their own process "
13552 #: ../fish/guestfish-actions.pod:4265 ../src/guestfs-actions.pod:6482
13554 "The practical upshot of this is that signals like C<SIGINT> (from users "
13555 "pressing C<^C>) won't be received by the child process."
13559 #: ../fish/guestfish-actions.pod:4268 ../src/guestfs-actions.pod:6485
13561 "The default for this flag is false, because usually you want C<^C> to kill "
13566 #: ../fish/guestfish-actions.pod:4271
13571 #: ../fish/guestfish-actions.pod:4273
13576 #: ../fish/guestfish-actions.pod:4275
13584 #: ../fish/guestfish-actions.pod:4277 ../src/guestfs-actions.pod:6498
13585 msgid "Set the qemu binary that we will use."
13589 #: ../fish/guestfish-actions.pod:4279 ../src/guestfs-actions.pod:6500
13591 "The default is chosen when the library was compiled by the configure script."
13595 #: ../fish/guestfish-actions.pod:4282 ../src/guestfs-actions.pod:6503
13597 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13602 #: ../fish/guestfish-actions.pod:4285 ../src/guestfs-actions.pod:6506
13603 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13607 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6508
13609 "Note that you should call this function as early as possible after creating "
13610 "the handle. This is because some pre-launch operations depend on testing "
13611 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13612 "don't retest features, and so you might see inconsistent results. Using the "
13613 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13614 "the qemu binary at the same time as the handle is created."
13618 #: ../fish/guestfish-actions.pod:4295
13619 msgid "set-recovery-proc"
13623 #: ../fish/guestfish-actions.pod:4297
13624 msgid "recovery-proc"
13628 #: ../fish/guestfish-actions.pod:4299
13631 " set-recovery-proc true|false\n"
13636 #: ../fish/guestfish-actions.pod:4301
13638 "If this is called with the parameter C<false> then L</launch> does not "
13639 "create a recovery process. The purpose of the recovery process is to stop "
13640 "runaway qemu processes in the case where the main program aborts abruptly."
13644 #: ../fish/guestfish-actions.pod:4306
13646 "This only has any effect if called before L</launch>, and the default is "
13651 #: ../fish/guestfish-actions.pod:4309 ../src/guestfs-actions.pod:6534
13653 "About the only time when you would want to disable this is if the main "
13654 "process will fork itself into the background (\"daemonize\" itself). In "
13655 "this case the recovery process thinks that the main program has disappeared "
13656 "and so kills qemu, which is not very helpful."
13660 #: ../fish/guestfish-actions.pod:4315
13661 msgid "set-selinux"
13665 #: ../fish/guestfish-actions.pod:4317
13670 #: ../fish/guestfish-actions.pod:4319
13673 " set-selinux true|false\n"
13678 #: ../fish/guestfish-actions.pod:4321 ../src/guestfs-actions.pod:6550
13680 "This sets the selinux flag that is passed to the appliance at boot time. "
13681 "The default is C<selinux=0> (disabled)."
13685 #: ../fish/guestfish-actions.pod:4324 ../src/guestfs-actions.pod:6553
13687 "Note that if SELinux is enabled, it is always in Permissive mode "
13688 "(C<enforcing=0>)."
13692 #: ../fish/guestfish-actions.pod:4330
13697 #: ../fish/guestfish-actions.pod:4332
13702 #: ../fish/guestfish-actions.pod:4334
13710 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6569
13712 "Change the number of virtual CPUs assigned to the appliance. The default is "
13713 "C<1>. Increasing this may improve performance, though often it has no "
13718 #: ../fish/guestfish-actions.pod:4340
13719 msgid "This function must be called before L</launch>."
13723 #: ../fish/guestfish-actions.pod:4342
13728 #: ../fish/guestfish-actions.pod:4344
13733 #: ../fish/guestfish-actions.pod:4346
13736 " set-trace true|false\n"
13741 #: ../fish/guestfish-actions.pod:4348 ../src/guestfs-actions.pod:6583
13743 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
13744 "return values are traced."
13748 #: ../fish/guestfish-actions.pod:4351 ../src/guestfs-actions.pod:6586
13750 "If you want to trace C API calls into libguestfs (and other libraries) then "
13751 "possibly a better way is to use the external ltrace(1) command."
13755 #: ../fish/guestfish-actions.pod:4355 ../src/guestfs-actions.pod:6590
13757 "Command traces are disabled unless the environment variable "
13758 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13762 #: ../fish/guestfish-actions.pod:4358
13764 "Trace messages are normally sent to C<stderr>, unless you register a "
13765 "callback to send them somewhere else (see L</set-event-callback>)."
13769 #: ../fish/guestfish-actions.pod:4362
13770 msgid "set-verbose"
13774 #: ../fish/guestfish-actions.pod:4364
13779 #: ../fish/guestfish-actions.pod:4366
13782 " set-verbose true|false\n"
13787 #: ../fish/guestfish-actions.pod:4368 ../src/guestfs-actions.pod:6607
13788 msgid "If C<verbose> is true, this turns on verbose messages."
13792 #: ../fish/guestfish-actions.pod:4370 ../src/guestfs-actions.pod:6609
13794 "Verbose messages are disabled unless the environment variable "
13795 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13799 #: ../fish/guestfish-actions.pod:4373
13801 "Verbose messages are normally sent to C<stderr>, unless you register a "
13802 "callback to send them somewhere else (see L</set-event-callback>)."
13806 #: ../fish/guestfish-actions.pod:4377
13811 #: ../fish/guestfish-actions.pod:4379
13814 " setcon context\n"
13819 #: ../fish/guestfish-actions.pod:4381 ../src/guestfs-actions.pod:6626
13821 "This sets the SELinux security context of the daemon to the string "
13826 #: ../fish/guestfish-actions.pod:4384 ../src/guestfs-actions.pod:6629
13827 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13831 #: ../fish/guestfish-actions.pod:4386
13836 #: ../fish/guestfish-actions.pod:4388
13839 " setxattr xattr val vallen path\n"
13844 #: ../fish/guestfish-actions.pod:4390 ../src/guestfs-actions.pod:6644
13846 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13847 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13851 #: ../fish/guestfish-actions.pod:4394
13852 msgid "See also: L</lsetxattr>, L<attr(5)>."
13856 #: ../fish/guestfish-actions.pod:4396
13861 #: ../fish/guestfish-actions.pod:4398
13864 " sfdisk device cyls heads sectors 'lines ...'\n"
13869 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6671
13871 "This is a direct interface to the L<sfdisk(8)> program for creating "
13872 "partitions on block devices."
13876 #: ../fish/guestfish-actions.pod:4403 ../src/guestfs-actions.pod:6674
13877 msgid "C<device> should be a block device, for example C</dev/sda>."
13881 #: ../fish/guestfish-actions.pod:4405 ../src/guestfs-actions.pod:6676
13883 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13884 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
13885 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13886 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13887 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13888 "the kernel) cannot work out the right geometry and you will need to tell it."
13892 #: ../fish/guestfish-actions.pod:4413 ../src/guestfs-actions.pod:6684
13894 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13895 "refer to the L<sfdisk(8)> manpage."
13899 #: ../fish/guestfish-actions.pod:4416 ../src/guestfs-actions.pod:6687
13901 "To create a single partition occupying the whole disk, you would pass "
13902 "C<lines> as a single element list, when the single element being the string "
13907 #: ../fish/guestfish-actions.pod:4420
13908 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
13912 #: ../fish/guestfish-actions.pod:4426 ../fish/guestfish-actions.pod:4449
13913 #: ../fish/guestfish-actions.pod:4471
13915 "I<This function is deprecated.> In new code, use the L</part_add> call "
13920 #: ../fish/guestfish-actions.pod:4433
13925 #: ../fish/guestfish-actions.pod:4435
13928 " sfdiskM device 'lines ...'\n"
13933 #: ../fish/guestfish-actions.pod:4437
13935 "This is a simplified interface to the L</sfdisk> command, where partition "
13936 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
13937 "you don't need to specify the cyls, heads and sectors parameters which were "
13938 "rarely if ever used anyway."
13942 #: ../fish/guestfish-actions.pod:4443
13943 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
13947 #: ../fish/guestfish-actions.pod:4456
13952 #: ../fish/guestfish-actions.pod:4458
13955 " sfdisk-N device partnum cyls heads sectors line\n"
13960 #: ../fish/guestfish-actions.pod:4460 ../src/guestfs-actions.pod:6749
13962 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13963 "(note: C<n> counts from 1)."
13967 #: ../fish/guestfish-actions.pod:4463
13969 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
13970 "cyls/heads/sectors parameters."
13974 #: ../fish/guestfish-actions.pod:4466
13975 msgid "See also: L</part-add>"
13979 #: ../fish/guestfish-actions.pod:4478
13980 msgid "sfdisk-disk-geometry"
13984 #: ../fish/guestfish-actions.pod:4480
13987 " sfdisk-disk-geometry device\n"
13992 #: ../fish/guestfish-actions.pod:4482
13994 "This displays the disk geometry of C<device> read from the partition table. "
13995 "Especially in the case where the underlying block device has been resized, "
13996 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
13997 "kernel-geometry>)."
14001 #: ../fish/guestfish-actions.pod:4487 ../fish/guestfish-actions.pod:4496
14002 #: ../src/guestfs-actions.pod:6775 ../src/guestfs-actions.pod:6791
14003 msgid "The result is in human-readable format, and not designed to be parsed."
14007 #: ../fish/guestfish-actions.pod:4490
14008 msgid "sfdisk-kernel-geometry"
14012 #: ../fish/guestfish-actions.pod:4492
14015 " sfdisk-kernel-geometry device\n"
14020 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6789
14021 msgid "This displays the kernel's idea of the geometry of C<device>."
14025 #: ../fish/guestfish-actions.pod:4499
14030 #: ../fish/guestfish-actions.pod:4501
14033 " sfdisk-l device\n"
14038 #: ../fish/guestfish-actions.pod:4503 ../src/guestfs-actions.pod:6812
14040 "This displays the partition table on C<device>, in the human-readable output "
14041 "of the L<sfdisk(8)> command. It is not intended to be parsed."
14045 #: ../fish/guestfish-actions.pod:4507
14046 msgid "See also: L</part-list>"
14050 #: ../fish/guestfish-actions.pod:4509
14052 "I<This function is deprecated.> In new code, use the L</part_list> call "
14057 #: ../fish/guestfish-actions.pod:4516
14062 #: ../fish/guestfish-actions.pod:4518
14070 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6829
14072 "This call runs a command from the guest filesystem via the guest's C</bin/"
14077 #: ../fish/guestfish-actions.pod:4523
14078 msgid "This is like L</command>, but passes the command to:"
14082 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6834
14085 " /bin/sh -c \"command\"\n"
14090 #: ../fish/guestfish-actions.pod:4527 ../src/guestfs-actions.pod:6836
14092 "Depending on the guest's shell, this usually results in wildcards being "
14093 "expanded, shell expressions being interpolated and so on."
14097 #: ../fish/guestfish-actions.pod:4531
14098 msgid "All the provisos about L</command> apply to this call."
14102 #: ../fish/guestfish-actions.pod:4533
14107 #: ../fish/guestfish-actions.pod:4535
14110 " sh-lines command\n"
14115 #: ../fish/guestfish-actions.pod:4537
14116 msgid "This is the same as L</sh>, but splits the result into a list of lines."
14120 #: ../fish/guestfish-actions.pod:4540
14121 msgid "See also: L</command-lines>"
14125 #: ../fish/guestfish-actions.pod:4542
14130 #: ../fish/guestfish-actions.pod:4544
14138 #: ../fish/guestfish-actions.pod:4546 ../src/guestfs-actions.pod:6870
14139 msgid "Sleep for C<secs> seconds."
14143 #: ../fish/guestfish-actions.pod:4548
14148 #: ../fish/guestfish-actions.pod:4550
14156 #: ../fish/guestfish-actions.pod:4554 ../src/guestfs-actions.pod:6884
14157 msgid "This is the same as the C<stat(2)> system call."
14161 #: ../fish/guestfish-actions.pod:4556
14166 #: ../fish/guestfish-actions.pod:4558
14174 #: ../fish/guestfish-actions.pod:4560 ../src/guestfs-actions.pod:6898
14176 "Returns file system statistics for any mounted file system. C<path> should "
14177 "be a file or directory in the mounted file system (typically it is the mount "
14178 "point itself, but it doesn't need to be)."
14182 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:6902
14183 msgid "This is the same as the C<statvfs(2)> system call."
14187 #: ../fish/guestfish-actions.pod:4566
14192 #: ../fish/guestfish-actions.pod:4568
14200 #: ../fish/guestfish-actions.pod:4570 ../src/guestfs-actions.pod:6916
14202 "This runs the L<strings(1)> command on a file and returns the list of "
14203 "printable strings found."
14207 #: ../fish/guestfish-actions.pod:4576
14212 #: ../fish/guestfish-actions.pod:4578
14215 " strings-e encoding path\n"
14220 #: ../fish/guestfish-actions.pod:4580
14222 "This is like the L</strings> command, but allows you to specify the encoding "
14223 "of strings that are looked for in the source file C<path>."
14227 #: ../fish/guestfish-actions.pod:4584 ../src/guestfs-actions.pod:6939
14228 msgid "Allowed encodings are:"
14232 #: ../fish/guestfish-actions.pod:4588 ../src/guestfs-actions.pod:6943
14237 #: ../fish/guestfish-actions.pod:4590
14239 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
14240 "ISO-8859-X (this is what L</strings> uses)."
14244 #: ../fish/guestfish-actions.pod:4593 ../src/guestfs-actions.pod:6948
14249 #: ../fish/guestfish-actions.pod:4595 ../src/guestfs-actions.pod:6950
14250 msgid "Single 8-bit-byte characters."
14254 #: ../fish/guestfish-actions.pod:4597 ../src/guestfs-actions.pod:6952
14259 #: ../fish/guestfish-actions.pod:4599 ../src/guestfs-actions.pod:6954
14260 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
14264 #: ../fish/guestfish-actions.pod:4602 ../src/guestfs-actions.pod:6957
14265 msgid "l (lower case letter L)"
14269 #: ../fish/guestfish-actions.pod:4604 ../src/guestfs-actions.pod:6959
14271 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
14272 "examining binaries in Windows guests."
14276 #: ../fish/guestfish-actions.pod:4607 ../src/guestfs-actions.pod:6962
14281 #: ../fish/guestfish-actions.pod:4609 ../src/guestfs-actions.pod:6964
14282 msgid "32-bit big endian such as UCS-4BE."
14286 #: ../fish/guestfish-actions.pod:4611 ../src/guestfs-actions.pod:6966
14291 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:6968
14292 msgid "32-bit little endian such as UCS-4LE."
14296 #: ../fish/guestfish-actions.pod:4617 ../src/guestfs-actions.pod:6972
14297 msgid "The returned strings are transcoded to UTF-8."
14301 #: ../fish/guestfish-actions.pod:4622
14302 msgid "swapoff-device"
14306 #: ../fish/guestfish-actions.pod:4624
14309 " swapoff-device device\n"
14314 #: ../fish/guestfish-actions.pod:4626
14316 "This command disables the libguestfs appliance swap device or partition "
14317 "named C<device>. See L</swapon-device>."
14321 #: ../fish/guestfish-actions.pod:4630
14322 msgid "swapoff-file"
14326 #: ../fish/guestfish-actions.pod:4632
14329 " swapoff-file file\n"
14334 #: ../fish/guestfish-actions.pod:4634 ../src/guestfs-actions.pod:7003
14335 msgid "This command disables the libguestfs appliance swap on file."
14339 #: ../fish/guestfish-actions.pod:4636
14340 msgid "swapoff-label"
14344 #: ../fish/guestfish-actions.pod:4638
14347 " swapoff-label label\n"
14352 #: ../fish/guestfish-actions.pod:4640 ../src/guestfs-actions.pod:7015
14354 "This command disables the libguestfs appliance swap on labeled swap "
14359 #: ../fish/guestfish-actions.pod:4643
14360 msgid "swapoff-uuid"
14364 #: ../fish/guestfish-actions.pod:4645
14367 " swapoff-uuid uuid\n"
14372 #: ../fish/guestfish-actions.pod:4647 ../src/guestfs-actions.pod:7028
14374 "This command disables the libguestfs appliance swap partition with the given "
14379 #: ../fish/guestfish-actions.pod:4650
14380 msgid "swapon-device"
14384 #: ../fish/guestfish-actions.pod:4652
14387 " swapon-device device\n"
14392 #: ../fish/guestfish-actions.pod:4654
14394 "This command enables the libguestfs appliance to use the swap device or "
14395 "partition named C<device>. The increased memory is made available for all "
14396 "commands, for example those run using L</command> or L</sh>."
14400 #: ../fish/guestfish-actions.pod:4659 ../src/guestfs-actions.pod:7046
14402 "Note that you should not swap to existing guest swap partitions unless you "
14403 "know what you are doing. They may contain hibernation information, or other "
14404 "information that the guest doesn't want you to trash. You also risk leaking "
14405 "information about the host to the guest this way. Instead, attach a new "
14406 "host device to the guest and swap on that."
14410 #: ../fish/guestfish-actions.pod:4666
14411 msgid "swapon-file"
14415 #: ../fish/guestfish-actions.pod:4668
14418 " swapon-file file\n"
14423 #: ../fish/guestfish-actions.pod:4670
14425 "This command enables swap to a file. See L</swapon-device> for other notes."
14429 #: ../fish/guestfish-actions.pod:4673
14430 msgid "swapon-label"
14434 #: ../fish/guestfish-actions.pod:4675
14437 " swapon-label label\n"
14442 #: ../fish/guestfish-actions.pod:4677
14444 "This command enables swap to a labeled swap partition. See L</swapon-"
14445 "device> for other notes."
14449 #: ../fish/guestfish-actions.pod:4680
14450 msgid "swapon-uuid"
14454 #: ../fish/guestfish-actions.pod:4682
14457 " swapon-uuid uuid\n"
14462 #: ../fish/guestfish-actions.pod:4684
14464 "This command enables swap to a swap partition with the given UUID. See L</"
14465 "swapon-device> for other notes."
14469 #: ../fish/guestfish-actions.pod:4687
14474 #: ../fish/guestfish-actions.pod:4689
14482 #: ../fish/guestfish-actions.pod:4691 ../src/guestfs-actions.pod:7101
14484 "This syncs the disk, so that any writes are flushed through to the "
14485 "underlying disk image."
14489 #: ../fish/guestfish-actions.pod:4694 ../src/guestfs-actions.pod:7104
14491 "You should always call this if you have modified a disk image, before "
14492 "closing the handle."
14496 #: ../fish/guestfish-actions.pod:4697
14501 #: ../fish/guestfish-actions.pod:4699
14509 #: ../fish/guestfish-actions.pod:4701 ../src/guestfs-actions.pod:7117
14511 "This command returns up to the last 10 lines of a file as a list of strings."
14515 #: ../fish/guestfish-actions.pod:4707
14520 #: ../fish/guestfish-actions.pod:4709
14523 " tail-n nrlines path\n"
14528 #: ../fish/guestfish-actions.pod:4711 ../src/guestfs-actions.pod:7136
14530 "If the parameter C<nrlines> is a positive number, this returns the last "
14531 "C<nrlines> lines of the file C<path>."
14535 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7139
14537 "If the parameter C<nrlines> is a negative number, this returns lines from "
14538 "the file C<path>, starting with the C<-nrlines>th line."
14542 #: ../fish/guestfish-actions.pod:4722
14547 #: ../fish/guestfish-actions.pod:4724
14550 " tar-in (tarfile|-) directory\n"
14555 #: ../fish/guestfish-actions.pod:4726 ../src/guestfs-actions.pod:7160
14557 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14558 "tar file) into C<directory>."
14562 #: ../fish/guestfish-actions.pod:4729
14563 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
14567 #: ../fish/guestfish-actions.pod:4734
14572 #: ../fish/guestfish-actions.pod:4736
14575 " tar-out directory (tarfile|-)\n"
14580 #: ../fish/guestfish-actions.pod:4738 ../src/guestfs-actions.pod:7177
14582 "This command packs the contents of C<directory> and downloads it to local "
14587 #: ../fish/guestfish-actions.pod:4741
14588 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
14592 #: ../fish/guestfish-actions.pod:4746
14597 #: ../fish/guestfish-actions.pod:4748
14600 " tgz-in (tarball|-) directory\n"
14605 #: ../fish/guestfish-actions.pod:4750 ../src/guestfs-actions.pod:7194
14607 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14608 "tar file) into C<directory>."
14612 #: ../fish/guestfish-actions.pod:4753
14613 msgid "To upload an uncompressed tarball, use L</tar-in>."
14617 #: ../fish/guestfish-actions.pod:4757
14622 #: ../fish/guestfish-actions.pod:4759
14625 " tgz-out directory (tarball|-)\n"
14630 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7210
14632 "This command packs the contents of C<directory> and downloads it to local "
14637 #: ../fish/guestfish-actions.pod:4764
14638 msgid "To download an uncompressed tarball, use L</tar-out>."
14642 #: ../fish/guestfish-actions.pod:4768
14647 #: ../fish/guestfish-actions.pod:4770
14655 #: ../fish/guestfish-actions.pod:4772 ../src/guestfs-actions.pod:7225
14657 "Touch acts like the L<touch(1)> command. It can be used to update the "
14658 "timestamps on a file, or, if the file does not exist, to create a new zero-"
14663 #: ../fish/guestfish-actions.pod:4776 ../src/guestfs-actions.pod:7229
14665 "This command only works on regular files, and will fail on other file types "
14666 "such as directories, symbolic links, block special etc."
14670 #: ../fish/guestfish-actions.pod:4779
14675 #: ../fish/guestfish-actions.pod:4781
14683 #: ../fish/guestfish-actions.pod:4783 ../src/guestfs-actions.pod:7242
14685 "This command truncates C<path> to a zero-length file. The file must exist "
14690 #: ../fish/guestfish-actions.pod:4786
14691 msgid "truncate-size"
14695 #: ../fish/guestfish-actions.pod:4788
14698 " truncate-size path size\n"
14703 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7256
14705 "This command truncates C<path> to size C<size> bytes. The file must exist "
14710 #: ../fish/guestfish-actions.pod:4793
14712 "If the current file size is less than C<size> then the file is extended to "
14713 "the required size with zero bytes. This creates a sparse file (ie. disk "
14714 "blocks are not allocated for the file until you write to it). To create a "
14715 "non-sparse file of zeroes, use L</fallocate64> instead."
14719 #: ../fish/guestfish-actions.pod:4799
14724 #: ../fish/guestfish-actions.pod:4801
14727 " tune2fs-l device\n"
14732 #: ../fish/guestfish-actions.pod:4803 ../src/guestfs-actions.pod:7275
14734 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14739 #: ../fish/guestfish-actions.pod:4806 ../src/guestfs-actions.pod:7278
14741 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14742 "for more details. The list of fields returned isn't clearly defined, and "
14743 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14744 "and the filesystem itself."
14748 #: ../fish/guestfish-actions.pod:4811
14753 #: ../fish/guestfish-actions.pod:4813
14756 " txz-in (tarball|-) directory\n"
14761 #: ../fish/guestfish-actions.pod:4815 ../src/guestfs-actions.pod:7298
14763 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14764 "tar file) into C<directory>."
14768 #: ../fish/guestfish-actions.pod:4820
14773 #: ../fish/guestfish-actions.pod:4822
14776 " txz-out directory (tarball|-)\n"
14781 #: ../fish/guestfish-actions.pod:4824 ../src/guestfs-actions.pod:7312
14783 "This command packs the contents of C<directory> and downloads it to local "
14784 "file C<tarball> (as an xz compressed tar archive)."
14788 #: ../fish/guestfish-actions.pod:4829
14793 #: ../fish/guestfish-actions.pod:4831
14801 #: ../fish/guestfish-actions.pod:4833 ../src/guestfs-actions.pod:7325
14803 "This function sets the mask used for creating new files and device nodes to "
14808 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7328
14810 "Typical umask values would be C<022> which creates new files with "
14811 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14812 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14816 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7333
14818 "The default umask is C<022>. This is important because it means that "
14819 "directories and device nodes will be created with C<0644> or C<0755> mode "
14820 "even if you specify C<0777>."
14824 #: ../fish/guestfish-actions.pod:4845
14825 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
14829 #: ../fish/guestfish-actions.pod:4848 ../src/guestfs-actions.pod:7340
14830 msgid "This call returns the previous umask."
14834 #: ../fish/guestfish-actions.pod:4850
14839 #: ../fish/guestfish-actions.pod:4852
14844 #: ../fish/guestfish-actions.pod:4854
14847 " umount pathordevice\n"
14852 #: ../fish/guestfish-actions.pod:4856 ../src/guestfs-actions.pod:7352
14854 "This unmounts the given filesystem. The filesystem may be specified either "
14855 "by its mountpoint (path) or the device which contains the filesystem."
14859 #: ../fish/guestfish-actions.pod:4860
14864 #: ../fish/guestfish-actions.pod:4862
14865 msgid "unmount-all"
14869 #: ../fish/guestfish-actions.pod:4864
14877 #: ../fish/guestfish-actions.pod:4866 ../src/guestfs-actions.pod:7365
14878 msgid "This unmounts all mounted filesystems."
14882 #: ../fish/guestfish-actions.pod:4868 ../src/guestfs-actions.pod:7367
14883 msgid "Some internal mounts are not unmounted by this call."
14887 #: ../fish/guestfish-actions.pod:4870
14892 #: ../fish/guestfish-actions.pod:4872
14895 " upload (filename|-) remotefilename\n"
14900 #: ../fish/guestfish-actions.pod:4874 ../fish/guestfish-actions.pod:4887
14901 #: ../src/guestfs-actions.pod:7380 ../src/guestfs-actions.pod:7404
14902 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14906 #: ../fish/guestfish-actions.pod:4879
14907 msgid "See also L</download>."
14911 #: ../fish/guestfish-actions.pod:4883
14912 msgid "upload-offset"
14916 #: ../fish/guestfish-actions.pod:4885
14919 " upload-offset (filename|-) remotefilename offset\n"
14924 #: ../fish/guestfish-actions.pod:4890 ../src/guestfs-actions.pod:7407
14926 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14927 "The intention is to overwrite parts of existing files or devices, although "
14928 "if a non-existant file is specified then it is created with a \"hole\" "
14929 "before C<offset>. The size of the data written is implicit in the size of "
14930 "the source C<filename>."
14934 #: ../fish/guestfish-actions.pod:4897
14936 "Note that there is no limit on the amount of data that can be uploaded with "
14937 "this call, unlike with L</pwrite>, and this call always writes the full "
14938 "amount unless an error occurs."
14942 #: ../fish/guestfish-actions.pod:4902
14943 msgid "See also L</upload>, L</pwrite>."
14947 #: ../fish/guestfish-actions.pod:4906
14952 #: ../fish/guestfish-actions.pod:4908
14955 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
14960 #: ../fish/guestfish-actions.pod:4910 ../src/guestfs-actions.pod:7440
14961 msgid "This command sets the timestamps of a file with nanosecond precision."
14965 #: ../fish/guestfish-actions.pod:4913 ../src/guestfs-actions.pod:7443
14967 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14972 #: ../fish/guestfish-actions.pod:4916 ../src/guestfs-actions.pod:7446
14974 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14975 "nanoseconds from the epoch."
14979 #: ../fish/guestfish-actions.pod:4919 ../src/guestfs-actions.pod:7449
14981 "If the C<*nsecs> field contains the special value C<-1> then the "
14982 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14983 "ignored in this case)."
14987 #: ../fish/guestfish-actions.pod:4923 ../src/guestfs-actions.pod:7453
14989 "If the C<*nsecs> field contains the special value C<-2> then the "
14990 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
14995 #: ../fish/guestfish-actions.pod:4927
15000 #: ../fish/guestfish-actions.pod:4929
15008 #: ../fish/guestfish-actions.pod:4931 ../src/guestfs-actions.pod:7466
15010 "Return the libguestfs version number that the program is linked against."
15014 #: ../fish/guestfish-actions.pod:4934 ../src/guestfs-actions.pod:7469
15016 "Note that because of dynamic linking this is not necessarily the version of "
15017 "libguestfs that you compiled against. You can compile the program, and then "
15018 "at runtime dynamically link against a completely different C<libguestfs.so> "
15023 #: ../fish/guestfish-actions.pod:4939 ../src/guestfs-actions.pod:7474
15025 "This call was added in version C<1.0.58>. In previous versions of "
15026 "libguestfs there was no way to get the version number. From C code you can "
15027 "use dynamic linker functions to find out if this symbol exists (if it "
15028 "doesn't, then it's an earlier version)."
15032 #: ../fish/guestfish-actions.pod:4945 ../src/guestfs-actions.pod:7480
15034 "The call returns a structure with four elements. The first three (C<major>, "
15035 "C<minor> and C<release>) are numbers and correspond to the usual version "
15036 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
15037 "but may be used for distro-specific information."
15041 #: ../fish/guestfish-actions.pod:4951 ../src/guestfs-actions.pod:7486
15043 "To construct the original version string: C<$major.$minor.$release$extra>"
15047 #: ../fish/guestfish-actions.pod:4954 ../src/guestfs-actions.pod:7489
15048 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
15052 #: ../fish/guestfish-actions.pod:4956
15054 "I<Note:> Don't use this call to test for availability of features. In "
15055 "enterprise distributions we backport features from later versions into "
15056 "earlier versions, making this an unreliable way to test for features. Use "
15057 "L</available> instead."
15061 #: ../fish/guestfish-actions.pod:4962
15066 #: ../fish/guestfish-actions.pod:4964
15069 " vfs-label device\n"
15074 #: ../fish/guestfish-actions.pod:4966 ../src/guestfs-actions.pod:7509
15075 msgid "This returns the filesystem label of the filesystem on C<device>."
15079 #: ../fish/guestfish-actions.pod:4969 ../src/guestfs-actions.pod:7512
15080 msgid "If the filesystem is unlabeled, this returns the empty string."
15084 #: ../fish/guestfish-actions.pod:4971
15085 msgid "To find a filesystem from the label, use L</findfs-label>."
15089 #: ../fish/guestfish-actions.pod:4973
15094 #: ../fish/guestfish-actions.pod:4975
15097 " vfs-type device\n"
15102 #: ../fish/guestfish-actions.pod:4977 ../src/guestfs-actions.pod:7527
15104 "This command gets the filesystem type corresponding to the filesystem on "
15109 #: ../fish/guestfish-actions.pod:4980 ../src/guestfs-actions.pod:7530
15111 "For most filesystems, the result is the name of the Linux VFS module which "
15112 "would be used to mount this filesystem if you mounted it without specifying "
15113 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
15117 #: ../fish/guestfish-actions.pod:4985
15122 #: ../fish/guestfish-actions.pod:4987
15125 " vfs-uuid device\n"
15130 #: ../fish/guestfish-actions.pod:4989 ../src/guestfs-actions.pod:7546
15131 msgid "This returns the filesystem UUID of the filesystem on C<device>."
15135 #: ../fish/guestfish-actions.pod:4992 ../src/guestfs-actions.pod:7549
15136 msgid "If the filesystem does not have a UUID, this returns the empty string."
15140 #: ../fish/guestfish-actions.pod:4994
15141 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
15145 #: ../fish/guestfish-actions.pod:4996
15146 msgid "vg-activate"
15150 #: ../fish/guestfish-actions.pod:4998
15153 " vg-activate true|false 'volgroups ...'\n"
15158 #: ../fish/guestfish-actions.pod:5000 ../src/guestfs-actions.pod:7565
15160 "This command activates or (if C<activate> is false) deactivates all logical "
15161 "volumes in the listed volume groups C<volgroups>."
15165 #: ../fish/guestfish-actions.pod:5003 ../src/guestfs-actions.pod:7568
15166 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
15170 #: ../fish/guestfish-actions.pod:5005 ../src/guestfs-actions.pod:7570
15172 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
15173 "activated or deactivated."
15177 #: ../fish/guestfish-actions.pod:5008
15178 msgid "vg-activate-all"
15182 #: ../fish/guestfish-actions.pod:5010
15185 " vg-activate-all true|false\n"
15190 #: ../fish/guestfish-actions.pod:5012 ../src/guestfs-actions.pod:7583
15192 "This command activates or (if C<activate> is false) deactivates all logical "
15193 "volumes in all volume groups."
15197 #: ../fish/guestfish-actions.pod:5015 ../src/guestfs-actions.pod:7586
15198 msgid "This command is the same as running C<vgchange -a y|n>"
15202 #: ../fish/guestfish-actions.pod:5017
15207 #: ../fish/guestfish-actions.pod:5019
15210 " vgcreate volgroup 'physvols ...'\n"
15215 #: ../fish/guestfish-actions.pod:5021 ../src/guestfs-actions.pod:7599
15217 "This creates an LVM volume group called C<volgroup> from the non-empty list "
15218 "of physical volumes C<physvols>."
15222 #: ../fish/guestfish-actions.pod:5024
15227 #: ../fish/guestfish-actions.pod:5026
15230 " vglvuuids vgname\n"
15235 #: ../fish/guestfish-actions.pod:5028 ../src/guestfs-actions.pod:7612
15237 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
15238 "volumes created in this volume group."
15242 #: ../fish/guestfish-actions.pod:5031
15244 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
15245 "logical volumes and volume groups."
15249 #: ../fish/guestfish-actions.pod:5034
15250 msgid "See also L</vgpvuuids>."
15254 #: ../fish/guestfish-actions.pod:5036
15259 #: ../fish/guestfish-actions.pod:5038
15262 " vgpvuuids vgname\n"
15267 #: ../fish/guestfish-actions.pod:5040 ../src/guestfs-actions.pod:7632
15269 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
15270 "volumes that this volume group resides on."
15274 #: ../fish/guestfish-actions.pod:5043
15276 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
15277 "physical volumes and volume groups."
15281 #: ../fish/guestfish-actions.pod:5046
15282 msgid "See also L</vglvuuids>."
15286 #: ../fish/guestfish-actions.pod:5048
15291 #: ../fish/guestfish-actions.pod:5050
15294 " vgremove vgname\n"
15299 #: ../fish/guestfish-actions.pod:5052 ../src/guestfs-actions.pod:7652
15300 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15304 #: ../fish/guestfish-actions.pod:5054 ../src/guestfs-actions.pod:7654
15306 "This also forcibly removes all logical volumes in the volume group (if any)."
15310 #: ../fish/guestfish-actions.pod:5057
15315 #: ../fish/guestfish-actions.pod:5059
15318 " vgrename volgroup newvolgroup\n"
15323 #: ../fish/guestfish-actions.pod:5061 ../src/guestfs-actions.pod:7668
15324 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15328 #: ../fish/guestfish-actions.pod:5063
15333 #: ../fish/guestfish-actions.pod:5065
15341 #: ../fish/guestfish-actions.pod:5067 ../src/guestfs-actions.pod:7679
15343 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
15348 #: ../fish/guestfish-actions.pod:5070 ../src/guestfs-actions.pod:7682
15350 "This returns a list of just the volume group names that were detected (eg. "
15355 #: ../fish/guestfish-actions.pod:5073
15356 msgid "See also L</vgs-full>."
15360 #: ../fish/guestfish-actions.pod:5075
15365 #: ../fish/guestfish-actions.pod:5077
15373 #: ../fish/guestfish-actions.pod:5079 ../src/guestfs-actions.pod:7698
15375 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
15376 "> command. The \"full\" version includes all fields."
15380 #: ../fish/guestfish-actions.pod:5082
15385 #: ../fish/guestfish-actions.pod:5084
15393 #: ../fish/guestfish-actions.pod:5086 ../src/guestfs-actions.pod:7712
15395 "This rescans all block devices and rebuilds the list of LVM physical "
15396 "volumes, volume groups and logical volumes."
15400 #: ../fish/guestfish-actions.pod:5089
15405 #: ../fish/guestfish-actions.pod:5091
15413 #: ../fish/guestfish-actions.pod:5093 ../src/guestfs-actions.pod:7725
15414 msgid "This command returns the UUID of the LVM VG named C<vgname>."
15418 #: ../fish/guestfish-actions.pod:5095
15423 #: ../fish/guestfish-actions.pod:5097
15431 #: ../fish/guestfish-actions.pod:5099 ../src/guestfs-actions.pod:7765
15433 "This command counts the characters in a file, using the C<wc -c> external "
15438 #: ../fish/guestfish-actions.pod:5102
15443 #: ../fish/guestfish-actions.pod:5104
15451 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7778
15453 "This command counts the lines in a file, using the C<wc -l> external command."
15457 #: ../fish/guestfish-actions.pod:5109
15462 #: ../fish/guestfish-actions.pod:5111
15470 #: ../fish/guestfish-actions.pod:5113 ../src/guestfs-actions.pod:7791
15472 "This command counts the words in a file, using the C<wc -w> external command."
15476 #: ../fish/guestfish-actions.pod:5116
15481 #: ../fish/guestfish-actions.pod:5118
15484 " write path content\n"
15489 #: ../fish/guestfish-actions.pod:5120 ../src/guestfs-actions.pod:7806
15491 "This call creates a file called C<path>. The content of the file is the "
15492 "string C<content> (which can contain any 8 bit data)."
15496 #: ../fish/guestfish-actions.pod:5123
15497 msgid "See also L</write-append>."
15501 #: ../fish/guestfish-actions.pod:5128
15502 msgid "write-append"
15506 #: ../fish/guestfish-actions.pod:5130
15509 " write-append path content\n"
15514 #: ../fish/guestfish-actions.pod:5132 ../src/guestfs-actions.pod:7826
15516 "This call appends C<content> to the end of file C<path>. If C<path> does "
15517 "not exist, then a new file is created."
15521 #: ../fish/guestfish-actions.pod:5135
15522 msgid "See also L</write>."
15526 #: ../fish/guestfish-actions.pod:5140
15531 #: ../fish/guestfish-actions.pod:5142
15534 " write-file path content size\n"
15539 #: ../fish/guestfish-actions.pod:5144 ../src/guestfs-actions.pod:7853
15541 "This call creates a file called C<path>. The contents of the file is the "
15542 "string C<content> (which can contain any 8 bit data), with length C<size>."
15546 #: ../fish/guestfish-actions.pod:5148 ../src/guestfs-actions.pod:7857
15548 "As a special case, if C<size> is C<0> then the length is calculated using "
15549 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15553 #: ../fish/guestfish-actions.pod:5152 ../src/guestfs-actions.pod:7861
15555 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15556 "I<not> work, even if the length is specified."
15560 #: ../fish/guestfish-actions.pod:5158
15562 "I<This function is deprecated.> In new code, use the L</write> call instead."
15566 #: ../fish/guestfish-actions.pod:5165
15571 #: ../fish/guestfish-actions.pod:5167
15574 " zegrep regex path\n"
15579 #: ../fish/guestfish-actions.pod:5169 ../src/guestfs-actions.pod:7878
15581 "This calls the external C<zegrep> program and returns the matching lines."
15585 #: ../fish/guestfish-actions.pod:5175
15590 #: ../fish/guestfish-actions.pod:5177
15593 " zegrepi regex path\n"
15598 #: ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:7897
15600 "This calls the external C<zegrep -i> program and returns the matching lines."
15604 #: ../fish/guestfish-actions.pod:5185
15609 #: ../fish/guestfish-actions.pod:5187
15617 #: ../fish/guestfish-actions.pod:5189 ../src/guestfs-actions.pod:7915
15618 msgid "This command writes zeroes over the first few blocks of C<device>."
15622 #: ../fish/guestfish-actions.pod:5191 ../src/guestfs-actions.pod:7917
15624 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15625 "securely wipe the device). It should be sufficient to remove any partition "
15626 "tables, filesystem superblocks and so on."
15630 #: ../fish/guestfish-actions.pod:5195 ../fish/guestfish-actions.pod:5210
15631 #: ../src/guestfs-actions.pod:7921 ../src/guestfs-actions.pod:7947
15633 "If blocks are already zero, then this command avoids writing zeroes. This "
15634 "prevents the underlying device from becoming non-sparse or growing "
15639 #: ../fish/guestfish-actions.pod:5199
15640 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
15644 #: ../fish/guestfish-actions.pod:5202
15645 msgid "zero-device"
15649 #: ../fish/guestfish-actions.pod:5204
15652 " zero-device device\n"
15657 #: ../fish/guestfish-actions.pod:5206
15659 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
15660 "which just zeroes the first few blocks of a device."
15664 #: ../fish/guestfish-actions.pod:5217
15669 #: ../fish/guestfish-actions.pod:5219
15672 " zerofree device\n"
15677 #: ../fish/guestfish-actions.pod:5221 ../src/guestfs-actions.pod:7969
15679 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15680 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15681 "possible to compress the filesystem more effectively."
15685 #: ../fish/guestfish-actions.pod:5226 ../src/guestfs-actions.pod:7974
15686 msgid "You should B<not> run this program if the filesystem is mounted."
15690 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:7977
15692 "It is possible that using this program can damage the filesystem or data on "
15697 #: ../fish/guestfish-actions.pod:5232
15702 #: ../fish/guestfish-actions.pod:5234
15705 " zfgrep pattern path\n"
15710 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:7991
15712 "This calls the external C<zfgrep> program and returns the matching lines."
15716 #: ../fish/guestfish-actions.pod:5242
15721 #: ../fish/guestfish-actions.pod:5244
15724 " zfgrepi pattern path\n"
15729 #: ../fish/guestfish-actions.pod:5246 ../src/guestfs-actions.pod:8010
15731 "This calls the external C<zfgrep -i> program and returns the matching lines."
15735 #: ../fish/guestfish-actions.pod:5252
15740 #: ../fish/guestfish-actions.pod:5254
15743 " zfile meth path\n"
15748 #: ../fish/guestfish-actions.pod:5256 ../src/guestfs-actions.pod:8036
15750 "This command runs C<file> after first decompressing C<path> using C<method>."
15754 #: ../fish/guestfish-actions.pod:5259 ../src/guestfs-actions.pod:8039
15755 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15759 #: ../fish/guestfish-actions.pod:5261
15761 "Since 1.0.63, use L</file> instead which can now process compressed files."
15765 #: ../fish/guestfish-actions.pod:5264
15767 "I<This function is deprecated.> In new code, use the L</file> call instead."
15771 #: ../fish/guestfish-actions.pod:5271
15776 #: ../fish/guestfish-actions.pod:5273
15779 " zgrep regex path\n"
15784 #: ../fish/guestfish-actions.pod:5275 ../src/guestfs-actions.pod:8056
15786 "This calls the external C<zgrep> program and returns the matching lines."
15790 #: ../fish/guestfish-actions.pod:5281
15795 #: ../fish/guestfish-actions.pod:5283
15798 " zgrepi regex path\n"
15803 #: ../fish/guestfish-actions.pod:5285 ../src/guestfs-actions.pod:8075
15805 "This calls the external C<zgrep -i> program and returns the matching lines."
15809 #: ../fish/guestfish-commands.pod:1
15814 #: ../fish/guestfish-commands.pod:3
15819 #: ../fish/guestfish-commands.pod:5
15822 " alloc filename size\n"
15827 #: ../fish/guestfish-commands.pod:7
15829 "This creates an empty (zeroed) file of the given size, and then adds so it "
15830 "can be further examined."
15834 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
15835 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
15839 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
15840 msgid "Size can be specified using standard suffixes, eg. C<1M>."
15844 #: ../fish/guestfish-commands.pod:14
15846 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
15847 "image, see L</PREPARED DISK IMAGES>."
15851 #: ../fish/guestfish-commands.pod:17
15856 #: ../fish/guestfish-commands.pod:19
15859 " copy-in local [local ...] /remotedir\n"
15864 #: ../fish/guestfish-commands.pod:21
15866 "C<copy-in> copies local files or directories recursively into the disk "
15867 "image, placing them in the directory called C</remotedir> (which must "
15868 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
15869 "other commands as necessary."
15873 #: ../fish/guestfish-commands.pod:26
15875 "Multiple local files and directories can be specified, but the last "
15876 "parameter must always be a remote directory. Wildcards cannot be used."
15880 #: ../fish/guestfish-commands.pod:30
15885 #: ../fish/guestfish-commands.pod:32
15888 " copy-out remote [remote ...] localdir\n"
15893 #: ../fish/guestfish-commands.pod:34
15895 "C<copy-out> copies remote files or directories recursively out of the disk "
15896 "image, placing them on the host disk in a local directory called C<localdir> "
15897 "(which must exist). This guestfish meta-command turns into a sequence of L</"
15898 "download>, L</tar-out> and other commands as necessary."
15902 #: ../fish/guestfish-commands.pod:40
15904 "Multiple remote files and directories can be specified, but the last "
15905 "parameter must always be a local directory. To download to the current "
15906 "directory, use C<.> as in:"
15910 #: ../fish/guestfish-commands.pod:44
15913 " copy-out /home .\n"
15918 #: ../fish/guestfish-commands.pod:46
15920 "Wildcards cannot be used in the ordinary command, but you can use them with "
15921 "the help of L</glob> like this:"
15925 #: ../fish/guestfish-commands.pod:49
15928 " glob copy-out /home/* .\n"
15933 #: ../fish/guestfish-commands.pod:51
15938 #: ../fish/guestfish-commands.pod:53
15941 " display filename\n"
15946 #: ../fish/guestfish-commands.pod:55
15948 "Use C<display> (a graphical display program) to display an image file. It "
15949 "downloads the file, and runs C<display> on it."
15953 #: ../fish/guestfish-commands.pod:58
15955 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
15956 "environment variable. For example to use the GNOME display program:"
15960 #: ../fish/guestfish-commands.pod:61
15963 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
15968 #: ../fish/guestfish-commands.pod:63
15969 msgid "See also L<display(1)>."
15973 #: ../fish/guestfish-commands.pod:65
15978 #: ../fish/guestfish-commands.pod:67
15981 " echo [params ...]\n"
15986 #: ../fish/guestfish-commands.pod:69
15987 msgid "This echos the parameters to the terminal."
15991 #: ../fish/guestfish-commands.pod:71
15996 #: ../fish/guestfish-commands.pod:73
16001 #: ../fish/guestfish-commands.pod:75
16006 #: ../fish/guestfish-commands.pod:77
16014 #: ../fish/guestfish-commands.pod:79
16016 "This is used to edit a file. It downloads the file, edits it locally using "
16017 "your editor, then uploads the result."
16021 #: ../fish/guestfish-commands.pod:82
16023 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
16024 "or C<emacs> you will get those corresponding editors."
16028 #: ../fish/guestfish-commands.pod:86
16033 #: ../fish/guestfish-commands.pod:88
16036 " glob command args...\n"
16041 #: ../fish/guestfish-commands.pod:90
16043 "Expand wildcards in any paths in the args list, and run C<command> "
16044 "repeatedly on each matching path."
16048 #: ../fish/guestfish-commands.pod:93
16049 msgid "See L</WILDCARDS AND GLOBBING>."
16053 #: ../fish/guestfish-commands.pod:95
16058 #: ../fish/guestfish-commands.pod:97
16061 " hexedit <filename|device>\n"
16062 " hexedit <filename|device> <max>\n"
16063 " hexedit <filename|device> <start> <max>\n"
16068 #: ../fish/guestfish-commands.pod:101
16070 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
16075 #: ../fish/guestfish-commands.pod:104
16077 "This command works by downloading potentially the whole file or device, "
16078 "editing it locally, then uploading it. If the file or device is large, you "
16079 "have to specify which part you wish to edit by using C<max> and/or C<start> "
16080 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
16081 "usual modifiers allowed such as C<1M> (1 megabyte)."
16085 #: ../fish/guestfish-commands.pod:111
16086 msgid "For example to edit the first few sectors of a disk you might do:"
16090 #: ../fish/guestfish-commands.pod:114
16093 " hexedit /dev/sda 1M\n"
16098 #: ../fish/guestfish-commands.pod:116
16100 "which would allow you to edit anywhere within the first megabyte of the disk."
16104 #: ../fish/guestfish-commands.pod:119
16105 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
16109 #: ../fish/guestfish-commands.pod:121
16112 " hexedit /dev/sda1 0x400 0x400\n"
16117 #: ../fish/guestfish-commands.pod:123
16118 msgid "(assuming the superblock is in the standard location)."
16122 #: ../fish/guestfish-commands.pod:125
16124 "This command requires the external L<hexedit(1)> program. You can specify "
16125 "another program to use by setting the C<HEXEDITOR> environment variable."
16129 #: ../fish/guestfish-commands.pod:129
16130 msgid "See also L</hexdump>."
16134 #: ../fish/guestfish-commands.pod:131
16139 #: ../fish/guestfish-commands.pod:133
16147 #: ../fish/guestfish-commands.pod:135
16149 "Change the local directory, ie. the current directory of guestfish itself."
16153 #: ../fish/guestfish-commands.pod:138
16154 msgid "Note that C<!cd> won't do what you might expect."
16158 #: ../fish/guestfish-commands.pod:140
16163 #: ../fish/guestfish-commands.pod:142
16168 #: ../fish/guestfish-commands.pod:144
16176 #: ../fish/guestfish-commands.pod:146
16177 msgid "Opens the manual page for guestfish."
16181 #: ../fish/guestfish-commands.pod:148
16186 #: ../fish/guestfish-commands.pod:150
16191 #: ../fish/guestfish-commands.pod:152
16199 #: ../fish/guestfish-commands.pod:154
16207 #: ../fish/guestfish-commands.pod:156
16208 msgid "This is used to view a file."
16212 #: ../fish/guestfish-commands.pod:158
16214 "The default viewer is C<$PAGER>. However if you use the alternate command "
16215 "C<less> you will get the C<less> command specifically."
16219 #: ../fish/guestfish-commands.pod:161
16224 #: ../fish/guestfish-commands.pod:163
16232 #: ../fish/guestfish-commands.pod:165
16234 "Close and reopen the libguestfs handle. It is not necessary to use this "
16235 "normally, because the handle is closed properly when guestfish exits. "
16236 "However this is occasionally useful for testing."
16240 #: ../fish/guestfish-commands.pod:169
16245 #: ../fish/guestfish-commands.pod:171
16248 " setenv VAR value\n"
16253 #: ../fish/guestfish-commands.pod:173
16254 msgid "Set the environment variable C<VAR> to the string C<value>."
16258 #: ../fish/guestfish-commands.pod:175
16260 "To print the value of an environment variable use a shell command such as:"
16264 #: ../fish/guestfish-commands.pod:178
16272 #: ../fish/guestfish-commands.pod:180
16277 #: ../fish/guestfish-commands.pod:182
16280 " sparse filename size\n"
16285 #: ../fish/guestfish-commands.pod:184
16287 "This creates an empty sparse file of the given size, and then adds so it can "
16288 "be further examined."
16292 #: ../fish/guestfish-commands.pod:187
16294 "In all respects it works the same as the L</alloc> command, except that the "
16295 "image file is allocated sparsely, which means that disk blocks are not "
16296 "assigned to the file until they are needed. Sparse disk files only use "
16297 "space when written to, but they are slower and there is a danger you could "
16298 "run out of real disk space during a write operation."
16302 #: ../fish/guestfish-commands.pod:197
16307 #: ../fish/guestfish-commands.pod:199
16315 #: ../fish/guestfish-commands.pod:201
16317 "This command returns a list of the optional groups known to the daemon, and "
16318 "indicates which ones are supported by this build of the libguestfs appliance."
16322 #: ../fish/guestfish-commands.pod:205
16323 msgid "See also L<guestfs(3)/AVAILABILITY>."
16327 #: ../fish/guestfish-commands.pod:207
16332 #: ../fish/guestfish-commands.pod:209
16335 " time command args...\n"
16340 #: ../fish/guestfish-commands.pod:211
16342 "Run the command as usual, but print the elapsed time afterwards. This can "
16343 "be useful for benchmarking operations."
16347 #: ../fish/guestfish-commands.pod:214
16352 #: ../fish/guestfish-commands.pod:216
16360 #: ../fish/guestfish-commands.pod:218
16361 msgid "Remove C<VAR> from the environment."
16365 #: ../fish/guestfish.pod:5
16366 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16370 #: ../fish/guestfish.pod:9
16373 " guestfish [--options] [commands]\n"
16378 #: ../fish/guestfish.pod:11
16386 #: ../fish/guestfish.pod:13
16389 " guestfish [--ro|--rw] -a disk.img\n"
16394 #: ../fish/guestfish.pod:15
16397 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16402 #: ../fish/guestfish.pod:17
16405 " guestfish -d libvirt-domain\n"
16410 #: ../fish/guestfish.pod:19
16413 " guestfish [--ro|--rw] -a disk.img -i\n"
16418 #: ../fish/guestfish.pod:21
16421 " guestfish -d libvirt-domain -i\n"
16426 #: ../fish/guestfish.pod:25
16428 "Using guestfish in read/write mode on live virtual machines can be "
16429 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16430 "option to use guestfish safely if the disk image or virtual machine might be "
16435 #: ../fish/guestfish.pod:32
16437 "Guestfish is a shell and command-line tool for examining and modifying "
16438 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16439 "functionality of the guestfs API, see L<guestfs(3)>."
16443 #: ../fish/guestfish.pod:36
16445 "Guestfish gives you structured access to the libguestfs API, from shell "
16446 "scripts or the command line or interactively. If you want to rescue a "
16447 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16452 #: ../fish/guestfish.pod:43
16453 msgid "As an interactive shell"
16457 #: ../fish/guestfish.pod:45
16465 #: ../fish/guestfish.pod:47
16468 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16469 " editing virtual machine filesystems.\n"
16474 #: ../fish/guestfish.pod:50
16477 " Type: 'help' for a list of commands\n"
16478 " 'man' to read the manual\n"
16479 " 'quit' to quit the shell\n"
16484 #: ../fish/guestfish.pod:54
16487 " ><fs> add-ro disk.img\n"
16489 " ><fs> list-filesystems\n"
16490 " /dev/sda1: ext4\n"
16491 " /dev/vg_guest/lv_root: ext4\n"
16492 " /dev/vg_guest/lv_swap: swap\n"
16493 " ><fs> mount /dev/vg_guest/lv_root /\n"
16494 " ><fs> cat /etc/fstab\n"
16496 " # Created by anaconda\n"
16503 #: ../fish/guestfish.pod:67
16504 msgid "From shell scripts"
16508 #: ../fish/guestfish.pod:69
16509 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16513 #: ../fish/guestfish.pod:71
16516 " guestfish <<_EOF_\n"
16519 " mount /dev/vg_guest/lv_root /\n"
16520 " write /etc/motd \"Welcome, new users\"\n"
16526 #: ../fish/guestfish.pod:78
16527 msgid "List the LVM logical volumes in a disk image:"
16531 #: ../fish/guestfish.pod:80
16534 " guestfish -a disk.img --ro <<_EOF_\n"
16542 #: ../fish/guestfish.pod:85
16543 msgid "List all the filesystems in a disk image:"
16547 #: ../fish/guestfish.pod:87
16550 " guestfish -a disk.img --ro <<_EOF_\n"
16552 " list-filesystems\n"
16558 #: ../fish/guestfish.pod:92
16559 msgid "On one command line"
16563 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
16564 msgid "Update C</etc/resolv.conf> in a guest:"
16568 #: ../fish/guestfish.pod:96
16572 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16573 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16578 #: ../fish/guestfish.pod:100
16579 msgid "Edit C</boot/grub/grub.conf> interactively:"
16583 #: ../fish/guestfish.pod:102
16586 " guestfish --rw --add disk.img \\\n"
16587 " --mount /dev/vg_guest/lv_root \\\n"
16588 " --mount /dev/sda1:/boot \\\n"
16589 " edit /boot/grub/grub.conf\n"
16594 #: ../fish/guestfish.pod:107
16595 msgid "Mount disks automatically"
16599 #: ../fish/guestfish.pod:109
16601 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
16605 #: ../fish/guestfish.pod:112
16608 " guestfish --ro -a disk.img -i cat /etc/group\n"
16613 #: ../fish/guestfish.pod:114
16616 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16621 #: ../fish/guestfish.pod:116
16622 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16626 #: ../fish/guestfish.pod:118
16629 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16634 #: ../fish/guestfish.pod:120
16635 msgid "As a script interpreter"
16639 #: ../fish/guestfish.pod:122
16640 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16644 #: ../fish/guestfish.pod:124
16647 " #!/usr/bin/guestfish -f\n"
16648 " sparse test1.img 100M\n"
16650 " part-disk /dev/sda mbr\n"
16651 " mkfs ext2 /dev/sda1\n"
16656 #: ../fish/guestfish.pod:130
16657 msgid "Start with a prepared disk"
16661 #: ../fish/guestfish.pod:132
16663 "An alternate way to create a 100MB disk called C<test1.img> containing a "
16664 "single ext2-formatted partition:"
16668 #: ../fish/guestfish.pod:135
16671 " guestfish -N fs\n"
16676 #: ../fish/guestfish.pod:137
16677 msgid "To list what is available do:"
16681 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1009
16684 " guestfish -N help | less\n"
16689 #: ../fish/guestfish.pod:141
16690 msgid "Remote control"
16694 #: ../fish/guestfish.pod:143
16697 " eval \"`guestfish --listen`\"\n"
16698 " guestfish --remote add-ro disk.img\n"
16699 " guestfish --remote run\n"
16700 " guestfish --remote lvs\n"
16705 #: ../fish/guestfish.pod:154
16706 msgid "Displays general help on options."
16710 #: ../fish/guestfish.pod:158
16711 msgid "B<--cmd-help>"
16715 #: ../fish/guestfish.pod:160
16716 msgid "Lists all available guestfish commands."
16720 #: ../fish/guestfish.pod:162
16725 #: ../fish/guestfish.pod:164
16726 msgid "B<--cmd-help cmd>"
16730 #: ../fish/guestfish.pod:166
16731 msgid "Displays detailed help on a single command C<cmd>."
16735 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:87
16736 msgid "B<-a image>"
16740 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:89
16741 msgid "B<--add image>"
16745 #: ../fish/guestfish.pod:172
16746 msgid "Add a block device or virtual machine image to the shell."
16750 #: ../fish/guestfish.pod:177
16752 "Using this flag is mostly equivalent to using the C<add> command, with "
16753 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
16754 "the I<--format=...> flag was given."
16758 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:100
16760 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16761 "URI to use. The default is to use the default libvirt connection."
16765 #: ../fish/guestfish.pod:189
16770 #: ../fish/guestfish.pod:191
16772 "If using the I<--listen> option and a csh-like shell, use this option. See "
16773 "section L</REMOTE CONTROL AND CSH> below."
16777 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:104
16778 msgid "B<-d libvirt-domain>"
16782 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:106
16783 msgid "B<--domain libvirt-domain>"
16787 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:108
16789 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16790 "used, then any libvirt domain can be used. However in write mode, only "
16791 "libvirt domains which are shut down can be named here."
16795 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:112
16796 msgid "Domain UUIDs can be used instead of names."
16800 #: ../fish/guestfish.pod:204
16802 "Using this flag is mostly equivalent to using the C<add-domain> command, "
16803 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
16804 "if the I<--format:...> flag was given."
16808 #: ../fish/guestfish.pod:208
16813 #: ../fish/guestfish.pod:210
16814 msgid "B<--no-dest-paths>"
16818 #: ../fish/guestfish.pod:212
16820 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16821 "to hit the tab key to complete paths on the guest filesystem, but this "
16822 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16823 "allow this feature to be disabled."
16827 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:128
16829 "When prompting for keys and passphrases, guestfish normally turns echoing "
16830 "off so you cannot see what you are typing. If you are not worried about "
16831 "Tempest attacks and there is no one else in the room you can specify this "
16832 "flag to see what you are typing."
16836 #: ../fish/guestfish.pod:224
16841 #: ../fish/guestfish.pod:226
16842 msgid "B<--file file>"
16846 #: ../fish/guestfish.pod:228
16847 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16851 #: ../fish/guestfish.pod:231
16854 " #!/usr/bin/guestfish -f\n"
16859 #: ../fish/guestfish.pod:244
16862 " guestfish --format=raw -a disk.img\n"
16867 #: ../fish/guestfish.pod:248
16870 " guestfish --format=raw -a disk.img --format -a another.img\n"
16875 #: ../fish/guestfish.pod:253
16877 "If you have untrusted raw-format guest disk images, you should use this "
16878 "option to specify the disk format. This avoids a possible security problem "
16879 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16883 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:157
16884 msgid "B<--inspector>"
16888 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:159
16890 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16891 "system and mount filesystems as they would be mounted on the real virtual "
16896 #: ../fish/guestfish.pod:266
16897 msgid "Typical usage is either:"
16901 #: ../fish/guestfish.pod:268
16904 " guestfish -d myguest -i\n"
16909 #: ../fish/guestfish.pod:270
16910 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16914 #: ../fish/guestfish.pod:272
16917 " guestfish --ro -d myguest -i\n"
16922 #: ../fish/guestfish.pod:274
16923 msgid "(for active domains, readonly), or specify the block device directly:"
16927 #: ../fish/guestfish.pod:276
16930 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
16935 #: ../fish/guestfish.pod:278
16937 "Note that the command line syntax changed slightly over older versions of "
16938 "guestfish. You can still use the old syntax:"
16942 #: ../fish/guestfish.pod:281
16945 " guestfish [--ro] -i disk.img\n"
16950 #: ../fish/guestfish.pod:283
16953 " guestfish [--ro] -i libvirt-domain\n"
16958 #: ../fish/guestfish.pod:285
16960 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
16961 "then using other commands to mount the filesystems that were found."
16965 #: ../fish/guestfish.pod:294
16966 msgid "B<--listen>"
16970 #: ../fish/guestfish.pod:296
16972 "Fork into the background and listen for remote commands. See section L</"
16973 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16977 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:168
16982 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:170
16984 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
16985 "ATTACHING TO RUNNING DAEMONS>)."
16989 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:173
16990 msgid "B<-m dev[:mountpoint[:options]]>"
16994 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:175
16995 msgid "B<--mount dev[:mountpoint[:options]]>"
16999 #: ../fish/guestfish.pod:308
17000 msgid "Mount the named partition or logical volume on the given mountpoint."
17004 #: ../fish/guestfish.pod:310
17005 msgid "If the mountpoint is omitted, it defaults to C</>."
17009 #: ../fish/guestfish.pod:312
17010 msgid "You have to mount something on C</> before most commands will work."
17014 #: ../fish/guestfish.pod:314
17016 "If any I<-m> or I<--mount> options are given, the guest is automatically "
17021 #: ../fish/guestfish.pod:317
17023 "If you don't know what filesystems a disk image contains, you can either run "
17024 "guestfish without this option, then list the partitions, filesystems and LVs "
17025 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
17026 "commands), or you can use the L<virt-filesystems(1)> program."
17030 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:183
17032 "The third (and rarely used) part of the mount parameter is the list of mount "
17033 "options used to mount the underlying filesystem. If this is not given, then "
17034 "the mount options are either the empty string or C<ro> (the latter if the "
17035 "I<--ro> flag is used). By specifying the mount options, you override this "
17036 "default choice. Probably the only time you would use this is to enable ACLs "
17037 "and/or extended attributes if the filesystem can support them:"
17041 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:191
17044 " -m /dev/sda1:/:acl,user_xattr\n"
17049 #: ../fish/guestfish.pod:333
17050 msgid "Using this flag is equivalent to using the C<mount-options> command."
17054 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:193
17055 #: ../resize/virt-resize.pod:358
17060 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:195
17061 msgid "B<--no-sync>"
17065 #: ../fish/guestfish.pod:339
17067 "Disable autosync. This is enabled by default. See the discussion of "
17068 "autosync in the L<guestfs(3)> manpage."
17072 #: ../fish/guestfish.pod:342
17077 #: ../fish/guestfish.pod:344
17078 msgid "B<--new type>"
17082 #: ../fish/guestfish.pod:346
17087 #: ../fish/guestfish.pod:348
17089 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
17090 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
17091 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
17096 #: ../fish/guestfish.pod:353
17097 msgid "B<--progress-bars>"
17101 #: ../fish/guestfish.pod:355
17102 msgid "Enable progress bars, even when guestfish is used non-interactively."
17106 #: ../fish/guestfish.pod:357
17108 "Progress bars are enabled by default when guestfish is used as an "
17109 "interactive shell."
17113 #: ../fish/guestfish.pod:360
17114 msgid "B<--no-progress-bars>"
17118 #: ../fish/guestfish.pod:362
17119 msgid "Disable progress bars."
17123 #: ../fish/guestfish.pod:364
17124 msgid "B<--remote[=pid]>"
17128 #: ../fish/guestfish.pod:366
17130 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
17131 "CONTROL GUESTFISH OVER A SOCKET> below."
17135 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:239
17136 #: ../rescue/virt-rescue.pod:161
17141 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:241
17142 #: ../rescue/virt-rescue.pod:163
17147 #: ../fish/guestfish.pod:373
17149 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
17150 "mounts are done read-only."
17154 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
17156 "The option must always be used if the disk image or virtual machine might be "
17157 "running, and is generally recommended in cases where you don't need write "
17158 "access to the disk."
17162 #: ../fish/guestfish.pod:380
17164 "Note that prepared disk images created with I<-N> are not affected by this "
17165 "option. Also commands like C<add> are not affected - you have to specify "
17166 "the C<readonly:true> option explicitly if you need it."
17170 #: ../fish/guestfish.pod:384
17171 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
17175 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:253
17176 #: ../rescue/virt-rescue.pod:173
17177 msgid "B<--selinux>"
17181 #: ../fish/guestfish.pod:388
17182 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
17186 #: ../fish/guestfish.pod:394
17188 "Enable very verbose messages. This is particularly useful if you find a bug."
17192 #: ../fish/guestfish.pod:401
17193 msgid "Display the guestfish / libguestfs version number and exit."
17197 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:269
17198 #: ../rescue/virt-rescue.pod:194
17203 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:271
17204 #: ../rescue/virt-rescue.pod:196
17209 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:273
17211 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
17212 "mounts are done read-write."
17216 #: ../fish/guestfish.pod:410
17217 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
17221 #: ../fish/guestfish.pod:414
17222 msgid "Echo each command before executing it."
17226 #: ../fish/guestfish.pod:418
17227 msgid "COMMANDS ON COMMAND LINE"
17231 #: ../fish/guestfish.pod:420
17233 "Any additional (non-option) arguments are treated as commands to execute."
17237 #: ../fish/guestfish.pod:423
17239 "Commands to execute should be separated by a colon (C<:>), where the colon "
17240 "is a separate parameter. Thus:"
17244 #: ../fish/guestfish.pod:426
17247 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
17252 #: ../fish/guestfish.pod:428
17254 "If there are no additional arguments, then we enter a shell, either an "
17255 "interactive shell with a prompt (if the input is a terminal) or a non-"
17256 "interactive shell."
17260 #: ../fish/guestfish.pod:432
17262 "In either command line mode or non-interactive shell, the first command that "
17263 "gives an error causes the whole shell to exit. In interactive mode (with a "
17264 "prompt) if a command fails, you can continue to enter commands."
17268 #: ../fish/guestfish.pod:437
17269 msgid "USING launch (OR run)"
17273 #: ../fish/guestfish.pod:439
17275 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
17276 "then launch it, then mount any disks you need, and finally issue actions/"
17277 "commands. So the general order of the day is:"
17281 #: ../fish/guestfish.pod:447
17282 msgid "add or -a/--add"
17286 #: ../fish/guestfish.pod:451
17287 msgid "launch (aka run)"
17291 #: ../fish/guestfish.pod:455
17292 msgid "mount or -m/--mount"
17296 #: ../fish/guestfish.pod:459
17297 msgid "any other commands"
17301 #: ../fish/guestfish.pod:463
17303 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
17304 "guest before mounting or performing any other commands."
17308 #: ../fish/guestfish.pod:466
17310 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
17311 "I<--new> options were given then C<run> is done automatically, simply "
17312 "because guestfish can't perform the action you asked for without doing this."
17316 #: ../fish/guestfish.pod:471
17317 msgid "OPENING DISKS FOR READ AND WRITE"
17321 #: ../fish/guestfish.pod:473
17323 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
17324 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
17325 "I<-i> and I<-m> open disk images read-only or for writing."
17329 #: ../fish/guestfish.pod:478
17331 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
17332 "opening disk images supplied on the command line for write. To open a disk "
17333 "image read-only you have to do I<-a image --ro>."
17337 #: ../fish/guestfish.pod:482
17339 "This matters: If you accidentally open a live VM disk image writable then "
17340 "you will cause irreversible disk corruption."
17344 #: ../fish/guestfish.pod:485
17346 "In a future libguestfs we intend to change the default the other way. Disk "
17347 "images will be opened read-only. You will have to either specify "
17348 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
17349 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
17350 "access for disk images specified by those other command line options."
17354 #: ../fish/guestfish.pod:492
17356 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
17357 "which does nothing (it is already the default). However it is highly "
17358 "recommended that you use this option to indicate that you need write access, "
17359 "and prepare your scripts for the day when this option will be required for "
17364 #: ../fish/guestfish.pod:498
17366 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17367 "other libguestfs program apart from guestfish and guestmount."
17371 #: ../fish/guestfish.pod:501
17376 #: ../fish/guestfish.pod:503
17378 "You can quote ordinary parameters using either single or double quotes. For "
17383 #: ../fish/guestfish.pod:506
17386 " add \"file with a space.img\"\n"
17391 #: ../fish/guestfish.pod:508
17394 " rm '/file name'\n"
17399 #: ../fish/guestfish.pod:510
17407 #: ../fish/guestfish.pod:512
17409 "A few commands require a list of strings to be passed. For these, use a "
17410 "whitespace-separated list, enclosed in quotes. Strings containing "
17411 "whitespace to be passed through must be enclosed in single quotes. A "
17412 "literal single quote must be escaped with a backslash."
17416 #: ../fish/guestfish.pod:517
17419 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17420 " command \"/bin/echo 'foo bar'\"\n"
17421 " command \"/bin/echo \\'foo\\'\"\n"
17426 #: ../fish/guestfish.pod:521
17427 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
17431 #: ../fish/guestfish.pod:523
17433 "In double-quoted arguments (only) use backslash to insert special characters:"
17437 #: ../fish/guestfish.pod:528
17442 #: ../fish/guestfish.pod:530
17443 msgid "Alert (bell) character."
17447 #: ../fish/guestfish.pod:532
17452 #: ../fish/guestfish.pod:534
17453 msgid "Backspace character."
17457 #: ../fish/guestfish.pod:536
17462 #: ../fish/guestfish.pod:538
17463 msgid "Form feed character."
17467 #: ../fish/guestfish.pod:540
17472 #: ../fish/guestfish.pod:542
17473 msgid "Newline character."
17477 #: ../fish/guestfish.pod:544
17482 #: ../fish/guestfish.pod:546
17483 msgid "Carriage return character."
17487 #: ../fish/guestfish.pod:548
17492 #: ../fish/guestfish.pod:550
17493 msgid "Horizontal tab character."
17497 #: ../fish/guestfish.pod:552
17502 #: ../fish/guestfish.pod:554
17503 msgid "Vertical tab character."
17507 #: ../fish/guestfish.pod:556
17512 #: ../fish/guestfish.pod:558
17513 msgid "A literal double quote character."
17517 #: ../fish/guestfish.pod:560
17522 #: ../fish/guestfish.pod:562
17524 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
17529 #: ../fish/guestfish.pod:565
17534 #: ../fish/guestfish.pod:567
17536 "A character with hex value I<hh>. There must be precisely 2 hex digits."
17540 #: ../fish/guestfish.pod:570
17542 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
17547 #: ../fish/guestfish.pod:573
17552 #: ../fish/guestfish.pod:575
17553 msgid "A literal backslash character."
17557 #: ../fish/guestfish.pod:579
17558 msgid "OPTIONAL ARGUMENTS"
17562 #: ../fish/guestfish.pod:581
17564 "Some commands take optional arguments. These arguments appear in this "
17565 "documentation as C<[argname:..]>. You can use them as in these examples:"
17569 #: ../fish/guestfish.pod:585
17572 " add-drive-opts filename\n"
17577 #: ../fish/guestfish.pod:587
17580 " add-drive-opts filename readonly:true\n"
17585 #: ../fish/guestfish.pod:589
17588 " add-drive-opts filename format:qcow2 readonly:false\n"
17593 #: ../fish/guestfish.pod:591
17595 "Each optional argument can appear at most once. All optional arguments must "
17596 "appear after the required ones."
17600 #: ../fish/guestfish.pod:594
17605 #: ../fish/guestfish.pod:596
17607 "This section applies to all commands which can take integers as parameters."
17611 #: ../fish/guestfish.pod:599
17612 msgid "SIZE SUFFIX"
17616 #: ../fish/guestfish.pod:601
17618 "When the command takes a parameter measured in bytes, you can use one of the "
17619 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17623 #: ../fish/guestfish.pod:607
17624 msgid "B<k> or B<K> or B<KiB>"
17628 #: ../fish/guestfish.pod:609
17629 msgid "The size in kilobytes (multiplied by 1024)."
17633 #: ../fish/guestfish.pod:611
17638 #: ../fish/guestfish.pod:613
17639 msgid "The size in SI 1000 byte units."
17643 #: ../fish/guestfish.pod:615
17644 msgid "B<M> or B<MiB>"
17648 #: ../fish/guestfish.pod:617
17649 msgid "The size in megabytes (multiplied by 1048576)."
17653 #: ../fish/guestfish.pod:619
17658 #: ../fish/guestfish.pod:621
17659 msgid "The size in SI 1000000 byte units."
17663 #: ../fish/guestfish.pod:623
17664 msgid "B<G> or B<GiB>"
17668 #: ../fish/guestfish.pod:625
17669 msgid "The size in gigabytes (multiplied by 2**30)."
17673 #: ../fish/guestfish.pod:627
17678 #: ../fish/guestfish.pod:629
17679 msgid "The size in SI 10**9 byte units."
17683 #: ../fish/guestfish.pod:631
17684 msgid "B<T> or B<TiB>"
17688 #: ../fish/guestfish.pod:633
17689 msgid "The size in terabytes (multiplied by 2**40)."
17693 #: ../fish/guestfish.pod:635
17698 #: ../fish/guestfish.pod:637
17699 msgid "The size in SI 10**12 byte units."
17703 #: ../fish/guestfish.pod:639
17704 msgid "B<P> or B<PiB>"
17708 #: ../fish/guestfish.pod:641
17709 msgid "The size in petabytes (multiplied by 2**50)."
17713 #: ../fish/guestfish.pod:643
17718 #: ../fish/guestfish.pod:645
17719 msgid "The size in SI 10**15 byte units."
17723 #: ../fish/guestfish.pod:647
17724 msgid "B<E> or B<EiB>"
17728 #: ../fish/guestfish.pod:649
17729 msgid "The size in exabytes (multiplied by 2**60)."
17733 #: ../fish/guestfish.pod:651
17738 #: ../fish/guestfish.pod:653
17739 msgid "The size in SI 10**18 byte units."
17743 #: ../fish/guestfish.pod:655
17744 msgid "B<Z> or B<ZiB>"
17748 #: ../fish/guestfish.pod:657
17749 msgid "The size in zettabytes (multiplied by 2**70)."
17753 #: ../fish/guestfish.pod:659
17758 #: ../fish/guestfish.pod:661
17759 msgid "The size in SI 10**21 byte units."
17763 #: ../fish/guestfish.pod:663
17764 msgid "B<Y> or B<YiB>"
17768 #: ../fish/guestfish.pod:665
17769 msgid "The size in yottabytes (multiplied by 2**80)."
17773 #: ../fish/guestfish.pod:667
17778 #: ../fish/guestfish.pod:669
17779 msgid "The size in SI 10**24 byte units."
17783 #: ../fish/guestfish.pod:675
17786 " truncate-size /file 1G\n"
17791 #: ../fish/guestfish.pod:677
17792 msgid "would truncate the file to 1 gigabyte."
17796 #: ../fish/guestfish.pod:679
17798 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
17799 "the parameter to L</memsize> is specified in megabytes already). Adding a "
17800 "suffix will probably not do what you expect."
17804 #: ../fish/guestfish.pod:683
17805 msgid "OCTAL AND HEXADECIMAL NUMBERS"
17809 #: ../fish/guestfish.pod:685
17811 "For specifying the radix (base) use the C convention: C<0> to prefix an "
17812 "octal number or C<0x> to prefix a hexadecimal number. For example:"
17816 #: ../fish/guestfish.pod:688
17819 " 1234 decimal number 1234\n"
17820 " 02322 octal number, equivalent to decimal 1234\n"
17821 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
17826 #: ../fish/guestfish.pod:692
17828 "When using the C<chmod> command, you almost always want to specify an octal "
17829 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
17830 "L<chmod(1)> program):"
17834 #: ../fish/guestfish.pod:696
17837 " chmod 0777 /public # OK\n"
17838 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
17843 #: ../fish/guestfish.pod:699
17845 "Commands that return numbers usually print them in decimal, but some "
17846 "commands print numbers in other radices (eg. C<umask> prints the mode in "
17847 "octal, preceeded by C<0>)."
17851 #: ../fish/guestfish.pod:703
17852 msgid "WILDCARDS AND GLOBBING"
17856 #: ../fish/guestfish.pod:705
17858 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
17859 "(globbing) by default. So for example the following will not do what you "
17864 #: ../fish/guestfish.pod:709
17872 #: ../fish/guestfish.pod:711
17874 "Assuming you don't have a directory called literally C</home/*> then the "
17875 "above command will return an error."
17879 #: ../fish/guestfish.pod:714
17880 msgid "To perform wildcard expansion, use the C<glob> command."
17884 #: ../fish/guestfish.pod:716
17887 " glob rm-rf /home/*\n"
17892 #: ../fish/guestfish.pod:718
17894 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
17895 "many times), equivalent to:"
17899 #: ../fish/guestfish.pod:721
17902 " rm-rf /home/jim\n"
17903 " rm-rf /home/joe\n"
17904 " rm-rf /home/mary\n"
17909 #: ../fish/guestfish.pod:725
17910 msgid "C<glob> only works on simple guest paths and not on device names."
17914 #: ../fish/guestfish.pod:727
17916 "If you have several parameters, each containing a wildcard, then glob will "
17917 "perform a Cartesian product."
17921 #: ../fish/guestfish.pod:730
17926 #: ../fish/guestfish.pod:732
17928 "Any line which starts with a I<#> character is treated as a comment and "
17929 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
17930 "a command. For example:"
17934 #: ../fish/guestfish.pod:736
17937 " # this is a comment\n"
17938 " # this is a comment\n"
17939 " foo # NOT a comment\n"
17944 #: ../fish/guestfish.pod:740
17945 msgid "Blank lines are also ignored."
17949 #: ../fish/guestfish.pod:742
17950 msgid "RUNNING COMMANDS LOCALLY"
17954 #: ../fish/guestfish.pod:744
17956 "Any line which starts with a I<!> character is treated as a command sent to "
17957 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
17961 #: ../fish/guestfish.pod:748
17965 " tgz-out /remote local/remote-data.tar.gz\n"
17970 #: ../fish/guestfish.pod:751
17972 "will create a directory C<local> on the host, and then export the contents "
17973 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
17974 "(See C<tgz-out>)."
17978 #: ../fish/guestfish.pod:755
17980 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
17981 "effect, due to the way that subprocesses work in Unix."
17985 #: ../fish/guestfish.pod:758
17986 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
17990 #: ../fish/guestfish.pod:760
17992 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
17993 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
17994 "and executed as guestfish commands."
17998 #: ../fish/guestfish.pod:764
18000 "Thus you can use shell script to construct arbitrary guestfish commands "
18001 "which are then parsed by guestfish."
18005 #: ../fish/guestfish.pod:767
18007 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
18008 "through C</foo.100>) using guestfish commands alone. However this is simple "
18009 "if we use a shell script to create the guestfish commands for us:"
18013 #: ../fish/guestfish.pod:772
18016 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
18021 #: ../fish/guestfish.pod:774
18022 msgid "or with names like C</foo.001>:"
18026 #: ../fish/guestfish.pod:776
18029 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
18034 #: ../fish/guestfish.pod:778
18036 "When using guestfish interactively it can be helpful to just run the shell "
18037 "script first (ie. remove the initial C<E<lt>> character so it is just an "
18038 "ordinary I<!> local command), see what guestfish commands it would run, and "
18039 "when you are happy with those prepend the C<E<lt>> character to run the "
18040 "guestfish commands for real."
18044 #: ../fish/guestfish.pod:784
18049 #: ../fish/guestfish.pod:786
18051 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
18052 "command (a guestfish command) to the second command (any host command). For "
18057 #: ../fish/guestfish.pod:790
18060 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
18065 #: ../fish/guestfish.pod:792
18067 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
18068 "program). The above command would list all accounts in the guest filesystem "
18069 "which have UID 0, ie. root accounts including backdoors. Other examples:"
18073 #: ../fish/guestfish.pod:797
18076 " hexdump /bin/ls | head\n"
18077 " list-devices | tail -1\n"
18078 " tgz-out / - | tar ztf -\n"
18083 #: ../fish/guestfish.pod:801
18085 "The space before the pipe symbol is required, any space after the pipe "
18086 "symbol is optional. Everything after the pipe symbol is just passed "
18087 "straight to the host shell, so it can contain redirections, globs and "
18088 "anything else that makes sense on the host side."
18092 #: ../fish/guestfish.pod:806
18094 "To use a literal argument which begins with a pipe symbol, you have to quote "
18099 #: ../fish/guestfish.pod:809
18107 #: ../fish/guestfish.pod:811
18108 msgid "HOME DIRECTORIES"
18112 #: ../fish/guestfish.pod:813
18114 "If a parameter starts with the character C<~> then the tilde may be expanded "
18115 "as a home directory path (either C<~> for the current user's home directory, "
18116 "or C<~user> for another user)."
18120 #: ../fish/guestfish.pod:817
18122 "Note that home directory expansion happens for users known I<on the host>, "
18123 "not in the guest filesystem."
18127 #: ../fish/guestfish.pod:820
18129 "To use a literal argument which begins with a tilde, you have to quote it, "
18134 #: ../fish/guestfish.pod:823
18142 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:519
18143 msgid "ENCRYPTED DISKS"
18147 #: ../fish/guestfish.pod:827
18149 "Libguestfs has some support for Linux guests encrypted according to the "
18150 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
18151 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
18152 "LUKS is supported."
18156 #: ../fish/guestfish.pod:832
18157 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
18161 #: ../fish/guestfish.pod:834
18164 " ><fs> vfs-type /dev/sda2\n"
18170 #: ../fish/guestfish.pod:837
18172 "Then open those devices using L</luks-open>. This creates a device-mapper "
18173 "device called C</dev/mapper/luksdev>."
18177 #: ../fish/guestfish.pod:840
18180 " ><fs> luks-open /dev/sda2 luksdev\n"
18181 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
18186 #: ../fish/guestfish.pod:843
18188 "Finally you have to tell LVM to scan for volume groups on the newly created "
18193 #: ../fish/guestfish.pod:846
18197 " vg-activate-all true\n"
18202 #: ../fish/guestfish.pod:849
18203 msgid "The logical volume(s) can now be mounted in the usual way."
18207 #: ../fish/guestfish.pod:851
18209 "Before closing a LUKS device you must unmount any logical volumes on it and "
18210 "deactivate the volume groups by calling C<vg-activate false VG> on each "
18211 "one. Then you can close the mapper device:"
18215 #: ../fish/guestfish.pod:855
18218 " vg-activate false /dev/VG\n"
18219 " luks-close /dev/mapper/luksdev\n"
18224 #: ../fish/guestfish.pod:860
18226 "If a path is prefixed with C<win:> then you can use Windows-style drive "
18227 "letters and paths (with some limitations). The following commands are "
18232 #: ../fish/guestfish.pod:864
18235 " file /WINDOWS/system32/config/system.LOG\n"
18240 #: ../fish/guestfish.pod:866
18243 " file win:\\windows\\system32\\config\\system.log\n"
18248 #: ../fish/guestfish.pod:868
18251 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
18256 #: ../fish/guestfish.pod:870
18258 "The parameter is rewritten \"behind the scenes\" by looking up the position "
18259 "where the drive is mounted, prepending that to the path, changing all "
18260 "backslash characters to forward slash, then resolving the result using L</"
18261 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
18262 "the parameter might be rewritten like this:"
18266 #: ../fish/guestfish.pod:876
18269 " win:e:\\foo\\bar => /e/FOO/bar\n"
18274 #: ../fish/guestfish.pod:878
18275 msgid "This only works in argument positions that expect a path."
18279 #: ../fish/guestfish.pod:880
18280 msgid "UPLOADING AND DOWNLOADING FILES"
18284 #: ../fish/guestfish.pod:882
18286 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
18287 "others which upload from or download to a local file, you can use the "
18288 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
18292 #: ../fish/guestfish.pod:886
18300 #: ../fish/guestfish.pod:888
18302 "reads stdin and creates from that a file C</foo> in the disk image, and:"
18306 #: ../fish/guestfish.pod:891
18309 " tar-out /etc - | tar tf -\n"
18314 #: ../fish/guestfish.pod:893
18316 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18317 "command (see L</PIPES>)."
18321 #: ../fish/guestfish.pod:896
18323 "When using C<-> to read from stdin, the input is read up to the end of "
18324 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
18325 "some arbitrary end marker:"
18329 #: ../fish/guestfish.pod:900
18332 " upload -<<END /foo\n"
18341 #: ../fish/guestfish.pod:906
18343 "Any string of characters can be used instead of C<END>. The end marker must "
18344 "appear on a line of its own, without any preceeding or following characters "
18345 "(not even spaces)."
18349 #: ../fish/guestfish.pod:910
18351 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
18352 "upload local files (so-called \"FileIn\" parameters in the generator)."
18356 #: ../fish/guestfish.pod:913
18357 msgid "EXIT ON ERROR BEHAVIOUR"
18361 #: ../fish/guestfish.pod:915
18363 "By default, guestfish will ignore any errors when in interactive mode (ie. "
18364 "taking commands from a human over a tty), and will exit on the first error "
18365 "in non-interactive mode (scripts, commands given on the command line)."
18369 #: ../fish/guestfish.pod:920
18371 "If you prefix a command with a I<-> character, then that command will not "
18372 "cause guestfish to exit, even if that (one) command returns an error."
18376 #: ../fish/guestfish.pod:924
18377 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
18381 #: ../fish/guestfish.pod:926
18383 "Guestfish can be remote-controlled over a socket. This is useful "
18384 "particularly in shell scripts where you want to make several different "
18385 "changes to a filesystem, but you don't want the overhead of starting up a "
18386 "guestfish process each time."
18390 #: ../fish/guestfish.pod:931
18391 msgid "Start a guestfish server process using:"
18395 #: ../fish/guestfish.pod:933
18398 " eval \"`guestfish --listen`\"\n"
18403 #: ../fish/guestfish.pod:935
18404 msgid "and then send it commands by doing:"
18408 #: ../fish/guestfish.pod:937
18411 " guestfish --remote cmd [...]\n"
18416 #: ../fish/guestfish.pod:939
18417 msgid "To cause the server to exit, send it the exit command:"
18421 #: ../fish/guestfish.pod:943
18423 "Note that the server will normally exit if there is an error in a command. "
18424 "You can change this in the usual way. See section L</EXIT ON ERROR "
18429 #: ../fish/guestfish.pod:947
18430 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
18434 #: ../fish/guestfish.pod:949
18436 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
18437 "is how the I<--remote> option knows where to send the commands. You can "
18438 "have several guestfish listener processes running using:"
18442 #: ../fish/guestfish.pod:953
18445 " eval \"`guestfish --listen`\"\n"
18446 " pid1=$GUESTFISH_PID\n"
18447 " eval \"`guestfish --listen`\"\n"
18448 " pid2=$GUESTFISH_PID\n"
18450 " guestfish --remote=$pid1 cmd\n"
18451 " guestfish --remote=$pid2 cmd\n"
18456 #: ../fish/guestfish.pod:961
18457 msgid "REMOTE CONTROL AND CSH"
18461 #: ../fish/guestfish.pod:963
18463 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
18468 #: ../fish/guestfish.pod:966
18471 " eval \"`guestfish --listen --csh`\"\n"
18476 #: ../fish/guestfish.pod:968
18477 msgid "REMOTE CONTROL DETAILS"
18481 #: ../fish/guestfish.pod:970
18483 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
18484 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
18485 "and C<$PID> is the process ID of the server."
18489 #: ../fish/guestfish.pod:974
18490 msgid "Guestfish client and server versions must match exactly."
18494 #: ../fish/guestfish.pod:976
18495 msgid "REMOTE CONTROL RUN COMMAND HANGING"
18499 #: ../fish/guestfish.pod:978
18501 "Using the C<run> (or C<launch>) command remotely in a command substitution "
18502 "context hangs, ie. don't do (note the backquotes):"
18506 #: ../fish/guestfish.pod:981
18509 " a=`guestfish --remote run`\n"
18514 #: ../fish/guestfish.pod:983
18516 "Since the C<run> command produces no output on stdout, this is not useful "
18517 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
18522 #: ../fish/guestfish.pod:987
18523 msgid "PREPARED DISK IMAGES"
18527 #: ../fish/guestfish.pod:989
18529 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
18530 "preformatted disk images that guestfish can make for you to save typing. "
18531 "This is particularly useful for testing purposes. This option is used "
18532 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
18533 "can be mixed with I<-a>)."
18537 #: ../fish/guestfish.pod:995
18539 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
18540 "the second and so on. Existing files in the current directory are "
18545 #: ../fish/guestfish.pod:999
18547 "The type briefly describes how the disk should be sized, partitioned, how "
18548 "filesystem(s) should be created, and how content should be added. "
18549 "Optionally the type can be followed by extra parameters, separated by C<:> "
18550 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
18551 "allocated disk, containing a single partition, with the partition formatted "
18552 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
18557 #: ../fish/guestfish.pod:1007
18558 msgid "To list the available types and any extra parameters they take, run:"
18562 #: ../fish/guestfish.pod:1011
18564 "Note that the prepared filesystem is not mounted. You would usually have to "
18565 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18569 #: ../fish/guestfish.pod:1015
18571 "If any I<-N> or I<--new> options are given, the guest is automatically "
18576 #: ../fish/guestfish.pod:1020
18577 msgid "Create a 100MB disk with an ext4-formatted partition:"
18581 #: ../fish/guestfish.pod:1022
18584 " guestfish -N fs:ext4\n"
18589 #: ../fish/guestfish.pod:1024
18590 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18594 #: ../fish/guestfish.pod:1026
18597 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18602 #: ../fish/guestfish.pod:1028
18603 msgid "Create a blank 200MB disk:"
18607 #: ../fish/guestfish.pod:1030
18610 " guestfish -N disk:200M\n"
18615 #: ../fish/guestfish.pod:1032
18616 msgid "PROGRESS BARS"
18620 #: ../fish/guestfish.pod:1034
18622 "Some (not all) long-running commands send progress notification messages as "
18623 "they are running. Guestfish turns these messages into progress bars."
18627 #: ../fish/guestfish.pod:1038
18629 "When a command that supports progress bars takes longer than two seconds to "
18630 "run, and if progress bars are enabled, then you will see one appearing below "
18635 #: ../fish/guestfish.pod:1042
18638 " ><fs> copy-size /large-file /another-file 2048M\n"
18639 " / 10% [#####-----------------------------------------] 00:30\n"
18644 #: ../fish/guestfish.pod:1045
18646 "The spinner on the left hand side moves round once for every progress "
18647 "notification received from the backend. This is a (reasonably) golden "
18648 "assurance that the command is \"doing something\" even if the progress bar "
18649 "is not moving, because the command is able to send the progress "
18650 "notifications. When the bar reaches 100% and the command finishes, the "
18651 "spinner disappears."
18655 #: ../fish/guestfish.pod:1052
18657 "Progress bars are enabled by default when guestfish is used interactively. "
18658 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18659 "and you can disable them completely using I<--no-progress-bars>."
18663 #: ../fish/guestfish.pod:1057
18664 msgid "GUESTFISH COMMANDS"
18668 #: ../fish/guestfish.pod:1059
18670 "The commands in this section are guestfish convenience commands, in other "
18671 "words, they are not part of the L<guestfs(3)> API."
18675 #: ../fish/guestfish.pod:1062
18680 #: ../fish/guestfish.pod:1064
18689 #: ../fish/guestfish.pod:1067
18690 msgid "Without any parameter, this provides general help."
18694 #: ../fish/guestfish.pod:1069
18695 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18699 #: ../fish/guestfish.pod:1071
18700 msgid "quit | exit"
18704 #: ../fish/guestfish.pod:1073
18705 msgid "This exits guestfish. You can also use C<^D> key."
18709 #: ../fish/guestfish.pod:1075
18710 msgid "@FISH_COMMANDS@"
18714 #: ../fish/guestfish.pod:1077
18719 #: ../fish/guestfish.pod:1079 ../src/guestfs.pod:1505
18724 #: ../fish/guestfish.pod:1083
18726 "guestfish returns 0 if the commands completed without error, or 1 if there "
18731 #: ../fish/guestfish.pod:1090
18736 #: ../fish/guestfish.pod:1092
18738 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18743 #: ../fish/guestfish.pod:1095 ../src/guestfs.pod:3110
18744 msgid "FEBOOTSTRAP_KERNEL"
18748 #: ../fish/guestfish.pod:1097 ../src/guestfs.pod:3112
18749 msgid "FEBOOTSTRAP_MODULES"
18753 #: ../fish/guestfish.pod:1099 ../src/guestfs.pod:3114
18755 "These two environment variables allow the kernel that libguestfs uses in the "
18756 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
18757 "most recent host kernel is chosen. For more information about kernel "
18758 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
18759 "available in febootstrap E<ge> 3.8."
18763 #: ../fish/guestfish.pod:1105
18764 msgid "GUESTFISH_DISPLAY_IMAGE"
18768 #: ../fish/guestfish.pod:1107
18770 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
18771 "If not set, it uses L<display(1)>."
18775 #: ../fish/guestfish.pod:1110
18776 msgid "GUESTFISH_PID"
18780 #: ../fish/guestfish.pod:1112
18782 "Used with the I<--remote> option to specify the remote guestfish process to "
18783 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18787 #: ../fish/guestfish.pod:1116
18792 #: ../fish/guestfish.pod:1118
18794 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18795 "not specified, the external L<hexedit(1)> program is used."
18799 #: ../fish/guestfish.pod:1122
18804 #: ../fish/guestfish.pod:1124
18806 "If compiled with GNU readline support, various files in the home directory "
18807 "can be used. See L</FILES>."
18811 #: ../fish/guestfish.pod:1127 ../src/guestfs.pod:3120
18812 msgid "LIBGUESTFS_APPEND"
18816 #: ../fish/guestfish.pod:1129 ../src/guestfs.pod:3122
18817 msgid "Pass additional options to the guest kernel."
18821 #: ../fish/guestfish.pod:1131 ../src/guestfs.pod:3124
18822 msgid "LIBGUESTFS_DEBUG"
18826 #: ../fish/guestfish.pod:1133
18828 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18829 "effect as using the B<-v> option."
18833 #: ../fish/guestfish.pod:1136 ../src/guestfs.pod:3129
18834 msgid "LIBGUESTFS_MEMSIZE"
18838 #: ../fish/guestfish.pod:1138 ../src/guestfs.pod:3131
18840 "Set the memory allocated to the qemu process, in megabytes. For example:"
18844 #: ../fish/guestfish.pod:1141 ../src/guestfs.pod:3134
18847 " LIBGUESTFS_MEMSIZE=700\n"
18852 #: ../fish/guestfish.pod:1143 ../src/guestfs.pod:3136
18853 msgid "LIBGUESTFS_PATH"
18857 #: ../fish/guestfish.pod:1145
18859 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18860 "the discussion of paths in L<guestfs(3)>."
18864 #: ../fish/guestfish.pod:1148 ../src/guestfs.pod:3141
18865 msgid "LIBGUESTFS_QEMU"
18869 #: ../fish/guestfish.pod:1150 ../src/guestfs.pod:3143
18871 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
18872 "which was found at compile time by the configure script is used."
18876 #: ../fish/guestfish.pod:1154 ../src/guestfs.pod:3149
18877 msgid "LIBGUESTFS_TRACE"
18881 #: ../fish/guestfish.pod:1156
18882 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18886 #: ../fish/guestfish.pod:1158
18891 #: ../fish/guestfish.pod:1160
18893 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18898 #: ../fish/guestfish.pod:1163 ../src/guestfs.pod:3154
18903 #: ../fish/guestfish.pod:1165 ../src/guestfs.pod:3156
18905 "Location of temporary directory, defaults to C</tmp> except for the cached "
18906 "supermin appliance which defaults to C</var/tmp>."
18910 #: ../fish/guestfish.pod:1168 ../src/guestfs.pod:3159
18912 "If libguestfs was compiled to use the supermin appliance then the real "
18913 "appliance is cached in this directory, shared between all handles belonging "
18914 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
18915 "use in case C</var/tmp> is not large enough."
18919 #: ../fish/guestfish.pod:1176 ../fuse/guestmount.pod:288
18920 #: ../rescue/virt-rescue.pod:273
18925 #: ../fish/guestfish.pod:1180 ../fuse/guestmount.pod:292
18926 #: ../rescue/virt-rescue.pod:277
18927 msgid "$HOME/.libguestfs-tools.rc"
18931 #: ../fish/guestfish.pod:1182 ../fuse/guestmount.pod:294
18932 #: ../rescue/virt-rescue.pod:279
18933 msgid "/etc/libguestfs-tools.conf"
18937 #: ../fish/guestfish.pod:1184 ../fuse/guestmount.pod:296
18938 #: ../rescue/virt-rescue.pod:281
18940 "This configuration file controls the default read-only or read-write mode "
18941 "(I<--ro> or I<--rw>)."
18945 #: ../fish/guestfish.pod:1187
18946 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
18950 #: ../fish/guestfish.pod:1189
18951 msgid "$HOME/.guestfish"
18955 #: ../fish/guestfish.pod:1191
18957 "If compiled with GNU readline support, then the command history is saved in "
18962 #: ../fish/guestfish.pod:1194
18963 msgid "$HOME/.inputrc"
18967 #: ../fish/guestfish.pod:1196
18968 msgid "/etc/inputrc"
18972 #: ../fish/guestfish.pod:1198
18974 "If compiled with GNU readline support, then these files can be used to "
18975 "configure readline. For further information, please see L<readline(3)/"
18976 "INITIALIZATION FILE>."
18980 #: ../fish/guestfish.pod:1202
18981 msgid "To write rules which only apply to guestfish, use:"
18985 #: ../fish/guestfish.pod:1204
18995 #: ../fish/guestfish.pod:1208
18997 "Variables that you can set in inputrc that change the behaviour of guestfish "
18998 "in useful ways include:"
19002 #: ../fish/guestfish.pod:1213
19003 msgid "completion-ignore-case (default: on)"
19007 #: ../fish/guestfish.pod:1215
19009 "By default, guestfish will ignore case when tab-completing paths on the "
19014 #: ../fish/guestfish.pod:1218
19017 " set completion-ignore-case off\n"
19022 #: ../fish/guestfish.pod:1220
19023 msgid "to make guestfish case sensitive."
19027 #: ../fish/guestfish.pod:1224
19032 #: ../fish/guestfish.pod:1226
19033 msgid "test2.img (etc)"
19037 #: ../fish/guestfish.pod:1228
19039 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
19040 "will be created in the file C<test1.img> in the current directory. The "
19041 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
19042 "the same name will be overwritten."
19046 #: ../fish/guestfish.pod:1237
19048 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
19049 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
19050 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
19051 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
19052 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
19053 ">, L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
19057 #: ../fish/guestfish.pod:1266 ../src/guestfs.pod:3246
19058 #: ../test-tool/libguestfs-test-tool.pod:112
19059 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
19063 #: ../fish/virt-copy-in.pod:5
19065 "virt-copy-in - Copy files and directories into a virtual machine disk image."
19069 #: ../fish/virt-copy-in.pod:9
19072 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
19077 #: ../fish/virt-copy-in.pod:11
19080 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
19085 #: ../fish/virt-copy-in.pod:15
19087 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
19088 "causing disk corruption. The virtual machine must be shut down before you "
19089 "use this command."
19093 #: ../fish/virt-copy-in.pod:21
19095 "C<virt-copy-in> copies files and directories from the local disk into a "
19096 "virtual machine disk image or named libvirt domain."
19100 #: ../fish/virt-copy-in.pod:24
19102 "You can give one of more filenames and directories on the command line. "
19103 "Directories are copied in recursively. The final parameter must be the "
19104 "destination directory in the disk image which must be an absolute path "
19105 "starting with a C</> character."
19109 #: ../fish/virt-copy-in.pod:33
19112 " virt-copy-in -d MyGuest resolv.conf /etc\n"
19117 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
19118 msgid "Upload a home directory to a guest:"
19122 #: ../fish/virt-copy-in.pod:37
19125 " virt-copy-in -d MyGuest skel /home\n"
19130 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
19131 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
19132 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
19136 #: ../fish/virt-copy-in.pod:41
19138 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19139 "> C<copy-in> command. For anything more complex than a trivial copy, you "
19140 "are probably better off using guestfish directly."
19144 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
19145 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
19147 "Since the shell script just passes options straight to guestfish, read "
19148 "L<guestfish(1)> to see the full list of options."
19152 #: ../fish/virt-copy-in.pod:52
19154 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
19155 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
19159 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
19160 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
19161 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
19165 #: ../fish/virt-copy-out.pod:5
19167 "virt-copy-out - Copy files and directories out of a virtual machine disk "
19172 #: ../fish/virt-copy-out.pod:9
19175 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
19180 #: ../fish/virt-copy-out.pod:11
19183 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
19188 #: ../fish/virt-copy-out.pod:15
19190 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
19191 "image or named libvirt domain."
19195 #: ../fish/virt-copy-out.pod:18
19197 "You can give one of more filenames and directories on the command line. "
19198 "Directories are copied out recursively."
19202 #: ../fish/virt-copy-out.pod:23
19203 msgid "Download the home directories from a virtual machine:"
19207 #: ../fish/virt-copy-out.pod:25
19211 " virt-copy-out -d MyGuest /home homes\n"
19216 #: ../fish/virt-copy-out.pod:30
19218 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19219 "> C<copy-out> command. For anything more complex than a trivial copy, you "
19220 "are probably better off using guestfish directly."
19224 #: ../fish/virt-copy-out.pod:41
19226 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
19227 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
19231 #: ../fish/virt-tar-in.pod:5
19232 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
19236 #: ../fish/virt-tar-in.pod:9
19239 " virt-tar-in -a disk.img data.tar /destination\n"
19244 #: ../fish/virt-tar-in.pod:11
19247 " virt-tar-in -d domain data.tar /destination\n"
19252 #: ../fish/virt-tar-in.pod:13
19255 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
19260 #: ../fish/virt-tar-in.pod:17
19262 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
19263 "causing disk corruption. The virtual machine must be shut down before you "
19264 "use this command."
19268 #: ../fish/virt-tar-in.pod:23
19270 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
19271 "image or named libvirt domain."
19275 #: ../fish/virt-tar-in.pod:26
19277 "The first parameter is the tar file. Use C<-> to read the tar file from "
19278 "standard input. The second parameter is the absolute target directory to "
19283 #: ../fish/virt-tar-in.pod:34
19286 " virt-tar-in -d MyGuest homes.tar /home\n"
19291 #: ../fish/virt-tar-in.pod:38
19293 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19294 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
19295 "probably better off using guestfish directly."
19299 #: ../fish/virt-tar-in.pod:49
19301 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
19302 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
19307 #: ../fish/virt-tar-out.pod:5
19309 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
19313 #: ../fish/virt-tar-out.pod:9
19316 " virt-tar-out -a disk.img /dir files.tar\n"
19321 #: ../fish/virt-tar-out.pod:11
19324 " virt-tar-out -d domain /dir files.tar\n"
19329 #: ../fish/virt-tar-out.pod:13
19332 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
19337 #: ../fish/virt-tar-out.pod:17
19339 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
19343 #: ../fish/virt-tar-out.pod:20
19345 "The first parameter is the absolute path of the virtual machine directory. "
19346 "The second parameter is the tar file to write. Use C<-> to write to "
19351 #: ../fish/virt-tar-out.pod:26
19352 msgid "Download the home directories from a guest:"
19356 #: ../fish/virt-tar-out.pod:28
19359 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
19364 #: ../fish/virt-tar-out.pod:32
19366 "This command is just a simple shell script wrapper around the L<guestfish(1)"
19367 "> C<tar-out> command. For anything more complex than a trivial copy, you "
19368 "are probably better off using guestfish directly."
19372 #: ../fish/virt-tar-out.pod:43
19374 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
19375 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
19379 #: ../fuse/guestmount.pod:5
19381 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
19385 #: ../fuse/guestmount.pod:9
19388 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
19393 #: ../fuse/guestmount.pod:11
19396 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
19401 #: ../fuse/guestmount.pod:13
19404 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
19409 #: ../fuse/guestmount.pod:17
19411 "You must I<not> use C<guestmount> in read-write mode on live virtual "
19412 "machines. If you do this, you risk disk corruption in the VM."
19416 #: ../fuse/guestmount.pod:22
19418 "The guestmount program can be used to mount virtual machine filesystems and "
19419 "other disk images on the host. It uses libguestfs for access to the guest "
19420 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
19421 "a mountable device."
19425 #: ../fuse/guestmount.pod:27
19427 "Along with other options, you have to give at least one device (I<-a> "
19428 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
19429 "option) or use the I<-i> inspection option. How this works is better "
19430 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
19435 #: ../fuse/guestmount.pod:33
19437 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
19438 "by you, and the filesystem will not be visible to any other users unless you "
19439 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
19440 "the filesystem, use the C<fusermount -u> command."
19444 #: ../fuse/guestmount.pod:41
19446 "For a typical Windows guest which has its main filesystem on the first "
19451 #: ../fuse/guestmount.pod:44
19454 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
19459 #: ../fuse/guestmount.pod:46
19461 "For a typical Linux guest which has a /boot filesystem on the first "
19462 "partition, and the root filesystem on a logical volume:"
19466 #: ../fuse/guestmount.pod:49
19469 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
19474 #: ../fuse/guestmount.pod:51
19475 msgid "To get libguestfs to detect guest mountpoints for you:"
19479 #: ../fuse/guestmount.pod:53
19482 " guestmount -a guest.img -i --ro /mnt\n"
19487 #: ../fuse/guestmount.pod:55
19488 msgid "For a libvirt guest called \"Guest\" you could do:"
19492 #: ../fuse/guestmount.pod:57
19495 " guestmount -d Guest -i --ro /mnt\n"
19500 #: ../fuse/guestmount.pod:59
19502 "If you don't know what filesystems are contained in a guest or disk image, "
19503 "use L<virt-filesystems(1)> first:"
19507 #: ../fuse/guestmount.pod:62
19510 " virt-filesystems MyGuest\n"
19515 #: ../fuse/guestmount.pod:64
19517 "If you want to trace the libguestfs calls but without excessive debugging "
19518 "information, we recommend:"
19522 #: ../fuse/guestmount.pod:67
19525 " guestmount [...] --trace /mnt\n"
19530 #: ../fuse/guestmount.pod:69
19531 msgid "If you want to debug the program, we recommend:"
19535 #: ../fuse/guestmount.pod:71
19538 " guestmount [...] --trace --verbose /mnt\n"
19543 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
19544 #: ../resize/virt-resize.pod:544
19549 #: ../fuse/guestmount.pod:75
19550 msgid "Other users cannot see the filesystem by default"
19554 #: ../fuse/guestmount.pod:77
19556 "If you mount a filesystem as one user (eg. root), then other users will not "
19557 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
19558 "option when mounting:"
19562 #: ../fuse/guestmount.pod:81
19565 " sudo guestmount [...] -o allow_other /mnt\n"
19570 #: ../fuse/guestmount.pod:91
19571 msgid "Add a block device or virtual machine image."
19575 #: ../fuse/guestmount.pod:114
19576 msgid "B<--dir-cache-timeout N>"
19580 #: ../fuse/guestmount.pod:116
19582 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
19583 "seconds. The readdir cache [actually, there are several semi-independent "
19584 "caches] is populated after a readdir(2) call with the stat and extended "
19585 "attributes of the files in the directory, in anticipation that they will be "
19586 "requested soon after."
19590 #: ../fuse/guestmount.pod:122
19592 "There is also a different attribute cache implemented by FUSE (see the FUSE "
19593 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
19594 "requests, only cache existing ones."
19598 #: ../fuse/guestmount.pod:142
19600 "If you have untrusted raw-format guest disk images, you should use this "
19601 "option to specify the disk format. This avoids a possible security problem "
19602 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
19603 "guestfs_add_drive_opts>."
19607 #: ../fuse/guestmount.pod:147
19608 msgid "B<--fuse-help>"
19612 #: ../fuse/guestmount.pod:149
19613 msgid "Display help on special FUSE options (see I<-o> below)."
19617 #: ../fuse/guestmount.pod:153
19618 msgid "Display brief help and exit."
19622 #: ../fuse/guestmount.pod:177
19624 "Mount the named partition or logical volume on the given mountpoint B<in the "
19625 "guest> (this has nothing to do with mountpoints in the host)."
19629 #: ../fuse/guestmount.pod:180
19631 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
19632 "something on C</>."
19636 #: ../fuse/guestmount.pod:197
19638 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
19639 "unmounted. If you specify this option, then we don't attempt to sync the "
19640 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
19644 #: ../fuse/guestmount.pod:202
19645 msgid "B<-o option>"
19649 #: ../fuse/guestmount.pod:204
19650 msgid "B<--option option>"
19654 #: ../fuse/guestmount.pod:206
19655 msgid "Pass extra options to FUSE."
19659 #: ../fuse/guestmount.pod:208
19661 "To get a list of all the extra options supported by FUSE, use the command "
19662 "below. Note that only the FUSE I<-o> options can be passed, and only some "
19663 "of them are a good idea."
19667 #: ../fuse/guestmount.pod:212
19670 " guestmount --fuse-help\n"
19675 #: ../fuse/guestmount.pod:214
19676 msgid "Some potentially useful FUSE options:"
19680 #: ../fuse/guestmount.pod:218
19681 msgid "B<-o allow_other>"
19685 #: ../fuse/guestmount.pod:220
19686 msgid "Allow other users to see the filesystem."
19690 #: ../fuse/guestmount.pod:222
19691 msgid "B<-o attr_timeout=N>"
19695 #: ../fuse/guestmount.pod:224
19696 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
19700 #: ../fuse/guestmount.pod:226
19701 msgid "B<-o kernel_cache>"
19705 #: ../fuse/guestmount.pod:228
19707 "Allow the kernel to cache files (reduces the number of reads that have to go "
19708 "through the L<guestfs(3)> API). This is generally a good idea if you can "
19709 "afford the extra memory usage."
19713 #: ../fuse/guestmount.pod:232
19714 msgid "B<-o uid=N> B<-o gid=N>"
19718 #: ../fuse/guestmount.pod:234
19720 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
19721 "the chosen values."
19725 #: ../fuse/guestmount.pod:243
19727 "Add devices and mount everything read-only. Also disallow writes and make "
19728 "the disk appear read-only to FUSE."
19732 #: ../fuse/guestmount.pod:246
19734 "This is highly recommended if you are not going to edit the guest disk. If "
19735 "the guest is running and this option is I<not> supplied, then there is a "
19736 "strong risk of disk corruption in the guest. We try to prevent this from "
19737 "happening, but it is not always possible."
19741 #: ../fuse/guestmount.pod:251 ../rescue/virt-rescue.pod:171
19742 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
19746 #: ../fuse/guestmount.pod:255
19747 msgid "Enable SELinux support for the guest."
19751 #: ../fuse/guestmount.pod:261
19752 msgid "Enable verbose messages from underlying libguestfs."
19756 #: ../fuse/guestmount.pod:267
19757 msgid "Display the program version and exit."
19761 #: ../fuse/guestmount.pod:276 ../fuse/guestmount.pod:299
19762 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
19763 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
19767 #: ../fuse/guestmount.pod:280
19772 #: ../fuse/guestmount.pod:282
19773 msgid "Trace libguestfs calls and entry into each FUSE function."
19777 #: ../fuse/guestmount.pod:284
19778 msgid "This also stops the daemon from forking into the background."
19782 #: ../fuse/guestmount.pod:310
19784 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
19785 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
19790 #: ../fuse/guestmount.pod:325
19791 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
19795 #: ../inspector/virt-inspector.pod:5
19797 "virt-inspector - Display operating system version and other information "
19798 "about a virtual machine"
19802 #: ../inspector/virt-inspector.pod:9
19805 " virt-inspector [--options] -d domname\n"
19810 #: ../inspector/virt-inspector.pod:11
19813 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
19818 #: ../inspector/virt-inspector.pod:15
19821 " virt-inspector domname\n"
19826 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
19829 " virt-inspector disk.img [disk.img ...]\n"
19834 #: ../inspector/virt-inspector.pod:21
19836 "B<virt-inspector> examines a virtual machine or disk image and tries to "
19837 "determine the version of the operating system and other information about "
19838 "the virtual machine."
19842 #: ../inspector/virt-inspector.pod:25
19843 msgid "Virt-inspector produces XML output for feeding into other programs."
19847 #: ../inspector/virt-inspector.pod:27
19849 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
19850 "the libvirt domain (see: C<virsh list --all>)."
19854 #: ../inspector/virt-inspector.pod:30
19856 "You can also run virt-inspector directly on disk images from a single "
19857 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
19858 "has several block devices, in which case you should list several I<-a> "
19859 "options one after another, with the first corresponding to the guest's C</"
19860 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
19864 #: ../inspector/virt-inspector.pod:37
19866 "You can also run virt-inspector on install disks, live CDs, bootable USB "
19867 "keys and similar."
19871 #: ../inspector/virt-inspector.pod:40
19873 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
19874 "inspect several virtual machines, you have to run virt-inspector several "
19875 "times (for example, from a shell script for-loop)."
19879 #: ../inspector/virt-inspector.pod:45
19881 "Because virt-inspector needs direct access to guest images, it won't "
19882 "normally work over remote libvirt connections."
19886 #: ../inspector/virt-inspector.pod:48
19888 "All of the information available from virt-inspector is also available "
19889 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
19890 "The same information can also be fetched using guestfish or via libguestfs "
19891 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
19892 "WITH OTHER PROGRAMMING LANGUAGES>)."
19896 #: ../inspector/virt-inspector.pod:81
19898 "Libvirt is only used if you specify a C<domname> on the command line. If "
19899 "you specify guest block devices directly (I<-a>), then libvirt is not used "
19904 #: ../inspector/virt-inspector.pod:94
19906 "When prompting for keys and passphrases, virt-inspector normally turns "
19907 "echoing off so you cannot see what you are typing. If you are not worried "
19908 "about Tempest attacks and there is no one else in the room you can specify "
19909 "this flag to see what you are typing."
19913 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
19914 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
19915 #: ../tools/virt-win-reg.pl:144
19917 "Specify the format of disk images given on the command line. If this is "
19918 "omitted then the format is autodetected from the content of the disk image."
19922 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
19923 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
19924 #: ../tools/virt-win-reg.pl:148
19926 "If disk images are requested from libvirt, then this program asks libvirt "
19927 "for this information. In this case, the value of the format parameter is "
19932 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:314
19933 #: ../resize/virt-resize.pod:406 ../tools/virt-list-filesystems.pl:101
19934 #: ../tools/virt-list-partitions.pl:102 ../tools/virt-tar.pl:151
19935 #: ../tools/virt-win-reg.pl:152
19937 "If working with untrusted raw-format guest disk images, you should ensure "
19938 "the format is always specified."
19942 #: ../inspector/virt-inspector.pod:139
19943 msgid "Previous versions of virt-inspector allowed you to write either:"
19947 #: ../inspector/virt-inspector.pod:145
19950 " virt-inspector guestname\n"
19955 #: ../inspector/virt-inspector.pod:153
19960 #: ../inspector/virt-inspector.pod:155
19962 "The virt-inspector XML is described precisely in a RELAX NG schema file "
19963 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
19964 "just an overview."
19968 #: ../inspector/virt-inspector.pod:159
19970 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
19971 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
19972 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
19973 "which is vanishingly rare in real world VMs."
19977 #: ../inspector/virt-inspector.pod:164
19978 msgid "E<lt>operatingsystemE<gt>"
19982 #: ../inspector/virt-inspector.pod:166
19984 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
19985 "describe the operating system, its architecture, the descriptive \"product "
19986 "name\" string, the type of OS and so on, as in this example:"
19990 #: ../inspector/virt-inspector.pod:170
19993 " <operatingsystems>\n"
19994 " <operatingsystem>\n"
19995 " <root>/dev/sda2</root>\n"
19996 " <name>windows</name>\n"
19997 " <arch>i386</arch>\n"
19998 " <distro>windows</distro>\n"
19999 " <product_name>Windows 7 Enterprise</product_name>\n"
20000 " <product_variant>Client</product_variant>\n"
20001 " <major_version>6</major_version>\n"
20002 " <minor_version>1</minor_version>\n"
20003 " <windows_systemroot>/Windows</windows_systemroot>\n"
20004 " <format>installed</format>\n"
20009 #: ../inspector/virt-inspector.pod:183
20011 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
20012 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
20013 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
20014 "architecture. The other fields are fairly self-explanatory, but because "
20015 "these fields are taken directly from the libguestfs inspection API you can "
20016 "find precise information from L<guestfs(3)/INSPECTION>."
20020 #: ../inspector/virt-inspector.pod:191
20022 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
20023 "of view of libguestfs (block devices may have completely different names "
20024 "inside the VM itself)."
20028 #: ../inspector/virt-inspector.pod:195
20029 msgid "E<lt>mountpointsE<gt>"
20033 #: ../inspector/virt-inspector.pod:197
20035 "Un*x-like guests typically have multiple filesystems which are mounted at "
20036 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
20037 "element which looks like this:"
20041 #: ../inspector/virt-inspector.pod:201
20044 " <operatingsystems>\n"
20045 " <operatingsystem>\n"
20048 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
20049 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
20050 " </mountpoints>\n"
20055 #: ../inspector/virt-inspector.pod:209
20057 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
20058 "and may have completely different names inside the guest. Only mountable "
20059 "filesystems appear in this list, not things like swap devices."
20063 #: ../inspector/virt-inspector.pod:214
20064 msgid "E<lt>filesystemsE<gt>"
20068 #: ../inspector/virt-inspector.pod:216
20070 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
20071 "filesystems belonging to the guest, including swap and empty partitions. "
20072 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
20073 "this OS or shared with this OS and other OSes)."
20077 #: ../inspector/virt-inspector.pod:222
20078 msgid "You might see something like this:"
20082 #: ../inspector/virt-inspector.pod:224
20085 " <operatingsystems>\n"
20086 " <operatingsystem>\n"
20089 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
20090 " <type>ext4</type>\n"
20091 " <label>Fedora-13-x86_64</label>\n"
20092 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
20098 #: ../inspector/virt-inspector.pod:234
20100 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
20101 "the label, and the UUID."
20105 #: ../inspector/virt-inspector.pod:237
20106 msgid "E<lt>applicationsE<gt>"
20110 #: ../inspector/virt-inspector.pod:239
20112 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
20113 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
20118 #: ../inspector/virt-inspector.pod:243
20120 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
20121 "Typical values would be C<rpm> and C<deb>."
20125 #: ../inspector/virt-inspector.pod:246
20127 "E<lt>package_managementE<gt>, if present, describes the package manager. "
20128 "Typical values include C<yum>, C<up2date> and C<apt>"
20132 #: ../inspector/virt-inspector.pod:249
20133 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
20137 #: ../inspector/virt-inspector.pod:252
20140 " <operatingsystems>\n"
20141 " <operatingsystem>\n"
20143 " <applications>\n"
20145 " <name>coreutils</name>\n"
20146 " <version>8.5</version>\n"
20147 " <release>1</release>\n"
20148 " </application>\n"
20153 #: ../inspector/virt-inspector.pod:262
20155 "The version and release fields may not be available for some types guests. "
20156 "Other fields are possible, see L<guestfs(3)/"
20157 "guestfs_inspect_list_applications>."
20161 #: ../inspector/virt-inspector.pod:266
20162 msgid "E<lt>drive_mappingsE<gt>"
20166 #: ../inspector/virt-inspector.pod:268
20168 "For operating systems like Windows which use drive letters, virt-inspector "
20169 "is able to find out how drive letters map to filesystems."
20173 #: ../inspector/virt-inspector.pod:272
20176 " <operatingsystems>\n"
20177 " <operatingsystem>\n"
20179 " <drive_mappings>\n"
20180 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
20181 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
20182 " </drive_mappings>\n"
20187 #: ../inspector/virt-inspector.pod:280
20189 "In the example above, drive C maps to the filesystem on the second partition "
20190 "on the first disk, and drive E maps to the filesystem on the first partition "
20191 "on the second disk."
20195 #: ../inspector/virt-inspector.pod:284
20197 "Note that this only covers permanent local filesystem mappings, not things "
20198 "like network shares. Furthermore NTFS volume mount points may not be listed "
20203 #: ../inspector/virt-inspector.pod:288
20204 msgid "E<lt>iconE<gt>"
20208 #: ../inspector/virt-inspector.pod:290
20210 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
20211 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
20212 "very large and high quality."
20216 #: ../inspector/virt-inspector.pod:294
20219 " <operatingsystems>\n"
20220 " <operatingsystem>\n"
20223 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
20224 " [... many lines of base64 data ...]\n"
20230 #: ../inspector/virt-inspector.pod:302
20232 "To display the icon, you have to extract it and convert the base64 data back "
20233 "to a binary file. Use an XPath query or simply an editor to extract the "
20234 "data, then use the coreutils L<base64(1)> program to do the conversion back "
20239 #: ../inspector/virt-inspector.pod:307
20242 " base64 -i -d < icon.data > icon.png\n"
20247 #: ../inspector/virt-inspector.pod:309
20248 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
20252 #: ../inspector/virt-inspector.pod:311
20254 "Virt-inspector can detect some operating system installers on install disks, "
20255 "live CDs, bootable USB keys and more."
20259 #: ../inspector/virt-inspector.pod:314
20261 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
20262 "fields may be present to indicate a live CD, network installer, or one part "
20263 "of a multipart CD. For example:"
20267 #: ../inspector/virt-inspector.pod:318
20270 " <operatingsystems>\n"
20271 " <operatingsystem>\n"
20272 " <root>/dev/sda</root>\n"
20273 " <name>linux</name>\n"
20274 " <arch>i386</arch>\n"
20275 " <distro>ubuntu</distro>\n"
20276 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
20277 " <major_version>10</major_version>\n"
20278 " <minor_version>10</minor_version>\n"
20279 " <format>installer</format>\n"
20285 #: ../inspector/virt-inspector.pod:330
20286 msgid "USING XPATH"
20290 #: ../inspector/virt-inspector.pod:332
20292 "You can use the XPath query language to select parts of the XML. We "
20293 "recommend using C<xmlstarlet> to perform XPath queries from the command line."
20297 #: ../inspector/virt-inspector.pod:338
20300 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
20302 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
20303 " <type>ext4</type>\n"
20309 #: ../inspector/virt-inspector.pod:344
20312 " $ virt-inspector -d Guest | \\\n"
20313 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
20319 #: ../inspector/virt-inspector.pod:348
20322 " $ virt-inspector -d Guest | \\\n"
20323 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
20324 " [displays the guest icon, if there is one]\n"
20329 #: ../inspector/virt-inspector.pod:359
20330 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
20334 #: ../inspector/virt-inspector.pod:361
20336 "Early versions of libguestfs shipped with a different virt-inspector program "
20337 "written in Perl (the current version is written in C). The XML output of "
20338 "the Perl virt-inspector was different and it could also output in other "
20339 "formats like text."
20343 #: ../inspector/virt-inspector.pod:366
20345 "The old virt-inspector is no longer supported or shipped with libguestfs."
20349 #: ../inspector/virt-inspector.pod:369
20351 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
20352 "versions of virt-inspector with different names:"
20356 #: ../inspector/virt-inspector.pod:372
20359 " virt-inspector Old Perl version.\n"
20360 " virt-inspector2 New C version.\n"
20365 #: ../inspector/virt-inspector.pod:382
20367 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
20368 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
20372 #: ../inspector/virt-inspector.pod:399
20373 msgid "Matthew Booth L<mbooth@redhat.com>"
20377 #: ../java/examples/guestfs-java.pod:5
20378 msgid "guestfs-java - How to use libguestfs from Java"
20382 #: ../java/examples/guestfs-java.pod:9
20385 " import com.redhat.et.libguestfs.*;\n"
20390 #: ../java/examples/guestfs-java.pod:11
20393 " GuestFS g = new GuestFS ();\n"
20394 " g.add_drive_opts (\"disk.img\", null);\n"
20400 #: ../java/examples/guestfs-java.pod:17
20402 "This manual page documents how to call libguestfs from the Java programming "
20403 "language. This page just documents the differences from the C API and gives "
20404 "some examples. If you are not familiar with using libguestfs, you also need "
20405 "to read L<guestfs(3)>."
20409 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
20410 msgid "CLOSING THE HANDLE"
20414 #: ../java/examples/guestfs-java.pod:24
20416 "The handle is closed when it is reaped by the garbage collector. Because "
20417 "libguestfs handles include a lot of state, it is also possible to close (and "
20418 "hence free) them explicitly by calling the C<close> method."
20422 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
20423 #: ../python/examples/guestfs-python.pod:21
20424 #: ../ruby/examples/guestfs-ruby.pod:22
20429 #: ../java/examples/guestfs-java.pod:31
20431 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
20432 "exception. This has a single parameter which is the error message (a "
20437 #: ../java/examples/guestfs-java.pod:35
20438 msgid "Calling any method on a closed handle raises the same exception."
20442 #: ../java/examples/guestfs-java.pod:47
20444 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
20445 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
20446 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
20450 #: ../ocaml/examples/guestfs-ocaml.pod:5
20451 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
20455 #: ../ocaml/examples/guestfs-ocaml.pod:9
20456 msgid "Module style:"
20460 #: ../ocaml/examples/guestfs-ocaml.pod:11
20463 " let g = Guestfs.create () in\n"
20464 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
20465 " Guestfs.launch g;\n"
20470 #: ../ocaml/examples/guestfs-ocaml.pod:15
20471 msgid "Object-oriented style:"
20475 #: ../ocaml/examples/guestfs-ocaml.pod:17
20478 " let g = new Guestfs.guestfs () in\n"
20479 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
20485 #: ../ocaml/examples/guestfs-ocaml.pod:21
20488 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
20490 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
20495 #: ../ocaml/examples/guestfs-ocaml.pod:27
20497 "This manual page documents how to call libguestfs from the OCaml programming "
20498 "language. This page just documents the differences from the C API and gives "
20499 "some examples. If you are not familiar with using libguestfs, you also need "
20500 "to read L<guestfs(3)>."
20504 #: ../ocaml/examples/guestfs-ocaml.pod:32
20505 msgid "PROGRAMMING STYLES"
20509 #: ../ocaml/examples/guestfs-ocaml.pod:34
20511 "There are two different programming styles supported by the OCaml bindings. "
20512 "You can use a module style, with each C function mapped to an OCaml function:"
20516 #: ../ocaml/examples/guestfs-ocaml.pod:38
20519 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
20524 #: ../ocaml/examples/guestfs-ocaml.pod:40
20529 #: ../ocaml/examples/guestfs-ocaml.pod:42
20532 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
20537 #: ../ocaml/examples/guestfs-ocaml.pod:44
20539 "Alternately you can use an object-oriented style, calling methods on the "
20540 "class C<Guestfs.guestfs>:"
20544 #: ../ocaml/examples/guestfs-ocaml.pod:47
20547 " method set_verbose : bool -> unit\n"
20552 #: ../ocaml/examples/guestfs-ocaml.pod:49
20554 "The object-oriented style is usually briefer, and the minor performance "
20555 "penalty isn't noticable in the general overhead of performing libguestfs "
20560 #: ../ocaml/examples/guestfs-ocaml.pod:55
20562 "The handle is closed when it is reaped by the garbage collector. Because "
20563 "libguestfs handles include a lot of state, it is also possible to close (and "
20564 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
20569 #: ../ocaml/examples/guestfs-ocaml.pod:62
20571 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
20572 "exception. This has a single parameter which is the error message (a "
20577 #: ../ocaml/examples/guestfs-ocaml.pod:66
20579 "Calling any function/method on a closed handle raises C<Guestfs."
20580 "Handle_closed>. The single parameter is the name of the function that you "
20585 #: ../ocaml/examples/guestfs-ocaml.pod:80
20587 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
20588 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
20589 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
20593 #: ../perl/examples/guestfs-perl.pod:5
20594 msgid "guestfs-perl - How to use libguestfs from Perl"
20598 #: ../perl/examples/guestfs-perl.pod:9
20601 " use Sys::Guestfs;\n"
20606 #: ../perl/examples/guestfs-perl.pod:11
20609 " my $h = Sys::Guestfs->new ();\n"
20610 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
20611 " $h->launch ();\n"
20612 " $h->mount_options ('', '/dev/sda1', '/');\n"
20613 " $h->touch ('/hello');\n"
20619 #: ../perl/examples/guestfs-perl.pod:20
20621 "This manual page documents how to call libguestfs from the Perl programming "
20622 "language. This page just documents the differences from the C API and gives "
20623 "some examples. If you are not familiar with using libguestfs, you also need "
20624 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
20628 #: ../perl/examples/guestfs-perl.pod:26
20633 #: ../perl/examples/guestfs-perl.pod:28
20635 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
20640 #: ../perl/examples/guestfs-perl.pod:41
20642 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
20643 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
20644 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
20648 #: ../python/examples/guestfs-python.pod:5
20649 msgid "guestfs-python - How to use libguestfs from Python"
20653 #: ../python/examples/guestfs-python.pod:9
20656 " import guestfs\n"
20657 " g = guestfs.GuestFS ()\n"
20658 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
20664 #: ../python/examples/guestfs-python.pod:16
20666 "This manual page documents how to call libguestfs from the Python "
20667 "programming language. This page just documents the differences from the C "
20668 "API and gives some examples. If you are not familiar with using libguestfs, "
20669 "you also need to read L<guestfs(3)>."
20673 #: ../python/examples/guestfs-python.pod:23
20675 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
20676 "single string argument which is the error message."
20680 #: ../python/examples/guestfs-python.pod:26
20681 msgid "MORE DOCUMENTATION"
20685 #: ../python/examples/guestfs-python.pod:28
20690 #: ../python/examples/guestfs-python.pod:30
20694 " >>> import guestfs\n"
20695 " >>> help (guestfs)\n"
20700 #: ../python/examples/guestfs-python.pod:44
20702 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
20703 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
20704 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
20708 #: ../rescue/virt-rescue.pod:5
20709 msgid "virt-rescue - Run a rescue shell on a virtual machine"
20713 #: ../rescue/virt-rescue.pod:9
20716 " virt-rescue [--options] -d domname\n"
20721 #: ../rescue/virt-rescue.pod:11
20724 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
20729 #: ../rescue/virt-rescue.pod:15
20732 " virt-rescue [--options] domname\n"
20737 #: ../rescue/virt-rescue.pod:17
20740 " virt-rescue [--options] disk.img [disk.img ...]\n"
20745 #: ../rescue/virt-rescue.pod:21
20747 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
20748 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
20749 "you from doing this, but doesn't catch all cases."
20753 #: ../rescue/virt-rescue.pod:25
20755 "However if you use the I<--ro> (read only) option, then you can attach a "
20756 "shell to a live virtual machine. The results might be strange or "
20757 "inconsistent at times but you won't get disk corruption."
20761 #: ../rescue/virt-rescue.pod:31
20763 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
20764 "need for a CD. virt-rescue gives you a rescue shell and some simple "
20765 "recovery tools which you can use to examine or rescue a virtual machine or "
20770 #: ../rescue/virt-rescue.pod:36
20772 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
20773 "on disk image(s):"
20777 #: ../rescue/virt-rescue.pod:39
20780 " virt-rescue -d GuestName\n"
20785 #: ../rescue/virt-rescue.pod:41
20788 " virt-rescue --ro -a /path/to/disk.img\n"
20793 #: ../rescue/virt-rescue.pod:43
20796 " virt-rescue -a /dev/sdc\n"
20801 #: ../rescue/virt-rescue.pod:45
20802 msgid "For live VMs you I<must> use the --ro option."
20806 #: ../rescue/virt-rescue.pod:47
20808 "When you run virt-rescue on a virtual machine or disk image, you are placed "
20809 "in an interactive bash shell where you can use many ordinary Linux "
20810 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
20811 "appliance. You must mount the virtual machine's filesystems by hand. There "
20812 "is an empty directory called C</sysroot> where you can mount filesystems."
20816 #: ../rescue/virt-rescue.pod:54
20818 "In the example below, we list logical volumes, then choose one to mount "
20819 "under C</sysroot>:"
20823 #: ../rescue/virt-rescue.pod:57
20827 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
20828 " lv_root vg_f11x64 -wi-a- 8.83G\n"
20829 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
20830 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
20831 " ><rescue> ls /sysroot\n"
20836 #: ../rescue/virt-rescue.pod:64
20838 "If you don't know what filesystems are available on the virtual machine then "
20839 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
20843 #: ../rescue/virt-rescue.pod:70
20845 "Virt-rescue can be used on I<any> disk image file or device, not just a "
20846 "virtual machine. For example you can use it on a blank file if you want to "
20847 "partition that file (although we would recommend using L<guestfish(1)> "
20848 "instead as it is more suitable for this purpose). You can even use virt-"
20849 "rescue on things like SD cards."
20853 #: ../rescue/virt-rescue.pod:76
20855 "Virt-rescue does not require root. You only need to run it as root if you "
20856 "need root to open the disk image."
20860 #: ../rescue/virt-rescue.pod:79
20862 "This tool is just designed for quick interactive hacking on a virtual "
20863 "machine. For more structured access to a virtual machine disk image, you "
20864 "should use L<guestfs(3)>. To get a structured shell that you can use to "
20865 "make scripted changes to guests, use L<guestfish(1)>."
20869 #: ../rescue/virt-rescue.pod:103
20870 msgid "B<--append kernelopts>"
20874 #: ../rescue/virt-rescue.pod:105
20875 msgid "Pass additional options to the rescue kernel."
20879 #: ../rescue/virt-rescue.pod:135
20882 " virt-rescue --format=raw -a disk.img\n"
20887 #: ../rescue/virt-rescue.pod:139
20890 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
20895 #: ../rescue/virt-rescue.pod:148
20900 #: ../rescue/virt-rescue.pod:150
20901 msgid "B<--memsize MB>"
20905 #: ../rescue/virt-rescue.pod:152
20907 "Change the amount of memory allocated to the rescue system. The default is "
20908 "set by libguestfs and is small but adequate for running system tools. The "
20909 "occasional program might need more memory. The parameter is specified in "
20914 #: ../rescue/virt-rescue.pod:157
20915 msgid "B<--network>"
20919 #: ../rescue/virt-rescue.pod:159
20920 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
20924 #: ../rescue/virt-rescue.pod:165
20925 msgid "Open the image read-only."
20929 #: ../rescue/virt-rescue.pod:175
20931 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
20932 "SELINUX> before using this option."
20936 #: ../rescue/virt-rescue.pod:178
20941 #: ../rescue/virt-rescue.pod:180
20942 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
20946 #: ../rescue/virt-rescue.pod:198
20948 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
20949 "are done read-write."
20953 #: ../rescue/virt-rescue.pod:211
20954 msgid "Previous versions of virt-rescue allowed you to write either:"
20958 #: ../rescue/virt-rescue.pod:213
20961 " virt-rescue disk.img [disk.img ...]\n"
20966 #: ../rescue/virt-rescue.pod:217
20969 " virt-rescue guestname\n"
20974 #: ../rescue/virt-rescue.pod:225
20979 #: ../rescue/virt-rescue.pod:227
20981 "Adding the I<--network> option enables QEMU user networking in the rescue "
20982 "appliance. There are some differences between user networking and ordinary "
20987 #: ../rescue/virt-rescue.pod:233
20988 msgid "ping does not work"
20992 #: ../rescue/virt-rescue.pod:235
20994 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
20995 "send the ping packets, and because virt-rescue must be able to run as non-"
20996 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
20997 "The ping command will appear to resolve addresses but will not be able to "
20998 "send or receive any packets. This does not mean that the network is not "
21003 #: ../rescue/virt-rescue.pod:242
21004 msgid "cannot receive connections"
21008 #: ../rescue/virt-rescue.pod:244
21009 msgid "QEMU user networking cannot receive incoming connections."
21013 #: ../rescue/virt-rescue.pod:246
21014 msgid "making TCP connections"
21018 #: ../rescue/virt-rescue.pod:248
21020 "The virt-rescue appliance needs to be small and so does not include many "
21021 "network tools. In particular there is no L<telnet(1)> command. You can "
21022 "make TCP connections from the shell using the magical C</dev/tcp/"
21023 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
21027 #: ../rescue/virt-rescue.pod:253
21030 " exec 3<>/dev/tcp/redhat.com/80\n"
21031 " echo \"GET /\" >&3\n"
21037 #: ../rescue/virt-rescue.pod:257
21038 msgid "See L<bash(1)> for more details."
21042 #: ../rescue/virt-rescue.pod:263
21044 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
21045 "ENVIRONMENT VARIABLES> for the complete list."
21049 #: ../rescue/virt-rescue.pod:290
21051 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<http://"
21052 "libguestfs.org/>."
21056 #: ../resize/virt-resize.pod:5
21057 msgid "virt-resize - Resize a virtual machine disk"
21061 #: ../resize/virt-resize.pod:9
21064 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
21065 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
21066 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
21071 #: ../resize/virt-resize.pod:15
21073 "Virt-resize is a tool which can resize a virtual machine disk, making it "
21074 "larger or smaller overall, and resizing or deleting any partitions contained "
21079 #: ../resize/virt-resize.pod:19
21081 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
21082 "not> be used on live virtual machines - for consistent results, shut the "
21083 "virtual machine down before resizing it."
21087 #: ../resize/virt-resize.pod:23
21089 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
21090 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
21094 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:520
21095 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1287 ../src/guestfs.pod:1426
21096 #: ../src/guestfs.pod:2604
21101 #: ../resize/virt-resize.pod:33
21103 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
21104 "fill the extra 5GB of space."
21108 #: ../resize/virt-resize.pod:36
21111 " virt-filesystems --long -h --all -a olddisk\n"
21116 #: ../resize/virt-resize.pod:38
21119 " truncate -r olddisk newdisk\n"
21120 " truncate -s +5G newdisk\n"
21125 #: ../resize/virt-resize.pod:41
21128 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
21129 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
21134 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:527
21135 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1291 ../src/guestfs.pod:1430
21136 #: ../src/guestfs.pod:2629
21141 #: ../resize/virt-resize.pod:46
21143 "As above, but make the /boot partition 200MB bigger, while giving the "
21144 "remaining space to /dev/sda2:"
21148 #: ../resize/virt-resize.pod:49
21151 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
21152 " olddisk newdisk\n"
21157 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:533
21158 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1436
21163 #: ../resize/virt-resize.pod:54
21165 "As in the first example, but expand a logical volume as the final step. "
21166 "This is what you would typically use for Linux guests that use LVM:"
21170 #: ../resize/virt-resize.pod:58
21173 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
21174 " olddisk newdisk\n"
21179 #: ../resize/virt-resize.pod:61
21184 #: ../resize/virt-resize.pod:63
21186 "As in the first example, but the output format will be qcow2 instead of a "
21191 #: ../resize/virt-resize.pod:66
21194 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
21195 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
21200 #: ../resize/virt-resize.pod:71
21201 msgid "DETAILED USAGE"
21205 #: ../resize/virt-resize.pod:73
21206 msgid "EXPANDING A VIRTUAL MACHINE DISK"
21210 #: ../resize/virt-resize.pod:77
21211 msgid "1. Shut down the virtual machine"
21215 #: ../resize/virt-resize.pod:79
21216 msgid "2. Locate input disk image"
21220 #: ../resize/virt-resize.pod:81
21222 "Locate the input disk image (ie. the file or device on the host containing "
21223 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
21224 "dumpxml> like this to find the disk image name:"
21228 #: ../resize/virt-resize.pod:85
21231 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
21232 " Found 1 nodes:\n"
21234 " <source dev=\"/dev/vg/lv_guest\" />\n"
21239 #: ../resize/virt-resize.pod:90
21240 msgid "3. Look at current sizing"
21244 #: ../resize/virt-resize.pod:92
21245 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
21249 #: ../resize/virt-resize.pod:95
21252 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
21253 " Name Type Size Parent\n"
21254 " /dev/sda1 partition 101M /dev/sda\n"
21255 " /dev/sda2 partition 7.9G /dev/sda\n"
21256 " /dev/sda device 8.0G -\n"
21261 #: ../resize/virt-resize.pod:101
21263 "(This example is a virtual machine with an 8 GB disk which we would like to "
21264 "expand up to 10 GB)."
21268 #: ../resize/virt-resize.pod:104
21269 msgid "4. Create output disk"
21273 #: ../resize/virt-resize.pod:106
21275 "Virt-resize cannot do in-place disk modifications. You have to have space "
21276 "to store the resized output disk."
21280 #: ../resize/virt-resize.pod:109
21282 "To store the resized disk image in a file, create a file of a suitable size:"
21286 #: ../resize/virt-resize.pod:112
21289 " # rm -f outdisk\n"
21290 " # truncate -s 10G outdisk\n"
21295 #: ../resize/virt-resize.pod:115
21296 msgid "Or use L<lvcreate(1)> to create a logical volume:"
21300 #: ../resize/virt-resize.pod:117
21303 " # lvcreate -L 10G -n lv_name vg_name\n"
21308 #: ../resize/virt-resize.pod:119
21309 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
21313 #: ../resize/virt-resize.pod:121
21316 " # virsh pool-list\n"
21317 " # virsh vol-create-as poolname newvol 10G\n"
21322 #: ../resize/virt-resize.pod:124
21327 #: ../resize/virt-resize.pod:126
21329 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
21330 "file) and the output disk. The output disk is the one created in the "
21335 #: ../resize/virt-resize.pod:130
21338 " # virt-resize indisk outdisk\n"
21343 #: ../resize/virt-resize.pod:132
21345 "This command just copies disk image C<indisk> to disk image C<outdisk> "
21346 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
21347 "larger, then an extra, empty partition is created at the end of the disk "
21348 "covering the extra space. If C<outdisk> is smaller, then it will give an "
21353 #: ../resize/virt-resize.pod:138
21355 "More realistically you'd want to expand existing partitions in the disk "
21356 "image by passing extra options (for the full list see the L</OPTIONS> "
21361 #: ../resize/virt-resize.pod:142
21363 "L</--expand> is the most useful option. It expands the named partition "
21364 "within the disk to fill any extra space:"
21368 #: ../resize/virt-resize.pod:145
21371 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
21376 #: ../resize/virt-resize.pod:147
21378 "(In this case, an extra partition is I<not> created at the end of the disk, "
21379 "because there will be no unused space)."
21383 #: ../resize/virt-resize.pod:150
21385 "L</--resize> is the other commonly used option. The following would "
21386 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
21387 "rest of the available space:"
21391 #: ../resize/virt-resize.pod:154
21394 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
21395 " indisk outdisk\n"
21400 #: ../resize/virt-resize.pod:157
21402 "If the expanded partition in the image contains a filesystem or LVM PV, then "
21403 "if virt-resize knows how, it will resize the contents, the equivalent of "
21404 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
21405 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
21406 "filesystems, so you would have to online resize them after booting the guest."
21410 #: ../resize/virt-resize.pod:164
21411 msgid "Other options are covered below."
21415 #: ../resize/virt-resize.pod:166
21420 #: ../resize/virt-resize.pod:168
21421 msgid "Thoroughly test the new disk image I<before> discarding the old one."
21425 #: ../resize/virt-resize.pod:170
21426 msgid "If you are using libvirt, edit the XML to point at the new disk:"
21430 #: ../resize/virt-resize.pod:172
21433 " # virsh edit guestname\n"
21438 #: ../resize/virt-resize.pod:174
21440 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
21441 "html#elementsDisks>"
21445 #: ../resize/virt-resize.pod:177
21446 msgid "Then start up the domain with the new, resized disk:"
21450 #: ../resize/virt-resize.pod:179
21453 " # virsh start guestname\n"
21458 #: ../resize/virt-resize.pod:181
21460 "and check that it still works. See also the L</NOTES> section below for "
21461 "additional information."
21465 #: ../resize/virt-resize.pod:184
21466 msgid "7. Resize LVs etc inside the guest"
21470 #: ../resize/virt-resize.pod:186
21471 msgid "(This can also be done offline using L<guestfish(1)>)"
21475 #: ../resize/virt-resize.pod:188
21477 "Once the guest has booted you should see the new space available, at least "
21478 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
21479 "may need to resize LVs inside PVs, and also resize filesystem types that "
21480 "virt-resize does not know how to expand."
21484 #: ../resize/virt-resize.pod:195
21485 msgid "SHRINKING A VIRTUAL MACHINE DISK"
21489 #: ../resize/virt-resize.pod:197
21491 "Shrinking is somewhat more complex than expanding, and only an overview is "
21496 #: ../resize/virt-resize.pod:200
21498 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
21499 "filesystems). The user has to shrink content before passing the disk image "
21500 "to virt-resize, and virt-resize will check that the content has been shrunk "
21505 #: ../resize/virt-resize.pod:205
21506 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
21510 #: ../resize/virt-resize.pod:207
21512 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
21513 "steps 3 and 4 above to allocate a new disk image."
21517 #: ../resize/virt-resize.pod:210
21519 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
21523 #: ../resize/virt-resize.pod:213
21524 msgid "IGNORING OR DELETING PARTITIONS"
21528 #: ../resize/virt-resize.pod:215
21530 "virt-resize also gives a convenient way to ignore or delete partitions when "
21531 "copying from the input disk to the output disk. Ignoring a partition speeds "
21532 "up the copy where you don't care about the existing contents of a "
21533 "partition. Deleting a partition removes it completely, but note that it "
21534 "also renumbers any partitions after the one which is deleted, which can "
21535 "leave some guests unbootable."
21539 #: ../resize/virt-resize.pod:222
21540 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
21544 #: ../resize/virt-resize.pod:224
21546 "If the input disk is in qcow2 format, then you may prefer that the output is "
21547 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
21548 "the fly. The output format is simply determined by the format of the empty "
21549 "output container that you provide. Thus to create qcow2 output, use:"
21553 #: ../resize/virt-resize.pod:230
21556 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
21561 #: ../resize/virt-resize.pod:232
21562 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
21566 #: ../resize/virt-resize.pod:234
21567 msgid "Similarly, to get non-sparse raw output use:"
21571 #: ../resize/virt-resize.pod:236
21574 " fallocate -l size outdisk\n"
21579 #: ../resize/virt-resize.pod:238
21581 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
21582 "dev/zero of=outdisk bs=1M count=..>)"
21586 #: ../resize/virt-resize.pod:247
21587 msgid "Display help."
21591 #: ../resize/virt-resize.pod:249
21596 #: ../resize/virt-resize.pod:251 ../tools/virt-make-fs.pl:177
21597 #: ../tools/virt-win-reg.pl:120
21602 #: ../resize/virt-resize.pod:253 ../tools/virt-win-reg.pl:122
21603 msgid "Enable debugging messages."
21607 #: ../resize/virt-resize.pod:255
21608 msgid "B<--delete part>"
21612 #: ../resize/virt-resize.pod:257
21614 "Delete the named partition. It would be more accurate to describe this as "
21615 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
21616 "the original disk image is left intact."
21620 #: ../resize/virt-resize.pod:261
21622 "Note that when you delete a partition, then anything contained in the "
21623 "partition is also deleted. Furthermore, this causes any partitions that "
21624 "come after to be I<renumbered>, which can easily make your guest unbootable."
21628 #: ../resize/virt-resize.pod:266 ../resize/virt-resize.pod:327
21629 #: ../resize/virt-resize.pod:454
21630 msgid "You can give this option multiple times."
21634 #: ../resize/virt-resize.pod:268
21635 msgid "B<--expand part>"
21639 #: ../resize/virt-resize.pod:270
21641 "Expand the named partition so it uses up all extra space (space left over "
21642 "after any other resize changes that you request have been done)."
21646 #: ../resize/virt-resize.pod:273
21648 "If virt-resize knows how, it will expand the direct content of the "
21649 "partition. For example, if the partition is an LVM PV, it will expand the "
21650 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
21651 "content it doesn't know about alone."
21655 #: ../resize/virt-resize.pod:278
21656 msgid "Currently virt-resize can resize:"
21660 #: ../resize/virt-resize.pod:284
21661 msgid "ext2, ext3 and ext4 filesystems."
21665 #: ../resize/virt-resize.pod:288
21666 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
21670 #: ../resize/virt-resize.pod:290
21672 "The filesystem must have been shut down consistently last time it was used. "
21673 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
21674 "consistency check, so at the first boot after resizing Windows will check "
21679 #: ../resize/virt-resize.pod:297
21681 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
21682 "inside the PV, but see the I<--LV-expand> option. The user could also "
21683 "resize LVs as desired after boot."
21687 #: ../resize/virt-resize.pod:303
21688 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
21692 #: ../resize/virt-resize.pod:307 ../resize/virt-resize.pod:482
21693 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
21697 #: ../resize/virt-resize.pod:309 ../tools/virt-list-filesystems.pl:91
21698 #: ../tools/virt-list-partitions.pl:92 ../tools/virt-tar.pl:141
21699 #: ../tools/virt-win-reg.pl:142
21700 msgid "B<--format> raw"
21704 #: ../resize/virt-resize.pod:311
21706 "Specify the format of the input disk image. If this flag is not given then "
21707 "it is auto-detected from the image itself."
21711 #: ../resize/virt-resize.pod:317
21713 "Note that this option I<does not> affect the output format. See L</QCOW2 "
21714 "AND NON-SPARSE RAW FORMATS>."
21718 #: ../resize/virt-resize.pod:320
21719 msgid "B<--ignore part>"
21723 #: ../resize/virt-resize.pod:322
21725 "Ignore the named partition. Effectively this means the partition is "
21726 "allocated on the destination disk, but the content is not copied across from "
21727 "the source disk. The content of the partition will be blank (all zero "
21732 #: ../resize/virt-resize.pod:329
21733 msgid "B<--LV-expand logvol>"
21737 #: ../resize/virt-resize.pod:331
21739 "This takes the logical volume and, as a final step, expands it to fill all "
21740 "the space available in its volume group. A typical usage, assuming a Linux "
21741 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
21742 "lv_root> would be:"
21746 #: ../resize/virt-resize.pod:336
21749 " virt-resize indisk outdisk \\\n"
21750 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
21755 #: ../resize/virt-resize.pod:339
21757 "This would first expand the partition (and PV), and then expand the root "
21758 "device to fill the extra space in the PV."
21762 #: ../resize/virt-resize.pod:342
21764 "The contents of the LV are also resized if virt-resize knows how to do "
21765 "that. You can stop virt-resize from trying to expand the content by using "
21766 "the option I<--no-expand-content>."
21770 #: ../resize/virt-resize.pod:346
21771 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
21775 #: ../resize/virt-resize.pod:348
21777 "You can give this option multiple times, I<but> it doesn't make sense to do "
21778 "this unless the logical volumes you specify are all in different volume "
21783 #: ../resize/virt-resize.pod:352
21784 msgid "B<--machine-readable>"
21788 #: ../resize/virt-resize.pod:354
21790 "This option is used to make the output more machine friendly when being "
21791 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
21795 #: ../resize/virt-resize.pod:360
21796 msgid "B<--dryrun>"
21800 #: ../resize/virt-resize.pod:362
21801 msgid "Print a summary of what would be done, but don't do anything."
21805 #: ../resize/virt-resize.pod:364
21806 msgid "B<--no-copy-boot-loader>"
21810 #: ../resize/virt-resize.pod:366
21812 "By default, virt-resize copies over some sectors at the start of the disk "
21813 "(up to the beginning of the first partition). Commonly these sectors "
21814 "contain the Master Boot Record (MBR) and the boot loader, and are required "
21815 "in order for the guest to boot correctly."
21819 #: ../resize/virt-resize.pod:371
21821 "If you specify this flag, then this initial copy is not done. You may need "
21822 "to reinstall the boot loader in this case."
21826 #: ../resize/virt-resize.pod:374
21827 msgid "B<--no-extra-partition>"
21831 #: ../resize/virt-resize.pod:376
21833 "By default, virt-resize creates an extra partition if there is any extra, "
21834 "unused space after all resizing has happened. Use this option to prevent "
21835 "the extra partition from being created. If you do this then the extra space "
21836 "will be inaccessible until you run fdisk, parted, or some other partitioning "
21837 "tool in the guest."
21841 #: ../resize/virt-resize.pod:382
21843 "Note that if the surplus space is smaller than 10 MB, no extra partition "
21848 #: ../resize/virt-resize.pod:385
21849 msgid "B<--no-expand-content>"
21853 #: ../resize/virt-resize.pod:387
21855 "By default, virt-resize will try to expand the direct contents of "
21856 "partitions, if it knows how (see I<--expand> option above)."
21860 #: ../resize/virt-resize.pod:390
21862 "If you give the I<--no-expand-content> option then virt-resize will not "
21867 #: ../resize/virt-resize.pod:393
21868 msgid "B<--ntfsresize-force>"
21872 #: ../resize/virt-resize.pod:395
21874 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
21875 "the NTFS disk is marked as needing a consistency check. You have to use "
21876 "this option if you want to resize a Windows guest multiple times without "
21877 "booting into Windows between each resize."
21881 #: ../resize/virt-resize.pod:401
21882 msgid "B<--output-format> raw"
21886 #: ../resize/virt-resize.pod:403
21888 "Specify the format of the output disk image. If this flag is not given then "
21889 "it is auto-detected from the image itself."
21893 #: ../resize/virt-resize.pod:409
21895 "Note that this option I<does not create> the output format. This option "
21896 "just tells libguestfs what it is so it doesn't try to guess it. You still "
21897 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
21898 "SPARSE RAW FORMATS>."
21902 #: ../resize/virt-resize.pod:414
21907 #: ../resize/virt-resize.pod:416
21912 #: ../resize/virt-resize.pod:418
21913 msgid "Don't print the summary."
21917 #: ../resize/virt-resize.pod:420
21918 msgid "B<--resize part=size>"
21922 #: ../resize/virt-resize.pod:422
21924 "Resize the named partition (expanding or shrinking it) so that it has the "
21929 #: ../resize/virt-resize.pod:425
21931 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
21932 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
21933 "size; or as a relative number or percentage. For example:"
21937 #: ../resize/virt-resize.pod:431
21940 " --resize /dev/sda2=10G\n"
21945 #: ../resize/virt-resize.pod:433
21948 " --resize /dev/sda4=90%\n"
21953 #: ../resize/virt-resize.pod:435
21956 " --resize /dev/sda2=+1G\n"
21961 #: ../resize/virt-resize.pod:437
21964 " --resize /dev/sda2=-200M\n"
21969 #: ../resize/virt-resize.pod:439
21972 " --resize /dev/sda1=+128K\n"
21977 #: ../resize/virt-resize.pod:441
21980 " --resize /dev/sda1=+10%\n"
21985 #: ../resize/virt-resize.pod:443
21988 " --resize /dev/sda1=-10%\n"
21993 #: ../resize/virt-resize.pod:445
21995 "You can increase the size of any partition. Virt-resize will expand the "
21996 "direct content of the partition if it knows how (see I<--expand> below)."
22000 #: ../resize/virt-resize.pod:449
22002 "You can only I<decrease> the size of partitions that contain filesystems or "
22003 "PVs which have already been shrunk. Virt-resize will check this has been "
22004 "done before proceeding, or else will print an error (see also I<--resize-"
22009 #: ../resize/virt-resize.pod:456
22010 msgid "B<--resize-force part=size>"
22014 #: ../resize/virt-resize.pod:458
22016 "This is the same as I<--resize> except that it will let you decrease the "
22017 "size of any partition. Generally this means you will lose any data which "
22018 "was at the end of the partition you shrink, but you may not care about that "
22019 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
22020 "as a swap partition)."
22024 #: ../resize/virt-resize.pod:464
22025 msgid "See also the I<--ignore> option."
22029 #: ../resize/virt-resize.pod:466
22030 msgid "B<--shrink part>"
22034 #: ../resize/virt-resize.pod:468
22036 "Shrink the named partition until the overall disk image fits in the "
22037 "destination. The named partition B<must> contain a filesystem or PV which "
22038 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
22039 "online tools). Virt-resize will check this and give an error if it has not "
22044 #: ../resize/virt-resize.pod:474
22046 "The amount by which the overall disk must be shrunk (after carrying out all "
22047 "other operations requested by the user) is called the \"deficit\". For "
22048 "example, a straight copy (assume no other operations) from a 5GB disk image "
22049 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
22050 "would give an error unless the user specified a partition to shrink and that "
22051 "partition had more than a gigabyte of free space."
22055 #: ../resize/virt-resize.pod:492
22056 msgid "MACHINE READABLE OUTPUT"
22060 #: ../resize/virt-resize.pod:494
22062 "The I<--machine-readable> option can be used to make the output more machine "
22063 "friendly, which is useful when calling virt-resize from other programs, GUIs "
22068 #: ../resize/virt-resize.pod:498
22069 msgid "There are two ways to use this option."
22073 #: ../resize/virt-resize.pod:500
22075 "Firstly use the option on its own to query the capabilities of the virt-"
22076 "resize binary. Typical output looks like this:"
22080 #: ../resize/virt-resize.pod:503
22083 " $ virt-resize --machine-readable\n"
22085 " ntfsresize-force\n"
22093 #: ../resize/virt-resize.pod:510
22095 "A list of features is printed, one per line, and the program exits with "
22100 #: ../resize/virt-resize.pod:513
22102 "Secondly use the option in conjunction with other options to make the "
22103 "regular program output more machine friendly."
22107 #: ../resize/virt-resize.pod:516
22108 msgid "At the moment this means:"
22112 #: ../resize/virt-resize.pod:522
22114 "Progress bar messages can be parsed from stdout by looking for this regular "
22119 #: ../resize/virt-resize.pod:525
22122 " ^[0-9]+/[0-9]+$\n"
22127 #: ../resize/virt-resize.pod:529
22129 "The calling program should treat messages sent to stdout (except for "
22130 "progress bar messages) as status messages. They can be logged and/or "
22131 "displayed to the user."
22135 #: ../resize/virt-resize.pod:535
22137 "The calling program should treat messages sent to stderr as error messages. "
22138 "In addition, virt-resize exits with a non-zero status code if there was a "
22143 #: ../resize/virt-resize.pod:541
22145 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
22146 "readable> option and will return an error."
22150 #: ../resize/virt-resize.pod:546
22151 msgid "\"Partition 1 does not end on cylinder boundary.\""
22155 #: ../resize/virt-resize.pod:548
22157 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
22158 "means the partitions will not be aligned to the ancient CHS geometry. "
22159 "However CHS geometry is meaningless for disks manufactured since the early "
22160 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
22161 "cylinders is not required by any modern operating system."
22165 #: ../resize/virt-resize.pod:555
22166 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
22170 #: ../resize/virt-resize.pod:557
22172 "In Windows Vista and later versions, Microsoft switched to using a separate "
22173 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
22174 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
22175 "the boot partition. Doing so seems to break the guest completely. However "
22176 "expanding the second partition (ie. C: drive) should work."
22180 #: ../resize/virt-resize.pod:564
22182 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
22183 "NTFS partitions have been expanded. This is just a safety check and (unless "
22184 "it find errors) is nothing to worry about."
22188 #: ../resize/virt-resize.pod:568
22189 msgid "GUEST BOOT STUCK AT \"GRUB\""
22193 #: ../resize/virt-resize.pod:570
22195 "If a Linux guest does not boot after resizing, and the boot is stuck after "
22196 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
22197 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
22198 "although we think is to do with partition alignment."
22202 #: ../resize/virt-resize.pod:575
22205 " guestfish -i -a newdisk\n"
22206 " ><fs> cat /boot/grub/device.map\n"
22207 " # check the contents of this file are sensible or\n"
22208 " # edit the file if necessary\n"
22209 " ><fs> grub-install / /dev/vda\n"
22215 #: ../resize/virt-resize.pod:582
22217 "For more flexible guest reconfiguration, including if you need to specify "
22218 "other parameters to grub-install, use L<virt-rescue(1)>."
22222 #: ../resize/virt-resize.pod:585
22223 msgid "ALTERNATIVE TOOLS"
22227 #: ../resize/virt-resize.pod:587
22229 "There are several proprietary tools for resizing partitions. We won't "
22230 "mention any here."
22234 #: ../resize/virt-resize.pod:590
22236 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
22237 "operations on disk images. They can resize and move partitions, but I don't "
22238 "think they can do anything with the contents, and they certainly don't "
22243 #: ../resize/virt-resize.pod:595
22245 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
22246 "but at a much lower level. You will probably end up hand-calculating sector "
22247 "offsets, which is something that virt-resize was designed to avoid. If you "
22248 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
22253 #: ../resize/virt-resize.pod:615
22255 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
22256 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
22257 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
22258 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<http://libguestfs.org/>."
22262 #: ../ruby/examples/guestfs-ruby.pod:5
22263 msgid "guestfs-ruby - How to use libguestfs from Ruby"
22267 #: ../ruby/examples/guestfs-ruby.pod:9
22270 " require 'guestfs'\n"
22271 " g = Guestfs::Guestfs.new()\n"
22272 " g.add_drive_opts(\"disk.img\",\n"
22273 " :readonly => 1, :format => \"raw\")\n"
22279 #: ../ruby/examples/guestfs-ruby.pod:17
22281 "This manual page documents how to call libguestfs from the Ruby programming "
22282 "language. This page just documents the differences from the C API and gives "
22283 "some examples. If you are not familiar with using libguestfs, you also need "
22284 "to read L<guestfs(3)>."
22288 #: ../ruby/examples/guestfs-ruby.pod:24
22290 "Errors from libguestfs functions are mapped into the C<Error> exception. "
22291 "This has a single parameter which is the error message (a string)."
22295 #: ../ruby/examples/guestfs-ruby.pod:38
22297 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22298 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
22299 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
22303 #: ../src/guestfs-actions.pod:1
22304 msgid "guestfs_add_cdrom"
22308 #: ../src/guestfs-actions.pod:3
22312 " guestfs_add_cdrom (guestfs_h *g,\n"
22313 " const char *filename);\n"
22318 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:249
22319 #: ../src/guestfs-actions.pod:270
22321 "I<This function is deprecated.> In new code, use the L</"
22322 "guestfs_add_drive_opts> call instead."
22326 #: ../src/guestfs-actions.pod:24
22328 "This call checks for the existence of C<filename>. This stops you from "
22329 "specifying other types of drive which are supported by qemu such as C<nbd:> "
22330 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
22335 #: ../src/guestfs-actions.pod:31
22337 "If you just want to add an ISO file (often you use this as an efficient way "
22338 "to transfer large files into the guest), then you should probably use "
22339 "C<guestfs_add_drive_ro> instead."
22343 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:140
22344 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
22345 #: ../src/guestfs-actions.pod:259 ../src/guestfs-actions.pod:280
22346 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
22347 #: ../src/guestfs-actions.pod:427 ../src/guestfs-actions.pod:447
22348 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:506
22349 #: ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:552
22350 #: ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:652
22351 #: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:681
22352 #: ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798
22353 #: ../src/guestfs-actions.pod:812 ../src/guestfs-actions.pod:826
22354 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:1046
22355 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1084
22356 #: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1231
22357 #: ../src/guestfs-actions.pod:1275 ../src/guestfs-actions.pod:1293
22358 #: ../src/guestfs-actions.pod:1312 ../src/guestfs-actions.pod:1326
22359 #: ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:1416
22360 #: ../src/guestfs-actions.pod:1447 ../src/guestfs-actions.pod:1472
22361 #: ../src/guestfs-actions.pod:1514 ../src/guestfs-actions.pod:1627
22362 #: ../src/guestfs-actions.pod:1654 ../src/guestfs-actions.pod:1869
22363 #: ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1978
22364 #: ../src/guestfs-actions.pod:2484 ../src/guestfs-actions.pod:2628
22365 #: ../src/guestfs-actions.pod:2689 ../src/guestfs-actions.pod:2724
22366 #: ../src/guestfs-actions.pod:3768 ../src/guestfs-actions.pod:3783
22367 #: ../src/guestfs-actions.pod:3808 ../src/guestfs-actions.pod:3997
22368 #: ../src/guestfs-actions.pod:4011 ../src/guestfs-actions.pod:4024
22369 #: ../src/guestfs-actions.pod:4038 ../src/guestfs-actions.pod:4053
22370 #: ../src/guestfs-actions.pod:4089 ../src/guestfs-actions.pod:4161
22371 #: ../src/guestfs-actions.pod:4181 ../src/guestfs-actions.pod:4198
22372 #: ../src/guestfs-actions.pod:4221 ../src/guestfs-actions.pod:4244
22373 #: ../src/guestfs-actions.pod:4279 ../src/guestfs-actions.pod:4298
22374 #: ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4352
22375 #: ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4400
22376 #: ../src/guestfs-actions.pod:4416 ../src/guestfs-actions.pod:4429
22377 #: ../src/guestfs-actions.pod:4444 ../src/guestfs-actions.pod:4461
22378 #: ../src/guestfs-actions.pod:4554 ../src/guestfs-actions.pod:4574
22379 #: ../src/guestfs-actions.pod:4587 ../src/guestfs-actions.pod:4638
22380 #: ../src/guestfs-actions.pod:4656 ../src/guestfs-actions.pod:4674
22381 #: ../src/guestfs-actions.pod:4690 ../src/guestfs-actions.pod:4704
22382 #: ../src/guestfs-actions.pod:4718 ../src/guestfs-actions.pod:4735
22383 #: ../src/guestfs-actions.pod:4750 ../src/guestfs-actions.pod:4777
22384 #: ../src/guestfs-actions.pod:4840 ../src/guestfs-actions.pod:4913
22385 #: ../src/guestfs-actions.pod:4944 ../src/guestfs-actions.pod:4963
22386 #: ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:4994
22387 #: ../src/guestfs-actions.pod:5011 ../src/guestfs-actions.pod:5024
22388 #: ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5054
22389 #: ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5112
22390 #: ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5171
22391 #: ../src/guestfs-actions.pod:5185 ../src/guestfs-actions.pod:5202
22392 #: ../src/guestfs-actions.pod:5251 ../src/guestfs-actions.pod:5304
22393 #: ../src/guestfs-actions.pod:5351 ../src/guestfs-actions.pod:5394
22394 #: ../src/guestfs-actions.pod:5422 ../src/guestfs-actions.pod:5439
22395 #: ../src/guestfs-actions.pod:5457 ../src/guestfs-actions.pod:5597
22396 #: ../src/guestfs-actions.pod:5654 ../src/guestfs-actions.pod:5676
22397 #: ../src/guestfs-actions.pod:5694 ../src/guestfs-actions.pod:5726
22398 #: ../src/guestfs-actions.pod:5792 ../src/guestfs-actions.pod:5809
22399 #: ../src/guestfs-actions.pod:5822 ../src/guestfs-actions.pod:5836
22400 #: ../src/guestfs-actions.pod:6125 ../src/guestfs-actions.pod:6144
22401 #: ../src/guestfs-actions.pod:6163 ../src/guestfs-actions.pod:6177
22402 #: ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6203
22403 #: ../src/guestfs-actions.pod:6215 ../src/guestfs-actions.pod:6229
22404 #: ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6266
22405 #: ../src/guestfs-actions.pod:6285 ../src/guestfs-actions.pod:6304
22406 #: ../src/guestfs-actions.pod:6334 ../src/guestfs-actions.pod:6352
22407 #: ../src/guestfs-actions.pod:6375 ../src/guestfs-actions.pod:6393
22408 #: ../src/guestfs-actions.pod:6412 ../src/guestfs-actions.pod:6433
22409 #: ../src/guestfs-actions.pod:6452 ../src/guestfs-actions.pod:6469
22410 #: ../src/guestfs-actions.pod:6488 ../src/guestfs-actions.pod:6516
22411 #: ../src/guestfs-actions.pod:6540 ../src/guestfs-actions.pod:6559
22412 #: ../src/guestfs-actions.pod:6575 ../src/guestfs-actions.pod:6597
22413 #: ../src/guestfs-actions.pod:6616 ../src/guestfs-actions.pod:6631
22414 #: ../src/guestfs-actions.pod:6650 ../src/guestfs-actions.pod:6694
22415 #: ../src/guestfs-actions.pod:6724 ../src/guestfs-actions.pod:6757
22416 #: ../src/guestfs-actions.pod:6872 ../src/guestfs-actions.pod:6993
22417 #: ../src/guestfs-actions.pod:7005 ../src/guestfs-actions.pod:7018
22418 #: ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7053
22419 #: ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7079
22420 #: ../src/guestfs-actions.pod:7092 ../src/guestfs-actions.pod:7107
22421 #: ../src/guestfs-actions.pod:7166 ../src/guestfs-actions.pod:7183
22422 #: ../src/guestfs-actions.pod:7199 ../src/guestfs-actions.pod:7215
22423 #: ../src/guestfs-actions.pod:7232 ../src/guestfs-actions.pod:7245
22424 #: ../src/guestfs-actions.pod:7265 ../src/guestfs-actions.pod:7301
22425 #: ../src/guestfs-actions.pod:7315 ../src/guestfs-actions.pod:7356
22426 #: ../src/guestfs-actions.pod:7369 ../src/guestfs-actions.pod:7387
22427 #: ../src/guestfs-actions.pod:7421 ../src/guestfs-actions.pod:7457
22428 #: ../src/guestfs-actions.pod:7573 ../src/guestfs-actions.pod:7588
22429 #: ../src/guestfs-actions.pod:7602 ../src/guestfs-actions.pod:7657
22430 #: ../src/guestfs-actions.pod:7670 ../src/guestfs-actions.pod:7715
22431 #: ../src/guestfs-actions.pod:7755 ../src/guestfs-actions.pod:7811
22432 #: ../src/guestfs-actions.pod:7831 ../src/guestfs-actions.pod:7864
22433 #: ../src/guestfs-actions.pod:7928 ../src/guestfs-actions.pod:7951
22434 #: ../src/guestfs-actions.pod:7980
22435 msgid "This function returns 0 on success or -1 on error."
22439 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
22440 #: ../src/guestfs-actions.pod:1277 ../src/guestfs-actions.pod:2092
22441 #: ../src/guestfs-actions.pod:2190 ../src/guestfs-actions.pod:2313
22442 #: ../src/guestfs-actions.pod:3770 ../src/guestfs-actions.pod:3790
22443 #: ../src/guestfs-actions.pod:5088 ../src/guestfs-actions.pod:6354
22444 #: ../src/guestfs-actions.pod:6471 ../src/guestfs-actions.pod:6618
22445 #: ../src/guestfs-actions.pod:7109 ../src/guestfs-actions.pod:7234
22446 #: ../src/guestfs-actions.pod:7757
22447 msgid "(Added in 0.3)"
22451 #: ../src/guestfs-actions.pod:41
22452 msgid "guestfs_add_domain"
22456 #: ../src/guestfs-actions.pod:43
22460 " guestfs_add_domain (guestfs_h *g,\n"
22461 " const char *dom,\n"
22467 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
22468 #: ../src/guestfs-actions.pod:837 ../src/guestfs-actions.pod:1161
22469 #: ../src/guestfs-actions.pod:1211 ../src/guestfs-actions.pod:2973
22470 #: ../src/guestfs-actions.pod:4789 ../src/guestfs-actions.pod:5098
22471 #: ../src/guestfs-actions.pod:5315
22473 "You may supply a list of optional arguments to this call. Use zero or more "
22474 "of the following pairs of parameters, and terminate the list with C<-1> on "
22475 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
22479 #: ../src/guestfs-actions.pod:53
22482 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
22483 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
22484 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
22485 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
22486 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
22491 #: ../src/guestfs-actions.pod:59
22493 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
22494 "It works by connecting to libvirt, requesting the domain and domain XML from "
22495 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
22500 #: ../src/guestfs-actions.pod:94
22502 "The other optional parameters are passed directly through to "
22503 "C<guestfs_add_drive_opts>."
22507 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
22508 #: ../src/guestfs-actions.pod:520 ../src/guestfs-actions.pod:698
22509 #: ../src/guestfs-actions.pod:729 ../src/guestfs-actions.pod:747
22510 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1492
22511 #: ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:2051
22512 #: ../src/guestfs-actions.pod:2162 ../src/guestfs-actions.pod:2213
22513 #: ../src/guestfs-actions.pod:2265 ../src/guestfs-actions.pod:2277
22514 #: ../src/guestfs-actions.pod:2300 ../src/guestfs-actions.pod:2615
22515 #: ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3109
22516 #: ../src/guestfs-actions.pod:5274 ../src/guestfs-actions.pod:5494
22517 #: ../src/guestfs-actions.pod:5906 ../src/guestfs-actions.pod:5932
22518 #: ../src/guestfs-actions.pod:7342 ../src/guestfs-actions.pod:7768
22519 #: ../src/guestfs-actions.pod:7781 ../src/guestfs-actions.pod:7794
22520 msgid "On error this function returns -1."
22524 #: ../src/guestfs-actions.pod:99
22525 msgid "(Added in 1.7.4)"
22529 #: ../src/guestfs-actions.pod:101
22530 msgid "guestfs_add_domain_va"
22534 #: ../src/guestfs-actions.pod:103
22538 " guestfs_add_domain_va (guestfs_h *g,\n"
22539 " const char *dom,\n"
22540 " va_list args);\n"
22545 #: ../src/guestfs-actions.pod:108
22546 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
22550 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
22551 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
22552 #: ../src/guestfs-actions.pod:876 ../src/guestfs-actions.pod:887
22553 #: ../src/guestfs-actions.pod:1187 ../src/guestfs-actions.pod:1200
22554 #: ../src/guestfs-actions.pod:1244 ../src/guestfs-actions.pod:1257
22555 #: ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:3069
22556 #: ../src/guestfs-actions.pod:4854 ../src/guestfs-actions.pod:4866
22557 #: ../src/guestfs-actions.pod:5126 ../src/guestfs-actions.pod:5138
22558 #: ../src/guestfs-actions.pod:5364 ../src/guestfs-actions.pod:5375
22559 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
22563 #: ../src/guestfs-actions.pod:112
22564 msgid "guestfs_add_domain_argv"
22568 #: ../src/guestfs-actions.pod:114
22572 " guestfs_add_domain_argv (guestfs_h *g,\n"
22573 " const char *dom,\n"
22574 " const struct guestfs_add_domain_argv *optargs);\n"
22579 #: ../src/guestfs-actions.pod:119
22580 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
22584 #: ../src/guestfs-actions.pod:123
22585 msgid "guestfs_add_drive"
22589 #: ../src/guestfs-actions.pod:125
22593 " guestfs_add_drive (guestfs_h *g,\n"
22594 " const char *filename);\n"
22599 #: ../src/guestfs-actions.pod:129
22601 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
22602 "optional parameters, so the disk is added writable, with the format being "
22603 "detected automatically."
22607 #: ../src/guestfs-actions.pod:133
22609 "Automatic detection of the format opens you up to a potential security hole "
22610 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
22611 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
22612 "you should think about replacing calls to this function with calls to "
22613 "C<guestfs_add_drive_opts>, and specifying the format."
22617 #: ../src/guestfs-actions.pod:144
22618 msgid "guestfs_add_drive_opts"
22622 #: ../src/guestfs-actions.pod:146
22626 " guestfs_add_drive_opts (guestfs_h *g,\n"
22627 " const char *filename,\n"
22633 #: ../src/guestfs-actions.pod:156
22636 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
22637 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
22638 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
22643 #: ../src/guestfs-actions.pod:185
22645 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
22646 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
22647 "Possible formats include C<raw> and C<qcow2>."
22651 #: ../src/guestfs-actions.pod:196
22653 "This rarely-used option lets you emulate the behaviour of the deprecated "
22654 "C<guestfs_add_drive_with_if> call (q.v.)"
22658 #: ../src/guestfs-actions.pod:203
22659 msgid "(Added in 1.5.23)"
22663 #: ../src/guestfs-actions.pod:205
22664 msgid "guestfs_add_drive_opts_va"
22668 #: ../src/guestfs-actions.pod:207
22672 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
22673 " const char *filename,\n"
22674 " va_list args);\n"
22679 #: ../src/guestfs-actions.pod:212
22680 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
22684 #: ../src/guestfs-actions.pod:216
22685 msgid "guestfs_add_drive_opts_argv"
22689 #: ../src/guestfs-actions.pod:218
22693 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
22694 " const char *filename,\n"
22695 " const struct guestfs_add_drive_opts_argv *optargs);\n"
22700 #: ../src/guestfs-actions.pod:223
22701 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
22705 #: ../src/guestfs-actions.pod:227
22706 msgid "guestfs_add_drive_ro"
22710 #: ../src/guestfs-actions.pod:229
22714 " guestfs_add_drive_ro (guestfs_h *g,\n"
22715 " const char *filename);\n"
22720 #: ../src/guestfs-actions.pod:233
22722 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
22723 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
22724 "disk is added read-only, with the format being detected automatically."
22728 #: ../src/guestfs-actions.pod:240
22729 msgid "(Added in 1.0.38)"
22733 #: ../src/guestfs-actions.pod:242
22734 msgid "guestfs_add_drive_ro_with_if"
22738 #: ../src/guestfs-actions.pod:244
22742 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
22743 " const char *filename,\n"
22744 " const char *iface);\n"
22749 #: ../src/guestfs-actions.pod:256
22751 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
22752 "QEMU interface emulation to use at run time."
22756 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
22757 #: ../src/guestfs-actions.pod:2574
22758 msgid "(Added in 1.0.84)"
22762 #: ../src/guestfs-actions.pod:263
22763 msgid "guestfs_add_drive_with_if"
22767 #: ../src/guestfs-actions.pod:265
22771 " guestfs_add_drive_with_if (guestfs_h *g,\n"
22772 " const char *filename,\n"
22773 " const char *iface);\n"
22778 #: ../src/guestfs-actions.pod:277
22780 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
22781 "QEMU interface emulation to use at run time."
22785 #: ../src/guestfs-actions.pod:284
22786 msgid "guestfs_aug_clear"
22790 #: ../src/guestfs-actions.pod:286
22794 " guestfs_aug_clear (guestfs_h *g,\n"
22795 " const char *augpath);\n"
22800 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2302
22801 msgid "(Added in 1.3.4)"
22805 #: ../src/guestfs-actions.pod:297
22806 msgid "guestfs_aug_close"
22810 #: ../src/guestfs-actions.pod:299
22814 " guestfs_aug_close (guestfs_h *g);\n"
22819 #: ../src/guestfs-actions.pod:302
22821 "Close the current Augeas handle and free up any resources used by it. After "
22822 "calling this, you have to call C<guestfs_aug_init> again before you can use "
22823 "any other Augeas functions."
22827 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
22828 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
22829 #: ../src/guestfs-actions.pod:429 ../src/guestfs-actions.pod:449
22830 #: ../src/guestfs-actions.pod:463 ../src/guestfs-actions.pod:494
22831 #: ../src/guestfs-actions.pod:508 ../src/guestfs-actions.pod:522
22832 #: ../src/guestfs-actions.pod:536 ../src/guestfs-actions.pod:554
22833 #: ../src/guestfs-actions.pod:5983
22834 msgid "(Added in 0.7)"
22838 #: ../src/guestfs-actions.pod:311
22839 msgid "guestfs_aug_defnode"
22843 #: ../src/guestfs-actions.pod:313
22846 " struct guestfs_int_bool *\n"
22847 " guestfs_aug_defnode (guestfs_h *g,\n"
22848 " const char *name,\n"
22849 " const char *expr,\n"
22850 " const char *val);\n"
22855 #: ../src/guestfs-actions.pod:322
22857 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
22858 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
22859 "containing that single node."
22863 #: ../src/guestfs-actions.pod:330
22865 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
22866 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
22870 #: ../src/guestfs-actions.pod:336
22871 msgid "guestfs_aug_defvar"
22875 #: ../src/guestfs-actions.pod:338
22879 " guestfs_aug_defvar (guestfs_h *g,\n"
22880 " const char *name,\n"
22881 " const char *expr);\n"
22886 #: ../src/guestfs-actions.pod:354
22887 msgid "guestfs_aug_get"
22891 #: ../src/guestfs-actions.pod:356
22895 " guestfs_aug_get (guestfs_h *g,\n"
22896 " const char *augpath);\n"
22901 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:927
22902 #: ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1005
22903 #: ../src/guestfs-actions.pod:1021 ../src/guestfs-actions.pod:1124
22904 #: ../src/guestfs-actions.pod:1361 ../src/guestfs-actions.pod:1378
22905 #: ../src/guestfs-actions.pod:1397 ../src/guestfs-actions.pod:1531
22906 #: ../src/guestfs-actions.pod:1719 ../src/guestfs-actions.pod:1831
22907 #: ../src/guestfs-actions.pod:1994 ../src/guestfs-actions.pod:2011
22908 #: ../src/guestfs-actions.pod:2078 ../src/guestfs-actions.pod:2121
22909 #: ../src/guestfs-actions.pod:2142 ../src/guestfs-actions.pod:2325
22910 #: ../src/guestfs-actions.pod:2539 ../src/guestfs-actions.pod:2743
22911 #: ../src/guestfs-actions.pod:2837 ../src/guestfs-actions.pod:2941
22912 #: ../src/guestfs-actions.pod:2960 ../src/guestfs-actions.pod:3174
22913 #: ../src/guestfs-actions.pod:3202 ../src/guestfs-actions.pod:3223
22914 #: ../src/guestfs-actions.pod:3257 ../src/guestfs-actions.pod:3316
22915 #: ../src/guestfs-actions.pod:3336 ../src/guestfs-actions.pod:3356
22916 #: ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:4336
22917 #: ../src/guestfs-actions.pod:4506 ../src/guestfs-actions.pod:4616
22918 #: ../src/guestfs-actions.pod:5512 ../src/guestfs-actions.pod:5711
22919 #: ../src/guestfs-actions.pod:5881 ../src/guestfs-actions.pod:6059
22920 #: ../src/guestfs-actions.pod:6108 ../src/guestfs-actions.pod:6778
22921 #: ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6818
22922 #: ../src/guestfs-actions.pod:6842 ../src/guestfs-actions.pod:7516
22923 #: ../src/guestfs-actions.pod:7535 ../src/guestfs-actions.pod:7553
22924 #: ../src/guestfs-actions.pod:7727 ../src/guestfs-actions.pod:8044
22926 "This function returns a string, or NULL on error. I<The caller must free "
22927 "the returned string after use>."
22931 #: ../src/guestfs-actions.pod:368
22932 msgid "guestfs_aug_init"
22936 #: ../src/guestfs-actions.pod:370
22940 " guestfs_aug_init (guestfs_h *g,\n"
22941 " const char *root,\n"
22947 #: ../src/guestfs-actions.pod:379
22948 msgid "You must call this before using any other C<guestfs_aug_*> commands."
22952 #: ../src/guestfs-actions.pod:404
22954 "This option is only useful when debugging Augeas lenses. Use of this option "
22955 "may require additional memory for the libguestfs appliance. You may need to "
22956 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
22957 "C<guestfs_set_memsize>."
22961 #: ../src/guestfs-actions.pod:419
22962 msgid "Do not load the tree in C<guestfs_aug_init>."
22966 #: ../src/guestfs-actions.pod:423
22967 msgid "To close the handle, you can call C<guestfs_aug_close>."
22971 #: ../src/guestfs-actions.pod:431
22972 msgid "guestfs_aug_insert"
22976 #: ../src/guestfs-actions.pod:433
22980 " guestfs_aug_insert (guestfs_h *g,\n"
22981 " const char *augpath,\n"
22982 " const char *label,\n"
22988 #: ../src/guestfs-actions.pod:451
22989 msgid "guestfs_aug_load"
22993 #: ../src/guestfs-actions.pod:453
22997 " guestfs_aug_load (guestfs_h *g);\n"
23002 #: ../src/guestfs-actions.pod:465
23003 msgid "guestfs_aug_ls"
23007 #: ../src/guestfs-actions.pod:467
23011 " guestfs_aug_ls (guestfs_h *g,\n"
23012 " const char *augpath);\n"
23017 #: ../src/guestfs-actions.pod:471
23019 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
23020 "sorting the resulting nodes into alphabetical order."
23024 #: ../src/guestfs-actions.pod:474 ../src/guestfs-actions.pod:490
23025 #: ../src/guestfs-actions.pod:636 ../src/guestfs-actions.pod:1143
23026 #: ../src/guestfs-actions.pod:1546 ../src/guestfs-actions.pod:1565
23027 #: ../src/guestfs-actions.pod:1668 ../src/guestfs-actions.pod:1687
23028 #: ../src/guestfs-actions.pod:1933 ../src/guestfs-actions.pod:2397
23029 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:2432
23030 #: ../src/guestfs-actions.pod:2497 ../src/guestfs-actions.pod:2521
23031 #: ../src/guestfs-actions.pod:2592 ../src/guestfs-actions.pod:2641
23032 #: ../src/guestfs-actions.pod:2902 ../src/guestfs-actions.pod:3276
23033 #: ../src/guestfs-actions.pod:3552 ../src/guestfs-actions.pod:3866
23034 #: ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3903
23035 #: ../src/guestfs-actions.pod:3965 ../src/guestfs-actions.pod:4070
23036 #: ../src/guestfs-actions.pod:4478 ../src/guestfs-actions.pod:5235
23037 #: ../src/guestfs-actions.pod:5853 ../src/guestfs-actions.pod:5979
23038 #: ../src/guestfs-actions.pod:6093 ../src/guestfs-actions.pod:6858
23039 #: ../src/guestfs-actions.pod:6919 ../src/guestfs-actions.pod:6974
23040 #: ../src/guestfs-actions.pod:7120 ../src/guestfs-actions.pod:7144
23041 #: ../src/guestfs-actions.pod:7620 ../src/guestfs-actions.pod:7640
23042 #: ../src/guestfs-actions.pod:7687 ../src/guestfs-actions.pod:7881
23043 #: ../src/guestfs-actions.pod:7900 ../src/guestfs-actions.pod:7994
23044 #: ../src/guestfs-actions.pod:8013 ../src/guestfs-actions.pod:8059
23045 #: ../src/guestfs-actions.pod:8078
23047 "This function returns a NULL-terminated array of strings (like L<environ(3)"
23048 ">), or NULL if there was an error. I<The caller must free the strings and "
23049 "the array after use>."
23053 #: ../src/guestfs-actions.pod:478 ../src/guestfs-actions.pod:1068
23054 #: ../src/guestfs-actions.pod:1086 ../src/guestfs-actions.pod:1603
23055 #: ../src/guestfs-actions.pod:3630 ../src/guestfs-actions.pod:3661
23056 #: ../src/guestfs-actions.pod:4319 ../src/guestfs-actions.pod:4369
23057 #: ../src/guestfs-actions.pod:4556 ../src/guestfs-actions.pod:4589
23058 #: ../src/guestfs-actions.pod:4752 ../src/guestfs-actions.pod:5239
23059 #: ../src/guestfs-actions.pod:5794 ../src/guestfs-actions.pod:6191
23060 #: ../src/guestfs-actions.pod:6205 ../src/guestfs-actions.pod:6217
23061 #: ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:7358
23062 #: ../src/guestfs-actions.pod:7371 ../src/guestfs-actions.pod:7604
23063 #: ../src/guestfs-actions.pod:7869
23064 msgid "(Added in 0.8)"
23068 #: ../src/guestfs-actions.pod:480
23069 msgid "guestfs_aug_match"
23073 #: ../src/guestfs-actions.pod:482
23077 " guestfs_aug_match (guestfs_h *g,\n"
23078 " const char *augpath);\n"
23083 #: ../src/guestfs-actions.pod:496
23084 msgid "guestfs_aug_mv"
23088 #: ../src/guestfs-actions.pod:498
23092 " guestfs_aug_mv (guestfs_h *g,\n"
23093 " const char *src,\n"
23094 " const char *dest);\n"
23099 #: ../src/guestfs-actions.pod:510
23100 msgid "guestfs_aug_rm"
23104 #: ../src/guestfs-actions.pod:512
23108 " guestfs_aug_rm (guestfs_h *g,\n"
23109 " const char *augpath);\n"
23114 #: ../src/guestfs-actions.pod:524
23115 msgid "guestfs_aug_save"
23119 #: ../src/guestfs-actions.pod:526
23123 " guestfs_aug_save (guestfs_h *g);\n"
23128 #: ../src/guestfs-actions.pod:531
23130 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
23135 #: ../src/guestfs-actions.pod:538
23136 msgid "guestfs_aug_set"
23140 #: ../src/guestfs-actions.pod:540
23144 " guestfs_aug_set (guestfs_h *g,\n"
23145 " const char *augpath,\n"
23146 " const char *val);\n"
23151 #: ../src/guestfs-actions.pod:547
23153 "In the Augeas API, it is possible to clear a node by setting the value to "
23154 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
23155 "this call. Instead you must use the C<guestfs_aug_clear> call."
23159 #: ../src/guestfs-actions.pod:556
23160 msgid "guestfs_available"
23164 #: ../src/guestfs-actions.pod:558
23168 " guestfs_available (guestfs_h *g,\n"
23169 " char *const *groups);\n"
23174 #: ../src/guestfs-actions.pod:566
23176 "The libguestfs groups, and the functions that those groups correspond to, "
23177 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
23178 "runtime by calling C<guestfs_available_all_groups>."
23182 #: ../src/guestfs-actions.pod:590
23183 msgid "You must call C<guestfs_launch> before calling this function."
23187 #: ../src/guestfs-actions.pod:612
23189 "This call was added in version C<1.0.80>. In previous versions of "
23190 "libguestfs all you could do would be to speculatively execute a command to "
23191 "find out if the daemon implemented it. See also C<guestfs_version>."
23195 #: ../src/guestfs-actions.pod:621 ../src/guestfs-actions.pod:1348
23196 msgid "(Added in 1.0.80)"
23200 #: ../src/guestfs-actions.pod:623
23201 msgid "guestfs_available_all_groups"
23205 #: ../src/guestfs-actions.pod:625
23209 " guestfs_available_all_groups (guestfs_h *g);\n"
23214 #: ../src/guestfs-actions.pod:628
23216 "This command returns a list of all optional groups that this daemon knows "
23217 "about. Note this returns both supported and unsupported groups. To find "
23218 "out which ones the daemon can actually support you have to call "
23219 "C<guestfs_available> on each member of the returned list."
23223 #: ../src/guestfs-actions.pod:634
23224 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
23228 #: ../src/guestfs-actions.pod:640
23229 msgid "(Added in 1.3.15)"
23233 #: ../src/guestfs-actions.pod:642
23234 msgid "guestfs_base64_in"
23238 #: ../src/guestfs-actions.pod:644
23242 " guestfs_base64_in (guestfs_h *g,\n"
23243 " const char *base64file,\n"
23244 " const char *filename);\n"
23249 #: ../src/guestfs-actions.pod:654 ../src/guestfs-actions.pod:668
23250 msgid "(Added in 1.3.5)"
23254 #: ../src/guestfs-actions.pod:656
23255 msgid "guestfs_base64_out"
23259 #: ../src/guestfs-actions.pod:658
23263 " guestfs_base64_out (guestfs_h *g,\n"
23264 " const char *filename,\n"
23265 " const char *base64file);\n"
23270 #: ../src/guestfs-actions.pod:670
23271 msgid "guestfs_blockdev_flushbufs"
23275 #: ../src/guestfs-actions.pod:672
23279 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
23280 " const char *device);\n"
23285 #: ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:700
23286 #: ../src/guestfs-actions.pod:715 ../src/guestfs-actions.pod:731
23287 #: ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:768
23288 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
23289 #: ../src/guestfs-actions.pod:814 ../src/guestfs-actions.pod:828
23290 msgid "(Added in 0.9.3)"
23294 #: ../src/guestfs-actions.pod:685
23295 msgid "guestfs_blockdev_getbsz"
23299 #: ../src/guestfs-actions.pod:687
23303 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
23304 " const char *device);\n"
23309 #: ../src/guestfs-actions.pod:702
23310 msgid "guestfs_blockdev_getro"
23314 #: ../src/guestfs-actions.pod:704
23318 " guestfs_blockdev_getro (guestfs_h *g,\n"
23319 " const char *device);\n"
23324 #: ../src/guestfs-actions.pod:713 ../src/guestfs-actions.pod:1586
23325 #: ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:2090
23326 #: ../src/guestfs-actions.pod:2101 ../src/guestfs-actions.pod:2173
23327 #: ../src/guestfs-actions.pod:2199 ../src/guestfs-actions.pod:2239
23328 #: ../src/guestfs-actions.pod:2254 ../src/guestfs-actions.pod:2288
23329 #: ../src/guestfs-actions.pod:2311 ../src/guestfs-actions.pod:3373
23330 #: ../src/guestfs-actions.pod:3389 ../src/guestfs-actions.pod:3407
23331 #: ../src/guestfs-actions.pod:3569 ../src/guestfs-actions.pod:3583
23332 #: ../src/guestfs-actions.pod:3598 ../src/guestfs-actions.pod:3612
23333 #: ../src/guestfs-actions.pod:3628 ../src/guestfs-actions.pod:3643
23334 #: ../src/guestfs-actions.pod:3659 ../src/guestfs-actions.pod:3673
23335 #: ../src/guestfs-actions.pod:3686 ../src/guestfs-actions.pod:3700
23336 #: ../src/guestfs-actions.pod:3715 ../src/guestfs-actions.pod:3730
23337 #: ../src/guestfs-actions.pod:3743 ../src/guestfs-actions.pod:3757
23338 #: ../src/guestfs-actions.pod:5476
23339 msgid "This function returns a C truth value on success or -1 on error."
23343 #: ../src/guestfs-actions.pod:717
23344 msgid "guestfs_blockdev_getsize64"
23348 #: ../src/guestfs-actions.pod:719
23352 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
23353 " const char *device);\n"
23358 #: ../src/guestfs-actions.pod:725
23359 msgid "See also C<guestfs_blockdev_getsz>."
23363 #: ../src/guestfs-actions.pod:733
23364 msgid "guestfs_blockdev_getss"
23368 #: ../src/guestfs-actions.pod:735
23372 " guestfs_blockdev_getss (guestfs_h *g,\n"
23373 " const char *device);\n"
23378 #: ../src/guestfs-actions.pod:742
23380 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
23385 #: ../src/guestfs-actions.pod:751
23386 msgid "guestfs_blockdev_getsz"
23390 #: ../src/guestfs-actions.pod:753
23394 " guestfs_blockdev_getsz (guestfs_h *g,\n"
23395 " const char *device);\n"
23400 #: ../src/guestfs-actions.pod:760
23402 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
23403 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
23407 #: ../src/guestfs-actions.pod:770
23408 msgid "guestfs_blockdev_rereadpt"
23412 #: ../src/guestfs-actions.pod:772
23416 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
23417 " const char *device);\n"
23422 #: ../src/guestfs-actions.pod:784
23423 msgid "guestfs_blockdev_setbsz"
23427 #: ../src/guestfs-actions.pod:786
23431 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
23432 " const char *device,\n"
23433 " int blocksize);\n"
23438 #: ../src/guestfs-actions.pod:802
23439 msgid "guestfs_blockdev_setro"
23443 #: ../src/guestfs-actions.pod:804
23447 " guestfs_blockdev_setro (guestfs_h *g,\n"
23448 " const char *device);\n"
23453 #: ../src/guestfs-actions.pod:816
23454 msgid "guestfs_blockdev_setrw"
23458 #: ../src/guestfs-actions.pod:818
23462 " guestfs_blockdev_setrw (guestfs_h *g,\n"
23463 " const char *device);\n"
23468 #: ../src/guestfs-actions.pod:830
23469 msgid "guestfs_btrfs_filesystem_resize"
23473 #: ../src/guestfs-actions.pod:832
23477 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
23478 " const char *mountpoint,\n"
23484 #: ../src/guestfs-actions.pod:842
23487 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
23492 #: ../src/guestfs-actions.pod:865
23493 msgid "(Added in 1.11.17)"
23497 #: ../src/guestfs-actions.pod:867
23498 msgid "guestfs_btrfs_filesystem_resize_va"
23502 #: ../src/guestfs-actions.pod:869
23506 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
23507 " const char *mountpoint,\n"
23508 " va_list args);\n"
23513 #: ../src/guestfs-actions.pod:874
23514 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
23518 #: ../src/guestfs-actions.pod:878
23519 msgid "guestfs_btrfs_filesystem_resize_argv"
23523 #: ../src/guestfs-actions.pod:880
23527 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
23528 " const char *mountpoint,\n"
23529 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
23534 #: ../src/guestfs-actions.pod:885
23535 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
23539 #: ../src/guestfs-actions.pod:889
23540 msgid "guestfs_case_sensitive_path"
23544 #: ../src/guestfs-actions.pod:891
23548 " guestfs_case_sensitive_path (guestfs_h *g,\n"
23549 " const char *path);\n"
23554 #: ../src/guestfs-actions.pod:917
23556 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
23557 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
23558 "how the directories were originally created under Windows)."
23562 #: ../src/guestfs-actions.pod:925
23563 msgid "See also C<guestfs_realpath>."
23567 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:7538
23568 msgid "(Added in 1.0.75)"
23572 #: ../src/guestfs-actions.pod:932
23573 msgid "guestfs_cat"
23577 #: ../src/guestfs-actions.pod:934
23581 " guestfs_cat (guestfs_h *g,\n"
23582 " const char *path);\n"
23587 #: ../src/guestfs-actions.pod:940
23589 "Note that this function cannot correctly handle binary files (specifically, "
23590 "files containing C<\\0> character which is treated as end of string). For "
23591 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
23592 "functions which have a more complex interface."
23596 #: ../src/guestfs-actions.pod:951 ../src/guestfs-actions.pod:3887
23597 #: ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:3986
23598 #: ../src/guestfs-actions.pod:4074 ../src/guestfs-actions.pod:4482
23599 #: ../src/guestfs-actions.pod:4496 ../src/guestfs-actions.pod:5857
23600 #: ../src/guestfs-actions.pod:5871 ../src/guestfs-actions.pod:7691
23601 #: ../src/guestfs-actions.pod:7705
23602 msgid "(Added in 0.4)"
23606 #: ../src/guestfs-actions.pod:953
23607 msgid "guestfs_checksum"
23611 #: ../src/guestfs-actions.pod:955
23615 " guestfs_checksum (guestfs_h *g,\n"
23616 " const char *csumtype,\n"
23617 " const char *path);\n"
23622 #: ../src/guestfs-actions.pod:1001
23623 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
23627 #: ../src/guestfs-actions.pod:1003
23628 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
23632 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1423
23633 #: ../src/guestfs-actions.pod:2279 ../src/guestfs-actions.pod:3585
23634 #: ../src/guestfs-actions.pod:3614 ../src/guestfs-actions.pod:3675
23635 #: ../src/guestfs-actions.pod:3702 ../src/guestfs-actions.pod:7394
23636 msgid "(Added in 1.0.2)"
23640 #: ../src/guestfs-actions.pod:1010
23641 msgid "guestfs_checksum_device"
23645 #: ../src/guestfs-actions.pod:1012
23649 " guestfs_checksum_device (guestfs_h *g,\n"
23650 " const char *csumtype,\n"
23651 " const char *device);\n"
23656 #: ../src/guestfs-actions.pod:1017
23658 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
23659 "device named C<device>. For the types of checksums supported see the "
23660 "C<guestfs_checksum> command."
23664 #: ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:5306
23665 #: ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5478
23666 #: ../src/guestfs-actions.pod:5496 ../src/guestfs-actions.pod:5678
23667 #: ../src/guestfs-actions.pod:7303 ../src/guestfs-actions.pod:7317
23668 #: ../src/guestfs-actions.pod:7717
23669 msgid "(Added in 1.3.2)"
23673 #: ../src/guestfs-actions.pod:1026
23674 msgid "guestfs_checksums_out"
23678 #: ../src/guestfs-actions.pod:1028
23682 " guestfs_checksums_out (guestfs_h *g,\n"
23683 " const char *csumtype,\n"
23684 " const char *directory,\n"
23685 " const char *sumsfile);\n"
23690 #: ../src/guestfs-actions.pod:1048
23691 msgid "(Added in 1.3.7)"
23695 #: ../src/guestfs-actions.pod:1050
23696 msgid "guestfs_chmod"
23700 #: ../src/guestfs-actions.pod:1052
23704 " guestfs_chmod (guestfs_h *g,\n"
23706 " const char *path);\n"
23711 #: ../src/guestfs-actions.pod:1070
23712 msgid "guestfs_chown"
23716 #: ../src/guestfs-actions.pod:1072
23720 " guestfs_chown (guestfs_h *g,\n"
23723 " const char *path);\n"
23728 #: ../src/guestfs-actions.pod:1088
23729 msgid "guestfs_command"
23733 #: ../src/guestfs-actions.pod:1090
23737 " guestfs_command (guestfs_h *g,\n"
23738 " char *const *arguments);\n"
23743 #: ../src/guestfs-actions.pod:1099
23745 "The single parameter is an argv-style list of arguments. The first element "
23746 "is the name of the program to run. Subsequent elements are parameters. The "
23747 "list must be non-empty (ie. must contain a program name). Note that the "
23748 "command runs directly, and is I<not> invoked via the shell (see "
23753 #: ../src/guestfs-actions.pod:1130 ../src/guestfs-actions.pod:1150
23754 #: ../src/guestfs-actions.pod:1722
23755 msgid "(Added in 0.9.1)"
23759 #: ../src/guestfs-actions.pod:1132
23760 msgid "guestfs_command_lines"
23764 #: ../src/guestfs-actions.pod:1134
23768 " guestfs_command_lines (guestfs_h *g,\n"
23769 " char *const *arguments);\n"
23774 #: ../src/guestfs-actions.pod:1138
23776 "This is the same as C<guestfs_command>, but splits the result into a list of "
23781 #: ../src/guestfs-actions.pod:1141
23782 msgid "See also: C<guestfs_sh_lines>"
23786 #: ../src/guestfs-actions.pod:1152
23787 msgid "guestfs_compress_device_out"
23791 #: ../src/guestfs-actions.pod:1154
23795 " guestfs_compress_device_out (guestfs_h *g,\n"
23796 " const char *ctype,\n"
23797 " const char *device,\n"
23798 " const char *zdevice,\n"
23804 #: ../src/guestfs-actions.pod:1166
23807 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
23812 #: ../src/guestfs-actions.pod:1171
23814 "The C<ctype> and optional C<level> parameters have the same meaning as in "
23815 "C<guestfs_compress_out>."
23819 #: ../src/guestfs-actions.pod:1176
23820 msgid "guestfs_compress_device_out_va"
23824 #: ../src/guestfs-actions.pod:1178
23828 " guestfs_compress_device_out_va (guestfs_h *g,\n"
23829 " const char *ctype,\n"
23830 " const char *device,\n"
23831 " const char *zdevice,\n"
23832 " va_list args);\n"
23837 #: ../src/guestfs-actions.pod:1185
23838 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
23842 #: ../src/guestfs-actions.pod:1189
23843 msgid "guestfs_compress_device_out_argv"
23847 #: ../src/guestfs-actions.pod:1191
23851 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
23852 " const char *ctype,\n"
23853 " const char *device,\n"
23854 " const char *zdevice,\n"
23855 " const struct guestfs_compress_device_out_argv *optargs);\n"
23860 #: ../src/guestfs-actions.pod:1198
23861 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
23865 #: ../src/guestfs-actions.pod:1202
23866 msgid "guestfs_compress_out"
23870 #: ../src/guestfs-actions.pod:1204
23874 " guestfs_compress_out (guestfs_h *g,\n"
23875 " const char *ctype,\n"
23876 " const char *file,\n"
23877 " const char *zfile,\n"
23883 #: ../src/guestfs-actions.pod:1216
23886 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
23891 #: ../src/guestfs-actions.pod:1233
23892 msgid "guestfs_compress_out_va"
23896 #: ../src/guestfs-actions.pod:1235
23900 " guestfs_compress_out_va (guestfs_h *g,\n"
23901 " const char *ctype,\n"
23902 " const char *file,\n"
23903 " const char *zfile,\n"
23904 " va_list args);\n"
23909 #: ../src/guestfs-actions.pod:1242
23910 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
23914 #: ../src/guestfs-actions.pod:1246
23915 msgid "guestfs_compress_out_argv"
23919 #: ../src/guestfs-actions.pod:1248
23923 " guestfs_compress_out_argv (guestfs_h *g,\n"
23924 " const char *ctype,\n"
23925 " const char *file,\n"
23926 " const char *zfile,\n"
23927 " const struct guestfs_compress_out_argv *optargs);\n"
23932 #: ../src/guestfs-actions.pod:1255
23933 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
23937 #: ../src/guestfs-actions.pod:1259
23938 msgid "guestfs_config"
23942 #: ../src/guestfs-actions.pod:1261
23946 " guestfs_config (guestfs_h *g,\n"
23947 " const char *qemuparam,\n"
23948 " const char *qemuvalue);\n"
23953 #: ../src/guestfs-actions.pod:1279
23954 msgid "guestfs_copy_size"
23958 #: ../src/guestfs-actions.pod:1281
23962 " guestfs_copy_size (guestfs_h *g,\n"
23963 " const char *src,\n"
23964 " const char *dest,\n"
23965 " int64_t size);\n"
23970 #: ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1418
23971 #: ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1494
23972 #: ../src/guestfs-actions.pod:1871 ../src/guestfs-actions.pod:1893
23973 #: ../src/guestfs-actions.pod:3785 ../src/guestfs-actions.pod:7389
23974 #: ../src/guestfs-actions.pod:7423 ../src/guestfs-actions.pod:7930
23975 #: ../src/guestfs-actions.pod:7953
23977 "This long-running command can generate progress notification messages so "
23978 "that the caller can display a progress bar or indicator. To receive these "
23979 "messages, the caller must register a progress event callback. See L<guestfs"
23980 "(3)/GUESTFS_EVENT_PROGRESS>."
23984 #: ../src/guestfs-actions.pod:1300 ../src/guestfs-actions.pod:4509
23985 #: ../src/guestfs-actions.pod:5884 ../src/guestfs-actions.pod:7624
23986 #: ../src/guestfs-actions.pod:7644 ../src/guestfs-actions.pod:7730
23987 msgid "(Added in 1.0.87)"
23991 #: ../src/guestfs-actions.pod:1302
23996 #: ../src/guestfs-actions.pod:1304
24000 " guestfs_cp (guestfs_h *g,\n"
24001 " const char *src,\n"
24002 " const char *dest);\n"
24007 #: ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1328
24008 #: ../src/guestfs-actions.pod:1400 ../src/guestfs-actions.pod:1474
24009 #: ../src/guestfs-actions.pod:1588 ../src/guestfs-actions.pod:5253
24010 #: ../src/guestfs-actions.pod:5728
24011 msgid "(Added in 1.0.18)"
24015 #: ../src/guestfs-actions.pod:1316
24016 msgid "guestfs_cp_a"
24020 #: ../src/guestfs-actions.pod:1318
24024 " guestfs_cp_a (guestfs_h *g,\n"
24025 " const char *src,\n"
24026 " const char *dest);\n"
24031 #: ../src/guestfs-actions.pod:1330
24036 #: ../src/guestfs-actions.pod:1332
24040 " guestfs_dd (guestfs_h *g,\n"
24041 " const char *src,\n"
24042 " const char *dest);\n"
24047 #: ../src/guestfs-actions.pod:1342
24049 "If the destination is a device, it must be as large or larger than the "
24050 "source file or device, otherwise the copy will fail. This command cannot do "
24051 "partial copies (see C<guestfs_copy_size>)."
24055 #: ../src/guestfs-actions.pod:1350
24060 #: ../src/guestfs-actions.pod:1352
24064 " guestfs_df (guestfs_h *g);\n"
24069 #: ../src/guestfs-actions.pod:1357 ../src/guestfs-actions.pod:1374
24071 "This command is mostly useful for interactive sessions. It is I<not> "
24072 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
24077 #: ../src/guestfs-actions.pod:1364 ../src/guestfs-actions.pod:1381
24078 #: ../src/guestfs-actions.pod:1499 ../src/guestfs-actions.pod:2504
24079 #: ../src/guestfs-actions.pod:2528 ../src/guestfs-actions.pod:2596
24080 #: ../src/guestfs-actions.pod:4619 ../src/guestfs-actions.pod:5153
24081 #: ../src/guestfs-actions.pod:7127 ../src/guestfs-actions.pod:7151
24082 #: ../src/guestfs-actions.pod:7770 ../src/guestfs-actions.pod:7783
24083 #: ../src/guestfs-actions.pod:7796
24084 msgid "(Added in 1.0.54)"
24088 #: ../src/guestfs-actions.pod:1366
24089 msgid "guestfs_df_h"
24093 #: ../src/guestfs-actions.pod:1368
24097 " guestfs_df_h (guestfs_h *g);\n"
24102 #: ../src/guestfs-actions.pod:1383
24103 msgid "guestfs_dmesg"
24107 #: ../src/guestfs-actions.pod:1385
24111 " guestfs_dmesg (guestfs_h *g);\n"
24116 #: ../src/guestfs-actions.pod:1392
24118 "Another way to get the same information is to enable verbose messages with "
24119 "C<guestfs_set_verbose> or by setting the environment variable "
24120 "C<LIBGUESTFS_DEBUG=1> before running the program."
24124 #: ../src/guestfs-actions.pod:1402
24125 msgid "guestfs_download"
24129 #: ../src/guestfs-actions.pod:1404
24133 " guestfs_download (guestfs_h *g,\n"
24134 " const char *remotefilename,\n"
24135 " const char *filename);\n"
24140 #: ../src/guestfs-actions.pod:1414
24141 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
24145 #: ../src/guestfs-actions.pod:1425
24146 msgid "guestfs_download_offset"
24150 #: ../src/guestfs-actions.pod:1427
24154 " guestfs_download_offset (guestfs_h *g,\n"
24155 " const char *remotefilename,\n"
24156 " const char *filename,\n"
24157 " int64_t offset,\n"
24158 " int64_t size);\n"
24163 #: ../src/guestfs-actions.pod:1440
24165 "Note that there is no limit on the amount of data that can be downloaded "
24166 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
24167 "full amount unless an error occurs."
24171 #: ../src/guestfs-actions.pod:1445
24172 msgid "See also C<guestfs_download>, C<guestfs_pread>."
24176 #: ../src/guestfs-actions.pod:1454 ../src/guestfs-actions.pod:7428
24177 msgid "(Added in 1.5.17)"
24181 #: ../src/guestfs-actions.pod:1456
24182 msgid "guestfs_drop_caches"
24186 #: ../src/guestfs-actions.pod:1458
24190 " guestfs_drop_caches (guestfs_h *g,\n"
24191 " int whattodrop);\n"
24196 #: ../src/guestfs-actions.pod:1476
24201 #: ../src/guestfs-actions.pod:1478
24205 " guestfs_du (guestfs_h *g,\n"
24206 " const char *path);\n"
24211 #: ../src/guestfs-actions.pod:1501
24212 msgid "guestfs_e2fsck_f"
24216 #: ../src/guestfs-actions.pod:1503
24220 " guestfs_e2fsck_f (guestfs_h *g,\n"
24221 " const char *device);\n"
24226 #: ../src/guestfs-actions.pod:1511
24228 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
24229 "Normally you should use C<guestfs_fsck>."
24233 #: ../src/guestfs-actions.pod:1516
24234 msgid "(Added in 1.0.29)"
24238 #: ../src/guestfs-actions.pod:1518
24239 msgid "guestfs_echo_daemon"
24243 #: ../src/guestfs-actions.pod:1520
24247 " guestfs_echo_daemon (guestfs_h *g,\n"
24248 " char *const *words);\n"
24253 #: ../src/guestfs-actions.pod:1529
24254 msgid "See also C<guestfs_ping_daemon>."
24258 #: ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:2290
24259 #: ../src/guestfs-actions.pod:6599
24260 msgid "(Added in 1.0.69)"
24264 #: ../src/guestfs-actions.pod:1536
24265 msgid "guestfs_egrep"
24269 #: ../src/guestfs-actions.pod:1538
24273 " guestfs_egrep (guestfs_h *g,\n"
24274 " const char *regex,\n"
24275 " const char *path);\n"
24280 #: ../src/guestfs-actions.pod:1553 ../src/guestfs-actions.pod:1572
24281 #: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1675
24282 #: ../src/guestfs-actions.pod:1694 ../src/guestfs-actions.pod:2420
24283 #: ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2617
24284 #: ../src/guestfs-actions.pod:2630 ../src/guestfs-actions.pod:2645
24285 #: ../src/guestfs-actions.pod:2691 ../src/guestfs-actions.pod:2713
24286 #: ../src/guestfs-actions.pod:2726 ../src/guestfs-actions.pod:3999
24287 #: ../src/guestfs-actions.pod:4013 ../src/guestfs-actions.pod:4026
24288 #: ../src/guestfs-actions.pod:4040 ../src/guestfs-actions.pod:5041
24289 #: ../src/guestfs-actions.pod:6062 ../src/guestfs-actions.pod:6111
24290 #: ../src/guestfs-actions.pod:6995 ../src/guestfs-actions.pod:7007
24291 #: ../src/guestfs-actions.pod:7020 ../src/guestfs-actions.pod:7033
24292 #: ../src/guestfs-actions.pod:7055 ../src/guestfs-actions.pod:7068
24293 #: ../src/guestfs-actions.pod:7081 ../src/guestfs-actions.pod:7094
24294 #: ../src/guestfs-actions.pod:7888 ../src/guestfs-actions.pod:7907
24295 #: ../src/guestfs-actions.pod:8001 ../src/guestfs-actions.pod:8020
24296 #: ../src/guestfs-actions.pod:8066 ../src/guestfs-actions.pod:8085
24297 msgid "(Added in 1.0.66)"
24301 #: ../src/guestfs-actions.pod:1555
24302 msgid "guestfs_egrepi"
24306 #: ../src/guestfs-actions.pod:1557
24310 " guestfs_egrepi (guestfs_h *g,\n"
24311 " const char *regex,\n"
24312 " const char *path);\n"
24317 #: ../src/guestfs-actions.pod:1574
24318 msgid "guestfs_equal"
24322 #: ../src/guestfs-actions.pod:1576
24326 " guestfs_equal (guestfs_h *g,\n"
24327 " const char *file1,\n"
24328 " const char *file2);\n"
24333 #: ../src/guestfs-actions.pod:1590
24334 msgid "guestfs_exists"
24338 #: ../src/guestfs-actions.pod:1592
24342 " guestfs_exists (guestfs_h *g,\n"
24343 " const char *path);\n"
24348 #: ../src/guestfs-actions.pod:1599
24349 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
24353 #: ../src/guestfs-actions.pod:1605
24354 msgid "guestfs_fallocate"
24358 #: ../src/guestfs-actions.pod:1607
24362 " guestfs_fallocate (guestfs_h *g,\n"
24363 " const char *path,\n"
24369 #: ../src/guestfs-actions.pod:1612
24371 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
24376 #: ../src/guestfs-actions.pod:1631
24377 msgid "guestfs_fallocate64"
24381 #: ../src/guestfs-actions.pod:1633
24385 " guestfs_fallocate64 (guestfs_h *g,\n"
24386 " const char *path,\n"
24392 #: ../src/guestfs-actions.pod:1642
24394 "Note that this call allocates disk blocks for the file. To create a sparse "
24395 "file use C<guestfs_truncate_size> instead."
24399 #: ../src/guestfs-actions.pod:1645
24401 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
24402 "oversight it only allowed 30 bit lengths to be specified, effectively "
24403 "limiting the maximum size of files created through that call to 1GB."
24407 #: ../src/guestfs-actions.pod:1656
24408 msgid "(Added in 1.3.17)"
24412 #: ../src/guestfs-actions.pod:1658
24413 msgid "guestfs_fgrep"
24417 #: ../src/guestfs-actions.pod:1660
24421 " guestfs_fgrep (guestfs_h *g,\n"
24422 " const char *pattern,\n"
24423 " const char *path);\n"
24428 #: ../src/guestfs-actions.pod:1677
24429 msgid "guestfs_fgrepi"
24433 #: ../src/guestfs-actions.pod:1679
24437 " guestfs_fgrepi (guestfs_h *g,\n"
24438 " const char *pattern,\n"
24439 " const char *path);\n"
24444 #: ../src/guestfs-actions.pod:1696
24445 msgid "guestfs_file"
24449 #: ../src/guestfs-actions.pod:1698
24453 " guestfs_file (guestfs_h *g,\n"
24454 " const char *path);\n"
24459 #: ../src/guestfs-actions.pod:1716
24461 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
24462 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
24466 #: ../src/guestfs-actions.pod:1724
24467 msgid "guestfs_file_architecture"
24471 #: ../src/guestfs-actions.pod:1726
24475 " guestfs_file_architecture (guestfs_h *g,\n"
24476 " const char *filename);\n"
24481 #: ../src/guestfs-actions.pod:1834 ../src/guestfs-actions.pod:1997
24482 #: ../src/guestfs-actions.pod:2014 ../src/guestfs-actions.pod:2746
24483 #: ../src/guestfs-actions.pod:2840 ../src/guestfs-actions.pod:2906
24484 #: ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3111
24485 #: ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:3226
24486 #: ../src/guestfs-actions.pod:3319 ../src/guestfs-actions.pod:3556
24487 #: ../src/guestfs-actions.pod:3688
24488 msgid "(Added in 1.5.3)"
24492 #: ../src/guestfs-actions.pod:1836
24493 msgid "guestfs_filesize"
24497 #: ../src/guestfs-actions.pod:1838
24501 " guestfs_filesize (guestfs_h *g,\n"
24502 " const char *file);\n"
24507 #: ../src/guestfs-actions.pod:1844
24509 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
24510 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
24511 "devices, use C<guestfs_blockdev_getsize64>."
24515 #: ../src/guestfs-actions.pod:1850
24516 msgid "(Added in 1.0.82)"
24520 #: ../src/guestfs-actions.pod:1852
24521 msgid "guestfs_fill"
24525 #: ../src/guestfs-actions.pod:1854
24529 " guestfs_fill (guestfs_h *g,\n"
24532 " const char *path);\n"
24537 #: ../src/guestfs-actions.pod:1864
24539 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
24540 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
24541 "bytes use C<guestfs_fill_pattern>."
24545 #: ../src/guestfs-actions.pod:1876
24546 msgid "(Added in 1.0.79)"
24550 #: ../src/guestfs-actions.pod:1878
24551 msgid "guestfs_fill_pattern"
24555 #: ../src/guestfs-actions.pod:1880
24559 " guestfs_fill_pattern (guestfs_h *g,\n"
24560 " const char *pattern,\n"
24562 " const char *path);\n"
24567 #: ../src/guestfs-actions.pod:1886
24569 "This function is like C<guestfs_fill> except that it creates a new file of "
24570 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
24571 "pattern is truncated if necessary to ensure the length of the file is "
24572 "exactly C<len> bytes."
24576 #: ../src/guestfs-actions.pod:1898
24577 msgid "(Added in 1.3.12)"
24581 #: ../src/guestfs-actions.pod:1900
24582 msgid "guestfs_find"
24586 #: ../src/guestfs-actions.pod:1902
24590 " guestfs_find (guestfs_h *g,\n"
24591 " const char *directory);\n"
24596 #: ../src/guestfs-actions.pod:1918
24598 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
24602 #: ../src/guestfs-actions.pod:1931
24603 msgid "See also C<guestfs_find0>."
24607 #: ../src/guestfs-actions.pod:1940 ../src/guestfs-actions.pod:4446
24608 #: ../src/guestfs-actions.pod:6146
24609 msgid "(Added in 1.0.27)"
24613 #: ../src/guestfs-actions.pod:1942
24614 msgid "guestfs_find0"
24618 #: ../src/guestfs-actions.pod:1944
24622 " guestfs_find0 (guestfs_h *g,\n"
24623 " const char *directory,\n"
24624 " const char *files);\n"
24629 #: ../src/guestfs-actions.pod:1953
24631 "This command works the same way as C<guestfs_find> with the following "
24636 #: ../src/guestfs-actions.pod:1980
24637 msgid "(Added in 1.0.74)"
24641 #: ../src/guestfs-actions.pod:1982
24642 msgid "guestfs_findfs_label"
24646 #: ../src/guestfs-actions.pod:1984
24650 " guestfs_findfs_label (guestfs_h *g,\n"
24651 " const char *label);\n"
24656 #: ../src/guestfs-actions.pod:1992
24657 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
24661 #: ../src/guestfs-actions.pod:1999
24662 msgid "guestfs_findfs_uuid"
24666 #: ../src/guestfs-actions.pod:2001
24670 " guestfs_findfs_uuid (guestfs_h *g,\n"
24671 " const char *uuid);\n"
24676 #: ../src/guestfs-actions.pod:2009
24677 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
24681 #: ../src/guestfs-actions.pod:2016
24682 msgid "guestfs_fsck"
24686 #: ../src/guestfs-actions.pod:2018
24690 " guestfs_fsck (guestfs_h *g,\n"
24691 " const char *fstype,\n"
24692 " const char *device);\n"
24697 #: ../src/guestfs-actions.pod:2053 ../src/guestfs-actions.pod:7935
24698 msgid "(Added in 1.0.16)"
24702 #: ../src/guestfs-actions.pod:2055
24703 msgid "guestfs_get_append"
24707 #: ../src/guestfs-actions.pod:2057
24711 " guestfs_get_append (guestfs_h *g);\n"
24716 #: ../src/guestfs-actions.pod:2065
24718 "This function returns a string which may be NULL. There is no way to return "
24719 "an error from this function. The string is owned by the guest handle and "
24720 "must I<not> be freed."
24724 #: ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:5824
24725 #: ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6762
24726 #: ../src/guestfs-actions.pod:6781 ../src/guestfs-actions.pod:6797
24727 #: ../src/guestfs-actions.pod:6821 ../src/guestfs-actions.pod:7575
24728 #: ../src/guestfs-actions.pod:7590 ../src/guestfs-actions.pod:7982
24729 msgid "(Added in 1.0.26)"
24733 #: ../src/guestfs-actions.pod:2071
24734 msgid "guestfs_get_attach_method"
24738 #: ../src/guestfs-actions.pod:2073
24742 " guestfs_get_attach_method (guestfs_h *g);\n"
24747 #: ../src/guestfs-actions.pod:2076
24748 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
24752 #: ../src/guestfs-actions.pod:2081 ../src/guestfs-actions.pod:6336
24753 msgid "(Added in 1.9.8)"
24757 #: ../src/guestfs-actions.pod:2083
24758 msgid "guestfs_get_autosync"
24762 #: ../src/guestfs-actions.pod:2085
24766 " guestfs_get_autosync (guestfs_h *g);\n"
24771 #: ../src/guestfs-actions.pod:2094
24772 msgid "guestfs_get_direct"
24776 #: ../src/guestfs-actions.pod:2096
24780 " guestfs_get_direct (guestfs_h *g);\n"
24785 #: ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:6377
24786 msgid "(Added in 1.0.72)"
24790 #: ../src/guestfs-actions.pod:2105
24791 msgid "guestfs_get_e2label"
24795 #: ../src/guestfs-actions.pod:2107
24799 " guestfs_get_e2label (guestfs_h *g,\n"
24800 " const char *device);\n"
24805 #: ../src/guestfs-actions.pod:2111
24807 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
24812 #: ../src/guestfs-actions.pod:2124 ../src/guestfs-actions.pod:2145
24813 #: ../src/guestfs-actions.pod:6395 ../src/guestfs-actions.pod:6414
24814 msgid "(Added in 1.0.15)"
24818 #: ../src/guestfs-actions.pod:2126
24819 msgid "guestfs_get_e2uuid"
24823 #: ../src/guestfs-actions.pod:2128
24827 " guestfs_get_e2uuid (guestfs_h *g,\n"
24828 " const char *device);\n"
24833 #: ../src/guestfs-actions.pod:2132
24835 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
24840 #: ../src/guestfs-actions.pod:2147
24841 msgid "guestfs_get_memsize"
24845 #: ../src/guestfs-actions.pod:2149
24849 " guestfs_get_memsize (guestfs_h *g);\n"
24854 #: ../src/guestfs-actions.pod:2155
24856 "If C<guestfs_set_memsize> was not called on this handle, and if "
24857 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
24858 "value for memsize."
24862 #: ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:4737
24863 #: ../src/guestfs-actions.pod:4946 ../src/guestfs-actions.pod:4965
24864 #: ../src/guestfs-actions.pod:4984 ../src/guestfs-actions.pod:4996
24865 #: ../src/guestfs-actions.pod:5013 ../src/guestfs-actions.pod:5026
24866 #: ../src/guestfs-actions.pod:6049 ../src/guestfs-actions.pod:6435
24867 #: ../src/guestfs-actions.pod:6729 ../src/guestfs-actions.pod:7344
24868 msgid "(Added in 1.0.55)"
24872 #: ../src/guestfs-actions.pod:2166
24873 msgid "guestfs_get_network"
24877 #: ../src/guestfs-actions.pod:2168
24881 " guestfs_get_network (guestfs_h *g);\n"
24886 #: ../src/guestfs-actions.pod:2175 ../src/guestfs-actions.pod:6454
24887 msgid "(Added in 1.5.4)"
24891 #: ../src/guestfs-actions.pod:2177
24892 msgid "guestfs_get_path"
24896 #: ../src/guestfs-actions.pod:2179
24900 " guestfs_get_path (guestfs_h *g);\n"
24905 #: ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2227
24907 "This function returns a string, or NULL on error. The string is owned by "
24908 "the guest handle and must I<not> be freed."
24912 #: ../src/guestfs-actions.pod:2192
24913 msgid "guestfs_get_pgroup"
24917 #: ../src/guestfs-actions.pod:2194
24921 " guestfs_get_pgroup (guestfs_h *g);\n"
24926 #: ../src/guestfs-actions.pod:2201 ../src/guestfs-actions.pod:6490
24927 #: ../src/guestfs-actions.pod:7836
24928 msgid "(Added in 1.11.18)"
24932 #: ../src/guestfs-actions.pod:2203
24933 msgid "guestfs_get_pid"
24937 #: ../src/guestfs-actions.pod:2205
24941 " guestfs_get_pid (guestfs_h *g);\n"
24946 #: ../src/guestfs-actions.pod:2215
24947 msgid "(Added in 1.0.56)"
24951 #: ../src/guestfs-actions.pod:2217
24952 msgid "guestfs_get_qemu"
24956 #: ../src/guestfs-actions.pod:2219
24960 " guestfs_get_qemu (guestfs_h *g);\n"
24965 #: ../src/guestfs-actions.pod:2230 ../src/guestfs-actions.pod:6518
24966 msgid "(Added in 1.0.6)"
24970 #: ../src/guestfs-actions.pod:2232
24971 msgid "guestfs_get_recovery_proc"
24975 #: ../src/guestfs-actions.pod:2234
24979 " guestfs_get_recovery_proc (guestfs_h *g);\n"
24984 #: ../src/guestfs-actions.pod:2241 ../src/guestfs-actions.pod:3810
24985 #: ../src/guestfs-actions.pod:4141 ../src/guestfs-actions.pod:4544
24986 #: ../src/guestfs-actions.pod:4576 ../src/guestfs-actions.pod:5754
24987 #: ../src/guestfs-actions.pod:6097 ../src/guestfs-actions.pod:6542
24988 #: ../src/guestfs-actions.pod:7247 ../src/guestfs-actions.pod:7267
24989 #: ../src/guestfs-actions.pod:7459
24990 msgid "(Added in 1.0.77)"
24994 #: ../src/guestfs-actions.pod:2243
24995 msgid "guestfs_get_selinux"
24999 #: ../src/guestfs-actions.pod:2245
25003 " guestfs_get_selinux (guestfs_h *g);\n"
25008 #: ../src/guestfs-actions.pod:2248
25010 "This returns the current setting of the selinux flag which is passed to the "
25011 "appliance at boot time. See C<guestfs_set_selinux>."
25015 #: ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2328
25016 #: ../src/guestfs-actions.pod:6561 ../src/guestfs-actions.pod:6633
25017 msgid "(Added in 1.0.67)"
25021 #: ../src/guestfs-actions.pod:2258
25022 msgid "guestfs_get_smp"
25026 #: ../src/guestfs-actions.pod:2260
25030 " guestfs_get_smp (guestfs_h *g);\n"
25035 #: ../src/guestfs-actions.pod:2267
25036 msgid "guestfs_get_state"
25040 #: ../src/guestfs-actions.pod:2269
25044 " guestfs_get_state (guestfs_h *g);\n"
25049 #: ../src/guestfs-actions.pod:2281
25050 msgid "guestfs_get_trace"
25054 #: ../src/guestfs-actions.pod:2283
25058 " guestfs_get_trace (guestfs_h *g);\n"
25063 #: ../src/guestfs-actions.pod:2292
25064 msgid "guestfs_get_umask"
25068 #: ../src/guestfs-actions.pod:2294
25072 " guestfs_get_umask (guestfs_h *g);\n"
25077 #: ../src/guestfs-actions.pod:2297
25079 "Return the current umask. By default the umask is C<022> unless it has been "
25080 "set by calling C<guestfs_umask>."
25084 #: ../src/guestfs-actions.pod:2304
25085 msgid "guestfs_get_verbose"
25089 #: ../src/guestfs-actions.pod:2306
25093 " guestfs_get_verbose (guestfs_h *g);\n"
25098 #: ../src/guestfs-actions.pod:2315
25099 msgid "guestfs_getcon"
25103 #: ../src/guestfs-actions.pod:2317
25107 " guestfs_getcon (guestfs_h *g);\n"
25112 #: ../src/guestfs-actions.pod:2322
25114 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
25118 #: ../src/guestfs-actions.pod:2330
25119 msgid "guestfs_getxattr"
25123 #: ../src/guestfs-actions.pod:2332
25127 " guestfs_getxattr (guestfs_h *g,\n"
25128 " const char *path,\n"
25129 " const char *name,\n"
25130 " size_t *size_r);\n"
25135 #: ../src/guestfs-actions.pod:2338
25137 "Get a single extended attribute from file C<path> named C<name>. This call "
25138 "follows symlinks. If you want to lookup an extended attribute for the "
25139 "symlink itself, use C<guestfs_lgetxattr>."
25143 #: ../src/guestfs-actions.pod:2342 ../src/guestfs-actions.pod:3824
25145 "Normally it is better to get all extended attributes from a file in one go "
25146 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
25147 "implementations are buggy and do not provide a way to list out attributes. "
25148 "For these filesystems (notably ntfs-3g) you have to know the names of the "
25149 "extended attributes you want in advance and call this function."
25153 #: ../src/guestfs-actions.pod:2352
25154 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
25158 #: ../src/guestfs-actions.pod:2354 ../src/guestfs-actions.pod:2567
25159 #: ../src/guestfs-actions.pod:3041 ../src/guestfs-actions.pod:3836
25160 #: ../src/guestfs-actions.pod:5747 ../src/guestfs-actions.pod:5773
25161 #: ../src/guestfs-actions.pod:5954
25163 "This function returns a buffer, or NULL on error. The size of the returned "
25164 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
25169 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:3840
25170 msgid "(Added in 1.7.24)"
25174 #: ../src/guestfs-actions.pod:2360
25175 msgid "guestfs_getxattrs"
25179 #: ../src/guestfs-actions.pod:2362
25182 " struct guestfs_xattr_list *\n"
25183 " guestfs_getxattrs (guestfs_h *g,\n"
25184 " const char *path);\n"
25189 #: ../src/guestfs-actions.pod:2372
25190 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
25194 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:3852
25195 #: ../src/guestfs-actions.pod:4540
25197 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
25198 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
25202 #: ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:3856
25203 #: ../src/guestfs-actions.pod:4055 ../src/guestfs-actions.pod:4091
25204 #: ../src/guestfs-actions.pod:6127 ../src/guestfs-actions.pod:6652
25205 #: ../src/guestfs-actions.pod:8047
25206 msgid "(Added in 1.0.59)"
25210 #: ../src/guestfs-actions.pod:2380
25211 msgid "guestfs_glob_expand"
25215 #: ../src/guestfs-actions.pod:2382
25219 " guestfs_glob_expand (guestfs_h *g,\n"
25220 " const char *pattern);\n"
25225 #: ../src/guestfs-actions.pod:2401 ../src/guestfs-actions.pod:6845
25226 #: ../src/guestfs-actions.pod:6862
25227 msgid "(Added in 1.0.50)"
25231 #: ../src/guestfs-actions.pod:2403
25232 msgid "guestfs_grep"
25236 #: ../src/guestfs-actions.pod:2405
25240 " guestfs_grep (guestfs_h *g,\n"
25241 " const char *regex,\n"
25242 " const char *path);\n"
25247 #: ../src/guestfs-actions.pod:2422
25248 msgid "guestfs_grepi"
25252 #: ../src/guestfs-actions.pod:2424
25256 " guestfs_grepi (guestfs_h *g,\n"
25257 " const char *regex,\n"
25258 " const char *path);\n"
25263 #: ../src/guestfs-actions.pod:2441
25264 msgid "guestfs_grub_install"
25268 #: ../src/guestfs-actions.pod:2443
25272 " guestfs_grub_install (guestfs_h *g,\n"
25273 " const char *root,\n"
25274 " const char *device);\n"
25279 #: ../src/guestfs-actions.pod:2486
25280 msgid "(Added in 1.0.17)"
25284 #: ../src/guestfs-actions.pod:2488
25285 msgid "guestfs_head"
25289 #: ../src/guestfs-actions.pod:2490
25293 " guestfs_head (guestfs_h *g,\n"
25294 " const char *path);\n"
25299 #: ../src/guestfs-actions.pod:2506
25300 msgid "guestfs_head_n"
25304 #: ../src/guestfs-actions.pod:2508
25308 " guestfs_head_n (guestfs_h *g,\n"
25310 " const char *path);\n"
25315 #: ../src/guestfs-actions.pod:2530
25316 msgid "guestfs_hexdump"
25320 #: ../src/guestfs-actions.pod:2532
25324 " guestfs_hexdump (guestfs_h *g,\n"
25325 " const char *path);\n"
25330 #: ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:6926
25331 #: ../src/guestfs-actions.pod:6981
25332 msgid "(Added in 1.0.22)"
25336 #: ../src/guestfs-actions.pod:2547
25337 msgid "guestfs_initrd_cat"
25341 #: ../src/guestfs-actions.pod:2549
25345 " guestfs_initrd_cat (guestfs_h *g,\n"
25346 " const char *initrdpath,\n"
25347 " const char *filename,\n"
25348 " size_t *size_r);\n"
25353 #: ../src/guestfs-actions.pod:2565
25354 msgid "See also C<guestfs_initrd_list>."
25358 #: ../src/guestfs-actions.pod:2576
25359 msgid "guestfs_initrd_list"
25363 #: ../src/guestfs-actions.pod:2578
25367 " guestfs_initrd_list (guestfs_h *g,\n"
25368 " const char *path);\n"
25373 #: ../src/guestfs-actions.pod:2598
25374 msgid "guestfs_inotify_add_watch"
25378 #: ../src/guestfs-actions.pod:2600
25382 " guestfs_inotify_add_watch (guestfs_h *g,\n"
25383 " const char *path,\n"
25389 #: ../src/guestfs-actions.pod:2619
25390 msgid "guestfs_inotify_close"
25394 #: ../src/guestfs-actions.pod:2621
25398 " guestfs_inotify_close (guestfs_h *g);\n"
25403 #: ../src/guestfs-actions.pod:2632
25404 msgid "guestfs_inotify_files"
25408 #: ../src/guestfs-actions.pod:2634
25412 " guestfs_inotify_files (guestfs_h *g);\n"
25417 #: ../src/guestfs-actions.pod:2637
25419 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
25420 "returns a list of pathnames of objects that were touched. The returned "
25421 "pathnames are sorted and deduplicated."
25425 #: ../src/guestfs-actions.pod:2647
25426 msgid "guestfs_inotify_init"
25430 #: ../src/guestfs-actions.pod:2649
25434 " guestfs_inotify_init (guestfs_h *g,\n"
25435 " int maxevents);\n"
25440 #: ../src/guestfs-actions.pod:2657
25442 "C<maxevents> is the maximum number of events which will be queued up between "
25443 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
25444 "passed as C<0>, then the kernel (or previously set) default is used. For "
25445 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
25446 "throws away events, but records the fact that it threw them away by setting "
25447 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
25448 "C<guestfs_inotify_read>)."
25452 #: ../src/guestfs-actions.pod:2667
25454 "Before any events are generated, you have to add some watches to the "
25455 "internal watch list. See: C<guestfs_inotify_add_watch>, "
25456 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
25460 #: ../src/guestfs-actions.pod:2673
25462 "Queued up events should be read periodically by calling "
25463 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
25464 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
25465 "often enough then you risk the internal queue overflowing."
25469 #: ../src/guestfs-actions.pod:2680
25471 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
25472 "This also removes any watches automatically."
25476 #: ../src/guestfs-actions.pod:2693
25477 msgid "guestfs_inotify_read"
25481 #: ../src/guestfs-actions.pod:2695
25484 " struct guestfs_inotify_event_list *\n"
25485 " guestfs_inotify_read (guestfs_h *g);\n"
25490 #: ../src/guestfs-actions.pod:2709
25492 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
25493 "there was an error. I<The caller must call "
25494 "C<guestfs_free_inotify_event_list> after use>."
25498 #: ../src/guestfs-actions.pod:2715
25499 msgid "guestfs_inotify_rm_watch"
25503 #: ../src/guestfs-actions.pod:2717
25507 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
25513 #: ../src/guestfs-actions.pod:2721
25515 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
25519 #: ../src/guestfs-actions.pod:2728
25520 msgid "guestfs_inspect_get_arch"
25524 #: ../src/guestfs-actions.pod:2730
25528 " guestfs_inspect_get_arch (guestfs_h *g,\n"
25529 " const char *root);\n"
25534 #: ../src/guestfs-actions.pod:2734
25536 "This returns the architecture of the inspected operating system. The "
25537 "possible return values are listed under C<guestfs_file_architecture>."
25541 #: ../src/guestfs-actions.pod:2748
25542 msgid "guestfs_inspect_get_distro"
25546 #: ../src/guestfs-actions.pod:2750
25550 " guestfs_inspect_get_distro (guestfs_h *g,\n"
25551 " const char *root);\n"
25556 #: ../src/guestfs-actions.pod:2842
25557 msgid "guestfs_inspect_get_drive_mappings"
25561 #: ../src/guestfs-actions.pod:2844
25565 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
25566 " const char *root);\n"
25571 #: ../src/guestfs-actions.pod:2873
25573 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25574 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
25578 #: ../src/guestfs-actions.pod:2877 ../src/guestfs-actions.pod:3145
25579 #: ../src/guestfs-actions.pod:3943 ../src/guestfs-actions.pod:5215
25580 #: ../src/guestfs-actions.pod:7283
25582 "This function returns a NULL-terminated array of strings, or NULL if there "
25583 "was an error. The array of strings will always have length C<2n+1>, where "
25584 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
25585 "caller must free the strings and the array after use>."
25589 #: ../src/guestfs-actions.pod:2883 ../src/guestfs-actions.pod:3339
25590 msgid "(Added in 1.9.17)"
25594 #: ../src/guestfs-actions.pod:2885
25595 msgid "guestfs_inspect_get_filesystems"
25599 #: ../src/guestfs-actions.pod:2887
25603 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
25604 " const char *root);\n"
25609 #: ../src/guestfs-actions.pod:2899
25611 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25612 "C<guestfs_inspect_get_mountpoints>."
25616 #: ../src/guestfs-actions.pod:2908
25617 msgid "guestfs_inspect_get_format"
25621 #: ../src/guestfs-actions.pod:2910
25625 " guestfs_inspect_get_format (guestfs_h *g,\n"
25626 " const char *root);\n"
25631 #: ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:3375
25632 #: ../src/guestfs-actions.pod:3391 ../src/guestfs-actions.pod:3409
25633 #: ../src/guestfs-actions.pod:6165
25634 msgid "(Added in 1.9.4)"
25638 #: ../src/guestfs-actions.pod:2946
25639 msgid "guestfs_inspect_get_hostname"
25643 #: ../src/guestfs-actions.pod:2948
25647 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
25648 " const char *root);\n"
25653 #: ../src/guestfs-actions.pod:2963
25654 msgid "(Added in 1.7.9)"
25658 #: ../src/guestfs-actions.pod:2965
25659 msgid "guestfs_inspect_get_icon"
25663 #: ../src/guestfs-actions.pod:2967
25667 " guestfs_inspect_get_icon (guestfs_h *g,\n"
25668 " const char *root,\n"
25669 " size_t *size_r,\n"
25675 #: ../src/guestfs-actions.pod:2978
25678 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
25679 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
25684 #: ../src/guestfs-actions.pod:3045 ../src/guestfs-actions.pod:3870
25685 #: ../src/guestfs-actions.pod:5114
25686 msgid "(Added in 1.11.12)"
25690 #: ../src/guestfs-actions.pod:3047
25691 msgid "guestfs_inspect_get_icon_va"
25695 #: ../src/guestfs-actions.pod:3049
25699 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
25700 " const char *root,\n"
25701 " size_t *size_r,\n"
25702 " va_list args);\n"
25707 #: ../src/guestfs-actions.pod:3055
25708 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
25712 #: ../src/guestfs-actions.pod:3059
25713 msgid "guestfs_inspect_get_icon_argv"
25717 #: ../src/guestfs-actions.pod:3061
25721 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
25722 " const char *root,\n"
25723 " size_t *size_r,\n"
25724 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
25729 #: ../src/guestfs-actions.pod:3067
25730 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
25734 #: ../src/guestfs-actions.pod:3071
25735 msgid "guestfs_inspect_get_major_version"
25739 #: ../src/guestfs-actions.pod:3073
25743 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
25744 " const char *root);\n"
25749 #: ../src/guestfs-actions.pod:3095
25750 msgid "guestfs_inspect_get_minor_version"
25754 #: ../src/guestfs-actions.pod:3097
25758 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
25759 " const char *root);\n"
25764 #: ../src/guestfs-actions.pod:3106
25766 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25767 "C<guestfs_inspect_get_major_version>."
25771 #: ../src/guestfs-actions.pod:3113
25772 msgid "guestfs_inspect_get_mountpoints"
25776 #: ../src/guestfs-actions.pod:3115
25780 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
25781 " const char *root);\n"
25786 #: ../src/guestfs-actions.pod:3136
25788 "For operating systems like Windows which still use drive letters, this call "
25789 "will only return an entry for the first drive \"mounted on\" C</>. For "
25790 "information about the mapping of drive letters to partitions, see "
25791 "C<guestfs_inspect_get_drive_mappings>."
25795 #: ../src/guestfs-actions.pod:3142
25797 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25798 "C<guestfs_inspect_get_filesystems>."
25802 #: ../src/guestfs-actions.pod:3153
25803 msgid "guestfs_inspect_get_package_format"
25807 #: ../src/guestfs-actions.pod:3155
25811 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
25812 " const char *root);\n"
25817 #: ../src/guestfs-actions.pod:3159
25819 "This function and C<guestfs_inspect_get_package_management> return the "
25820 "package format and package management tool used by the inspected operating "
25821 "system. For example for Fedora these functions would return C<rpm> (package "
25822 "format) and C<yum> (package management)."
25826 #: ../src/guestfs-actions.pod:3177 ../src/guestfs-actions.pod:3205
25827 msgid "(Added in 1.7.5)"
25831 #: ../src/guestfs-actions.pod:3179
25832 msgid "guestfs_inspect_get_package_management"
25836 #: ../src/guestfs-actions.pod:3181
25840 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
25841 " const char *root);\n"
25846 #: ../src/guestfs-actions.pod:3185
25848 "C<guestfs_inspect_get_package_format> and this function return the package "
25849 "format and package management tool used by the inspected operating system. "
25850 "For example for Fedora these functions would return C<rpm> (package format) "
25851 "and C<yum> (package management)."
25855 #: ../src/guestfs-actions.pod:3207
25856 msgid "guestfs_inspect_get_product_name"
25860 #: ../src/guestfs-actions.pod:3209
25864 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
25865 " const char *root);\n"
25870 #: ../src/guestfs-actions.pod:3228
25871 msgid "guestfs_inspect_get_product_variant"
25875 #: ../src/guestfs-actions.pod:3230
25879 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
25880 " const char *root);\n"
25885 #: ../src/guestfs-actions.pod:3253
25887 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
25888 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
25892 #: ../src/guestfs-actions.pod:3260
25893 msgid "(Added in 1.9.13)"
25897 #: ../src/guestfs-actions.pod:3262
25898 msgid "guestfs_inspect_get_roots"
25902 #: ../src/guestfs-actions.pod:3264
25906 " guestfs_inspect_get_roots (guestfs_h *g);\n"
25911 #: ../src/guestfs-actions.pod:3267
25913 "This function is a convenient way to get the list of root devices, as "
25914 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
25915 "the whole inspection process."
25919 #: ../src/guestfs-actions.pod:3271
25921 "This returns an empty list if either no root devices were found or the "
25922 "caller has not called C<guestfs_inspect_os>."
25926 #: ../src/guestfs-actions.pod:3280
25927 msgid "(Added in 1.7.3)"
25931 #: ../src/guestfs-actions.pod:3282
25932 msgid "guestfs_inspect_get_type"
25936 #: ../src/guestfs-actions.pod:3284
25940 " guestfs_inspect_get_type (guestfs_h *g,\n"
25941 " const char *root);\n"
25946 #: ../src/guestfs-actions.pod:3321
25947 msgid "guestfs_inspect_get_windows_current_control_set"
25951 #: ../src/guestfs-actions.pod:3323
25955 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
25956 " const char *root);\n"
25961 #: ../src/guestfs-actions.pod:3341
25962 msgid "guestfs_inspect_get_windows_systemroot"
25966 #: ../src/guestfs-actions.pod:3343
25970 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
25971 " const char *root);\n"
25976 #: ../src/guestfs-actions.pod:3359
25977 msgid "(Added in 1.5.25)"
25981 #: ../src/guestfs-actions.pod:3361
25982 msgid "guestfs_inspect_is_live"
25986 #: ../src/guestfs-actions.pod:3363
25990 " guestfs_inspect_is_live (guestfs_h *g,\n"
25991 " const char *root);\n"
25996 #: ../src/guestfs-actions.pod:3367
25998 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
25999 "disk), then this returns true if a live image was detected on the disk."
26003 #: ../src/guestfs-actions.pod:3377
26004 msgid "guestfs_inspect_is_multipart"
26008 #: ../src/guestfs-actions.pod:3379
26012 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
26013 " const char *root);\n"
26018 #: ../src/guestfs-actions.pod:3383
26020 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
26021 "disk), then this returns true if the disk is part of a set."
26025 #: ../src/guestfs-actions.pod:3393
26026 msgid "guestfs_inspect_is_netinst"
26030 #: ../src/guestfs-actions.pod:3395
26034 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
26035 " const char *root);\n"
26040 #: ../src/guestfs-actions.pod:3399
26042 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
26043 "disk), then this returns true if the disk is a network installer, ie. not a "
26044 "self-contained install CD but one which is likely to require network access "
26045 "to complete the install."
26049 #: ../src/guestfs-actions.pod:3411
26050 msgid "guestfs_inspect_list_applications"
26054 #: ../src/guestfs-actions.pod:3413
26057 " struct guestfs_application_list *\n"
26058 " guestfs_inspect_list_applications (guestfs_h *g,\n"
26059 " const char *root);\n"
26064 #: ../src/guestfs-actions.pod:3419
26066 "I<Note:> This call works differently from other parts of the inspection "
26067 "API. You have to call C<guestfs_inspect_os>, then "
26068 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
26069 "this. Listing applications is a significantly more difficult operation "
26070 "which requires access to the full filesystem. Also note that unlike the "
26071 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
26072 "the libguestfs handle, this call actually reads parts of the mounted "
26073 "filesystems during the call."
26077 #: ../src/guestfs-actions.pod:3509
26079 "This function returns a C<struct guestfs_application_list *>, or NULL if "
26080 "there was an error. I<The caller must call C<guestfs_free_application_list> "
26085 #: ../src/guestfs-actions.pod:3513
26086 msgid "(Added in 1.7.8)"
26090 #: ../src/guestfs-actions.pod:3515
26091 msgid "guestfs_inspect_os"
26095 #: ../src/guestfs-actions.pod:3517
26099 " guestfs_inspect_os (guestfs_h *g);\n"
26104 #: ../src/guestfs-actions.pod:3533
26106 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
26107 "functions in order to query further information about each operating system, "
26108 "such as the name and version."
26112 #: ../src/guestfs-actions.pod:3538
26114 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
26115 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
26116 "the contents. This should be called with no disks currently mounted. The "
26117 "function may also use Augeas, so any existing Augeas handle will be closed."
26121 #: ../src/guestfs-actions.pod:3550 ../src/guestfs-actions.pod:3881
26122 #: ../src/guestfs-actions.pod:3963
26123 msgid "See also C<guestfs_list_filesystems>."
26127 #: ../src/guestfs-actions.pod:3558
26128 msgid "guestfs_is_blockdev"
26132 #: ../src/guestfs-actions.pod:3560
26136 " guestfs_is_blockdev (guestfs_h *g,\n"
26137 " const char *path);\n"
26142 #: ../src/guestfs-actions.pod:3567 ../src/guestfs-actions.pod:3596
26143 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:3641
26144 #: ../src/guestfs-actions.pod:3657 ../src/guestfs-actions.pod:3713
26145 #: ../src/guestfs-actions.pod:3728
26146 msgid "See also C<guestfs_stat>."
26150 #: ../src/guestfs-actions.pod:3571 ../src/guestfs-actions.pod:3600
26151 #: ../src/guestfs-actions.pod:3645 ../src/guestfs-actions.pod:3717
26152 #: ../src/guestfs-actions.pod:3732
26153 msgid "(Added in 1.5.10)"
26157 #: ../src/guestfs-actions.pod:3573
26158 msgid "guestfs_is_busy"
26162 #: ../src/guestfs-actions.pod:3575
26166 " guestfs_is_busy (guestfs_h *g);\n"
26171 #: ../src/guestfs-actions.pod:3587
26172 msgid "guestfs_is_chardev"
26176 #: ../src/guestfs-actions.pod:3589
26180 " guestfs_is_chardev (guestfs_h *g,\n"
26181 " const char *path);\n"
26186 #: ../src/guestfs-actions.pod:3602
26187 msgid "guestfs_is_config"
26191 #: ../src/guestfs-actions.pod:3604
26195 " guestfs_is_config (guestfs_h *g);\n"
26200 #: ../src/guestfs-actions.pod:3616
26201 msgid "guestfs_is_dir"
26205 #: ../src/guestfs-actions.pod:3618
26209 " guestfs_is_dir (guestfs_h *g,\n"
26210 " const char *path);\n"
26215 #: ../src/guestfs-actions.pod:3632
26216 msgid "guestfs_is_fifo"
26220 #: ../src/guestfs-actions.pod:3634
26224 " guestfs_is_fifo (guestfs_h *g,\n"
26225 " const char *path);\n"
26230 #: ../src/guestfs-actions.pod:3647
26231 msgid "guestfs_is_file"
26235 #: ../src/guestfs-actions.pod:3649
26239 " guestfs_is_file (guestfs_h *g,\n"
26240 " const char *path);\n"
26245 #: ../src/guestfs-actions.pod:3663
26246 msgid "guestfs_is_launching"
26250 #: ../src/guestfs-actions.pod:3665
26254 " guestfs_is_launching (guestfs_h *g);\n"
26259 #: ../src/guestfs-actions.pod:3677
26260 msgid "guestfs_is_lv"
26264 #: ../src/guestfs-actions.pod:3679
26268 " guestfs_is_lv (guestfs_h *g,\n"
26269 " const char *device);\n"
26274 #: ../src/guestfs-actions.pod:3690
26275 msgid "guestfs_is_ready"
26279 #: ../src/guestfs-actions.pod:3692
26283 " guestfs_is_ready (guestfs_h *g);\n"
26288 #: ../src/guestfs-actions.pod:3704
26289 msgid "guestfs_is_socket"
26293 #: ../src/guestfs-actions.pod:3706
26297 " guestfs_is_socket (guestfs_h *g,\n"
26298 " const char *path);\n"
26303 #: ../src/guestfs-actions.pod:3719
26304 msgid "guestfs_is_symlink"
26308 #: ../src/guestfs-actions.pod:3721
26312 " guestfs_is_symlink (guestfs_h *g,\n"
26313 " const char *path);\n"
26318 #: ../src/guestfs-actions.pod:3734
26319 msgid "guestfs_is_zero"
26323 #: ../src/guestfs-actions.pod:3736
26327 " guestfs_is_zero (guestfs_h *g,\n"
26328 " const char *path);\n"
26333 #: ../src/guestfs-actions.pod:3745 ../src/guestfs-actions.pod:3759
26334 msgid "(Added in 1.11.8)"
26338 #: ../src/guestfs-actions.pod:3747
26339 msgid "guestfs_is_zero_device"
26343 #: ../src/guestfs-actions.pod:3749
26347 " guestfs_is_zero_device (guestfs_h *g,\n"
26348 " const char *device);\n"
26353 #: ../src/guestfs-actions.pod:3761
26354 msgid "guestfs_kill_subprocess"
26358 #: ../src/guestfs-actions.pod:3763
26362 " guestfs_kill_subprocess (guestfs_h *g);\n"
26367 #: ../src/guestfs-actions.pod:3772
26368 msgid "guestfs_launch"
26372 #: ../src/guestfs-actions.pod:3774
26376 " guestfs_launch (guestfs_h *g);\n"
26381 #: ../src/guestfs-actions.pod:3792
26382 msgid "guestfs_lchown"
26386 #: ../src/guestfs-actions.pod:3794
26390 " guestfs_lchown (guestfs_h *g,\n"
26393 " const char *path);\n"
26398 #: ../src/guestfs-actions.pod:3800
26400 "Change the file owner to C<owner> and group to C<group>. This is like "
26401 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
26402 "changed, not the target."
26406 #: ../src/guestfs-actions.pod:3812
26407 msgid "guestfs_lgetxattr"
26411 #: ../src/guestfs-actions.pod:3814
26415 " guestfs_lgetxattr (guestfs_h *g,\n"
26416 " const char *path,\n"
26417 " const char *name,\n"
26418 " size_t *size_r);\n"
26423 #: ../src/guestfs-actions.pod:3834
26424 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
26428 #: ../src/guestfs-actions.pod:3842
26429 msgid "guestfs_lgetxattrs"
26433 #: ../src/guestfs-actions.pod:3844
26436 " struct guestfs_xattr_list *\n"
26437 " guestfs_lgetxattrs (guestfs_h *g,\n"
26438 " const char *path);\n"
26443 #: ../src/guestfs-actions.pod:3848
26445 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
26446 "then it returns the extended attributes of the link itself."
26450 #: ../src/guestfs-actions.pod:3858
26451 msgid "guestfs_list_9p"
26455 #: ../src/guestfs-actions.pod:3860
26459 " guestfs_list_9p (guestfs_h *g);\n"
26464 #: ../src/guestfs-actions.pod:3872
26465 msgid "guestfs_list_devices"
26469 #: ../src/guestfs-actions.pod:3874
26473 " guestfs_list_devices (guestfs_h *g);\n"
26478 #: ../src/guestfs-actions.pod:3889
26479 msgid "guestfs_list_dm_devices"
26483 #: ../src/guestfs-actions.pod:3891
26487 " guestfs_list_dm_devices (guestfs_h *g);\n"
26492 #: ../src/guestfs-actions.pod:3896
26494 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
26495 "previous call to C<guestfs_luks_open>."
26499 #: ../src/guestfs-actions.pod:3899
26501 "Device mapper devices which correspond to logical volumes are I<not> "
26502 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
26507 #: ../src/guestfs-actions.pod:3907 ../src/guestfs-actions.pod:5353
26508 msgid "(Added in 1.11.15)"
26512 #: ../src/guestfs-actions.pod:3909
26513 msgid "guestfs_list_filesystems"
26517 #: ../src/guestfs-actions.pod:3911
26521 " guestfs_list_filesystems (guestfs_h *g);\n"
26526 #: ../src/guestfs-actions.pod:3931
26528 "This command runs other libguestfs commands, which might include "
26529 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
26530 "soon after launch and only when nothing is mounted."
26534 #: ../src/guestfs-actions.pod:3935
26536 "Not all of the filesystems returned will be mountable. In particular, swap "
26537 "partitions are returned in the list. Also this command does not check that "
26538 "each filesystem found is valid and mountable, and some filesystems might be "
26539 "mountable but require special options. Filesystems may not all belong to a "
26540 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
26544 #: ../src/guestfs-actions.pod:3949 ../src/guestfs-actions.pod:5714
26545 msgid "(Added in 1.5.15)"
26549 #: ../src/guestfs-actions.pod:3951
26550 msgid "guestfs_list_partitions"
26554 #: ../src/guestfs-actions.pod:3953
26558 " guestfs_list_partitions (guestfs_h *g);\n"
26563 #: ../src/guestfs-actions.pod:3960
26565 "This does not return logical volumes. For that you will need to call "
26570 #: ../src/guestfs-actions.pod:3971
26575 #: ../src/guestfs-actions.pod:3973
26579 " guestfs_ll (guestfs_h *g,\n"
26580 " const char *directory);\n"
26585 #: ../src/guestfs-actions.pod:3988
26590 #: ../src/guestfs-actions.pod:3990
26594 " guestfs_ln (guestfs_h *g,\n"
26595 " const char *target,\n"
26596 " const char *linkname);\n"
26601 #: ../src/guestfs-actions.pod:4001
26602 msgid "guestfs_ln_f"
26606 #: ../src/guestfs-actions.pod:4003
26610 " guestfs_ln_f (guestfs_h *g,\n"
26611 " const char *target,\n"
26612 " const char *linkname);\n"
26617 #: ../src/guestfs-actions.pod:4015
26618 msgid "guestfs_ln_s"
26622 #: ../src/guestfs-actions.pod:4017
26626 " guestfs_ln_s (guestfs_h *g,\n"
26627 " const char *target,\n"
26628 " const char *linkname);\n"
26633 #: ../src/guestfs-actions.pod:4028
26634 msgid "guestfs_ln_sf"
26638 #: ../src/guestfs-actions.pod:4030
26642 " guestfs_ln_sf (guestfs_h *g,\n"
26643 " const char *target,\n"
26644 " const char *linkname);\n"
26649 #: ../src/guestfs-actions.pod:4042
26650 msgid "guestfs_lremovexattr"
26654 #: ../src/guestfs-actions.pod:4044
26658 " guestfs_lremovexattr (guestfs_h *g,\n"
26659 " const char *xattr,\n"
26660 " const char *path);\n"
26665 #: ../src/guestfs-actions.pod:4049
26667 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
26668 "link, then it removes an extended attribute of the link itself."
26672 #: ../src/guestfs-actions.pod:4057
26677 #: ../src/guestfs-actions.pod:4059
26681 " guestfs_ls (guestfs_h *g,\n"
26682 " const char *directory);\n"
26687 #: ../src/guestfs-actions.pod:4067
26689 "This command is mostly useful for interactive sessions. Programs should "
26690 "probably use C<guestfs_readdir> instead."
26694 #: ../src/guestfs-actions.pod:4076
26695 msgid "guestfs_lsetxattr"
26699 #: ../src/guestfs-actions.pod:4078
26703 " guestfs_lsetxattr (guestfs_h *g,\n"
26704 " const char *xattr,\n"
26705 " const char *val,\n"
26707 " const char *path);\n"
26712 #: ../src/guestfs-actions.pod:4085
26714 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
26715 "then it sets an extended attribute of the link itself."
26719 #: ../src/guestfs-actions.pod:4093
26720 msgid "guestfs_lstat"
26724 #: ../src/guestfs-actions.pod:4095
26727 " struct guestfs_stat *\n"
26728 " guestfs_lstat (guestfs_h *g,\n"
26729 " const char *path);\n"
26734 #: ../src/guestfs-actions.pod:4101
26736 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
26737 "link, then the link is stat-ed, not the file it refers to."
26741 #: ../src/guestfs-actions.pod:4107 ../src/guestfs-actions.pod:6886
26743 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
26744 "error. I<The caller must call C<guestfs_free_stat> after use>."
26748 #: ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:6890
26749 #: ../src/guestfs-actions.pod:6908 ../src/guestfs-actions.pod:7289
26750 msgid "(Added in 0.9.2)"
26754 #: ../src/guestfs-actions.pod:4113
26755 msgid "guestfs_lstatlist"
26759 #: ../src/guestfs-actions.pod:4115
26762 " struct guestfs_stat_list *\n"
26763 " guestfs_lstatlist (guestfs_h *g,\n"
26764 " const char *path,\n"
26765 " char *const *names);\n"
26770 #: ../src/guestfs-actions.pod:4120
26772 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
26773 "files, where all files are in the directory C<path>. C<names> is the list "
26774 "of files from this directory."
26778 #: ../src/guestfs-actions.pod:4129
26780 "This call is intended for programs that want to efficiently list a directory "
26781 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
26782 "for a similarly efficient call for getting extended attributes. Very long "
26783 "directory listings might cause the protocol message size to be exceeded, "
26784 "causing this call to fail. The caller must split up such requests into "
26785 "smaller groups of names."
26789 #: ../src/guestfs-actions.pod:4137
26791 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
26792 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
26796 #: ../src/guestfs-actions.pod:4143
26797 msgid "guestfs_luks_add_key"
26801 #: ../src/guestfs-actions.pod:4145
26805 " guestfs_luks_add_key (guestfs_h *g,\n"
26806 " const char *device,\n"
26807 " const char *key,\n"
26808 " const char *newkey,\n"
26814 #: ../src/guestfs-actions.pod:4157
26816 "Note that if C<keyslot> already contains a key, then this command will "
26817 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
26821 #: ../src/guestfs-actions.pod:4163 ../src/guestfs-actions.pod:4203
26822 #: ../src/guestfs-actions.pod:4226 ../src/guestfs-actions.pod:4246
26823 #: ../src/guestfs-actions.pod:4281 ../src/guestfs-actions.pod:4300
26825 "This function takes a key or passphrase parameter which could contain "
26826 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
26831 #: ../src/guestfs-actions.pod:4167 ../src/guestfs-actions.pod:4207
26832 #: ../src/guestfs-actions.pod:4230 ../src/guestfs-actions.pod:4250
26833 msgid "(Added in 1.5.2)"
26837 #: ../src/guestfs-actions.pod:4169
26838 msgid "guestfs_luks_close"
26842 #: ../src/guestfs-actions.pod:4171
26846 " guestfs_luks_close (guestfs_h *g,\n"
26847 " const char *device);\n"
26852 #: ../src/guestfs-actions.pod:4175
26854 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
26855 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
26856 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
26857 "underlying block device."
26861 #: ../src/guestfs-actions.pod:4183 ../src/guestfs-actions.pod:4285
26862 #: ../src/guestfs-actions.pod:4304 ../src/guestfs-actions.pod:4354
26863 #: ../src/guestfs-actions.pod:4402
26864 msgid "(Added in 1.5.1)"
26868 #: ../src/guestfs-actions.pod:4185
26869 msgid "guestfs_luks_format"
26873 #: ../src/guestfs-actions.pod:4187
26877 " guestfs_luks_format (guestfs_h *g,\n"
26878 " const char *device,\n"
26879 " const char *key,\n"
26885 #: ../src/guestfs-actions.pod:4209
26886 msgid "guestfs_luks_format_cipher"
26890 #: ../src/guestfs-actions.pod:4211
26894 " guestfs_luks_format_cipher (guestfs_h *g,\n"
26895 " const char *device,\n"
26896 " const char *key,\n"
26898 " const char *cipher);\n"
26903 #: ../src/guestfs-actions.pod:4218
26905 "This command is the same as C<guestfs_luks_format> but it also allows you to "
26906 "set the C<cipher> used."
26910 #: ../src/guestfs-actions.pod:4232
26911 msgid "guestfs_luks_kill_slot"
26915 #: ../src/guestfs-actions.pod:4234
26919 " guestfs_luks_kill_slot (guestfs_h *g,\n"
26920 " const char *device,\n"
26921 " const char *key,\n"
26927 #: ../src/guestfs-actions.pod:4252
26928 msgid "guestfs_luks_open"
26932 #: ../src/guestfs-actions.pod:4254
26936 " guestfs_luks_open (guestfs_h *g,\n"
26937 " const char *device,\n"
26938 " const char *key,\n"
26939 " const char *mapname);\n"
26944 #: ../src/guestfs-actions.pod:4272
26946 "If this block device contains LVM volume groups, then calling "
26947 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
26952 #: ../src/guestfs-actions.pod:4276
26953 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
26957 #: ../src/guestfs-actions.pod:4287
26958 msgid "guestfs_luks_open_ro"
26962 #: ../src/guestfs-actions.pod:4289
26966 " guestfs_luks_open_ro (guestfs_h *g,\n"
26967 " const char *device,\n"
26968 " const char *key,\n"
26969 " const char *mapname);\n"
26974 #: ../src/guestfs-actions.pod:4295
26976 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
26981 #: ../src/guestfs-actions.pod:4306
26982 msgid "guestfs_lvcreate"
26986 #: ../src/guestfs-actions.pod:4308
26990 " guestfs_lvcreate (guestfs_h *g,\n"
26991 " const char *logvol,\n"
26992 " const char *volgroup,\n"
26998 #: ../src/guestfs-actions.pod:4321
26999 msgid "guestfs_lvm_canonical_lv_name"
27003 #: ../src/guestfs-actions.pod:4323
27007 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
27008 " const char *lvname);\n"
27013 #: ../src/guestfs-actions.pod:4334
27014 msgid "See also C<guestfs_is_lv>."
27018 #: ../src/guestfs-actions.pod:4339
27019 msgid "(Added in 1.5.24)"
27023 #: ../src/guestfs-actions.pod:4341
27024 msgid "guestfs_lvm_clear_filter"
27028 #: ../src/guestfs-actions.pod:4343
27032 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
27037 #: ../src/guestfs-actions.pod:4346
27039 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
27040 "see every block device."
27044 #: ../src/guestfs-actions.pod:4356
27045 msgid "guestfs_lvm_remove_all"
27049 #: ../src/guestfs-actions.pod:4358
27053 " guestfs_lvm_remove_all (guestfs_h *g);\n"
27058 #: ../src/guestfs-actions.pod:4371
27059 msgid "guestfs_lvm_set_filter"
27063 #: ../src/guestfs-actions.pod:4373
27067 " guestfs_lvm_set_filter (guestfs_h *g,\n"
27068 " char *const *devices);\n"
27073 #: ../src/guestfs-actions.pod:4404
27074 msgid "guestfs_lvremove"
27078 #: ../src/guestfs-actions.pod:4406
27082 " guestfs_lvremove (guestfs_h *g,\n"
27083 " const char *device);\n"
27088 #: ../src/guestfs-actions.pod:4418 ../src/guestfs-actions.pod:5811
27089 #: ../src/guestfs-actions.pod:7659
27090 msgid "(Added in 1.0.13)"
27094 #: ../src/guestfs-actions.pod:4420
27095 msgid "guestfs_lvrename"
27099 #: ../src/guestfs-actions.pod:4422
27103 " guestfs_lvrename (guestfs_h *g,\n"
27104 " const char *logvol,\n"
27105 " const char *newlogvol);\n"
27110 #: ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:7672
27111 msgid "(Added in 1.0.83)"
27115 #: ../src/guestfs-actions.pod:4433
27116 msgid "guestfs_lvresize"
27120 #: ../src/guestfs-actions.pod:4435
27124 " guestfs_lvresize (guestfs_h *g,\n"
27125 " const char *device,\n"
27131 #: ../src/guestfs-actions.pod:4448
27132 msgid "guestfs_lvresize_free"
27136 #: ../src/guestfs-actions.pod:4450
27140 " guestfs_lvresize_free (guestfs_h *g,\n"
27141 " const char *lv,\n"
27147 #: ../src/guestfs-actions.pod:4463
27148 msgid "(Added in 1.3.3)"
27152 #: ../src/guestfs-actions.pod:4465
27153 msgid "guestfs_lvs"
27157 #: ../src/guestfs-actions.pod:4467
27161 " guestfs_lvs (guestfs_h *g);\n"
27166 #: ../src/guestfs-actions.pod:4476
27167 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
27171 #: ../src/guestfs-actions.pod:4484
27172 msgid "guestfs_lvs_full"
27176 #: ../src/guestfs-actions.pod:4486
27179 " struct guestfs_lvm_lv_list *\n"
27180 " guestfs_lvs_full (guestfs_h *g);\n"
27185 #: ../src/guestfs-actions.pod:4492
27187 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
27188 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
27192 #: ../src/guestfs-actions.pod:4498
27193 msgid "guestfs_lvuuid"
27197 #: ../src/guestfs-actions.pod:4500
27201 " guestfs_lvuuid (guestfs_h *g,\n"
27202 " const char *device);\n"
27207 #: ../src/guestfs-actions.pod:4511
27208 msgid "guestfs_lxattrlist"
27212 #: ../src/guestfs-actions.pod:4513
27215 " struct guestfs_xattr_list *\n"
27216 " guestfs_lxattrlist (guestfs_h *g,\n"
27217 " const char *path,\n"
27218 " char *const *names);\n"
27223 #: ../src/guestfs-actions.pod:4532
27225 "This call is intended for programs that want to efficiently list a directory "
27226 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
27227 "a similarly efficient call for getting standard stats. Very long directory "
27228 "listings might cause the protocol message size to be exceeded, causing this "
27229 "call to fail. The caller must split up such requests into smaller groups of "
27234 #: ../src/guestfs-actions.pod:4546
27235 msgid "guestfs_mkdir"
27239 #: ../src/guestfs-actions.pod:4548
27243 " guestfs_mkdir (guestfs_h *g,\n"
27244 " const char *path);\n"
27249 #: ../src/guestfs-actions.pod:4558
27250 msgid "guestfs_mkdir_mode"
27254 #: ../src/guestfs-actions.pod:4560
27258 " guestfs_mkdir_mode (guestfs_h *g,\n"
27259 " const char *path,\n"
27265 #: ../src/guestfs-actions.pod:4572
27266 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
27270 #: ../src/guestfs-actions.pod:4578
27271 msgid "guestfs_mkdir_p"
27275 #: ../src/guestfs-actions.pod:4580
27279 " guestfs_mkdir_p (guestfs_h *g,\n"
27280 " const char *path);\n"
27285 #: ../src/guestfs-actions.pod:4591
27286 msgid "guestfs_mkdtemp"
27290 #: ../src/guestfs-actions.pod:4593
27294 " guestfs_mkdtemp (guestfs_h *g,\n"
27295 " const char *template);\n"
27300 #: ../src/guestfs-actions.pod:4621
27301 msgid "guestfs_mke2fs_J"
27305 #: ../src/guestfs-actions.pod:4623
27309 " guestfs_mke2fs_J (guestfs_h *g,\n"
27310 " const char *fstype,\n"
27311 " int blocksize,\n"
27312 " const char *device,\n"
27313 " const char *journal);\n"
27318 #: ../src/guestfs-actions.pod:4636
27319 msgid "See also C<guestfs_mke2journal>."
27323 #: ../src/guestfs-actions.pod:4640 ../src/guestfs-actions.pod:4658
27324 #: ../src/guestfs-actions.pod:4676 ../src/guestfs-actions.pod:4692
27325 #: ../src/guestfs-actions.pod:4706 ../src/guestfs-actions.pod:4720
27326 #: ../src/guestfs-actions.pod:4779 ../src/guestfs-actions.pod:5056
27327 msgid "(Added in 1.0.68)"
27331 #: ../src/guestfs-actions.pod:4642
27332 msgid "guestfs_mke2fs_JL"
27336 #: ../src/guestfs-actions.pod:4644
27340 " guestfs_mke2fs_JL (guestfs_h *g,\n"
27341 " const char *fstype,\n"
27342 " int blocksize,\n"
27343 " const char *device,\n"
27344 " const char *label);\n"
27349 #: ../src/guestfs-actions.pod:4654
27350 msgid "See also C<guestfs_mke2journal_L>."
27354 #: ../src/guestfs-actions.pod:4660
27355 msgid "guestfs_mke2fs_JU"
27359 #: ../src/guestfs-actions.pod:4662
27363 " guestfs_mke2fs_JU (guestfs_h *g,\n"
27364 " const char *fstype,\n"
27365 " int blocksize,\n"
27366 " const char *device,\n"
27367 " const char *uuid);\n"
27372 #: ../src/guestfs-actions.pod:4672
27373 msgid "See also C<guestfs_mke2journal_U>."
27377 #: ../src/guestfs-actions.pod:4678
27378 msgid "guestfs_mke2journal"
27382 #: ../src/guestfs-actions.pod:4680
27386 " guestfs_mke2journal (guestfs_h *g,\n"
27387 " int blocksize,\n"
27388 " const char *device);\n"
27393 #: ../src/guestfs-actions.pod:4694
27394 msgid "guestfs_mke2journal_L"
27398 #: ../src/guestfs-actions.pod:4696
27402 " guestfs_mke2journal_L (guestfs_h *g,\n"
27403 " int blocksize,\n"
27404 " const char *label,\n"
27405 " const char *device);\n"
27410 #: ../src/guestfs-actions.pod:4708
27411 msgid "guestfs_mke2journal_U"
27415 #: ../src/guestfs-actions.pod:4710
27419 " guestfs_mke2journal_U (guestfs_h *g,\n"
27420 " int blocksize,\n"
27421 " const char *uuid,\n"
27422 " const char *device);\n"
27427 #: ../src/guestfs-actions.pod:4722
27428 msgid "guestfs_mkfifo"
27432 #: ../src/guestfs-actions.pod:4724
27436 " guestfs_mkfifo (guestfs_h *g,\n"
27438 " const char *path);\n"
27443 #: ../src/guestfs-actions.pod:4729
27445 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
27446 "is just a convenient wrapper around C<guestfs_mknod>."
27450 #: ../src/guestfs-actions.pod:4739
27451 msgid "guestfs_mkfs"
27455 #: ../src/guestfs-actions.pod:4741
27459 " guestfs_mkfs (guestfs_h *g,\n"
27460 " const char *fstype,\n"
27461 " const char *device);\n"
27466 #: ../src/guestfs-actions.pod:4754
27467 msgid "guestfs_mkfs_b"
27471 #: ../src/guestfs-actions.pod:4756
27475 " guestfs_mkfs_b (guestfs_h *g,\n"
27476 " const char *fstype,\n"
27477 " int blocksize,\n"
27478 " const char *device);\n"
27483 #: ../src/guestfs-actions.pod:4762
27485 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
27490 #: ../src/guestfs-actions.pod:4769
27492 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
27493 "block size of the resulting filesystem. Supported block sizes depend on the "
27494 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
27498 #: ../src/guestfs-actions.pod:4781
27499 msgid "guestfs_mkfs_opts"
27503 #: ../src/guestfs-actions.pod:4783
27507 " guestfs_mkfs_opts (guestfs_h *g,\n"
27508 " const char *fstype,\n"
27509 " const char *device,\n"
27515 #: ../src/guestfs-actions.pod:4794
27518 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
27519 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
27520 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
27521 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
27526 #: ../src/guestfs-actions.pod:4842
27527 msgid "(Added in 1.7.19)"
27531 #: ../src/guestfs-actions.pod:4844
27532 msgid "guestfs_mkfs_opts_va"
27536 #: ../src/guestfs-actions.pod:4846
27540 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
27541 " const char *fstype,\n"
27542 " const char *device,\n"
27543 " va_list args);\n"
27548 #: ../src/guestfs-actions.pod:4852
27549 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
27553 #: ../src/guestfs-actions.pod:4856
27554 msgid "guestfs_mkfs_opts_argv"
27558 #: ../src/guestfs-actions.pod:4858
27562 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
27563 " const char *fstype,\n"
27564 " const char *device,\n"
27565 " const struct guestfs_mkfs_opts_argv *optargs);\n"
27570 #: ../src/guestfs-actions.pod:4864
27571 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
27575 #: ../src/guestfs-actions.pod:4868
27576 msgid "guestfs_mkmountpoint"
27580 #: ../src/guestfs-actions.pod:4870
27584 " guestfs_mkmountpoint (guestfs_h *g,\n"
27585 " const char *exemptpath);\n"
27590 #: ../src/guestfs-actions.pod:4874
27592 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
27593 "that can be used to create extra mountpoints before mounting the first "
27598 #: ../src/guestfs-actions.pod:4898
27600 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
27601 "may get unexpected errors if you try to mix these calls. It is safest to "
27602 "manually unmount filesystems and remove mountpoints after use."
27606 #: ../src/guestfs-actions.pod:4902
27608 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
27609 "first, so for this to work for manual mountpoints, you must ensure that the "
27610 "innermost mountpoints have the longest pathnames, as in the example code "
27615 #: ../src/guestfs-actions.pod:4909
27617 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
27618 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
27619 "can also trigger these issues."
27623 #: ../src/guestfs-actions.pod:4915 ../src/guestfs-actions.pod:5221
27624 #: ../src/guestfs-actions.pod:6231
27625 msgid "(Added in 1.0.62)"
27629 #: ../src/guestfs-actions.pod:4917
27630 msgid "guestfs_mknod"
27634 #: ../src/guestfs-actions.pod:4919
27638 " guestfs_mknod (guestfs_h *g,\n"
27642 " const char *path);\n"
27647 #: ../src/guestfs-actions.pod:4934
27649 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
27650 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
27651 "regular file). These constants are available in the standard Linux header "
27652 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
27653 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
27654 "the appropriate constant for you."
27658 #: ../src/guestfs-actions.pod:4948
27659 msgid "guestfs_mknod_b"
27663 #: ../src/guestfs-actions.pod:4950
27667 " guestfs_mknod_b (guestfs_h *g,\n"
27671 " const char *path);\n"
27676 #: ../src/guestfs-actions.pod:4957
27678 "This call creates a block device node called C<path> with mode C<mode> and "
27679 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27680 "wrapper around C<guestfs_mknod>."
27684 #: ../src/guestfs-actions.pod:4967
27685 msgid "guestfs_mknod_c"
27689 #: ../src/guestfs-actions.pod:4969
27693 " guestfs_mknod_c (guestfs_h *g,\n"
27697 " const char *path);\n"
27702 #: ../src/guestfs-actions.pod:4976
27704 "This call creates a char device node called C<path> with mode C<mode> and "
27705 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27706 "wrapper around C<guestfs_mknod>."
27710 #: ../src/guestfs-actions.pod:4986
27711 msgid "guestfs_mkswap"
27715 #: ../src/guestfs-actions.pod:4988
27719 " guestfs_mkswap (guestfs_h *g,\n"
27720 " const char *device);\n"
27725 #: ../src/guestfs-actions.pod:4998
27726 msgid "guestfs_mkswap_L"
27730 #: ../src/guestfs-actions.pod:5000
27734 " guestfs_mkswap_L (guestfs_h *g,\n"
27735 " const char *label,\n"
27736 " const char *device);\n"
27741 #: ../src/guestfs-actions.pod:5015
27742 msgid "guestfs_mkswap_U"
27746 #: ../src/guestfs-actions.pod:5017
27750 " guestfs_mkswap_U (guestfs_h *g,\n"
27751 " const char *uuid,\n"
27752 " const char *device);\n"
27757 #: ../src/guestfs-actions.pod:5028
27758 msgid "guestfs_mkswap_file"
27762 #: ../src/guestfs-actions.pod:5030
27766 " guestfs_mkswap_file (guestfs_h *g,\n"
27767 " const char *path);\n"
27772 #: ../src/guestfs-actions.pod:5036
27774 "This command just writes a swap file signature to an existing file. To "
27775 "create the file itself, use something like C<guestfs_fallocate>."
27779 #: ../src/guestfs-actions.pod:5043
27780 msgid "guestfs_modprobe"
27784 #: ../src/guestfs-actions.pod:5045
27788 " guestfs_modprobe (guestfs_h *g,\n"
27789 " const char *modulename);\n"
27794 #: ../src/guestfs-actions.pod:5058
27795 msgid "guestfs_mount"
27799 #: ../src/guestfs-actions.pod:5060
27803 " guestfs_mount (guestfs_h *g,\n"
27804 " const char *device,\n"
27805 " const char *mountpoint);\n"
27810 #: ../src/guestfs-actions.pod:5079
27812 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
27813 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
27814 "problems for users. If your program might need to work with older versions "
27815 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
27816 "for the first parameter if you don't want any options)."
27820 #: ../src/guestfs-actions.pod:5090
27821 msgid "guestfs_mount_9p"
27825 #: ../src/guestfs-actions.pod:5092
27829 " guestfs_mount_9p (guestfs_h *g,\n"
27830 " const char *mounttag,\n"
27831 " const char *mountpoint,\n"
27837 #: ../src/guestfs-actions.pod:5103
27840 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
27845 #: ../src/guestfs-actions.pod:5116
27846 msgid "guestfs_mount_9p_va"
27850 #: ../src/guestfs-actions.pod:5118
27854 " guestfs_mount_9p_va (guestfs_h *g,\n"
27855 " const char *mounttag,\n"
27856 " const char *mountpoint,\n"
27857 " va_list args);\n"
27862 #: ../src/guestfs-actions.pod:5124
27863 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
27867 #: ../src/guestfs-actions.pod:5128
27868 msgid "guestfs_mount_9p_argv"
27872 #: ../src/guestfs-actions.pod:5130
27876 " guestfs_mount_9p_argv (guestfs_h *g,\n"
27877 " const char *mounttag,\n"
27878 " const char *mountpoint,\n"
27879 " const struct guestfs_mount_9p_argv *optargs);\n"
27884 #: ../src/guestfs-actions.pod:5136
27885 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
27889 #: ../src/guestfs-actions.pod:5140
27890 msgid "guestfs_mount_loop"
27894 #: ../src/guestfs-actions.pod:5142
27898 " guestfs_mount_loop (guestfs_h *g,\n"
27899 " const char *file,\n"
27900 " const char *mountpoint);\n"
27905 #: ../src/guestfs-actions.pod:5155
27906 msgid "guestfs_mount_options"
27910 #: ../src/guestfs-actions.pod:5157
27914 " guestfs_mount_options (guestfs_h *g,\n"
27915 " const char *options,\n"
27916 " const char *device,\n"
27917 " const char *mountpoint);\n"
27922 #: ../src/guestfs-actions.pod:5163
27924 "This is the same as the C<guestfs_mount> command, but it allows you to set "
27925 "the mount options as for the L<mount(8)> I<-o> flag."
27929 #: ../src/guestfs-actions.pod:5173 ../src/guestfs-actions.pod:5187
27930 #: ../src/guestfs-actions.pod:5204
27931 msgid "(Added in 1.0.10)"
27935 #: ../src/guestfs-actions.pod:5175
27936 msgid "guestfs_mount_ro"
27940 #: ../src/guestfs-actions.pod:5177
27944 " guestfs_mount_ro (guestfs_h *g,\n"
27945 " const char *device,\n"
27946 " const char *mountpoint);\n"
27951 #: ../src/guestfs-actions.pod:5182
27953 "This is the same as the C<guestfs_mount> command, but it mounts the "
27954 "filesystem with the read-only (I<-o ro>) flag."
27958 #: ../src/guestfs-actions.pod:5189
27959 msgid "guestfs_mount_vfs"
27963 #: ../src/guestfs-actions.pod:5191
27967 " guestfs_mount_vfs (guestfs_h *g,\n"
27968 " const char *options,\n"
27969 " const char *vfstype,\n"
27970 " const char *device,\n"
27971 " const char *mountpoint);\n"
27976 #: ../src/guestfs-actions.pod:5198
27978 "This is the same as the C<guestfs_mount> command, but it allows you to set "
27979 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
27984 #: ../src/guestfs-actions.pod:5206
27985 msgid "guestfs_mountpoints"
27989 #: ../src/guestfs-actions.pod:5208
27993 " guestfs_mountpoints (guestfs_h *g);\n"
27998 #: ../src/guestfs-actions.pod:5211
28000 "This call is similar to C<guestfs_mounts>. That call returns a list of "
28001 "devices. This one returns a hash table (map) of device name to directory "
28002 "where the device is mounted."
28006 #: ../src/guestfs-actions.pod:5223
28007 msgid "guestfs_mounts"
28011 #: ../src/guestfs-actions.pod:5225
28015 " guestfs_mounts (guestfs_h *g);\n"
28020 #: ../src/guestfs-actions.pod:5233
28021 msgid "See also: C<guestfs_mountpoints>"
28025 #: ../src/guestfs-actions.pod:5241
28030 #: ../src/guestfs-actions.pod:5243
28034 " guestfs_mv (guestfs_h *g,\n"
28035 " const char *src,\n"
28036 " const char *dest);\n"
28041 #: ../src/guestfs-actions.pod:5255
28042 msgid "guestfs_ntfs_3g_probe"
28046 #: ../src/guestfs-actions.pod:5257
28050 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
28052 " const char *device);\n"
28057 #: ../src/guestfs-actions.pod:5276
28058 msgid "(Added in 1.0.43)"
28062 #: ../src/guestfs-actions.pod:5278
28063 msgid "guestfs_ntfsresize"
28067 #: ../src/guestfs-actions.pod:5280
28071 " guestfs_ntfsresize (guestfs_h *g,\n"
28072 " const char *device);\n"
28077 #: ../src/guestfs-actions.pod:5284 ../src/guestfs-actions.pod:5384
28079 "I<This function is deprecated.> In new code, use the L</"
28080 "guestfs_ntfsresize_opts> call instead."
28084 #: ../src/guestfs-actions.pod:5308
28085 msgid "guestfs_ntfsresize_opts"
28089 #: ../src/guestfs-actions.pod:5310
28093 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
28094 " const char *device,\n"
28100 #: ../src/guestfs-actions.pod:5320
28103 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
28104 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
28109 #: ../src/guestfs-actions.pod:5340
28111 "After the resize operation, the filesystem is always marked as requiring a "
28112 "consistency check (for safety). You have to boot into Windows to perform "
28113 "this check and clear this condition. If you I<don't> set the C<force> "
28114 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
28115 "times on a single filesystem without booting into Windows between each "
28120 #: ../src/guestfs-actions.pod:5355
28121 msgid "guestfs_ntfsresize_opts_va"
28125 #: ../src/guestfs-actions.pod:5357
28129 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
28130 " const char *device,\n"
28131 " va_list args);\n"
28136 #: ../src/guestfs-actions.pod:5362
28137 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
28141 #: ../src/guestfs-actions.pod:5366
28142 msgid "guestfs_ntfsresize_opts_argv"
28146 #: ../src/guestfs-actions.pod:5368
28150 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
28151 " const char *device,\n"
28152 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
28157 #: ../src/guestfs-actions.pod:5373
28158 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
28162 #: ../src/guestfs-actions.pod:5377
28163 msgid "guestfs_ntfsresize_size"
28167 #: ../src/guestfs-actions.pod:5379
28171 " guestfs_ntfsresize_size (guestfs_h *g,\n"
28172 " const char *device,\n"
28173 " int64_t size);\n"
28178 #: ../src/guestfs-actions.pod:5391
28180 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
28181 "to specify the new size (in bytes) explicitly."
28185 #: ../src/guestfs-actions.pod:5396 ../src/guestfs-actions.pod:5838
28186 #: ../src/guestfs-actions.pod:5911 ../src/guestfs-actions.pod:6179
28187 #: ../src/guestfs-actions.pod:7816
28188 msgid "(Added in 1.3.14)"
28192 #: ../src/guestfs-actions.pod:5398
28193 msgid "guestfs_part_add"
28197 #: ../src/guestfs-actions.pod:5400
28201 " guestfs_part_add (guestfs_h *g,\n"
28202 " const char *device,\n"
28203 " const char *prlogex,\n"
28204 " int64_t startsect,\n"
28205 " int64_t endsect);\n"
28210 #: ../src/guestfs-actions.pod:5407
28212 "This command adds a partition to C<device>. If there is no partition table "
28213 "on the device, call C<guestfs_part_init> first."
28217 #: ../src/guestfs-actions.pod:5419
28219 "Creating a partition which covers the whole disk is not so easy. Use "
28220 "C<guestfs_part_disk> to do that."
28224 #: ../src/guestfs-actions.pod:5424 ../src/guestfs-actions.pod:5462
28225 #: ../src/guestfs-actions.pod:5515 ../src/guestfs-actions.pod:5599
28226 #: ../src/guestfs-actions.pod:5637 ../src/guestfs-actions.pod:5656
28227 #: ../src/guestfs-actions.pod:5696
28228 msgid "(Added in 1.0.78)"
28232 #: ../src/guestfs-actions.pod:5426
28233 msgid "guestfs_part_del"
28237 #: ../src/guestfs-actions.pod:5428
28241 " guestfs_part_del (guestfs_h *g,\n"
28242 " const char *device,\n"
28248 #: ../src/guestfs-actions.pod:5443
28249 msgid "guestfs_part_disk"
28253 #: ../src/guestfs-actions.pod:5445
28257 " guestfs_part_disk (guestfs_h *g,\n"
28258 " const char *device,\n"
28259 " const char *parttype);\n"
28264 #: ../src/guestfs-actions.pod:5450
28266 "This command is simply a combination of C<guestfs_part_init> followed by "
28267 "C<guestfs_part_add> to create a single primary partition covering the whole "
28272 #: ../src/guestfs-actions.pod:5454
28274 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
28275 "possible values are described in C<guestfs_part_init>."
28279 #: ../src/guestfs-actions.pod:5464
28280 msgid "guestfs_part_get_bootable"
28284 #: ../src/guestfs-actions.pod:5466
28288 " guestfs_part_get_bootable (guestfs_h *g,\n"
28289 " const char *device,\n"
28295 #: ../src/guestfs-actions.pod:5474
28296 msgid "See also C<guestfs_part_set_bootable>."
28300 #: ../src/guestfs-actions.pod:5480
28301 msgid "guestfs_part_get_mbr_id"
28305 #: ../src/guestfs-actions.pod:5482
28309 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
28310 " const char *device,\n"
28316 #: ../src/guestfs-actions.pod:5490 ../src/guestfs-actions.pod:5672
28318 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
28319 "undefined results for other partition table types (see "
28320 "C<guestfs_part_get_parttype>)."
28324 #: ../src/guestfs-actions.pod:5498
28325 msgid "guestfs_part_get_parttype"
28329 #: ../src/guestfs-actions.pod:5500
28333 " guestfs_part_get_parttype (guestfs_h *g,\n"
28334 " const char *device);\n"
28339 #: ../src/guestfs-actions.pod:5507
28341 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
28342 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
28343 "possible, although unusual. See C<guestfs_part_init> for a full list."
28347 #: ../src/guestfs-actions.pod:5517
28348 msgid "guestfs_part_init"
28352 #: ../src/guestfs-actions.pod:5519
28356 " guestfs_part_init (guestfs_h *g,\n"
28357 " const char *device,\n"
28358 " const char *parttype);\n"
28363 #: ../src/guestfs-actions.pod:5528
28365 "Initially there are no partitions. Following this, you should call "
28366 "C<guestfs_part_add> for each partition required."
28370 #: ../src/guestfs-actions.pod:5601
28371 msgid "guestfs_part_list"
28375 #: ../src/guestfs-actions.pod:5603
28378 " struct guestfs_partition_list *\n"
28379 " guestfs_part_list (guestfs_h *g,\n"
28380 " const char *device);\n"
28385 #: ../src/guestfs-actions.pod:5620
28387 "Start of the partition I<in bytes>. To get sectors you have to divide by "
28388 "the device's sector size, see C<guestfs_blockdev_getss>."
28392 #: ../src/guestfs-actions.pod:5633
28394 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
28395 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
28400 #: ../src/guestfs-actions.pod:5639
28401 msgid "guestfs_part_set_bootable"
28405 #: ../src/guestfs-actions.pod:5641
28409 " guestfs_part_set_bootable (guestfs_h *g,\n"
28410 " const char *device,\n"
28412 " int bootable);\n"
28417 #: ../src/guestfs-actions.pod:5658
28418 msgid "guestfs_part_set_mbr_id"
28422 #: ../src/guestfs-actions.pod:5660
28426 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
28427 " const char *device,\n"
28434 #: ../src/guestfs-actions.pod:5680
28435 msgid "guestfs_part_set_name"
28439 #: ../src/guestfs-actions.pod:5682
28443 " guestfs_part_set_name (guestfs_h *g,\n"
28444 " const char *device,\n"
28446 " const char *name);\n"
28451 #: ../src/guestfs-actions.pod:5698
28452 msgid "guestfs_part_to_dev"
28456 #: ../src/guestfs-actions.pod:5700
28460 " guestfs_part_to_dev (guestfs_h *g,\n"
28461 " const char *partition);\n"
28466 #: ../src/guestfs-actions.pod:5708
28468 "The named partition must exist, for example as a string returned from "
28469 "C<guestfs_list_partitions>."
28473 #: ../src/guestfs-actions.pod:5716
28474 msgid "guestfs_ping_daemon"
28478 #: ../src/guestfs-actions.pod:5718
28482 " guestfs_ping_daemon (guestfs_h *g);\n"
28487 #: ../src/guestfs-actions.pod:5730
28488 msgid "guestfs_pread"
28492 #: ../src/guestfs-actions.pod:5732
28496 " guestfs_pread (guestfs_h *g,\n"
28497 " const char *path,\n"
28499 " int64_t offset,\n"
28500 " size_t *size_r);\n"
28505 #: ../src/guestfs-actions.pod:5745
28506 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
28510 #: ../src/guestfs-actions.pod:5756
28511 msgid "guestfs_pread_device"
28515 #: ../src/guestfs-actions.pod:5758
28519 " guestfs_pread_device (guestfs_h *g,\n"
28520 " const char *device,\n"
28522 " int64_t offset,\n"
28523 " size_t *size_r);\n"
28528 #: ../src/guestfs-actions.pod:5771
28529 msgid "See also C<guestfs_pread>."
28533 #: ../src/guestfs-actions.pod:5780
28534 msgid "(Added in 1.5.21)"
28538 #: ../src/guestfs-actions.pod:5782
28539 msgid "guestfs_pvcreate"
28543 #: ../src/guestfs-actions.pod:5784
28547 " guestfs_pvcreate (guestfs_h *g,\n"
28548 " const char *device);\n"
28553 #: ../src/guestfs-actions.pod:5796
28554 msgid "guestfs_pvremove"
28558 #: ../src/guestfs-actions.pod:5798
28562 " guestfs_pvremove (guestfs_h *g,\n"
28563 " const char *device);\n"
28568 #: ../src/guestfs-actions.pod:5813
28569 msgid "guestfs_pvresize"
28573 #: ../src/guestfs-actions.pod:5815
28577 " guestfs_pvresize (guestfs_h *g,\n"
28578 " const char *device);\n"
28583 #: ../src/guestfs-actions.pod:5826
28584 msgid "guestfs_pvresize_size"
28588 #: ../src/guestfs-actions.pod:5828
28592 " guestfs_pvresize_size (guestfs_h *g,\n"
28593 " const char *device,\n"
28594 " int64_t size);\n"
28599 #: ../src/guestfs-actions.pod:5833
28601 "This command is the same as C<guestfs_pvresize> except that it allows you to "
28602 "specify the new size (in bytes) explicitly."
28606 #: ../src/guestfs-actions.pod:5840
28607 msgid "guestfs_pvs"
28611 #: ../src/guestfs-actions.pod:5842
28615 " guestfs_pvs (guestfs_h *g);\n"
28620 #: ../src/guestfs-actions.pod:5851
28621 msgid "See also C<guestfs_pvs_full>."
28625 #: ../src/guestfs-actions.pod:5859
28626 msgid "guestfs_pvs_full"
28630 #: ../src/guestfs-actions.pod:5861
28633 " struct guestfs_lvm_pv_list *\n"
28634 " guestfs_pvs_full (guestfs_h *g);\n"
28639 #: ../src/guestfs-actions.pod:5867
28641 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
28642 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
28646 #: ../src/guestfs-actions.pod:5873
28647 msgid "guestfs_pvuuid"
28651 #: ../src/guestfs-actions.pod:5875
28655 " guestfs_pvuuid (guestfs_h *g,\n"
28656 " const char *device);\n"
28661 #: ../src/guestfs-actions.pod:5886
28662 msgid "guestfs_pwrite"
28666 #: ../src/guestfs-actions.pod:5888
28670 " guestfs_pwrite (guestfs_h *g,\n"
28671 " const char *path,\n"
28672 " const char *content,\n"
28673 " size_t content_size,\n"
28674 " int64_t offset);\n"
28679 #: ../src/guestfs-actions.pod:5904
28680 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
28684 #: ../src/guestfs-actions.pod:5913
28685 msgid "guestfs_pwrite_device"
28689 #: ../src/guestfs-actions.pod:5915
28693 " guestfs_pwrite_device (guestfs_h *g,\n"
28694 " const char *device,\n"
28695 " const char *content,\n"
28696 " size_t content_size,\n"
28697 " int64_t offset);\n"
28702 #: ../src/guestfs-actions.pod:5930
28703 msgid "See also C<guestfs_pwrite>."
28707 #: ../src/guestfs-actions.pod:5937
28708 msgid "(Added in 1.5.20)"
28712 #: ../src/guestfs-actions.pod:5939
28713 msgid "guestfs_read_file"
28717 #: ../src/guestfs-actions.pod:5941
28721 " guestfs_read_file (guestfs_h *g,\n"
28722 " const char *path,\n"
28723 " size_t *size_r);\n"
28728 #: ../src/guestfs-actions.pod:5949
28730 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
28731 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
28732 "function is limited in the total size of file that can be handled."
28736 #: ../src/guestfs-actions.pod:5961
28737 msgid "(Added in 1.0.63)"
28741 #: ../src/guestfs-actions.pod:5963
28742 msgid "guestfs_read_lines"
28746 #: ../src/guestfs-actions.pod:5965
28750 " guestfs_read_lines (guestfs_h *g,\n"
28751 " const char *path);\n"
28756 #: ../src/guestfs-actions.pod:5974
28758 "Note that this function cannot correctly handle binary files (specifically, "
28759 "files containing C<\\0> character which is treated as end of line). For "
28760 "those you need to use the C<guestfs_read_file> function which has a more "
28761 "complex interface."
28765 #: ../src/guestfs-actions.pod:5985
28766 msgid "guestfs_readdir"
28770 #: ../src/guestfs-actions.pod:5987
28773 " struct guestfs_dirent_list *\n"
28774 " guestfs_readdir (guestfs_h *g,\n"
28775 " const char *dir);\n"
28780 #: ../src/guestfs-actions.pod:6041
28782 "This function is primarily intended for use by programs. To get a simple "
28783 "list of names, use C<guestfs_ls>. To get a printable directory for human "
28784 "consumption, use C<guestfs_ll>."
28788 #: ../src/guestfs-actions.pod:6045
28790 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
28791 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
28795 #: ../src/guestfs-actions.pod:6051
28796 msgid "guestfs_readlink"
28800 #: ../src/guestfs-actions.pod:6053
28804 " guestfs_readlink (guestfs_h *g,\n"
28805 " const char *path);\n"
28810 #: ../src/guestfs-actions.pod:6064
28811 msgid "guestfs_readlinklist"
28815 #: ../src/guestfs-actions.pod:6066
28819 " guestfs_readlinklist (guestfs_h *g,\n"
28820 " const char *path,\n"
28821 " char *const *names);\n"
28826 #: ../src/guestfs-actions.pod:6099
28827 msgid "guestfs_realpath"
28831 #: ../src/guestfs-actions.pod:6101
28835 " guestfs_realpath (guestfs_h *g,\n"
28836 " const char *path);\n"
28841 #: ../src/guestfs-actions.pod:6113
28842 msgid "guestfs_removexattr"
28846 #: ../src/guestfs-actions.pod:6115
28850 " guestfs_removexattr (guestfs_h *g,\n"
28851 " const char *xattr,\n"
28852 " const char *path);\n"
28857 #: ../src/guestfs-actions.pod:6123
28858 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
28862 #: ../src/guestfs-actions.pod:6129
28863 msgid "guestfs_resize2fs"
28867 #: ../src/guestfs-actions.pod:6131
28871 " guestfs_resize2fs (guestfs_h *g,\n"
28872 " const char *device);\n"
28877 #: ../src/guestfs-actions.pod:6138
28879 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
28880 "C<device> before calling this command. For unknown reasons C<resize2fs> "
28881 "sometimes gives an error about this and sometimes not. In any case, it is "
28882 "always safe to call C<guestfs_e2fsck_f> before calling this function."
28886 #: ../src/guestfs-actions.pod:6148
28887 msgid "guestfs_resize2fs_M"
28891 #: ../src/guestfs-actions.pod:6150
28895 " guestfs_resize2fs_M (guestfs_h *g,\n"
28896 " const char *device);\n"
28901 #: ../src/guestfs-actions.pod:6154
28903 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
28904 "resized to its minimum size. This works like the I<-M> option to the "
28905 "C<resize2fs> command."
28909 #: ../src/guestfs-actions.pod:6158
28911 "To get the resulting size of the filesystem you should call "
28912 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
28913 "These two numbers, multiplied together, give the resulting size of the "
28914 "minimal filesystem in bytes."
28918 #: ../src/guestfs-actions.pod:6167
28919 msgid "guestfs_resize2fs_size"
28923 #: ../src/guestfs-actions.pod:6169
28927 " guestfs_resize2fs_size (guestfs_h *g,\n"
28928 " const char *device,\n"
28929 " int64_t size);\n"
28934 #: ../src/guestfs-actions.pod:6174
28936 "This command is the same as C<guestfs_resize2fs> except that it allows you "
28937 "to specify the new size (in bytes) explicitly."
28941 #: ../src/guestfs-actions.pod:6181
28946 #: ../src/guestfs-actions.pod:6183
28950 " guestfs_rm (guestfs_h *g,\n"
28951 " const char *path);\n"
28956 #: ../src/guestfs-actions.pod:6193
28957 msgid "guestfs_rm_rf"
28961 #: ../src/guestfs-actions.pod:6195
28965 " guestfs_rm_rf (guestfs_h *g,\n"
28966 " const char *path);\n"
28971 #: ../src/guestfs-actions.pod:6207
28972 msgid "guestfs_rmdir"
28976 #: ../src/guestfs-actions.pod:6209
28980 " guestfs_rmdir (guestfs_h *g,\n"
28981 " const char *path);\n"
28986 #: ../src/guestfs-actions.pod:6219
28987 msgid "guestfs_rmmountpoint"
28991 #: ../src/guestfs-actions.pod:6221
28995 " guestfs_rmmountpoint (guestfs_h *g,\n"
28996 " const char *exemptpath);\n"
29001 #: ../src/guestfs-actions.pod:6225
29003 "This calls removes a mountpoint that was previously created with "
29004 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
29008 #: ../src/guestfs-actions.pod:6233
29009 msgid "guestfs_scrub_device"
29013 #: ../src/guestfs-actions.pod:6235
29017 " guestfs_scrub_device (guestfs_h *g,\n"
29018 " const char *device);\n"
29023 #: ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6268
29024 #: ../src/guestfs-actions.pod:6287
29025 msgid "(Added in 1.0.52)"
29029 #: ../src/guestfs-actions.pod:6252
29030 msgid "guestfs_scrub_file"
29034 #: ../src/guestfs-actions.pod:6254
29038 " guestfs_scrub_file (guestfs_h *g,\n"
29039 " const char *file);\n"
29044 #: ../src/guestfs-actions.pod:6270
29045 msgid "guestfs_scrub_freespace"
29049 #: ../src/guestfs-actions.pod:6272
29053 " guestfs_scrub_freespace (guestfs_h *g,\n"
29054 " const char *dir);\n"
29059 #: ../src/guestfs-actions.pod:6276
29061 "This command creates the directory C<dir> and then fills it with files until "
29062 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
29063 "and deletes them. The intention is to scrub any free space on the partition "
29064 "containing C<dir>."
29068 #: ../src/guestfs-actions.pod:6289
29069 msgid "guestfs_set_append"
29073 #: ../src/guestfs-actions.pod:6291
29077 " guestfs_set_append (guestfs_h *g,\n"
29078 " const char *append);\n"
29083 #: ../src/guestfs-actions.pod:6308
29084 msgid "guestfs_set_attach_method"
29088 #: ../src/guestfs-actions.pod:6310
29092 " guestfs_set_attach_method (guestfs_h *g,\n"
29093 " const char *attachmethod);\n"
29098 #: ../src/guestfs-actions.pod:6338
29099 msgid "guestfs_set_autosync"
29103 #: ../src/guestfs-actions.pod:6340
29107 " guestfs_set_autosync (guestfs_h *g,\n"
29108 " int autosync);\n"
29113 #: ../src/guestfs-actions.pod:6356
29114 msgid "guestfs_set_direct"
29118 #: ../src/guestfs-actions.pod:6358
29122 " guestfs_set_direct (guestfs_h *g,\n"
29128 #: ../src/guestfs-actions.pod:6366
29130 "One consequence of this is that log messages aren't caught by the library "
29131 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
29136 #: ../src/guestfs-actions.pod:6379
29137 msgid "guestfs_set_e2label"
29141 #: ../src/guestfs-actions.pod:6381
29145 " guestfs_set_e2label (guestfs_h *g,\n"
29146 " const char *device,\n"
29147 " const char *label);\n"
29152 #: ../src/guestfs-actions.pod:6390
29154 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
29155 "the existing label on a filesystem."
29159 #: ../src/guestfs-actions.pod:6397
29160 msgid "guestfs_set_e2uuid"
29164 #: ../src/guestfs-actions.pod:6399
29168 " guestfs_set_e2uuid (guestfs_h *g,\n"
29169 " const char *device,\n"
29170 " const char *uuid);\n"
29175 #: ../src/guestfs-actions.pod:6409
29177 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
29178 "the existing UUID of a filesystem."
29182 #: ../src/guestfs-actions.pod:6416
29183 msgid "guestfs_set_memsize"
29187 #: ../src/guestfs-actions.pod:6418
29191 " guestfs_set_memsize (guestfs_h *g,\n"
29197 #: ../src/guestfs-actions.pod:6422
29199 "This sets the memory size in megabytes allocated to the qemu subprocess. "
29200 "This only has any effect if called before C<guestfs_launch>."
29204 #: ../src/guestfs-actions.pod:6437
29205 msgid "guestfs_set_network"
29209 #: ../src/guestfs-actions.pod:6439
29213 " guestfs_set_network (guestfs_h *g,\n"
29219 #: ../src/guestfs-actions.pod:6449
29221 "You must call this before calling C<guestfs_launch>, otherwise it has no "
29226 #: ../src/guestfs-actions.pod:6456
29227 msgid "guestfs_set_path"
29231 #: ../src/guestfs-actions.pod:6458
29235 " guestfs_set_path (guestfs_h *g,\n"
29236 " const char *searchpath);\n"
29241 #: ../src/guestfs-actions.pod:6473
29242 msgid "guestfs_set_pgroup"
29246 #: ../src/guestfs-actions.pod:6475
29250 " guestfs_set_pgroup (guestfs_h *g,\n"
29256 #: ../src/guestfs-actions.pod:6492
29257 msgid "guestfs_set_qemu"
29261 #: ../src/guestfs-actions.pod:6494
29265 " guestfs_set_qemu (guestfs_h *g,\n"
29266 " const char *qemu);\n"
29271 #: ../src/guestfs-actions.pod:6520
29272 msgid "guestfs_set_recovery_proc"
29276 #: ../src/guestfs-actions.pod:6522
29280 " guestfs_set_recovery_proc (guestfs_h *g,\n"
29281 " int recoveryproc);\n"
29286 #: ../src/guestfs-actions.pod:6526
29288 "If this is called with the parameter C<false> then C<guestfs_launch> does "
29289 "not create a recovery process. The purpose of the recovery process is to "
29290 "stop runaway qemu processes in the case where the main program aborts "
29295 #: ../src/guestfs-actions.pod:6531
29297 "This only has any effect if called before C<guestfs_launch>, and the default "
29302 #: ../src/guestfs-actions.pod:6544
29303 msgid "guestfs_set_selinux"
29307 #: ../src/guestfs-actions.pod:6546
29311 " guestfs_set_selinux (guestfs_h *g,\n"
29317 #: ../src/guestfs-actions.pod:6563
29318 msgid "guestfs_set_smp"
29322 #: ../src/guestfs-actions.pod:6565
29326 " guestfs_set_smp (guestfs_h *g,\n"
29332 #: ../src/guestfs-actions.pod:6573
29333 msgid "This function must be called before C<guestfs_launch>."
29337 #: ../src/guestfs-actions.pod:6577
29338 msgid "guestfs_set_trace"
29342 #: ../src/guestfs-actions.pod:6579
29346 " guestfs_set_trace (guestfs_h *g,\n"
29352 #: ../src/guestfs-actions.pod:6593
29354 "Trace messages are normally sent to C<stderr>, unless you register a "
29355 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
29359 #: ../src/guestfs-actions.pod:6601
29360 msgid "guestfs_set_verbose"
29364 #: ../src/guestfs-actions.pod:6603
29368 " guestfs_set_verbose (guestfs_h *g,\n"
29374 #: ../src/guestfs-actions.pod:6612
29376 "Verbose messages are normally sent to C<stderr>, unless you register a "
29377 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
29381 #: ../src/guestfs-actions.pod:6620
29382 msgid "guestfs_setcon"
29386 #: ../src/guestfs-actions.pod:6622
29390 " guestfs_setcon (guestfs_h *g,\n"
29391 " const char *context);\n"
29396 #: ../src/guestfs-actions.pod:6635
29397 msgid "guestfs_setxattr"
29401 #: ../src/guestfs-actions.pod:6637
29405 " guestfs_setxattr (guestfs_h *g,\n"
29406 " const char *xattr,\n"
29407 " const char *val,\n"
29409 " const char *path);\n"
29414 #: ../src/guestfs-actions.pod:6648
29415 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
29419 #: ../src/guestfs-actions.pod:6654
29420 msgid "guestfs_sfdisk"
29424 #: ../src/guestfs-actions.pod:6656
29428 " guestfs_sfdisk (guestfs_h *g,\n"
29429 " const char *device,\n"
29433 " char *const *lines);\n"
29438 #: ../src/guestfs-actions.pod:6664 ../src/guestfs-actions.pod:6708
29439 #: ../src/guestfs-actions.pod:6742
29441 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
29446 #: ../src/guestfs-actions.pod:6691
29448 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
29452 #: ../src/guestfs-actions.pod:6701
29453 msgid "guestfs_sfdiskM"
29457 #: ../src/guestfs-actions.pod:6703
29461 " guestfs_sfdiskM (guestfs_h *g,\n"
29462 " const char *device,\n"
29463 " char *const *lines);\n"
29468 #: ../src/guestfs-actions.pod:6715
29470 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
29471 "partition sizes are specified in megabytes only (rounded to the nearest "
29472 "cylinder) and you don't need to specify the cyls, heads and sectors "
29473 "parameters which were rarely if ever used anyway."
29477 #: ../src/guestfs-actions.pod:6721
29479 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
29480 "C<guestfs_part_disk>"
29484 #: ../src/guestfs-actions.pod:6731
29485 msgid "guestfs_sfdisk_N"
29489 #: ../src/guestfs-actions.pod:6733
29493 " guestfs_sfdisk_N (guestfs_h *g,\n"
29494 " const char *device,\n"
29499 " const char *line);\n"
29504 #: ../src/guestfs-actions.pod:6752
29506 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
29507 "for the cyls/heads/sectors parameters."
29511 #: ../src/guestfs-actions.pod:6755
29512 msgid "See also: C<guestfs_part_add>"
29516 #: ../src/guestfs-actions.pod:6764
29517 msgid "guestfs_sfdisk_disk_geometry"
29521 #: ../src/guestfs-actions.pod:6766
29525 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
29526 " const char *device);\n"
29531 #: ../src/guestfs-actions.pod:6770
29533 "This displays the disk geometry of C<device> read from the partition table. "
29534 "Especially in the case where the underlying block device has been resized, "
29535 "this can be different from the kernel's idea of the geometry (see "
29536 "C<guestfs_sfdisk_kernel_geometry>)."
29540 #: ../src/guestfs-actions.pod:6783
29541 msgid "guestfs_sfdisk_kernel_geometry"
29545 #: ../src/guestfs-actions.pod:6785
29549 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
29550 " const char *device);\n"
29555 #: ../src/guestfs-actions.pod:6799
29556 msgid "guestfs_sfdisk_l"
29560 #: ../src/guestfs-actions.pod:6801
29564 " guestfs_sfdisk_l (guestfs_h *g,\n"
29565 " const char *device);\n"
29570 #: ../src/guestfs-actions.pod:6805
29572 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
29577 #: ../src/guestfs-actions.pod:6816
29578 msgid "See also: C<guestfs_part_list>"
29582 #: ../src/guestfs-actions.pod:6823
29587 #: ../src/guestfs-actions.pod:6825
29591 " guestfs_sh (guestfs_h *g,\n"
29592 " const char *command);\n"
29597 #: ../src/guestfs-actions.pod:6832
29598 msgid "This is like C<guestfs_command>, but passes the command to:"
29602 #: ../src/guestfs-actions.pod:6840
29603 msgid "All the provisos about C<guestfs_command> apply to this call."
29607 #: ../src/guestfs-actions.pod:6847
29608 msgid "guestfs_sh_lines"
29612 #: ../src/guestfs-actions.pod:6849
29616 " guestfs_sh_lines (guestfs_h *g,\n"
29617 " const char *command);\n"
29622 #: ../src/guestfs-actions.pod:6853
29624 "This is the same as C<guestfs_sh>, but splits the result into a list of "
29629 #: ../src/guestfs-actions.pod:6856
29630 msgid "See also: C<guestfs_command_lines>"
29634 #: ../src/guestfs-actions.pod:6864
29635 msgid "guestfs_sleep"
29639 #: ../src/guestfs-actions.pod:6866
29643 " guestfs_sleep (guestfs_h *g,\n"
29649 #: ../src/guestfs-actions.pod:6874
29650 msgid "(Added in 1.0.41)"
29654 #: ../src/guestfs-actions.pod:6876 ../src/guestfs-structs.pod:109
29655 msgid "guestfs_stat"
29659 #: ../src/guestfs-actions.pod:6878
29662 " struct guestfs_stat *\n"
29663 " guestfs_stat (guestfs_h *g,\n"
29664 " const char *path);\n"
29669 #: ../src/guestfs-actions.pod:6892 ../src/guestfs-structs.pod:135
29670 msgid "guestfs_statvfs"
29674 #: ../src/guestfs-actions.pod:6894
29677 " struct guestfs_statvfs *\n"
29678 " guestfs_statvfs (guestfs_h *g,\n"
29679 " const char *path);\n"
29684 #: ../src/guestfs-actions.pod:6904
29686 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
29687 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
29691 #: ../src/guestfs-actions.pod:6910
29692 msgid "guestfs_strings"
29696 #: ../src/guestfs-actions.pod:6912
29700 " guestfs_strings (guestfs_h *g,\n"
29701 " const char *path);\n"
29706 #: ../src/guestfs-actions.pod:6928
29707 msgid "guestfs_strings_e"
29711 #: ../src/guestfs-actions.pod:6930
29715 " guestfs_strings_e (guestfs_h *g,\n"
29716 " const char *encoding,\n"
29717 " const char *path);\n"
29722 #: ../src/guestfs-actions.pod:6935
29724 "This is like the C<guestfs_strings> command, but allows you to specify the "
29725 "encoding of strings that are looked for in the source file C<path>."
29729 #: ../src/guestfs-actions.pod:6945
29731 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
29732 "ISO-8859-X (this is what C<guestfs_strings> uses)."
29736 #: ../src/guestfs-actions.pod:6983
29737 msgid "guestfs_swapoff_device"
29741 #: ../src/guestfs-actions.pod:6985
29745 " guestfs_swapoff_device (guestfs_h *g,\n"
29746 " const char *device);\n"
29751 #: ../src/guestfs-actions.pod:6989
29753 "This command disables the libguestfs appliance swap device or partition "
29754 "named C<device>. See C<guestfs_swapon_device>."
29758 #: ../src/guestfs-actions.pod:6997
29759 msgid "guestfs_swapoff_file"
29763 #: ../src/guestfs-actions.pod:6999
29767 " guestfs_swapoff_file (guestfs_h *g,\n"
29768 " const char *file);\n"
29773 #: ../src/guestfs-actions.pod:7009
29774 msgid "guestfs_swapoff_label"
29778 #: ../src/guestfs-actions.pod:7011
29782 " guestfs_swapoff_label (guestfs_h *g,\n"
29783 " const char *label);\n"
29788 #: ../src/guestfs-actions.pod:7022
29789 msgid "guestfs_swapoff_uuid"
29793 #: ../src/guestfs-actions.pod:7024
29797 " guestfs_swapoff_uuid (guestfs_h *g,\n"
29798 " const char *uuid);\n"
29803 #: ../src/guestfs-actions.pod:7035
29804 msgid "guestfs_swapon_device"
29808 #: ../src/guestfs-actions.pod:7037
29812 " guestfs_swapon_device (guestfs_h *g,\n"
29813 " const char *device);\n"
29818 #: ../src/guestfs-actions.pod:7041
29820 "This command enables the libguestfs appliance to use the swap device or "
29821 "partition named C<device>. The increased memory is made available for all "
29822 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
29826 #: ../src/guestfs-actions.pod:7057
29827 msgid "guestfs_swapon_file"
29831 #: ../src/guestfs-actions.pod:7059
29835 " guestfs_swapon_file (guestfs_h *g,\n"
29836 " const char *file);\n"
29841 #: ../src/guestfs-actions.pod:7063
29843 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
29848 #: ../src/guestfs-actions.pod:7070
29849 msgid "guestfs_swapon_label"
29853 #: ../src/guestfs-actions.pod:7072
29857 " guestfs_swapon_label (guestfs_h *g,\n"
29858 " const char *label);\n"
29863 #: ../src/guestfs-actions.pod:7076
29865 "This command enables swap to a labeled swap partition. See "
29866 "C<guestfs_swapon_device> for other notes."
29870 #: ../src/guestfs-actions.pod:7083
29871 msgid "guestfs_swapon_uuid"
29875 #: ../src/guestfs-actions.pod:7085
29879 " guestfs_swapon_uuid (guestfs_h *g,\n"
29880 " const char *uuid);\n"
29885 #: ../src/guestfs-actions.pod:7089
29887 "This command enables swap to a swap partition with the given UUID. See "
29888 "C<guestfs_swapon_device> for other notes."
29892 #: ../src/guestfs-actions.pod:7096
29893 msgid "guestfs_sync"
29897 #: ../src/guestfs-actions.pod:7098
29901 " guestfs_sync (guestfs_h *g);\n"
29906 #: ../src/guestfs-actions.pod:7111
29907 msgid "guestfs_tail"
29911 #: ../src/guestfs-actions.pod:7113
29915 " guestfs_tail (guestfs_h *g,\n"
29916 " const char *path);\n"
29921 #: ../src/guestfs-actions.pod:7129
29922 msgid "guestfs_tail_n"
29926 #: ../src/guestfs-actions.pod:7131
29930 " guestfs_tail_n (guestfs_h *g,\n"
29932 " const char *path);\n"
29937 #: ../src/guestfs-actions.pod:7153
29938 msgid "guestfs_tar_in"
29942 #: ../src/guestfs-actions.pod:7155
29946 " guestfs_tar_in (guestfs_h *g,\n"
29947 " const char *tarfile,\n"
29948 " const char *directory);\n"
29953 #: ../src/guestfs-actions.pod:7163
29955 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
29959 #: ../src/guestfs-actions.pod:7168 ../src/guestfs-actions.pod:7185
29960 #: ../src/guestfs-actions.pod:7201 ../src/guestfs-actions.pod:7217
29961 msgid "(Added in 1.0.3)"
29965 #: ../src/guestfs-actions.pod:7170
29966 msgid "guestfs_tar_out"
29970 #: ../src/guestfs-actions.pod:7172
29974 " guestfs_tar_out (guestfs_h *g,\n"
29975 " const char *directory,\n"
29976 " const char *tarfile);\n"
29981 #: ../src/guestfs-actions.pod:7180
29983 "To download a compressed tarball, use C<guestfs_tgz_out> or "
29984 "C<guestfs_txz_out>."
29988 #: ../src/guestfs-actions.pod:7187
29989 msgid "guestfs_tgz_in"
29993 #: ../src/guestfs-actions.pod:7189
29997 " guestfs_tgz_in (guestfs_h *g,\n"
29998 " const char *tarball,\n"
29999 " const char *directory);\n"
30004 #: ../src/guestfs-actions.pod:7197
30005 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
30009 #: ../src/guestfs-actions.pod:7203
30010 msgid "guestfs_tgz_out"
30014 #: ../src/guestfs-actions.pod:7205
30018 " guestfs_tgz_out (guestfs_h *g,\n"
30019 " const char *directory,\n"
30020 " const char *tarball);\n"
30025 #: ../src/guestfs-actions.pod:7213
30026 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
30030 #: ../src/guestfs-actions.pod:7219
30031 msgid "guestfs_touch"
30035 #: ../src/guestfs-actions.pod:7221
30039 " guestfs_touch (guestfs_h *g,\n"
30040 " const char *path);\n"
30045 #: ../src/guestfs-actions.pod:7236
30046 msgid "guestfs_truncate"
30050 #: ../src/guestfs-actions.pod:7238
30054 " guestfs_truncate (guestfs_h *g,\n"
30055 " const char *path);\n"
30060 #: ../src/guestfs-actions.pod:7249
30061 msgid "guestfs_truncate_size"
30065 #: ../src/guestfs-actions.pod:7251
30069 " guestfs_truncate_size (guestfs_h *g,\n"
30070 " const char *path,\n"
30071 " int64_t size);\n"
30076 #: ../src/guestfs-actions.pod:7259
30078 "If the current file size is less than C<size> then the file is extended to "
30079 "the required size with zero bytes. This creates a sparse file (ie. disk "
30080 "blocks are not allocated for the file until you write to it). To create a "
30081 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
30085 #: ../src/guestfs-actions.pod:7269
30086 msgid "guestfs_tune2fs_l"
30090 #: ../src/guestfs-actions.pod:7271
30094 " guestfs_tune2fs_l (guestfs_h *g,\n"
30095 " const char *device);\n"
30100 #: ../src/guestfs-actions.pod:7291
30101 msgid "guestfs_txz_in"
30105 #: ../src/guestfs-actions.pod:7293
30109 " guestfs_txz_in (guestfs_h *g,\n"
30110 " const char *tarball,\n"
30111 " const char *directory);\n"
30116 #: ../src/guestfs-actions.pod:7305
30117 msgid "guestfs_txz_out"
30121 #: ../src/guestfs-actions.pod:7307
30125 " guestfs_txz_out (guestfs_h *g,\n"
30126 " const char *directory,\n"
30127 " const char *tarball);\n"
30132 #: ../src/guestfs-actions.pod:7319
30133 msgid "guestfs_umask"
30137 #: ../src/guestfs-actions.pod:7321
30141 " guestfs_umask (guestfs_h *g,\n"
30147 #: ../src/guestfs-actions.pod:7337
30149 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
30150 "C<guestfs_mkdir>."
30154 #: ../src/guestfs-actions.pod:7346
30155 msgid "guestfs_umount"
30159 #: ../src/guestfs-actions.pod:7348
30163 " guestfs_umount (guestfs_h *g,\n"
30164 " const char *pathordevice);\n"
30169 #: ../src/guestfs-actions.pod:7360
30170 msgid "guestfs_umount_all"
30174 #: ../src/guestfs-actions.pod:7362
30178 " guestfs_umount_all (guestfs_h *g);\n"
30183 #: ../src/guestfs-actions.pod:7373
30184 msgid "guestfs_upload"
30188 #: ../src/guestfs-actions.pod:7375
30192 " guestfs_upload (guestfs_h *g,\n"
30193 " const char *filename,\n"
30194 " const char *remotefilename);\n"
30199 #: ../src/guestfs-actions.pod:7385
30200 msgid "See also C<guestfs_download>."
30204 #: ../src/guestfs-actions.pod:7396
30205 msgid "guestfs_upload_offset"
30209 #: ../src/guestfs-actions.pod:7398
30213 " guestfs_upload_offset (guestfs_h *g,\n"
30214 " const char *filename,\n"
30215 " const char *remotefilename,\n"
30216 " int64_t offset);\n"
30221 #: ../src/guestfs-actions.pod:7414
30223 "Note that there is no limit on the amount of data that can be uploaded with "
30224 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
30225 "full amount unless an error occurs."
30229 #: ../src/guestfs-actions.pod:7419
30230 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
30234 #: ../src/guestfs-actions.pod:7430
30235 msgid "guestfs_utimens"
30239 #: ../src/guestfs-actions.pod:7432
30243 " guestfs_utimens (guestfs_h *g,\n"
30244 " const char *path,\n"
30245 " int64_t atsecs,\n"
30246 " int64_t atnsecs,\n"
30247 " int64_t mtsecs,\n"
30248 " int64_t mtnsecs);\n"
30253 #: ../src/guestfs-actions.pod:7461 ../src/guestfs-structs.pod:175
30254 msgid "guestfs_version"
30258 #: ../src/guestfs-actions.pod:7463
30261 " struct guestfs_version *\n"
30262 " guestfs_version (guestfs_h *g);\n"
30267 #: ../src/guestfs-actions.pod:7491
30269 "I<Note:> Don't use this call to test for availability of features. In "
30270 "enterprise distributions we backport features from later versions into "
30271 "earlier versions, making this an unreliable way to test for features. Use "
30272 "C<guestfs_available> instead."
30276 #: ../src/guestfs-actions.pod:7497
30278 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
30279 "error. I<The caller must call C<guestfs_free_version> after use>."
30283 #: ../src/guestfs-actions.pod:7501
30284 msgid "(Added in 1.0.58)"
30288 #: ../src/guestfs-actions.pod:7503
30289 msgid "guestfs_vfs_label"
30293 #: ../src/guestfs-actions.pod:7505
30297 " guestfs_vfs_label (guestfs_h *g,\n"
30298 " const char *device);\n"
30303 #: ../src/guestfs-actions.pod:7514
30304 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
30308 #: ../src/guestfs-actions.pod:7519 ../src/guestfs-actions.pod:7556
30309 msgid "(Added in 1.3.18)"
30313 #: ../src/guestfs-actions.pod:7521
30314 msgid "guestfs_vfs_type"
30318 #: ../src/guestfs-actions.pod:7523
30322 " guestfs_vfs_type (guestfs_h *g,\n"
30323 " const char *device);\n"
30328 #: ../src/guestfs-actions.pod:7540
30329 msgid "guestfs_vfs_uuid"
30333 #: ../src/guestfs-actions.pod:7542
30337 " guestfs_vfs_uuid (guestfs_h *g,\n"
30338 " const char *device);\n"
30343 #: ../src/guestfs-actions.pod:7551
30344 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
30348 #: ../src/guestfs-actions.pod:7558
30349 msgid "guestfs_vg_activate"
30353 #: ../src/guestfs-actions.pod:7560
30357 " guestfs_vg_activate (guestfs_h *g,\n"
30359 " char *const *volgroups);\n"
30364 #: ../src/guestfs-actions.pod:7577
30365 msgid "guestfs_vg_activate_all"
30369 #: ../src/guestfs-actions.pod:7579
30373 " guestfs_vg_activate_all (guestfs_h *g,\n"
30374 " int activate);\n"
30379 #: ../src/guestfs-actions.pod:7592
30380 msgid "guestfs_vgcreate"
30384 #: ../src/guestfs-actions.pod:7594
30388 " guestfs_vgcreate (guestfs_h *g,\n"
30389 " const char *volgroup,\n"
30390 " char *const *physvols);\n"
30395 #: ../src/guestfs-actions.pod:7606
30396 msgid "guestfs_vglvuuids"
30400 #: ../src/guestfs-actions.pod:7608
30404 " guestfs_vglvuuids (guestfs_h *g,\n"
30405 " const char *vgname);\n"
30410 #: ../src/guestfs-actions.pod:7615
30412 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
30413 "associate logical volumes and volume groups."
30417 #: ../src/guestfs-actions.pod:7618
30418 msgid "See also C<guestfs_vgpvuuids>."
30422 #: ../src/guestfs-actions.pod:7626
30423 msgid "guestfs_vgpvuuids"
30427 #: ../src/guestfs-actions.pod:7628
30431 " guestfs_vgpvuuids (guestfs_h *g,\n"
30432 " const char *vgname);\n"
30437 #: ../src/guestfs-actions.pod:7635
30439 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
30440 "associate physical volumes and volume groups."
30444 #: ../src/guestfs-actions.pod:7638
30445 msgid "See also C<guestfs_vglvuuids>."
30449 #: ../src/guestfs-actions.pod:7646
30450 msgid "guestfs_vgremove"
30454 #: ../src/guestfs-actions.pod:7648
30458 " guestfs_vgremove (guestfs_h *g,\n"
30459 " const char *vgname);\n"
30464 #: ../src/guestfs-actions.pod:7661
30465 msgid "guestfs_vgrename"
30469 #: ../src/guestfs-actions.pod:7663
30473 " guestfs_vgrename (guestfs_h *g,\n"
30474 " const char *volgroup,\n"
30475 " const char *newvolgroup);\n"
30480 #: ../src/guestfs-actions.pod:7674
30481 msgid "guestfs_vgs"
30485 #: ../src/guestfs-actions.pod:7676
30489 " guestfs_vgs (guestfs_h *g);\n"
30494 #: ../src/guestfs-actions.pod:7685
30495 msgid "See also C<guestfs_vgs_full>."
30499 #: ../src/guestfs-actions.pod:7693
30500 msgid "guestfs_vgs_full"
30504 #: ../src/guestfs-actions.pod:7695
30507 " struct guestfs_lvm_vg_list *\n"
30508 " guestfs_vgs_full (guestfs_h *g);\n"
30513 #: ../src/guestfs-actions.pod:7701
30515 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
30516 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
30520 #: ../src/guestfs-actions.pod:7707
30521 msgid "guestfs_vgscan"
30525 #: ../src/guestfs-actions.pod:7709
30529 " guestfs_vgscan (guestfs_h *g);\n"
30534 #: ../src/guestfs-actions.pod:7719
30535 msgid "guestfs_vguuid"
30539 #: ../src/guestfs-actions.pod:7721
30543 " guestfs_vguuid (guestfs_h *g,\n"
30544 " const char *vgname);\n"
30549 #: ../src/guestfs-actions.pod:7732
30550 msgid "guestfs_wait_ready"
30554 #: ../src/guestfs-actions.pod:7734
30558 " guestfs_wait_ready (guestfs_h *g);\n"
30563 #: ../src/guestfs-actions.pod:7737
30565 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
30570 #: ../src/guestfs-actions.pod:7744
30571 msgid "This function is a no op."
30575 #: ../src/guestfs-actions.pod:7746
30577 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
30578 "calling C<guestfs_launch> to wait for the launch to complete. However this "
30579 "is no longer necessary because C<guestfs_launch> now does the waiting."
30583 #: ../src/guestfs-actions.pod:7751
30585 "If you see any calls to this function in code then you can just remove them, "
30586 "unless you want to retain compatibility with older versions of the API."
30590 #: ../src/guestfs-actions.pod:7759
30591 msgid "guestfs_wc_c"
30595 #: ../src/guestfs-actions.pod:7761
30599 " guestfs_wc_c (guestfs_h *g,\n"
30600 " const char *path);\n"
30605 #: ../src/guestfs-actions.pod:7772
30606 msgid "guestfs_wc_l"
30610 #: ../src/guestfs-actions.pod:7774
30614 " guestfs_wc_l (guestfs_h *g,\n"
30615 " const char *path);\n"
30620 #: ../src/guestfs-actions.pod:7785
30621 msgid "guestfs_wc_w"
30625 #: ../src/guestfs-actions.pod:7787
30629 " guestfs_wc_w (guestfs_h *g,\n"
30630 " const char *path);\n"
30635 #: ../src/guestfs-actions.pod:7798
30636 msgid "guestfs_write"
30640 #: ../src/guestfs-actions.pod:7800
30644 " guestfs_write (guestfs_h *g,\n"
30645 " const char *path,\n"
30646 " const char *content,\n"
30647 " size_t content_size);\n"
30652 #: ../src/guestfs-actions.pod:7809
30653 msgid "See also C<guestfs_write_append>."
30657 #: ../src/guestfs-actions.pod:7818
30658 msgid "guestfs_write_append"
30662 #: ../src/guestfs-actions.pod:7820
30666 " guestfs_write_append (guestfs_h *g,\n"
30667 " const char *path,\n"
30668 " const char *content,\n"
30669 " size_t content_size);\n"
30674 #: ../src/guestfs-actions.pod:7829
30675 msgid "See also C<guestfs_write>."
30679 #: ../src/guestfs-actions.pod:7838
30680 msgid "guestfs_write_file"
30684 #: ../src/guestfs-actions.pod:7840
30688 " guestfs_write_file (guestfs_h *g,\n"
30689 " const char *path,\n"
30690 " const char *content,\n"
30696 #: ../src/guestfs-actions.pod:7846
30698 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
30703 #: ../src/guestfs-actions.pod:7871
30704 msgid "guestfs_zegrep"
30708 #: ../src/guestfs-actions.pod:7873
30712 " guestfs_zegrep (guestfs_h *g,\n"
30713 " const char *regex,\n"
30714 " const char *path);\n"
30719 #: ../src/guestfs-actions.pod:7890
30720 msgid "guestfs_zegrepi"
30724 #: ../src/guestfs-actions.pod:7892
30728 " guestfs_zegrepi (guestfs_h *g,\n"
30729 " const char *regex,\n"
30730 " const char *path);\n"
30735 #: ../src/guestfs-actions.pod:7909
30736 msgid "guestfs_zero"
30740 #: ../src/guestfs-actions.pod:7911
30744 " guestfs_zero (guestfs_h *g,\n"
30745 " const char *device);\n"
30750 #: ../src/guestfs-actions.pod:7925
30752 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
30753 "C<guestfs_is_zero_device>"
30757 #: ../src/guestfs-actions.pod:7937
30758 msgid "guestfs_zero_device"
30762 #: ../src/guestfs-actions.pod:7939
30766 " guestfs_zero_device (guestfs_h *g,\n"
30767 " const char *device);\n"
30772 #: ../src/guestfs-actions.pod:7943
30774 "This command writes zeroes over the entire C<device>. Compare with "
30775 "C<guestfs_zero> which just zeroes the first few blocks of a device."
30779 #: ../src/guestfs-actions.pod:7961
30780 msgid "(Added in 1.3.1)"
30784 #: ../src/guestfs-actions.pod:7963
30785 msgid "guestfs_zerofree"
30789 #: ../src/guestfs-actions.pod:7965
30793 " guestfs_zerofree (guestfs_h *g,\n"
30794 " const char *device);\n"
30799 #: ../src/guestfs-actions.pod:7984
30800 msgid "guestfs_zfgrep"
30804 #: ../src/guestfs-actions.pod:7986
30808 " guestfs_zfgrep (guestfs_h *g,\n"
30809 " const char *pattern,\n"
30810 " const char *path);\n"
30815 #: ../src/guestfs-actions.pod:8003
30816 msgid "guestfs_zfgrepi"
30820 #: ../src/guestfs-actions.pod:8005
30824 " guestfs_zfgrepi (guestfs_h *g,\n"
30825 " const char *pattern,\n"
30826 " const char *path);\n"
30831 #: ../src/guestfs-actions.pod:8022
30832 msgid "guestfs_zfile"
30836 #: ../src/guestfs-actions.pod:8024
30840 " guestfs_zfile (guestfs_h *g,\n"
30841 " const char *meth,\n"
30842 " const char *path);\n"
30847 #: ../src/guestfs-actions.pod:8029
30849 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
30854 #: ../src/guestfs-actions.pod:8041
30856 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
30861 #: ../src/guestfs-actions.pod:8049
30862 msgid "guestfs_zgrep"
30866 #: ../src/guestfs-actions.pod:8051
30870 " guestfs_zgrep (guestfs_h *g,\n"
30871 " const char *regex,\n"
30872 " const char *path);\n"
30877 #: ../src/guestfs-actions.pod:8068
30878 msgid "guestfs_zgrepi"
30882 #: ../src/guestfs-actions.pod:8070
30886 " guestfs_zgrepi (guestfs_h *g,\n"
30887 " const char *regex,\n"
30888 " const char *path);\n"
30893 #: ../src/guestfs-availability.pod:3
30898 #: ../src/guestfs-availability.pod:5
30900 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
30901 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
30902 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
30903 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
30904 "L</guestfs_aug_save> L</guestfs_aug_set>"
30908 #: ../src/guestfs-availability.pod:21
30913 #: ../src/guestfs-availability.pod:23
30914 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
30918 #: ../src/guestfs-availability.pod:26
30923 #: ../src/guestfs-availability.pod:28
30924 msgid "The following functions: L</guestfs_grub_install>"
30928 #: ../src/guestfs-availability.pod:31
30933 #: ../src/guestfs-availability.pod:33
30935 "The following functions: L</guestfs_inotify_add_watch> L</"
30936 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
30937 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
30941 #: ../src/guestfs-availability.pod:41
30942 msgid "B<linuxfsuuid>"
30946 #: ../src/guestfs-availability.pod:43
30948 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
30949 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
30953 #: ../src/guestfs-availability.pod:50
30954 msgid "B<linuxmodules>"
30958 #: ../src/guestfs-availability.pod:52
30959 msgid "The following functions: L</guestfs_modprobe>"
30963 #: ../src/guestfs-availability.pod:55
30964 msgid "B<linuxxattrs>"
30968 #: ../src/guestfs-availability.pod:57
30970 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
30971 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
30972 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
30973 "guestfs_setxattr>"
30977 #: ../src/guestfs-availability.pod:68
30982 #: ../src/guestfs-availability.pod:70
30984 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
30985 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
30986 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
30990 #: ../src/guestfs-availability.pod:79
30995 #: ../src/guestfs-availability.pod:81
30997 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
30998 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
30999 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
31000 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
31001 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
31002 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
31003 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
31007 #: ../src/guestfs-availability.pod:104
31012 #: ../src/guestfs-availability.pod:106
31014 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
31015 "guestfs_mknod_b> L</guestfs_mknod_c>"
31019 #: ../src/guestfs-availability.pod:112
31024 #: ../src/guestfs-availability.pod:114
31025 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
31029 #: ../src/guestfs-availability.pod:117
31030 msgid "B<ntfsprogs>"
31034 #: ../src/guestfs-availability.pod:119
31036 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
31037 "L</guestfs_ntfsresize_size>"
31041 #: ../src/guestfs-availability.pod:124
31042 msgid "B<realpath>"
31046 #: ../src/guestfs-availability.pod:126
31047 msgid "The following functions: L</guestfs_realpath>"
31051 #: ../src/guestfs-availability.pod:129
31056 #: ../src/guestfs-availability.pod:131
31058 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
31059 "guestfs_scrub_freespace>"
31063 #: ../src/guestfs-availability.pod:136
31068 #: ../src/guestfs-availability.pod:138
31069 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
31073 #: ../src/guestfs-availability.pod:142
31078 #: ../src/guestfs-availability.pod:144
31079 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
31083 #: ../src/guestfs-availability.pod:148
31084 msgid "B<zerofree>"
31088 #: ../src/guestfs-availability.pod:150
31089 msgid "The following functions: L</guestfs_zerofree>"
31093 #: ../src/guestfs-structs.pod:1
31094 msgid "guestfs_int_bool"
31098 #: ../src/guestfs-structs.pod:3
31101 " struct guestfs_int_bool {\n"
31109 #: ../src/guestfs-structs.pod:8
31112 " struct guestfs_int_bool_list {\n"
31113 " uint32_t len; /* Number of elements in list. */\n"
31114 " struct guestfs_int_bool *val; /* Elements. */\n"
31120 #: ../src/guestfs-structs.pod:13
31123 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
31124 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
31129 #: ../src/guestfs-structs.pod:16
31130 msgid "guestfs_lvm_pv"
31134 #: ../src/guestfs-structs.pod:18
31137 " struct guestfs_lvm_pv {\n"
31138 " char *pv_name;\n"
31139 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
31140 " char pv_uuid[32];\n"
31142 " uint64_t pv_size;\n"
31143 " uint64_t dev_size;\n"
31144 " uint64_t pv_free;\n"
31145 " uint64_t pv_used;\n"
31146 " char *pv_attr;\n"
31147 " int64_t pv_pe_count;\n"
31148 " int64_t pv_pe_alloc_count;\n"
31149 " char *pv_tags;\n"
31150 " uint64_t pe_start;\n"
31151 " int64_t pv_mda_count;\n"
31152 " uint64_t pv_mda_free;\n"
31158 #: ../src/guestfs-structs.pod:36
31161 " struct guestfs_lvm_pv_list {\n"
31162 " uint32_t len; /* Number of elements in list. */\n"
31163 " struct guestfs_lvm_pv *val; /* Elements. */\n"
31169 #: ../src/guestfs-structs.pod:41
31172 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
31173 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
31178 #: ../src/guestfs-structs.pod:44
31179 msgid "guestfs_lvm_vg"
31183 #: ../src/guestfs-structs.pod:46
31186 " struct guestfs_lvm_vg {\n"
31187 " char *vg_name;\n"
31188 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
31189 " char vg_uuid[32];\n"
31191 " char *vg_attr;\n"
31192 " uint64_t vg_size;\n"
31193 " uint64_t vg_free;\n"
31194 " char *vg_sysid;\n"
31195 " uint64_t vg_extent_size;\n"
31196 " int64_t vg_extent_count;\n"
31197 " int64_t vg_free_count;\n"
31198 " int64_t max_lv;\n"
31199 " int64_t max_pv;\n"
31200 " int64_t pv_count;\n"
31201 " int64_t lv_count;\n"
31202 " int64_t snap_count;\n"
31203 " int64_t vg_seqno;\n"
31204 " char *vg_tags;\n"
31205 " int64_t vg_mda_count;\n"
31206 " uint64_t vg_mda_free;\n"
31212 #: ../src/guestfs-structs.pod:69
31215 " struct guestfs_lvm_vg_list {\n"
31216 " uint32_t len; /* Number of elements in list. */\n"
31217 " struct guestfs_lvm_vg *val; /* Elements. */\n"
31223 #: ../src/guestfs-structs.pod:74
31226 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
31227 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
31232 #: ../src/guestfs-structs.pod:77
31233 msgid "guestfs_lvm_lv"
31237 #: ../src/guestfs-structs.pod:79
31240 " struct guestfs_lvm_lv {\n"
31241 " char *lv_name;\n"
31242 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
31243 " char lv_uuid[32];\n"
31244 " char *lv_attr;\n"
31245 " int64_t lv_major;\n"
31246 " int64_t lv_minor;\n"
31247 " int64_t lv_kernel_major;\n"
31248 " int64_t lv_kernel_minor;\n"
31249 " uint64_t lv_size;\n"
31250 " int64_t seg_count;\n"
31252 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
31253 " float snap_percent;\n"
31254 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
31255 " float copy_percent;\n"
31256 " char *move_pv;\n"
31257 " char *lv_tags;\n"
31258 " char *mirror_log;\n"
31259 " char *modules;\n"
31265 #: ../src/guestfs-structs.pod:101
31268 " struct guestfs_lvm_lv_list {\n"
31269 " uint32_t len; /* Number of elements in list. */\n"
31270 " struct guestfs_lvm_lv *val; /* Elements. */\n"
31276 #: ../src/guestfs-structs.pod:106
31279 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
31280 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
31285 #: ../src/guestfs-structs.pod:111
31288 " struct guestfs_stat {\n"
31292 " int64_t nlink;\n"
31297 " int64_t blksize;\n"
31298 " int64_t blocks;\n"
31299 " int64_t atime;\n"
31300 " int64_t mtime;\n"
31301 " int64_t ctime;\n"
31307 #: ../src/guestfs-structs.pod:127
31310 " struct guestfs_stat_list {\n"
31311 " uint32_t len; /* Number of elements in list. */\n"
31312 " struct guestfs_stat *val; /* Elements. */\n"
31318 #: ../src/guestfs-structs.pod:132
31321 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
31322 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
31327 #: ../src/guestfs-structs.pod:137
31330 " struct guestfs_statvfs {\n"
31331 " int64_t bsize;\n"
31332 " int64_t frsize;\n"
31333 " int64_t blocks;\n"
31334 " int64_t bfree;\n"
31335 " int64_t bavail;\n"
31336 " int64_t files;\n"
31337 " int64_t ffree;\n"
31338 " int64_t favail;\n"
31341 " int64_t namemax;\n"
31347 #: ../src/guestfs-structs.pod:151
31350 " struct guestfs_statvfs_list {\n"
31351 " uint32_t len; /* Number of elements in list. */\n"
31352 " struct guestfs_statvfs *val; /* Elements. */\n"
31358 #: ../src/guestfs-structs.pod:156
31361 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
31362 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
31367 #: ../src/guestfs-structs.pod:159
31368 msgid "guestfs_dirent"
31372 #: ../src/guestfs-structs.pod:161
31375 " struct guestfs_dirent {\n"
31384 #: ../src/guestfs-structs.pod:167
31387 " struct guestfs_dirent_list {\n"
31388 " uint32_t len; /* Number of elements in list. */\n"
31389 " struct guestfs_dirent *val; /* Elements. */\n"
31395 #: ../src/guestfs-structs.pod:172
31398 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
31399 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
31404 #: ../src/guestfs-structs.pod:177
31407 " struct guestfs_version {\n"
31408 " int64_t major;\n"
31409 " int64_t minor;\n"
31410 " int64_t release;\n"
31417 #: ../src/guestfs-structs.pod:184
31420 " struct guestfs_version_list {\n"
31421 " uint32_t len; /* Number of elements in list. */\n"
31422 " struct guestfs_version *val; /* Elements. */\n"
31428 #: ../src/guestfs-structs.pod:189
31431 " void guestfs_free_version (struct guestfs_free_version *);\n"
31432 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
31437 #: ../src/guestfs-structs.pod:192
31438 msgid "guestfs_xattr"
31442 #: ../src/guestfs-structs.pod:194
31445 " struct guestfs_xattr {\n"
31446 " char *attrname;\n"
31447 " /* The next two fields describe a byte array. */\n"
31448 " uint32_t attrval_len;\n"
31449 " char *attrval;\n"
31455 #: ../src/guestfs-structs.pod:201
31458 " struct guestfs_xattr_list {\n"
31459 " uint32_t len; /* Number of elements in list. */\n"
31460 " struct guestfs_xattr *val; /* Elements. */\n"
31466 #: ../src/guestfs-structs.pod:206
31469 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
31470 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
31475 #: ../src/guestfs-structs.pod:209
31476 msgid "guestfs_inotify_event"
31480 #: ../src/guestfs-structs.pod:211
31483 " struct guestfs_inotify_event {\n"
31484 " int64_t in_wd;\n"
31485 " uint32_t in_mask;\n"
31486 " uint32_t in_cookie;\n"
31487 " char *in_name;\n"
31493 #: ../src/guestfs-structs.pod:218
31496 " struct guestfs_inotify_event_list {\n"
31497 " uint32_t len; /* Number of elements in list. */\n"
31498 " struct guestfs_inotify_event *val; /* Elements. */\n"
31504 #: ../src/guestfs-structs.pod:223
31507 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
31508 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
31513 #: ../src/guestfs-structs.pod:226
31514 msgid "guestfs_partition"
31518 #: ../src/guestfs-structs.pod:228
31521 " struct guestfs_partition {\n"
31522 " int32_t part_num;\n"
31523 " uint64_t part_start;\n"
31524 " uint64_t part_end;\n"
31525 " uint64_t part_size;\n"
31531 #: ../src/guestfs-structs.pod:235
31534 " struct guestfs_partition_list {\n"
31535 " uint32_t len; /* Number of elements in list. */\n"
31536 " struct guestfs_partition *val; /* Elements. */\n"
31542 #: ../src/guestfs-structs.pod:240
31545 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
31546 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
31551 #: ../src/guestfs-structs.pod:243
31552 msgid "guestfs_application"
31556 #: ../src/guestfs-structs.pod:245
31559 " struct guestfs_application {\n"
31560 " char *app_name;\n"
31561 " char *app_display_name;\n"
31562 " int32_t app_epoch;\n"
31563 " char *app_version;\n"
31564 " char *app_release;\n"
31565 " char *app_install_path;\n"
31566 " char *app_trans_path;\n"
31567 " char *app_publisher;\n"
31568 " char *app_url;\n"
31569 " char *app_source_package;\n"
31570 " char *app_summary;\n"
31571 " char *app_description;\n"
31577 #: ../src/guestfs-structs.pod:260
31580 " struct guestfs_application_list {\n"
31581 " uint32_t len; /* Number of elements in list. */\n"
31582 " struct guestfs_application *val; /* Elements. */\n"
31588 #: ../src/guestfs-structs.pod:265
31591 " void guestfs_free_application (struct guestfs_free_application *);\n"
31592 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
31597 #: ../src/guestfs.pod:5
31598 msgid "guestfs - Library for accessing and modifying virtual machine images"
31602 #: ../src/guestfs.pod:11
31605 " guestfs_h *g = guestfs_create ();\n"
31606 " guestfs_add_drive (g, \"guest.img\");\n"
31607 " guestfs_launch (g);\n"
31608 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
31609 " guestfs_touch (g, \"/hello\");\n"
31610 " guestfs_umount (g, \"/\");\n"
31611 " guestfs_close (g);\n"
31616 #: ../src/guestfs.pod:25
31618 "Libguestfs is a library for accessing and modifying guest disk images. "
31619 "Amongst the things this is good for: making batch configuration changes to "
31620 "guests, getting disk used/free statistics (see also: virt-df), migrating "
31621 "between virtualization systems (see also: virt-p2v), performing partial "
31622 "backups, performing partial guest clones, cloning guests and changing "
31623 "registry/UUID/hostname info, and much else besides."
31627 #: ../src/guestfs.pod:33
31629 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
31630 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
31631 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
31636 #: ../src/guestfs.pod:38
31638 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
31639 "what filesystem is in each LV, etc.). It can also run commands in the "
31640 "context of the guest. Also you can access filesystems over FUSE."
31644 #: ../src/guestfs.pod:43
31646 "Libguestfs is a library that can be linked with C and C++ management "
31647 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
31648 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
31653 #: ../src/guestfs.pod:48
31655 "You don't need to be root to use libguestfs, although obviously you do need "
31656 "enough permissions to access the disk images."
31660 #: ../src/guestfs.pod:51
31662 "Libguestfs is a large API because it can do many things. For a gentle "
31663 "introduction, please read the L</API OVERVIEW> section next."
31667 #: ../src/guestfs.pod:54
31669 "There are also some example programs in the L<guestfs-examples(3)> manual "
31674 #: ../src/guestfs.pod:57
31675 msgid "API OVERVIEW"
31679 #: ../src/guestfs.pod:59
31681 "This section provides a gentler overview of the libguestfs API. We also try "
31682 "to group API calls together, where that may not be obvious from reading "
31683 "about the individual calls in the main section of this manual."
31687 #: ../src/guestfs.pod:64
31692 #: ../src/guestfs.pod:66
31694 "Before you can use libguestfs calls, you have to create a handle. Then you "
31695 "must add at least one disk image to the handle, followed by launching the "
31696 "handle, then performing whatever operations you want, and finally closing "
31697 "the handle. By convention we use the single letter C<g> for the name of the "
31698 "handle variable, although of course you can use any name you want."
31702 #: ../src/guestfs.pod:73
31703 msgid "The general structure of all libguestfs-using programs looks like this:"
31707 #: ../src/guestfs.pod:76
31710 " guestfs_h *g = guestfs_create ();\n"
31715 #: ../src/guestfs.pod:78
31718 " /* Call guestfs_add_drive additional times if there are\n"
31719 " * multiple disk images.\n"
31721 " guestfs_add_drive (g, \"guest.img\");\n"
31726 #: ../src/guestfs.pod:83
31729 " /* Most manipulation calls won't work until you've launched\n"
31730 " * the handle 'g'. You have to do this _after_ adding drives\n"
31731 " * and _before_ other commands.\n"
31733 " guestfs_launch (g);\n"
31738 #: ../src/guestfs.pod:89
31741 " /* Now you can examine what partitions, LVs etc are available.\n"
31743 " char **partitions = guestfs_list_partitions (g);\n"
31744 " char **logvols = guestfs_lvs (g);\n"
31749 #: ../src/guestfs.pod:94
31752 " /* To access a filesystem in the image, you must mount it.\n"
31754 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
31759 #: ../src/guestfs.pod:98
31762 " /* Now you can perform filesystem actions on the guest\n"
31765 " guestfs_touch (g, \"/hello\");\n"
31770 #: ../src/guestfs.pod:103
31773 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
31774 " * it is done automatically when you close the handle. See\n"
31775 " * discussion of autosync in this page.\n"
31777 " guestfs_sync (g);\n"
31782 #: ../src/guestfs.pod:109
31785 " /* Close the handle 'g'. */\n"
31786 " guestfs_close (g);\n"
31791 #: ../src/guestfs.pod:112
31793 "The code above doesn't include any error checking. In real code you should "
31794 "check return values carefully for errors. In general all functions that "
31795 "return integers return C<-1> on error, and all functions that return "
31796 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
31797 "how to handle errors, and consult the documentation for each function call "
31798 "below to see precisely how they return error indications. See L<guestfs-"
31799 "examples(3)> for fully worked examples."
31803 #: ../src/guestfs.pod:121
31804 msgid "DISK IMAGES"
31808 #: ../src/guestfs.pod:123
31810 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
31811 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
31812 "actual block device, or simply an empty file of zeroes that you have created "
31813 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
31818 #: ../src/guestfs.pod:129
31820 "The call you should use in modern code for adding drives is L</"
31821 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
31822 "specifying that the format is raw, do:"
31826 #: ../src/guestfs.pod:133
31829 " guestfs_add_drive_opts (g, filename,\n"
31830 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
31836 #: ../src/guestfs.pod:137
31837 msgid "You can add a disk read-only using:"
31841 #: ../src/guestfs.pod:139
31844 " guestfs_add_drive_opts (g, filename,\n"
31845 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
31846 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
31852 #: ../src/guestfs.pod:144
31854 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
31855 "libguestfs won't modify the file."
31859 #: ../src/guestfs.pod:147
31861 "Be extremely cautious if the disk image is in use, eg. if it is being used "
31862 "by a virtual machine. Adding it read-write will almost certainly cause disk "
31863 "corruption, but adding it read-only is safe."
31867 #: ../src/guestfs.pod:151
31869 "You must add at least one disk image, and you may add multiple disk images. "
31870 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
31871 "first one you added), C</dev/sdb> (for the second one you added), etc."
31875 #: ../src/guestfs.pod:156
31877 "Once L</guestfs_launch> has been called you cannot add any more images. You "
31878 "can call L</guestfs_list_devices> to get a list of the device names, in the "
31879 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
31883 #: ../src/guestfs.pod:161
31888 #: ../src/guestfs.pod:163
31890 "Before you can read or write files, create directories and so on in a disk "
31891 "image that contains filesystems, you have to mount those filesystems using "
31892 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
31893 "a disk image contains (for example) one partition with a filesystem on that "
31894 "partition, then you can mount it directly:"
31898 #: ../src/guestfs.pod:170
31901 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
31906 #: ../src/guestfs.pod:172
31908 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
31909 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
31910 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
31911 "that these are libguestfs virtual devices, and are nothing to do with host "
31916 #: ../src/guestfs.pod:178
31918 "If you are given a disk image and you don't know what it contains then you "
31919 "have to find out. Libguestfs can do that too: use L</"
31920 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
31921 "LVs, and either try mounting each to see what is mountable, or else examine "
31922 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
31923 "filesystems, use L</guestfs_list_filesystems>."
31927 #: ../src/guestfs.pod:186
31929 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
31930 "L</INSPECTION> below). But you might find it easier to look at higher level "
31931 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
31935 #: ../src/guestfs.pod:191
31937 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
31938 "several other variations of the C<guestfs_mount_*> call."
31942 #: ../src/guestfs.pod:194
31943 msgid "FILESYSTEM ACCESS AND MODIFICATION"
31947 #: ../src/guestfs.pod:196
31949 "The majority of the libguestfs API consists of fairly low-level calls for "
31950 "accessing and modifying the files, directories, symlinks etc on mounted "
31951 "filesystems. There are over a hundred such calls which you can find listed "
31952 "in detail below in this man page, and we don't even pretend to cover them "
31953 "all in this overview."
31957 #: ../src/guestfs.pod:202
31959 "Specify filenames as full paths, starting with C<\"/\"> and including the "
31964 #: ../src/guestfs.pod:205
31966 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
31967 "the file called C<\"etc/passwd\"> then you could do:"
31971 #: ../src/guestfs.pod:208
31974 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
31979 #: ../src/guestfs.pod:210
31981 "This would return C<data> as a newly allocated buffer containing the full "
31982 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
31983 "or C<NULL> if there was an error."
31987 #: ../src/guestfs.pod:214
31989 "As another example, to create a top-level directory on that filesystem "
31990 "called C<\"var\"> you would do:"
31994 #: ../src/guestfs.pod:217
31997 " guestfs_mkdir (g, \"/var\");\n"
32002 #: ../src/guestfs.pod:219
32003 msgid "To create a symlink you could do:"
32007 #: ../src/guestfs.pod:221
32010 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
32011 " \"/etc/rc3.d/S30portmap\");\n"
32016 #: ../src/guestfs.pod:224
32018 "Libguestfs will reject attempts to use relative paths and there is no "
32019 "concept of a current working directory."
32023 #: ../src/guestfs.pod:227
32025 "Libguestfs can return errors in many situations: for example if the "
32026 "filesystem isn't writable, or if a file or directory that you requested "
32027 "doesn't exist. If you are using the C API (documented here) you have to "
32028 "check for those error conditions after each call. (Other language bindings "
32029 "turn these errors into exceptions)."
32033 #: ../src/guestfs.pod:233
32035 "File writes are affected by the per-handle umask, set by calling L</"
32036 "guestfs_umask> and defaulting to 022. See L</UMASK>."
32040 #: ../src/guestfs.pod:236
32041 msgid "PARTITIONING"
32045 #: ../src/guestfs.pod:238
32047 "Libguestfs contains API calls to read, create and modify partition tables on "
32052 #: ../src/guestfs.pod:241
32054 "In the common case where you want to create a single partition covering the "
32055 "whole disk, you should use the L</guestfs_part_disk> call:"
32059 #: ../src/guestfs.pod:245
32062 " const char *parttype = \"mbr\";\n"
32063 " if (disk_is_larger_than_2TB)\n"
32064 " parttype = \"gpt\";\n"
32065 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
32070 #: ../src/guestfs.pod:250
32072 "Obviously this effectively wipes anything that was on that disk image before."
32076 #: ../src/guestfs.pod:253
32081 #: ../src/guestfs.pod:255
32083 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
32084 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
32085 "you familiarize yourself with the concepts of physical volumes, volume "
32086 "groups and logical volumes."
32090 #: ../src/guestfs.pod:260
32092 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
32093 "tldp.org/HOWTO/LVM-HOWTO/>."
32097 #: ../src/guestfs.pod:263
32098 msgid "DOWNLOADING"
32102 #: ../src/guestfs.pod:265
32104 "Use L</guestfs_cat> to download small, text only files. This call is "
32105 "limited to files which are less than 2 MB and which cannot contain any ASCII "
32106 "NUL (C<\\0>) characters. However the API is very simple to use."
32110 #: ../src/guestfs.pod:269
32112 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
32113 "bit data, since it returns a (pointer, size) pair. However it is still "
32114 "limited to \"small\" files, less than 2 MB."
32118 #: ../src/guestfs.pod:273
32120 "L</guestfs_download> can be used to download any file, with no limits on "
32121 "content or size (even files larger than 4 GB)."
32125 #: ../src/guestfs.pod:276
32127 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
32131 #: ../src/guestfs.pod:279
32136 #: ../src/guestfs.pod:281
32138 "It's often the case that you want to write a file or files to the disk image."
32142 #: ../src/guestfs.pod:284
32144 "To write a small file with fixed content, use L</guestfs_write>. To create "
32145 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
32146 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
32147 "of other functions for creating test files, for example L</guestfs_fill> and "
32148 "L</guestfs_fill_pattern>."
32152 #: ../src/guestfs.pod:290
32154 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
32155 "file content or size (even files larger than 4 GB)."
32159 #: ../src/guestfs.pod:293
32161 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
32165 #: ../src/guestfs.pod:295
32167 "However the fastest way to upload I<large numbers of arbitrary files> is to "
32168 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
32169 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
32170 "in a predictable way (eg. adding it last after all other drives) then you "
32171 "can get the device name from L</guestfs_list_devices> and mount it directly "
32172 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
32173 "portable between kernel versions, and they don't support labels or UUIDs. "
32174 "If you want to pre-build an image or you need to mount it using a label or "
32175 "UUID, use an ISO image instead."
32179 #: ../src/guestfs.pod:306
32184 #: ../src/guestfs.pod:308
32186 "There are various different commands for copying between files and devices "
32187 "and in and out of the guest filesystem. These are summarised in the table "
32192 #: ../src/guestfs.pod:314
32193 msgid "B<file> to B<file>"
32197 #: ../src/guestfs.pod:316
32199 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
32200 "directories recursively."
32204 #: ../src/guestfs.pod:319
32205 msgid "B<file or device> to B<file or device>"
32209 #: ../src/guestfs.pod:321
32211 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
32212 "devices in the guest."
32216 #: ../src/guestfs.pod:324
32217 msgid "Example: duplicate the contents of an LV:"
32221 #: ../src/guestfs.pod:326
32224 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
32229 #: ../src/guestfs.pod:328
32231 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
32232 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
32233 "guestfs_copy_size>."
32237 #: ../src/guestfs.pod:332
32238 msgid "B<file on the host> to B<file or device>"
32242 #: ../src/guestfs.pod:334
32243 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
32247 #: ../src/guestfs.pod:336
32248 msgid "B<file or device> to B<file on the host>"
32252 #: ../src/guestfs.pod:338
32253 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
32257 #: ../src/guestfs.pod:342
32258 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
32262 #: ../src/guestfs.pod:344
32264 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
32265 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
32266 "appears you can only upload and download to files. However many Un*x-like "
32267 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
32268 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
32269 "and arbitrary file descriptor N."
32273 #: ../src/guestfs.pod:352
32274 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
32278 #: ../src/guestfs.pod:355
32281 " guestfs_download (g, filename, \"/dev/stdout\");\n"
32286 #: ../src/guestfs.pod:357
32287 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
32291 #: ../src/guestfs.pod:359
32294 " char devfd[64];\n"
32295 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
32296 " guestfs_tar_out (g, \"/\", devfd);\n"
32301 #: ../src/guestfs.pod:363
32302 msgid "LISTING FILES"
32306 #: ../src/guestfs.pod:365
32308 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
32309 "L<guestfish(1)>-equivalent command C<ll>)."
32313 #: ../src/guestfs.pod:368
32315 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
32316 "programs, as a flat list of strings."
32320 #: ../src/guestfs.pod:371
32322 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
32323 "directory, plus additional information about each one. It is more "
32324 "equivalent to using the L<readdir(3)> call on a local filesystem."
32328 #: ../src/guestfs.pod:375
32330 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
32334 #: ../src/guestfs.pod:378
32335 msgid "RUNNING COMMANDS"
32339 #: ../src/guestfs.pod:380
32341 "Although libguestfs is primarily an API for manipulating files inside guest "
32342 "images, we also provide some limited facilities for running commands inside "
32347 #: ../src/guestfs.pod:384
32348 msgid "There are many limitations to this:"
32352 #: ../src/guestfs.pod:390
32354 "The kernel version that the command runs under will be different from what "
32359 #: ../src/guestfs.pod:395
32361 "If the command needs to communicate with daemons, then most likely they "
32362 "won't be running."
32366 #: ../src/guestfs.pod:400
32367 msgid "The command will be running in limited memory."
32371 #: ../src/guestfs.pod:404
32373 "The network may not be available unless you enable it (see L</"
32374 "guestfs_set_network>)."
32378 #: ../src/guestfs.pod:409
32379 msgid "Only supports Linux guests (not Windows, BSD, etc)."
32383 #: ../src/guestfs.pod:413
32385 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
32389 #: ../src/guestfs.pod:418
32391 "For SELinux guests, you may need to enable SELinux and load policy first. "
32392 "See L</SELINUX> in this manpage."
32396 #: ../src/guestfs.pod:423
32398 "I<Security:> It is not safe to run commands from untrusted, possibly "
32399 "malicious guests. These commands may attempt to exploit your program by "
32400 "sending unexpected output. They could also try to exploit the Linux kernel "
32401 "or qemu provided by the libguestfs appliance. They could use the network "
32402 "provided by the libguestfs appliance to bypass ordinary network partitions "
32403 "and firewalls. They could use the elevated privileges or different SELinux "
32404 "context of your program to their advantage."
32408 #: ../src/guestfs.pod:432
32410 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
32411 "(a script which runs when the guest next boots normally), and to have this "
32412 "script run the commands you want in the normal context of the running guest, "
32413 "network security and so on. For information about other security issues, "
32414 "see L</SECURITY>."
32418 #: ../src/guestfs.pod:440
32420 "The two main API calls to run commands are L</guestfs_command> and L</"
32421 "guestfs_sh> (there are also variations)."
32425 #: ../src/guestfs.pod:443
32427 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
32428 "shell globs, redirections, etc will work."
32432 #: ../src/guestfs.pod:446
32433 msgid "CONFIGURATION FILES"
32437 #: ../src/guestfs.pod:448
32439 "To read and write configuration files in Linux guest filesystems, we "
32440 "strongly recommend using Augeas. For example, Augeas understands how to "
32441 "read and write, say, a Linux shadow password file or X.org configuration "
32442 "file, and so avoids you having to write that code."
32446 #: ../src/guestfs.pod:453
32448 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
32449 "document Augeas itself here because there is excellent documentation on the "
32450 "L<http://augeas.net/> website."
32454 #: ../src/guestfs.pod:457
32456 "If you don't want to use Augeas (you fool!) then try calling L</"
32457 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
32462 #: ../src/guestfs.pod:461
32467 #: ../src/guestfs.pod:463
32469 "We support SELinux guests. To ensure that labeling happens correctly in "
32470 "SELinux guests, you need to enable SELinux and load the guest's policy:"
32474 #: ../src/guestfs.pod:471
32475 msgid "Before launching, do:"
32479 #: ../src/guestfs.pod:473
32482 " guestfs_set_selinux (g, 1);\n"
32487 #: ../src/guestfs.pod:477
32489 "After mounting the guest's filesystem(s), load the policy. This is best "
32490 "done by running the L<load_policy(8)> command in the guest itself:"
32494 #: ../src/guestfs.pod:481
32497 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
32502 #: ../src/guestfs.pod:483
32504 "(Older versions of C<load_policy> require you to specify the name of the "
32509 #: ../src/guestfs.pod:488
32511 "Optionally, set the security context for the API. The correct security "
32512 "context to use can only be known by inspecting the guest. As an example:"
32516 #: ../src/guestfs.pod:492
32519 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
32524 #: ../src/guestfs.pod:496
32525 msgid "This will work for running commands and editing existing files."
32529 #: ../src/guestfs.pod:498
32531 "When new files are created, you may need to label them explicitly, for "
32532 "example by running the external command C<restorecon pathname>."
32536 #: ../src/guestfs.pod:502
32541 #: ../src/guestfs.pod:504
32543 "Certain calls are affected by the current file mode creation mask (the "
32544 "\"umask\"). In particular ones which create files or directories, such as "
32545 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
32546 "either the default mode that the file is created with or modifies the mode "
32551 #: ../src/guestfs.pod:510
32553 "The default umask is C<022>, so files are created with modes such as C<0644> "
32554 "and directories with C<0755>."
32558 #: ../src/guestfs.pod:513
32560 "There are two ways to avoid being affected by umask. Either set umask to 0 "
32561 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
32562 "guestfs_chmod> after creating each file or directory."
32566 #: ../src/guestfs.pod:517
32567 msgid "For more information about umask, see L<umask(2)>."
32571 #: ../src/guestfs.pod:521
32573 "Libguestfs allows you to access Linux guests which have been encrypted using "
32574 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
32575 "standard. This includes nearly all whole disk encryption systems used by "
32576 "modern Linux guests."
32580 #: ../src/guestfs.pod:527
32582 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
32583 "returns the string C<crypto_LUKS>)."
32587 #: ../src/guestfs.pod:530
32589 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
32590 "will require the passphrase!"
32594 #: ../src/guestfs.pod:533
32596 "Opening a LUKS device creates a new device mapper device called C</dev/"
32597 "mapper/mapname> (where C<mapname> is the string you supply to L</"
32598 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
32599 "from and encrypted to the underlying block device respectively."
32603 #: ../src/guestfs.pod:539
32605 "LVM volume groups on the device can be made visible by calling L</"
32606 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
32607 "(s) can now be mounted in the usual way."
32611 #: ../src/guestfs.pod:543
32613 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
32614 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
32615 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
32616 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
32617 "underlying encrypted block device)."
32621 #: ../src/guestfs.pod:550
32626 #: ../src/guestfs.pod:552
32628 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
32629 "contains operating systems, an install CD or a live CD. (These APIs used to "
32630 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
32631 "version 1.5.3 the most frequently used part of this library has been "
32632 "rewritten in C and moved into the core code)."
32636 #: ../src/guestfs.pod:559
32638 "Add all disks belonging to the unknown virtual machine and call L</"
32639 "guestfs_launch> in the usual way."
32643 #: ../src/guestfs.pod:562
32645 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
32646 "and certain heuristics, and returns a list of operating systems that were "
32647 "found. An empty list means none were found. A single element is the root "
32648 "filesystem of the operating system. For dual- or multi-boot guests, "
32649 "multiple roots can be returned, each one corresponding to a separate "
32650 "operating system. (Multi-boot virtual machines are extremely rare in the "
32651 "world of virtualization, but since this scenario can happen, we have built "
32652 "libguestfs to deal with it.)"
32656 #: ../src/guestfs.pod:571
32658 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
32659 "to get additional details about that operating system. For example, call L</"
32660 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
32661 "Windows and Linux-based operating systems respectively."
32665 #: ../src/guestfs.pod:577
32667 "Un*x-like and Linux-based operating systems usually consist of several "
32668 "filesystems which are mounted at boot time (for example, a separate boot "
32669 "partition mounted on C</boot>). The inspection rules are able to detect how "
32670 "filesystems correspond to mount points. Call "
32671 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
32672 "hash table like this example:"
32676 #: ../src/guestfs.pod:584
32679 " /boot => /dev/sda1\n"
32680 " / => /dev/vg_guest/lv_root\n"
32681 " /usr => /dev/vg_guest/lv_usr\n"
32686 #: ../src/guestfs.pod:588
32688 "The caller can then make calls to L</guestfs_mount_options> to mount the "
32689 "filesystems as suggested."
32693 #: ../src/guestfs.pod:591
32695 "Be careful to mount filesystems in the right order (eg. C</> before C</"
32696 "usr>). Sorting the keys of the hash by length, shortest first, should work."
32700 #: ../src/guestfs.pod:595
32702 "Inspection currently only works for some common operating systems. "
32703 "Contributors are welcome to send patches for other operating systems that we "
32704 "currently cannot detect."
32708 #: ../src/guestfs.pod:599
32710 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
32711 "for more details. The L</guestfs_inspect_os> function just ignores any "
32712 "encrypted devices."
32716 #: ../src/guestfs.pod:603
32718 "A note on the implementation: The call L</guestfs_inspect_os> performs "
32719 "inspection and caches the results in the guest handle. Subsequent calls to "
32720 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
32721 "read the disks. If you change the content of the guest disks, you can redo "
32722 "inspection by calling L</guestfs_inspect_os> again. (L</"
32723 "guestfs_inspect_list_applications> works a little differently from the other "
32724 "calls and does read the disks. See documentation for that function for "
32729 #: ../src/guestfs.pod:612
32730 msgid "INSPECTING INSTALL DISKS"
32734 #: ../src/guestfs.pod:614
32736 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
32741 #: ../src/guestfs.pod:617
32743 "Call L</guestfs_inspect_get_format> to return the format of the operating "
32744 "system, which currently can be C<installed> (a regular operating system) or "
32745 "C<installer> (some sort of install disk)."
32749 #: ../src/guestfs.pod:621
32751 "Further information is available about the operating system that can be "
32752 "installed using the regular inspection APIs like L</"
32753 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
32757 #: ../src/guestfs.pod:626
32759 "Some additional information specific to installer disks is also available "
32760 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
32761 "guestfs_inspect_is_multipart> calls."
32765 #: ../src/guestfs.pod:631
32766 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
32770 #: ../src/guestfs.pod:633
32772 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
32773 "ntfs-3g.org/> driver."
32777 #: ../src/guestfs.pod:636
32778 msgid "DRIVE LETTERS AND PATHS"
32782 #: ../src/guestfs.pod:638
32784 "DOS and Windows still use drive letters, and the filesystems are always "
32785 "treated as case insensitive by Windows itself, and therefore you might find "
32786 "a Windows configuration file referring to a path like C<c:\\windows"
32787 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
32788 "might be referred to as C</WINDOWS/System32>."
32792 #: ../src/guestfs.pod:644
32794 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
32795 "L</guestfs_inspect_get_drive_mappings>)"
32799 #: ../src/guestfs.pod:647
32801 "Dealing with separator characters (backslash vs forward slash) is outside "
32802 "the scope of libguestfs, but usually a simple character replacement will "
32807 #: ../src/guestfs.pod:651
32809 "To resolve the case insensitivity of paths, call L</"
32810 "guestfs_case_sensitive_path>."
32814 #: ../src/guestfs.pod:654
32815 msgid "ACCESSING THE WINDOWS REGISTRY"
32819 #: ../src/guestfs.pod:656
32821 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
32822 "files, through the library C<hivex> which is part of the libguestfs project "
32823 "although ships as a separate tarball. You have to locate and download the "
32824 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
32825 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
32826 "reg(1)> for more help on this issue."
32830 #: ../src/guestfs.pod:664
32831 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
32835 #: ../src/guestfs.pod:666
32837 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
32838 "provide something which looks like a Linux symlink. The way it tries to do "
32839 "the rewriting is described here:"
32843 #: ../src/guestfs.pod:670
32845 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
32850 #: ../src/guestfs.pod:672
32852 "The essential problem is that ntfs-3g simply does not have enough "
32853 "information to do a correct job. NTFS links can contain drive letters and "
32854 "references to external device GUIDs that ntfs-3g has no way of resolving. "
32855 "It is almost certainly the case that libguestfs callers should ignore what "
32856 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
32860 #: ../src/guestfs.pod:679
32862 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
32863 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
32864 "attribute, and read the raw reparse data from that (you can find the format "
32865 "documented in various places around the web)."
32869 #: ../src/guestfs.pod:684
32870 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
32874 #: ../src/guestfs.pod:686
32876 "There are other useful extended attributes that can be read from ntfs-3g "
32877 "filesystems (using L</guestfs_getxattr>). See:"
32881 #: ../src/guestfs.pod:689
32883 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
32887 #: ../src/guestfs.pod:691
32888 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
32892 #: ../src/guestfs.pod:693
32894 "Although we don't want to discourage you from using the C API, we will "
32895 "mention here that the same API is also available in other languages."
32899 #: ../src/guestfs.pod:696
32901 "The API is broadly identical in all supported languages. This means that "
32902 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
32903 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
32904 "OCaml. In other words, a straightforward, predictable isomorphism between "
32909 #: ../src/guestfs.pod:702
32911 "Error messages are automatically transformed into exceptions if the language "
32916 #: ../src/guestfs.pod:705
32918 "We don't try to \"object orientify\" parts of the API in OO languages, "
32919 "although contributors are welcome to write higher level APIs above what we "
32920 "provide in their favourite languages if they wish."
32924 #: ../src/guestfs.pod:711
32929 #: ../src/guestfs.pod:713
32931 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
32932 "identical to the C API. C++ classes and exceptions are not used."
32936 #: ../src/guestfs.pod:717
32941 #: ../src/guestfs.pod:719
32943 "The C# bindings are highly experimental. Please read the warnings at the "
32944 "top of C<csharp/Libguestfs.cs>."
32948 #: ../src/guestfs.pod:722
32953 #: ../src/guestfs.pod:724
32954 msgid "See L<guestfs-erlang(3)>."
32958 #: ../src/guestfs.pod:726
32963 #: ../src/guestfs.pod:728
32965 "This is the only language binding that is working but incomplete. Only "
32966 "calls which return simple integers have been bound in Haskell, and we are "
32967 "looking for help to complete this binding."
32971 #: ../src/guestfs.pod:732
32976 #: ../src/guestfs.pod:734
32978 "Full documentation is contained in the Javadoc which is distributed with "
32979 "libguestfs. For examples, see L<guestfs-java(3)>."
32983 #: ../src/guestfs.pod:737
32988 #: ../src/guestfs.pod:739
32989 msgid "See L<guestfs-ocaml(3)>."
32993 #: ../src/guestfs.pod:741
32998 #: ../src/guestfs.pod:743
32999 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
33003 #: ../src/guestfs.pod:745
33008 #: ../src/guestfs.pod:747
33010 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
33011 "the php-libguestfs package for your distribution."
33015 #: ../src/guestfs.pod:750
33016 msgid "The PHP binding only works correctly on 64 bit machines."
33020 #: ../src/guestfs.pod:752
33025 #: ../src/guestfs.pod:754
33026 msgid "See L<guestfs-python(3)>."
33030 #: ../src/guestfs.pod:756
33035 #: ../src/guestfs.pod:758
33036 msgid "See L<guestfs-ruby(3)>."
33040 #: ../src/guestfs.pod:760
33041 msgid "B<shell scripts>"
33045 #: ../src/guestfs.pod:762
33046 msgid "See L<guestfish(1)>."
33050 #: ../src/guestfs.pod:766
33051 msgid "LIBGUESTFS GOTCHAS"
33055 #: ../src/guestfs.pod:768
33057 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
33058 "system [...] that works in the way it is documented but is counterintuitive "
33059 "and almost invites mistakes.\""
33063 #: ../src/guestfs.pod:772
33065 "Since we developed libguestfs and the associated tools, there are several "
33066 "things we would have designed differently, but are now stuck with for "
33067 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
33068 "release, you can expect these to change. Beware of them."
33072 #: ../src/guestfs.pod:780
33073 msgid "Autosync / forgetting to sync."
33077 #: ../src/guestfs.pod:782
33079 "I<Update:> Autosync is enabled by default for all API users starting from "
33080 "libguestfs 1.5.24. This section only applies to older versions."
33084 #: ../src/guestfs.pod:785
33086 "When modifying a filesystem from C or another language, you B<must> unmount "
33087 "all filesystems and call L</guestfs_sync> explicitly before you close the "
33088 "libguestfs handle. You can also call:"
33092 #: ../src/guestfs.pod:789
33095 " guestfs_set_autosync (g, 1);\n"
33100 #: ../src/guestfs.pod:791
33102 "to have the unmount/sync done automatically for you when the handle 'g' is "
33103 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
33107 #: ../src/guestfs.pod:795
33109 "If you forget to do this, then it is entirely possible that your changes "
33110 "won't be written out, or will be partially written, or (very rarely) that "
33111 "you'll get disk corruption."
33115 #: ../src/guestfs.pod:799
33117 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
33118 "guestfish scripts that forget to sync will work just fine, which can make "
33119 "this very puzzling if you are trying to debug a problem."
33123 #: ../src/guestfs.pod:803
33124 msgid "Mount option C<-o sync> should not be the default."
33128 #: ../src/guestfs.pod:805
33130 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
33131 "libguestfs 1.13.16. This section only applies to older versions."
33135 #: ../src/guestfs.pod:808
33137 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
33138 "However C<-o sync> does not add any reliability benefit, but does have a "
33139 "very large performance impact."
33143 #: ../src/guestfs.pod:812
33145 "The work around is to use L</guestfs_mount_options> and set the mount "
33146 "options that you actually want to use."
33150 #: ../src/guestfs.pod:815
33151 msgid "Read-only should be the default."
33155 #: ../src/guestfs.pod:817
33157 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
33158 "specify I<--rw> if you want to make changes to the image."
33162 #: ../src/guestfs.pod:820
33163 msgid "This would reduce the potential to corrupt live VM images."
33167 #: ../src/guestfs.pod:822
33169 "Note that many filesystems change the disk when you just mount and unmount, "
33170 "even if you didn't perform any writes. You need to use L</"
33171 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
33175 #: ../src/guestfs.pod:826
33176 msgid "guestfish command line is hard to use."
33180 #: ../src/guestfs.pod:828
33182 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
33183 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
33184 "exist, so it fails. In earlier versions of guestfish the error message was "
33185 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
33186 "we should have used C<guestfish -c command> to run commands."
33190 #: ../src/guestfs.pod:835
33191 msgid "guestfish megabyte modifiers don't work right on all commands"
33195 #: ../src/guestfs.pod:837
33197 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
33198 "other modifiers). What guestfish actually does is to multiply the number "
33199 "part by the modifier part and pass the result to the C API. However this "
33200 "doesn't work for a few APIs which aren't expecting bytes, but are already "
33201 "expecting some other unit (eg. megabytes)."
33205 #: ../src/guestfs.pod:844
33206 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
33210 #: ../src/guestfs.pod:846
33213 " lvcreate LV VG 100M\n"
33218 #: ../src/guestfs.pod:848
33220 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
33221 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
33222 "megabytes * megabytes) logical volume. The error message you get from this "
33223 "is also a little obscure."
33227 #: ../src/guestfs.pod:853
33229 "This could be fixed in the generator by specially marking parameters and "
33230 "return values which take bytes or other units."
33234 #: ../src/guestfs.pod:856
33235 msgid "Ambiguity between devices and paths"
33239 #: ../src/guestfs.pod:858
33241 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
33242 "sdb2>) and a similar pathname. A file might just happen to be called "
33243 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
33247 #: ../src/guestfs.pod:863
33249 "In the current API we usually resolve this ambiguity by having two separate "
33250 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
33251 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
33252 "detecting if the path supplied begins with C</dev/>."
33256 #: ../src/guestfs.pod:869
33258 "To avoid both the ambiguity and the need to duplicate some calls, we could "
33259 "make paths/devices into structured names. One way to do this would be to "
33260 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
33261 "aspect of grub. Another way would be to use a structured type, equivalent "
33262 "to this OCaml type:"
33266 #: ../src/guestfs.pod:875
33269 " type path = Path of string | Device of int | Partition of int * int\n"
33274 #: ../src/guestfs.pod:877
33275 msgid "which would allow you to pass arguments like:"
33279 #: ../src/guestfs.pod:879
33282 " Path \"/foo/bar\"\n"
33283 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
33284 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
33285 " Path \"/dev/sdb2\" (* not a device *)\n"
33290 #: ../src/guestfs.pod:884
33292 "As you can see there are still problems to resolve even with this "
33293 "representation. Also consider how it might work in guestfish."
33297 #: ../src/guestfs.pod:889
33298 msgid "KEYS AND PASSPHRASES"
33302 #: ../src/guestfs.pod:891
33304 "Certain libguestfs calls take a parameter that contains sensitive key "
33305 "material, passed in as a C string."
33309 #: ../src/guestfs.pod:894
33311 "In the future we would hope to change the libguestfs implementation so that "
33312 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
33313 "swap. However this is I<not> done at the moment, because of the complexity "
33314 "of such an implementation."
33318 #: ../src/guestfs.pod:899
33320 "Therefore you should be aware that any key parameter you pass to libguestfs "
33321 "might end up being written out to the swap partition. If this is a concern, "
33322 "scrub the swap partition or don't use libguestfs on encrypted devices."
33326 #: ../src/guestfs.pod:904
33327 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
33331 #: ../src/guestfs.pod:906
33333 "All high-level libguestfs actions are synchronous. If you want to use "
33334 "libguestfs asynchronously then you must create a thread."
33338 #: ../src/guestfs.pod:909
33340 "Only use the handle from a single thread. Either use the handle exclusively "
33341 "from one thread, or provide your own mutex so that two threads cannot issue "
33342 "calls on the same handle at the same time."
33346 #: ../src/guestfs.pod:913
33348 "See the graphical program guestfs-browser for one possible architecture for "
33349 "multithreaded programs using libvirt and libguestfs."
33353 #: ../src/guestfs.pod:916
33358 #: ../src/guestfs.pod:918
33360 "Libguestfs needs a supermin appliance, which it finds by looking along an "
33365 #: ../src/guestfs.pod:921
33367 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
33368 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
33372 #: ../src/guestfs.pod:924
33374 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
33375 "to change the directories that libguestfs will search in. The value is a "
33376 "colon-separated list of paths. The current directory is I<not> searched "
33377 "unless the path contains an empty element or C<.>. For example "
33378 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
33379 "then C</usr/lib/guestfs>."
33383 #: ../src/guestfs.pod:931
33384 msgid "QEMU WRAPPERS"
33388 #: ../src/guestfs.pod:933
33390 "If you want to compile your own qemu, run qemu from a non-standard location, "
33391 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
33396 #: ../src/guestfs.pod:937
33398 "There is one important rule to remember: you I<must C<exec qemu>> as the "
33399 "last command in the shell script (so that qemu replaces the shell and "
33400 "becomes the direct child of the libguestfs-using program). If you don't do "
33401 "this, then the qemu process won't be cleaned up correctly."
33405 #: ../src/guestfs.pod:942
33407 "Here is an example of a wrapper, where I have built my own copy of qemu from "
33412 #: ../src/guestfs.pod:945
33416 " qemudir=/home/rjones/d/qemu\n"
33417 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
33422 #: ../src/guestfs.pod:949
33424 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
33425 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
33430 #: ../src/guestfs.pod:953
33433 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
33438 #: ../src/guestfs.pod:955
33440 "Note that libguestfs also calls qemu with the -help and -version options in "
33441 "order to determine features."
33445 #: ../src/guestfs.pod:958
33447 "Wrappers can also be used to edit the options passed to qemu. In the "
33448 "following example, the C<-machine ...> option (C<-machine> and the following "
33449 "argument) are removed from the command line and replaced with C<-machine pc,"
33450 "accel=tcg>. The while loop iterates over the options until it finds the "
33451 "right one to remove, putting the remaining options into the C<args> array."
33455 #: ../src/guestfs.pod:965
33463 #: ../src/guestfs.pod:967
33467 " while [ $# -gt 0 ]; do\n"
33468 " case \"$1\" in\n"
33472 " args[i]=\"$1\"\n"
33481 #: ../src/guestfs.pod:979
33484 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
33489 #: ../src/guestfs.pod:981
33490 msgid "ATTACHING TO RUNNING DAEMONS"
33494 #: ../src/guestfs.pod:983
33496 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
33497 "babies. Use with caution."
33501 #: ../src/guestfs.pod:986
33503 "I<Note (2):> This section explains how to attach to a running daemon from a "
33504 "low level perspective. For most users, simply using virt tools such as "
33505 "L<guestfish(1)> with the I<--live> option will \"just work\"."
33509 #: ../src/guestfs.pod:990
33510 msgid "Using guestfs_set_attach_method"
33514 #: ../src/guestfs.pod:992
33516 "By calling L</guestfs_set_attach_method> you can change how the library "
33517 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
33518 "ARCHITECTURE> for some background)."
33522 #: ../src/guestfs.pod:996
33524 "The normal attach method is C<appliance>, where a small appliance is created "
33525 "containing the daemon, and then the library connects to this."
33529 #: ../src/guestfs.pod:999
33531 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
33532 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
33533 "daemon over the Unix domain socket."
33537 #: ../src/guestfs.pod:1003
33539 "The normal use for this is to connect to a running virtual machine that "
33540 "contains a C<guestfsd> daemon, and send commands so you can read and write "
33541 "files inside the live virtual machine."
33545 #: ../src/guestfs.pod:1007
33546 msgid "Using guestfs_add_domain with live flag"
33550 #: ../src/guestfs.pod:1009
33552 "L</guestfs_add_domain> provides some help for getting the correct attach "
33553 "method. If you pass the C<live> option to this function, then (if the "
33554 "virtual machine is running) it will examine the libvirt XML looking for a "
33555 "virtio-serial channel to connect to:"
33559 #: ../src/guestfs.pod:1015
33566 " <channel type='unix'>\n"
33567 " <source mode='bind' path='/path/to/socket'/>\n"
33568 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
33577 #: ../src/guestfs.pod:1027
33579 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
33580 "method to C<unix:/path/to/socket>."
33584 #: ../src/guestfs.pod:1030
33586 "Some of the libguestfs tools (including guestfish) support a I<--live> "
33587 "option which is passed through to L</guestfs_add_domain> thus allowing you "
33588 "to attach to and modify live virtual machines."
33592 #: ../src/guestfs.pod:1034
33594 "The virtual machine needs to have been set up beforehand so that it has the "
33595 "virtio-serial channel and so that guestfsd is running inside it."
33599 #: ../src/guestfs.pod:1038
33600 msgid "ABI GUARANTEE"
33604 #: ../src/guestfs.pod:1040
33606 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
33607 "actions as outlined in this section. Although we will deprecate some "
33608 "actions, for example if they get replaced by newer calls, we will keep the "
33609 "old actions forever. This allows you the developer to program in confidence "
33610 "against the libguestfs API."
33614 #: ../src/guestfs.pod:1046
33615 msgid "BLOCK DEVICE NAMING"
33619 #: ../src/guestfs.pod:1048
33621 "In the kernel there is now quite a profusion of schemata for naming block "
33622 "devices (in this context, by I<block device> I mean a physical or virtual "
33623 "hard drive). The original Linux IDE driver used names starting with C</dev/"
33624 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
33625 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
33626 "for the old IDE driver (particularly for SATA devices) those devices also "
33627 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
33628 "paravirtualized drivers. This has created several different naming systems, "
33629 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
33633 #: ../src/guestfs.pod:1060
33635 "As discussed above, libguestfs uses a qemu appliance running an embedded "
33636 "Linux kernel to access block devices. We can run a variety of appliances "
33637 "based on a variety of Linux kernels."
33641 #: ../src/guestfs.pod:1064
33643 "This causes a problem for libguestfs because many API calls use device or "
33644 "partition names. Working scripts and the recipe (example) scripts that we "
33645 "make available over the internet could fail if the naming scheme changes."
33649 #: ../src/guestfs.pod:1069
33651 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
33652 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
33653 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
33654 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
33658 #: ../src/guestfs.pod:1075
33660 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
33661 "L</guestfs_list_partitions> and similar calls return the true names of the "
33662 "devices and partitions as known to the appliance."
33666 #: ../src/guestfs.pod:1080
33667 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
33671 #: ../src/guestfs.pod:1082
33673 "Usually this translation is transparent. However in some (very rare) cases "
33674 "you may need to know the exact algorithm. Such cases include where you use "
33675 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
33676 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
33680 #: ../src/guestfs.pod:1088
33682 "The algorithm is applied only to I<parameters> which are known to be either "
33683 "device or partition names. Return values from functions such as L</"
33684 "guestfs_list_devices> are never changed."
33688 #: ../src/guestfs.pod:1096
33689 msgid "Is the string a parameter which is a device or partition name?"
33693 #: ../src/guestfs.pod:1100
33694 msgid "Does the string begin with C</dev/sd>?"
33698 #: ../src/guestfs.pod:1104
33700 "Does the named device exist? If so, we use that device. However if I<not> "
33701 "then we continue with this algorithm."
33705 #: ../src/guestfs.pod:1109
33706 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
33710 #: ../src/guestfs.pod:1111
33711 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
33715 #: ../src/guestfs.pod:1113
33716 msgid "If that named device exists, use it. If not, continue."
33720 #: ../src/guestfs.pod:1117
33721 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
33725 #: ../src/guestfs.pod:1119
33726 msgid "If that named device exists, use it. If not, return an error."
33730 #: ../src/guestfs.pod:1123
33731 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
33735 #: ../src/guestfs.pod:1125
33737 "Although the standard naming scheme and automatic translation is useful for "
33738 "simple programs and guestfish scripts, for larger programs it is best not to "
33739 "rely on this mechanism."
33743 #: ../src/guestfs.pod:1129
33745 "Where possible for maximum future portability programs using libguestfs "
33746 "should use these future-proof techniques:"
33750 #: ../src/guestfs.pod:1136
33752 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
33753 "device names, and then use those names directly."
33757 #: ../src/guestfs.pod:1139
33759 "Since those device names exist by definition, they will never be translated."
33763 #: ../src/guestfs.pod:1144
33765 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
33766 "filesystem labels."
33770 #: ../src/guestfs.pod:1149
33775 #: ../src/guestfs.pod:1151
33777 "This section discusses security implications of using libguestfs, "
33778 "particularly with untrusted or malicious guests or disk images."
33782 #: ../src/guestfs.pod:1154
33783 msgid "GENERAL SECURITY CONSIDERATIONS"
33787 #: ../src/guestfs.pod:1156
33789 "Be careful with any files or data that you download from a guest (by "
33790 "\"download\" we mean not just the L</guestfs_download> command but any "
33791 "command that reads files, filenames, directories or anything else from a "
33792 "disk image). An attacker could manipulate the data to fool your program "
33793 "into doing the wrong thing. Consider cases such as:"
33797 #: ../src/guestfs.pod:1166
33798 msgid "the data (file etc) not being present"
33802 #: ../src/guestfs.pod:1170
33803 msgid "being present but empty"
33807 #: ../src/guestfs.pod:1174
33808 msgid "being much larger than normal"
33812 #: ../src/guestfs.pod:1178
33813 msgid "containing arbitrary 8 bit data"
33817 #: ../src/guestfs.pod:1182
33818 msgid "being in an unexpected character encoding"
33822 #: ../src/guestfs.pod:1186
33823 msgid "containing homoglyphs."
33827 #: ../src/guestfs.pod:1190
33828 msgid "SECURITY OF MOUNTING FILESYSTEMS"
33832 #: ../src/guestfs.pod:1192
33834 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
33835 "(VFS) module can sometimes be escalated into exploits by deliberately "
33836 "creating a malicious, malformed filesystem. These exploits are very severe "
33837 "for two reasons. Firstly there are very many filesystem drivers in the "
33838 "kernel, and many of them are infrequently used and not much developer "
33839 "attention has been paid to the code. Linux userspace helps potential "
33840 "crackers by detecting the filesystem type and automatically choosing the "
33841 "right VFS driver, even if that filesystem type is obscure or unexpected for "
33842 "the administrator. Secondly, a kernel-level exploit is like a local root "
33843 "exploit (worse in some ways), giving immediate and total access to the "
33844 "system right down to the hardware level."
33848 #: ../src/guestfs.pod:1205
33850 "That explains why you should never mount a filesystem from an untrusted "
33851 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
33852 "inside a qemu virtual machine, usually running as a non-root user. The "
33853 "attacker would need to write a filesystem which first exploited the kernel, "
33854 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
33855 "the libguestfs protocol, and finally to be as serious as the host kernel "
33856 "exploit it would need to escalate its privileges to root. This multi-step "
33857 "escalation, performed by a static piece of data, is thought to be extremely "
33858 "hard to do, although we never say 'never' about security issues."
33862 #: ../src/guestfs.pod:1216
33864 "In any case callers can reduce the attack surface by forcing the filesystem "
33865 "type when mounting (use L</guestfs_mount_vfs>)."
33869 #: ../src/guestfs.pod:1219
33870 msgid "PROTOCOL SECURITY"
33874 #: ../src/guestfs.pod:1221
33876 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
33877 "defined upper message size. However a program that uses libguestfs must "
33878 "also take care - for example you can write a program that downloads a binary "
33879 "from a disk image and executes it locally, and no amount of protocol "
33880 "security will save you from the consequences."
33884 #: ../src/guestfs.pod:1227
33885 msgid "INSPECTION SECURITY"
33889 #: ../src/guestfs.pod:1229
33891 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
33892 "directly from the guest, and these could contain any 8 bit data. Callers "
33893 "should be careful to escape these before printing them to a structured file "
33894 "(for example, use HTML escaping if creating a web page)."
33898 #: ../src/guestfs.pod:1235
33900 "Guest configuration may be altered in unusual ways by the administrator of "
33901 "the virtual machine, and may not reflect reality (particularly for untrusted "
33902 "or actively malicious guests). For example we parse the hostname from "
33903 "configuration files like C</etc/sysconfig/network> that we find in the "
33904 "guest, but the guest administrator can easily manipulate these files to "
33905 "provide the wrong hostname."
33909 #: ../src/guestfs.pod:1243
33911 "The inspection API parses guest configuration using two external libraries: "
33912 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
33913 "designed to be robust in the face of malicious data, although denial of "
33914 "service attacks are still possible, for example with oversized configuration "
33919 #: ../src/guestfs.pod:1249
33920 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
33924 #: ../src/guestfs.pod:1251
33926 "Be very cautious about running commands from the guest. By running a "
33927 "command in the guest, you are giving CPU time to a binary that you do not "
33928 "control, under the same user account as the library, albeit wrapped in qemu "
33929 "virtualization. More information and alternatives can be found in the "
33930 "section L</RUNNING COMMANDS>."
33934 #: ../src/guestfs.pod:1257
33935 msgid "CVE-2010-3851"
33939 #: ../src/guestfs.pod:1259
33940 msgid "https://bugzilla.redhat.com/642934"
33944 #: ../src/guestfs.pod:1261
33946 "This security bug concerns the automatic disk format detection that qemu "
33947 "does on disk images."
33951 #: ../src/guestfs.pod:1264
33953 "A raw disk image is just the raw bytes, there is no header. Other disk "
33954 "images like qcow2 contain a special header. Qemu deals with this by looking "
33955 "for one of the known headers, and if none is found then assuming the disk "
33956 "image must be raw."
33960 #: ../src/guestfs.pod:1269
33962 "This allows a guest which has been given a raw disk image to write some "
33963 "other header. At next boot (or when the disk image is accessed by "
33964 "libguestfs) qemu would do autodetection and think the disk image format was, "
33965 "say, qcow2 based on the header written by the guest."
33969 #: ../src/guestfs.pod:1274
33971 "This in itself would not be a problem, but qcow2 offers many features, one "
33972 "of which is to allow a disk image to refer to another image (called the "
33973 "\"backing disk\"). It does this by placing the path to the backing disk "
33974 "into the qcow2 header. This path is not validated and could point to any "
33975 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
33976 "\"holes\" in the qcow2 disk image, which of course is completely under the "
33977 "control of the attacker."
33981 #: ../src/guestfs.pod:1282
33983 "In libguestfs this is rather hard to exploit except under two circumstances:"
33987 #: ../src/guestfs.pod:1289
33988 msgid "You have enabled the network or have opened the disk in write mode."
33992 #: ../src/guestfs.pod:1293
33994 "You are also running untrusted code from the guest (see L</RUNNING "
33999 #: ../src/guestfs.pod:1298
34001 "The way to avoid this is to specify the expected disk format when adding "
34002 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
34003 "should always do this if the disk is raw format, and it's a good idea for "
34008 #: ../src/guestfs.pod:1303
34010 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
34011 "format is fetched from libvirt and passed through."
34015 #: ../src/guestfs.pod:1306
34017 "For libguestfs tools, use the I<--format> command line parameter as "
34022 #: ../src/guestfs.pod:1309
34023 msgid "CONNECTION MANAGEMENT"
34027 #: ../src/guestfs.pod:1311
34028 msgid "guestfs_h *"
34032 #: ../src/guestfs.pod:1313
34034 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
34035 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
34036 "handle and release all resources used."
34040 #: ../src/guestfs.pod:1317
34042 "For information on using multiple handles and threads, see the section L</"
34043 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
34047 #: ../src/guestfs.pod:1320
34048 msgid "guestfs_create"
34052 #: ../src/guestfs.pod:1322
34055 " guestfs_h *guestfs_create (void);\n"
34060 #: ../src/guestfs.pod:1324
34061 msgid "Create a connection handle."
34065 #: ../src/guestfs.pod:1326
34067 "On success this returns a non-NULL pointer to a handle. On error it returns "
34072 #: ../src/guestfs.pod:1329
34074 "You have to \"configure\" the handle after creating it. This includes "
34075 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
34076 "handle at least once."
34080 #: ../src/guestfs.pod:1333
34081 msgid "After configuring the handle, you have to call L</guestfs_launch>."
34085 #: ../src/guestfs.pod:1335
34087 "You may also want to configure error handling for the handle. See the L</"
34088 "ERROR HANDLING> section below."
34092 #: ../src/guestfs.pod:1338
34093 msgid "guestfs_close"
34097 #: ../src/guestfs.pod:1340
34100 " void guestfs_close (guestfs_h *g);\n"
34105 #: ../src/guestfs.pod:1342
34106 msgid "This closes the connection handle and frees up all resources used."
34110 #: ../src/guestfs.pod:1344
34112 "If autosync was set on the handle and the handle was launched, then this "
34113 "implicitly calls various functions to unmount filesystems and sync the "
34114 "disk. See L</guestfs_set_autosync> for more details."
34118 #: ../src/guestfs.pod:1348
34119 msgid "If a close callback was set on the handle, then it is called."
34123 #: ../src/guestfs.pod:1350
34124 msgid "ERROR HANDLING"
34128 #: ../src/guestfs.pod:1352
34130 "API functions can return errors. For example, almost all functions that "
34131 "return C<int> will return C<-1> to indicate an error."
34135 #: ../src/guestfs.pod:1355
34137 "Additional information is available for errors: an error message string and "
34138 "optionally an error number (errno) if the thing that failed was a system "
34143 #: ../src/guestfs.pod:1359
34145 "You can get at the additional information about the last error on the handle "
34146 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
34147 "up an error handler with L</guestfs_set_error_handler>."
34151 #: ../src/guestfs.pod:1364
34153 "When the handle is created, a default error handler is installed which "
34154 "prints the error message string to C<stderr>. For small short-running "
34155 "command line programs it is sufficient to do:"
34159 #: ../src/guestfs.pod:1368
34162 " if (guestfs_launch (g) == -1)\n"
34163 " exit (EXIT_FAILURE);\n"
34168 #: ../src/guestfs.pod:1371
34170 "since the default error handler will ensure that an error message has been "
34171 "printed to C<stderr> before the program exits."
34175 #: ../src/guestfs.pod:1374
34177 "For other programs the caller will almost certainly want to install an "
34178 "alternate error handler or do error handling in-line like this:"
34182 #: ../src/guestfs.pod:1377
34185 " /* This disables the default behaviour of printing errors\n"
34187 " guestfs_set_error_handler (g, NULL, NULL);\n"
34192 #: ../src/guestfs.pod:1381
34195 " if (guestfs_launch (g) == -1) {\n"
34196 " /* Examine the error message and print it etc. */\n"
34197 " char *msg = guestfs_last_error (g);\n"
34198 " int errnum = guestfs_last_errno (g);\n"
34199 " fprintf (stderr, \"%s\", msg);\n"
34200 " if (errnum != 0)\n"
34201 " fprintf (stderr, \": %s\", strerror (errnum));\n"
34202 " fprintf (stderr, \"\\n\");\n"
34209 #: ../src/guestfs.pod:1392
34211 "Out of memory errors are handled differently. The default action is to call "
34212 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
34213 "guestfs_set_out_of_memory_handler>."
34217 #: ../src/guestfs.pod:1396
34219 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
34220 "because there is no handle if this happens there is no way to get additional "
34221 "error information. However L</guestfs_create> is supposed to be a "
34222 "lightweight operation which can only fail because of insufficient memory (it "
34223 "returns NULL in this case)."
34227 #: ../src/guestfs.pod:1402
34228 msgid "guestfs_last_error"
34232 #: ../src/guestfs.pod:1404
34235 " const char *guestfs_last_error (guestfs_h *g);\n"
34240 #: ../src/guestfs.pod:1406
34242 "This returns the last error message that happened on C<g>. If there has not "
34243 "been an error since the handle was created, then this returns C<NULL>."
34247 #: ../src/guestfs.pod:1410
34249 "The lifetime of the returned string is until the next error occurs, or L</"
34250 "guestfs_close> is called."
34254 #: ../src/guestfs.pod:1413
34255 msgid "guestfs_last_errno"
34259 #: ../src/guestfs.pod:1415
34262 " int guestfs_last_errno (guestfs_h *g);\n"
34267 #: ../src/guestfs.pod:1417
34268 msgid "This returns the last error number (errno) that happened on C<g>."
34272 #: ../src/guestfs.pod:1419
34273 msgid "If successful, an errno integer not equal to zero is returned."
34277 #: ../src/guestfs.pod:1421
34279 "If no error, this returns 0. This call can return 0 in three situations:"
34283 #: ../src/guestfs.pod:1428
34284 msgid "There has not been any error on the handle."
34288 #: ../src/guestfs.pod:1432
34290 "There has been an error but the errno was meaningless. This corresponds to "
34291 "the case where the error did not come from a failed system call, but for "
34292 "some other reason."
34296 #: ../src/guestfs.pod:1438
34298 "There was an error from a failed system call, but for some reason the errno "
34299 "was not captured and returned. This usually indicates a bug in libguestfs."
34303 #: ../src/guestfs.pod:1444
34305 "Libguestfs tries to convert the errno from inside the applicance into a "
34306 "corresponding errno for the caller (not entirely trivial: the appliance "
34307 "might be running a completely different operating system from the library "
34308 "and error numbers are not standardized across Un*xen). If this could not be "
34309 "done, then the error is translated to C<EINVAL>. In practice this should "
34310 "only happen in very rare circumstances."
34314 #: ../src/guestfs.pod:1452
34315 msgid "guestfs_set_error_handler"
34319 #: ../src/guestfs.pod:1454
34322 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
34324 " const char *msg);\n"
34325 " void guestfs_set_error_handler (guestfs_h *g,\n"
34326 " guestfs_error_handler_cb cb,\n"
34327 " void *opaque);\n"
34332 #: ../src/guestfs.pod:1461
34334 "The callback C<cb> will be called if there is an error. The parameters "
34335 "passed to the callback are an opaque data pointer and the error message "
34340 #: ../src/guestfs.pod:1465
34342 "C<errno> is not passed to the callback. To get that the callback must call "
34343 "L</guestfs_last_errno>."
34347 #: ../src/guestfs.pod:1468
34349 "Note that the message string C<msg> is freed as soon as the callback "
34350 "function returns, so if you want to stash it somewhere you must make your "
34355 #: ../src/guestfs.pod:1472
34356 msgid "The default handler prints messages on C<stderr>."
34360 #: ../src/guestfs.pod:1474
34361 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
34365 #: ../src/guestfs.pod:1476
34366 msgid "guestfs_get_error_handler"
34370 #: ../src/guestfs.pod:1478
34373 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
34374 " void **opaque_rtn);\n"
34379 #: ../src/guestfs.pod:1481
34380 msgid "Returns the current error handler callback."
34384 #: ../src/guestfs.pod:1483
34385 msgid "guestfs_set_out_of_memory_handler"
34389 #: ../src/guestfs.pod:1485
34392 " typedef void (*guestfs_abort_cb) (void);\n"
34393 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
34394 " guestfs_abort_cb);\n"
34399 #: ../src/guestfs.pod:1489
34401 "The callback C<cb> will be called if there is an out of memory situation. "
34402 "I<Note this callback must not return>."
34406 #: ../src/guestfs.pod:1492
34407 msgid "The default is to call L<abort(3)>."
34411 #: ../src/guestfs.pod:1494
34413 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
34417 #: ../src/guestfs.pod:1497
34418 msgid "guestfs_get_out_of_memory_handler"
34422 #: ../src/guestfs.pod:1499
34425 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
34430 #: ../src/guestfs.pod:1501
34431 msgid "This returns the current out of memory handler."
34435 #: ../src/guestfs.pod:1503
34440 #: ../src/guestfs.pod:1507
34445 #: ../src/guestfs.pod:1509
34450 #: ../src/guestfs.pod:1511
34451 msgid "AVAILABILITY"
34455 #: ../src/guestfs.pod:1513
34456 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
34460 #: ../src/guestfs.pod:1515
34462 "Using L</guestfs_available> you can test availability of the following "
34463 "groups of functions. This test queries the appliance to see if the "
34464 "appliance you are currently using supports the functionality."
34468 #: ../src/guestfs.pod:1520
34469 msgid "@AVAILABILITY@"
34473 #: ../src/guestfs.pod:1522
34474 msgid "GUESTFISH supported COMMAND"
34478 #: ../src/guestfs.pod:1524
34480 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
34481 "prints out the available groups and whether they are supported by this build "
34482 "of libguestfs. Note however that you have to do C<run> first."
34486 #: ../src/guestfs.pod:1529
34487 msgid "SINGLE CALLS AT COMPILE TIME"
34491 #: ../src/guestfs.pod:1531
34493 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
34494 "function, such as:"
34498 #: ../src/guestfs.pod:1534
34501 " #define LIBGUESTFS_HAVE_DD 1\n"
34506 #: ../src/guestfs.pod:1536
34507 msgid "if L</guestfs_dd> is available."
34511 #: ../src/guestfs.pod:1538
34513 "Before version 1.5.8, if you needed to test whether a single libguestfs "
34514 "function is available at compile time, we recommended using build tools such "
34515 "as autoconf or cmake. For example in autotools you could use:"
34519 #: ../src/guestfs.pod:1543
34522 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
34523 " AC_CHECK_FUNCS([guestfs_dd])\n"
34528 #: ../src/guestfs.pod:1546
34530 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
34535 #: ../src/guestfs.pod:1549
34536 msgid "SINGLE CALLS AT RUN TIME"
34540 #: ../src/guestfs.pod:1551
34542 "Testing at compile time doesn't guarantee that a function really exists in "
34543 "the library. The reason is that you might be dynamically linked against a "
34544 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
34545 "This situation unfortunately results in a segmentation fault, which is a "
34546 "shortcoming of the C dynamic linking system itself."
34550 #: ../src/guestfs.pod:1558
34552 "You can use L<dlopen(3)> to test if a function is available at run time, as "
34553 "in this example program (note that you still need the compile time check as "
34558 #: ../src/guestfs.pod:1562
34561 " #include <stdio.h>\n"
34562 " #include <stdlib.h>\n"
34563 " #include <unistd.h>\n"
34564 " #include <dlfcn.h>\n"
34565 " #include <guestfs.h>\n"
34570 #: ../src/guestfs.pod:1568
34575 " #ifdef LIBGUESTFS_HAVE_DD\n"
34577 " int has_function;\n"
34582 #: ../src/guestfs.pod:1574
34585 " /* Test if the function guestfs_dd is really available. */\n"
34586 " dl = dlopen (NULL, RTLD_LAZY);\n"
34588 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
34589 " exit (EXIT_FAILURE);\n"
34591 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
34597 #: ../src/guestfs.pod:1583
34600 " if (!has_function)\n"
34601 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
34603 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
34604 " /* Now it's safe to call\n"
34605 " guestfs_dd (g, \"foo\", \"bar\");\n"
34609 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
34616 #: ../src/guestfs.pod:1596
34618 "You may think the above is an awful lot of hassle, and it is. There are "
34619 "other ways outside of the C linking system to ensure that this kind of "
34620 "incompatibility never arises, such as using package versioning:"
34624 #: ../src/guestfs.pod:1601
34627 " Requires: libguestfs >= 1.0.80\n"
34632 #: ../src/guestfs.pod:1603
34633 msgid "CALLS WITH OPTIONAL ARGUMENTS"
34637 #: ../src/guestfs.pod:1605
34639 "A recent feature of the API is the introduction of calls which take optional "
34640 "arguments. In C these are declared 3 ways. The main way is as a call which "
34641 "takes variable arguments (ie. C<...>), as in this example:"
34645 #: ../src/guestfs.pod:1610
34648 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
34653 #: ../src/guestfs.pod:1612
34655 "Call this with a list of optional arguments, terminated by C<-1>. So to "
34656 "call with no optional arguments specified:"
34660 #: ../src/guestfs.pod:1615
34663 " guestfs_add_drive_opts (g, filename, -1);\n"
34668 #: ../src/guestfs.pod:1617
34669 msgid "With a single optional argument:"
34673 #: ../src/guestfs.pod:1619
34676 " guestfs_add_drive_opts (g, filename,\n"
34677 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
34683 #: ../src/guestfs.pod:1623
34688 #: ../src/guestfs.pod:1625
34691 " guestfs_add_drive_opts (g, filename,\n"
34692 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
34693 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
34699 #: ../src/guestfs.pod:1630
34701 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
34706 #: ../src/guestfs.pod:1633
34707 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
34711 #: ../src/guestfs.pod:1635
34713 "The second variant has the same name with the suffix C<_va>, which works the "
34714 "same way but takes a C<va_list>. See the C manual for details. For the "
34715 "example function, this is declared:"
34719 #: ../src/guestfs.pod:1639
34722 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
34723 " va_list args);\n"
34728 #: ../src/guestfs.pod:1642
34729 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
34733 #: ../src/guestfs.pod:1644
34735 "The third variant is useful where you need to construct these calls. You "
34736 "pass in a structure where you fill in the optional fields. The structure "
34737 "has a bitmask as the first element which you must set to indicate which "
34738 "fields you have filled in. For our example function the structure and call "
34743 #: ../src/guestfs.pod:1650
34746 " struct guestfs_add_drive_opts_argv {\n"
34747 " uint64_t bitmask;\n"
34749 " const char *format;\n"
34752 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
34753 " const struct guestfs_add_drive_opts_argv *optargs);\n"
34758 #: ../src/guestfs.pod:1659
34759 msgid "You could call it like this:"
34763 #: ../src/guestfs.pod:1661
34766 " struct guestfs_add_drive_opts_argv optargs = {\n"
34767 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
34768 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
34769 " .readonly = 1,\n"
34770 " .format = \"qcow2\"\n"
34776 #: ../src/guestfs.pod:1668
34779 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
34784 #: ../src/guestfs.pod:1676
34785 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
34789 #: ../src/guestfs.pod:1681
34790 msgid "You do not need to fill in all fields of the structure."
34794 #: ../src/guestfs.pod:1685
34796 "There must be a one-to-one correspondence between fields of the structure "
34797 "that are filled in, and bits set in the bitmask."
34801 #: ../src/guestfs.pod:1690
34802 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
34806 #: ../src/guestfs.pod:1692
34808 "In other languages, optional arguments are expressed in the way that is "
34809 "natural for that language. We refer you to the language-specific "
34810 "documentation for more details on that."
34814 #: ../src/guestfs.pod:1696
34815 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
34819 #: ../src/guestfs.pod:1698
34820 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
34824 #: ../src/guestfs.pod:1700
34826 "B<Note:> This section documents the generic event mechanism introduced in "
34827 "libguestfs 1.10, which you should use in new code if possible. The old "
34828 "functions C<guestfs_set_log_message_callback>, "
34829 "C<guestfs_set_subprocess_quit_callback>, "
34830 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
34831 "C<guestfs_set_progress_callback> are no longer documented in this manual "
34832 "page. Because of the ABI guarantee, the old functions continue to work."
34836 #: ../src/guestfs.pod:1709
34838 "Handles generate events when certain things happen, such as log messages "
34839 "being generated, progress messages during long-running operations, or the "
34840 "handle being closed. The API calls described below let you register a "
34841 "callback to be called when events happen. You can register multiple "
34842 "callbacks (for the same, different or overlapping sets of events), and "
34843 "individually remove callbacks. If callbacks are not removed, then they "
34844 "remain in force until the handle is closed."
34848 #: ../src/guestfs.pod:1717
34850 "In the current implementation, events are only generated synchronously: that "
34851 "means that events (and hence callbacks) can only happen while you are in the "
34852 "middle of making another libguestfs call. The callback is called in the "
34857 #: ../src/guestfs.pod:1722
34859 "Events may contain a payload, usually nothing (void), an array of 64 bit "
34860 "unsigned integers, or a message buffer. Payloads are discussed later on."
34864 #: ../src/guestfs.pod:1726
34865 msgid "CLASSES OF EVENTS"
34869 #: ../src/guestfs.pod:1730
34870 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
34874 #: ../src/guestfs.pod:1733
34876 "The callback function will be called while the handle is being closed "
34877 "(synchronously from L</guestfs_close>)."
34881 #: ../src/guestfs.pod:1736
34883 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
34884 "handles that are open when the program exits. This means that this callback "
34885 "might be called indirectly from L<exit(3)>, which can cause unexpected "
34886 "problems in higher-level languages (eg. if your HLL interpreter has already "
34887 "been cleaned up by the time this is called, and if your callback then jumps "
34888 "into some HLL function)."
34892 #: ../src/guestfs.pod:1743
34894 "If no callback is registered: the handle is closed without any callback "
34899 #: ../src/guestfs.pod:1746
34900 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
34904 #: ../src/guestfs.pod:1749
34906 "The callback function will be called when the child process quits, either "
34907 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
34908 "corresponds to a transition from any state to the CONFIG state)."
34912 #: ../src/guestfs.pod:1753 ../src/guestfs.pod:1762 ../src/guestfs.pod:1879
34913 msgid "If no callback is registered: the event is ignored."
34917 #: ../src/guestfs.pod:1755
34918 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
34922 #: ../src/guestfs.pod:1758
34924 "The callback function will be called when the child process becomes ready "
34925 "first time after it has been launched. (This corresponds to a transition "
34926 "from LAUNCHING to the READY state)."
34930 #: ../src/guestfs.pod:1764
34931 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
34935 #: ../src/guestfs.pod:1767
34937 "Some long-running operations can generate progress messages. If this "
34938 "callback is registered, then it will be called each time a progress message "
34939 "is generated (usually two seconds after the operation started, and three "
34940 "times per second thereafter until it completes, although the frequency may "
34941 "change in future versions)."
34945 #: ../src/guestfs.pod:1773
34947 "The callback receives in the payload four unsigned 64 bit numbers which are "
34948 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
34952 #: ../src/guestfs.pod:1776
34954 "The units of C<total> are not defined, although for some operations C<total> "
34955 "may relate in some way to the amount of data to be transferred (eg. in bytes "
34956 "or megabytes), and C<position> may be the portion which has been transferred."
34960 #: ../src/guestfs.pod:1781
34961 msgid "The only defined and stable parts of the API are:"
34965 #: ../src/guestfs.pod:1787
34967 "The callback can display to the user some type of progress bar or indicator "
34968 "which shows the ratio of C<position>:C<total>."
34972 #: ../src/guestfs.pod:1792
34973 msgid "0 E<lt>= C<position> E<lt>= C<total>"
34977 #: ../src/guestfs.pod:1796
34979 "If any progress notification is sent during a call, then a final progress "
34980 "notification is always sent when C<position> = C<total> (I<unless> the call "
34981 "fails with an error)."
34985 #: ../src/guestfs.pod:1800
34987 "This is to simplify caller code, so callers can easily set the progress "
34988 "indicator to \"100%\" at the end of the operation, without requiring special "
34989 "code to detect this case."
34993 #: ../src/guestfs.pod:1806
34995 "For some calls we are unable to estimate the progress of the call, but we "
34996 "can still generate progress messages to indicate activity. This is known as "
34997 "\"pulse mode\", and is directly supported by certain progress bar "
34998 "implementations (eg. GtkProgressBar)."
35002 #: ../src/guestfs.pod:1811
35004 "For these calls, zero or more progress messages are generated with "
35005 "C<position = 0> and C<total = 1>, followed by a final message with "
35006 "C<position = total = 1>."
35010 #: ../src/guestfs.pod:1815
35012 "As noted above, if the call fails with an error then the final message may "
35013 "not be generated."
35017 #: ../src/guestfs.pod:1820
35019 "The callback also receives the procedure number (C<proc_nr>) and serial "
35020 "number (C<serial>) of the call. These are only useful for debugging "
35021 "protocol issues, and the callback can normally ignore them. The callback "
35022 "may want to print these numbers in error messages or debugging messages."
35026 #: ../src/guestfs.pod:1826
35027 msgid "If no callback is registered: progress messages are discarded."
35031 #: ../src/guestfs.pod:1828
35032 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
35036 #: ../src/guestfs.pod:1831
35038 "The callback function is called whenever a log message is generated by qemu, "
35039 "the appliance kernel, guestfsd (daemon), or utility programs."
35043 #: ../src/guestfs.pod:1834
35045 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
35046 "guestfs_launch>) then additional debug messages are generated."
35050 #: ../src/guestfs.pod:1837 ../src/guestfs.pod:1851
35052 "If no callback is registered: the messages are discarded unless the verbose "
35053 "flag is set in which case they are sent to stderr. You can override the "
35054 "printing of verbose messages to stderr by setting up a callback."
35058 #: ../src/guestfs.pod:1842
35059 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
35063 #: ../src/guestfs.pod:1845
35065 "The callback function is called whenever a log message is generated by the "
35066 "library part of libguestfs."
35070 #: ../src/guestfs.pod:1848
35072 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
35073 "messages are generated."
35077 #: ../src/guestfs.pod:1856
35078 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
35082 #: ../src/guestfs.pod:1859
35084 "The callback function is called whenever a trace message is generated. This "
35085 "only applies if the trace flag (L</guestfs_set_trace>) is set."
35089 #: ../src/guestfs.pod:1862
35091 "If no callback is registered: the messages are sent to stderr. You can "
35092 "override the printing of trace messages to stderr by setting up a callback."
35096 #: ../src/guestfs.pod:1866
35097 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
35101 #: ../src/guestfs.pod:1869
35103 "The callback function is called whenever a libguestfs function is entered."
35107 #: ../src/guestfs.pod:1872
35109 "The payload is a string which contains the name of the function that we are "
35110 "entering (not including C<guestfs_> prefix)."
35114 #: ../src/guestfs.pod:1875
35116 "Note that libguestfs functions can call themselves, so you may see many "
35117 "events from a single call. A few libguestfs functions do not generate this "
35122 #: ../src/guestfs.pod:1883
35123 msgid "guestfs_set_event_callback"
35127 #: ../src/guestfs.pod:1885
35130 " int guestfs_set_event_callback (guestfs_h *g,\n"
35131 " guestfs_event_callback cb,\n"
35132 " uint64_t event_bitmask,\n"
35134 " void *opaque);\n"
35139 #: ../src/guestfs.pod:1891
35141 "This function registers a callback (C<cb>) for all event classes in the "
35142 "C<event_bitmask>."
35146 #: ../src/guestfs.pod:1894
35148 "For example, to register for all log message events, you could call this "
35149 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
35150 "To register a single callback for all possible classes of events, use "
35151 "C<GUESTFS_EVENT_ALL>."
35155 #: ../src/guestfs.pod:1900
35156 msgid "C<flags> should always be passed as 0."
35160 #: ../src/guestfs.pod:1902
35162 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
35163 "it for any purpose."
35167 #: ../src/guestfs.pod:1905
35169 "The return value is the event handle (an integer) which you can use to "
35170 "delete the callback (see below)."
35174 #: ../src/guestfs.pod:1908
35176 "If there is an error, this function returns C<-1>, and sets the error in the "
35177 "handle in the usual way (see L</guestfs_last_error> etc.)"
35181 #: ../src/guestfs.pod:1911
35183 "Callbacks remain in effect until they are deleted, or until the handle is "
35188 #: ../src/guestfs.pod:1914
35190 "In the case where multiple callbacks are registered for a particular event "
35191 "class, all of the callbacks are called. The order in which multiple "
35192 "callbacks are called is not defined."
35196 #: ../src/guestfs.pod:1918
35197 msgid "guestfs_delete_event_callback"
35201 #: ../src/guestfs.pod:1920
35204 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
35209 #: ../src/guestfs.pod:1922
35211 "Delete a callback that was previously registered. C<event_handle> should be "
35212 "the integer that was returned by a previous call to "
35213 "C<guestfs_set_event_callback> on the same handle."
35217 #: ../src/guestfs.pod:1926
35218 msgid "guestfs_event_callback"
35222 #: ../src/guestfs.pod:1928
35225 " typedef void (*guestfs_event_callback) (\n"
35228 " uint64_t event,\n"
35229 " int event_handle,\n"
35231 " const char *buf, size_t buf_len,\n"
35232 " const uint64_t *array, size_t array_len);\n"
35237 #: ../src/guestfs.pod:1937
35239 "This is the type of the event callback function that you have to provide."
35243 #: ../src/guestfs.pod:1940
35245 "The basic parameters are: the handle (C<g>), the opaque user pointer "
35246 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
35247 "handle, and C<flags> which in the current API you should ignore."
35251 #: ../src/guestfs.pod:1944
35253 "The remaining parameters contain the event payload (if any). Each event may "
35254 "contain a payload, which usually relates to the event class, but for future "
35255 "proofing your code should be written to handle any payload for any event "
35260 #: ../src/guestfs.pod:1949
35262 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
35263 "there is no message buffer). Note that this message buffer can contain "
35264 "arbitrary 8 bit data, including NUL bytes."
35268 #: ../src/guestfs.pod:1953
35270 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
35271 "moment this is only used for progress messages."
35275 #: ../src/guestfs.pod:1956
35276 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
35280 #: ../src/guestfs.pod:1958
35282 "One motivation for the generic event API was to allow GUI programs to "
35283 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
35284 "unconditionally to C<stderr>."
35288 #: ../src/guestfs.pod:1962
35290 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
35291 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
35292 "messages are not events; you must capture error messages separately)."
35296 #: ../src/guestfs.pod:1967
35298 "Programs have to set up a callback to capture the classes of events of "
35303 #: ../src/guestfs.pod:1970
35307 " guestfs_set_event_callback\n"
35308 " (g, message_callback,\n"
35309 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
35310 " GUESTFS_EVENT_TRACE,\n"
35311 " 0, NULL) == -1)\n"
35312 " if (eh == -1) {\n"
35313 " // handle error in the usual way\n"
35319 #: ../src/guestfs.pod:1980
35321 "The callback can then direct messages to the appropriate place. In this "
35322 "example, messages are directed to syslog:"
35326 #: ../src/guestfs.pod:1983
35330 " message_callback (\n"
35333 " uint64_t event,\n"
35334 " int event_handle,\n"
35336 " const char *buf, size_t buf_len,\n"
35337 " const uint64_t *array, size_t array_len)\n"
35339 " const int priority = LOG_USER|LOG_INFO;\n"
35340 " if (buf_len > 0)\n"
35341 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
35347 #: ../src/guestfs.pod:1998
35348 msgid "CANCELLING LONG TRANSFERS"
35352 #: ../src/guestfs.pod:2000
35354 "Some operations can be cancelled by the caller while they are in progress. "
35355 "Currently only operations that involve uploading or downloading data can be "
35356 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
35357 "parameters in the generator)."
35361 #: ../src/guestfs.pod:2005
35362 msgid "guestfs_user_cancel"
35366 #: ../src/guestfs.pod:2007
35369 " void guestfs_user_cancel (guestfs_h *g);\n"
35374 #: ../src/guestfs.pod:2009
35376 "C<guestfs_user_cancel> cancels the current upload or download operation."
35380 #: ../src/guestfs.pod:2012
35382 "Unlike most other libguestfs calls, this function is signal safe and thread "
35383 "safe. You can call it from a signal handler or from another thread, without "
35384 "needing to do any locking."
35388 #: ../src/guestfs.pod:2016
35390 "The transfer that was in progress (if there is one) will stop shortly "
35391 "afterwards, and will return an error. The errno (see L</"
35392 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
35393 "out if the operation was cancelled or failed because of another error."
35397 #: ../src/guestfs.pod:2022
35399 "No cleanup is performed: for example, if a file was being uploaded then "
35400 "after cancellation there may be a partially uploaded file. It is the "
35401 "caller's responsibility to clean up if necessary."
35405 #: ../src/guestfs.pod:2026
35406 msgid "There are two common places that you might call C<guestfs_user_cancel>."
35410 #: ../src/guestfs.pod:2028
35412 "In an interactive text-based program, you might call it from a C<SIGINT> "
35413 "signal handler so that pressing C<^C> cancels the current operation. (You "
35414 "also need to call L</guestfs_set_pgroup> so that child processes don't "
35415 "receive the C<^C> signal)."
35419 #: ../src/guestfs.pod:2033
35421 "In a graphical program, when the main thread is displaying a progress bar "
35422 "with a cancel button, wire up the cancel button to call this function."
35426 #: ../src/guestfs.pod:2037
35427 msgid "PRIVATE DATA AREA"
35431 #: ../src/guestfs.pod:2039
35433 "You can attach named pieces of private data to the libguestfs handle, fetch "
35434 "them by name, and walk over them, for the lifetime of the handle. This is "
35435 "called the private data area and is only available from the C API."
35439 #: ../src/guestfs.pod:2044
35440 msgid "To attach a named piece of data, use the following call:"
35444 #: ../src/guestfs.pod:2046
35447 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
35452 #: ../src/guestfs.pod:2048
35454 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
35455 "pointer (which can be C<NULL>). Any previous item with the same key is "
35460 #: ../src/guestfs.pod:2052
35462 "You can use any C<key> you want, but your key should I<not> start with an "
35463 "underscore character. Keys beginning with an underscore character are "
35464 "reserved for internal libguestfs purposes (eg. for implementing language "
35465 "bindings). It is recommended that you prefix the key with some unique "
35466 "string to avoid collisions with other users."
35470 #: ../src/guestfs.pod:2058
35471 msgid "To retrieve the pointer, use:"
35475 #: ../src/guestfs.pod:2060
35478 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
35483 #: ../src/guestfs.pod:2062
35485 "This function returns C<NULL> if either no data is found associated with "
35486 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
35491 #: ../src/guestfs.pod:2066
35493 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
35494 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
35495 "all. In particular, libguestfs does I<not> try to free the data when the "
35496 "handle is closed. If the data must be freed, then the caller must either "
35497 "free it before calling L</guestfs_close> or must set up a close callback to "
35498 "do it (see L</GUESTFS_EVENT_CLOSE>)."
35502 #: ../src/guestfs.pod:2073
35503 msgid "To walk over all entries, use these two functions:"
35507 #: ../src/guestfs.pod:2075
35510 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
35515 #: ../src/guestfs.pod:2077
35518 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
35523 #: ../src/guestfs.pod:2079
35525 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
35526 "not have any particular meaning -- keys are not returned in any defined "
35527 "order). A pointer to the key is returned in C<*key_rtn> and the "
35528 "corresponding data pointer is returned from the function. C<NULL> is "
35529 "returned if there are no keys stored in the handle."
35533 #: ../src/guestfs.pod:2085
35535 "C<guestfs_next_private> returns the next key, pointer pair. The return "
35536 "value of this function is also C<NULL> is there are no further entries to "
35541 #: ../src/guestfs.pod:2089
35542 msgid "Notes about walking over entries:"
35546 #: ../src/guestfs.pod:2095
35548 "You must not call C<guestfs_set_private> while walking over the entries."
35552 #: ../src/guestfs.pod:2100
35554 "The handle maintains an internal iterator which is reset when you call "
35555 "C<guestfs_first_private>. This internal iterator is invalidated when you "
35556 "call C<guestfs_set_private>."
35560 #: ../src/guestfs.pod:2106
35561 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
35565 #: ../src/guestfs.pod:2108
35568 " guestfs_set_private (g, key, NULL);\n"
35573 #: ../src/guestfs.pod:2110
35574 msgid "then that C<key> is not returned when walking."
35578 #: ../src/guestfs.pod:2114
35580 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
35581 "C<guestfs_next_private> or C<guestfs_set_private>."
35585 #: ../src/guestfs.pod:2120
35587 "The following example code shows how to print all keys and data pointers "
35588 "that are associated with the handle C<g>:"
35592 #: ../src/guestfs.pod:2123
35595 " const char *key;\n"
35596 " void *data = guestfs_first_private (g, &key);\n"
35597 " while (data != NULL)\n"
35599 " printf (\"key = %s, data = %p\\n\", key, data);\n"
35600 " data = guestfs_next_private (g, &key);\n"
35606 #: ../src/guestfs.pod:2131
35608 "More commonly you are only interested in keys that begin with an application-"
35609 "specific prefix C<foo_>. Modify the loop like so:"
35613 #: ../src/guestfs.pod:2134
35616 " const char *key;\n"
35617 " void *data = guestfs_first_private (g, &key);\n"
35618 " while (data != NULL)\n"
35620 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
35621 " printf (\"key = %s, data = %p\\n\", key, data);\n"
35622 " data = guestfs_next_private (g, &key);\n"
35628 #: ../src/guestfs.pod:2143
35630 "If you need to modify keys while walking, then you have to jump back to the "
35631 "beginning of the loop. For example, to delete all keys prefixed with "
35636 #: ../src/guestfs.pod:2147
35639 " const char *key;\n"
35642 " data = guestfs_first_private (g, &key);\n"
35643 " while (data != NULL)\n"
35645 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
35647 " guestfs_set_private (g, key, NULL);\n"
35648 " /* note that 'key' pointer is now invalid, and so is\n"
35649 " the internal iterator */\n"
35652 " data = guestfs_next_private (g, &key);\n"
35658 #: ../src/guestfs.pod:2163
35660 "Note that the above loop is guaranteed to terminate because the keys are "
35661 "being deleted, but other manipulations of keys within the loop might not "
35662 "terminate unless you also maintain an indication of which keys have been "
35667 #: ../src/guestfs.pod:2168 ../src/guestfs.pod:2173
35672 #: ../src/guestfs.pod:2170
35674 "<!-- old anchor for the next section --> <a name="
35675 "\"state_machine_and_low_level_event_api\"/>"
35679 #: ../src/guestfs.pod:2175
35680 msgid "ARCHITECTURE"
35684 #: ../src/guestfs.pod:2177
35686 "Internally, libguestfs is implemented by running an appliance (a special "
35687 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
35688 "process of the main program."
35692 #: ../src/guestfs.pod:2181
35695 " ___________________\n"
35697 " | main program |\n"
35699 " | | child process / appliance\n"
35700 " | | __________________________\n"
35702 " +-------------------+ RPC | +-----------------+ |\n"
35703 " | libguestfs <--------------------> guestfsd | |\n"
35704 " | | | +-----------------+ |\n"
35705 " \\___________________/ | | Linux kernel | |\n"
35706 " | +--^--------------+ |\n"
35707 " \\_________|________________/\n"
35709 " _______v______\n"
35712 " | disk image |\n"
35713 " \\______________/\n"
35718 #: ../src/guestfs.pod:2201
35720 "The library, linked to the main program, creates the child process and hence "
35721 "the appliance in the L</guestfs_launch> function."
35725 #: ../src/guestfs.pod:2204
35727 "Inside the appliance is a Linux kernel and a complete stack of userspace "
35728 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
35729 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
35730 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
35731 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
35732 "attached to the qemu process which translates device access by the "
35733 "appliance's Linux kernel into accesses to the image."
35737 #: ../src/guestfs.pod:2213
35739 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
35740 "Although the disk image you are attached to might also be used by some "
35741 "virtual machine, libguestfs doesn't know or care about this. (But you will "
35742 "care if both libguestfs's qemu process and your virtual machine are trying "
35743 "to update the disk image at the same time, since these usually results in "
35744 "massive disk corruption)."
35748 #: ../src/guestfs.pod:2220
35749 msgid "STATE MACHINE"
35753 #: ../src/guestfs.pod:2222
35754 msgid "libguestfs uses a state machine to model the child process:"
35758 #: ../src/guestfs.pod:2224
35762 " guestfs_create\n"
35770 " / | \\ \\ guestfs_launch\n"
35771 " / | _\\__V______\n"
35773 " / | | LAUNCHING |\n"
35774 " / | \\___________/\n"
35776 " / | guestfs_launch\n"
35778 " ______ / __|____V\n"
35779 " / \\ ------> / \\\n"
35780 " | BUSY | | READY |\n"
35781 " \\______/ <------ \\________/\n"
35786 #: ../src/guestfs.pod:2246
35788 "The normal transitions are (1) CONFIG (when the handle is created, but there "
35789 "is no child process), (2) LAUNCHING (when the child process is booting up), "
35790 "(3) alternating between READY and BUSY as commands are issued to, and "
35791 "carried out by, the child process."
35795 #: ../src/guestfs.pod:2251
35797 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
35798 "asynchronously at any time (eg. due to some internal error), and that causes "
35799 "the state to transition back to CONFIG."
35803 #: ../src/guestfs.pod:2255
35805 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
35806 "issued when in the CONFIG state."
35810 #: ../src/guestfs.pod:2258
35812 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
35813 "L</guestfs_launch> blocks until the child process is READY to accept "
35814 "commands (or until some failure or timeout). L</guestfs_launch> internally "
35815 "moves the state from CONFIG to LAUNCHING while it is running."
35819 #: ../src/guestfs.pod:2264
35821 "API actions such as L</guestfs_mount> can only be issued when in the READY "
35822 "state. These API calls block waiting for the command to be carried out (ie. "
35823 "the state to transition to BUSY and then back to READY). There are no non-"
35824 "blocking versions, and no way to issue more than one command per handle at "
35829 #: ../src/guestfs.pod:2270
35831 "Finally, the child process sends asynchronous messages back to the main "
35832 "program, such as kernel log messages. You can register a callback to "
35833 "receive these messages."
35837 #: ../src/guestfs.pod:2274
35842 #: ../src/guestfs.pod:2276
35843 msgid "APPLIANCE BOOT PROCESS"
35847 #: ../src/guestfs.pod:2278
35849 "This process has evolved and continues to evolve. The description here "
35850 "corresponds only to the current version of libguestfs and is provided for "
35851 "information only."
35855 #: ../src/guestfs.pod:2282
35857 "In order to follow the stages involved below, enable libguestfs debugging "
35858 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
35862 #: ../src/guestfs.pod:2287
35863 msgid "Create the appliance"
35867 #: ../src/guestfs.pod:2289
35869 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
35870 "initrd and the appliance."
35874 #: ../src/guestfs.pod:2292
35876 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
35877 "directory if C<TMPDIR> is set)."
35881 #: ../src/guestfs.pod:2295
35883 "For a complete description of how the appliance is created and cached, read "
35884 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
35888 #: ../src/guestfs.pod:2299
35889 msgid "Start qemu and boot the kernel"
35893 #: ../src/guestfs.pod:2301
35894 msgid "qemu is invoked to boot the kernel."
35898 #: ../src/guestfs.pod:2303
35899 msgid "Run the initrd"
35903 #: ../src/guestfs.pod:2305
35905 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
35906 "appliance. The purpose of the initrd is to load enough kernel modules in "
35907 "order that the appliance itself can be mounted and started."
35911 #: ../src/guestfs.pod:2309
35913 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
35918 #: ../src/guestfs.pod:2312
35920 "When the initrd has started you will see messages showing that kernel "
35921 "modules are being loaded, similar to this:"
35925 #: ../src/guestfs.pod:2315
35928 " febootstrap: ext2 mini initrd starting up\n"
35929 " febootstrap: mounting /sys\n"
35930 " febootstrap: internal insmod libcrc32c.ko\n"
35931 " febootstrap: internal insmod crc32c-intel.ko\n"
35936 #: ../src/guestfs.pod:2320
35937 msgid "Find and mount the appliance device"
35941 #: ../src/guestfs.pod:2322
35943 "The appliance is a sparse file containing an ext2 filesystem which contains "
35944 "a familiar (although reduced in size) Linux operating system. It would "
35945 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
35949 #: ../src/guestfs.pod:2326
35951 "The regular disks being inspected by libguestfs are the first devices "
35952 "exposed by qemu (eg. as C</dev/vda>)."
35956 #: ../src/guestfs.pod:2329
35958 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
35959 "there was only one regular disk)."
35963 #: ../src/guestfs.pod:2332
35965 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
35966 "and switch root into the appliance, and run C</init> from the appliance."
35970 #: ../src/guestfs.pod:2336
35971 msgid "If this works successfully you will see messages such as:"
35975 #: ../src/guestfs.pod:2338
35978 " febootstrap: picked /sys/block/vdb/dev as root device\n"
35979 " febootstrap: creating /dev/root as block special 252:16\n"
35980 " febootstrap: mounting new root on /root\n"
35981 " febootstrap: chroot\n"
35982 " Starting /init script ...\n"
35987 #: ../src/guestfs.pod:2344
35989 "Note that C<Starting /init script ...> indicates that the appliance's init "
35990 "script is now running."
35994 #: ../src/guestfs.pod:2347
35995 msgid "Initialize the appliance"
35999 #: ../src/guestfs.pod:2349
36001 "The appliance itself now initializes itself. This involves starting certain "
36002 "processes like C<udev>, possibly printing some debug information, and "
36003 "finally running the daemon (C<guestfsd>)."
36007 #: ../src/guestfs.pod:2353
36012 #: ../src/guestfs.pod:2355
36014 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
36019 #: ../src/guestfs.pod:2358
36022 " verbose daemon enabled\n"
36027 #: ../src/guestfs.pod:2360
36029 "The daemon expects to see a named virtio-serial port exposed by qemu and "
36030 "connected on the other end to the library."
36034 #: ../src/guestfs.pod:2363
36036 "The daemon connects to this port (and hence to the library) and sends a four "
36037 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
36038 "protocol (see below)."
36042 #: ../src/guestfs.pod:2369
36043 msgid "COMMUNICATION PROTOCOL"
36047 #: ../src/guestfs.pod:2371
36049 "Don't rely on using this protocol directly. This section documents how it "
36050 "currently works, but it may change at any time."
36054 #: ../src/guestfs.pod:2374
36056 "The protocol used to talk between the library and the daemon running inside "
36057 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
36058 "1014, RFC 1832, RFC 4506)."
36062 #: ../src/guestfs.pod:2378
36064 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
36065 "this file is automatically generated)."
36069 #: ../src/guestfs.pod:2381
36071 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
36072 "and C<FileOut> parameters, which are handled with very simple request/reply "
36073 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
36074 "parameters, which use the same request and reply messages, but they may also "
36075 "be followed by files sent using a chunked encoding."
36079 #: ../src/guestfs.pod:2388
36080 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
36084 #: ../src/guestfs.pod:2390
36085 msgid "For ordinary functions, the request message is:"
36089 #: ../src/guestfs.pod:2392
36092 " total length (header + arguments,\n"
36093 " but not including the length word itself)\n"
36094 " struct guestfs_message_header (encoded as XDR)\n"
36095 " struct guestfs_<foo>_args (encoded as XDR)\n"
36100 #: ../src/guestfs.pod:2397
36102 "The total length field allows the daemon to allocate a fixed size buffer "
36103 "into which it slurps the rest of the message. As a result, the total length "
36104 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
36105 "effective size of any request is limited to somewhere under this size."
36109 #: ../src/guestfs.pod:2403
36111 "Note also that many functions don't take any arguments, in which case the "
36112 "C<guestfs_I<foo>_args> is completely omitted."
36116 #: ../src/guestfs.pod:2406
36118 "The header contains the procedure number (C<guestfs_proc>) which is how the "
36119 "receiver knows what type of args structure to expect, or none at all."
36123 #: ../src/guestfs.pod:2410
36125 "For functions that take optional arguments, the optional arguments are "
36126 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
36127 "arguments. A bitmask in the header indicates which optional arguments are "
36128 "meaningful. The bitmask is also checked to see if it contains bits set "
36129 "which the daemon does not know about (eg. if more optional arguments were "
36130 "added in a later version of the library), and this causes the call to be "
36135 #: ../src/guestfs.pod:2418
36136 msgid "The reply message for ordinary functions is:"
36140 #: ../src/guestfs.pod:2420
36143 " total length (header + ret,\n"
36144 " but not including the length word itself)\n"
36145 " struct guestfs_message_header (encoded as XDR)\n"
36146 " struct guestfs_<foo>_ret (encoded as XDR)\n"
36151 #: ../src/guestfs.pod:2425
36153 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
36154 "functions that return no formal return values."
36158 #: ../src/guestfs.pod:2428
36160 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
36164 #: ../src/guestfs.pod:2431
36166 "In the case of an error, a flag is set in the header, and the reply message "
36167 "is slightly changed:"
36171 #: ../src/guestfs.pod:2434
36174 " total length (header + error,\n"
36175 " but not including the length word itself)\n"
36176 " struct guestfs_message_header (encoded as XDR)\n"
36177 " struct guestfs_message_error (encoded as XDR)\n"
36182 #: ../src/guestfs.pod:2439
36184 "The C<guestfs_message_error> structure contains the error message as a "
36189 #: ../src/guestfs.pod:2442
36190 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
36194 #: ../src/guestfs.pod:2444
36196 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
36197 "The normal request message is sent (see above). However this is followed by "
36198 "a sequence of file chunks."
36202 #: ../src/guestfs.pod:2448
36205 " total length (header + arguments,\n"
36206 " but not including the length word itself,\n"
36207 " and not including the chunks)\n"
36208 " struct guestfs_message_header (encoded as XDR)\n"
36209 " struct guestfs_<foo>_args (encoded as XDR)\n"
36210 " sequence of chunks for FileIn param #0\n"
36211 " sequence of chunks for FileIn param #1 etc.\n"
36216 #: ../src/guestfs.pod:2456
36217 msgid "The \"sequence of chunks\" is:"
36221 #: ../src/guestfs.pod:2458
36224 " length of chunk (not including length word itself)\n"
36225 " struct guestfs_chunk (encoded as XDR)\n"
36226 " length of chunk\n"
36227 " struct guestfs_chunk (encoded as XDR)\n"
36229 " length of chunk\n"
36230 " struct guestfs_chunk (with data.data_len == 0)\n"
36235 #: ../src/guestfs.pod:2466
36237 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
36238 "is set in the final chunk to indicate either successful completion or early "
36243 #: ../src/guestfs.pod:2470
36245 "At time of writing there are no functions that have more than one FileIn "
36246 "parameter. However this is (theoretically) supported, by sending the "
36247 "sequence of chunks for each FileIn parameter one after another (from left to "
36252 #: ../src/guestfs.pod:2475
36254 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
36255 "transfer. The library does this by sending a chunk with a special flag set "
36256 "to indicate cancellation. When the daemon sees this, it cancels the whole "
36257 "RPC, does I<not> send any reply, and goes back to reading the next request."
36261 #: ../src/guestfs.pod:2481
36263 "The daemon may also cancel. It does this by writing a special word "
36264 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
36265 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
36266 "cancel chunk). The special word is chosen so that even if cancellation "
36267 "happens right at the end of the transfer (after the library has finished "
36268 "writing and has started listening for the reply), the \"spurious\" cancel "
36269 "flag will not be confused with the reply message."
36273 #: ../src/guestfs.pod:2490
36275 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
36276 "limit), and also files where the size is not known in advance (eg. from "
36277 "pipes or sockets). However the chunks are rather small "
36278 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
36279 "to keep much in memory."
36283 #: ../src/guestfs.pod:2496
36284 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
36288 #: ../src/guestfs.pod:2498
36290 "The protocol for FileOut parameters is exactly the same as for FileIn "
36291 "parameters, but with the roles of daemon and library reversed."
36295 #: ../src/guestfs.pod:2501
36298 " total length (header + ret,\n"
36299 " but not including the length word itself,\n"
36300 " and not including the chunks)\n"
36301 " struct guestfs_message_header (encoded as XDR)\n"
36302 " struct guestfs_<foo>_ret (encoded as XDR)\n"
36303 " sequence of chunks for FileOut param #0\n"
36304 " sequence of chunks for FileOut param #1 etc.\n"
36309 #: ../src/guestfs.pod:2509
36310 msgid "INITIAL MESSAGE"
36314 #: ../src/guestfs.pod:2511
36316 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
36317 "which indicates that the guest and daemon is alive. This is what L</"
36318 "guestfs_launch> waits for."
36322 #: ../src/guestfs.pod:2515
36323 msgid "PROGRESS NOTIFICATION MESSAGES"
36327 #: ../src/guestfs.pod:2517
36329 "The daemon may send progress notification messages at any time. These are "
36330 "distinguished by the normal length word being replaced by "
36331 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
36335 #: ../src/guestfs.pod:2521
36337 "The library turns them into progress callbacks (see L</"
36338 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
36343 #: ../src/guestfs.pod:2525
36345 "The daemon self-limits the frequency of progress messages it sends (see "
36346 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
36351 #: ../src/guestfs.pod:2529
36352 msgid "LIBGUESTFS VERSION NUMBERS"
36356 #: ../src/guestfs.pod:2531
36358 "Since April 2010, libguestfs has started to make separate development and "
36359 "stable releases, along with corresponding branches in our git repository. "
36360 "These separate releases can be identified by version number:"
36364 #: ../src/guestfs.pod:2536
36367 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
36368 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
36374 " | `-------- sub-version\n"
36376 " `------ always '1' because we don't change the ABI\n"
36381 #: ../src/guestfs.pod:2547
36382 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
36386 #: ../src/guestfs.pod:2549
36388 "As time passes we cherry pick fixes from the development branch and backport "
36389 "those into the stable branch, the effect being that the stable branch should "
36390 "get more stable and less buggy over time. So the stable releases are ideal "
36391 "for people who don't need new features but would just like the software to "
36396 #: ../src/guestfs.pod:2555
36397 msgid "Our criteria for backporting changes are:"
36401 #: ../src/guestfs.pod:2561
36403 "Documentation changes which don't affect any code are backported unless the "
36404 "documentation refers to a future feature which is not in stable."
36408 #: ../src/guestfs.pod:2567
36410 "Bug fixes which are not controversial, fix obvious problems, and have been "
36411 "well tested are backported."
36415 #: ../src/guestfs.pod:2572
36417 "Simple rearrangements of code which shouldn't affect how it works get "
36418 "backported. This is so that the code in the two branches doesn't get too "
36419 "far out of step, allowing us to backport future fixes more easily."
36423 #: ../src/guestfs.pod:2578
36425 "We I<don't> backport new features, new APIs, new tools etc, except in one "
36426 "exceptional case: the new feature is required in order to implement an "
36427 "important bug fix."
36431 #: ../src/guestfs.pod:2584
36433 "A new stable branch starts when we think the new features in development are "
36434 "substantial and compelling enough over the current stable branch to warrant "
36435 "it. When that happens we create new stable and development versions 1.N.0 "
36436 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
36437 "stable at this point, but by backporting fixes from development, that branch "
36438 "will stabilize over time."
36442 #: ../src/guestfs.pod:2592
36443 msgid "EXTENDING LIBGUESTFS"
36447 #: ../src/guestfs.pod:2594
36448 msgid "ADDING A NEW API ACTION"
36452 #: ../src/guestfs.pod:2596
36454 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
36455 "documentation) are generated, and this makes it easy to extend the "
36460 #: ../src/guestfs.pod:2600
36461 msgid "To add a new API action there are two changes:"
36465 #: ../src/guestfs.pod:2606
36467 "You need to add a description of the call (name, parameters, return type, "
36468 "tests, documentation) to C<generator/generator_actions.ml>."
36472 #: ../src/guestfs.pod:2609
36474 "There are two sorts of API action, depending on whether the call goes "
36475 "through to the daemon in the appliance, or is serviced entirely by the "
36476 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
36477 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
36478 "an example of the latter, since a trace flag is maintained in the handle and "
36479 "all tracing is done on the library side."
36483 #: ../src/guestfs.pod:2617
36485 "Most new actions are of the first type, and get added to the "
36486 "C<daemon_functions> list. Each function has a unique procedure number used "
36487 "in the RPC protocol which is assigned to that action when we publish "
36488 "libguestfs and cannot be reused. Take the latest procedure number and "
36493 #: ../src/guestfs.pod:2623
36495 "For library-only actions of the second type, add to the "
36496 "C<non_daemon_functions> list. Since these functions are serviced by the "
36497 "library and do not travel over the RPC mechanism to the daemon, these "
36498 "functions do not need a procedure number, and so the procedure number is set "
36503 #: ../src/guestfs.pod:2631
36504 msgid "Implement the action (in C):"
36508 #: ../src/guestfs.pod:2633
36510 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
36511 "C<daemon/> directory."
36515 #: ../src/guestfs.pod:2636
36517 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
36518 "(note: double underscore) in the C<src/> directory."
36522 #: ../src/guestfs.pod:2639
36523 msgid "In either case, use another function as an example of what to do."
36527 #: ../src/guestfs.pod:2643
36528 msgid "After making these changes, use C<make> to compile."
36532 #: ../src/guestfs.pod:2645
36534 "Note that you don't need to implement the RPC, language bindings, manual "
36535 "pages or anything else. It's all automatically generated from the OCaml "
36540 #: ../src/guestfs.pod:2649
36541 msgid "ADDING TESTS FOR AN API ACTION"
36545 #: ../src/guestfs.pod:2651
36547 "You can supply zero or as many tests as you want per API call. The tests "
36548 "can either be added as part of the API description (C<generator/"
36549 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
36550 "into C<regressions/>. Note that adding a script to C<regressions/> is "
36551 "slower, so if possible use the first method."
36555 #: ../src/guestfs.pod:2657
36557 "The following describes the test environment used when you add an API test "
36558 "in C<generator_actions.ml>."
36562 #: ../src/guestfs.pod:2660
36563 msgid "The test environment has 4 block devices:"
36567 #: ../src/guestfs.pod:2664
36568 msgid "C</dev/sda> 500MB"
36572 #: ../src/guestfs.pod:2666
36573 msgid "General block device for testing."
36577 #: ../src/guestfs.pod:2668
36578 msgid "C</dev/sdb> 50MB"
36582 #: ../src/guestfs.pod:2670
36584 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
36589 #: ../src/guestfs.pod:2673
36590 msgid "C</dev/sdc> 10MB"
36594 #: ../src/guestfs.pod:2675
36595 msgid "Used in a few tests where two block devices are needed."
36599 #: ../src/guestfs.pod:2677
36600 msgid "C</dev/sdd>"
36604 #: ../src/guestfs.pod:2679
36605 msgid "ISO with fixed content (see C<images/test.iso>)."
36609 #: ../src/guestfs.pod:2683
36611 "To be able to run the tests in a reasonable amount of time, the libguestfs "
36612 "appliance and block devices are reused between tests. So don't try testing "
36613 "L</guestfs_kill_subprocess> :-x"
36617 #: ../src/guestfs.pod:2687
36619 "Each test starts with an initial scenario, selected using one of the "
36620 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
36621 "initialize the disks mentioned above in a particular way as documented in "
36622 "C<generator_types.ml>. You should not assume anything about the previous "
36623 "contents of other disks that are not initialized."
36627 #: ../src/guestfs.pod:2693
36629 "You can add a prerequisite clause to any individual test. This is a run-"
36630 "time check, which, if it fails, causes the test to be skipped. Useful if "
36631 "testing a command which might not work on all variations of libguestfs "
36632 "builds. A test that has prerequisite of C<Always> means to run "
36637 #: ../src/guestfs.pod:2699
36639 "In addition, packagers can skip individual tests by setting environment "
36640 "variables before running C<make check>."
36644 #: ../src/guestfs.pod:2702
36647 " SKIP_TEST_<CMD>_<NUM>=1\n"
36652 #: ../src/guestfs.pod:2704
36653 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
36657 #: ../src/guestfs.pod:2706
36662 #: ../src/guestfs.pod:2708
36665 " SKIP_TEST_<CMD>=1\n"
36670 #: ../src/guestfs.pod:2710
36671 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
36675 #: ../src/guestfs.pod:2712
36676 msgid "Packagers can run only certain tests by setting for example:"
36680 #: ../src/guestfs.pod:2714
36683 " TEST_ONLY=\"vfs_type zerofree\"\n"
36688 #: ../src/guestfs.pod:2716
36690 "See C<capitests/tests.c> for more details of how these environment variables "
36695 #: ../src/guestfs.pod:2719
36696 msgid "DEBUGGING NEW API ACTIONS"
36700 #: ../src/guestfs.pod:2721
36701 msgid "Test new actions work before submitting them."
36705 #: ../src/guestfs.pod:2723
36706 msgid "You can use guestfish to try out new commands."
36710 #: ../src/guestfs.pod:2725
36712 "Debugging the daemon is a problem because it runs inside a minimal "
36713 "environment. However you can fprintf messages in the daemon to stderr, and "
36714 "they will show up if you use C<guestfish -v>."
36718 #: ../src/guestfs.pod:2729
36719 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
36723 #: ../src/guestfs.pod:2731
36725 "Our C source code generally adheres to some basic code-formatting "
36726 "conventions. The existing code base is not totally consistent on this "
36727 "front, but we do prefer that contributed code be formatted similarly. In "
36728 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
36729 "indentation level, and other than that, follow the K&R style."
36733 #: ../src/guestfs.pod:2737
36735 "If you use Emacs, add the following to one of one of your start-up files (e."
36736 "g., ~/.emacs), to help ensure that you get indentation right:"
36740 #: ../src/guestfs.pod:2740
36743 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
36744 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
36745 " (add-hook 'find-file-hook\n"
36746 " '(lambda () (if (and buffer-file-name\n"
36747 " (string-match \"/libguestfs\\\\>\"\n"
36748 " (buffer-file-name))\n"
36749 " (not (string-equal mode-name \"Change Log\"))\n"
36750 " (not (string-equal mode-name \"Makefile\")))\n"
36751 " (setq indent-tabs-mode nil))))\n"
36756 #: ../src/guestfs.pod:2750
36759 " ;;; When editing C sources in libguestfs, use this style.\n"
36760 " (defun libguestfs-c-mode ()\n"
36761 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
36763 " (c-set-style \"K&R\")\n"
36764 " (setq c-indent-level 2)\n"
36765 " (setq c-basic-offset 2))\n"
36766 " (add-hook 'c-mode-hook\n"
36767 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
36768 " (buffer-file-name))\n"
36769 " (libguestfs-c-mode))))\n"
36774 #: ../src/guestfs.pod:2762
36775 msgid "Enable warnings when compiling (and fix any problems this finds):"
36779 #: ../src/guestfs.pod:2765
36782 " ./configure --enable-gcc-warnings\n"
36787 #: ../src/guestfs.pod:2767
36788 msgid "Useful targets are:"
36792 #: ../src/guestfs.pod:2769
36795 " make syntax-check # checks the syntax of the C code\n"
36796 " make check # runs the test suite\n"
36801 #: ../src/guestfs.pod:2772
36802 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
36806 #: ../src/guestfs.pod:2774
36808 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
36809 "which are used to do shell quoting."
36813 #: ../src/guestfs.pod:2779
36818 #: ../src/guestfs.pod:2781
36820 "Simple shell quoted string. Any spaces or other shell characters are "
36825 #: ../src/guestfs.pod:2784
36830 #: ../src/guestfs.pod:2786
36832 "Same as C<%Q> except the string is treated as a path which is prefixed by "
36837 #: ../src/guestfs.pod:2793
36840 " asprintf (&cmd, \"cat %R\", path);\n"
36845 #: ../src/guestfs.pod:2795
36846 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
36850 #: ../src/guestfs.pod:2797
36852 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
36853 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
36854 "they are not passed via the shell (instead, straight to exec). You probably "
36855 "want to use the C<sysroot_path()> function however."
36859 #: ../src/guestfs.pod:2803
36860 msgid "SUBMITTING YOUR NEW API ACTIONS"
36864 #: ../src/guestfs.pod:2805
36866 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
36867 "libguestfs> and CC to L<rjones@redhat.com>."
36871 #: ../src/guestfs.pod:2809
36872 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
36876 #: ../src/guestfs.pod:2811
36877 msgid "We support i18n (gettext anyhow) in the library."
36881 #: ../src/guestfs.pod:2813
36883 "However many messages come from the daemon, and we don't translate those at "
36884 "the moment. One reason is that the appliance generally has all locale files "
36885 "removed from it, because they take up a lot of space. So we'd have to readd "
36886 "some of those, as well as copying our PO files into the appliance."
36890 #: ../src/guestfs.pod:2819
36892 "Debugging messages are never translated, since they are intended for the "
36897 #: ../src/guestfs.pod:2822
36898 msgid "SOURCE CODE SUBDIRECTORIES"
36902 #: ../src/guestfs.pod:2828
36903 msgid "The libguestfs appliance, build scripts and so on."
36907 #: ../src/guestfs.pod:2830
36908 msgid "C<capitests>"
36912 #: ../src/guestfs.pod:2832
36913 msgid "Automated tests of the C API."
36917 #: ../src/guestfs.pod:2834
36922 #: ../src/guestfs.pod:2836
36924 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
36929 #: ../src/guestfs.pod:2839
36934 #: ../src/guestfs.pod:2841
36936 "Safety and liveness tests of components that libguestfs depends upon (not of "
36937 "libguestfs itself). Mainly this is for qemu and the kernel."
36941 #: ../src/guestfs.pod:2844
36946 #: ../src/guestfs.pod:2846
36947 msgid "Outside contributions, experimental parts."
36951 #: ../src/guestfs.pod:2848
36956 #: ../src/guestfs.pod:2850
36958 "The daemon that runs inside the libguestfs appliance and carries out actions."
36962 #: ../src/guestfs.pod:2853
36967 #: ../src/guestfs.pod:2855
36968 msgid "L<virt-df(1)> command and documentation."
36972 #: ../src/guestfs.pod:2857
36977 #: ../src/guestfs.pod:2859
36978 msgid "L<virt-edit(1)> command and documentation."
36982 #: ../src/guestfs.pod:2861
36983 msgid "C<examples>"
36987 #: ../src/guestfs.pod:2863
36988 msgid "C API example code."
36992 #: ../src/guestfs.pod:2865
36997 #: ../src/guestfs.pod:2867
36999 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
37000 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
37001 "L<virt-tar-out(1)>."
37005 #: ../src/guestfs.pod:2871
37010 #: ../src/guestfs.pod:2873
37012 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
37016 #: ../src/guestfs.pod:2875
37017 msgid "C<generator>"
37021 #: ../src/guestfs.pod:2877
37023 "The crucially important generator, used to automatically generate large "
37024 "amounts of boilerplate C code for things like RPC and bindings."
37028 #: ../src/guestfs.pod:2880
37033 #: ../src/guestfs.pod:2882
37034 msgid "Files used by the test suite."
37038 #: ../src/guestfs.pod:2884
37039 msgid "Some \"phony\" guest images which we test against."
37043 #: ../src/guestfs.pod:2886
37044 msgid "C<inspector>"
37048 #: ../src/guestfs.pod:2888
37049 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
37053 #: ../src/guestfs.pod:2890
37058 #: ../src/guestfs.pod:2892
37059 msgid "Logo used on the website. The fish is called Arthur by the way."
37063 #: ../src/guestfs.pod:2894
37068 #: ../src/guestfs.pod:2896
37069 msgid "M4 macros used by autoconf."
37073 #: ../src/guestfs.pod:2898
37078 #: ../src/guestfs.pod:2900
37079 msgid "Translations of simple gettext strings."
37083 #: ../src/guestfs.pod:2902
37088 #: ../src/guestfs.pod:2904
37090 "The build infrastructure and PO files for translations of manpages and POD "
37091 "files. Eventually this will be combined with the C<po> directory, but that "
37092 "is rather complicated."
37096 #: ../src/guestfs.pod:2908
37097 msgid "C<regressions>"
37101 #: ../src/guestfs.pod:2910
37102 msgid "Regression tests."
37106 #: ../src/guestfs.pod:2912
37111 #: ../src/guestfs.pod:2914
37112 msgid "L<virt-rescue(1)> command and documentation."
37116 #: ../src/guestfs.pod:2916
37121 #: ../src/guestfs.pod:2918
37122 msgid "Source code to the C library."
37126 #: ../src/guestfs.pod:2920
37131 #: ../src/guestfs.pod:2922
37132 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
37136 #: ../src/guestfs.pod:2924
37137 msgid "C<test-tool>"
37141 #: ../src/guestfs.pod:2926
37143 "Test tool for end users to test if their qemu/kernel combination will work "
37148 #: ../src/guestfs.pod:2929
37153 #: ../src/guestfs.pod:2931
37158 #: ../src/guestfs.pod:2933
37163 #: ../src/guestfs.pod:2935
37168 #: ../src/guestfs.pod:2937
37173 #: ../src/guestfs.pod:2939
37178 #: ../src/guestfs.pod:2941
37183 #: ../src/guestfs.pod:2943
37188 #: ../src/guestfs.pod:2945
37193 #: ../src/guestfs.pod:2947
37194 msgid "Language bindings."
37198 #: ../src/guestfs.pod:2951
37199 msgid "MAKING A STABLE RELEASE"
37203 #: ../src/guestfs.pod:2953
37205 "When we make a stable release, there are several steps documented here. See "
37206 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
37211 #: ../src/guestfs.pod:2961
37213 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
37217 #: ../src/guestfs.pod:2966
37218 msgid "Finalize RELEASE-NOTES."
37222 #: ../src/guestfs.pod:2970
37223 msgid "Update ROADMAP."
37227 #: ../src/guestfs.pod:2974
37228 msgid "Run C<src/api-support/update-from-tarballs.sh>."
37232 #: ../src/guestfs.pod:2978
37233 msgid "Push and pull from Transifex."
37237 #: ../src/guestfs.pod:2980
37242 #: ../src/guestfs.pod:2982
37250 #: ../src/guestfs.pod:2984
37251 msgid "to push the latest POT files to Transifex. Then run:"
37255 #: ../src/guestfs.pod:2986
37263 #: ../src/guestfs.pod:2988
37264 msgid "which is a wrapper to pull the latest translated C<*.po> files."
37268 #: ../src/guestfs.pod:2992
37270 "Create new stable and development directories under L<http://libguestfs.org/"
37275 #: ../src/guestfs.pod:2997
37276 msgid "Create the branch in git:"
37280 #: ../src/guestfs.pod:2999
37283 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
37284 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
37285 " git branch stable-1.XX\n"
37286 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
37291 #: ../src/guestfs.pod:3006
37296 #: ../src/guestfs.pod:3008
37297 msgid "PROTOCOL LIMITS"
37301 #: ../src/guestfs.pod:3010
37303 "Internally libguestfs uses a message-based protocol to pass API calls and "
37304 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
37305 "plenty more detail about this). The maximum message size used by the "
37306 "protocol is slightly less than 4 MB. For some API calls you may need to be "
37307 "aware of this limit. The API calls which may be affected are individually "
37308 "documented, with a link back to this section of the documentation."
37312 #: ../src/guestfs.pod:3018
37314 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
37315 "a simple string. Because this string is at some point internally encoded as "
37316 "a message, the maximum size that it can return is slightly under 4 MB. If "
37317 "the requested file is larger than this then you will get an error."
37321 #: ../src/guestfs.pod:3024
37323 "In order to transfer large files into and out of the guest filesystem, you "
37324 "need to use particular calls that support this. The sections L</UPLOADING> "
37325 "and L</DOWNLOADING> document how to do this."
37329 #: ../src/guestfs.pod:3028
37331 "You might also consider mounting the disk image using our FUSE filesystem "
37332 "support (L<guestmount(1)>)."
37336 #: ../src/guestfs.pod:3031
37337 msgid "MAXIMUM NUMBER OF DISKS"
37341 #: ../src/guestfs.pod:3033
37342 msgid "When using virtio disks (the default) the current limit is B<25> disks."
37346 #: ../src/guestfs.pod:3036
37348 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
37349 "slots. However febootstrap only understands disks with names C</dev/vda> "
37350 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
37355 #: ../src/guestfs.pod:3041
37357 "We are working to substantially raise this limit in future versions but it "
37358 "requires complex changes to qemu."
37362 #: ../src/guestfs.pod:3044
37364 "In future versions of libguestfs it should also be possible to \"hot plug\" "
37365 "disks (add and remove disks after calling L</guestfs_launch>). This also "
37366 "requires changes to qemu."
37370 #: ../src/guestfs.pod:3048
37371 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
37375 #: ../src/guestfs.pod:3050
37376 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
37380 #: ../src/guestfs.pod:3052
37382 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
37383 "vda>, and C</dev/vda1> through C</dev/vda15>)."
37387 #: ../src/guestfs.pod:3055
37389 "If you attach a disk with more than 15 partitions, the extra partitions are "
37390 "ignored by libguestfs."
37394 #: ../src/guestfs.pod:3058
37395 msgid "MAXIMUM SIZE OF A DISK"
37399 #: ../src/guestfs.pod:3060
37400 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
37404 #: ../src/guestfs.pod:3062
37406 "We have tested block devices up to 1 exabyte (2**60 or "
37407 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
37412 #: ../src/guestfs.pod:3066
37414 "Although libguestfs probably does not impose any limit, the underlying host "
37415 "storage will. If you store disk images on a host ext4 filesystem, then the "
37416 "maximum size will be limited by the maximum ext4 file size (currently 16 "
37417 "TB). If you store disk images as host logical volumes then you are limited "
37418 "by the maximum size of an LV."
37422 #: ../src/guestfs.pod:3072
37424 "For the hugest disk image files, we recommend using XFS on the host for "
37429 #: ../src/guestfs.pod:3075
37430 msgid "MAXIMUM SIZE OF A PARTITION"
37434 #: ../src/guestfs.pod:3077
37436 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
37437 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
37438 "address a partition located beyond 2 TB on the disk."
37442 #: ../src/guestfs.pod:3081
37444 "It is recommended that you use GPT partitions on disks which are larger than "
37445 "this size. GPT uses 64 bit sector numbers and so can address partitions "
37446 "which are theoretically larger than the largest disk we could support."
37450 #: ../src/guestfs.pod:3086
37451 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
37455 #: ../src/guestfs.pod:3088
37457 "This depends on the filesystem type. libguestfs itself does not impose any "
37458 "known limit. Consult Wikipedia or the filesystem documentation to find out "
37459 "what these limits are."
37463 #: ../src/guestfs.pod:3092
37464 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
37468 #: ../src/guestfs.pod:3094
37470 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
37471 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
37472 "uploads and downloads."
37476 #: ../src/guestfs.pod:3098
37477 msgid "INSPECTION LIMITS"
37481 #: ../src/guestfs.pod:3100
37483 "The inspection code has several arbitrary limits on things like the size of "
37484 "Windows Registry hive it will read, and the length of product name. These "
37485 "are intended to stop a malicious guest from consuming arbitrary amounts of "
37486 "memory and disk space on the host, and should not be reached in practice. "
37487 "See the source code for more information."
37491 #: ../src/guestfs.pod:3126
37493 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
37494 "effect as calling C<guestfs_set_verbose (g, 1)>."
37498 #: ../src/guestfs.pod:3138
37500 "Set the path that libguestfs uses to search for a supermin appliance. See "
37501 "the discussion of paths in section L</PATH> above."
37505 #: ../src/guestfs.pod:3147
37506 msgid "See also L</QEMU WRAPPERS> above."
37510 #: ../src/guestfs.pod:3151
37512 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
37513 "effect as calling C<guestfs_set_trace (g, 1)>."
37517 #: ../src/guestfs.pod:3169
37519 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
37520 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
37521 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
37522 "L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
37523 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)"
37524 ">, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-tar(1)>, "
37525 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
37526 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<http://"
37527 "libguestfs.org/>."
37531 #: ../src/guestfs.pod:3200
37533 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
37534 "(8)>, L<disktype(1)>."
37538 #: ../src/guestfs.pod:3207 ../tools/virt-make-fs.pl:553
37539 #: ../tools/virt-win-reg.pl:761
37544 #: ../src/guestfs.pod:3209
37545 msgid "To get a list of bugs against libguestfs use this link:"
37549 #: ../src/guestfs.pod:3211
37551 "L<https://bugzilla.redhat.com/buglist.cgi?"
37552 "component=libguestfs&product=Virtualization+Tools>"
37556 #: ../src/guestfs.pod:3213
37557 msgid "To report a new bug against libguestfs use this link:"
37561 #: ../src/guestfs.pod:3215
37563 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
37564 "component=libguestfs&product=Virtualization+Tools>"
37568 #: ../src/guestfs.pod:3217
37569 msgid "When reporting a bug, please check:"
37573 #: ../src/guestfs.pod:3223
37574 msgid "That the bug hasn't been reported already."
37578 #: ../src/guestfs.pod:3227
37579 msgid "That you are testing a recent version."
37583 #: ../src/guestfs.pod:3231
37584 msgid "Describe the bug accurately, and give a way to reproduce it."
37588 #: ../src/guestfs.pod:3235
37590 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
37595 #: ../test-tool/libguestfs-test-tool.pod:5
37596 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
37600 #: ../test-tool/libguestfs-test-tool.pod:9
37603 " libguestfs-test-tool [--options]\n"
37608 #: ../test-tool/libguestfs-test-tool.pod:13
37610 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
37611 "to check basic libguestfs functionality is working. This is needed because "
37612 "libguestfs occasionally breaks for reasons beyond our control: usually "
37613 "because of changes in the underlying qemu or kernel packages, or the host "
37618 #: ../test-tool/libguestfs-test-tool.pod:19
37619 msgid "If you suspect a problem in libguestfs, then just run:"
37623 #: ../test-tool/libguestfs-test-tool.pod:21
37626 " libguestfs-test-tool\n"
37631 #: ../test-tool/libguestfs-test-tool.pod:23
37632 msgid "It will print lots of diagnostic messages."
37636 #: ../test-tool/libguestfs-test-tool.pod:25
37637 msgid "If it runs to completion successfully, you will see this near the end:"
37641 #: ../test-tool/libguestfs-test-tool.pod:27
37644 " ===== TEST FINISHED OK =====\n"
37649 #: ../test-tool/libguestfs-test-tool.pod:29
37650 msgid "and the test tool will exit with code 0."
37654 #: ../test-tool/libguestfs-test-tool.pod:31
37656 "If it fails (and/or exits with non-zero error code), please paste the "
37657 "I<complete, unedited> output of the test tool into a bug report. More "
37658 "information about reporting bugs can be found on the L<http://libguestfs.org/"
37663 #: ../test-tool/libguestfs-test-tool.pod:42
37664 msgid "Display short usage information and exit."
37668 #: ../test-tool/libguestfs-test-tool.pod:44
37669 msgid "B<--qemu qemu_binary>"
37673 #: ../test-tool/libguestfs-test-tool.pod:46
37675 "If you have downloaded another qemu binary, point this option at the full "
37676 "path of the binary to try it."
37680 #: ../test-tool/libguestfs-test-tool.pod:49
37681 msgid "B<--qemudir qemu_source_dir>"
37685 #: ../test-tool/libguestfs-test-tool.pod:51
37687 "If you have compiled qemu from source, point this option at the source "
37688 "directory to try it."
37692 #: ../test-tool/libguestfs-test-tool.pod:54
37697 #: ../test-tool/libguestfs-test-tool.pod:56
37698 msgid "B<--timeout N>"
37702 #: ../test-tool/libguestfs-test-tool.pod:58
37704 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
37705 "minutes) which does not usually need to be adjusted."
37709 #: ../test-tool/libguestfs-test-tool.pod:63
37710 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
37714 #: ../test-tool/libguestfs-test-tool.pod:65
37716 "If you have compiled another version of qemu from source and would like to "
37717 "try that, then you can use the I<--qemudir> option to point to the qemu "
37718 "source directory."
37722 #: ../test-tool/libguestfs-test-tool.pod:69
37724 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
37725 "option to point to the binary."
37729 #: ../test-tool/libguestfs-test-tool.pod:72
37731 "Note when using these options, you can ignore the business of qemu wrapper "
37732 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
37733 "wrapper script for you if one is needed."
37737 #: ../test-tool/libguestfs-test-tool.pod:76
37738 msgid "TRYING OUT A DIFFERENT KERNEL"
37742 #: ../test-tool/libguestfs-test-tool.pod:78
37744 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
37745 "libguestfs tries. You do this by setting the environment variables "
37746 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
37750 #: ../test-tool/libguestfs-test-tool.pod:82
37752 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
37757 #: ../test-tool/libguestfs-test-tool.pod:85
37758 msgid "SELF-DIAGNOSIS"
37762 #: ../test-tool/libguestfs-test-tool.pod:87
37764 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
37765 "produced by libguestfs-test-tool and/or possible errors."
37769 #: ../test-tool/libguestfs-test-tool.pod:92
37771 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
37772 "I<1> if there was an error."
37776 #: ../test-tool/libguestfs-test-tool.pod:97
37778 "For the full list of environment variables which may affect libguestfs, "
37779 "please see the L<guestfs(3)> manual page."
37783 #: ../test-tool/libguestfs-test-tool.pod:102
37784 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
37788 #: ../tools/virt-list-filesystems.pl:32
37790 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
37794 #: ../tools/virt-list-filesystems.pl:36
37797 " virt-list-filesystems [--options] domname\n"
37802 #: ../tools/virt-list-filesystems.pl:38
37805 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
37810 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
37812 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
37817 #: ../tools/virt-list-filesystems.pl:45
37819 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
37820 "are contained in a virtual machine or disk image."
37824 #: ../tools/virt-list-filesystems.pl:49
37826 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
37827 "functionality. For more complex cases you should look at the L<guestfish(1)"
37832 #: ../tools/virt-list-filesystems.pl:112
37834 "With this option, C<virt-list-filesystems> displays the type of each "
37835 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
37839 #: ../tools/virt-list-filesystems.pl:119
37844 #: ../tools/virt-list-filesystems.pl:123
37846 "Normally we only show mountable filesystems. If this option is given then "
37847 "swap devices are shown too."
37851 #: ../tools/virt-list-filesystems.pl:197
37853 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
37854 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
37855 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
37859 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
37860 msgid "Copyright (C) 2009 Red Hat Inc."
37864 #: ../tools/virt-list-partitions.pl:32
37866 "virt-list-partitions - List partitions in a virtual machine or disk image"
37870 #: ../tools/virt-list-partitions.pl:36
37873 " virt-list-partitions [--options] domname\n"
37878 #: ../tools/virt-list-partitions.pl:38
37881 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
37886 #: ../tools/virt-list-partitions.pl:45
37888 "C<virt-list-partitions> is a command line tool to list the partitions that "
37889 "are contained in a virtual machine or disk image. It is mainly useful as a "
37890 "first step to using L<virt-resize(1)>."
37894 #: ../tools/virt-list-partitions.pl:50
37896 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
37897 "functionality. For more complex cases you should look at the L<guestfish(1)"
37902 #: ../tools/virt-list-partitions.pl:113
37903 msgid "Show sizes in human-readable form (eg. \"1G\")."
37907 #: ../tools/virt-list-partitions.pl:123
37909 "With this option, C<virt-list-partitions> displays the type and size of each "
37910 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
37914 #: ../tools/virt-list-partitions.pl:130
37919 #: ../tools/virt-list-partitions.pl:132
37924 #: ../tools/virt-list-partitions.pl:134
37926 "Display the total size of each block device (as a separate row or rows)."
37930 #: ../tools/virt-list-partitions.pl:267
37932 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
37933 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
37934 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
37938 #: ../tools/virt-list-partitions.pl:283
37939 msgid "Copyright (C) 2009-2010 Red Hat Inc."
37943 #: ../tools/virt-make-fs.pl:37
37944 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
37948 #: ../tools/virt-make-fs.pl:41
37951 " virt-make-fs [--options] input.tar output.img\n"
37956 #: ../tools/virt-make-fs.pl:43
37959 " virt-make-fs [--options] input.tar.gz output.img\n"
37964 #: ../tools/virt-make-fs.pl:45
37967 " virt-make-fs [--options] directory output.img\n"
37972 #: ../tools/virt-make-fs.pl:49
37974 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
37975 "archive or some files in a directory. It is similar to tools like L<mkisofs"
37976 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
37977 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
37978 "you want to attach these filesystems to existing virtual machines (eg. to "
37979 "import large amounts of read-only data to a VM)."
37983 #: ../tools/virt-make-fs.pl:57
37984 msgid "Basic usage is:"
37988 #: ../tools/virt-make-fs.pl:59
37991 " virt-make-fs input output\n"
37996 #: ../tools/virt-make-fs.pl:61
37998 "where C<input> is either a directory containing files that you want to add, "
37999 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
38000 "C<output> is a disk image. The input type is detected automatically. The "
38001 "output disk image defaults to a raw ext2 image unless you specify extra "
38002 "flags (see L</OPTIONS> below)."
38006 #: ../tools/virt-make-fs.pl:67
38007 msgid "EXTRA SPACE"
38011 #: ../tools/virt-make-fs.pl:69
38013 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
38014 "the files that it contains, but might have extra space. Depending on how "
38015 "you are going to use the output, you might think this extra space is wasted "
38016 "and want to minimize it, or you might want to leave space so that more files "
38017 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
38018 "but you can use the I<--size> flag to leave space in the filesystem if you "
38023 #: ../tools/virt-make-fs.pl:77
38025 "An alternative way to leave extra space but not make the output image any "
38026 "bigger is to use an alternative disk image format (instead of the default "
38027 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
38028 "image format (check your hypervisor supports this before using it). This "
38029 "allows you to choose a large I<--size> but the extra space won't actually be "
38030 "allocated in the image until you try to store something in it."
38034 #: ../tools/virt-make-fs.pl:85
38036 "Don't forget that you can also use local commands including L<resize2fs(8)> "
38037 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
38038 "to build another image from scratch."
38042 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
38043 #: ../tools/virt-make-fs.pl:142
38048 #: ../tools/virt-make-fs.pl:91
38051 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
38056 #: ../tools/virt-make-fs.pl:93
38057 msgid "FILESYSTEM TYPE"
38061 #: ../tools/virt-make-fs.pl:95
38063 "The default filesystem type is C<ext2>. Just about any filesystem type that "
38064 "libguestfs supports can be used (but I<not> read-only formats like "
38065 "ISO9660). Here are some of the more common choices:"
38069 #: ../tools/virt-make-fs.pl:101
38074 #: ../tools/virt-make-fs.pl:103
38076 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
38077 "you are not going to use the filesystem in a way that requires the journal, "
38078 "then this is just wasted overhead."
38082 #: ../tools/virt-make-fs.pl:107
38083 msgid "I<ntfs> or I<vfat>"
38087 #: ../tools/virt-make-fs.pl:109
38088 msgid "Useful if exporting data to a Windows guest."
38092 #: ../tools/virt-make-fs.pl:111
38094 "I<Note for vfat>: The tar archive or local directory must only contain files "
38095 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
38096 "program running within libguestfs is unable to change the ownership of non-"
38097 "root files, since vfat itself does not support this."
38101 #: ../tools/virt-make-fs.pl:116
38106 #: ../tools/virt-make-fs.pl:118
38108 "Lower overhead than C<ext2>, but certain limitations on filename length and "
38109 "total filesystem size."
38113 #: ../tools/virt-make-fs.pl:125
38116 " virt-make-fs --type=minix input minixfs.img\n"
38121 #: ../tools/virt-make-fs.pl:127
38122 msgid "TO PARTITION OR NOT TO PARTITION"
38126 #: ../tools/virt-make-fs.pl:129
38127 msgid "Optionally virt-make-fs can add a partition table to the output disk."
38131 #: ../tools/virt-make-fs.pl:131
38133 "Adding a partition can make the disk image more compatible with certain "
38134 "virtualized operating systems which don't expect to see a filesystem "
38135 "directly located on a block device (Linux doesn't care and will happily "
38136 "handle both types)."
38140 #: ../tools/virt-make-fs.pl:136
38142 "On the other hand, if you have a partition table then the output image is no "
38143 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
38144 "directly on a partitioned disk image. (However libguestfs tools such as "
38145 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
38149 #: ../tools/virt-make-fs.pl:144
38150 msgid "Add an MBR partition:"
38154 #: ../tools/virt-make-fs.pl:146
38157 " virt-make-fs --partition -- input disk.img\n"
38162 #: ../tools/virt-make-fs.pl:148
38164 "If the output disk image could be terabyte-sized or larger, it's better to "
38165 "use an EFI/GPT-compatible partition table:"
38169 #: ../tools/virt-make-fs.pl:151
38172 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
38177 #: ../tools/virt-make-fs.pl:179
38178 msgid "Enable debugging information."
38182 #: ../tools/virt-make-fs.pl:185
38183 msgid "B<--size=E<lt>NE<gt>>"
38187 #: ../tools/virt-make-fs.pl:187
38188 msgid "B<--size=+E<lt>NE<gt>>"
38192 #: ../tools/virt-make-fs.pl:189
38193 msgid "B<-s E<lt>NE<gt>>"
38197 #: ../tools/virt-make-fs.pl:191
38198 msgid "B<-s +E<lt>NE<gt>>"
38202 #: ../tools/virt-make-fs.pl:193
38204 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
38208 #: ../tools/virt-make-fs.pl:196
38210 "If this option is I<not> given, then the output image will be just large "
38211 "enough to contain all the files, with not much wasted space."
38215 #: ../tools/virt-make-fs.pl:199
38217 "To choose a fixed size output disk, specify an absolute number followed by b/"
38218 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
38219 "Petabytes or Exabytes. This must be large enough to contain all the input "
38220 "files, else you will get an error."
38224 #: ../tools/virt-make-fs.pl:204
38226 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
38227 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
38228 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
38229 "the input files, and (approximately) an extra 200 MB free space."
38233 #: ../tools/virt-make-fs.pl:210
38235 "Note that virt-make-fs estimates free space, and therefore will not produce "
38236 "filesystems containing precisely the free space requested. (It is much more "
38237 "expensive and time-consuming to produce a filesystem which has precisely the "
38238 "desired free space)."
38242 #: ../tools/virt-make-fs.pl:219
38243 msgid "B<--format=E<lt>fmtE<gt>>"
38247 #: ../tools/virt-make-fs.pl:221
38248 msgid "B<-F E<lt>fmtE<gt>>"
38252 #: ../tools/virt-make-fs.pl:223
38253 msgid "Choose the output disk image format."
38257 #: ../tools/virt-make-fs.pl:225
38258 msgid "The default is C<raw> (raw disk image)."
38262 #: ../tools/virt-make-fs.pl:227
38264 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
38265 "that would really make sense here is C<qcow2>."
38269 #: ../tools/virt-make-fs.pl:234
38270 msgid "B<--type=E<lt>fsE<gt>>"
38274 #: ../tools/virt-make-fs.pl:236
38275 msgid "B<-t E<lt>fsE<gt>>"
38279 #: ../tools/virt-make-fs.pl:238
38280 msgid "Choose the output filesystem type."
38284 #: ../tools/virt-make-fs.pl:240
38285 msgid "The default is C<ext2>."
38289 #: ../tools/virt-make-fs.pl:242
38291 "Any filesystem which is supported read-write by libguestfs can be used here."
38295 #: ../tools/virt-make-fs.pl:249
38296 msgid "B<--partition>"
38300 #: ../tools/virt-make-fs.pl:251
38301 msgid "B<--partition=E<lt>parttypeE<gt>>"
38305 #: ../tools/virt-make-fs.pl:253
38307 "If specified, this flag adds an MBR partition table to the output disk image."
38311 #: ../tools/virt-make-fs.pl:256
38313 "You can change the partition table type, eg. I<--partition=gpt> for large "
38318 #: ../tools/virt-make-fs.pl:259
38320 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
38321 "might consider the next parameter to be the partition type. For example:"
38325 #: ../tools/virt-make-fs.pl:263
38328 " virt-make-fs --partition input.tar ...\n"
38333 #: ../tools/virt-make-fs.pl:265
38335 "would cause virt-make-fs to think you wanted to use a partition type of "
38336 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
38337 "dash) between options and the input file argument:"
38341 #: ../tools/virt-make-fs.pl:269
38344 " virt-make-fs --partition -- input.tar ...\n"
38349 #: ../tools/virt-make-fs.pl:541
38351 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
38352 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
38353 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
38357 #: ../tools/virt-make-fs.pl:555 ../tools/virt-win-reg.pl:763
38359 "When reporting bugs, please enable debugging and capture the I<complete> "
38364 #: ../tools/virt-make-fs.pl:558
38367 " export LIBGUESTFS_DEBUG=1\n"
38368 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
38373 #: ../tools/virt-make-fs.pl:561
38375 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
38380 #: ../tools/virt-tar.pl:33
38381 msgid "virt-tar - Extract or upload files to a virtual machine"
38385 #: ../tools/virt-tar.pl:37
38388 " virt-tar [--options] -x domname directory tarball\n"
38393 #: ../tools/virt-tar.pl:39
38396 " virt-tar [--options] -u domname tarball directory\n"
38401 #: ../tools/virt-tar.pl:41
38404 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
38409 #: ../tools/virt-tar.pl:43
38412 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
38417 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
38422 #: ../tools/virt-tar.pl:47
38424 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
38425 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
38429 #: ../tools/virt-tar.pl:52
38430 msgid "Download C</home> from the VM into a local tarball:"
38434 #: ../tools/virt-tar.pl:54
38437 " virt-tar -x domname /home home.tar\n"
38442 #: ../tools/virt-tar.pl:56
38445 " virt-tar -zx domname /home home.tar.gz\n"
38450 #: ../tools/virt-tar.pl:58
38451 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
38455 #: ../tools/virt-tar.pl:60
38458 " virt-tar -u domname uploadstuff.tar /tmp\n"
38463 #: ../tools/virt-tar.pl:62
38466 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
38471 #: ../tools/virt-tar.pl:66
38473 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
38474 "virtual machines. If you do this, you risk disk corruption in the VM. "
38475 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
38479 #: ../tools/virt-tar.pl:71
38481 "You can use I<-x> (extract) on live virtual machines, but you might get "
38482 "inconsistent results or errors if there is filesystem activity inside the "
38483 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
38484 "work, but the only way to guarantee consistent results is if the virtual "
38485 "machine is shut down."
38489 #: ../tools/virt-tar.pl:79
38491 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
38492 "parts of a guest filesystem. There are many possibilities: making backups, "
38493 "uploading data files, snooping on guest activity, fixing or customizing "
38498 #: ../tools/virt-tar.pl:84
38500 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
38501 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
38502 "should look at the L<guestfish(1)> tool."
38506 #: ../tools/virt-tar.pl:88
38508 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
38509 "its contents (recursively) from the virtual machine into a local tarball. "
38510 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
38511 "virtual machine. You cannot use these two options together."
38515 #: ../tools/virt-tar.pl:94
38517 "In addition, you may need to use the I<-z> (gZip) option to enable "
38518 "compression. When uploading, you have to specify I<-z> if the upload file "
38519 "is compressed because virt-tar won't detect this on its own."
38523 #: ../tools/virt-tar.pl:98
38525 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
38526 "example it cannot do PKZip files or bzip2 compression. If you want that "
38527 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
38528 "the L<libguestfs(3)> API)."
38532 #: ../tools/virt-tar.pl:160
38533 msgid "B<--extract>"
38537 #: ../tools/virt-tar.pl:162
38538 msgid "B<--download>"
38542 #: ../tools/virt-tar.pl:164
38547 #: ../tools/virt-tar.pl:166
38548 msgid "B<--upload>"
38552 #: ../tools/virt-tar.pl:168
38554 "Use I<-x> to extract (download) a directory from a virtual machine to a "
38559 #: ../tools/virt-tar.pl:171
38561 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
38562 "Please read the L</WARNING> section above before using this option."
38566 #: ../tools/virt-tar.pl:175
38567 msgid "You must specify exactly one of these options."
38571 #: ../tools/virt-tar.pl:181
38576 #: ../tools/virt-tar.pl:183
38581 #: ../tools/virt-tar.pl:185
38582 msgid "Specify that the input or output tarball is gzip-compressed."
38586 #: ../tools/virt-tar.pl:298
38588 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
38589 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
38590 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
38595 #: ../tools/virt-win-reg.pl:37
38597 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
38601 #: ../tools/virt-win-reg.pl:41
38604 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
38609 #: ../tools/virt-win-reg.pl:43
38612 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
38617 #: ../tools/virt-win-reg.pl:45
38620 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
38625 #: ../tools/virt-win-reg.pl:47
38628 " virt-win-reg --merge domname [input.reg ...]\n"
38633 #: ../tools/virt-win-reg.pl:49
38636 " virt-win-reg [--options] disk.img ... # instead of domname\n"
38641 #: ../tools/virt-win-reg.pl:53
38643 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
38644 "virtual machines. If you do this, you I<will> get irreversible disk "
38645 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
38646 "but doesn't catch all cases."
38650 #: ../tools/virt-win-reg.pl:58
38652 "Modifying the Windows Registry is an inherently risky operation. The format "
38653 "is deliberately obscure and undocumented, and Registry changes can leave the "
38654 "system unbootable. Therefore when using the I<--merge> option, make sure "
38655 "you have a reliable backup first."
38659 #: ../tools/virt-win-reg.pl:65
38661 "This program can export and merge Windows Registry entries from a Windows "
38666 #: ../tools/virt-win-reg.pl:68
38668 "The first parameter is the libvirt guest name or the raw disk image of a "
38673 #: ../tools/virt-win-reg.pl:71
38675 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
38676 "exported (recursively). For example:"
38680 #: ../tools/virt-win-reg.pl:74
38683 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
38688 #: ../tools/virt-win-reg.pl:76
38690 "You can also display single values from within registry keys, for example:"
38694 #: ../tools/virt-win-reg.pl:79
38697 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
38698 " $ virt-win-reg Windows7 $cvkey ProductName\n"
38699 " Windows 7 Enterprise\n"
38704 #: ../tools/virt-win-reg.pl:83
38706 "With I<--merge>, you can merge a textual regedit file into the Windows "
38711 #: ../tools/virt-win-reg.pl:86
38714 " $ virt-win-reg --merge Windows7 changes.reg\n"
38719 #: ../tools/virt-win-reg.pl:90
38721 "This program is only meant for simple access to the registry. If you want "
38722 "to do complicated things with the registry, we suggest you download the "
38723 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
38724 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
38725 "L<hivexregedit(1)>."
38729 #: ../tools/virt-win-reg.pl:159
38734 #: ../tools/virt-win-reg.pl:161
38736 "In merge mode, this merges a textual regedit file into the Windows Registry "
38737 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
38738 "displays or exports Registry entries instead."
38742 #: ../tools/virt-win-reg.pl:165
38744 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
38745 "result in disk corruption. However exporting (without this flag) is always "
38750 #: ../tools/virt-win-reg.pl:173
38751 msgid "B<--encoding> UTF-16LE|ASCII"
38755 #: ../tools/virt-win-reg.pl:175
38757 "When merging (only), you may need to specify the encoding for strings to be "
38758 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
38759 "(3)/ENCODING STRINGS>."
38763 #: ../tools/virt-win-reg.pl:179
38765 "The default is to use UTF-16LE, which should work with recent versions of "
38770 #: ../tools/virt-win-reg.pl:186
38771 msgid "B<--unsafe-printable-strings>"
38775 #: ../tools/virt-win-reg.pl:188
38777 "When exporting (only), assume strings are UTF-16LE and print them as strings "
38778 "instead of hex sequences. Remove the final zero codepoint from strings if "
38783 #: ../tools/virt-win-reg.pl:192
38785 "This is unsafe and does not preserve the fidelity of strings in the original "
38786 "Registry for various reasons:"
38790 #: ../tools/virt-win-reg.pl:199
38792 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
38793 "other encodings will be corrupted by this transformation."
38797 #: ../tools/virt-win-reg.pl:204
38799 "Assumes that everything which has type 1 or 2 is really a string and that "
38800 "everything else is not a string, but the type field in real Registries is "
38805 #: ../tools/virt-win-reg.pl:210
38807 "Loses information about whether a zero codepoint followed the string in the "
38812 #: ../tools/virt-win-reg.pl:215
38814 "This all happens because the Registry itself contains no information about "
38815 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
38819 #: ../tools/virt-win-reg.pl:219
38821 "You should only use this option for quick hacking and debugging of the "
38822 "Registry contents, and I<never> use it if the output is going to be passed "
38823 "into another program or stored in another Registry."
38827 #: ../tools/virt-win-reg.pl:556
38828 msgid "SUPPORTED SYSTEMS"
38832 #: ../tools/virt-win-reg.pl:558
38834 "The program currently supports Windows NT-derived guests starting with "
38835 "Windows XP through to at least Windows 7."
38839 #: ../tools/virt-win-reg.pl:561
38840 msgid "The following Registry keys are supported:"
38844 #: ../tools/virt-win-reg.pl:565
38845 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
38849 #: ../tools/virt-win-reg.pl:567
38850 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
38854 #: ../tools/virt-win-reg.pl:569
38855 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
38859 #: ../tools/virt-win-reg.pl:571
38860 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
38864 #: ../tools/virt-win-reg.pl:573
38865 msgid "C<HKEY_USERS\\.DEFAULT>"
38869 #: ../tools/virt-win-reg.pl:575
38870 msgid "C<HKEY_USERS\\I<SID>>"
38874 #: ../tools/virt-win-reg.pl:577
38875 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
38879 #: ../tools/virt-win-reg.pl:579
38880 msgid "C<HKEY_USERS\\I<username>>"
38884 #: ../tools/virt-win-reg.pl:581
38886 "where I<username> is a local user name (this is a libguestfs extension)."
38890 #: ../tools/virt-win-reg.pl:585
38892 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
38897 #: ../tools/virt-win-reg.pl:588
38899 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
38900 "supported (there is no \"current user\")."
38904 #: ../tools/virt-win-reg.pl:591
38909 #: ../tools/virt-win-reg.pl:593
38911 "C<virt-win-reg> expects that regedit files have already been reencoded in "
38912 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
38913 "style line endings. Since Windows regedit files are often in UTF-16LE with "
38914 "Windows-style line endings, you may need to reencode the whole file before "
38915 "or after processing."
38919 #: ../tools/virt-win-reg.pl:599
38921 "To reencode a file from Windows format to Linux (before processing it with "
38922 "the I<--merge> option), you would do something like this:"
38926 #: ../tools/virt-win-reg.pl:602
38929 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
38934 #: ../tools/virt-win-reg.pl:604
38936 "To go in the opposite direction, after exporting and before sending the file "
38937 "to a Windows user, do something like this:"
38941 #: ../tools/virt-win-reg.pl:607
38944 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
38949 #: ../tools/virt-win-reg.pl:609
38950 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
38954 #: ../tools/virt-win-reg.pl:611
38956 "If you are unsure about the current encoding, use the L<file(1)> command. "
38957 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
38958 "style (CRLF) line endings, like this:"
38962 #: ../tools/virt-win-reg.pl:615
38965 " $ file software.reg\n"
38966 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
38967 " with CRLF line terminators\n"
38972 #: ../tools/virt-win-reg.pl:619
38973 msgid "This file would need conversion before you could I<--merge> it."
38977 #: ../tools/virt-win-reg.pl:621
38978 msgid "CurrentControlSet etc."
38982 #: ../tools/virt-win-reg.pl:623
38984 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
38985 "Registry at the level of the hive file, and therefore you cannot modify "
38990 #: ../tools/virt-win-reg.pl:627
38992 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
38993 "circumstances it might refer to another control set. The way to find out is "
38994 "to look at the C<HKLM\\SYSTEM\\Select> key:"
38998 #: ../tools/virt-win-reg.pl:631
39001 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
39002 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
39003 " \"Current\"=dword:00000001\n"
39004 " \"Default\"=dword:00000001\n"
39005 " \"Failed\"=dword:00000000\n"
39006 " \"LastKnownGood\"=dword:00000002\n"
39011 #: ../tools/virt-win-reg.pl:638
39012 msgid "\"Current\" is the one which Windows will choose when it boots."
39016 #: ../tools/virt-win-reg.pl:640
39018 "Similarly, other C<Current...> keys in the path may need to be replaced."
39022 #: ../tools/virt-win-reg.pl:643
39023 msgid "WINDOWS TIPS"
39027 #: ../tools/virt-win-reg.pl:645
39029 "Note that some of these tips modify the guest disk image. The guest I<must> "
39030 "be shut off, else you will get disk corruption."
39034 #: ../tools/virt-win-reg.pl:648
39035 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
39039 #: ../tools/virt-win-reg.pl:650
39041 "Prepare a DOS batch script, VBScript or executable. Upload this using "
39042 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
39043 "is uploaded into C<C:\\>:"
39047 #: ../tools/virt-win-reg.pl:654
39050 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
39055 #: ../tools/virt-win-reg.pl:656
39056 msgid "Prepare a regedit file containing the registry change:"
39060 #: ../tools/virt-win-reg.pl:658
39063 " cat > test.reg <<'EOF'\n"
39064 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
39065 " \"Test\"=\"c:\\\\test.bat\"\n"
39071 #: ../tools/virt-win-reg.pl:663
39073 "In this example we use the key C<RunOnce> which means that the script will "
39074 "run precisely once when the first user logs in. If you want it to run every "
39075 "time a user logs in, replace C<RunOnce> with C<Run>."
39079 #: ../tools/virt-win-reg.pl:667
39080 msgid "Now update the registry:"
39084 #: ../tools/virt-win-reg.pl:669
39087 " virt-win-reg --merge WindowsGuest test.reg\n"
39092 #: ../tools/virt-win-reg.pl:671
39093 msgid "INSTALLING A SERVICE"
39097 #: ../tools/virt-win-reg.pl:673
39099 "This section assumes you are familiar with Windows services, and you either "
39100 "have a program which handles the Windows Service Control Protocol directly "
39101 "or you want to run any program using a service wrapper like SrvAny or the "
39106 #: ../tools/virt-win-reg.pl:678
39108 "First upload the program and optionally the service wrapper. In this case "
39109 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
39113 #: ../tools/virt-win-reg.pl:682
39116 " guestfish -i -d WindowsGuest <<EOF\n"
39117 " upload rhsrvany.exe /rhsrvany.exe\n"
39118 " upload test.exe /test.exe\n"
39124 #: ../tools/virt-win-reg.pl:687
39126 "Prepare a regedit file containing the registry changes. In this example, "
39127 "the first registry change is needed for the service itself or the service "
39128 "wrapper (if used). The second registry change is only needed because I am "
39129 "using the RHSrvAny service wrapper."
39133 #: ../tools/virt-win-reg.pl:692
39136 " cat > service.reg <<'EOF'\n"
39137 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
39138 " \"Type\"=dword:00000010\n"
39139 " \"Start\"=dword:00000002\n"
39140 " \"ErrorControl\"=dword:00000001\n"
39141 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
39142 " \"DisplayName\"=\"RHSrvAny\"\n"
39143 " \"ObjectName\"=\"NetworkService\"\n"
39148 #: ../tools/virt-win-reg.pl:701
39151 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
39152 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
39153 " \"PWD\"=\"c:\\\\Temp\"\n"
39159 #: ../tools/virt-win-reg.pl:712
39161 "For use of C<ControlSet001> see the section above in this manual page. You "
39162 "may need to adjust this according to the control set that is in use by the "
39167 #: ../tools/virt-win-reg.pl:718
39169 "C<\"ObjectName\"> controls the privileges that the service will have. An "
39170 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
39171 "privileged account."
39175 #: ../tools/virt-win-reg.pl:724
39177 "For the meaning of the magic numbers, see this Microsoft KB article: "
39178 "L<http://support.microsoft.com/kb/103000>."
39182 #: ../tools/virt-win-reg.pl:729
39183 msgid "Update the registry:"
39187 #: ../tools/virt-win-reg.pl:731
39190 " virt-win-reg --merge WindowsGuest service.reg\n"
39195 #: ../tools/virt-win-reg.pl:735
39197 "Be careful when passing parameters containing C<\\> (backslash) in the "
39198 "shell. Usually you will have to use 'single quotes' or double backslashes "
39199 "(but not both) to protect them from the shell."
39203 #: ../tools/virt-win-reg.pl:739
39204 msgid "Paths and value names are case-insensitive."
39208 #: ../tools/virt-win-reg.pl:748
39210 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
39211 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
39212 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
39216 #: ../tools/virt-win-reg.pl:766
39219 " export LIBGUESTFS_DEBUG=1\n"
39220 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
39225 #: ../tools/virt-win-reg.pl:769
39227 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."