1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
6 # rjones <rjones@redhat.com>, 2011.
7 # <www.carrotsoft@gmail.com>, 2011.
10 "Project-Id-Version: libguestfs\n"
11 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
12 "POT-Creation-Date: 2011-10-20 22:17+0200\n"
13 "PO-Revision-Date: 2011-10-19 15:46+0000\n"
14 "Last-Translator: rjones <rjones@redhat.com>\n"
15 "Language-Team: Japanese <trans-ja@lists.fedoraproject.org>\n"
18 "Content-Type: text/plain; charset=UTF-8\n"
19 "Content-Transfer-Encoding: 8bit\n"
20 "Plural-Forms: nplurals=1; plural=0\n"
23 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3
24 #: ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3
25 #: ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3
26 #: ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3
27 #: ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3
28 #: ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3
29 #: ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3
30 #: ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3
31 #: ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3
32 #: ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3
33 #: ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3
34 #: ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3
35 #: ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3
36 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
37 #: ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31
38 #: ../tools/virt-win-reg.pl:35
43 #: ../align/virt-alignment-scan.pod:5
44 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
48 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7
49 #: ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7
50 #: ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7
51 #: ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7
52 #: ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7
53 #: ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7
54 #: ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7
55 #: ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7
56 #: ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7
57 #: ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7
58 #: ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7
59 #: ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7
60 #: ../test-tool/libguestfs-test-tool.pod:7
61 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
62 #: ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35
63 #: ../tools/virt-win-reg.pl:39
68 #: ../align/virt-alignment-scan.pod:9
71 " virt-alignment-scan [--options] -d domname\n"
76 #: ../align/virt-alignment-scan.pod:11
79 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
84 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19
85 #: ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19
86 #: ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27
87 #: ../erlang/examples/guestfs-erlang.pod:16
88 #: ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18
89 #: ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19
90 #: ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21
91 #: ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20
92 #: ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15
93 #: ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18
94 #: ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29
95 #: ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15
96 #: ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23
97 #: ../test-tool/libguestfs-test-tool.pod:11
98 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
99 #: ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77
100 #: ../tools/virt-win-reg.pl:63
105 #: ../align/virt-alignment-scan.pod:15
107 "When older operating systems install themselves, the partitioning tools "
108 "place partitions at a sector misaligned with the underlying storage "
109 "(commonly the first partition starts on sector C<63>). Misaligned "
110 "partitions can result in an operating system issuing more I/O than should be "
115 #: ../align/virt-alignment-scan.pod:21
117 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
118 "machines and disk images and warns you if there are alignment problems."
122 #: ../align/virt-alignment-scan.pod:25
124 "Currently there is no virt tool for fixing alignment problems. You can only "
125 "reinstall the guest operating system. The following NetApp document "
126 "summarises the problem and possible solutions: L<http://media.netapp.com/"
127 "documents/tr-3747.pdf>"
131 #: ../align/virt-alignment-scan.pod:30
136 #: ../align/virt-alignment-scan.pod:32
137 msgid "To run this tool on a disk image directly, use the I<-a> option:"
141 #: ../align/virt-alignment-scan.pod:34
144 " $ virt-alignment-scan -a winxp.img\n"
145 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
150 #: ../align/virt-alignment-scan.pod:37
153 " $ virt-alignment-scan -a fedora16.img\n"
154 " /dev/sda1 1048576 1024K ok\n"
155 " /dev/sda2 2097152 2048K ok\n"
156 " /dev/sda3 526385152 2048K ok\n"
161 #: ../align/virt-alignment-scan.pod:42
163 "To run the tool on a guest known to libvirt, use the I<-d> option and "
164 "possibly the I<-c> option:"
168 #: ../align/virt-alignment-scan.pod:45
171 " # virt-alignment-scan -d RHEL5\n"
172 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
173 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
178 #: ../align/virt-alignment-scan.pod:49
181 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
182 " /dev/sda1 1048576 1024K ok\n"
183 " /dev/sda2 105906176 1024K ok\n"
184 " /dev/sdb1 65536 64K ok\n"
189 #: ../align/virt-alignment-scan.pod:54
191 "The output consists of 4 or more whitespace-separated columns. Only the "
192 "first 4 columns are signficant if you want to parse this from a program. "
197 #: ../align/virt-alignment-scan.pod:60
202 #: ../align/virt-alignment-scan.pod:62
204 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
205 "on the first block device)"
209 #: ../align/virt-alignment-scan.pod:65
214 #: ../align/virt-alignment-scan.pod:67
215 msgid "the start of the partition in bytes"
219 #: ../align/virt-alignment-scan.pod:69
224 #: ../align/virt-alignment-scan.pod:71
225 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
229 #: ../align/virt-alignment-scan.pod:73
234 #: ../align/virt-alignment-scan.pod:75
236 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
237 "can cause performance problems"
241 #: ../align/virt-alignment-scan.pod:78
246 #: ../align/virt-alignment-scan.pod:80
247 msgid "optional free-text explanation."
251 #: ../align/virt-alignment-scan.pod:84
253 "The exit code from the program changes depending on whether poorly aligned "
254 "partitions were found. See L</EXIT STATUS> below."
258 #: ../align/virt-alignment-scan.pod:87
259 msgid "If you just want the exit code with no output, use the I<-q> option."
263 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62
264 #: ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261
265 #: ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62
266 #: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45
267 #: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42
268 #: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92
269 #: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84
270 #: ../resize/virt-resize.pod:241 ../sparsify/virt-sparsify.pod:99
271 #: ../test-tool/libguestfs-test-tool.pod:36
272 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54
273 #: ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103
274 #: ../tools/virt-win-reg.pl:96
279 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66
280 #: ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265
281 #: ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66
282 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160
283 #: ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88
284 #: ../resize/virt-resize.pod:245 ../sparsify/virt-sparsify.pod:103
285 #: ../test-tool/libguestfs-test-tool.pod:40
286 #: ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62
287 #: ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111
288 #: ../tools/virt-win-reg.pl:104
293 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68
294 #: ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267
295 #: ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68
296 #: ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90
297 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64
298 #: ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113
299 #: ../tools/virt-win-reg.pl:106
300 msgid "Display brief help."
304 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70
305 #: ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269
306 #: ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70
307 #: ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
312 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72
313 #: ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271
314 #: ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72
315 #: ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
316 msgid "B<--add> file"
320 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
321 msgid "Add I<file> which should be a disk image from a virtual machine."
325 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78
326 #: ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277
327 #: ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78
328 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102
329 #: ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
331 "The format of the disk image is auto-detected. To override this and force a "
332 "particular format use the I<--format=..> option."
336 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81
337 #: ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291
338 #: ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78
339 #: ../rescue/virt-rescue.pod:107
344 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83
345 #: ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293
346 #: ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80
347 #: ../rescue/virt-rescue.pod:109
348 msgid "B<--connect> URI"
352 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85
353 #: ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295
354 #: ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99
355 #: ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111
356 #: ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82
357 #: ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
359 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
360 "to the default libvirt hypervisor."
364 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88
365 #: ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298
366 #: ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85
367 #: ../rescue/virt-rescue.pod:114
369 "If you specify guest block devices directly (I<-a>), then libvirt is not "
374 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91
375 #: ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307
376 #: ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105
377 #: ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
382 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93
383 #: ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309
384 #: ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107
385 #: ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
386 msgid "B<--domain> guest"
390 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95
391 #: ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311
392 #: ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109
393 #: ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
395 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
400 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105
401 #: ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328
402 #: ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101
403 #: ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142
404 #: ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
405 msgid "B<--format=raw|qcow2|..>"
409 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107
410 #: ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330
411 #: ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103
412 #: ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235
413 #: ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101
414 #: ../rescue/virt-rescue.pod:126
419 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109
420 #: ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332
421 #: ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105
422 #: ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237
423 #: ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:128
425 "The default for the I<-a> option is to auto-detect the format of the disk "
426 "image. Using this forces the disk format for I<-a> options which follow on "
427 "the command line. Using I<--format> with no argument switches back to auto-"
428 "detection for subsequent I<-a> options."
432 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114
433 #: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337
434 #: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110
435 #: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242
436 #: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336
437 #: ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2862
442 #: ../align/virt-alignment-scan.pod:134
445 " virt-alignment-scan --format=raw -a disk.img\n"
450 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118
451 #: ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341
452 #: ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114
453 #: ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246
454 #: ../rescue/virt-rescue.pod:137
455 msgid "forces raw format (no auto-detection) for C<disk.img>."
459 #: ../align/virt-alignment-scan.pod:138
462 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
467 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122
468 #: ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345
469 #: ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118
470 #: ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250
471 #: ../rescue/virt-rescue.pod:141
473 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
474 "detection for C<another.img>."
478 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125
479 #: ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348
480 #: ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121
481 #: ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
483 "If you have untrusted raw-format guest disk images, you should use this "
484 "option to specify the disk format. This avoids a possible security problem "
485 "with malicious guests (CVE-2010-3851)."
489 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:470
490 #: ../sparsify/virt-sparsify.pod:153
495 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:472
496 #: ../sparsify/virt-sparsify.pod:155
501 #: ../align/virt-alignment-scan.pod:151
503 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
508 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134
509 #: ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425
510 #: ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173
511 #: ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390
512 #: ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119
513 #: ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159
518 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136
519 #: ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427
520 #: ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175
521 #: ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392
522 #: ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121
523 #: ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161
528 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138
529 #: ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429
530 #: ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177
531 #: ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123
532 #: ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163
533 msgid "Enable verbose messages for debugging."
537 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140
538 #: ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431
539 #: ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179
540 #: ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397
541 #: ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125
542 #: ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:540
543 #: ../sparsify/virt-sparsify.pod:165
548 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142
549 #: ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433
550 #: ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181
551 #: ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399
552 #: ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127
553 #: ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:542
554 #: ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69
555 #: ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169
556 #: ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
561 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144
562 #: ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435
563 #: ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183
564 #: ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129
565 #: ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:544
566 #: ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71
567 #: ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171
568 #: ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
569 msgid "Display version number and exit."
573 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146
574 #: ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437
575 #: ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185
576 #: ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412
577 #: ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131
578 #: ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171
579 #: ../tools/virt-tar.pl:158
584 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148
585 #: ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439
586 #: ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187
587 #: ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133
588 #: ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173
589 msgid "Enable tracing of libguestfs API calls."
593 #: ../align/virt-alignment-scan.pod:172
594 msgid "RECOMMENDED ALIGNMENT"
598 #: ../align/virt-alignment-scan.pod:174
600 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
601 "first sector of the first partition at sector 63, with a 512 byte sector "
602 "size. This happens because of a historical accident. Drives have to report "
603 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
604 "completely meaningless on modern drives, but it happens that the geometry "
605 "reported always has 63 sectors per track. The operating system therefore "
606 "places the first partition at the start of the second \"track\", at sector "
611 #: ../align/virt-alignment-scan.pod:183
613 "When the guest OS is virtualized, the host operating system and hypervisor "
614 "may prefer accesses aligned to one of:"
618 #: ../align/virt-alignment-scan.pod:188
623 #: ../align/virt-alignment-scan.pod:190
625 "if the host OS uses local storage directly on hard drive partitions, and the "
626 "hard drive has 512 byte physical sectors."
630 #: ../align/virt-alignment-scan.pod:193
635 #: ../align/virt-alignment-scan.pod:195
637 "for local storage on new hard drives with 4Kbyte physical sectors; for file-"
638 "backed storage on filesystems with 4Kbyte block size; or for some types of "
639 "network-attached storage."
643 #: ../align/virt-alignment-scan.pod:199
648 #: ../align/virt-alignment-scan.pod:201
650 "for high-end network-attached storage. This is the optimal block size for "
651 "some NetApp hardware."
655 #: ../align/virt-alignment-scan.pod:204
660 #: ../align/virt-alignment-scan.pod:206
661 msgid "see L</1 MB PARTITION ALIGNMENT> below."
665 #: ../align/virt-alignment-scan.pod:210
667 "Partitions which are not aligned correctly to the underlying storage cause "
668 "extra I/O. For example:"
672 #: ../align/virt-alignment-scan.pod:213
676 " +--------------------------+------\n"
678 " | filesystem block |\n"
679 " ---+------------------+------+-------------------+-----+---\n"
680 " | host block | host block |\n"
682 " ---+-------------------------+-------------------------+---\n"
687 #: ../align/virt-alignment-scan.pod:222
689 "In this example, each time a 4K guest block is read, two blocks on the host "
690 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
691 "written, two host blocks must first be read, the old and new data combined, "
692 "and the two blocks written back (4x I/O)."
696 #: ../align/virt-alignment-scan.pod:227
697 msgid "LINUX HOST BLOCK AND I/O SIZE"
701 #: ../align/virt-alignment-scan.pod:229
703 "New versions of the Linux kernel expose the physical and logical block size, "
704 "and minimum and recommended I/O size."
708 #: ../align/virt-alignment-scan.pod:232
709 msgid "For a typical hard drive with 512 byte sectors:"
713 #: ../align/virt-alignment-scan.pod:234
716 " $ cat /sys/block/sda/queue/physical_block_size\n"
718 " $ cat /sys/block/sda/queue/logical_block_size\n"
720 " $ cat /sys/block/sda/queue/minimum_io_size\n"
722 " $ cat /sys/block/sda/queue/optimal_io_size\n"
728 #: ../align/virt-alignment-scan.pod:243
729 msgid "For a NetApp LUN:"
733 #: ../align/virt-alignment-scan.pod:245
736 " $ cat /sys/block/sdc/queue/logical_block_size\n"
738 " $ cat /sys/block/sdc/queue/physical_block_size\n"
740 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
742 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
748 #: ../align/virt-alignment-scan.pod:254
750 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
751 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
755 #: ../align/virt-alignment-scan.pod:258
757 "For detailed information about what these numbers mean, see L<http://docs."
758 "redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/"
759 "Storage_Administration_Guide/newstorage-iolimits.html>"
763 #: ../align/virt-alignment-scan.pod:261
765 "[Thanks to Mike Snitzer for providing NetApp data and additional "
770 #: ../align/virt-alignment-scan.pod:264
771 msgid "1 MB PARTITION ALIGNMENT"
775 #: ../align/virt-alignment-scan.pod:266
777 "Microsoft picked 1 MB as the default alignment for all partitions starting "
778 "with Windows 2008 Server, and Linux has followed this."
782 #: ../align/virt-alignment-scan.pod:269
784 "Assuming 512 byte sectors in the guest, you will now see the first partition "
785 "starting at sector 2048, and subsequent partitions (if any) will start at a "
786 "multiple of 2048 sectors."
790 #: ../align/virt-alignment-scan.pod:273
792 "1 MB alignment is compatible with all current alignment requirements (4K, "
793 "64K) and provides room for future growth in physical block sizes."
797 #: ../align/virt-alignment-scan.pod:276
798 msgid "SETTING ALIGNMENT"
802 #: ../align/virt-alignment-scan.pod:278
804 "L<virt-resize(1)> can change the alignment of the partitions of some "
805 "guests. Currently it can fully align all the partitions of all Windows "
806 "guests, and it will fix the bootloader where necessary. For Linux guests, "
807 "it can align the second and subsequent partitions, so the majority of OS "
808 "accesses except at boot will be aligned."
812 #: ../align/virt-alignment-scan.pod:284
814 "Another way to correct partition alignment problems is to reinstall your "
815 "guest operating systems. If you install operating systems from templates, "
816 "ensure these have correct partition alignment too."
820 #: ../align/virt-alignment-scan.pod:288
822 "For older versions of Windows, the following NetApp document contains useful "
823 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
827 #: ../align/virt-alignment-scan.pod:291
829 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
830 "an explicit C<%pre> section that creates aligned partitions using L<parted(8)"
831 ">. Do not use the Kickstart C<part> command. The NetApp document above "
832 "contains an example."
836 #: ../align/virt-alignment-scan.pod:296 ../cat/virt-cat.pod:191
837 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:483
838 #: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
839 #: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352
840 #: ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:655
841 #: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
842 #: ../tools/virt-make-fs.pl:532 ../tools/virt-tar.pl:289
843 #: ../tools/virt-win-reg.pl:733
844 msgid "SHELL QUOTING"
848 #: ../align/virt-alignment-scan.pod:298 ../cat/virt-cat.pod:193
849 #: ../cat/virt-filesystems.pod:367 ../cat/virt-ls.pod:485
850 #: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
851 #: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354
852 #: ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:657
853 #: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
854 #: ../tools/virt-make-fs.pl:534 ../tools/virt-tar.pl:291
855 #: ../tools/virt-win-reg.pl:741
857 "Libvirt guest names can contain arbitrary characters, some of which have "
858 "meaning to the shell such as C<#> and space. You may need to quote or "
859 "escape these characters on the command line. See the shell manual page L<sh"
864 #: ../align/virt-alignment-scan.pod:303 ../cat/virt-cat.pod:198
865 #: ../cat/virt-filesystems.pod:372 ../cat/virt-ls.pod:490
866 #: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
867 #: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
868 #: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375
869 #: ../resize/virt-resize.pod:662 ../sparsify/virt-sparsify.pod:227
870 #: ../test-tool/libguestfs-test-tool.pod:90
875 #: ../align/virt-alignment-scan.pod:305
876 msgid "This program returns:"
880 #: ../align/virt-alignment-scan.pod:309 ../align/virt-alignment-scan.pod:315
881 #: ../align/virt-alignment-scan.pod:321 ../align/virt-alignment-scan.pod:328
882 #: ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287
883 #: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295
884 #: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314
885 #: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322
886 #: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362
887 #: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388
888 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
889 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
890 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
891 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
892 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
893 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
894 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
895 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
896 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
897 #: ../fish/guestfish-actions.pod:395 ../fish/guestfish-actions.pod:403
898 #: ../fish/guestfish-actions.pod:410 ../fish/guestfish-actions.pod:417
899 #: ../fish/guestfish-actions.pod:1144 ../fish/guestfish-actions.pod:1148
900 #: ../fish/guestfish-actions.pod:1152 ../fish/guestfish-actions.pod:1156
901 #: ../fish/guestfish-actions.pod:1164 ../fish/guestfish-actions.pod:1168
902 #: ../fish/guestfish-actions.pod:1172 ../fish/guestfish-actions.pod:1182
903 #: ../fish/guestfish-actions.pod:1186 ../fish/guestfish-actions.pod:1190
904 #: ../fish/guestfish-actions.pod:1280 ../fish/guestfish-actions.pod:1284
905 #: ../fish/guestfish-actions.pod:1289 ../fish/guestfish-actions.pod:1294
906 #: ../fish/guestfish-actions.pod:1336 ../fish/guestfish-actions.pod:1340
907 #: ../fish/guestfish-actions.pod:1345 ../fish/guestfish-actions.pod:1601
908 #: ../fish/guestfish-actions.pod:1608 ../fish/guestfish-actions.pod:1615
909 #: ../fish/guestfish-actions.pod:2018 ../fish/guestfish-actions.pod:2024
910 #: ../fish/guestfish-actions.pod:2032 ../fish/guestfish-actions.pod:2039
911 #: ../fish/guestfish-actions.pod:2046 ../fish/guestfish.pod:445
912 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
913 #: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
914 #: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:338
915 #: ../resize/virt-resize.pod:342 ../resize/virt-resize.pod:351
916 #: ../resize/virt-resize.pod:357 ../sparsify/virt-sparsify.pod:32
917 #: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
918 #: ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54
919 #: ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64
920 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29
921 #: ../src/guestfs-actions.pod:594 ../src/guestfs-actions.pod:602
922 #: ../src/guestfs-actions.pod:609 ../src/guestfs-actions.pod:616
923 #: ../src/guestfs-actions.pod:1784 ../src/guestfs-actions.pod:1788
924 #: ../src/guestfs-actions.pod:1792 ../src/guestfs-actions.pod:1796
925 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1808
926 #: ../src/guestfs-actions.pod:1812 ../src/guestfs-actions.pod:1822
927 #: ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1830
928 #: ../src/guestfs-actions.pod:1968 ../src/guestfs-actions.pod:1972
929 #: ../src/guestfs-actions.pod:1977 ../src/guestfs-actions.pod:1982
930 #: ../src/guestfs-actions.pod:2043 ../src/guestfs-actions.pod:2047
931 #: ../src/guestfs-actions.pod:2052 ../src/guestfs-actions.pod:2467
932 #: ../src/guestfs-actions.pod:2474 ../src/guestfs-actions.pod:2481
933 #: ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3032
934 #: ../src/guestfs-actions.pod:3040 ../src/guestfs-actions.pod:3047
935 #: ../src/guestfs-actions.pod:3054 ../src/guestfs.pod:388
936 #: ../src/guestfs.pod:393 ../src/guestfs.pod:398 ../src/guestfs.pod:402
937 #: ../src/guestfs.pod:407 ../src/guestfs.pod:411 ../src/guestfs.pod:416
938 #: ../src/guestfs.pod:421 ../src/guestfs.pod:1094 ../src/guestfs.pod:1098
939 #: ../src/guestfs.pod:1102 ../src/guestfs.pod:1107 ../src/guestfs.pod:1115
940 #: ../src/guestfs.pod:1134 ../src/guestfs.pod:1142 ../src/guestfs.pod:1164
941 #: ../src/guestfs.pod:1168 ../src/guestfs.pod:1172 ../src/guestfs.pod:1176
942 #: ../src/guestfs.pod:1180 ../src/guestfs.pod:1184 ../src/guestfs.pod:1674
943 #: ../src/guestfs.pod:1679 ../src/guestfs.pod:1683 ../src/guestfs.pod:1785
944 #: ../src/guestfs.pod:1790 ../src/guestfs.pod:1794 ../src/guestfs.pod:1804
945 #: ../src/guestfs.pod:2093 ../src/guestfs.pod:2098 ../src/guestfs.pod:2104
946 #: ../src/guestfs.pod:2112 ../src/guestfs.pod:2630 ../src/guestfs.pod:2636
947 #: ../src/guestfs.pod:2641 ../src/guestfs.pod:2647 ../src/guestfs.pod:3047
948 #: ../src/guestfs.pod:3052 ../src/guestfs.pod:3056 ../src/guestfs.pod:3060
949 #: ../src/guestfs.pod:3064 ../src/guestfs.pod:3078 ../src/guestfs.pod:3083
950 #: ../src/guestfs.pod:3314 ../src/guestfs.pod:3318 ../src/guestfs.pod:3322
951 #: ../src/guestfs.pod:3326 ../tools/virt-win-reg.pl:197
952 #: ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208
953 #: ../tools/virt-win-reg.pl:710 ../tools/virt-win-reg.pl:716
954 #: ../tools/virt-win-reg.pl:722
959 #: ../align/virt-alignment-scan.pod:311
964 #: ../align/virt-alignment-scan.pod:313
966 "successful exit, all partitions are aligned E<ge> 64K for best performance"
970 #: ../align/virt-alignment-scan.pod:317
975 #: ../align/virt-alignment-scan.pod:319
976 msgid "an error scanning the disk image or guest"
980 #: ../align/virt-alignment-scan.pod:323
985 #: ../align/virt-alignment-scan.pod:325
987 "successful exit, some partitions have alignment E<lt> 64K which can result "
988 "in poor performance on high end network storage"
992 #: ../align/virt-alignment-scan.pod:330
997 #: ../align/virt-alignment-scan.pod:332
999 "successful exit, some partitions have alignment E<lt> 4K which can result in "
1000 "poor performance on most hypervisors"
1004 #: ../align/virt-alignment-scan.pod:337 ../cat/virt-cat.pod:203
1005 #: ../cat/virt-filesystems.pod:377 ../cat/virt-ls.pod:495
1006 #: ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227
1007 #: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97
1008 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
1009 #: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
1010 #: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
1011 #: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
1012 #: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
1013 #: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
1014 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288
1015 #: ../resize/virt-resize.pod:667 ../ruby/examples/guestfs-ruby.pod:36
1016 #: ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3255
1017 #: ../test-tool/libguestfs-test-tool.pod:100
1018 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
1019 #: ../tools/virt-make-fs.pl:539 ../tools/virt-tar.pl:296
1020 #: ../tools/virt-win-reg.pl:746
1025 #: ../align/virt-alignment-scan.pod:339
1027 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
1028 "L<virt-resize(1)>, L<http://libguestfs.org/>."
1032 #: ../align/virt-alignment-scan.pod:346 ../cat/virt-cat.pod:212
1033 #: ../cat/virt-filesystems.pod:388 ../cat/virt-ls.pod:507
1034 #: ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:235
1035 #: ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296
1036 #: ../resize/virt-resize.pod:690 ../sparsify/virt-sparsify.pod:264
1037 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
1038 #: ../tools/virt-make-fs.pl:564 ../tools/virt-tar.pl:311
1039 #: ../tools/virt-win-reg.pl:772
1044 #: ../align/virt-alignment-scan.pod:348 ../cat/virt-cat.pod:214
1045 #: ../cat/virt-filesystems.pod:390 ../cat/virt-ls.pod:509
1046 #: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
1047 #: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395
1048 #: ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:692
1049 #: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
1050 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:566
1051 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:774
1052 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
1056 #: ../align/virt-alignment-scan.pod:350 ../cat/virt-cat.pod:216
1057 #: ../cat/virt-filesystems.pod:392 ../cat/virt-ls.pod:511
1058 #: ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239
1059 #: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114
1060 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
1061 #: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
1062 #: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
1063 #: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
1064 #: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
1065 #: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
1066 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300
1067 #: ../resize/virt-resize.pod:694 ../ruby/examples/guestfs-ruby.pod:52
1068 #: ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3337
1069 #: ../test-tool/libguestfs-test-tool.pod:110
1070 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
1071 #: ../tools/virt-make-fs.pl:568 ../tools/virt-tar.pl:315
1072 #: ../tools/virt-win-reg.pl:776
1077 #: ../align/virt-alignment-scan.pod:352 ../clone/virt-sysprep.pod:507
1078 #: ../sparsify/virt-sparsify.pod:270
1079 msgid "Copyright (C) 2011 Red Hat Inc."
1083 #: ../align/virt-alignment-scan.pod:354 ../cat/virt-cat.pod:220
1084 #: ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:515
1085 #: ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243
1086 #: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
1087 #: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
1088 #: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
1089 #: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407
1090 #: ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:698
1091 #: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
1092 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
1093 #: ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319
1094 #: ../tools/virt-win-reg.pl:780
1096 "This program is free software; you can redistribute it and/or modify it "
1097 "under the terms of the GNU General Public License as published by the Free "
1098 "Software Foundation; either version 2 of the License, or (at your option) "
1099 "any later version."
1103 #: ../align/virt-alignment-scan.pod:359 ../cat/virt-cat.pod:225
1104 #: ../cat/virt-filesystems.pod:401 ../cat/virt-ls.pod:520
1105 #: ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248
1106 #: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
1107 #: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
1108 #: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
1109 #: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412
1110 #: ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:703
1111 #: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
1112 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
1113 #: ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324
1114 #: ../tools/virt-win-reg.pl:785
1116 "This program is distributed in the hope that it will be useful, but WITHOUT "
1117 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
1118 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
1123 #: ../align/virt-alignment-scan.pod:364 ../cat/virt-cat.pod:230
1124 #: ../cat/virt-filesystems.pod:406 ../cat/virt-ls.pod:525
1125 #: ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253
1126 #: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
1127 #: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
1128 #: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
1129 #: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417
1130 #: ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:708
1131 #: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
1132 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
1133 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329
1134 #: ../tools/virt-win-reg.pl:790
1136 "You should have received a copy of the GNU General Public License along with "
1137 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
1138 "Ave, Cambridge, MA 02139, USA."
1142 #: ../cat/virt-cat.pod:5
1143 msgid "virt-cat - Display files in a virtual machine"
1147 #: ../cat/virt-cat.pod:9
1150 " virt-cat [--options] -d domname file [file ...]\n"
1155 #: ../cat/virt-cat.pod:11
1158 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
1163 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
1164 #: ../inspector/virt-inspector.pod:13
1169 #: ../cat/virt-cat.pod:15
1172 " virt-cat domname file\n"
1177 #: ../cat/virt-cat.pod:17
1180 " virt-cat disk.img file\n"
1185 #: ../cat/virt-cat.pod:21
1187 "C<virt-cat> is a command line tool to display the contents of C<file> where "
1188 "C<file> exists in the named virtual machine (or disk image)."
1192 #: ../cat/virt-cat.pod:24
1194 "Multiple filenames can be given, in which case they are concatenated "
1195 "together. Each filename must be a full path, starting at the root directory "
1196 "(starting with '/')."
1200 #: ../cat/virt-cat.pod:28
1202 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
1203 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
1204 "(see L</USING GUESTFISH> below)."
1208 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
1209 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
1210 #: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29
1211 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
1212 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
1213 #: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75
1214 #: ../tools/virt-tar.pl:50
1219 #: ../cat/virt-cat.pod:34
1221 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
1225 #: ../cat/virt-cat.pod:37
1228 " virt-cat -d mydomain /etc/fstab\n"
1233 #: ../cat/virt-cat.pod:39
1234 msgid "List syslog messages from a VM disk image file:"
1238 #: ../cat/virt-cat.pod:41
1241 " virt-cat -a disk.img /var/log/messages | tail\n"
1246 #: ../cat/virt-cat.pod:43
1247 msgid "Find out what DHCP IP address a VM acquired:"
1251 #: ../cat/virt-cat.pod:45
1254 " virt-cat -d mydomain /var/log/messages | \\\n"
1255 " grep 'dhclient: bound to' | tail\n"
1260 #: ../cat/virt-cat.pod:48
1261 msgid "Find out what packages were recently installed:"
1265 #: ../cat/virt-cat.pod:50
1268 " virt-cat -d mydomain /var/log/yum.log | tail\n"
1273 #: ../cat/virt-cat.pod:52
1274 msgid "Find out who is logged on inside a virtual machine:"
1278 #: ../cat/virt-cat.pod:54
1281 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
1287 #: ../cat/virt-cat.pod:57
1288 msgid "or who was logged on:"
1292 #: ../cat/virt-cat.pod:59
1295 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
1296 " last -f /tmp/wtmp\n"
1301 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
1302 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
1303 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
1305 "Add I<file> which should be a disk image from a virtual machine. If the "
1306 "virtual machine has multiple block devices, you must supply all of them with "
1307 "separate I<-a> options."
1311 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
1312 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
1313 #: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
1314 msgid "B<--echo-keys>"
1318 #: ../cat/virt-cat.pod:100
1320 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
1321 "so you cannot see what you are typing. If you are not worried about Tempest "
1322 "attacks and there is no one else in the room you can specify this flag to "
1323 "see what you are typing."
1327 #: ../cat/virt-cat.pod:116
1330 " virt-cat --format=raw -a disk.img file\n"
1335 #: ../cat/virt-cat.pod:120
1338 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
1343 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
1344 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
1345 #: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
1346 msgid "B<--keys-from-stdin>"
1350 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
1351 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
1352 #: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1354 "Read key or passphrase parameters from stdin. The default is to try to read "
1355 "passphrases from the user by opening C</dev/tty>."
1359 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
1360 #: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
1361 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1365 #: ../cat/virt-cat.pod:154
1366 msgid "Previous versions of virt-cat allowed you to write either:"
1370 #: ../cat/virt-cat.pod:156
1373 " virt-cat disk.img [disk.img ...] file\n"
1378 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
1379 #: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
1384 #: ../cat/virt-cat.pod:160
1387 " virt-cat guestname file\n"
1392 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
1393 #: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
1395 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1396 "the confusing case where a disk image might have the same name as a guest."
1400 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
1401 #: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
1402 msgid "For compatibility the old style is still supported."
1406 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297
1407 msgid "USING GUESTFISH"
1411 #: ../cat/virt-cat.pod:170
1413 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1414 "C<virt-cat> doesn't work."
1418 #: ../cat/virt-cat.pod:173
1419 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1423 #: ../cat/virt-cat.pod:175
1426 " guestfish --ro -i -d domname download file -\n"
1431 #: ../cat/virt-cat.pod:177
1433 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1434 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1438 #: ../cat/virt-cat.pod:181
1440 "The command above uses libguestfs's guest inspection feature and so does not "
1441 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1442 "disk images that don't contain guests. To display a file from a disk image "
1447 #: ../cat/virt-cat.pod:186
1450 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1455 #: ../cat/virt-cat.pod:188
1457 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1458 "the disk image, and C<file> is the full path to the file."
1462 #: ../cat/virt-cat.pod:200 ../cat/virt-filesystems.pod:374
1463 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
1464 #: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377
1465 #: ../resize/virt-resize.pod:664 ../sparsify/virt-sparsify.pod:229
1467 "This program returns 0 if successful, or non-zero if there was an error."
1471 #: ../cat/virt-cat.pod:205
1473 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L<virt-"
1474 "tar-out(1)>, L<http://libguestfs.org/>."
1478 #: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405
1479 #: ../resize/virt-resize.pod:696
1480 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1484 #: ../cat/virt-filesystems.pod:5
1486 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1487 "virtual machine or disk image"
1491 #: ../cat/virt-filesystems.pod:9
1494 " virt-filesystems [--options] -d domname\n"
1499 #: ../cat/virt-filesystems.pod:11
1502 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1507 #: ../cat/virt-filesystems.pod:15
1509 "This tool allows you to discover filesystems, partitions, logical volumes, "
1510 "and their sizes in a disk image or virtual machine. It is a replacement for "
1511 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1515 #: ../cat/virt-filesystems.pod:20
1517 "One use for this tool is from shell scripts to iterate over all filesystems "
1518 "from a disk image:"
1522 #: ../cat/virt-filesystems.pod:23
1525 " for fs in $(virt-filesystems -a disk.img); do\n"
1532 #: ../cat/virt-filesystems.pod:27
1534 "Another use is to list partitions before using another tool to modify those "
1535 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1536 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1540 #: ../cat/virt-filesystems.pod:32
1542 "Various command line options control what this program displays. You need "
1543 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1544 "guest respectively. If you just specify that then the program shows "
1545 "filesystems found, one per line, like this:"
1549 #: ../cat/virt-filesystems.pod:37
1552 " $ virt-filesystems -a disk.img\n"
1554 " /dev/vg_guest/lv_root\n"
1559 #: ../cat/virt-filesystems.pod:41
1561 "If you add I<-l> or I<--long> then the output includes extra information:"
1565 #: ../cat/virt-filesystems.pod:44
1568 " $ virt-filesystems -a disk.img -l\n"
1569 " Name Type VFS Label Size\n"
1570 " /dev/sda1 filesystem ext4 boot 524288000\n"
1571 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1576 #: ../cat/virt-filesystems.pod:49
1578 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1583 #: ../cat/virt-filesystems.pod:52
1586 " $ virt-filesystems -a disk.img --extra\n"
1588 " /dev/vg_guest/lv_root\n"
1589 " /dev/vg_guest/lv_swap\n"
1590 " /dev/vg_guest/lv_data\n"
1595 #: ../cat/virt-filesystems.pod:58
1597 "If you add I<--partitions> then partitions are shown instead of filesystems:"
1601 #: ../cat/virt-filesystems.pod:60
1604 " $ virt-filesystems -a disk.img --partitions\n"
1611 #: ../cat/virt-filesystems.pod:64
1613 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-"
1614 "volumes>, I<--block-devices> to list those items."
1618 #: ../cat/virt-filesystems.pod:67
1620 "You can use these options in combination as well (if you want a combination "
1621 "including filesystems, you have to add I<--filesystems>). Notice that some "
1622 "items fall into several categories (eg. C</dev/sda1> might be both a "
1623 "partition and a filesystem). These items are listed several times. To get "
1624 "a list which includes absolutely everything that virt-filesystems knows "
1625 "about, use the I<--all> option."
1629 #: ../cat/virt-filesystems.pod:74
1631 "UUIDs (because they are quite long) are not shown by default. Add the I<--"
1632 "uuid> option to display device and filesystem UUIDs in the long output."
1636 #: ../cat/virt-filesystems.pod:78
1638 "I<--all --long --uuid> is a useful combination to display all possible "
1639 "information about everything."
1643 #: ../cat/virt-filesystems.pod:81
1646 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1647 " Name Type VFS Label Size Parent UUID\n"
1648 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1649 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1650 " /dev/sda1 partition - - 100M /dev/sda -\n"
1651 " /dev/sda2 partition - - 20G /dev/sda -\n"
1652 " /dev/sda device - - 20G - -\n"
1657 #: ../cat/virt-filesystems.pod:89
1659 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1663 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1668 #: ../cat/virt-filesystems.pod:112
1670 "Display everything. This is currently the same as specifying these options: "
1671 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--"
1672 "logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be "
1673 "added to this list in future)."
1677 #: ../cat/virt-filesystems.pod:117
1678 msgid "See also I<--long>."
1682 #: ../cat/virt-filesystems.pod:119
1683 msgid "B<--blkdevs>"
1687 #: ../cat/virt-filesystems.pod:121
1688 msgid "B<--block-devices>"
1692 #: ../cat/virt-filesystems.pod:123
1693 msgid "Display block devices."
1697 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1702 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1704 "Write out the results in CSV format (comma-separated values). This format "
1705 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1706 "ABOUT CSV FORMAT> below."
1710 #: ../cat/virt-filesystems.pod:150
1712 "When prompting for keys and passphrases, virt-filesystems normally turns "
1713 "echoing off so you cannot see what you are typing. If you are not worried "
1714 "about Tempest attacks and there is no one else in the room you can specify "
1715 "this flag to see what you are typing."
1719 #: ../cat/virt-filesystems.pod:155
1724 #: ../cat/virt-filesystems.pod:157
1726 "This causes filesystems that are not ordinary, mountable filesystems to be "
1727 "displayed. This category includes swapspace, and filesystems that are empty "
1728 "or contain unknown data."
1732 #: ../cat/virt-filesystems.pod:161
1733 msgid "This option implies I<--filesystems>."
1737 #: ../cat/virt-filesystems.pod:163
1738 msgid "B<--filesystems>"
1742 #: ../cat/virt-filesystems.pod:165
1744 "Display mountable filesystems. If no display option was selected then this "
1745 "option is implied."
1749 #: ../cat/virt-filesystems.pod:168
1750 msgid "With I<--extra>, non-mountable filesystems are shown too."
1754 #: ../cat/virt-filesystems.pod:181
1757 " virt-filesystems --format=raw -a disk.img\n"
1762 #: ../cat/virt-filesystems.pod:185
1765 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1770 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1771 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1772 #: ../tools/virt-list-partitions.pl:109
1777 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1778 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1779 msgid "B<--human-readable>"
1783 #: ../cat/virt-filesystems.pod:198
1784 msgid "In I<--long> mode, display sizes in human-readable format."
1788 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1789 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1794 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1795 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1800 #: ../cat/virt-filesystems.pod:209
1801 msgid "Display extra columns of data (\"long format\")."
1805 #: ../cat/virt-filesystems.pod:211
1806 msgid "A title row is added unless you also specify I<--no-title>."
1810 #: ../cat/virt-filesystems.pod:213
1812 "The extra columns displayed depend on what output you select, and the "
1813 "ordering of columns may change in future versions. Use the title row, I<--"
1814 "csv> output and/or L<csvtool(1)> to match columns to data in external "
1819 #: ../cat/virt-filesystems.pod:218
1821 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1822 "default is to show raw numbers of I<bytes>."
1826 #: ../cat/virt-filesystems.pod:221
1827 msgid "Use I<--uuid> to display UUIDs too."
1831 #: ../cat/virt-filesystems.pod:223
1836 #: ../cat/virt-filesystems.pod:225
1837 msgid "B<--logvols>"
1841 #: ../cat/virt-filesystems.pod:227
1842 msgid "B<--logical-volumes>"
1846 #: ../cat/virt-filesystems.pod:229
1848 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1849 "of whether the LVs contain filesystems."
1853 #: ../cat/virt-filesystems.pod:232
1854 msgid "B<--no-title>"
1858 #: ../cat/virt-filesystems.pod:234
1859 msgid "In I<--long> mode, don't add a title row."
1863 #: ../cat/virt-filesystems.pod:236
1865 "Note that the order of the columns is not fixed, and may change in future "
1866 "versions of virt-filesystems, so using this option may give you unexpected "
1871 #: ../cat/virt-filesystems.pod:240
1876 #: ../cat/virt-filesystems.pod:242
1877 msgid "B<--partitions>"
1881 #: ../cat/virt-filesystems.pod:244
1883 "Display partitions. In this mode, these are displayed irrespective of "
1884 "whether the partitions contain filesystems."
1888 #: ../cat/virt-filesystems.pod:247
1893 #: ../cat/virt-filesystems.pod:249
1894 msgid "B<--physvols>"
1898 #: ../cat/virt-filesystems.pod:251
1899 msgid "B<--physical-volumes>"
1903 #: ../cat/virt-filesystems.pod:253
1904 msgid "Display LVM physical volumes."
1908 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1913 #: ../cat/virt-filesystems.pod:257
1918 #: ../cat/virt-filesystems.pod:259
1919 msgid "In I<--long> mode, display UUIDs as well."
1923 #: ../cat/virt-filesystems.pod:273
1928 #: ../cat/virt-filesystems.pod:275
1929 msgid "B<--volgroups>"
1933 #: ../cat/virt-filesystems.pod:277
1934 msgid "B<--volume-groups>"
1938 #: ../cat/virt-filesystems.pod:279
1939 msgid "Display LVM volume groups."
1943 #: ../cat/virt-filesystems.pod:287
1948 #: ../cat/virt-filesystems.pod:289
1950 "Note that columns in the output are subject to reordering and change in "
1951 "future versions of this tool."
1955 #: ../cat/virt-filesystems.pod:294
1960 #: ../cat/virt-filesystems.pod:296
1961 msgid "The filesystem, partition, block device or LVM name."
1965 #: ../cat/virt-filesystems.pod:298
1967 "For device and partition names these are displayed as canonical libguestfs "
1968 "names, so that for example C</dev/sda2> is the second partition on the first "
1973 #: ../cat/virt-filesystems.pod:302
1975 "If the I<--long> option is B<not> specified, then only the name column is "
1976 "shown in the output."
1980 #: ../cat/virt-filesystems.pod:305
1985 #: ../cat/virt-filesystems.pod:307
1986 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1990 #: ../cat/virt-filesystems.pod:309
1995 #: ../cat/virt-filesystems.pod:311
1997 "If there is a filesystem, then this column displays the filesystem type if "
1998 "one could be detected, eg. C<ext4>."
2002 #: ../cat/virt-filesystems.pod:314
2007 #: ../cat/virt-filesystems.pod:316
2009 "If the object has a label (used for identifying and mounting filesystems) "
2010 "then this column contains the label."
2014 #: ../cat/virt-filesystems.pod:319
2019 #: ../cat/virt-filesystems.pod:321
2021 "The size of the object in bytes. If the I<--human> option is used then the "
2022 "size is displayed in a human-readable form."
2026 #: ../cat/virt-filesystems.pod:324
2031 #: ../cat/virt-filesystems.pod:326
2033 "The parent column records the parent relationship between objects. For "
2034 "example, if the object is a partition, then this column contains the name of "
2035 "the containing device. If the object is a logical volume, then this column "
2036 "is the name of the volume group."
2040 #: ../cat/virt-filesystems.pod:331
2045 #: ../cat/virt-filesystems.pod:333
2047 "If the object has a UUID (used for identifying and mounting filesystems and "
2048 "block devices) then this column contains the UUID as a string."
2052 #: ../cat/virt-filesystems.pod:337
2053 msgid "The UUID is only displayed if the I<--uuid> option is given."
2057 #: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459
2058 #: ../df/virt-df.pod:191
2059 msgid "NOTE ABOUT CSV FORMAT"
2063 #: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461
2064 #: ../df/virt-df.pod:193
2066 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
2067 "should be easy to parse, but it is definitely not easy to parse."
2071 #: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464
2072 #: ../df/virt-df.pod:196
2074 "Myth: Just split fields at commas. Reality: This does I<not> work "
2075 "reliably. This example has two columns:"
2079 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467
2080 #: ../df/virt-df.pod:199
2083 " \"foo,bar\",baz\n"
2088 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469
2089 #: ../df/virt-df.pod:201
2091 "Myth: Read the file one line at a time. Reality: This does I<not> work "
2092 "reliably. This example has one row:"
2096 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472
2097 #: ../df/virt-df.pod:204
2106 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475
2107 #: ../df/virt-df.pod:207
2109 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
2110 "packaged in major Linux distributions)."
2114 #: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478
2115 #: ../df/virt-df.pod:210
2117 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
2118 "or Python's built-in csv library)."
2122 #: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481
2123 #: ../df/virt-df.pod:213
2124 msgid "Most spreadsheets and databases can import CSV directly."
2128 #: ../cat/virt-filesystems.pod:379
2130 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
2131 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, L<http://"
2136 #: ../cat/virt-filesystems.pod:394 ../tools/virt-make-fs.pl:570
2137 #: ../tools/virt-win-reg.pl:778
2138 msgid "Copyright (C) 2010 Red Hat Inc."
2142 #: ../cat/virt-ls.pod:5
2143 msgid "virt-ls - List files in a virtual machine"
2147 #: ../cat/virt-ls.pod:9
2150 " virt-ls [--options] -d domname directory [directory ...]\n"
2155 #: ../cat/virt-ls.pod:11
2158 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
2163 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
2168 #: ../cat/virt-ls.pod:15
2171 " virt-ls [--options] domname directory\n"
2176 #: ../cat/virt-ls.pod:17
2179 " virt-ls [--options] disk.img [disk.img ...] directory\n"
2184 #: ../cat/virt-ls.pod:21
2186 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
2187 "more from a virtual machine or disk image."
2191 #: ../cat/virt-ls.pod:24
2193 "Multiple directory names can be given, in which case the output from each is "
2198 #: ../cat/virt-ls.pod:27
2200 "To list directories from a libvirt guest use the I<-d> option to specify the "
2201 "name of the guest. For a disk image, use the I<-a> option."
2205 #: ../cat/virt-ls.pod:31
2207 "C<virt-ls> can do many simple file listings. For more complicated cases you "
2208 "may need to use L<guestfish(1)>, or write a program directly to the L<guestfs"
2213 #: ../cat/virt-ls.pod:37
2214 msgid "Get a list of all files and directories in a virtual machine:"
2218 #: ../cat/virt-ls.pod:39
2221 " virt-ls -R -d guest /\n"
2226 #: ../cat/virt-ls.pod:41
2227 msgid "List all setuid or setgid programs in a Linux virtual machine:"
2231 #: ../cat/virt-ls.pod:43
2234 " virt-ls -lR -d guest / | grep '^- [42]'\n"
2239 #: ../cat/virt-ls.pod:45
2240 msgid "List all public-writable directories in a Linux virtual machine:"
2244 #: ../cat/virt-ls.pod:47
2247 " virt-ls -lR -d guest / | grep '^d ...7'\n"
2252 #: ../cat/virt-ls.pod:49
2253 msgid "List all Unix domain sockets in a Linux virtual machine:"
2257 #: ../cat/virt-ls.pod:51
2260 " virt-ls -lR -d guest / | grep '^s'\n"
2265 #: ../cat/virt-ls.pod:53
2266 msgid "List all regular files with filenames ending in '.png':"
2270 #: ../cat/virt-ls.pod:55
2273 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
2278 #: ../cat/virt-ls.pod:57
2279 msgid "To display files larger than 10MB in home directories:"
2283 #: ../cat/virt-ls.pod:59
2286 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
2291 #: ../cat/virt-ls.pod:61
2292 msgid "Find everything modified in the last 7 days:"
2296 #: ../cat/virt-ls.pod:63
2299 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
2304 #: ../cat/virt-ls.pod:65
2305 msgid "Find regular files modified in the last 24 hours:"
2309 #: ../cat/virt-ls.pod:67
2312 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2317 #: ../cat/virt-ls.pod:69
2318 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2322 #: ../cat/virt-ls.pod:71
2324 "Find the differences between files in a guest and an earlier snapshot of the "
2329 #: ../cat/virt-ls.pod:74
2332 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2333 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2334 " diff -u old new | less\n"
2339 #: ../cat/virt-ls.pod:78
2341 "The commands above won't find files where the content has changed but the "
2342 "metadata (eg. file size and modification date) is the same. To do that, you "
2343 "need to add the I<--checksum> parameter to both C<virt-ls> commands. I<--"
2344 "checksum> can be quite slow since it has to read and compute a checksum of "
2345 "every regular file in the virtual machine."
2349 #: ../cat/virt-ls.pod:84
2350 msgid "OUTPUT MODES"
2354 #: ../cat/virt-ls.pod:86
2356 "C<virt-ls> has four output modes, controlled by different combinations of "
2357 "the I<-l> and I<-R> options."
2361 #: ../cat/virt-ls.pod:89
2362 msgid "SIMPLE LISTING"
2366 #: ../cat/virt-ls.pod:91
2367 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2371 #: ../cat/virt-ls.pod:93
2374 " $ virt-ls -d guest /\n"
2382 #: ../cat/virt-ls.pod:98
2383 msgid "LONG LISTING"
2387 #: ../cat/virt-ls.pod:100
2389 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2390 "(more specifically, like the C<guestfs_ll> function)."
2394 #: ../cat/virt-ls.pod:103
2397 " $ virt-ls -l -d guest /\n"
2399 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2400 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2406 #: ../cat/virt-ls.pod:109
2408 "Note that while this is useful for displaying a directory, do not try "
2409 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2414 #: ../cat/virt-ls.pod:113
2415 msgid "RECURSIVE LISTING"
2419 #: ../cat/virt-ls.pod:115
2421 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2422 "and directories recursively:"
2426 #: ../cat/virt-ls.pod:118
2429 " $ virt-ls -R -d guest /tmp\n"
2437 #: ../cat/virt-ls.pod:123
2439 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2440 "converts C<\\0> characters to C<\\n>."
2444 #: ../cat/virt-ls.pod:126
2445 msgid "RECURSIVE LONG LISTING"
2449 #: ../cat/virt-ls.pod:128
2451 "Using I<-lR> options together changes the output to display directories "
2452 "recursively, with file stats, and optionally other features such as "
2453 "checksums and extended attributes."
2457 #: ../cat/virt-ls.pod:132
2459 "Most of the interesting features of C<virt-ls> are only available when using "
2464 #: ../cat/virt-ls.pod:135
2466 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2467 "you cannot use the output in another program (because filenames can contain "
2468 "spaces and other unsafe characters). If the guest was untrusted and someone "
2469 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2470 "on you by creating filenames with embedded newline characters. To B<safely> "
2471 "parse the output in another program, use the I<--csv> (Comma-Separated "
2476 #: ../cat/virt-ls.pod:143
2478 "Note that this output format is completely unrelated to the C<ls -lR> "
2483 #: ../cat/virt-ls.pod:146
2486 " $ virt-ls -lR -d guest /bin\n"
2487 " d 0555 4096 /bin\n"
2488 " - 0755 123 /bin/alsaunmute\n"
2489 " - 0755 28328 /bin/arch\n"
2490 " l 0777 4 /bin/awk -> gawk\n"
2491 " - 0755 27216 /bin/basename\n"
2492 " - 0755 943360 /bin/bash\n"
2498 #: ../cat/virt-ls.pod:155
2499 msgid "These basic fields are always shown:"
2503 #: ../cat/virt-ls.pod:159
2508 #: ../cat/virt-ls.pod:161
2510 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2511 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2512 "link), C<s> (socket) or C<u> (unknown)."
2516 #: ../cat/virt-ls.pod:171
2521 #: ../cat/virt-ls.pod:173
2522 msgid "The Unix permissions, displayed as a 4 digit octal number."
2526 #: ../cat/virt-ls.pod:175
2531 #: ../cat/virt-ls.pod:177
2533 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
2534 "readable> option is given, in which case this is shown as a human-readable "
2539 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4263
2544 #: ../cat/virt-ls.pod:183
2545 msgid "The full path of the file or directory."
2549 #: ../cat/virt-ls.pod:185
2554 #: ../cat/virt-ls.pod:187
2555 msgid "For symbolic links only, the link target."
2559 #: ../cat/virt-ls.pod:191
2561 "In I<-lR> mode, additional command line options enable the display of more "
2566 #: ../cat/virt-ls.pod:194
2568 "With the I<--uids> flag, these additional fields are displayed before the "
2573 #: ../cat/virt-ls.pod:199
2578 #: ../cat/virt-ls.pod:201
2583 #: ../cat/virt-ls.pod:203
2585 "The UID and GID of the owner of the file (displayed numerically). Note "
2586 "these only make sense in the context of a Unix-like guest."
2590 #: ../cat/virt-ls.pod:208
2591 msgid "With the I<--times> flag, these additional fields are displayed:"
2595 #: ../cat/virt-ls.pod:212
2600 #: ../cat/virt-ls.pod:214
2601 msgid "The time of last access."
2605 #: ../cat/virt-ls.pod:216
2610 #: ../cat/virt-ls.pod:218
2611 msgid "The time of last modification."
2615 #: ../cat/virt-ls.pod:220
2620 #: ../cat/virt-ls.pod:222
2621 msgid "The time of last status change."
2625 #: ../cat/virt-ls.pod:226
2627 "The time fields are displayed as string dates and times, unless one of the "
2628 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2632 #: ../cat/virt-ls.pod:229
2633 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2637 #: ../cat/virt-ls.pod:233
2642 #: ../cat/virt-ls.pod:235
2644 "The device containing the file (displayed as major:minor). This may not "
2645 "match devices as known to the guest."
2649 #: ../cat/virt-ls.pod:238
2654 #: ../cat/virt-ls.pod:240
2655 msgid "The inode number."
2659 #: ../cat/virt-ls.pod:242
2664 #: ../cat/virt-ls.pod:244
2665 msgid "The number of hard links."
2669 #: ../cat/virt-ls.pod:246
2674 #: ../cat/virt-ls.pod:248
2676 "For block and char special files, the device (displayed as major:minor)."
2680 #: ../cat/virt-ls.pod:251
2685 #: ../cat/virt-ls.pod:253
2686 msgid "The number of 512 byte blocks allocated to the file."
2690 #: ../cat/virt-ls.pod:257
2692 "With the I<--checksum> flag, the checksum of the file contents is shown "
2693 "(only for regular files). Computing file checksums can take a considerable "
2698 #: ../cat/virt-ls.pod:280
2699 msgid "B<--checksum>"
2703 #: ../cat/virt-ls.pod:282
2704 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2708 #: ../cat/virt-ls.pod:284
2710 "Display checksum over file contents for regular files. With no argument, "
2711 "this defaults to using I<md5>. Using an argument, you can select the "
2712 "checksum type to use."
2716 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2717 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2718 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2720 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2725 #: ../cat/virt-ls.pod:316
2727 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2728 "so you cannot see what you are typing. If you are not worried about Tempest "
2729 "attacks and there is no one else in the room you can specify this flag to "
2730 "see what you are typing."
2734 #: ../cat/virt-ls.pod:321
2735 msgid "B<--extra-stats>"
2739 #: ../cat/virt-ls.pod:323
2740 msgid "Display extra stats."
2744 #: ../cat/virt-ls.pod:339
2747 " virt-ls --format=raw -a disk.img /dir\n"
2752 #: ../cat/virt-ls.pod:343
2755 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2760 #: ../cat/virt-ls.pod:356
2761 msgid "Display file sizes in human-readable format."
2765 #: ../cat/virt-ls.pod:370
2770 #: ../cat/virt-ls.pod:372
2771 msgid "B<--recursive>"
2775 #: ../cat/virt-ls.pod:374
2777 "Select the mode. With neither of these options, C<virt-ls> produces a "
2778 "simple, flat list of the files in the named directory. See L</SIMPLE "
2783 #: ../cat/virt-ls.pod:378
2785 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See L</"
2790 #: ../cat/virt-ls.pod:381
2792 "C<virt-ls -R> produces a recursive list of files starting at the named "
2793 "directory. See L</RECURSIVE LISTING>."
2797 #: ../cat/virt-ls.pod:384
2799 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2800 "parsed. See L</RECURSIVE LONG LISTING>."
2804 #: ../cat/virt-ls.pod:387
2809 #: ../cat/virt-ls.pod:389
2810 msgid "Display time fields."
2814 #: ../cat/virt-ls.pod:394
2815 msgid "B<--time-days>"
2819 #: ../cat/virt-ls.pod:396
2820 msgid "Display time fields as days before now (negative if in the future)."
2824 #: ../cat/virt-ls.pod:398
2826 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2827 "of the file is between 0 and 86399 seconds."
2831 #: ../cat/virt-ls.pod:404
2832 msgid "B<--time-relative>"
2836 #: ../cat/virt-ls.pod:406
2837 msgid "Display time fields as seconds before now (negative if in the future)."
2841 #: ../cat/virt-ls.pod:411
2846 #: ../cat/virt-ls.pod:413
2847 msgid "Display time fields as seconds since the Unix epoch."
2851 #: ../cat/virt-ls.pod:418
2856 #: ../cat/virt-ls.pod:420
2857 msgid "Display UID and GID fields."
2861 #: ../cat/virt-ls.pod:445
2862 msgid "Previous versions of virt-ls allowed you to write either:"
2866 #: ../cat/virt-ls.pod:447
2869 " virt-ls disk.img [disk.img ...] /dir\n"
2874 #: ../cat/virt-ls.pod:451
2877 " virt-ls guestname /dir\n"
2882 #: ../cat/virt-ls.pod:497
2884 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2885 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2886 "L<http://libguestfs.org/>."
2890 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374
2891 #: ../rescue/virt-rescue.pod:302
2892 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2896 #: ../clone/virt-sysprep.pod:5
2898 "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2902 #: ../clone/virt-sysprep.pod:9
2905 " virt-sysprep [--options] -d domname\n"
2910 #: ../clone/virt-sysprep.pod:11
2913 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2918 #: ../clone/virt-sysprep.pod:15
2920 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2921 "can be made from it. Steps in this process include removing SSH host keys, "
2922 "removing persistent network MAC configuration, and removing user accounts. "
2923 "Each step can be enabled or disabled as required."
2927 #: ../clone/virt-sysprep.pod:21
2929 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2930 "customization by the system administrator."
2934 #: ../clone/virt-sysprep.pod:24
2936 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2937 "be shut down. If you want to preserve the existing contents of the guest, "
2938 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> below."
2942 #: ../clone/virt-sysprep.pod:29
2944 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2945 "recommend that you don't. The time you might want to run it as root is when "
2946 "you need root in order to access the disk image, but even in this case it "
2947 "would be better to change the permissions on the disk image to be writable "
2948 "as the non-root user running virt-sysprep."
2952 #: ../clone/virt-sysprep.pod:35
2954 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2955 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2956 "machines in preparation for cloning them. Having said that, virt-sysprep "
2957 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2958 "Windows sysprepping in a future version, and we already have code to do it."
2962 #: ../clone/virt-sysprep.pod:76
2963 msgid "B<--enable=...>"
2967 #: ../clone/virt-sysprep.pod:78
2969 "Choose which sysprep operations to perform. Give a comma-separated list of "
2970 "operations, for example:"
2974 #: ../clone/virt-sysprep.pod:81
2977 " --enable=ssh-hostkeys,udev-persistent-net\n"
2982 #: ../clone/virt-sysprep.pod:83
2984 "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2988 #: ../clone/virt-sysprep.pod:85
2990 "If the I<--enable> option is not given, then we default to trying all "
2991 "possible sysprep operations. But some sysprep operations are skipped for "
2996 #: ../clone/virt-sysprep.pod:89
2998 "Use I<--list-operations> to list operations supported by a particular "
2999 "version of virt-sysprep."
3003 #: ../clone/virt-sysprep.pod:92
3005 "See L</OPERATIONS> below for a list and an explanation of each operation."
3009 #: ../clone/virt-sysprep.pod:106
3012 " virt-sysprep --format=raw -a disk.img\n"
3017 #: ../clone/virt-sysprep.pod:110
3020 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
3025 #: ../clone/virt-sysprep.pod:119
3026 msgid "B<--hostname> newhostname"
3030 #: ../clone/virt-sysprep.pod:121
3032 "Change the hostname. See the L</hostname> operation below. If not given, "
3033 "defaults to C<localhost.localdomain>."
3037 #: ../clone/virt-sysprep.pod:124
3038 msgid "B<--list-operations>"
3042 #: ../clone/virt-sysprep.pod:126
3043 msgid "List the operations supported by the virt-sysprep program."
3047 #: ../clone/virt-sysprep.pod:128
3048 msgid "B<--selinux-relabel>"
3052 #: ../clone/virt-sysprep.pod:130
3053 msgid "B<--no-selinux-relabel>"
3057 #: ../clone/virt-sysprep.pod:132
3059 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
3060 "I<--no-selinux-relabel> disables relabelling."
3064 #: ../clone/virt-sysprep.pod:135
3066 "The default is to try to detect if SELinux relabelling is required. See L</"
3067 "SELINUX RELABELLING> below for more details."
3071 #: ../clone/virt-sysprep.pod:156
3076 #: ../clone/virt-sysprep.pod:158
3078 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
3079 "enabled>, although some are skipped depending on the type of guest."
3083 #: ../clone/virt-sysprep.pod:162
3085 "Operations can be individually enabled using the I<--enable> option. Use a "
3086 "comma-separated list, for example:"
3090 #: ../clone/virt-sysprep.pod:165
3093 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
3098 #: ../clone/virt-sysprep.pod:167
3100 "To list the operations supported by the current version of virt-sysprep, use "
3101 "I<--list-operations>."
3105 #: ../clone/virt-sysprep.pod:170
3107 "Future versions of virt-sysprep may add more operations. If you are using "
3108 "virt-sysprep and want predictable behaviour, specify only the operations "
3109 "that you want to have enabled."
3113 #: ../clone/virt-sysprep.pod:174
3118 #: ../clone/virt-sysprep.pod:176
3119 msgid "Remove user at-jobs and cron-jobs."
3123 #: ../clone/virt-sysprep.pod:178
3124 msgid "dhcp-client-state"
3128 #: ../clone/virt-sysprep.pod:180
3129 msgid "Remove DHCP client leases."
3133 #: ../clone/virt-sysprep.pod:182
3134 msgid "dhcp-server-state"
3138 #: ../clone/virt-sysprep.pod:184
3139 msgid "Remove DHCP server leases."
3143 #: ../clone/virt-sysprep.pod:186
3148 #: ../clone/virt-sysprep.pod:188
3150 "Changes the hostname of the guest to the value given in the I<--hostname> "
3155 #: ../clone/virt-sysprep.pod:191
3157 "If the I<--hostname> parameter is not given, then the hostname is changed to "
3158 "C<localhost.localdomain>."
3162 #: ../clone/virt-sysprep.pod:194
3167 #: ../clone/virt-sysprep.pod:196
3168 msgid "Remove many log files."
3172 #: ../clone/virt-sysprep.pod:198
3177 #: ../clone/virt-sysprep.pod:200
3178 msgid "Remove email from the local mail spool directory."
3182 #: ../clone/virt-sysprep.pod:202
3187 #: ../clone/virt-sysprep.pod:204
3189 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
3190 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
3194 #: ../clone/virt-sysprep.pod:207
3199 #: ../clone/virt-sysprep.pod:209
3201 "Write some random bytes from the host into the random seed file of the guest."
3205 #: ../clone/virt-sysprep.pod:212
3206 msgid "See L</RANDOM SEED> below."
3210 #: ../clone/virt-sysprep.pod:214
3211 msgid "rhn-systemid"
3215 #: ../clone/virt-sysprep.pod:216
3216 msgid "Remove the RHN system ID."
3220 #: ../clone/virt-sysprep.pod:218
3225 #: ../clone/virt-sysprep.pod:220
3226 msgid "Remove the Smolt hardware UUID."
3230 #: ../clone/virt-sysprep.pod:222
3231 msgid "ssh-hostkeys"
3235 #: ../clone/virt-sysprep.pod:224
3236 msgid "Remove the SSH host keys in the guest."
3240 #: ../clone/virt-sysprep.pod:226
3242 "The SSH host keys are regenerated (differently) next time the guest is "
3247 #: ../clone/virt-sysprep.pod:229
3249 "If, after cloning, the guest gets the same IP address, ssh will give you a "
3250 "stark warning about the host key changing:"
3254 #: ../clone/virt-sysprep.pod:232
3257 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3258 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
3259 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3260 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
3265 #: ../clone/virt-sysprep.pod:237
3266 msgid "udev-persistent-net"
3270 #: ../clone/virt-sysprep.pod:239
3272 "Remove udev persistent net rules which map the guest's existing MAC address "
3273 "to a fixed ethernet device (eg. eth0)."
3277 #: ../clone/virt-sysprep.pod:242
3279 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
3280 "address occupies the old name (eg. eth0), this means the fresh MAC address "
3281 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
3282 "Erasing the udev persistent net rules avoids this."
3286 #: ../clone/virt-sysprep.pod:247
3291 #: ../clone/virt-sysprep.pod:249
3292 msgid "Remove the utmp file."
3296 #: ../clone/virt-sysprep.pod:251
3298 "This records who is currently logged in on a machine. In modern Linux "
3299 "distros it is stored in a ramdisk and hence not part of the virtual "
3300 "machine's disk, but it was stored on disk in older distros."
3304 #: ../clone/virt-sysprep.pod:255
3309 #: ../clone/virt-sysprep.pod:257
3310 msgid "Remove the yum UUID."
3314 #: ../clone/virt-sysprep.pod:259
3316 "Yum creates a fresh UUID the next time it runs when it notices that the "
3317 "original UUID has been erased."
3321 #: ../clone/virt-sysprep.pod:262
3322 msgid "COPYING AND CLONING"
3326 #: ../clone/virt-sysprep.pod:264
3328 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3329 "prepare a template from which guests can be cloned. There are many "
3330 "different ways to achieve this using the virt tools, and this section is "
3331 "just an introduction."
3335 #: ../clone/virt-sysprep.pod:269
3336 msgid "A virtual machine (when switched off) consists of two parts:"
3340 #: ../clone/virt-sysprep.pod:273
3341 msgid "I<configuration>"
3345 #: ../clone/virt-sysprep.pod:275
3347 "The configuration or description of the guest. eg. The libvirt XML (see "
3348 "C<virsh dumpxml>), the running configuration of the guest, or another "
3349 "external format like OVF."
3353 #: ../clone/virt-sysprep.pod:279
3354 msgid "Some configuration items that might need to be changed:"
3358 #: ../clone/virt-sysprep.pod:285
3363 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3368 #: ../clone/virt-sysprep.pod:293
3369 msgid "path to block device(s)"
3373 #: ../clone/virt-sysprep.pod:297
3374 msgid "network card MAC address"
3378 #: ../clone/virt-sysprep.pod:301
3379 msgid "I<block device(s)>"
3383 #: ../clone/virt-sysprep.pod:303
3385 "One or more hard disk images, themselves containing files, directories, "
3386 "applications, kernels, configuration, etc."
3390 #: ../clone/virt-sysprep.pod:306
3391 msgid "Some things inside the block devices that might need to be changed:"
3395 #: ../clone/virt-sysprep.pod:312
3396 msgid "hostname and other net configuration"
3400 #: ../clone/virt-sysprep.pod:320
3401 msgid "SSH host keys"
3405 #: ../clone/virt-sysprep.pod:324
3406 msgid "Windows unique security ID (SID)"
3410 #: ../clone/virt-sysprep.pod:328
3411 msgid "Puppet registration"
3415 #: ../clone/virt-sysprep.pod:334
3416 msgid "COPYING THE BLOCK DEVICE"
3420 #: ../clone/virt-sysprep.pod:336
3422 "Starting with an original guest, you probably wish to copy the guest block "
3423 "device and its configuration to make a template. Then once you are happy "
3424 "with the template, you will want to make many clones from it."
3428 #: ../clone/virt-sysprep.pod:341
3434 " original guest --------> template ---------->\n"
3435 " \\------> cloned\n"
3436 " \\-----> guests\n"
3442 #: ../clone/virt-sysprep.pod:349
3444 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3449 #: ../clone/virt-sysprep.pod:352
3453 " original guest --------> template ---------->\n"
3454 " \\------> cloned\n"
3455 " \\-----> guests\n"
3461 #: ../clone/virt-sysprep.pod:358
3462 msgid "There are some smarter (and faster) ways too:"
3466 #: ../clone/virt-sysprep.pod:364
3470 " template ---------->\n"
3471 " \\------> cloned\n"
3472 " \\-----> guests\n"
3478 #: ../clone/virt-sysprep.pod:370
3480 "Use the block device as a backing file and create a snapshot on top for each "
3481 "guest. The advantage is that you don't need to copy the block device (very "
3482 "fast) and only changes are stored (less storage required)."
3486 #: ../clone/virt-sysprep.pod:375
3488 "Note that writing to the backing file once you have created guests on top of "
3489 "it is not possible: you will corrupt the guests."
3493 #: ../clone/virt-sysprep.pod:378
3495 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 -"
3496 "o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3497 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3498 "also create cheap snapshots from files or LUNs."
3502 #: ../clone/virt-sysprep.pod:386
3503 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3507 #: ../clone/virt-sysprep.pod:390
3508 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3512 #: ../clone/virt-sysprep.pod:394
3517 #: ../clone/virt-sysprep.pod:396
3519 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3520 "and/or modify the external libvirt configuration of a guest. It will reset "
3521 "the name, UUID and MAC address of the guest in the libvirt XML."
3525 #: ../clone/virt-sysprep.pod:401
3527 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3528 "image. This was the original motivation to write virt-sysprep."
3532 #: ../clone/virt-sysprep.pod:404
3537 #: ../clone/virt-sysprep.pod:406
3541 " original guest --------> template\n"
3546 #: ../clone/virt-sysprep.pod:409
3548 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3549 "it easier to compress and/or faster to copy."
3553 #: ../clone/virt-sysprep.pod:412
3555 "Notice that since virt-sparsify also copies the image, you can use it to "
3556 "make the initial copy (instead of C<dd>)."
3560 #: ../clone/virt-sysprep.pod:415
3565 #: ../clone/virt-sysprep.pod:417
3569 " template ---------->\n"
3570 " \\------> cloned\n"
3571 " \\-----> guests\n"
3577 #: ../clone/virt-sysprep.pod:423
3579 "If you want to give people cloned guests, but let them pick the size of the "
3580 "guest themselves (eg. depending on how much they are prepared to pay for "
3581 "disk space), then instead of copying the template, you can run L<virt-resize"
3582 "(1)>. Virt-resize performs a copy and resize, and thus is ideal for cloning "
3583 "guests from a template."
3587 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1149
3592 #: ../clone/virt-sysprep.pod:431
3594 "Although virt-sysprep removes some sensitive information from the guest, it "
3595 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3596 "above, and the implementation of the operations in the shell script. You "
3597 "should also examine the guest afterwards."
3601 #: ../clone/virt-sysprep.pod:436
3603 "Sensitive files are simply removed. The data they contained may still exist "
3604 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3605 "L<virt-sparsify(1)> as one way to remove this content. See also the L<scrub"
3606 "(1)> command to get rid of deleted content in directory entries and inodes."
3610 #: ../clone/virt-sysprep.pod:442
3615 #: ../clone/virt-sysprep.pod:444
3616 msgid "I<(This section applies to Linux guests only)>"
3620 #: ../clone/virt-sysprep.pod:446
3622 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3623 "from the host into the guest's random seed file."
3627 #: ../clone/virt-sysprep.pod:449
3629 "If this is just done once and the guest is cloned from the same template, "
3630 "then each guest will start with the same entropy, and things like SSH host "
3631 "keys and TCP sequence numbers may be predictable."
3635 #: ../clone/virt-sysprep.pod:453
3637 "Therefore you should arrange to add more randomness I<after> cloning from a "
3638 "template too, which can be done by just enabling the C<random-seed> "
3643 #: ../clone/virt-sysprep.pod:457
3646 " cp template.img newguest.img\n"
3647 " virt-sysprep --enable=random-seed -a newguest.img\n"
3652 #: ../clone/virt-sysprep.pod:460
3653 msgid "SELINUX RELABELLING"
3657 #: ../clone/virt-sysprep.pod:462
3658 msgid "I<(This section applies to Linux guests using SELinux only)>"
3662 #: ../clone/virt-sysprep.pod:464
3664 "If any new files are created by virt-sysprep, then virt-sysprep touches C</."
3665 "autorelabel> so that these will be correctly labelled by SELinux the next "
3666 "time the guest is booted. This process interrupts boot and can take some "
3671 #: ../clone/virt-sysprep.pod:469
3673 "You can force relabelling for all guests by supplying the I<--selinux-"
3678 #: ../clone/virt-sysprep.pod:472
3680 "You can disable relabelling entirely by supplying the I<--no-selinux-"
3685 #: ../clone/virt-sysprep.pod:484
3686 msgid "This program returns 0 on success, or 1 if there was an error."
3690 #: ../clone/virt-sysprep.pod:488
3692 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, L<virt-"
3693 "resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-img(1)"
3694 ">, L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3698 #: ../df/virt-df.pod:5
3699 msgid "virt-df - Display free space on virtual filesystems"
3703 #: ../df/virt-df.pod:9
3706 " virt-df [--options]\n"
3711 #: ../df/virt-df.pod:11
3714 " virt-df [--options] -d domname\n"
3719 #: ../df/virt-df.pod:13
3722 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3727 #: ../df/virt-df.pod:17
3730 " virt-df [--options] domname\n"
3735 #: ../df/virt-df.pod:19
3738 " virt-df [--options] disk.img [disk.img ...]\n"
3743 #: ../df/virt-df.pod:23
3745 "C<virt-df> is a command line tool to display free space on virtual machine "
3746 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3747 "allocated to a virtual machine, but can look inside disk images to see how "
3748 "much space is really being used."
3752 #: ../df/virt-df.pod:28
3754 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3755 "to get a list of all active and inactive guests, and performs a C<df>-type "
3756 "operation on each one in turn, printing out the results."
3760 #: ../df/virt-df.pod:32
3762 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a C<df>-"
3763 "type operation on either the single named libvirt domain, or on the disk "
3764 "image(s) listed on the command line (which must all belong to a single VM). "
3765 "In this mode (with arguments), C<virt-df> will I<only work for a single "
3766 "guest>. If you want to run on multiple guests, then you have to invoke "
3767 "C<virt-df> multiple times."
3771 #: ../df/virt-df.pod:39
3773 "Use the I<--csv> option to get a format which can be easily parsed by other "
3774 "programs. Other options are similar to the standard L<df(1)> command."
3778 #: ../df/virt-df.pod:45
3780 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3781 "output human-readable:"
3785 #: ../df/virt-df.pod:48
3788 " # virt-df -d F14x64 -h\n"
3789 " Filesystem Size Used Available Use%\n"
3790 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3791 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3796 #: ../df/virt-df.pod:53
3797 msgid "Show disk usage for a disk image file called C<test.img>:"
3801 #: ../df/virt-df.pod:55
3804 " $ virt-df -a test1.img\n"
3805 " Filesystem 1K-blocks Used Available Use%\n"
3806 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3811 #: ../df/virt-df.pod:112
3814 " virt-df --format=raw -a disk.img\n"
3819 #: ../df/virt-df.pod:116
3822 " virt-df --format=raw -a disk.img --format -a another.img\n"
3827 #: ../df/virt-df.pod:129
3828 msgid "Print sizes in human-readable format."
3832 #: ../df/virt-df.pod:131
3833 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3837 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3842 #: ../df/virt-df.pod:135
3847 #: ../df/virt-df.pod:137
3848 msgid "Print inodes instead of blocks."
3852 #: ../df/virt-df.pod:139
3853 msgid "B<--one-per-guest>"
3857 #: ../df/virt-df.pod:141
3859 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3860 "disks from several guests to a single libguestfs appliance."
3864 #: ../df/virt-df.pod:144
3865 msgid "You might use this option in the following circumstances:"
3869 #: ../df/virt-df.pod:150
3871 "If you think an untrusted guest might actively try to exploit the libguestfs "
3872 "appliance kernel, then this prevents one guest from interfering with the "
3873 "stats printed for another guest."
3877 #: ../df/virt-df.pod:156
3879 "If the kernel has a bug which stops it from accessing a filesystem in one "
3880 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3881 "and report stats for further guests."
3885 #: ../df/virt-df.pod:165
3887 "Print UUIDs instead of names. This is useful for following a guest even "
3888 "when the guest is migrated or renamed, or when two guests happen to have the "
3893 #: ../df/virt-df.pod:169
3895 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3896 "images, we still print the disk image name even when this option is "
3901 #: ../df/virt-df.pod:229
3903 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<http://"
3908 #: ../edit/virt-edit.pod:5
3909 msgid "virt-edit - Edit a file in a virtual machine"
3913 #: ../edit/virt-edit.pod:9
3916 " virt-edit [--options] -d domname file [file ...]\n"
3921 #: ../edit/virt-edit.pod:11
3924 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3929 #: ../edit/virt-edit.pod:13
3932 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3937 #: ../edit/virt-edit.pod:17
3940 " virt-edit domname file\n"
3945 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3948 " virt-edit disk.img [disk.img ...] file\n"
3953 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
3954 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
3955 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19
3956 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3961 #: ../edit/virt-edit.pod:23
3963 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3964 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3965 "doing this, but doesn't catch all cases."
3969 #: ../edit/virt-edit.pod:29
3971 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3972 "exists in the named virtual machine (or disk image)."
3976 #: ../edit/virt-edit.pod:32
3978 "Multiple filenames can be given, in which case they are each edited in "
3979 "turn. Each filename must be a full path, starting at the root directory "
3980 "(starting with '/')."
3984 #: ../edit/virt-edit.pod:36
3985 msgid "If you want to just view a file, use L<virt-cat(1)>."
3989 #: ../edit/virt-edit.pod:38
3991 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
3992 "USING GUESTFISH> below)."
3996 #: ../edit/virt-edit.pod:41
3998 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
3999 "that and much more."
4003 #: ../edit/virt-edit.pod:46
4004 msgid "Edit the named files interactively:"
4008 #: ../edit/virt-edit.pod:48
4011 " virt-edit -d mydomain /boot/grub/grub.conf\n"
4016 #: ../edit/virt-edit.pod:50
4019 " virt-edit -d mydomain /etc/passwd\n"
4024 #: ../edit/virt-edit.pod:52
4025 msgid "For Windows guests, some Windows paths are understood:"
4029 #: ../edit/virt-edit.pod:54
4032 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
4037 #: ../edit/virt-edit.pod:56
4039 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
4040 "INTERACTIVE EDITING> below). To change the init default level to 5:"
4044 #: ../edit/virt-edit.pod:60
4047 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
4052 #: ../edit/virt-edit.pod:81
4053 msgid "B<-b> extension"
4057 #: ../edit/virt-edit.pod:83
4058 msgid "B<--backup> extension"
4062 #: ../edit/virt-edit.pod:85
4064 "Create a backup of the original file I<in the guest disk image>. The backup "
4065 "has the original filename with C<extension> added."
4069 #: ../edit/virt-edit.pod:88
4071 "Usually the first character of C<extension> would be a dot C<.> so you would "
4076 #: ../edit/virt-edit.pod:91
4079 " virt-edit -b .orig [etc]\n"
4084 #: ../edit/virt-edit.pod:93
4085 msgid "By default, no backup file is made."
4089 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
4090 #: ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74
4091 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
4092 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
4097 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
4098 #: ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76
4099 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
4100 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
4101 msgid "B<--connect URI>"
4105 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
4106 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
4107 #: ../tools/virt-win-reg.pl:135
4109 "If you specify guest block devices directly, then libvirt is not used at all."
4113 #: ../edit/virt-edit.pod:114
4115 "When prompting for keys and passphrases, virt-edit normally turns echoing "
4116 "off so you cannot see what you are typing. If you are not worried about "
4117 "Tempest attacks and there is no one else in the room you can specify this "
4118 "flag to see what you are typing."
4122 #: ../edit/virt-edit.pod:119
4127 #: ../edit/virt-edit.pod:121
4128 msgid "B<--expr> EXPR"
4132 #: ../edit/virt-edit.pod:123
4134 "Instead of launching the external editor, non-interactively apply the Perl "
4135 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
4140 #: ../edit/virt-edit.pod:127
4142 "Be careful to properly quote the expression to prevent it from being altered "
4147 #: ../edit/virt-edit.pod:130
4148 msgid "Note that this option is only available when Perl 5 is installed."
4152 #: ../edit/virt-edit.pod:132
4153 msgid "B<--format> raw|qcow2|..."
4157 #: ../edit/virt-edit.pod:143
4160 " virt-edit --format=raw -a disk.img file\n"
4165 #: ../edit/virt-edit.pod:147
4168 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
4173 #: ../edit/virt-edit.pod:181
4174 msgid "Previous versions of virt-edit allowed you to write either:"
4178 #: ../edit/virt-edit.pod:187
4181 " virt-edit guestname file\n"
4186 #: ../edit/virt-edit.pod:195
4187 msgid "NON-INTERACTIVE EDITING"
4191 #: ../edit/virt-edit.pod:197
4193 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
4194 "administrator can interactively edit the file."
4198 #: ../edit/virt-edit.pod:200
4200 "There are two ways also to use C<virt-edit> from scripts in order to make "
4201 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
4202 "like this, it's less error-prone to write scripts directly using the "
4203 "libguestfs API and Augeas for configuration file editing.)"
4207 #: ../edit/virt-edit.pod:206
4209 "The first method is to temporarily set C<$EDITOR> to any script or program "
4210 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
4211 "update C<tmpfile> in place however it likes."
4215 #: ../edit/virt-edit.pod:210
4217 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
4218 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
4219 "instances of C<foo> with C<bar> in a file:"
4223 #: ../edit/virt-edit.pod:214
4226 " virt-edit -d domname filename -e 's/foo/bar/'\n"
4231 #: ../edit/virt-edit.pod:216
4233 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
4234 "For example to delete root's password you could do:"
4238 #: ../edit/virt-edit.pod:219
4241 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4246 #: ../edit/virt-edit.pod:221
4248 "What really happens is that the snippet is evaluated as a Perl expression "
4249 "for each line of the file. The line, including the final C<\\n>, is passed "
4250 "in C<$_> and the expression should update C<$_> or leave it unchanged."
4254 #: ../edit/virt-edit.pod:226
4256 "To delete a line, set C<$_> to the empty string. For example, to delete the "
4257 "C<apache> user account from the password file you can do:"
4261 #: ../edit/virt-edit.pod:229
4264 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
4269 #: ../edit/virt-edit.pod:231
4271 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4272 "the end of the file is rather difficult this way since there is no concept "
4273 "of \"last line of the file\" - your expression just doesn't get called "
4274 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4279 #: ../edit/virt-edit.pod:237
4281 "The variable C<$lineno> contains the current line number. As is "
4282 "traditional, the first line in the file is number C<1>."
4286 #: ../edit/virt-edit.pod:240
4288 "The return value from the expression is ignored, but the expression may call "
4289 "C<die> in order to abort the whole program, leaving the original file "
4294 #: ../edit/virt-edit.pod:244
4296 "Remember when matching the end of a line that C<$_> may contain the final C<"
4297 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4298 "newline then neither of these. Thus to match or substitute some text at the "
4299 "end of a line, use this regular expression:"
4303 #: ../edit/virt-edit.pod:249
4306 " /some text(\\r?\\n)?$/\n"
4311 #: ../edit/virt-edit.pod:251
4313 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
4314 "$_> itself (since that would remove all newlines from the file):"
4318 #: ../edit/virt-edit.pod:255
4321 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4326 #: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
4327 msgid "WINDOWS PATHS"
4331 #: ../edit/virt-edit.pod:259
4333 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4334 "paths (eg. C<E:\\foo\\bar.txt>)."
4338 #: ../edit/virt-edit.pod:262
4339 msgid "If and only if the guest is running Windows then:"
4343 #: ../edit/virt-edit.pod:268
4345 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
4346 "to the correct filesystem."
4350 #: ../edit/virt-edit.pod:273
4352 "Any backslash (C<\\>) characters in the path are replaced with forward "
4353 "slashes so that libguestfs can process it."
4357 #: ../edit/virt-edit.pod:278
4359 "The path is resolved case insensitively to locate the file that should be "
4364 #: ../edit/virt-edit.pod:283
4365 msgid "There are some known shortcomings:"
4369 #: ../edit/virt-edit.pod:289
4370 msgid "Some NTFS symbolic links may not be followed correctly."
4374 #: ../edit/virt-edit.pod:293
4375 msgid "NTFS junction points that cross filesystems are not followed."
4379 #: ../edit/virt-edit.pod:299
4381 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4382 "C<virt-edit> doesn't work."
4386 #: ../edit/virt-edit.pod:302
4387 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4391 #: ../edit/virt-edit.pod:304
4394 " guestfish --rw -i -d domname edit /file\n"
4399 #: ../edit/virt-edit.pod:306
4401 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4406 #: ../edit/virt-edit.pod:309
4408 "The command above uses libguestfs's guest inspection feature and so does not "
4409 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4410 "disk images that don't contain guests. To edit a file on a disk image "
4415 #: ../edit/virt-edit.pod:314
4418 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4423 #: ../edit/virt-edit.pod:316
4425 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4426 "the disk image to edit, and C</file> is the full path to the file."
4430 #: ../edit/virt-edit.pod:320
4432 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4433 "C<write> or C<upload> instead:"
4437 #: ../edit/virt-edit.pod:323
4440 " guestfish --rw -i -d domname touch /newfile\n"
4445 #: ../edit/virt-edit.pod:325
4448 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4453 #: ../edit/virt-edit.pod:327
4456 " guestfish --rw -i -d domname upload localfile /newfile\n"
4461 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119
4462 #: ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232
4463 #: ../src/guestfs.pod:3194 ../test-tool/libguestfs-test-tool.pod:95
4464 msgid "ENVIRONMENT VARIABLES"
4468 #: ../edit/virt-edit.pod:333
4473 #: ../edit/virt-edit.pod:335
4475 "If set, this string is used as the editor. It may contain arguments, eg. C<"
4480 #: ../edit/virt-edit.pod:338
4481 msgid "If not set, C<vi> is used."
4485 #: ../edit/virt-edit.pod:356
4487 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
4488 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
4489 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4493 #: ../erlang/examples/guestfs-erlang.pod:5
4494 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4498 #: ../erlang/examples/guestfs-erlang.pod:9
4501 " {ok, G} = guestfs:create(),\n"
4502 " ok = guestfs:add_drive_opts(G, Disk,\n"
4503 " [{format, \"raw\"}, {readonly, true}]),\n"
4504 " ok = guestfs:launch(G),\n"
4505 " [Device] = guestfs:list_devices(G),\n"
4506 " ok = guestfs:close(G).\n"
4511 #: ../erlang/examples/guestfs-erlang.pod:18
4513 "This manual page documents how to call libguestfs from the Erlang "
4514 "programming language. This page just documents the differences from the C "
4515 "API and gives some examples. If you are not familiar with using libguestfs, "
4516 "you also need to read L<guestfs(3)>."
4520 #: ../erlang/examples/guestfs-erlang.pod:23
4521 msgid "OPENING AND CLOSING THE HANDLE"
4525 #: ../erlang/examples/guestfs-erlang.pod:25
4527 "The Erlang bindings are implemented using an external program called C<erl-"
4528 "guestfs>. This program must be on the current PATH, or else you should "
4529 "specify the full path to the program:"
4533 #: ../erlang/examples/guestfs-erlang.pod:29
4536 " {ok, G} = guestfs:create().\n"
4541 #: ../erlang/examples/guestfs-erlang.pod:31
4544 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4549 #: ../erlang/examples/guestfs-erlang.pod:33
4550 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4554 #: ../erlang/examples/guestfs-erlang.pod:36
4555 msgid "To close the handle:"
4559 #: ../erlang/examples/guestfs-erlang.pod:38
4562 " ok = guestfs:close(G).\n"
4567 #: ../erlang/examples/guestfs-erlang.pod:40
4568 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4572 #: ../erlang/examples/guestfs-erlang.pod:42
4574 "For functions that take optional arguments, the first arguments are the non-"
4575 "optional ones. The last argument is a list of tuples supplying the "
4576 "remaining optional arguments."
4580 #: ../erlang/examples/guestfs-erlang.pod:46
4583 " ok = guestfs:add_drive_opts(G, Disk,\n"
4584 " [{format, \"raw\"}, {readonly, true}]).\n"
4589 #: ../erlang/examples/guestfs-erlang.pod:49
4590 msgid "If the last argument would be an empty list, you can also omit it:"
4594 #: ../erlang/examples/guestfs-erlang.pod:51
4597 " ok = guestfs:add_drive_opts(G, Disk).\n"
4602 #: ../erlang/examples/guestfs-erlang.pod:53
4603 msgid "RETURN VALUES AND ERRORS"
4607 #: ../erlang/examples/guestfs-erlang.pod:55
4609 "On success, most functions return a C<Result> term (which could be a list, "
4610 "string, tuple etc.). If there is nothing for the function to return, then "
4611 "the atom C<ok> is returned."
4615 #: ../erlang/examples/guestfs-erlang.pod:59
4616 msgid "On error, you would see one of the following tuples:"
4620 #: ../erlang/examples/guestfs-erlang.pod:63
4621 msgid "C<{error, Msg, Errno}>"
4625 #: ../erlang/examples/guestfs-erlang.pod:65
4626 msgid "This indicates an ordinary error from the function."
4630 #: ../erlang/examples/guestfs-erlang.pod:67
4632 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4637 #: ../erlang/examples/guestfs-erlang.pod:70
4638 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4642 #: ../erlang/examples/guestfs-erlang.pod:72
4643 msgid "C<{unknown, Function}>"
4647 #: ../erlang/examples/guestfs-erlang.pod:74
4649 "This indicates that the function you called is not known. Generally this "
4650 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4651 "which you should not do."
4655 #: ../erlang/examples/guestfs-erlang.pod:78
4656 msgid "C<Function> is the name of the unknown function."
4660 #: ../erlang/examples/guestfs-erlang.pod:80
4661 msgid "C<{unknownarg, Arg}>"
4665 #: ../erlang/examples/guestfs-erlang.pod:82
4667 "This indicates that you called a function with optional arguments, with an "
4668 "unknown argument name."
4672 #: ../erlang/examples/guestfs-erlang.pod:85
4673 msgid "C<Arg> is the name of the unknown argument."
4677 #: ../erlang/examples/guestfs-erlang.pod:89
4678 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
4679 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
4680 #: ../python/examples/guestfs-python.pod:34
4681 #: ../ruby/examples/guestfs-ruby.pod:28
4682 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4686 #: ../erlang/examples/guestfs-erlang.pod:91
4687 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
4688 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
4689 #: ../python/examples/guestfs-python.pod:36
4690 #: ../ruby/examples/guestfs-ruby.pod:30
4695 #: ../erlang/examples/guestfs-erlang.pod:93
4696 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
4697 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
4698 #: ../python/examples/guestfs-python.pod:38
4699 #: ../ruby/examples/guestfs-ruby.pod:32
4700 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4704 #: ../erlang/examples/guestfs-erlang.pod:95
4705 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
4706 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
4707 #: ../python/examples/guestfs-python.pod:40
4708 #: ../ruby/examples/guestfs-ruby.pod:34
4713 #: ../erlang/examples/guestfs-erlang.pod:99
4715 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4716 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4717 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
4721 #: ../erlang/examples/guestfs-erlang.pod:110
4722 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
4723 #: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
4724 #: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
4725 #: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
4726 #: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
4727 #: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
4728 #: ../python/examples/guestfs-python.pod:54
4729 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3333
4730 #: ../test-tool/libguestfs-test-tool.pod:106
4735 #: ../erlang/examples/guestfs-erlang.pod:112
4736 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
4737 #: ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62
4738 #: ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60
4739 #: ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330
4740 #: ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93
4741 #: ../perl/examples/guestfs-perl.pod:54
4742 #: ../python/examples/guestfs-python.pod:56
4743 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3335
4744 #: ../test-tool/libguestfs-test-tool.pod:108
4745 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4749 #: ../erlang/examples/guestfs-erlang.pod:116
4750 #: ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4751 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4755 #: ../erlang/examples/guestfs-erlang.pod:118
4756 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
4757 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
4758 #: ../perl/examples/guestfs-perl.pod:60
4759 #: ../python/examples/guestfs-python.pod:62
4760 #: ../ruby/examples/guestfs-ruby.pod:56
4762 "The examples in this manual page may be freely copied, modified and "
4763 "distributed without any restrictions."
4767 #: ../erlang/examples/guestfs-erlang.pod:121
4768 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
4769 #: ../java/examples/guestfs-java.pod:69
4770 #: ../ocaml/examples/guestfs-ocaml.pod:102
4771 #: ../perl/examples/guestfs-perl.pod:63
4772 #: ../python/examples/guestfs-python.pod:65
4773 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3342
4775 "This library is free software; you can redistribute it and/or modify it "
4776 "under the terms of the GNU Lesser General Public License as published by the "
4777 "Free Software Foundation; either version 2 of the License, or (at your "
4778 "option) any later version."
4782 #: ../erlang/examples/guestfs-erlang.pod:126
4783 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
4784 #: ../java/examples/guestfs-java.pod:74
4785 #: ../ocaml/examples/guestfs-ocaml.pod:107
4786 #: ../perl/examples/guestfs-perl.pod:68
4787 #: ../python/examples/guestfs-python.pod:70
4788 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3347
4790 "This library is distributed in the hope that it will be useful, but WITHOUT "
4791 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4792 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4797 #: ../erlang/examples/guestfs-erlang.pod:131
4798 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
4799 #: ../java/examples/guestfs-java.pod:79
4800 #: ../ocaml/examples/guestfs-ocaml.pod:112
4801 #: ../perl/examples/guestfs-perl.pod:73
4802 #: ../python/examples/guestfs-python.pod:75
4803 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3352
4805 "You should have received a copy of the GNU Lesser General Public License "
4806 "along with this library; if not, write to the Free Software Foundation, "
4807 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4811 #: ../examples/guestfs-examples.pod:5
4812 msgid "guestfs-examples - Examples of using libguestfs from C"
4816 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4819 " #include <guestfs.h>\n"
4821 msgstr "#include <guestfs.h>\n"
4824 #: ../examples/guestfs-examples.pod:11
4827 " guestfs_h *g = guestfs_create ();\n"
4828 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4829 " guestfs_launch (g);\n"
4834 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4837 " cc prog.c -o prog -lguestfs\n"
4839 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4842 " cc prog.c -o prog -lguestfs\n"
4844 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4848 #: ../examples/guestfs-examples.pod:21
4850 "This manual page contains examples of calling libguestfs from the C "
4851 "programming language. If you are not familiar with using libguestfs, you "
4852 "also need to read L<guestfs(3)>."
4856 #: ../examples/guestfs-examples.pod:35
4858 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4859 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4860 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4864 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
4865 #: ../python/examples/guestfs-python.pod:60
4866 #: ../ruby/examples/guestfs-ruby.pod:54
4867 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4871 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4876 #: ../examples/guestfs-recipes.pod:5
4878 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4879 "here. The only way which works for both sorts of output is to just write "
4880 "the URL directly. Do NOT use L<...> for URLs."
4884 #: ../examples/guestfs-recipes.pod:9
4886 "We break with tradition here and don't use ALL CAPS for the section "
4887 "headings, as this makes them much easier to read."
4891 #: ../examples/guestfs-recipes.pod:16
4892 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4896 #: ../examples/guestfs-recipes.pod:20
4898 "This page contains recipes for and links to things you can do using "
4899 "libguestfs, L<guestfish(1)> and the virt tools."
4903 #: ../examples/guestfs-recipes.pod:23
4904 msgid "Audit a virtual machine for setuid files"
4908 #: ../examples/guestfs-recipes.pod:25
4910 "The link below contains a small program which can be used to audit a Linux "
4911 "virtual machine to see what setuid and setgid files it contains."
4915 #: ../examples/guestfs-recipes.pod:28
4917 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
4922 #: ../examples/guestfs-recipes.pod:30
4923 msgid "Change the background image in a Windows XP VM"
4927 #: ../examples/guestfs-recipes.pod:32
4929 "The links below explain how to use L<guestfish(1)> to change the background "
4930 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4931 "be substantially different for each version of Windows."
4935 #: ../examples/guestfs-recipes.pod:37
4937 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html https://"
4938 "lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4942 #: ../examples/guestfs-recipes.pod:40
4943 msgid "Cloning a virtual machine (Linux)"
4947 #: ../examples/guestfs-recipes.pod:42
4949 "The guestfish technique described in the link below works well for most "
4950 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4955 #: ../examples/guestfs-recipes.pod:46
4957 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
4962 #: ../examples/guestfs-recipes.pod:48
4964 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
4969 #: ../examples/guestfs-recipes.pod:51
4970 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4974 #: ../examples/guestfs-recipes.pod:53
4975 msgid "Cloning a virtual machine (Windows)"
4979 #: ../examples/guestfs-recipes.pod:55
4981 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
4982 "straightforward. Currently there is code in the Aeolus Oz project which "
4983 "does this (using libguestfs). As part of our review of the virt-clone tool, "
4984 "we may add sysprepping ability."
4988 #: ../examples/guestfs-recipes.pod:60
4990 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-tools-"
4991 "list/2011-May/msg00019.html"
4995 #: ../examples/guestfs-recipes.pod:63
4996 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
5000 #: ../examples/guestfs-recipes.pod:65
5001 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
5005 #: ../examples/guestfs-recipes.pod:67
5008 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
5013 #: ../examples/guestfs-recipes.pod:69
5014 msgid "To export just a subdirectory, eg. C</files>, do:"
5018 #: ../examples/guestfs-recipes.pod:71
5021 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
5026 #: ../examples/guestfs-recipes.pod:73
5027 msgid "Create empty disk images"
5031 #: ../examples/guestfs-recipes.pod:75
5033 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
5034 "The useful guide below explains the options available."
5038 #: ../examples/guestfs-recipes.pod:78
5040 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/"
5045 #: ../examples/guestfs-recipes.pod:80
5046 msgid "Dump raw filesystem content from inside a disk image or VM"
5050 #: ../examples/guestfs-recipes.pod:82
5052 "You can use the L<guestfish(1)> C<download> command to extract the raw "
5053 "filesystem content from any filesystem in a disk image or a VM (even one "
5054 "which is encrypted or buried inside an LV):"
5058 #: ../examples/guestfs-recipes.pod:86
5061 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
5066 #: ../examples/guestfs-recipes.pod:88
5069 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
5074 #: ../examples/guestfs-recipes.pod:90
5075 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
5079 #: ../examples/guestfs-recipes.pod:92
5080 msgid "Edit grub configuration in a VM"
5084 #: ../examples/guestfs-recipes.pod:94
5085 msgid "You can use this to:"
5089 #: ../examples/guestfs-recipes.pod:100
5090 msgid "Fix a virtual machine that does not boot."
5094 #: ../examples/guestfs-recipes.pod:104
5095 msgid "Change which kernel is used to boot the VM."
5099 #: ../examples/guestfs-recipes.pod:108
5100 msgid "Change kernel command line options."
5104 #: ../examples/guestfs-recipes.pod:112
5105 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
5109 #: ../examples/guestfs-recipes.pod:114
5112 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
5117 #: ../examples/guestfs-recipes.pod:116
5119 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
5124 #: ../examples/guestfs-recipes.pod:119
5127 " virt-rescue -d BrokenGuest\n"
5132 #: ../examples/guestfs-recipes.pod:121
5133 msgid "Export any directory from a VM"
5137 #: ../examples/guestfs-recipes.pod:123
5139 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
5143 #: ../examples/guestfs-recipes.pod:126
5146 " virt-copy-out -d Guest /home .\n"
5151 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
5152 #: ../fish/guestfish-actions.pod:1332 ../fish/guestfish-actions.pod:1597
5153 #: ../fish/guestfish-actions.pod:2014 ../src/guestfs-actions.pod:18
5154 #: ../src/guestfs-actions.pod:2039 ../src/guestfs-actions.pod:2463
5155 #: ../src/guestfs-actions.pod:3022 ../src/guestfs.pod:1670
5156 #: ../tools/virt-win-reg.pl:706
5161 #: ../examples/guestfs-recipes.pod:134
5163 "The final dot of the command is not a printing error. It means we want to "
5164 "copy out to the current directory."
5168 #: ../examples/guestfs-recipes.pod:139
5169 msgid "This creates a directory called C<home> under the current directory."
5173 #: ../examples/guestfs-recipes.pod:143
5175 "If the guest is a Windows guest then you can use drive letters and "
5176 "backslashes, but you must prefix the path with C<win:> and quote it to "
5177 "protect it from the shell, like this:"
5181 #: ../examples/guestfs-recipes.pod:147
5184 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
5189 #: ../examples/guestfs-recipes.pod:149
5190 msgid "To get the output as a compressed tarball, do:"
5194 #: ../examples/guestfs-recipes.pod:151
5197 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
5202 #: ../examples/guestfs-recipes.pod:153
5204 "Although it sounds tempting, this is usually not a reliable way to get a "
5205 "backup from a running guest. See the entry in the FAQ: http://libguestfs."
5206 "org/FAQ.html#backup"
5210 #: ../examples/guestfs-recipes.pod:157
5211 msgid "Find out which user is using the most space"
5215 #: ../examples/guestfs-recipes.pod:159
5217 "This simple script examines a Linux guest to find out which user is using "
5218 "the most space in their home directory:"
5222 #: ../examples/guestfs-recipes.pod:162
5230 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
5238 #: ../examples/guestfs-recipes.pod:166
5247 #: ../examples/guestfs-recipes.pod:169
5250 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
5255 #: ../examples/guestfs-recipes.pod:171
5258 " for d in $(guestfish --remote ls \"$dir\"); do\n"
5259 " echo -n \"$dir/$d\"\n"
5261 " guestfish --remote du \"$dir/$d\";\n"
5262 " done | sort -nr -k 2\n"
5267 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
5270 " guestfish --remote exit\n"
5275 #: ../examples/guestfs-recipes.pod:179
5276 msgid "Get DHCP address from a VM"
5280 #: ../examples/guestfs-recipes.pod:181
5282 "The link below explains the many different possible techniques for getting "
5283 "the last assigned DHCP address of a virtual machine."
5287 #: ../examples/guestfs-recipes.pod:184
5289 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-"
5290 "a-virtual-machine-disk-image/#content"
5294 #: ../examples/guestfs-recipes.pod:186
5296 "In the libguestfs source examples directory you will find the latest version "
5297 "of the C<virt-dhcp-address.c> program."
5301 #: ../examples/guestfs-recipes.pod:189
5302 msgid "Get the operating system product name string"
5306 #: ../examples/guestfs-recipes.pod:191
5307 msgid "Save the following script into a file called C<product-name.sh>:"
5311 #: ../examples/guestfs-recipes.pod:193
5316 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5317 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5318 " guestfish --remote inspect-get-product-name \"$root\"\n"
5319 " guestfish --remote exit\n"
5324 #: ../examples/guestfs-recipes.pod:200
5325 msgid "Make the script executable and run it on a named guest:"
5329 #: ../examples/guestfs-recipes.pod:202
5332 " # product-name.sh RHEL60x64\n"
5333 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
5338 #: ../examples/guestfs-recipes.pod:205
5340 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
5341 "C<xpath> command line tool or from your favourite programming language:"
5345 #: ../examples/guestfs-recipes.pod:209
5348 " # virt-inspector RHEL60x64 > xml\n"
5349 " # xpath '//product_name' < xml\n"
5352 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
5357 #: ../examples/guestfs-recipes.pod:215
5358 msgid "Get the default boot kernel for a Linux VM"
5362 #: ../examples/guestfs-recipes.pod:217
5364 "The link below contains a program to print the default boot kernel for a "
5369 #: ../examples/guestfs-recipes.pod:220
5371 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-"
5372 "kernel-for-a-vm/#content"
5376 #: ../examples/guestfs-recipes.pod:222
5378 "It uses Augeas, and the technique is generally applicable for many different "
5383 #: ../examples/guestfs-recipes.pod:229
5384 msgid "listing the user accounts in the guest"
5388 #: ../examples/guestfs-recipes.pod:233
5389 msgid "what repositories is it configured to use"
5393 #: ../examples/guestfs-recipes.pod:237
5394 msgid "what NTP servers does it connect to"
5398 #: ../examples/guestfs-recipes.pod:241
5399 msgid "what were the boot messages last time it booted"
5403 #: ../examples/guestfs-recipes.pod:245
5404 msgid "listing who was logged in recently"
5408 #: ../examples/guestfs-recipes.pod:249
5409 msgid "http://augeas.net/"
5413 #: ../examples/guestfs-recipes.pod:251
5414 msgid "Install RPMs in a guest"
5418 #: ../examples/guestfs-recipes.pod:253
5420 "The link below contains a method to install RPMs in a guest. In fact the "
5421 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5422 "installs them next time the guest is booted. You could use this technique "
5423 "to install vital security updates in an offline guest."
5427 #: ../examples/guestfs-recipes.pod:259
5429 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5433 #: ../examples/guestfs-recipes.pod:261
5434 msgid "List applications installed in a VM"
5438 #: ../examples/guestfs-recipes.pod:263
5439 msgid "Save the following to a file C<list-apps.sh>:"
5443 #: ../examples/guestfs-recipes.pod:265
5448 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5449 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5450 " guestfish --remote inspect-list-applications \"$root\"\n"
5451 " guestfish --remote exit\n"
5456 #: ../examples/guestfs-recipes.pod:272
5458 "Make the file executable and then you can run it on any named virtual "
5463 #: ../examples/guestfs-recipes.pod:275
5466 " # list-apps.sh WinGuest\n"
5468 " app_name: Mozilla Firefox (3.6.12)\n"
5469 " app_display_name: Mozilla Firefox (3.6.12)\n"
5471 " app_version: 3.6.12 (en-GB)\n"
5473 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5474 " app_trans_path:\n"
5475 " app_publisher: Mozilla\n"
5476 " app_url: http://www.mozilla.com/en-GB/\n"
5477 " app_source_package:\n"
5479 " app_description: Mozilla Firefox\n"
5482 " app_name: VLC media player\n"
5483 " app_display_name: VLC media player 1.1.5\n"
5485 " app_version: 1.1.5\n"
5487 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5488 " app_trans_path:\n"
5489 " app_publisher: VideoLAN\n"
5490 " app_url: http://www.videolan.org/\n"
5491 " app_source_package:\n"
5493 " app_description:\n"
5499 #: ../examples/guestfs-recipes.pod:305
5501 "If you want to run the script on disk images (instead of libvirt virtual "
5502 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-inspector(1)"
5507 #: ../examples/guestfs-recipes.pod:309
5508 msgid "List files and directories in a VM"
5512 #: ../examples/guestfs-recipes.pod:311
5513 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5517 #: ../examples/guestfs-recipes.pod:313
5520 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5525 #: ../examples/guestfs-recipes.pod:315
5526 msgid "List services in a Windows VM"
5530 #: ../examples/guestfs-recipes.pod:317
5532 "The link below contains a script that can be used to list out the services "
5533 "from a Windows VM, and whether those services run at boot time or are loaded "
5538 #: ../examples/guestfs-recipes.pod:321
5540 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/"
5545 #: ../examples/guestfs-recipes.pod:323
5546 msgid "Make a disk image sparse"
5550 #: ../examples/guestfs-recipes.pod:325
5552 "The link below contains some guides for making a disk image sparse (or "
5553 "reintroducing sparseness)."
5557 #: ../examples/guestfs-recipes.pod:328
5559 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5563 #: ../examples/guestfs-recipes.pod:330
5564 msgid "Monitor disk usage over time"
5568 #: ../examples/guestfs-recipes.pod:332
5570 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5571 "The link below contains a guide."
5575 #: ../examples/guestfs-recipes.pod:335
5576 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5580 #: ../examples/guestfs-recipes.pod:337
5581 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5585 #: ../examples/guestfs-recipes.pod:339
5587 "L<guestfish(1)> plus the tools described in the link below can be used to "
5588 "read out the Windows Event Log from any virtual machine running Windows "
5589 "Vista or a later version."
5593 #: ../examples/guestfs-recipes.pod:343
5595 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
5596 "guestfish/#content"
5600 #: ../examples/guestfs-recipes.pod:345
5601 msgid "Remove root password (Linux)"
5605 #: ../examples/guestfs-recipes.pod:347
5607 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5608 "files. One use is to remove the root password from a Linux guest:"
5612 #: ../examples/guestfs-recipes.pod:350
5615 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5620 #: ../examples/guestfs-recipes.pod:352
5621 msgid "Remove Administrator password (Windows)"
5625 #: ../examples/guestfs-recipes.pod:354
5627 "The link below contains one technique for removing the Administrator "
5628 "password from a Windows VM, or to be more precise, it gives you a command "
5629 "prompt the next time you log in which you can use to bypass any security:"
5633 #: ../examples/guestfs-recipes.pod:359
5635 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
5636 "administrator-password-with-guestfish/"
5640 #: ../examples/guestfs-recipes.pod:361
5641 msgid "Unpack a live CD"
5645 #: ../examples/guestfs-recipes.pod:363
5647 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5648 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5649 "layers, as outlined in the guide below."
5653 #: ../examples/guestfs-recipes.pod:367
5655 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
5660 #: ../examples/guestfs-recipes.pod:369
5661 msgid "Uploading and downloading files"
5665 #: ../examples/guestfs-recipes.pod:371
5667 "The link below contains general tips on uploading (copying in) and "
5668 "downloading (copying out) files from VMs."
5672 #: ../examples/guestfs-recipes.pod:374
5674 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5678 #: ../examples/guestfs-recipes.pod:376
5679 msgid "Use libguestfs tools on VMware ESX guests"
5683 #: ../examples/guestfs-recipes.pod:378
5685 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5686 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5690 #: ../examples/guestfs-recipes.pod:382
5692 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
5697 #: ../examples/guestfs-recipes.pod:386
5699 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)"
5700 ">, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-"
5701 "python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
5705 #: ../examples/guestfs-recipes.pod:403
5706 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5710 #: ../fish/guestfish-actions.pod:1
5715 #: ../fish/guestfish-actions.pod:3
5718 " add-cdrom filename\n"
5723 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5724 msgid "This function adds a virtual CD-ROM disk image to the guest."
5728 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5729 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5733 #: ../fish/guestfish-actions.pod:15
5735 "This call checks for the existence of C<filename>. This stops you from "
5736 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5737 "and C<http:> URLs. To specify those, use the general L</config> call "
5742 #: ../fish/guestfish-actions.pod:22
5744 "If you just want to add an ISO file (often you use this as an efficient way "
5745 "to transfer large files into the guest), then you should probably use L</add-"
5746 "drive-ro> instead."
5750 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:168
5751 #: ../fish/guestfish-actions.pod:182
5753 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
5758 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:171
5759 #: ../fish/guestfish-actions.pod:185 ../fish/guestfish-actions.pod:1031
5760 #: ../fish/guestfish-actions.pod:1391 ../fish/guestfish-actions.pod:1405
5761 #: ../fish/guestfish-actions.pod:3175 ../fish/guestfish-actions.pod:3486
5762 #: ../fish/guestfish-actions.pod:3534 ../fish/guestfish-actions.pod:4447
5763 #: ../fish/guestfish-actions.pod:4470 ../fish/guestfish-actions.pod:4492
5764 #: ../fish/guestfish-actions.pod:4530 ../fish/guestfish-actions.pod:5179
5765 #: ../fish/guestfish-actions.pod:5285 ../src/guestfs-actions.pod:10
5766 #: ../src/guestfs-actions.pod:258 ../src/guestfs-actions.pod:279
5767 #: ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:2124
5768 #: ../src/guestfs-actions.pod:2145 ../src/guestfs-actions.pod:4790
5769 #: ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5412
5770 #: ../src/guestfs-actions.pod:6694 ../src/guestfs-actions.pod:6738
5771 #: ../src/guestfs-actions.pod:6772 ../src/guestfs-actions.pod:6835
5772 #: ../src/guestfs-actions.pod:7767 ../src/guestfs-actions.pod:7876
5773 #: ../src/guestfs-actions.pod:8059
5775 "Deprecated functions will not be removed from the API, but the fact that "
5776 "they are deprecated indicates that there are problems with correct use of "
5781 #: ../fish/guestfish-actions.pod:35
5786 #: ../fish/guestfish-actions.pod:37
5791 #: ../fish/guestfish-actions.pod:39
5794 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
5799 #: ../fish/guestfish-actions.pod:41
5801 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5802 "It works by connecting to libvirt, requesting the domain and domain XML from "
5803 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
5807 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64
5809 "The number of disks added is returned. This operation is atomic: if an "
5810 "error is returned, then no disks are added."
5814 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67
5816 "This function does some minimal checks to make sure the libvirt domain is "
5817 "not running (unless C<readonly> is true). In a future version we will try "
5818 "to acquire the libvirt lock on each disk."
5822 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71
5824 "Disks must be accessible locally. This often means that adding disks from a "
5825 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5826 "unless those disks are accessible via the same device path locally too."
5830 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76
5832 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
5833 "libvirt.org/uri.html>). If this is not set then we connect to the default "
5834 "libvirt URI (or one set through an environment variable, see the libvirt "
5835 "documentation for full details)."
5839 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82
5841 "The optional C<live> flag controls whether this call will try to connect to "
5842 "a running virtual machine C<guestfsd> process if it sees a suitable "
5843 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
5844 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
5845 "DAEMONS> for more information."
5849 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89
5851 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
5852 "passed instead of the domain name. The C<dom> string is treated as a UUID "
5853 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
5858 #: ../fish/guestfish-actions.pod:76
5860 "The other optional parameters are passed directly through to L</add-drive-"
5865 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:148
5866 #: ../fish/guestfish-actions.pod:578 ../fish/guestfish-actions.pod:789
5867 #: ../fish/guestfish-actions.pod:810 ../fish/guestfish-actions.pod:2053
5868 #: ../fish/guestfish-actions.pod:3224 ../fish/guestfish-actions.pod:3387
5869 #: ../fish/guestfish-actions.pod:3522
5871 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
5875 #: ../fish/guestfish-actions.pod:81
5880 #: ../fish/guestfish-actions.pod:83
5883 " add-drive filename\n"
5888 #: ../fish/guestfish-actions.pod:85
5890 "This function is the equivalent of calling L</add-drive-opts> with no "
5891 "optional parameters, so the disk is added writable, with the format being "
5892 "detected automatically."
5896 #: ../fish/guestfish-actions.pod:89
5898 "Automatic detection of the format opens you up to a potential security hole "
5899 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5900 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
5901 "you should think about replacing calls to this function with calls to L</add-"
5902 "drive-opts>, and specifying the format."
5906 #: ../fish/guestfish-actions.pod:96
5907 msgid "add-drive-opts"
5911 #: ../fish/guestfish-actions.pod:98
5916 #: ../fish/guestfish-actions.pod:100
5919 " add-drive-opts filename [readonly:..] [format:..] [iface:..] [name:..]\n"
5924 #: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:161
5926 "This function adds a virtual machine disk image C<filename> to libguestfs. "
5927 "The first time you call this function, the disk appears as C</dev/sda>, the "
5928 "second time as C</dev/sdb>, and so on."
5932 #: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:166
5934 "You don't necessarily need to be root when using libguestfs. However you "
5935 "obviously do need sufficient permissions to access the filename for whatever "
5936 "operations you want to perform (ie. read access if you just want to read the "
5937 "image or write access if you want to modify the image)."
5941 #: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:172
5942 msgid "This call checks that C<filename> exists."
5946 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3186
5947 #: ../src/guestfs-actions.pod:174 ../src/guestfs-actions.pod:4827
5948 msgid "The optional arguments are:"
5952 #: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:178
5957 #: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:180
5959 "If true then the image is treated as read-only. Writes are still allowed, "
5960 "but they are stored in a temporary snapshot overlay which is discarded at "
5961 "the end. The disk that you add is not modified."
5965 #: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:184
5970 #: ../fish/guestfish-actions.pod:127
5972 "This forces the image format. If you omit this (or use L</add-drive> or L</"
5973 "add-drive-ro>) then the format is automatically detected. Possible formats "
5974 "include C<raw> and C<qcow2>."
5978 #: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:190
5980 "Automatic detection of the format opens you up to a potential security hole "
5981 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5982 "RHBZ#642934. Specifying the format closes this security hole."
5986 #: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:195
5991 #: ../fish/guestfish-actions.pod:138
5993 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
5994 "add-drive-with-if> call (q.v.)"
5998 #: ../fish/guestfish-actions.pod:141 ../src/guestfs-actions.pod:200
6003 #: ../fish/guestfish-actions.pod:143 ../src/guestfs-actions.pod:202
6005 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6006 "a hint to the guest inspection process if it is available."
6010 #: ../fish/guestfish-actions.pod:150
6011 msgid "add-drive-ro"
6015 #: ../fish/guestfish-actions.pod:152
6020 #: ../fish/guestfish-actions.pod:154
6023 " add-drive-ro filename\n"
6028 #: ../fish/guestfish-actions.pod:156
6030 "This function is the equivalent of calling L</add-drive-opts> with the "
6031 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6032 "is added read-only, with the format being detected automatically."
6036 #: ../fish/guestfish-actions.pod:161
6037 msgid "add-drive-ro-with-if"
6041 #: ../fish/guestfish-actions.pod:163
6044 " add-drive-ro-with-if filename iface\n"
6049 #: ../fish/guestfish-actions.pod:165
6051 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6052 "interface emulation to use at run time."
6056 #: ../fish/guestfish-actions.pod:175
6057 msgid "add-drive-with-if"
6061 #: ../fish/guestfish-actions.pod:177
6064 " add-drive-with-if filename iface\n"
6069 #: ../fish/guestfish-actions.pod:179
6071 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6072 "interface emulation to use at run time."
6076 #: ../fish/guestfish-actions.pod:189
6081 #: ../fish/guestfish-actions.pod:191
6084 " aug-clear augpath\n"
6089 #: ../fish/guestfish-actions.pod:193 ../src/guestfs-actions.pod:296
6091 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6092 "L<augtool(1)> C<clear> command."
6096 #: ../fish/guestfish-actions.pod:196
6101 #: ../fish/guestfish-actions.pod:198
6109 #: ../fish/guestfish-actions.pod:200
6111 "Close the current Augeas handle and free up any resources used by it. After "
6112 "calling this, you have to call L</aug-init> again before you can use any "
6113 "other Augeas functions."
6117 #: ../fish/guestfish-actions.pod:205
6122 #: ../fish/guestfish-actions.pod:207
6125 " aug-defnode name expr val\n"
6130 #: ../fish/guestfish-actions.pod:209 ../src/guestfs-actions.pod:325
6132 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6136 #: ../fish/guestfish-actions.pod:212
6138 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6139 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6140 "containing that single node."
6144 #: ../fish/guestfish-actions.pod:216 ../src/guestfs-actions.pod:332
6146 "On success this returns a pair containing the number of nodes in the "
6147 "nodeset, and a boolean flag if a node was created."
6151 #: ../fish/guestfish-actions.pod:220
6156 #: ../fish/guestfish-actions.pod:222
6159 " aug-defvar name expr\n"
6164 #: ../fish/guestfish-actions.pod:224 ../src/guestfs-actions.pod:349
6166 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6167 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6171 #: ../fish/guestfish-actions.pod:228 ../src/guestfs-actions.pod:353
6173 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6174 "evaluates to something which is not a nodeset."
6178 #: ../fish/guestfish-actions.pod:231
6183 #: ../fish/guestfish-actions.pod:233
6186 " aug-get augpath\n"
6191 #: ../fish/guestfish-actions.pod:235 ../src/guestfs-actions.pod:366
6193 "Look up the value associated with C<path>. If C<path> matches exactly one "
6194 "node, the C<value> is returned."
6198 #: ../fish/guestfish-actions.pod:238
6203 #: ../fish/guestfish-actions.pod:240
6206 " aug-init root flags\n"
6211 #: ../fish/guestfish-actions.pod:242 ../src/guestfs-actions.pod:381
6213 "Create a new Augeas handle for editing configuration files. If there was "
6214 "any previous Augeas handle associated with this guestfs session, then it is "
6219 #: ../fish/guestfish-actions.pod:246
6220 msgid "You must call this before using any other L</aug-*> commands."
6224 #: ../fish/guestfish-actions.pod:249 ../src/guestfs-actions.pod:388
6226 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6230 #: ../fish/guestfish-actions.pod:252 ../src/guestfs-actions.pod:391
6232 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6233 "logical I<or> of the following integers:"
6237 #: ../fish/guestfish-actions.pod:258 ../src/guestfs-actions.pod:397
6238 msgid "C<AUG_SAVE_BACKUP> = 1"
6242 #: ../fish/guestfish-actions.pod:260 ../src/guestfs-actions.pod:399
6243 msgid "Keep the original file with a C<.augsave> extension."
6247 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:401
6248 msgid "C<AUG_SAVE_NEWFILE> = 2"
6252 #: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:403
6254 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6255 "original. Overrides C<AUG_SAVE_BACKUP>."
6259 #: ../fish/guestfish-actions.pod:267 ../src/guestfs-actions.pod:406
6260 msgid "C<AUG_TYPE_CHECK> = 4"
6264 #: ../fish/guestfish-actions.pod:269 ../src/guestfs-actions.pod:408
6265 msgid "Typecheck lenses."
6269 #: ../fish/guestfish-actions.pod:271
6271 "This option is only useful when debugging Augeas lenses. Use of this option "
6272 "may require additional memory for the libguestfs appliance. You may need to "
6273 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6277 #: ../fish/guestfish-actions.pod:276 ../src/guestfs-actions.pod:415
6278 msgid "C<AUG_NO_STDINC> = 8"
6282 #: ../fish/guestfish-actions.pod:278 ../src/guestfs-actions.pod:417
6283 msgid "Do not use standard load path for modules."
6287 #: ../fish/guestfish-actions.pod:280 ../src/guestfs-actions.pod:419
6288 msgid "C<AUG_SAVE_NOOP> = 16"
6292 #: ../fish/guestfish-actions.pod:282 ../src/guestfs-actions.pod:421
6293 msgid "Make save a no-op, just record what would have been changed."
6297 #: ../fish/guestfish-actions.pod:284 ../src/guestfs-actions.pod:423
6298 msgid "C<AUG_NO_LOAD> = 32"
6302 #: ../fish/guestfish-actions.pod:286
6303 msgid "Do not load the tree in L</aug-init>."
6307 #: ../fish/guestfish-actions.pod:290
6308 msgid "To close the handle, you can call L</aug-close>."
6312 #: ../fish/guestfish-actions.pod:292 ../src/guestfs-actions.pod:431
6313 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6317 #: ../fish/guestfish-actions.pod:294
6322 #: ../fish/guestfish-actions.pod:296
6325 " aug-insert augpath label true|false\n"
6330 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:445
6332 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6333 "or after C<path> (depending on the boolean flag C<before>)."
6337 #: ../fish/guestfish-actions.pod:302 ../src/guestfs-actions.pod:449
6339 "C<path> must match exactly one existing node in the tree, and C<label> must "
6340 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6344 #: ../fish/guestfish-actions.pod:306
6349 #: ../fish/guestfish-actions.pod:308
6357 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:462
6358 msgid "Load files into the tree."
6362 #: ../fish/guestfish-actions.pod:312 ../src/guestfs-actions.pod:464
6363 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6367 #: ../fish/guestfish-actions.pod:315
6372 #: ../fish/guestfish-actions.pod:317
6380 #: ../fish/guestfish-actions.pod:319
6382 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6383 "resulting nodes into alphabetical order."
6387 #: ../fish/guestfish-actions.pod:322
6392 #: ../fish/guestfish-actions.pod:324
6395 " aug-match augpath\n"
6400 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:492
6402 "Returns a list of paths which match the path expression C<path>. The "
6403 "returned paths are sufficiently qualified so that they match exactly one "
6404 "node in the current tree."
6408 #: ../fish/guestfish-actions.pod:330
6413 #: ../fish/guestfish-actions.pod:332
6416 " aug-mv src dest\n"
6421 #: ../fish/guestfish-actions.pod:334 ../src/guestfs-actions.pod:509
6423 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6424 "C<dest> is overwritten if it exists."
6428 #: ../fish/guestfish-actions.pod:337
6433 #: ../fish/guestfish-actions.pod:339
6441 #: ../fish/guestfish-actions.pod:341 ../src/guestfs-actions.pod:522
6442 msgid "Remove C<path> and all of its children."
6446 #: ../fish/guestfish-actions.pod:343 ../src/guestfs-actions.pod:524
6447 msgid "On success this returns the number of entries which were removed."
6451 #: ../fish/guestfish-actions.pod:345
6456 #: ../fish/guestfish-actions.pod:347
6464 #: ../fish/guestfish-actions.pod:349 ../src/guestfs-actions.pod:535
6465 msgid "This writes all pending changes to disk."
6469 #: ../fish/guestfish-actions.pod:351
6471 "The flags which were passed to L</aug-init> affect exactly how files are "
6476 #: ../fish/guestfish-actions.pod:354
6481 #: ../fish/guestfish-actions.pod:356
6484 " aug-set augpath val\n"
6489 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:551
6490 msgid "Set the value associated with C<path> to C<val>."
6494 #: ../fish/guestfish-actions.pod:360
6496 "In the Augeas API, it is possible to clear a node by setting the value to "
6497 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6498 "this call. Instead you must use the L</aug-clear> call."
6502 #: ../fish/guestfish-actions.pod:365
6507 #: ../fish/guestfish-actions.pod:367
6510 " available 'groups ...'\n"
6515 #: ../fish/guestfish-actions.pod:369 ../src/guestfs-actions.pod:568
6517 "This command is used to check the availability of some groups of "
6518 "functionality in the appliance, which not all builds of the libguestfs "
6519 "appliance will be able to provide."
6523 #: ../fish/guestfish-actions.pod:373
6525 "The libguestfs groups, and the functions that those groups correspond to, "
6526 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6527 "runtime by calling L</available-all-groups>."
6531 #: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:577
6533 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
6534 "\"]> would check for the availability of the Linux inotify functions and "
6535 "Augeas (configuration file editing) functions."
6539 #: ../fish/guestfish-actions.pod:383 ../src/guestfs-actions.pod:582
6540 msgid "The command returns no error if I<all> requested groups are available."
6544 #: ../fish/guestfish-actions.pod:385 ../src/guestfs-actions.pod:584
6546 "It fails with an error if one or more of the requested groups is unavailable "
6551 #: ../fish/guestfish-actions.pod:388 ../src/guestfs-actions.pod:587
6553 "If an unknown group name is included in the list of groups then an error is "
6558 #: ../fish/guestfish-actions.pod:391 ../src/guestfs-actions.pod:590
6563 #: ../fish/guestfish-actions.pod:397
6564 msgid "You must call L</launch> before calling this function."
6568 #: ../fish/guestfish-actions.pod:399 ../src/guestfs-actions.pod:598
6570 "The reason is because we don't know what groups are supported by the "
6571 "appliance/daemon until it is running and can be queried."
6575 #: ../fish/guestfish-actions.pod:405 ../src/guestfs-actions.pod:604
6577 "If a group of functions is available, this does not necessarily mean that "
6578 "they will work. You still have to check for errors when calling individual "
6579 "API functions even if they are available."
6583 #: ../fish/guestfish-actions.pod:412 ../src/guestfs-actions.pod:611
6585 "It is usually the job of distro packagers to build complete functionality "
6586 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6587 "with all requirements satisfied, will support everything."
6591 #: ../fish/guestfish-actions.pod:419
6593 "This call was added in version C<1.0.80>. In previous versions of "
6594 "libguestfs all you could do would be to speculatively execute a command to "
6595 "find out if the daemon implemented it. See also L</version>."
6599 #: ../fish/guestfish-actions.pod:426
6600 msgid "available-all-groups"
6604 #: ../fish/guestfish-actions.pod:428
6607 " available-all-groups\n"
6612 #: ../fish/guestfish-actions.pod:430
6614 "This command returns a list of all optional groups that this daemon knows "
6615 "about. Note this returns both supported and unsupported groups. To find "
6616 "out which ones the daemon can actually support you have to call L</"
6617 "available> on each member of the returned list."
6621 #: ../fish/guestfish-actions.pod:436
6622 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6626 #: ../fish/guestfish-actions.pod:438
6631 #: ../fish/guestfish-actions.pod:440
6634 " base64-in (base64file|-) filename\n"
6639 #: ../fish/guestfish-actions.pod:442 ../src/guestfs-actions.pod:655
6641 "This command uploads base64-encoded data from C<base64file> to C<filename>."
6645 #: ../fish/guestfish-actions.pod:445 ../fish/guestfish-actions.pod:454
6646 #: ../fish/guestfish-actions.pod:703 ../fish/guestfish-actions.pod:787
6647 #: ../fish/guestfish-actions.pod:808 ../fish/guestfish-actions.pod:907
6648 #: ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:1300
6649 #: ../fish/guestfish-actions.pod:4750 ../fish/guestfish-actions.pod:4762
6650 #: ../fish/guestfish-actions.pod:4773 ../fish/guestfish-actions.pod:4784
6651 #: ../fish/guestfish-actions.pod:4836 ../fish/guestfish-actions.pod:4845
6652 #: ../fish/guestfish-actions.pod:4899 ../fish/guestfish-actions.pod:4922
6653 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6657 #: ../fish/guestfish-actions.pod:447
6662 #: ../fish/guestfish-actions.pod:449
6665 " base64-out filename (base64file|-)\n"
6670 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:669
6672 "This command downloads the contents of C<filename>, writing it out to local "
6673 "file C<base64file> encoded as base64."
6677 #: ../fish/guestfish-actions.pod:456
6678 msgid "blockdev-flushbufs"
6682 #: ../fish/guestfish-actions.pod:458
6685 " blockdev-flushbufs device\n"
6690 #: ../fish/guestfish-actions.pod:460 ../src/guestfs-actions.pod:682
6692 "This tells the kernel to flush internal buffers associated with C<device>."
6696 #: ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:474
6697 #: ../fish/guestfish-actions.pod:483 ../fish/guestfish-actions.pod:493
6698 #: ../fish/guestfish-actions.pod:505 ../fish/guestfish-actions.pod:518
6699 #: ../fish/guestfish-actions.pod:526 ../fish/guestfish-actions.pod:537
6700 #: ../fish/guestfish-actions.pod:545 ../fish/guestfish-actions.pod:553
6701 #: ../src/guestfs-actions.pod:685 ../src/guestfs-actions.pod:702
6702 #: ../src/guestfs-actions.pod:717 ../src/guestfs-actions.pod:733
6703 #: ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:770
6704 #: ../src/guestfs-actions.pod:784 ../src/guestfs-actions.pod:802
6705 #: ../src/guestfs-actions.pod:816 ../src/guestfs-actions.pod:830
6706 msgid "This uses the L<blockdev(8)> command."
6710 #: ../fish/guestfish-actions.pod:465
6711 msgid "blockdev-getbsz"
6715 #: ../fish/guestfish-actions.pod:467
6718 " blockdev-getbsz device\n"
6723 #: ../fish/guestfish-actions.pod:469 ../src/guestfs-actions.pod:697
6724 msgid "This returns the block size of a device."
6728 #: ../fish/guestfish-actions.pod:471 ../fish/guestfish-actions.pod:534
6729 #: ../src/guestfs-actions.pod:699 ../src/guestfs-actions.pod:799
6731 "(Note this is different from both I<size in blocks> and I<filesystem block "
6736 #: ../fish/guestfish-actions.pod:476
6737 msgid "blockdev-getro"
6741 #: ../fish/guestfish-actions.pod:478
6744 " blockdev-getro device\n"
6749 #: ../fish/guestfish-actions.pod:480 ../src/guestfs-actions.pod:714
6751 "Returns a boolean indicating if the block device is read-only (true if read-"
6752 "only, false if not)."
6756 #: ../fish/guestfish-actions.pod:485
6757 msgid "blockdev-getsize64"
6761 #: ../fish/guestfish-actions.pod:487
6764 " blockdev-getsize64 device\n"
6769 #: ../fish/guestfish-actions.pod:489 ../src/guestfs-actions.pod:729
6770 msgid "This returns the size of the device in bytes."
6774 #: ../fish/guestfish-actions.pod:491
6775 msgid "See also L</blockdev-getsz>."
6779 #: ../fish/guestfish-actions.pod:495
6780 msgid "blockdev-getss"
6784 #: ../fish/guestfish-actions.pod:497
6787 " blockdev-getss device\n"
6792 #: ../fish/guestfish-actions.pod:499 ../src/guestfs-actions.pod:745
6794 "This returns the size of sectors on a block device. Usually 512, but can be "
6795 "larger for modern devices."
6799 #: ../fish/guestfish-actions.pod:502
6801 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
6805 #: ../fish/guestfish-actions.pod:507
6806 msgid "blockdev-getsz"
6810 #: ../fish/guestfish-actions.pod:509
6813 " blockdev-getsz device\n"
6818 #: ../fish/guestfish-actions.pod:511 ../src/guestfs-actions.pod:763
6820 "This returns the size of the device in units of 512-byte sectors (even if "
6821 "the sectorsize isn't 512 bytes ... weird)."
6825 #: ../fish/guestfish-actions.pod:514
6827 "See also L</blockdev-getss> for the real sector size of the device, and L</"
6828 "blockdev-getsize64> for the more useful I<size in bytes>."
6832 #: ../fish/guestfish-actions.pod:520
6833 msgid "blockdev-rereadpt"
6837 #: ../fish/guestfish-actions.pod:522
6840 " blockdev-rereadpt device\n"
6845 #: ../fish/guestfish-actions.pod:524 ../src/guestfs-actions.pod:782
6846 msgid "Reread the partition table on C<device>."
6850 #: ../fish/guestfish-actions.pod:528
6851 msgid "blockdev-setbsz"
6855 #: ../fish/guestfish-actions.pod:530
6858 " blockdev-setbsz device blocksize\n"
6863 #: ../fish/guestfish-actions.pod:532 ../src/guestfs-actions.pod:797
6864 msgid "This sets the block size of a device."
6868 #: ../fish/guestfish-actions.pod:539
6869 msgid "blockdev-setro"
6873 #: ../fish/guestfish-actions.pod:541
6876 " blockdev-setro device\n"
6881 #: ../fish/guestfish-actions.pod:543 ../src/guestfs-actions.pod:814
6882 msgid "Sets the block device named C<device> to read-only."
6886 #: ../fish/guestfish-actions.pod:547
6887 msgid "blockdev-setrw"
6891 #: ../fish/guestfish-actions.pod:549
6894 " blockdev-setrw device\n"
6899 #: ../fish/guestfish-actions.pod:551 ../src/guestfs-actions.pod:828
6900 msgid "Sets the block device named C<device> to read-write."
6904 #: ../fish/guestfish-actions.pod:555
6905 msgid "btrfs-filesystem-resize"
6909 #: ../fish/guestfish-actions.pod:557
6912 " btrfs-filesystem-resize mountpoint [size:..]\n"
6917 #: ../fish/guestfish-actions.pod:559 ../src/guestfs-actions.pod:850
6918 msgid "This command resizes a btrfs filesystem."
6922 #: ../fish/guestfish-actions.pod:561 ../src/guestfs-actions.pod:852
6924 "Note that unlike other resize calls, the filesystem has to be mounted and "
6925 "the parameter is the mountpoint not the device (this is a requirement of "
6930 #: ../fish/guestfish-actions.pod:565 ../fish/guestfish-actions.pod:3497
6931 #: ../src/guestfs-actions.pod:856 ../src/guestfs-actions.pod:5351
6932 msgid "The optional parameters are:"
6936 #: ../fish/guestfish-actions.pod:569 ../fish/guestfish-actions.pod:3501
6937 #: ../src/guestfs-actions.pod:860 ../src/guestfs-actions.pod:5355
6942 #: ../fish/guestfish-actions.pod:571 ../src/guestfs-actions.pod:862
6944 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
6945 "resized to the maximum size."
6949 #: ../fish/guestfish-actions.pod:576 ../src/guestfs-actions.pod:867
6950 msgid "See also L<btrfs(8)>."
6954 #: ../fish/guestfish-actions.pod:580
6955 msgid "case-sensitive-path"
6959 #: ../fish/guestfish-actions.pod:582
6962 " case-sensitive-path path\n"
6967 #: ../fish/guestfish-actions.pod:584 ../src/guestfs-actions.pod:901
6969 "This can be used to resolve case insensitive paths on a filesystem which is "
6970 "case sensitive. The use case is to resolve paths which you have read from "
6971 "Windows configuration files or the Windows Registry, to the true path."
6975 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:906
6977 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
6978 "(and probably others), which is that although the underlying filesystem is "
6979 "case-insensitive, the driver exports the filesystem to Linux as case-"
6984 #: ../fish/guestfish-actions.pod:594 ../src/guestfs-actions.pod:911
6986 "One consequence of this is that special directories such as C<c:\\windows> "
6987 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
6988 "precise details of how they were created. In Windows itself this would not "
6993 #: ../fish/guestfish-actions.pod:600 ../src/guestfs-actions.pod:917
6995 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7000 #: ../fish/guestfish-actions.pod:603 ../src/guestfs-actions.pod:920
7002 "This function resolves the true case of each element in the path and returns "
7003 "the case-sensitive path."
7007 #: ../fish/guestfish-actions.pod:606
7009 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
7010 "WINDOWS/system32\"> (the exact return value would depend on details of how "
7011 "the directories were originally created under Windows)."
7015 #: ../fish/guestfish-actions.pod:611 ../src/guestfs-actions.pod:928
7016 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7020 #: ../fish/guestfish-actions.pod:614
7021 msgid "See also L</realpath>."
7025 #: ../fish/guestfish-actions.pod:616
7030 #: ../fish/guestfish-actions.pod:618
7038 #: ../fish/guestfish-actions.pod:620 ../fish/guestfish-actions.pod:3917
7039 #: ../src/guestfs-actions.pod:944 ../src/guestfs-actions.pod:5994
7040 msgid "Return the contents of the file named C<path>."
7044 #: ../fish/guestfish-actions.pod:622
7046 "Note that this function cannot correctly handle binary files (specifically, "
7047 "files containing C<\\0> character which is treated as end of string). For "
7048 "those you need to use the L</read-file> or L</download> functions which have "
7049 "a more complex interface."
7053 #: ../fish/guestfish-actions.pod:627 ../fish/guestfish-actions.pod:762
7054 #: ../fish/guestfish-actions.pod:774 ../fish/guestfish-actions.pod:985
7055 #: ../fish/guestfish-actions.pod:995 ../fish/guestfish-actions.pod:1062
7056 #: ../fish/guestfish-actions.pod:1072 ../fish/guestfish-actions.pod:1264
7057 #: ../fish/guestfish-actions.pod:1577 ../fish/guestfish-actions.pod:1587
7058 #: ../fish/guestfish-actions.pod:1637 ../fish/guestfish-actions.pod:1652
7059 #: ../fish/guestfish-actions.pod:1662 ../fish/guestfish-actions.pod:1681
7060 #: ../fish/guestfish-actions.pod:3787 ../fish/guestfish-actions.pod:3802
7061 #: ../fish/guestfish-actions.pod:3878 ../fish/guestfish-actions.pod:3895
7062 #: ../fish/guestfish-actions.pod:3910 ../fish/guestfish-actions.pod:4591
7063 #: ../fish/guestfish-actions.pod:4637 ../fish/guestfish-actions.pod:4722
7064 #: ../fish/guestfish-actions.pod:4737 ../fish/guestfish-actions.pod:5143
7065 #: ../fish/guestfish-actions.pod:5155 ../fish/guestfish-actions.pod:5173
7066 #: ../fish/guestfish-actions.pod:5190 ../fish/guestfish-actions.pod:5200
7067 #: ../fish/guestfish-actions.pod:5257 ../fish/guestfish-actions.pod:5267
7068 #: ../fish/guestfish-actions.pod:5296 ../fish/guestfish-actions.pod:5306
7069 #: ../src/guestfs-actions.pod:954 ../src/guestfs-actions.pod:1133
7070 #: ../src/guestfs-actions.pod:1153 ../src/guestfs-actions.pod:1560
7071 #: ../src/guestfs-actions.pod:1579 ../src/guestfs-actions.pod:1682
7072 #: ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1947
7073 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2448
7074 #: ../src/guestfs-actions.pod:2513 ../src/guestfs-actions.pod:2537
7075 #: ../src/guestfs-actions.pod:2554 ../src/guestfs-actions.pod:2583
7076 #: ../src/guestfs-actions.pod:5776 ../src/guestfs-actions.pod:5802
7077 #: ../src/guestfs-actions.pod:5933 ../src/guestfs-actions.pod:5959
7078 #: ../src/guestfs-actions.pod:5983 ../src/guestfs-actions.pod:6950
7079 #: ../src/guestfs-actions.pod:7005 ../src/guestfs-actions.pod:7151
7080 #: ../src/guestfs-actions.pod:7175 ../src/guestfs-actions.pod:7840
7081 #: ../src/guestfs-actions.pod:7860 ../src/guestfs-actions.pod:7893
7082 #: ../src/guestfs-actions.pod:7912 ../src/guestfs-actions.pod:7931
7083 #: ../src/guestfs-actions.pod:8025 ../src/guestfs-actions.pod:8044
7084 #: ../src/guestfs-actions.pod:8090 ../src/guestfs-actions.pod:8109
7086 "Because of the message protocol, there is a transfer limit of somewhere "
7087 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7091 #: ../fish/guestfish-actions.pod:630
7096 #: ../fish/guestfish-actions.pod:632
7099 " checksum csumtype path\n"
7104 #: ../fish/guestfish-actions.pod:634 ../src/guestfs-actions.pod:966
7106 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7110 #: ../fish/guestfish-actions.pod:637 ../src/guestfs-actions.pod:969
7112 "The type of checksum to compute is given by the C<csumtype> parameter which "
7113 "must have one of the following values:"
7117 #: ../fish/guestfish-actions.pod:642 ../src/guestfs-actions.pod:974
7122 #: ../fish/guestfish-actions.pod:644 ../src/guestfs-actions.pod:976
7124 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7129 #: ../fish/guestfish-actions.pod:647 ../src/guestfs-actions.pod:979
7134 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:981
7135 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7139 #: ../fish/guestfish-actions.pod:651 ../src/guestfs-actions.pod:983
7144 #: ../fish/guestfish-actions.pod:653 ../src/guestfs-actions.pod:985
7145 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7149 #: ../fish/guestfish-actions.pod:655 ../src/guestfs-actions.pod:987
7154 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:989
7155 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7159 #: ../fish/guestfish-actions.pod:659 ../src/guestfs-actions.pod:991
7164 #: ../fish/guestfish-actions.pod:661 ../src/guestfs-actions.pod:993
7165 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7169 #: ../fish/guestfish-actions.pod:663 ../src/guestfs-actions.pod:995
7174 #: ../fish/guestfish-actions.pod:665 ../src/guestfs-actions.pod:997
7175 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7179 #: ../fish/guestfish-actions.pod:667 ../src/guestfs-actions.pod:999
7184 #: ../fish/guestfish-actions.pod:669 ../src/guestfs-actions.pod:1001
7185 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7189 #: ../fish/guestfish-actions.pod:673 ../src/guestfs-actions.pod:1005
7190 msgid "The checksum is returned as a printable string."
7194 #: ../fish/guestfish-actions.pod:675
7195 msgid "To get the checksum for a device, use L</checksum-device>."
7199 #: ../fish/guestfish-actions.pod:677
7200 msgid "To get the checksums for many files, use L</checksums-out>."
7204 #: ../fish/guestfish-actions.pod:679
7205 msgid "checksum-device"
7209 #: ../fish/guestfish-actions.pod:681
7212 " checksum-device csumtype device\n"
7217 #: ../fish/guestfish-actions.pod:683
7219 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7220 "device named C<device>. For the types of checksums supported see the L</"
7221 "checksum> command."
7225 #: ../fish/guestfish-actions.pod:687
7226 msgid "checksums-out"
7230 #: ../fish/guestfish-actions.pod:689
7233 " checksums-out csumtype directory (sumsfile|-)\n"
7238 #: ../fish/guestfish-actions.pod:691 ../src/guestfs-actions.pod:1040
7240 "This command computes the checksums of all regular files in C<directory> and "
7241 "then emits a list of those checksums to the local output file C<sumsfile>."
7245 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1044
7247 "This can be used for verifying the integrity of a virtual machine. However "
7248 "to be properly secure you should pay attention to the output of the checksum "
7249 "command (it uses the ones from GNU coreutils). In particular when the "
7250 "filename is not printable, coreutils uses a special backslash syntax. For "
7251 "more information, see the GNU coreutils info file."
7255 #: ../fish/guestfish-actions.pod:705
7260 #: ../fish/guestfish-actions.pod:707
7263 " chmod mode path\n"
7268 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1063
7270 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7275 #: ../fish/guestfish-actions.pod:712 ../src/guestfs-actions.pod:1066
7277 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7278 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7283 #: ../fish/guestfish-actions.pod:716 ../fish/guestfish-actions.pod:3150
7284 #: ../fish/guestfish-actions.pod:3289 ../fish/guestfish-actions.pod:3299
7285 #: ../fish/guestfish-actions.pod:3309 ../src/guestfs-actions.pod:1070
7286 #: ../src/guestfs-actions.pod:4758 ../src/guestfs-actions.pod:4967
7287 #: ../src/guestfs-actions.pod:4986 ../src/guestfs-actions.pod:5005
7288 msgid "The mode actually set is affected by the umask."
7292 #: ../fish/guestfish-actions.pod:718
7297 #: ../fish/guestfish-actions.pod:720
7300 " chown owner group path\n"
7305 #: ../fish/guestfish-actions.pod:722 ../src/guestfs-actions.pod:1084
7306 msgid "Change the file owner to C<owner> and group to C<group>."
7310 #: ../fish/guestfish-actions.pod:724 ../fish/guestfish-actions.pod:2585
7311 #: ../src/guestfs-actions.pod:1086 ../src/guestfs-actions.pod:3829
7313 "Only numeric uid and gid are supported. If you want to use names, you will "
7314 "need to locate and parse the password file yourself (Augeas support makes "
7315 "this relatively easy)."
7319 #: ../fish/guestfish-actions.pod:728
7324 #: ../fish/guestfish-actions.pod:730
7327 " command 'arguments ...'\n"
7332 #: ../fish/guestfish-actions.pod:732 ../src/guestfs-actions.pod:1100
7334 "This call runs a command from the guest filesystem. The filesystem must be "
7335 "mounted, and must contain a compatible operating system (ie. something "
7336 "Linux, with the same or compatible processor architecture)."
7340 #: ../fish/guestfish-actions.pod:737
7342 "The single parameter is an argv-style list of arguments. The first element "
7343 "is the name of the program to run. Subsequent elements are parameters. The "
7344 "list must be non-empty (ie. must contain a program name). Note that the "
7345 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7349 #: ../fish/guestfish-actions.pod:744 ../src/guestfs-actions.pod:1112
7350 msgid "The return value is anything printed to I<stdout> by the command."
7354 #: ../fish/guestfish-actions.pod:747 ../src/guestfs-actions.pod:1115
7356 "If the command returns a non-zero exit status, then this function returns an "
7357 "error message. The error message string is the content of I<stderr> from "
7362 #: ../fish/guestfish-actions.pod:751 ../src/guestfs-actions.pod:1119
7364 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7365 "bin>. If you require a program from another location, you should provide "
7366 "the full path in the first parameter."
7370 #: ../fish/guestfish-actions.pod:756 ../src/guestfs-actions.pod:1124
7372 "Shared libraries and data files required by the program must be available on "
7373 "filesystems which are mounted in the correct places. It is the caller's "
7374 "responsibility to ensure all filesystems that are needed are mounted at the "
7379 #: ../fish/guestfish-actions.pod:765
7380 msgid "command-lines"
7384 #: ../fish/guestfish-actions.pod:767
7387 " command-lines 'arguments ...'\n"
7392 #: ../fish/guestfish-actions.pod:769
7394 "This is the same as L</command>, but splits the result into a list of lines."
7398 #: ../fish/guestfish-actions.pod:772
7399 msgid "See also: L</sh-lines>"
7403 #: ../fish/guestfish-actions.pod:777
7404 msgid "compress-device-out"
7408 #: ../fish/guestfish-actions.pod:779
7411 " compress-device-out ctype device (zdevice|-) [level:..]\n"
7416 #: ../fish/guestfish-actions.pod:781 ../src/guestfs-actions.pod:1174
7418 "This command compresses C<device> and writes it out to the local file "
7423 #: ../fish/guestfish-actions.pod:784
7425 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
7430 #: ../fish/guestfish-actions.pod:791
7431 msgid "compress-out"
7435 #: ../fish/guestfish-actions.pod:793
7438 " compress-out ctype file (zfile|-) [level:..]\n"
7443 #: ../fish/guestfish-actions.pod:795 ../src/guestfs-actions.pod:1226
7445 "This command compresses C<file> and writes it out to the local file C<zfile>."
7449 #: ../fish/guestfish-actions.pod:798 ../src/guestfs-actions.pod:1229
7451 "The compression program used is controlled by the C<ctype> parameter. "
7452 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7453 "Some compression types may not be supported by particular builds of "
7454 "libguestfs, in which case you will get an error containing the substring "
7455 "\"not supported\"."
7459 #: ../fish/guestfish-actions.pod:804 ../src/guestfs-actions.pod:1235
7461 "The optional C<level> parameter controls compression level. The meaning and "
7462 "default for this parameter depends on the compression program being used."
7466 #: ../fish/guestfish-actions.pod:812
7471 #: ../fish/guestfish-actions.pod:814
7474 " config qemuparam qemuvalue\n"
7479 #: ../fish/guestfish-actions.pod:816 ../src/guestfs-actions.pod:1276
7481 "This can be used to add arbitrary qemu command line parameters of the form "
7482 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7483 "setting some parameters which would interfere with parameters that we use."
7487 #: ../fish/guestfish-actions.pod:821 ../src/guestfs-actions.pod:1281
7488 msgid "The first character of C<param> string must be a C<-> (dash)."
7492 #: ../fish/guestfish-actions.pod:823 ../src/guestfs-actions.pod:1283
7493 msgid "C<value> can be NULL."
7497 #: ../fish/guestfish-actions.pod:825
7502 #: ../fish/guestfish-actions.pod:827
7505 " copy-size src dest size\n"
7510 #: ../fish/guestfish-actions.pod:829 ../src/guestfs-actions.pod:1297
7512 "This command copies exactly C<size> bytes from one source device or file "
7513 "C<src> to another destination device or file C<dest>."
7517 #: ../fish/guestfish-actions.pod:832 ../src/guestfs-actions.pod:1300
7519 "Note this will fail if the source is too short or if the destination is not "
7524 #: ../fish/guestfish-actions.pod:835
7529 #: ../fish/guestfish-actions.pod:837
7537 #: ../fish/guestfish-actions.pod:839 ../src/guestfs-actions.pod:1319
7539 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7540 "destination filename or destination directory."
7544 #: ../fish/guestfish-actions.pod:842
7549 #: ../fish/guestfish-actions.pod:844
7557 #: ../fish/guestfish-actions.pod:846 ../src/guestfs-actions.pod:1333
7559 "This copies a file or directory from C<src> to C<dest> recursively using the "
7564 #: ../fish/guestfish-actions.pod:849
7569 #: ../fish/guestfish-actions.pod:851
7577 #: ../fish/guestfish-actions.pod:853 ../src/guestfs-actions.pod:1347
7579 "This command copies from one source device or file C<src> to another "
7580 "destination device or file C<dest>. Normally you would use this to copy to "
7581 "or from a device or partition, for example to duplicate a filesystem."
7585 #: ../fish/guestfish-actions.pod:858
7587 "If the destination is a device, it must be as large or larger than the "
7588 "source file or device, otherwise the copy will fail. This command cannot do "
7589 "partial copies (see L</copy-size>)."
7593 #: ../fish/guestfish-actions.pod:862
7598 #: ../fish/guestfish-actions.pod:864
7606 #: ../fish/guestfish-actions.pod:866 ../src/guestfs-actions.pod:1365
7607 msgid "This command runs the C<df> command to report disk space used."
7611 #: ../fish/guestfish-actions.pod:868 ../fish/guestfish-actions.pod:879
7613 "This command is mostly useful for interactive sessions. It is I<not> "
7614 "intended that you try to parse the output string. Use L</statvfs> from "
7619 #: ../fish/guestfish-actions.pod:872
7624 #: ../fish/guestfish-actions.pod:874
7632 #: ../fish/guestfish-actions.pod:876 ../src/guestfs-actions.pod:1381
7634 "This command runs the C<df -h> command to report disk space used in human-"
7639 #: ../fish/guestfish-actions.pod:883
7644 #: ../fish/guestfish-actions.pod:885
7652 #: ../fish/guestfish-actions.pod:887 ../src/guestfs-actions.pod:1398
7654 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7655 "This is sometimes useful for extended debugging of problems."
7659 #: ../fish/guestfish-actions.pod:891
7661 "Another way to get the same information is to enable verbose messages with "
7662 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7663 "before running the program."
7667 #: ../fish/guestfish-actions.pod:896
7672 #: ../fish/guestfish-actions.pod:898
7675 " download remotefilename (filename|-)\n"
7680 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:913
7681 #: ../src/guestfs-actions.pod:1419 ../src/guestfs-actions.pod:1444
7683 "Download file C<remotefilename> and save it as C<filename> on the local "
7688 #: ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:4895
7689 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:7410
7690 msgid "C<filename> can also be a named pipe."
7694 #: ../fish/guestfish-actions.pod:905
7695 msgid "See also L</upload>, L</cat>."
7699 #: ../fish/guestfish-actions.pod:909
7700 msgid "download-offset"
7704 #: ../fish/guestfish-actions.pod:911
7707 " download-offset remotefilename (filename|-) offset size\n"
7712 #: ../fish/guestfish-actions.pod:916 ../src/guestfs-actions.pod:1447
7714 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7715 "region must be within the file or device)."
7719 #: ../fish/guestfish-actions.pod:919
7721 "Note that there is no limit on the amount of data that can be downloaded "
7722 "with this call, unlike with L</pread>, and this call always reads the full "
7723 "amount unless an error occurs."
7727 #: ../fish/guestfish-actions.pod:924
7728 msgid "See also L</download>, L</pread>."
7732 #: ../fish/guestfish-actions.pod:928
7737 #: ../fish/guestfish-actions.pod:930
7740 " drop-caches whattodrop\n"
7745 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1472
7747 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7748 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7749 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7753 #: ../fish/guestfish-actions.pod:937 ../src/guestfs-actions.pod:1477
7754 msgid "Setting C<whattodrop> to 3 should drop everything."
7758 #: ../fish/guestfish-actions.pod:939 ../src/guestfs-actions.pod:1479
7760 "This automatically calls L<sync(2)> before the operation, so that the "
7761 "maximum guest memory is freed."
7765 #: ../fish/guestfish-actions.pod:942
7770 #: ../fish/guestfish-actions.pod:944
7778 #: ../fish/guestfish-actions.pod:946 ../src/guestfs-actions.pod:1492
7780 "This command runs the C<du -s> command to estimate file space usage for "
7785 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1495
7787 "C<path> can be a file or a directory. If C<path> is a directory then the "
7788 "estimate includes the contents of the directory and all subdirectories "
7793 #: ../fish/guestfish-actions.pod:953 ../src/guestfs-actions.pod:1499
7795 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
7799 #: ../fish/guestfish-actions.pod:956
7804 #: ../fish/guestfish-actions.pod:958
7807 " e2fsck-f device\n"
7812 #: ../fish/guestfish-actions.pod:960 ../src/guestfs-actions.pod:1517
7814 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
7815 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
7820 #: ../fish/guestfish-actions.pod:964
7822 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
7823 "should use L</fsck>."
7827 #: ../fish/guestfish-actions.pod:967
7832 #: ../fish/guestfish-actions.pod:969
7835 " echo-daemon 'words ...'\n"
7840 #: ../fish/guestfish-actions.pod:971 ../src/guestfs-actions.pod:1534
7842 "This command concatenates the list of C<words> passed with single spaces "
7843 "between them and returns the resulting string."
7847 #: ../fish/guestfish-actions.pod:974 ../src/guestfs-actions.pod:1537
7848 msgid "You can use this command to test the connection through to the daemon."
7852 #: ../fish/guestfish-actions.pod:976
7853 msgid "See also L</ping-daemon>."
7857 #: ../fish/guestfish-actions.pod:978
7862 #: ../fish/guestfish-actions.pod:980
7865 " egrep regex path\n"
7870 #: ../fish/guestfish-actions.pod:982 ../src/guestfs-actions.pod:1553
7872 "This calls the external C<egrep> program and returns the matching lines."
7876 #: ../fish/guestfish-actions.pod:988
7881 #: ../fish/guestfish-actions.pod:990
7884 " egrepi regex path\n"
7889 #: ../fish/guestfish-actions.pod:992 ../src/guestfs-actions.pod:1572
7891 "This calls the external C<egrep -i> program and returns the matching lines."
7895 #: ../fish/guestfish-actions.pod:998
7900 #: ../fish/guestfish-actions.pod:1000
7903 " equal file1 file2\n"
7908 #: ../fish/guestfish-actions.pod:1002 ../src/guestfs-actions.pod:1591
7910 "This compares the two files C<file1> and C<file2> and returns true if their "
7911 "content is exactly equal, or false otherwise."
7915 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1594
7916 msgid "The external L<cmp(1)> program is used for the comparison."
7920 #: ../fish/guestfish-actions.pod:1007
7925 #: ../fish/guestfish-actions.pod:1009
7933 #: ../fish/guestfish-actions.pod:1011 ../src/guestfs-actions.pod:1606
7935 "This returns C<true> if and only if there is a file, directory (or anything) "
7936 "with the given C<path> name."
7940 #: ../fish/guestfish-actions.pod:1014
7941 msgid "See also L</is-file>, L</is-dir>, L</stat>."
7945 #: ../fish/guestfish-actions.pod:1016
7950 #: ../fish/guestfish-actions.pod:1018
7953 " fallocate path len\n"
7958 #: ../fish/guestfish-actions.pod:1020 ../fish/guestfish-actions.pod:1039
7959 #: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1648
7961 "This command preallocates a file (containing zero bytes) named C<path> of "
7962 "size C<len> bytes. If the file exists already, it is overwritten."
7966 #: ../fish/guestfish-actions.pod:1024 ../src/guestfs-actions.pod:1633
7968 "Do not confuse this with the guestfish-specific C<alloc> command which "
7969 "allocates a file in the host and attaches it as a device."
7973 #: ../fish/guestfish-actions.pod:1028
7975 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
7980 #: ../fish/guestfish-actions.pod:1035
7985 #: ../fish/guestfish-actions.pod:1037
7988 " fallocate64 path len\n"
7993 #: ../fish/guestfish-actions.pod:1043
7995 "Note that this call allocates disk blocks for the file. To create a sparse "
7996 "file use L</truncate-size> instead."
8000 #: ../fish/guestfish-actions.pod:1046
8002 "The deprecated call L</fallocate> does the same, but owing to an oversight "
8003 "it only allowed 30 bit lengths to be specified, effectively limiting the "
8004 "maximum size of files created through that call to 1GB."
8008 #: ../fish/guestfish-actions.pod:1051 ../src/guestfs-actions.pod:1660
8010 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8011 "commands which create a file in the host and attach it as a device."
8015 #: ../fish/guestfish-actions.pod:1055
8020 #: ../fish/guestfish-actions.pod:1057
8023 " fgrep pattern path\n"
8028 #: ../fish/guestfish-actions.pod:1059 ../src/guestfs-actions.pod:1675
8030 "This calls the external C<fgrep> program and returns the matching lines."
8034 #: ../fish/guestfish-actions.pod:1065
8039 #: ../fish/guestfish-actions.pod:1067
8042 " fgrepi pattern path\n"
8047 #: ../fish/guestfish-actions.pod:1069 ../src/guestfs-actions.pod:1694
8049 "This calls the external C<fgrep -i> program and returns the matching lines."
8053 #: ../fish/guestfish-actions.pod:1075
8058 #: ../fish/guestfish-actions.pod:1077
8066 #: ../fish/guestfish-actions.pod:1079 ../src/guestfs-actions.pod:1712
8068 "This call uses the standard L<file(1)> command to determine the type or "
8069 "contents of the file."
8073 #: ../fish/guestfish-actions.pod:1082 ../src/guestfs-actions.pod:1715
8075 "This call will also transparently look inside various types of compressed "
8080 #: ../fish/guestfish-actions.pod:1085 ../src/guestfs-actions.pod:1718
8082 "The exact command which runs is C<file -zb path>. Note in particular that "
8083 "the filename is not prepended to the output (the I<-b> option)."
8087 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1722
8089 "The output depends on the output of the underlying L<file(1)> command and it "
8090 "can change in future in ways beyond our control. In other words, the output "
8091 "is not guaranteed by the ABI."
8095 #: ../fish/guestfish-actions.pod:1093
8097 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8098 "(etc), L</is-zero>."
8102 #: ../fish/guestfish-actions.pod:1096
8103 msgid "file-architecture"
8107 #: ../fish/guestfish-actions.pod:1098
8110 " file-architecture filename\n"
8115 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1740
8117 "This detects the architecture of the binary C<filename>, and returns it if "
8122 #: ../fish/guestfish-actions.pod:1103 ../src/guestfs-actions.pod:1743
8123 msgid "Currently defined architectures are:"
8127 #: ../fish/guestfish-actions.pod:1107 ../src/guestfs-actions.pod:1747
8132 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1749
8134 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8135 "irrespective of the precise processor requirements of the binary."
8139 #: ../fish/guestfish-actions.pod:1112 ../src/guestfs-actions.pod:1752
8144 #: ../fish/guestfish-actions.pod:1114 ../src/guestfs-actions.pod:1754
8145 msgid "64 bit x86-64."
8149 #: ../fish/guestfish-actions.pod:1116 ../src/guestfs-actions.pod:1756
8154 #: ../fish/guestfish-actions.pod:1118 ../src/guestfs-actions.pod:1758
8155 msgid "32 bit SPARC."
8159 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1760
8164 #: ../fish/guestfish-actions.pod:1122 ../src/guestfs-actions.pod:1762
8165 msgid "64 bit SPARC V9 and above."
8169 #: ../fish/guestfish-actions.pod:1124 ../src/guestfs-actions.pod:1764
8174 #: ../fish/guestfish-actions.pod:1126 ../src/guestfs-actions.pod:1766
8175 msgid "Intel Itanium."
8179 #: ../fish/guestfish-actions.pod:1128 ../src/guestfs-actions.pod:1768
8184 #: ../fish/guestfish-actions.pod:1130 ../src/guestfs-actions.pod:1770
8185 msgid "32 bit Power PC."
8189 #: ../fish/guestfish-actions.pod:1132 ../src/guestfs-actions.pod:1772
8194 #: ../fish/guestfish-actions.pod:1134 ../src/guestfs-actions.pod:1774
8195 msgid "64 bit Power PC."
8199 #: ../fish/guestfish-actions.pod:1138 ../src/guestfs-actions.pod:1778
8200 msgid "Libguestfs may return other architecture strings in future."
8204 #: ../fish/guestfish-actions.pod:1140 ../src/guestfs-actions.pod:1780
8205 msgid "The function works on at least the following types of files:"
8209 #: ../fish/guestfish-actions.pod:1146 ../src/guestfs-actions.pod:1786
8210 msgid "many types of Un*x and Linux binary"
8214 #: ../fish/guestfish-actions.pod:1150 ../src/guestfs-actions.pod:1790
8215 msgid "many types of Un*x and Linux shared library"
8219 #: ../fish/guestfish-actions.pod:1154 ../src/guestfs-actions.pod:1794
8220 msgid "Windows Win32 and Win64 binaries"
8224 #: ../fish/guestfish-actions.pod:1158 ../src/guestfs-actions.pod:1798
8225 msgid "Windows Win32 and Win64 DLLs"
8229 #: ../fish/guestfish-actions.pod:1160 ../src/guestfs-actions.pod:1800
8230 msgid "Win32 binaries and DLLs return C<i386>."
8234 #: ../fish/guestfish-actions.pod:1162 ../src/guestfs-actions.pod:1802
8235 msgid "Win64 binaries and DLLs return C<x86_64>."
8239 #: ../fish/guestfish-actions.pod:1166 ../src/guestfs-actions.pod:1806
8240 msgid "Linux kernel modules"
8244 #: ../fish/guestfish-actions.pod:1170 ../src/guestfs-actions.pod:1810
8245 msgid "Linux new-style initrd images"
8249 #: ../fish/guestfish-actions.pod:1174 ../src/guestfs-actions.pod:1814
8250 msgid "some non-x86 Linux vmlinuz kernels"
8254 #: ../fish/guestfish-actions.pod:1178 ../src/guestfs-actions.pod:1818
8255 msgid "What it can't do currently:"
8259 #: ../fish/guestfish-actions.pod:1184 ../src/guestfs-actions.pod:1824
8260 msgid "static libraries (libfoo.a)"
8264 #: ../fish/guestfish-actions.pod:1188 ../src/guestfs-actions.pod:1828
8265 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8269 #: ../fish/guestfish-actions.pod:1192 ../src/guestfs-actions.pod:1832
8270 msgid "x86 Linux vmlinuz kernels"
8274 #: ../fish/guestfish-actions.pod:1194 ../src/guestfs-actions.pod:1834
8276 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8277 "compressed code, and are horribly hard to unpack. If you want to find the "
8278 "architecture of a kernel, use the architecture of the associated initrd or "
8279 "kernel module(s) instead."
8283 #: ../fish/guestfish-actions.pod:1201
8288 #: ../fish/guestfish-actions.pod:1203
8296 #: ../fish/guestfish-actions.pod:1205 ../src/guestfs-actions.pod:1852
8297 msgid "This command returns the size of C<file> in bytes."
8301 #: ../fish/guestfish-actions.pod:1207
8303 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
8304 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
8308 #: ../fish/guestfish-actions.pod:1211
8313 #: ../fish/guestfish-actions.pod:1213
8316 " fill c len path\n"
8321 #: ../fish/guestfish-actions.pod:1215 ../src/guestfs-actions.pod:1870
8323 "This command creates a new file called C<path>. The initial content of the "
8324 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
8329 #: ../fish/guestfish-actions.pod:1219
8331 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8332 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8337 #: ../fish/guestfish-actions.pod:1224
8338 msgid "fill-pattern"
8342 #: ../fish/guestfish-actions.pod:1226
8345 " fill-pattern pattern len path\n"
8350 #: ../fish/guestfish-actions.pod:1228
8352 "This function is like L</fill> except that it creates a new file of length "
8353 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8354 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8359 #: ../fish/guestfish-actions.pod:1233
8364 #: ../fish/guestfish-actions.pod:1235
8372 #: ../fish/guestfish-actions.pod:1237 ../src/guestfs-actions.pod:1916
8374 "This command lists out all files and directories, recursively, starting at "
8375 "C<directory>. It is essentially equivalent to running the shell command "
8376 "C<find directory -print> but some post-processing happens on the output, "
8381 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:1921
8383 "This returns a list of strings I<without any prefix>. Thus if the directory "
8388 #: ../fish/guestfish-actions.pod:1245 ../src/guestfs-actions.pod:1924
8398 #: ../fish/guestfish-actions.pod:1249
8399 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8403 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:1931
8414 #: ../fish/guestfish-actions.pod:1257 ../src/guestfs-actions.pod:1936
8415 msgid "If C<directory> is not a directory, then this command returns an error."
8419 #: ../fish/guestfish-actions.pod:1260 ../src/guestfs-actions.pod:1939
8420 msgid "The returned list is sorted."
8424 #: ../fish/guestfish-actions.pod:1262
8425 msgid "See also L</find0>."
8429 #: ../fish/guestfish-actions.pod:1267
8434 #: ../fish/guestfish-actions.pod:1269
8437 " find0 directory (files|-)\n"
8442 #: ../fish/guestfish-actions.pod:1271 ../src/guestfs-actions.pod:1959
8444 "This command lists out all files and directories, recursively, starting at "
8445 "C<directory>, placing the resulting list in the external file called "
8450 #: ../fish/guestfish-actions.pod:1275
8452 "This command works the same way as L</find> with the following exceptions:"
8456 #: ../fish/guestfish-actions.pod:1282 ../src/guestfs-actions.pod:1970
8457 msgid "The resulting list is written to an external file."
8461 #: ../fish/guestfish-actions.pod:1286 ../src/guestfs-actions.pod:1974
8463 "Items (filenames) in the result are separated by C<\\0> characters. See "
8464 "L<find(1)> option I<-print0>."
8468 #: ../fish/guestfish-actions.pod:1291 ../src/guestfs-actions.pod:1979
8469 msgid "This command is not limited in the number of names that it can return."
8473 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:1984
8474 msgid "The result list is not sorted."
8478 #: ../fish/guestfish-actions.pod:1302
8479 msgid "findfs-label"
8483 #: ../fish/guestfish-actions.pod:1304
8486 " findfs-label label\n"
8491 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:1998
8493 "This command searches the filesystems and returns the one which has the "
8494 "given label. An error is returned if no such filesystem can be found."
8498 #: ../fish/guestfish-actions.pod:1310
8499 msgid "To find the label of a filesystem, use L</vfs-label>."
8503 #: ../fish/guestfish-actions.pod:1312
8508 #: ../fish/guestfish-actions.pod:1314
8511 " findfs-uuid uuid\n"
8516 #: ../fish/guestfish-actions.pod:1316 ../src/guestfs-actions.pod:2015
8518 "This command searches the filesystems and returns the one which has the "
8519 "given UUID. An error is returned if no such filesystem can be found."
8523 #: ../fish/guestfish-actions.pod:1320
8524 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8528 #: ../fish/guestfish-actions.pod:1322
8533 #: ../fish/guestfish-actions.pod:1324
8536 " fsck fstype device\n"
8541 #: ../fish/guestfish-actions.pod:1326 ../src/guestfs-actions.pod:2033
8543 "This runs the filesystem checker (fsck) on C<device> which should have "
8544 "filesystem type C<fstype>."
8548 #: ../fish/guestfish-actions.pod:1329 ../src/guestfs-actions.pod:2036
8550 "The returned integer is the status. See L<fsck(8)> for the list of status "
8551 "codes from C<fsck>."
8555 #: ../fish/guestfish-actions.pod:1338 ../src/guestfs-actions.pod:2045
8556 msgid "Multiple status codes can be summed together."
8560 #: ../fish/guestfish-actions.pod:1342 ../src/guestfs-actions.pod:2049
8562 "A non-zero return code can mean \"success\", for example if errors have been "
8563 "corrected on the filesystem."
8567 #: ../fish/guestfish-actions.pod:1347 ../src/guestfs-actions.pod:2054
8568 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8572 #: ../fish/guestfish-actions.pod:1352 ../src/guestfs-actions.pod:2059
8574 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8578 #: ../fish/guestfish-actions.pod:1354
8583 #: ../fish/guestfish-actions.pod:1356
8591 #: ../fish/guestfish-actions.pod:1358 ../src/guestfs-actions.pod:2070
8593 "Return the additional kernel options which are added to the guest kernel "
8598 #: ../fish/guestfish-actions.pod:1361 ../src/guestfs-actions.pod:2073
8599 msgid "If C<NULL> then no options are added."
8603 #: ../fish/guestfish-actions.pod:1363
8604 msgid "get-attach-method"
8608 #: ../fish/guestfish-actions.pod:1365
8611 " get-attach-method\n"
8616 #: ../fish/guestfish-actions.pod:1367
8617 msgid "Return the current attach method. See L</set-attach-method>."
8621 #: ../fish/guestfish-actions.pod:1369
8622 msgid "get-autosync"
8626 #: ../fish/guestfish-actions.pod:1371
8634 #: ../fish/guestfish-actions.pod:1373 ../src/guestfs-actions.pod:2098
8635 msgid "Get the autosync flag."
8639 #: ../fish/guestfish-actions.pod:1375
8644 #: ../fish/guestfish-actions.pod:1377
8652 #: ../fish/guestfish-actions.pod:1379 ../src/guestfs-actions.pod:2109
8653 msgid "Return the direct appliance mode flag."
8657 #: ../fish/guestfish-actions.pod:1381
8662 #: ../fish/guestfish-actions.pod:1383
8665 " get-e2label device\n"
8670 #: ../fish/guestfish-actions.pod:1385 ../src/guestfs-actions.pod:2128
8672 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8676 #: ../fish/guestfish-actions.pod:1388
8678 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8683 #: ../fish/guestfish-actions.pod:1395
8688 #: ../fish/guestfish-actions.pod:1397
8691 " get-e2uuid device\n"
8696 #: ../fish/guestfish-actions.pod:1399 ../src/guestfs-actions.pod:2149
8698 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8702 #: ../fish/guestfish-actions.pod:1402
8704 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
8709 #: ../fish/guestfish-actions.pod:1409
8714 #: ../fish/guestfish-actions.pod:1411
8722 #: ../fish/guestfish-actions.pod:1413 ../src/guestfs-actions.pod:2162
8724 "This gets the memory size in megabytes allocated to the qemu subprocess."
8728 #: ../fish/guestfish-actions.pod:1416
8730 "If L</set-memsize> was not called on this handle, and if "
8731 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
8732 "value for memsize."
8736 #: ../fish/guestfish-actions.pod:1420 ../fish/guestfish-actions.pod:1477
8737 #: ../fish/guestfish-actions.pod:4243 ../fish/guestfish-actions.pod:4345
8738 #: ../src/guestfs-actions.pod:2169 ../src/guestfs-actions.pod:2261
8739 #: ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6581
8741 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8745 #: ../fish/guestfish-actions.pod:1423
8750 #: ../fish/guestfish-actions.pod:1425
8758 #: ../fish/guestfish-actions.pod:1427 ../src/guestfs-actions.pod:2181
8759 msgid "This returns the enable network flag."
8763 #: ../fish/guestfish-actions.pod:1429
8768 #: ../fish/guestfish-actions.pod:1431
8776 #: ../fish/guestfish-actions.pod:1433 ../src/guestfs-actions.pod:2192
8777 msgid "Return the current search path."
8781 #: ../fish/guestfish-actions.pod:1435 ../src/guestfs-actions.pod:2194
8783 "This is always non-NULL. If it wasn't set already, then this will return "
8788 #: ../fish/guestfish-actions.pod:1438
8793 #: ../fish/guestfish-actions.pod:1440
8801 #: ../fish/guestfish-actions.pod:1442 ../src/guestfs-actions.pod:2207
8802 msgid "This returns the process group flag."
8806 #: ../fish/guestfish-actions.pod:1444
8811 #: ../fish/guestfish-actions.pod:1446
8816 #: ../fish/guestfish-actions.pod:1448
8824 #: ../fish/guestfish-actions.pod:1450 ../src/guestfs-actions.pod:2218
8826 "Return the process ID of the qemu subprocess. If there is no qemu "
8827 "subprocess, then this will return an error."
8831 #: ../fish/guestfish-actions.pod:1453 ../src/guestfs-actions.pod:2221
8832 msgid "This is an internal call used for debugging and testing."
8836 #: ../fish/guestfish-actions.pod:1455
8841 #: ../fish/guestfish-actions.pod:1457
8849 #: ../fish/guestfish-actions.pod:1459 ../src/guestfs-actions.pod:2232
8850 msgid "Return the current qemu binary."
8854 #: ../fish/guestfish-actions.pod:1461 ../src/guestfs-actions.pod:2234
8856 "This is always non-NULL. If it wasn't set already, then this will return "
8857 "the default qemu binary name."
8861 #: ../fish/guestfish-actions.pod:1464
8862 msgid "get-recovery-proc"
8866 #: ../fish/guestfish-actions.pod:1466
8869 " get-recovery-proc\n"
8874 #: ../fish/guestfish-actions.pod:1468 ../src/guestfs-actions.pod:2247
8875 msgid "Return the recovery process enabled flag."
8879 #: ../fish/guestfish-actions.pod:1470
8884 #: ../fish/guestfish-actions.pod:1472
8892 #: ../fish/guestfish-actions.pod:1474
8894 "This returns the current setting of the selinux flag which is passed to the "
8895 "appliance at boot time. See L</set-selinux>."
8899 #: ../fish/guestfish-actions.pod:1480
8904 #: ../fish/guestfish-actions.pod:1482
8912 #: ../fish/guestfish-actions.pod:1484 ../src/guestfs-actions.pod:2273
8913 msgid "This returns the number of virtual CPUs assigned to the appliance."
8917 #: ../fish/guestfish-actions.pod:1486
8922 #: ../fish/guestfish-actions.pod:1488
8930 #: ../fish/guestfish-actions.pod:1490 ../src/guestfs-actions.pod:2284
8932 "This returns the current state as an opaque integer. This is only useful "
8933 "for printing debug and internal error messages."
8937 #: ../fish/guestfish-actions.pod:1493 ../fish/guestfish-actions.pod:2452
8938 #: ../fish/guestfish-actions.pod:2470 ../fish/guestfish-actions.pod:2508
8939 #: ../fish/guestfish-actions.pod:2524 ../src/guestfs-actions.pod:2287
8940 #: ../src/guestfs-actions.pod:3606 ../src/guestfs-actions.pod:3635
8941 #: ../src/guestfs-actions.pod:3696 ../src/guestfs-actions.pod:3723
8942 msgid "For more information on states, see L<guestfs(3)>."
8946 #: ../fish/guestfish-actions.pod:1495
8951 #: ../fish/guestfish-actions.pod:1497
8959 #: ../fish/guestfish-actions.pod:1499 ../src/guestfs-actions.pod:2298
8960 msgid "Return the command trace flag."
8964 #: ../fish/guestfish-actions.pod:1501
8969 #: ../fish/guestfish-actions.pod:1503
8977 #: ../fish/guestfish-actions.pod:1505
8979 "Return the current umask. By default the umask is C<022> unless it has been "
8980 "set by calling L</umask>."
8984 #: ../fish/guestfish-actions.pod:1508
8989 #: ../fish/guestfish-actions.pod:1510
8997 #: ../fish/guestfish-actions.pod:1512 ../src/guestfs-actions.pod:2321
8998 msgid "This returns the verbose messages flag."
9002 #: ../fish/guestfish-actions.pod:1514
9007 #: ../fish/guestfish-actions.pod:1516
9015 #: ../fish/guestfish-actions.pod:1518 ../src/guestfs-actions.pod:2332
9016 msgid "This gets the SELinux security context of the daemon."
9020 #: ../fish/guestfish-actions.pod:1520
9021 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9025 #: ../fish/guestfish-actions.pod:1523
9030 #: ../fish/guestfish-actions.pod:1525
9033 " getxattr path name\n"
9038 #: ../fish/guestfish-actions.pod:1527
9040 "Get a single extended attribute from file C<path> named C<name>. This call "
9041 "follows symlinks. If you want to lookup an extended attribute for the "
9042 "symlink itself, use L</lgetxattr>."
9046 #: ../fish/guestfish-actions.pod:1531 ../fish/guestfish-actions.pod:2597
9048 "Normally it is better to get all extended attributes from a file in one go "
9049 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9050 "buggy and do not provide a way to list out attributes. For these "
9051 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9052 "attributes you want in advance and call this function."
9056 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:2604
9057 #: ../src/guestfs-actions.pod:2361 ../src/guestfs-actions.pod:3856
9059 "Extended attribute values are blobs of binary data. If there is no extended "
9060 "attribute named C<name>, this returns an error."
9064 #: ../fish/guestfish-actions.pod:1541
9065 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9069 #: ../fish/guestfish-actions.pod:1543
9074 #: ../fish/guestfish-actions.pod:1545
9082 #: ../fish/guestfish-actions.pod:1547 ../src/guestfs-actions.pod:2378
9084 "This call lists the extended attributes of the file or directory C<path>."
9088 #: ../fish/guestfish-actions.pod:1550 ../src/guestfs-actions.pod:2381
9090 "At the system call level, this is a combination of the L<listxattr(2)> and "
9091 "L<getxattr(2)> calls."
9095 #: ../fish/guestfish-actions.pod:1553
9096 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9100 #: ../fish/guestfish-actions.pod:1555
9105 #: ../fish/guestfish-actions.pod:1557
9108 " glob-expand pattern\n"
9113 #: ../fish/guestfish-actions.pod:1559 ../src/guestfs-actions.pod:2398
9115 "This command searches for all the pathnames matching C<pattern> according to "
9116 "the wildcard expansion rules used by the shell."
9120 #: ../fish/guestfish-actions.pod:1563 ../src/guestfs-actions.pod:2402
9122 "If no paths match, then this returns an empty list (note: not an error)."
9126 #: ../fish/guestfish-actions.pod:1566 ../src/guestfs-actions.pod:2405
9128 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
9129 "GLOB_BRACE>. See that manual page for more details."
9133 #: ../fish/guestfish-actions.pod:1570
9138 #: ../fish/guestfish-actions.pod:1572
9141 " grep regex path\n"
9146 #: ../fish/guestfish-actions.pod:1574 ../src/guestfs-actions.pod:2422
9147 msgid "This calls the external C<grep> program and returns the matching lines."
9151 #: ../fish/guestfish-actions.pod:1580
9156 #: ../fish/guestfish-actions.pod:1582
9159 " grepi regex path\n"
9164 #: ../fish/guestfish-actions.pod:1584 ../src/guestfs-actions.pod:2441
9166 "This calls the external C<grep -i> program and returns the matching lines."
9170 #: ../fish/guestfish-actions.pod:1590
9171 msgid "grub-install"
9175 #: ../fish/guestfish-actions.pod:1592
9178 " grub-install root device\n"
9183 #: ../fish/guestfish-actions.pod:1594 ../src/guestfs-actions.pod:2460
9185 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9186 "with the root directory being C<root>."
9190 #: ../fish/guestfish-actions.pod:1603 ../src/guestfs-actions.pod:2469
9192 "There is currently no way in the API to install grub2, which is used by most "
9193 "modern Linux guests. It is possible to run the grub2 command from the "
9194 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9198 #: ../fish/guestfish-actions.pod:1610 ../src/guestfs-actions.pod:2476
9200 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9201 "compatible with itself, so this only works in rather narrow circumstances. "
9202 "Careful testing with each guest version is advisable."
9206 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2483
9208 "If grub-install reports the error \"No suitable drive was found in the "
9209 "generated device map.\" it may be that you need to create a C</boot/grub/"
9210 "device.map> file first that contains the mapping between grub device names "
9211 "and Linux device names. It is usually sufficient to create a file "
9216 #: ../fish/guestfish-actions.pod:1624 ../src/guestfs-actions.pod:2490
9224 #: ../fish/guestfish-actions.pod:1626 ../src/guestfs-actions.pod:2492
9225 msgid "replacing C</dev/vda> with the name of the installation device."
9229 #: ../fish/guestfish-actions.pod:1630
9234 #: ../fish/guestfish-actions.pod:1632
9242 #: ../fish/guestfish-actions.pod:1634 ../src/guestfs-actions.pod:2506
9244 "This command returns up to the first 10 lines of a file as a list of strings."
9248 #: ../fish/guestfish-actions.pod:1640
9253 #: ../fish/guestfish-actions.pod:1642
9256 " head-n nrlines path\n"
9261 #: ../fish/guestfish-actions.pod:1644 ../src/guestfs-actions.pod:2525
9263 "If the parameter C<nrlines> is a positive number, this returns the first "
9264 "C<nrlines> lines of the file C<path>."
9268 #: ../fish/guestfish-actions.pod:1647 ../src/guestfs-actions.pod:2528
9270 "If the parameter C<nrlines> is a negative number, this returns lines from "
9271 "the file C<path>, excluding the last C<nrlines> lines."
9275 #: ../fish/guestfish-actions.pod:1650 ../fish/guestfish-actions.pod:4735
9276 #: ../src/guestfs-actions.pod:2531 ../src/guestfs-actions.pod:7169
9277 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9281 #: ../fish/guestfish-actions.pod:1655
9286 #: ../fish/guestfish-actions.pod:1657
9294 #: ../fish/guestfish-actions.pod:1659 ../src/guestfs-actions.pod:2548
9296 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
9297 "readable, canonical hex dump of the file."
9301 #: ../fish/guestfish-actions.pod:1665
9306 #: ../fish/guestfish-actions.pod:1667
9309 " initrd-cat initrdpath filename\n"
9314 #: ../fish/guestfish-actions.pod:1669 ../src/guestfs-actions.pod:2567
9316 "This command unpacks the file C<filename> from the initrd file called "
9317 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9322 #: ../fish/guestfish-actions.pod:1673 ../src/guestfs-actions.pod:2571
9324 "For example, in guestfish you could use the following command to examine the "
9325 "boot script (usually called C</init>) contained in a Linux initrd or "
9330 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2575
9333 " initrd-cat /boot/initrd-<version>.img init\n"
9338 #: ../fish/guestfish-actions.pod:1679
9339 msgid "See also L</initrd-list>."
9343 #: ../fish/guestfish-actions.pod:1684
9348 #: ../fish/guestfish-actions.pod:1686
9351 " initrd-list path\n"
9356 #: ../fish/guestfish-actions.pod:1688 ../src/guestfs-actions.pod:2594
9357 msgid "This command lists out files contained in an initrd."
9361 #: ../fish/guestfish-actions.pod:1690 ../src/guestfs-actions.pod:2596
9363 "The files are listed without any initial C</> character. The files are "
9364 "listed in the order they appear (not necessarily alphabetical). Directory "
9365 "names are listed as separate items."
9369 #: ../fish/guestfish-actions.pod:1694 ../src/guestfs-actions.pod:2600
9371 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9372 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9377 #: ../fish/guestfish-actions.pod:1698
9378 msgid "inotify-add-watch"
9382 #: ../fish/guestfish-actions.pod:1700
9385 " inotify-add-watch path mask\n"
9390 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2617
9391 msgid "Watch C<path> for the events listed in C<mask>."
9395 #: ../fish/guestfish-actions.pod:1704 ../src/guestfs-actions.pod:2619
9397 "Note that if C<path> is a directory then events within that directory are "
9398 "watched, but this does I<not> happen recursively (in subdirectories)."
9402 #: ../fish/guestfish-actions.pod:1708 ../src/guestfs-actions.pod:2623
9404 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9405 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9409 #: ../fish/guestfish-actions.pod:1712
9410 msgid "inotify-close"
9414 #: ../fish/guestfish-actions.pod:1714
9422 #: ../fish/guestfish-actions.pod:1716 ../src/guestfs-actions.pod:2636
9424 "This closes the inotify handle which was previously opened by inotify_init. "
9425 "It removes all watches, throws away any pending events, and deallocates all "
9430 #: ../fish/guestfish-actions.pod:1720
9431 msgid "inotify-files"
9435 #: ../fish/guestfish-actions.pod:1722
9443 #: ../fish/guestfish-actions.pod:1724
9445 "This function is a helpful wrapper around L</inotify-read> which just "
9446 "returns a list of pathnames of objects that were touched. The returned "
9447 "pathnames are sorted and deduplicated."
9451 #: ../fish/guestfish-actions.pod:1728
9452 msgid "inotify-init"
9456 #: ../fish/guestfish-actions.pod:1730
9459 " inotify-init maxevents\n"
9464 #: ../fish/guestfish-actions.pod:1732 ../src/guestfs-actions.pod:2665
9466 "This command creates a new inotify handle. The inotify subsystem can be "
9467 "used to notify events which happen to objects in the guest filesystem."
9471 #: ../fish/guestfish-actions.pod:1736
9473 "C<maxevents> is the maximum number of events which will be queued up between "
9474 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9475 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9476 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9477 "but records the fact that it threw them away by setting a flag "
9478 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9482 #: ../fish/guestfish-actions.pod:1746
9484 "Before any events are generated, you have to add some watches to the "
9485 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9486 "L</inotify-watch-all>."
9490 #: ../fish/guestfish-actions.pod:1752
9492 "Queued up events should be read periodically by calling L</inotify-read> (or "
9493 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9494 "If you don't read the events out often enough then you risk the internal "
9495 "queue overflowing."
9499 #: ../fish/guestfish-actions.pod:1759
9501 "The handle should be closed after use by calling L</inotify-close>. This "
9502 "also removes any watches automatically."
9506 #: ../fish/guestfish-actions.pod:1763 ../src/guestfs-actions.pod:2696
9508 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9509 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9510 "that there is one global inotify handle per libguestfs instance."
9514 #: ../fish/guestfish-actions.pod:1768
9515 msgid "inotify-read"
9519 #: ../fish/guestfish-actions.pod:1770
9527 #: ../fish/guestfish-actions.pod:1772 ../src/guestfs-actions.pod:2710
9529 "Return the complete queue of events that have happened since the previous "
9534 #: ../fish/guestfish-actions.pod:1775 ../src/guestfs-actions.pod:2713
9535 msgid "If no events have happened, this returns an empty list."
9539 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2715
9541 "I<Note>: In order to make sure that all events have been read, you must call "
9542 "this function repeatedly until it returns an empty list. The reason is that "
9543 "the call will read events up to the maximum appliance-to-host message size "
9544 "and leave remaining events in the queue."
9548 #: ../fish/guestfish-actions.pod:1783
9549 msgid "inotify-rm-watch"
9553 #: ../fish/guestfish-actions.pod:1785
9556 " inotify-rm-watch wd\n"
9561 #: ../fish/guestfish-actions.pod:1787
9562 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9566 #: ../fish/guestfish-actions.pod:1790
9567 msgid "inspect-get-arch"
9571 #: ../fish/guestfish-actions.pod:1792
9574 " inspect-get-arch root\n"
9579 #: ../fish/guestfish-actions.pod:1794
9581 "This returns the architecture of the inspected operating system. The "
9582 "possible return values are listed under L</file-architecture>."
9586 #: ../fish/guestfish-actions.pod:1798 ../src/guestfs-actions.pod:2750
9588 "If the architecture could not be determined, then the string C<unknown> is "
9593 #: ../fish/guestfish-actions.pod:1801 ../fish/guestfish-actions.pod:1896
9594 #: ../fish/guestfish-actions.pod:1975 ../fish/guestfish-actions.pod:1987
9595 #: ../fish/guestfish-actions.pod:2071 ../fish/guestfish-actions.pod:2133
9596 #: ../fish/guestfish-actions.pod:2154 ../fish/guestfish-actions.pod:2168
9597 #: ../fish/guestfish-actions.pod:2208 ../fish/guestfish-actions.pod:2244
9598 #: ../fish/guestfish-actions.pod:2257 ../fish/guestfish-actions.pod:2270
9599 #: ../fish/guestfish-actions.pod:2280 ../fish/guestfish-actions.pod:2290
9600 #: ../fish/guestfish-actions.pod:2302 ../fish/guestfish-actions.pod:2398
9601 #: ../fish/guestfish-actions.pod:2432 ../src/guestfs-actions.pod:2753
9602 #: ../src/guestfs-actions.pod:2855 ../src/guestfs-actions.pod:2959
9603 #: ../src/guestfs-actions.pod:2978 ../src/guestfs-actions.pod:3109
9604 #: ../src/guestfs-actions.pod:3193 ../src/guestfs-actions.pod:3221
9605 #: ../src/guestfs-actions.pod:3242 ../src/guestfs-actions.pod:3295
9606 #: ../src/guestfs-actions.pod:3339 ../src/guestfs-actions.pod:3359
9607 #: ../src/guestfs-actions.pod:3379 ../src/guestfs-actions.pod:3396
9608 #: ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3430
9609 #: ../src/guestfs-actions.pod:3532 ../src/guestfs-actions.pod:3573
9610 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9614 #: ../fish/guestfish-actions.pod:1803
9615 msgid "inspect-get-distro"
9619 #: ../fish/guestfish-actions.pod:1805
9622 " inspect-get-distro root\n"
9627 #: ../fish/guestfish-actions.pod:1807 ../src/guestfs-actions.pod:2766
9629 "This returns the distro (distribution) of the inspected operating system."
9633 #: ../fish/guestfish-actions.pod:1810 ../src/guestfs-actions.pod:2769
9634 msgid "Currently defined distros are:"
9638 #: ../fish/guestfish-actions.pod:1814 ../src/guestfs-actions.pod:2773
9639 msgid "\"archlinux\""
9643 #: ../fish/guestfish-actions.pod:1816 ../src/guestfs-actions.pod:2775
9648 #: ../fish/guestfish-actions.pod:1818 ../src/guestfs-actions.pod:2777
9653 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2779
9658 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2781
9663 #: ../fish/guestfish-actions.pod:1824 ../src/guestfs-actions.pod:2783
9668 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2785
9673 #: ../fish/guestfish-actions.pod:1828 ../src/guestfs-actions.pod:2787
9678 #: ../fish/guestfish-actions.pod:1830 ../src/guestfs-actions.pod:2789
9683 #: ../fish/guestfish-actions.pod:1832 ../src/guestfs-actions.pod:2791
9688 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2793
9689 msgid "\"linuxmint\""
9693 #: ../fish/guestfish-actions.pod:1836 ../src/guestfs-actions.pod:2795
9698 #: ../fish/guestfish-actions.pod:1838 ../src/guestfs-actions.pod:2797
9703 #: ../fish/guestfish-actions.pod:1840 ../src/guestfs-actions.pod:2799
9708 #: ../fish/guestfish-actions.pod:1842 ../src/guestfs-actions.pod:2801
9709 msgid "\"mandriva\""
9713 #: ../fish/guestfish-actions.pod:1844 ../src/guestfs-actions.pod:2803
9718 #: ../fish/guestfish-actions.pod:1846 ../src/guestfs-actions.pod:2805
9723 #: ../fish/guestfish-actions.pod:1848 ../src/guestfs-actions.pod:2807
9728 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2809
9729 msgid "\"opensuse\""
9733 #: ../fish/guestfish-actions.pod:1852 ../src/guestfs-actions.pod:2811
9738 #: ../fish/guestfish-actions.pod:1854 ../src/guestfs-actions.pod:2813
9743 #: ../fish/guestfish-actions.pod:1856 ../src/guestfs-actions.pod:2815
9748 #: ../fish/guestfish-actions.pod:1858 ../src/guestfs-actions.pod:2817
9749 msgid "\"redhat-based\""
9753 #: ../fish/guestfish-actions.pod:1860 ../src/guestfs-actions.pod:2819
9754 msgid "Some Red Hat-derived distro."
9758 #: ../fish/guestfish-actions.pod:1862 ../src/guestfs-actions.pod:2821
9763 #: ../fish/guestfish-actions.pod:1864 ../src/guestfs-actions.pod:2823
9764 msgid "Red Hat Enterprise Linux."
9768 #: ../fish/guestfish-actions.pod:1866 ../src/guestfs-actions.pod:2825
9769 msgid "\"scientificlinux\""
9773 #: ../fish/guestfish-actions.pod:1868 ../src/guestfs-actions.pod:2827
9774 msgid "Scientific Linux."
9778 #: ../fish/guestfish-actions.pod:1870 ../src/guestfs-actions.pod:2829
9779 msgid "\"slackware\""
9783 #: ../fish/guestfish-actions.pod:1872 ../src/guestfs-actions.pod:2831
9788 #: ../fish/guestfish-actions.pod:1874 ../src/guestfs-actions.pod:2833
9789 msgid "\"ttylinux\""
9793 #: ../fish/guestfish-actions.pod:1876 ../src/guestfs-actions.pod:2835
9798 #: ../fish/guestfish-actions.pod:1878 ../src/guestfs-actions.pod:2837
9803 #: ../fish/guestfish-actions.pod:1880 ../src/guestfs-actions.pod:2839
9808 #: ../fish/guestfish-actions.pod:1882 ../fish/guestfish-actions.pod:1966
9809 #: ../fish/guestfish-actions.pod:2235 ../src/guestfs-actions.pod:2841
9810 #: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:3330
9815 #: ../fish/guestfish-actions.pod:1884 ../src/guestfs-actions.pod:2843
9816 msgid "The distro could not be determined."
9820 #: ../fish/guestfish-actions.pod:1886 ../fish/guestfish-actions.pod:2223
9821 #: ../src/guestfs-actions.pod:2845 ../src/guestfs-actions.pod:3318
9826 #: ../fish/guestfish-actions.pod:1888 ../src/guestfs-actions.pod:2847
9828 "Windows does not have distributions. This string is returned if the OS type "
9833 #: ../fish/guestfish-actions.pod:1893 ../fish/guestfish-actions.pod:1972
9834 #: ../fish/guestfish-actions.pod:2241 ../src/guestfs-actions.pod:2852
9835 #: ../src/guestfs-actions.pod:2956 ../src/guestfs-actions.pod:3336
9837 "Future versions of libguestfs may return other strings here. The caller "
9838 "should be prepared to handle any string."
9842 #: ../fish/guestfish-actions.pod:1898
9843 msgid "inspect-get-drive-mappings"
9847 #: ../fish/guestfish-actions.pod:1900
9850 " inspect-get-drive-mappings root\n"
9855 #: ../fish/guestfish-actions.pod:1902 ../src/guestfs-actions.pod:2868
9857 "This call is useful for Windows which uses a primitive system of assigning "
9858 "drive letters (like \"C:\") to partitions. This inspection API examines the "
9859 "Windows Registry to find out how disks/partitions are mapped to drive "
9860 "letters, and returns a hash table as in the example below:"
9864 #: ../fish/guestfish-actions.pod:1908 ../src/guestfs-actions.pod:2874
9874 #: ../fish/guestfish-actions.pod:1912 ../src/guestfs-actions.pod:2878
9876 "Note that keys are drive letters. For Windows, the key is case insensitive "
9877 "and just contains the drive letter, without the customary colon separator "
9882 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:2882
9884 "In future we may support other operating systems that also used drive "
9885 "letters, but the keys for those might not be case insensitive and might be "
9886 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
9891 #: ../fish/guestfish-actions.pod:1921 ../src/guestfs-actions.pod:2887
9893 "For Windows guests, currently only hard drive mappings are returned. "
9894 "Removable disks (eg. DVD-ROMs) are ignored."
9898 #: ../fish/guestfish-actions.pod:1924 ../src/guestfs-actions.pod:2890
9900 "For guests that do not use drive mappings, or if the drive mappings could "
9901 "not be determined, this returns an empty hash table."
9905 #: ../fish/guestfish-actions.pod:1927
9907 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
9908 "get-mountpoints>, L</inspect-get-filesystems>."
9912 #: ../fish/guestfish-actions.pod:1931
9913 msgid "inspect-get-filesystems"
9917 #: ../fish/guestfish-actions.pod:1933
9920 " inspect-get-filesystems root\n"
9925 #: ../fish/guestfish-actions.pod:1935 ../src/guestfs-actions.pod:2911
9927 "This returns a list of all the filesystems that we think are associated with "
9928 "this operating system. This includes the root filesystem, other ordinary "
9929 "filesystems, and non-mounted devices like swap partitions."
9933 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:2916
9935 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
9936 "to be shared between operating systems."
9940 #: ../fish/guestfish-actions.pod:1943
9942 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
9947 #: ../fish/guestfish-actions.pod:1946
9948 msgid "inspect-get-format"
9952 #: ../fish/guestfish-actions.pod:1948
9955 " inspect-get-format root\n"
9960 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:2934
9962 "This returns the format of the inspected operating system. You can use it "
9963 "to detect install images, live CDs and similar."
9967 #: ../fish/guestfish-actions.pod:1953 ../src/guestfs-actions.pod:2937
9968 msgid "Currently defined formats are:"
9972 #: ../fish/guestfish-actions.pod:1957 ../src/guestfs-actions.pod:2941
9973 msgid "\"installed\""
9977 #: ../fish/guestfish-actions.pod:1959 ../src/guestfs-actions.pod:2943
9978 msgid "This is an installed operating system."
9982 #: ../fish/guestfish-actions.pod:1961 ../src/guestfs-actions.pod:2945
9983 msgid "\"installer\""
9987 #: ../fish/guestfish-actions.pod:1963 ../src/guestfs-actions.pod:2947
9989 "The disk image being inspected is not an installed operating system, but a "
9990 "I<bootable> install disk, live CD, or similar."
9994 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:2952
9995 msgid "The format of this disk image is not known."
9999 #: ../fish/guestfish-actions.pod:1977
10000 msgid "inspect-get-hostname"
10004 #: ../fish/guestfish-actions.pod:1979
10007 " inspect-get-hostname root\n"
10012 #: ../fish/guestfish-actions.pod:1981 ../src/guestfs-actions.pod:2972
10014 "This function returns the hostname of the operating system as found by "
10015 "inspection of the guest's configuration files."
10019 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:2975
10021 "If the hostname could not be determined, then the string C<unknown> is "
10026 #: ../fish/guestfish-actions.pod:1989
10027 msgid "inspect-get-icon"
10031 #: ../fish/guestfish-actions.pod:1991
10034 " inspect-get-icon root [favicon:..] [highquality:..]\n"
10039 #: ../fish/guestfish-actions.pod:1993 ../src/guestfs-actions.pod:3001
10041 "This function returns an icon corresponding to the inspected operating "
10042 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10043 "to PNG if necessary)."
10047 #: ../fish/guestfish-actions.pod:1997 ../src/guestfs-actions.pod:3005
10049 "If it was not possible to get an icon this function returns a zero-length "
10050 "(non-NULL) buffer. I<Callers must check for this case>."
10054 #: ../fish/guestfish-actions.pod:2000 ../src/guestfs-actions.pod:3008
10056 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10057 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10058 "this file will be returned. You can disable favicons by passing the "
10059 "optional C<favicon> boolean as false (default is true)."
10063 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3014
10065 "If finding the favicon fails, then we look in other places in the guest for "
10070 #: ../fish/guestfish-actions.pod:2009 ../src/guestfs-actions.pod:3017
10072 "If the optional C<highquality> boolean is true then only high quality icons "
10073 "are returned, which means only icons of high resolution with an alpha "
10074 "channel. The default (false) is to return any icon we can, even if it is of "
10075 "substandard quality."
10079 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3028
10081 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10082 "before you call this, since it needs to read information from the guest "
10083 "filesystem during the call."
10087 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3034
10089 "B<Security:> The icon data comes from the untrusted guest, and should be "
10090 "treated with caution. PNG files have been known to contain exploits. "
10091 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10092 "trying to process or display the icon."
10096 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3042
10098 "The PNG image returned can be any size. It might not be square. Libguestfs "
10099 "tries to return the largest, highest quality icon available. The "
10100 "application must scale the icon to the required size."
10104 #: ../fish/guestfish-actions.pod:2041 ../src/guestfs-actions.pod:3049
10106 "Extracting icons from Windows guests requires the external C<wrestool> "
10107 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10108 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10109 "installed separately."
10113 #: ../fish/guestfish-actions.pod:2048 ../src/guestfs-actions.pod:3056
10115 "Operating system icons are usually trademarks. Seek legal advice before "
10116 "using trademarks in applications."
10120 #: ../fish/guestfish-actions.pod:2055
10121 msgid "inspect-get-major-version"
10125 #: ../fish/guestfish-actions.pod:2057
10128 " inspect-get-major-version root\n"
10133 #: ../fish/guestfish-actions.pod:2059 ../src/guestfs-actions.pod:3097
10135 "This returns the major version number of the inspected operating system."
10139 #: ../fish/guestfish-actions.pod:2062 ../src/guestfs-actions.pod:3100
10141 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10142 "popular public names used by the operating system. Notably the operating "
10143 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10144 "1). You can find out the real versions corresponding to releases of Windows "
10145 "by consulting Wikipedia or MSDN."
10149 #: ../fish/guestfish-actions.pod:2069 ../fish/guestfish-actions.pod:2080
10150 #: ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3124
10151 msgid "If the version could not be determined, then C<0> is returned."
10155 #: ../fish/guestfish-actions.pod:2073
10156 msgid "inspect-get-minor-version"
10160 #: ../fish/guestfish-actions.pod:2075
10163 " inspect-get-minor-version root\n"
10168 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3121
10170 "This returns the minor version number of the inspected operating system."
10174 #: ../fish/guestfish-actions.pod:2082
10176 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10177 "get-major-version>."
10181 #: ../fish/guestfish-actions.pod:2085
10182 msgid "inspect-get-mountpoints"
10186 #: ../fish/guestfish-actions.pod:2087
10189 " inspect-get-mountpoints root\n"
10194 #: ../fish/guestfish-actions.pod:2089 ../src/guestfs-actions.pod:3139
10196 "This returns a hash of where we think the filesystems associated with this "
10197 "operating system should be mounted. Callers should note that this is at "
10198 "best an educated guess made by reading configuration files such as C</etc/"
10199 "fstab>. I<In particular note> that this may return filesystems which are "
10200 "non-existent or not mountable and callers should be prepared to handle or "
10201 "ignore failures if they try to mount them."
10205 #: ../fish/guestfish-actions.pod:2098 ../src/guestfs-actions.pod:3148
10207 "Each element in the returned hashtable has a key which is the path of the "
10208 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10209 "mounted there (eg. C</dev/sda1>)."
10213 #: ../fish/guestfish-actions.pod:2103 ../src/guestfs-actions.pod:3153
10215 "Non-mounted devices such as swap devices are I<not> returned in this list."
10219 #: ../fish/guestfish-actions.pod:2106
10221 "For operating systems like Windows which still use drive letters, this call "
10222 "will only return an entry for the first drive \"mounted on\" C</>. For "
10223 "information about the mapping of drive letters to partitions, see L</inspect-"
10224 "get-drive-mappings>."
10228 #: ../fish/guestfish-actions.pod:2112
10230 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10231 "get-filesystems>."
10235 #: ../fish/guestfish-actions.pod:2115
10236 msgid "inspect-get-package-format"
10240 #: ../fish/guestfish-actions.pod:2117
10243 " inspect-get-package-format root\n"
10248 #: ../fish/guestfish-actions.pod:2119
10250 "This function and L</inspect-get-package-management> return the package "
10251 "format and package management tool used by the inspected operating system. "
10252 "For example for Fedora these functions would return C<rpm> (package format) "
10253 "and C<yum> (package management)."
10257 #: ../fish/guestfish-actions.pod:2125 ../src/guestfs-actions.pod:3185
10259 "This returns the string C<unknown> if we could not determine the package "
10260 "format I<or> if the operating system does not have a real packaging system "
10265 #: ../fish/guestfish-actions.pod:2129 ../src/guestfs-actions.pod:3189
10267 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10268 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10272 #: ../fish/guestfish-actions.pod:2135
10273 msgid "inspect-get-package-management"
10277 #: ../fish/guestfish-actions.pod:2137
10280 " inspect-get-package-management root\n"
10285 #: ../fish/guestfish-actions.pod:2139
10287 "L</inspect-get-package-format> and this function return the package format "
10288 "and package management tool used by the inspected operating system. For "
10289 "example for Fedora these functions would return C<rpm> (package format) and "
10290 "C<yum> (package management)."
10294 #: ../fish/guestfish-actions.pod:2145 ../src/guestfs-actions.pod:3212
10296 "This returns the string C<unknown> if we could not determine the package "
10297 "management tool I<or> if the operating system does not have a real packaging "
10298 "system (eg. Windows)."
10302 #: ../fish/guestfish-actions.pod:2149 ../src/guestfs-actions.pod:3216
10304 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10305 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10306 "versions of libguestfs may return other strings."
10310 #: ../fish/guestfish-actions.pod:2156
10311 msgid "inspect-get-product-name"
10315 #: ../fish/guestfish-actions.pod:2158
10318 " inspect-get-product-name root\n"
10323 #: ../fish/guestfish-actions.pod:2160 ../src/guestfs-actions.pod:3234
10325 "This returns the product name of the inspected operating system. The "
10326 "product name is generally some freeform string which can be displayed to the "
10327 "user, but should not be parsed by programs."
10331 #: ../fish/guestfish-actions.pod:2165 ../src/guestfs-actions.pod:3239
10333 "If the product name could not be determined, then the string C<unknown> is "
10338 #: ../fish/guestfish-actions.pod:2170
10339 msgid "inspect-get-product-variant"
10343 #: ../fish/guestfish-actions.pod:2172
10346 " inspect-get-product-variant root\n"
10351 #: ../fish/guestfish-actions.pod:2174 ../src/guestfs-actions.pod:3255
10352 msgid "This returns the product variant of the inspected operating system."
10356 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3258
10358 "For Windows guests, this returns the contents of the Registry key C<HKLM"
10359 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
10360 "is usually a string such as C<Client> or C<Server> (other values are "
10361 "possible). This can be used to distinguish consumer and enterprise versions "
10362 "of Windows that have the same version number (for example, Windows 7 and "
10363 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10364 "the latter is C<Server>)."
10368 #: ../fish/guestfish-actions.pod:2186 ../src/guestfs-actions.pod:3267
10370 "For enterprise Linux guests, in future we intend this to return the product "
10371 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10372 "implemented at present."
10376 #: ../fish/guestfish-actions.pod:2190 ../src/guestfs-actions.pod:3271
10378 "If the product variant could not be determined, then the string C<unknown> "
10383 #: ../fish/guestfish-actions.pod:2193
10385 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10386 "get-product-name>, L</inspect-get-major-version>."
10390 #: ../fish/guestfish-actions.pod:2197
10391 msgid "inspect-get-roots"
10395 #: ../fish/guestfish-actions.pod:2199
10398 " inspect-get-roots\n"
10403 #: ../fish/guestfish-actions.pod:2201
10405 "This function is a convenient way to get the list of root devices, as "
10406 "returned from a previous call to L</inspect-os>, but without redoing the "
10407 "whole inspection process."
10411 #: ../fish/guestfish-actions.pod:2205
10413 "This returns an empty list if either no root devices were found or the "
10414 "caller has not called L</inspect-os>."
10418 #: ../fish/guestfish-actions.pod:2210
10419 msgid "inspect-get-type"
10423 #: ../fish/guestfish-actions.pod:2212
10426 " inspect-get-type root\n"
10431 #: ../fish/guestfish-actions.pod:2214 ../src/guestfs-actions.pod:3309
10433 "This returns the type of the inspected operating system. Currently defined "
10438 #: ../fish/guestfish-actions.pod:2219 ../src/guestfs-actions.pod:3314
10443 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3316
10444 msgid "Any Linux-based operating system."
10448 #: ../fish/guestfish-actions.pod:2225 ../src/guestfs-actions.pod:3320
10449 msgid "Any Microsoft Windows operating system."
10453 #: ../fish/guestfish-actions.pod:2227 ../src/guestfs-actions.pod:3322
10454 msgid "\"freebsd\""
10458 #: ../fish/guestfish-actions.pod:2229 ../src/guestfs-actions.pod:3324
10463 #: ../fish/guestfish-actions.pod:2231 ../src/guestfs-actions.pod:3326
10468 #: ../fish/guestfish-actions.pod:2233 ../src/guestfs-actions.pod:3328
10473 #: ../fish/guestfish-actions.pod:2237 ../src/guestfs-actions.pod:3332
10474 msgid "The operating system type could not be determined."
10478 #: ../fish/guestfish-actions.pod:2246
10479 msgid "inspect-get-windows-current-control-set"
10483 #: ../fish/guestfish-actions.pod:2248
10486 " inspect-get-windows-current-control-set root\n"
10491 #: ../fish/guestfish-actions.pod:2250 ../src/guestfs-actions.pod:3352
10493 "This returns the Windows CurrentControlSet of the inspected guest. The "
10494 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10498 #: ../fish/guestfish-actions.pod:2253 ../src/guestfs-actions.pod:3355
10500 "This call assumes that the guest is Windows and that the Registry could be "
10501 "examined by inspection. If this is not the case then an error is returned."
10505 #: ../fish/guestfish-actions.pod:2259
10506 msgid "inspect-get-windows-systemroot"
10510 #: ../fish/guestfish-actions.pod:2261
10513 " inspect-get-windows-systemroot root\n"
10518 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3372
10520 "This returns the Windows systemroot of the inspected guest. The systemroot "
10521 "is a directory path such as C</WINDOWS>."
10525 #: ../fish/guestfish-actions.pod:2266 ../src/guestfs-actions.pod:3375
10527 "This call assumes that the guest is Windows and that the systemroot could be "
10528 "determined by inspection. If this is not the case then an error is returned."
10532 #: ../fish/guestfish-actions.pod:2272
10533 msgid "inspect-is-live"
10537 #: ../fish/guestfish-actions.pod:2274
10540 " inspect-is-live root\n"
10545 #: ../fish/guestfish-actions.pod:2276
10547 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10548 "then this returns true if a live image was detected on the disk."
10552 #: ../fish/guestfish-actions.pod:2282
10553 msgid "inspect-is-multipart"
10557 #: ../fish/guestfish-actions.pod:2284
10560 " inspect-is-multipart root\n"
10565 #: ../fish/guestfish-actions.pod:2286
10567 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10568 "then this returns true if the disk is part of a set."
10572 #: ../fish/guestfish-actions.pod:2292
10573 msgid "inspect-is-netinst"
10577 #: ../fish/guestfish-actions.pod:2294
10580 " inspect-is-netinst root\n"
10585 #: ../fish/guestfish-actions.pod:2296
10587 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10588 "then this returns true if the disk is a network installer, ie. not a self-"
10589 "contained install CD but one which is likely to require network access to "
10590 "complete the install."
10594 #: ../fish/guestfish-actions.pod:2304
10595 msgid "inspect-list-applications"
10599 #: ../fish/guestfish-actions.pod:2306
10602 " inspect-list-applications root\n"
10607 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3442
10608 msgid "Return the list of applications installed in the operating system."
10612 #: ../fish/guestfish-actions.pod:2310
10614 "I<Note:> This call works differently from other parts of the inspection "
10615 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10616 "then mount up the disks, before calling this. Listing applications is a "
10617 "significantly more difficult operation which requires access to the full "
10618 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10619 "are just returning data cached in the libguestfs handle, this call actually "
10620 "reads parts of the mounted filesystems during the call."
10624 #: ../fish/guestfish-actions.pod:2320 ../src/guestfs-actions.pod:3454
10626 "This returns an empty list if the inspection code was not able to determine "
10627 "the list of applications."
10631 #: ../fish/guestfish-actions.pod:2323 ../src/guestfs-actions.pod:3457
10632 msgid "The application structure contains the following fields:"
10636 #: ../fish/guestfish-actions.pod:2327 ../src/guestfs-actions.pod:3461
10637 msgid "C<app_name>"
10641 #: ../fish/guestfish-actions.pod:2329 ../src/guestfs-actions.pod:3463
10643 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10644 "guests, this is the package name."
10648 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3466
10649 msgid "C<app_display_name>"
10653 #: ../fish/guestfish-actions.pod:2334 ../src/guestfs-actions.pod:3468
10655 "The display name of the application, sometimes localized to the install "
10656 "language of the guest operating system."
10660 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3471
10662 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10663 "to display something can use C<app_name> instead."
10667 #: ../fish/guestfish-actions.pod:2340 ../src/guestfs-actions.pod:3474
10668 msgid "C<app_epoch>"
10672 #: ../fish/guestfish-actions.pod:2342 ../src/guestfs-actions.pod:3476
10674 "For package managers which use epochs, this contains the epoch of the "
10675 "package (an integer). If unavailable, this is returned as C<0>."
10679 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3479
10680 msgid "C<app_version>"
10684 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3481
10686 "The version string of the application or package. If unavailable this is "
10687 "returned as an empty string C<\"\">."
10691 #: ../fish/guestfish-actions.pod:2350 ../src/guestfs-actions.pod:3484
10692 msgid "C<app_release>"
10696 #: ../fish/guestfish-actions.pod:2352 ../src/guestfs-actions.pod:3486
10698 "The release string of the application or package, for package managers that "
10699 "use this. If unavailable this is returned as an empty string C<\"\">."
10703 #: ../fish/guestfish-actions.pod:2356 ../src/guestfs-actions.pod:3490
10704 msgid "C<app_install_path>"
10708 #: ../fish/guestfish-actions.pod:2358 ../src/guestfs-actions.pod:3492
10710 "The installation path of the application (on operating systems such as "
10711 "Windows which use installation paths). This path is in the format used by "
10712 "the guest operating system, it is not a libguestfs path."
10716 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3497
10717 msgid "If unavailable this is returned as an empty string C<\"\">."
10721 #: ../fish/guestfish-actions.pod:2365 ../src/guestfs-actions.pod:3499
10722 msgid "C<app_trans_path>"
10726 #: ../fish/guestfish-actions.pod:2367 ../src/guestfs-actions.pod:3501
10728 "The install path translated into a libguestfs path. If unavailable this is "
10729 "returned as an empty string C<\"\">."
10733 #: ../fish/guestfish-actions.pod:2370 ../src/guestfs-actions.pod:3504
10734 msgid "C<app_publisher>"
10738 #: ../fish/guestfish-actions.pod:2372 ../src/guestfs-actions.pod:3506
10740 "The name of the publisher of the application, for package managers that use "
10741 "this. If unavailable this is returned as an empty string C<\"\">."
10745 #: ../fish/guestfish-actions.pod:2376 ../src/guestfs-actions.pod:3510
10750 #: ../fish/guestfish-actions.pod:2378 ../src/guestfs-actions.pod:3512
10752 "The URL (eg. upstream URL) of the application. If unavailable this is "
10753 "returned as an empty string C<\"\">."
10757 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3515
10758 msgid "C<app_source_package>"
10762 #: ../fish/guestfish-actions.pod:2383 ../src/guestfs-actions.pod:3517
10764 "For packaging systems which support this, the name of the source package. "
10765 "If unavailable this is returned as an empty string C<\"\">."
10769 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3520
10770 msgid "C<app_summary>"
10774 #: ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3522
10776 "A short (usually one line) description of the application or package. If "
10777 "unavailable this is returned as an empty string C<\"\">."
10781 #: ../fish/guestfish-actions.pod:2391 ../src/guestfs-actions.pod:3525
10782 msgid "C<app_description>"
10786 #: ../fish/guestfish-actions.pod:2393 ../src/guestfs-actions.pod:3527
10788 "A longer description of the application or package. If unavailable this is "
10789 "returned as an empty string C<\"\">."
10793 #: ../fish/guestfish-actions.pod:2400
10798 #: ../fish/guestfish-actions.pod:2402
10806 #: ../fish/guestfish-actions.pod:2404 ../src/guestfs-actions.pod:3545
10808 "This function uses other libguestfs functions and certain heuristics to "
10809 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
10810 "for operating systems."
10814 #: ../fish/guestfish-actions.pod:2408 ../src/guestfs-actions.pod:3549
10815 msgid "The list returned is empty if no operating systems were found."
10819 #: ../fish/guestfish-actions.pod:2410 ../src/guestfs-actions.pod:3551
10821 "If one operating system was found, then this returns a list with a single "
10822 "element, which is the name of the root filesystem of this operating system. "
10823 "It is also possible for this function to return a list containing more than "
10824 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
10825 "element being the root filesystem of one of the operating systems."
10829 #: ../fish/guestfish-actions.pod:2417
10831 "You can pass the root string(s) returned to other L</inspect-get-*> "
10832 "functions in order to query further information about each operating system, "
10833 "such as the name and version."
10837 #: ../fish/guestfish-actions.pod:2422
10839 "This function uses other libguestfs features such as L</mount-ro> and L</"
10840 "umount-all> in order to mount and unmount filesystems and look at the "
10841 "contents. This should be called with no disks currently mounted. The "
10842 "function may also use Augeas, so any existing Augeas handle will be closed."
10846 #: ../fish/guestfish-actions.pod:2428 ../src/guestfs-actions.pod:3569
10848 "This function cannot decrypt encrypted disks. The caller must do that first "
10849 "(supplying the necessary keys) if the disk is encrypted."
10853 #: ../fish/guestfish-actions.pod:2434 ../fish/guestfish-actions.pod:2632
10854 #: ../fish/guestfish-actions.pod:2691
10855 msgid "See also L</list-filesystems>."
10859 #: ../fish/guestfish-actions.pod:2436
10860 msgid "is-blockdev"
10864 #: ../fish/guestfish-actions.pod:2438
10867 " is-blockdev path\n"
10872 #: ../fish/guestfish-actions.pod:2440 ../src/guestfs-actions.pod:3589
10874 "This returns C<true> if and only if there is a block device with the given "
10879 #: ../fish/guestfish-actions.pod:2443 ../fish/guestfish-actions.pod:2461
10880 #: ../fish/guestfish-actions.pod:2480 ../fish/guestfish-actions.pod:2489
10881 #: ../fish/guestfish-actions.pod:2499 ../fish/guestfish-actions.pod:2533
10882 #: ../fish/guestfish-actions.pod:2542
10883 msgid "See also L</stat>."
10887 #: ../fish/guestfish-actions.pod:2445
10892 #: ../fish/guestfish-actions.pod:2447
10900 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3603
10902 "This returns true iff this handle is busy processing a command (in the "
10907 #: ../fish/guestfish-actions.pod:2454
10912 #: ../fish/guestfish-actions.pod:2456
10915 " is-chardev path\n"
10920 #: ../fish/guestfish-actions.pod:2458 ../src/guestfs-actions.pod:3618
10922 "This returns C<true> if and only if there is a character device with the "
10923 "given C<path> name."
10927 #: ../fish/guestfish-actions.pod:2463
10932 #: ../fish/guestfish-actions.pod:2465
10940 #: ../fish/guestfish-actions.pod:2467 ../src/guestfs-actions.pod:3632
10942 "This returns true iff this handle is being configured (in the C<CONFIG> "
10947 #: ../fish/guestfish-actions.pod:2472
10952 #: ../fish/guestfish-actions.pod:2474
10960 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3647
10962 "This returns C<true> if and only if there is a directory with the given "
10963 "C<path> name. Note that it returns false for other objects like files."
10967 #: ../fish/guestfish-actions.pod:2482
10972 #: ../fish/guestfish-actions.pod:2484
10980 #: ../fish/guestfish-actions.pod:2486 ../src/guestfs-actions.pod:3663
10982 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
10983 "given C<path> name."
10987 #: ../fish/guestfish-actions.pod:2491
10992 #: ../fish/guestfish-actions.pod:2493
11000 #: ../fish/guestfish-actions.pod:2495 ../src/guestfs-actions.pod:3678
11002 "This returns C<true> if and only if there is a regular file with the given "
11003 "C<path> name. Note that it returns false for other objects like directories."
11007 #: ../fish/guestfish-actions.pod:2501
11008 msgid "is-launching"
11012 #: ../fish/guestfish-actions.pod:2503
11020 #: ../fish/guestfish-actions.pod:2505 ../src/guestfs-actions.pod:3693
11022 "This returns true iff this handle is launching the subprocess (in the "
11023 "C<LAUNCHING> state)."
11027 #: ../fish/guestfish-actions.pod:2510
11032 #: ../fish/guestfish-actions.pod:2512
11040 #: ../fish/guestfish-actions.pod:2514 ../src/guestfs-actions.pod:3708
11042 "This command tests whether C<device> is a logical volume, and returns true "
11043 "iff this is the case."
11047 #: ../fish/guestfish-actions.pod:2517
11052 #: ../fish/guestfish-actions.pod:2519
11060 #: ../fish/guestfish-actions.pod:2521 ../src/guestfs-actions.pod:3720
11062 "This returns true iff this handle is ready to accept commands (in the "
11067 #: ../fish/guestfish-actions.pod:2526
11072 #: ../fish/guestfish-actions.pod:2528
11075 " is-socket path\n"
11080 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3735
11082 "This returns C<true> if and only if there is a Unix domain socket with the "
11083 "given C<path> name."
11087 #: ../fish/guestfish-actions.pod:2535
11092 #: ../fish/guestfish-actions.pod:2537
11095 " is-symlink path\n"
11100 #: ../fish/guestfish-actions.pod:2539 ../src/guestfs-actions.pod:3750
11102 "This returns C<true> if and only if there is a symbolic link with the given "
11107 #: ../fish/guestfish-actions.pod:2544
11112 #: ../fish/guestfish-actions.pod:2546
11120 #: ../fish/guestfish-actions.pod:2548 ../src/guestfs-actions.pod:3765
11122 "This returns true iff the file exists and the file is empty or it contains "
11127 #: ../fish/guestfish-actions.pod:2551
11128 msgid "is-zero-device"
11132 #: ../fish/guestfish-actions.pod:2553
11135 " is-zero-device device\n"
11140 #: ../fish/guestfish-actions.pod:2555 ../src/guestfs-actions.pod:3778
11141 msgid "This returns true iff the device exists and contains all zero bytes."
11145 #: ../fish/guestfish-actions.pod:2557 ../src/guestfs-actions.pod:3780
11146 msgid "Note that for large devices this can take a long time to run."
11150 #: ../fish/guestfish-actions.pod:2559
11151 msgid "kill-subprocess"
11155 #: ../fish/guestfish-actions.pod:2561
11158 " kill-subprocess\n"
11163 #: ../fish/guestfish-actions.pod:2563 ../src/guestfs-actions.pod:3791
11164 msgid "This kills the qemu subprocess. You should never need to call this."
11168 #: ../fish/guestfish-actions.pod:2565
11173 #: ../fish/guestfish-actions.pod:2567
11178 #: ../fish/guestfish-actions.pod:2569
11186 #: ../fish/guestfish-actions.pod:2571 ../src/guestfs-actions.pod:3802
11188 "Internally libguestfs is implemented by running a virtual machine using "
11193 #: ../fish/guestfish-actions.pod:2574 ../src/guestfs-actions.pod:3805
11195 "You should call this after configuring the handle (eg. adding drives) but "
11196 "before performing any actions."
11200 #: ../fish/guestfish-actions.pod:2577
11205 #: ../fish/guestfish-actions.pod:2579
11208 " lchown owner group path\n"
11213 #: ../fish/guestfish-actions.pod:2581
11215 "Change the file owner to C<owner> and group to C<group>. This is like L</"
11216 "chown> but if C<path> is a symlink then the link itself is changed, not the "
11221 #: ../fish/guestfish-actions.pod:2589
11226 #: ../fish/guestfish-actions.pod:2591
11229 " lgetxattr path name\n"
11234 #: ../fish/guestfish-actions.pod:2593 ../src/guestfs-actions.pod:3845
11236 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11237 "is a symlink, then this call returns an extended attribute from the symlink."
11241 #: ../fish/guestfish-actions.pod:2607
11242 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11246 #: ../fish/guestfish-actions.pod:2609
11251 #: ../fish/guestfish-actions.pod:2611
11254 " lgetxattrs path\n"
11259 #: ../fish/guestfish-actions.pod:2613
11261 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11262 "it returns the extended attributes of the link itself."
11266 #: ../fish/guestfish-actions.pod:2617
11271 #: ../fish/guestfish-actions.pod:2619
11279 #: ../fish/guestfish-actions.pod:2621 ../src/guestfs-actions.pod:3888
11281 "List all 9p filesystems attached to the guest. A list of mount tags is "
11286 #: ../fish/guestfish-actions.pod:2624
11287 msgid "list-devices"
11291 #: ../fish/guestfish-actions.pod:2626
11299 #: ../fish/guestfish-actions.pod:2628 ../src/guestfs-actions.pod:3902
11300 msgid "List all the block devices."
11304 #: ../fish/guestfish-actions.pod:2630 ../src/guestfs-actions.pod:3904
11305 msgid "The full block device names are returned, eg. C</dev/sda>."
11309 #: ../fish/guestfish-actions.pod:2634
11310 msgid "list-dm-devices"
11314 #: ../fish/guestfish-actions.pod:2636
11317 " list-dm-devices\n"
11322 #: ../fish/guestfish-actions.pod:2638 ../src/guestfs-actions.pod:3919
11323 msgid "List all device mapper devices."
11327 #: ../fish/guestfish-actions.pod:2640
11329 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11330 "previous call to L</luks-open>."
11334 #: ../fish/guestfish-actions.pod:2643
11336 "Device mapper devices which correspond to logical volumes are I<not> "
11337 "returned in this list. Call L</lvs> if you want to list logical volumes."
11341 #: ../fish/guestfish-actions.pod:2647
11342 msgid "list-filesystems"
11346 #: ../fish/guestfish-actions.pod:2649
11349 " list-filesystems\n"
11354 #: ../fish/guestfish-actions.pod:2651 ../src/guestfs-actions.pod:3939
11356 "This inspection command looks for filesystems on partitions, block devices "
11357 "and logical volumes, returning a list of devices containing filesystems and "
11362 #: ../fish/guestfish-actions.pod:2655 ../src/guestfs-actions.pod:3943
11364 "The return value is a hash, where the keys are the devices containing "
11365 "filesystems, and the values are the filesystem types. For example:"
11369 #: ../fish/guestfish-actions.pod:2659 ../src/guestfs-actions.pod:3947
11372 " \"/dev/sda1\" => \"ntfs\"\n"
11373 " \"/dev/sda2\" => \"ext2\"\n"
11374 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11375 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11380 #: ../fish/guestfish-actions.pod:2664 ../src/guestfs-actions.pod:3952
11382 "The value can have the special value \"unknown\", meaning the content of the "
11383 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11387 #: ../fish/guestfish-actions.pod:2668
11389 "This command runs other libguestfs commands, which might include L</mount> "
11390 "and L</umount>, and therefore you should use this soon after launch and only "
11391 "when nothing is mounted."
11395 #: ../fish/guestfish-actions.pod:2672
11397 "Not all of the filesystems returned will be mountable. In particular, swap "
11398 "partitions are returned in the list. Also this command does not check that "
11399 "each filesystem found is valid and mountable, and some filesystems might be "
11400 "mountable but require special options. Filesystems may not all belong to a "
11401 "single logical operating system (use L</inspect-os> to look for OSes)."
11405 #: ../fish/guestfish-actions.pod:2680
11406 msgid "list-partitions"
11410 #: ../fish/guestfish-actions.pod:2682
11413 " list-partitions\n"
11418 #: ../fish/guestfish-actions.pod:2684 ../src/guestfs-actions.pod:3981
11419 msgid "List all the partitions detected on all block devices."
11423 #: ../fish/guestfish-actions.pod:2686 ../src/guestfs-actions.pod:3983
11424 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11428 #: ../fish/guestfish-actions.pod:2688
11430 "This does not return logical volumes. For that you will need to call L</"
11435 #: ../fish/guestfish-actions.pod:2693
11440 #: ../fish/guestfish-actions.pod:2695
11448 #: ../fish/guestfish-actions.pod:2697 ../src/guestfs-actions.pod:4002
11450 "List the files in C<directory> (relative to the root directory, there is no "
11451 "cwd) in the format of 'ls -la'."
11455 #: ../fish/guestfish-actions.pod:2700 ../src/guestfs-actions.pod:4005
11457 "This command is mostly useful for interactive sessions. It is I<not> "
11458 "intended that you try to parse the output string."
11462 #: ../fish/guestfish-actions.pod:2703
11467 #: ../fish/guestfish-actions.pod:2705
11470 " ln target linkname\n"
11475 #: ../fish/guestfish-actions.pod:2707 ../src/guestfs-actions.pod:4020
11476 msgid "This command creates a hard link using the C<ln> command."
11480 #: ../fish/guestfish-actions.pod:2709
11485 #: ../fish/guestfish-actions.pod:2711
11488 " ln-f target linkname\n"
11493 #: ../fish/guestfish-actions.pod:2713 ../src/guestfs-actions.pod:4033
11495 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11496 "option removes the link (C<linkname>) if it exists already."
11500 #: ../fish/guestfish-actions.pod:2716
11505 #: ../fish/guestfish-actions.pod:2718
11508 " ln-s target linkname\n"
11513 #: ../fish/guestfish-actions.pod:2720 ../src/guestfs-actions.pod:4047
11514 msgid "This command creates a symbolic link using the C<ln -s> command."
11518 #: ../fish/guestfish-actions.pod:2722
11523 #: ../fish/guestfish-actions.pod:2724
11526 " ln-sf target linkname\n"
11531 #: ../fish/guestfish-actions.pod:2726 ../src/guestfs-actions.pod:4060
11533 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11534 "option removes the link (C<linkname>) if it exists already."
11538 #: ../fish/guestfish-actions.pod:2729
11539 msgid "lremovexattr"
11543 #: ../fish/guestfish-actions.pod:2731
11546 " lremovexattr xattr path\n"
11551 #: ../fish/guestfish-actions.pod:2733
11553 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11554 "it removes an extended attribute of the link itself."
11558 #: ../fish/guestfish-actions.pod:2737
11563 #: ../fish/guestfish-actions.pod:2739
11571 #: ../fish/guestfish-actions.pod:2741 ../src/guestfs-actions.pod:4088
11573 "List the files in C<directory> (relative to the root directory, there is no "
11574 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
11578 #: ../fish/guestfish-actions.pod:2745
11580 "This command is mostly useful for interactive sessions. Programs should "
11581 "probably use L</readdir> instead."
11585 #: ../fish/guestfish-actions.pod:2748
11590 #: ../fish/guestfish-actions.pod:2750
11593 " lsetxattr xattr val vallen path\n"
11598 #: ../fish/guestfish-actions.pod:2752
11600 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11601 "sets an extended attribute of the link itself."
11605 #: ../fish/guestfish-actions.pod:2756
11610 #: ../fish/guestfish-actions.pod:2758
11618 #: ../fish/guestfish-actions.pod:2760 ../fish/guestfish-actions.pod:4570
11619 #: ../src/guestfs-actions.pod:4124 ../src/guestfs-actions.pod:6909
11620 msgid "Returns file information for the given C<path>."
11624 #: ../fish/guestfish-actions.pod:2762
11626 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11627 "the link is stat-ed, not the file it refers to."
11631 #: ../fish/guestfish-actions.pod:2766 ../src/guestfs-actions.pod:4130
11632 msgid "This is the same as the C<lstat(2)> system call."
11636 #: ../fish/guestfish-actions.pod:2768
11641 #: ../fish/guestfish-actions.pod:2770
11644 " lstatlist path 'names ...'\n"
11649 #: ../fish/guestfish-actions.pod:2772
11651 "This call allows you to perform the L</lstat> operation on multiple files, "
11652 "where all files are in the directory C<path>. C<names> is the list of files "
11653 "from this directory."
11657 #: ../fish/guestfish-actions.pod:2776 ../src/guestfs-actions.pod:4149
11659 "On return you get a list of stat structs, with a one-to-one correspondence "
11660 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11661 "then the C<ino> field of that structure is set to C<-1>."
11665 #: ../fish/guestfish-actions.pod:2781
11667 "This call is intended for programs that want to efficiently list a directory "
11668 "contents without making many round-trips. See also L</lxattrlist> for a "
11669 "similarly efficient call for getting extended attributes. Very long "
11670 "directory listings might cause the protocol message size to be exceeded, "
11671 "causing this call to fail. The caller must split up such requests into "
11672 "smaller groups of names."
11676 #: ../fish/guestfish-actions.pod:2789
11677 msgid "luks-add-key"
11681 #: ../fish/guestfish-actions.pod:2791
11684 " luks-add-key device keyslot\n"
11689 #: ../fish/guestfish-actions.pod:2793 ../src/guestfs-actions.pod:4177
11691 "This command adds a new key on LUKS device C<device>. C<key> is any "
11692 "existing key, and is used to access the device. C<newkey> is the new key to "
11693 "add. C<keyslot> is the key slot that will be replaced."
11697 #: ../fish/guestfish-actions.pod:2798
11699 "Note that if C<keyslot> already contains a key, then this command will "
11700 "fail. You have to use L</luks-kill-slot> first to remove that key."
11704 #: ../fish/guestfish-actions.pod:2802 ../fish/guestfish-actions.pod:2824
11705 #: ../fish/guestfish-actions.pod:2837 ../fish/guestfish-actions.pod:2851
11706 #: ../fish/guestfish-actions.pod:2877 ../fish/guestfish-actions.pod:2887
11708 "This command has one or more key or passphrase parameters. Guestfish will "
11709 "prompt for these separately."
11713 #: ../fish/guestfish-actions.pod:2805
11718 #: ../fish/guestfish-actions.pod:2807
11721 " luks-close device\n"
11726 #: ../fish/guestfish-actions.pod:2809
11728 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
11729 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
11730 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
11735 #: ../fish/guestfish-actions.pod:2815
11736 msgid "luks-format"
11740 #: ../fish/guestfish-actions.pod:2817
11743 " luks-format device keyslot\n"
11748 #: ../fish/guestfish-actions.pod:2819 ../src/guestfs-actions.pod:4218
11750 "This command erases existing data on C<device> and formats the device as a "
11751 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11752 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11756 #: ../fish/guestfish-actions.pod:2827 ../fish/guestfish-actions.pod:2840
11757 #: ../fish/guestfish-actions.pod:2927 ../fish/guestfish-actions.pod:3578
11758 #: ../fish/guestfish-actions.pod:4104 ../fish/guestfish-actions.pod:4441
11759 #: ../fish/guestfish-actions.pod:4464 ../fish/guestfish-actions.pod:4486
11760 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:4225
11761 #: ../src/guestfs-actions.pod:4248 ../src/guestfs-actions.pod:4391
11762 #: ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:6272
11763 #: ../src/guestfs-actions.pod:6723 ../src/guestfs-actions.pod:6753
11764 #: ../src/guestfs-actions.pod:6786 ../src/guestfs-actions.pod:7985
11766 "B<This command is dangerous. Without careful use you can easily destroy all "
11771 #: ../fish/guestfish-actions.pod:2830
11772 msgid "luks-format-cipher"
11776 #: ../fish/guestfish-actions.pod:2832
11779 " luks-format-cipher device keyslot cipher\n"
11784 #: ../fish/guestfish-actions.pod:2834
11786 "This command is the same as L</luks-format> but it also allows you to set "
11787 "the C<cipher> used."
11791 #: ../fish/guestfish-actions.pod:2843
11792 msgid "luks-kill-slot"
11796 #: ../fish/guestfish-actions.pod:2845
11799 " luks-kill-slot device keyslot\n"
11804 #: ../fish/guestfish-actions.pod:2847 ../src/guestfs-actions.pod:4265
11806 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
11807 "device C<device>. C<key> must be one of the I<other> keys."
11811 #: ../fish/guestfish-actions.pod:2854
11816 #: ../fish/guestfish-actions.pod:2856
11819 " luks-open device mapname\n"
11824 #: ../fish/guestfish-actions.pod:2858 ../src/guestfs-actions.pod:4285
11826 "This command opens a block device which has been encrypted according to the "
11827 "Linux Unified Key Setup (LUKS) standard."
11831 #: ../fish/guestfish-actions.pod:2861 ../src/guestfs-actions.pod:4288
11832 msgid "C<device> is the encrypted block device or partition."
11836 #: ../fish/guestfish-actions.pod:2863 ../src/guestfs-actions.pod:4290
11838 "The caller must supply one of the keys associated with the LUKS block "
11839 "device, in the C<key> parameter."
11843 #: ../fish/guestfish-actions.pod:2866 ../src/guestfs-actions.pod:4293
11845 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
11846 "writes to this block device are decrypted from and encrypted to the "
11847 "underlying C<device> respectively."
11851 #: ../fish/guestfish-actions.pod:2870
11853 "If this block device contains LVM volume groups, then calling L</vgscan> "
11854 "followed by L</vg-activate-all> will make them visible."
11858 #: ../fish/guestfish-actions.pod:2874
11859 msgid "Use L</list-dm-devices> to list all device mapper devices."
11863 #: ../fish/guestfish-actions.pod:2880
11864 msgid "luks-open-ro"
11868 #: ../fish/guestfish-actions.pod:2882
11871 " luks-open-ro device mapname\n"
11876 #: ../fish/guestfish-actions.pod:2884
11878 "This is the same as L</luks-open> except that a read-only mapping is created."
11882 #: ../fish/guestfish-actions.pod:2890
11887 #: ../fish/guestfish-actions.pod:2892
11890 " lvcreate logvol volgroup mbytes\n"
11895 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4339
11897 "This creates an LVM logical volume called C<logvol> on the volume group "
11898 "C<volgroup>, with C<size> megabytes."
11902 #: ../fish/guestfish-actions.pod:2897
11903 msgid "lvm-canonical-lv-name"
11907 #: ../fish/guestfish-actions.pod:2899
11910 " lvm-canonical-lv-name lvname\n"
11915 #: ../fish/guestfish-actions.pod:2901 ../src/guestfs-actions.pod:4352
11917 "This converts alternative naming schemes for LVs that you might find to the "
11918 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
11923 #: ../fish/guestfish-actions.pod:2905 ../src/guestfs-actions.pod:4356
11925 "This command returns an error if the C<lvname> parameter does not refer to a "
11930 #: ../fish/guestfish-actions.pod:2908
11931 msgid "See also L</is-lv>."
11935 #: ../fish/guestfish-actions.pod:2910
11936 msgid "lvm-clear-filter"
11940 #: ../fish/guestfish-actions.pod:2912
11943 " lvm-clear-filter\n"
11948 #: ../fish/guestfish-actions.pod:2914
11950 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
11955 #: ../fish/guestfish-actions.pod:2917 ../fish/guestfish-actions.pod:2948
11956 #: ../src/guestfs-actions.pod:4374 ../src/guestfs-actions.pod:4416
11958 "This command also clears the LVM cache and performs a volume group scan."
11962 #: ../fish/guestfish-actions.pod:2920
11963 msgid "lvm-remove-all"
11967 #: ../fish/guestfish-actions.pod:2922
11970 " lvm-remove-all\n"
11975 #: ../fish/guestfish-actions.pod:2924 ../src/guestfs-actions.pod:4386
11977 "This command removes all LVM logical volumes, volume groups and physical "
11982 #: ../fish/guestfish-actions.pod:2930
11983 msgid "lvm-set-filter"
11987 #: ../fish/guestfish-actions.pod:2932
11990 " lvm-set-filter 'devices ...'\n"
11995 #: ../fish/guestfish-actions.pod:2934 ../src/guestfs-actions.pod:4402
11997 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
11998 "block devices in the list C<devices>, and will ignore all other attached "
12003 #: ../fish/guestfish-actions.pod:2938 ../src/guestfs-actions.pod:4406
12005 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12006 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12007 "there are two types of duplication possible: either cloned PVs/VGs which "
12008 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12009 "same name. In normal operation you cannot create this situation, but you "
12010 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12011 "inside the LVM metadata."
12015 #: ../fish/guestfish-actions.pod:2951 ../src/guestfs-actions.pod:4419
12016 msgid "You can filter whole block devices or individual partitions."
12020 #: ../fish/guestfish-actions.pod:2953 ../src/guestfs-actions.pod:4421
12022 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12023 "filesystem), even if you are not filtering out that VG."
12027 #: ../fish/guestfish-actions.pod:2957
12032 #: ../fish/guestfish-actions.pod:2959
12035 " lvremove device\n"
12040 #: ../fish/guestfish-actions.pod:2961 ../src/guestfs-actions.pod:4435
12042 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12043 "LV, such as C</dev/VG/LV>."
12047 #: ../fish/guestfish-actions.pod:2964 ../src/guestfs-actions.pod:4438
12049 "You can also remove all LVs in a volume group by specifying the VG name, C</"
12054 #: ../fish/guestfish-actions.pod:2967
12059 #: ../fish/guestfish-actions.pod:2969
12062 " lvrename logvol newlogvol\n"
12067 #: ../fish/guestfish-actions.pod:2971 ../src/guestfs-actions.pod:4452
12068 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12072 #: ../fish/guestfish-actions.pod:2973
12077 #: ../fish/guestfish-actions.pod:2975
12080 " lvresize device mbytes\n"
12085 #: ../fish/guestfish-actions.pod:2977 ../src/guestfs-actions.pod:4465
12087 "This resizes (expands or shrinks) an existing LVM logical volume to "
12088 "C<mbytes>. When reducing, data in the reduced part is lost."
12092 #: ../fish/guestfish-actions.pod:2981
12093 msgid "lvresize-free"
12097 #: ../fish/guestfish-actions.pod:2983
12100 " lvresize-free lv percent\n"
12105 #: ../fish/guestfish-actions.pod:2985 ../src/guestfs-actions.pod:4480
12107 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12108 "remaining free space in the volume group. Commonly you would call this with "
12109 "pc = 100 which expands the logical volume as much as possible, using all "
12110 "remaining free space in the volume group."
12114 #: ../fish/guestfish-actions.pod:2991
12119 #: ../fish/guestfish-actions.pod:2993
12127 #: ../fish/guestfish-actions.pod:2995 ../src/guestfs-actions.pod:4495
12129 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12134 #: ../fish/guestfish-actions.pod:2998 ../src/guestfs-actions.pod:4498
12136 "This returns a list of the logical volume device names (eg. C</dev/"
12137 "VolGroup00/LogVol00>)."
12141 #: ../fish/guestfish-actions.pod:3001
12142 msgid "See also L</lvs-full>, L</list-filesystems>."
12146 #: ../fish/guestfish-actions.pod:3003
12151 #: ../fish/guestfish-actions.pod:3005
12159 #: ../fish/guestfish-actions.pod:3007 ../src/guestfs-actions.pod:4514
12161 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12162 "(8)> command. The \"full\" version includes all fields."
12166 #: ../fish/guestfish-actions.pod:3010
12171 #: ../fish/guestfish-actions.pod:3012
12179 #: ../fish/guestfish-actions.pod:3014 ../src/guestfs-actions.pod:4529
12180 msgid "This command returns the UUID of the LVM LV C<device>."
12184 #: ../fish/guestfish-actions.pod:3016
12189 #: ../fish/guestfish-actions.pod:3018
12192 " lxattrlist path 'names ...'\n"
12197 #: ../fish/guestfish-actions.pod:3020 ../src/guestfs-actions.pod:4543
12199 "This call allows you to get the extended attributes of multiple files, where "
12200 "all files are in the directory C<path>. C<names> is the list of files from "
12205 #: ../fish/guestfish-actions.pod:3024 ../src/guestfs-actions.pod:4547
12207 "On return you get a flat list of xattr structs which must be interpreted "
12208 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12209 "C<attrval> in this struct is zero-length to indicate there was an error "
12210 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12211 "number (the number of following attributes for this file, which could be C<"
12212 "\"0\">). Then after the first xattr struct are the zero or more attributes "
12213 "for the first named file. This repeats for the second and subsequent files."
12217 #: ../fish/guestfish-actions.pod:3034
12219 "This call is intended for programs that want to efficiently list a directory "
12220 "contents without making many round-trips. See also L</lstatlist> for a "
12221 "similarly efficient call for getting standard stats. Very long directory "
12222 "listings might cause the protocol message size to be exceeded, causing this "
12223 "call to fail. The caller must split up such requests into smaller groups of "
12228 #: ../fish/guestfish-actions.pod:3042
12233 #: ../fish/guestfish-actions.pod:3044
12241 #: ../fish/guestfish-actions.pod:3046 ../src/guestfs-actions.pod:4577
12242 msgid "Create a directory named C<path>."
12246 #: ../fish/guestfish-actions.pod:3048
12251 #: ../fish/guestfish-actions.pod:3050
12254 " mkdir-mode path mode\n"
12259 #: ../fish/guestfish-actions.pod:3052 ../src/guestfs-actions.pod:4590
12261 "This command creates a directory, setting the initial permissions of the "
12262 "directory to C<mode>."
12266 #: ../fish/guestfish-actions.pod:3055 ../src/guestfs-actions.pod:4593
12268 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12269 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12274 #: ../fish/guestfish-actions.pod:3059
12275 msgid "See also L</mkdir>, L</umask>"
12279 #: ../fish/guestfish-actions.pod:3061
12284 #: ../fish/guestfish-actions.pod:3063
12292 #: ../fish/guestfish-actions.pod:3065 ../src/guestfs-actions.pod:4609
12294 "Create a directory named C<path>, creating any parent directories as "
12295 "necessary. This is like the C<mkdir -p> shell command."
12299 #: ../fish/guestfish-actions.pod:3068
12304 #: ../fish/guestfish-actions.pod:3070
12307 " mkdtemp template\n"
12312 #: ../fish/guestfish-actions.pod:3072 ../src/guestfs-actions.pod:4622
12314 "This command creates a temporary directory. The C<template> parameter "
12315 "should be a full pathname for the temporary directory name with the final "
12316 "six characters being \"XXXXXX\"."
12320 #: ../fish/guestfish-actions.pod:3077 ../src/guestfs-actions.pod:4627
12322 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12323 "being suitable for Windows filesystems."
12327 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4630
12328 msgid "The name of the temporary directory that was created is returned."
12332 #: ../fish/guestfish-actions.pod:3083 ../src/guestfs-actions.pod:4633
12333 msgid "The temporary directory is created with mode 0700 and is owned by root."
12337 #: ../fish/guestfish-actions.pod:3086 ../src/guestfs-actions.pod:4636
12339 "The caller is responsible for deleting the temporary directory and its "
12340 "contents after use."
12344 #: ../fish/guestfish-actions.pod:3089 ../src/guestfs-actions.pod:4639
12345 msgid "See also: L<mkdtemp(3)>"
12349 #: ../fish/guestfish-actions.pod:3091
12354 #: ../fish/guestfish-actions.pod:3093
12357 " mke2fs-J fstype blocksize device journal\n"
12362 #: ../fish/guestfish-actions.pod:3095 ../src/guestfs-actions.pod:4655
12364 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12365 "C<journal>. It is equivalent to the command:"
12369 #: ../fish/guestfish-actions.pod:3099 ../src/guestfs-actions.pod:4659
12372 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12377 #: ../fish/guestfish-actions.pod:3101
12378 msgid "See also L</mke2journal>."
12382 #: ../fish/guestfish-actions.pod:3103
12387 #: ../fish/guestfish-actions.pod:3105
12390 " mke2fs-JL fstype blocksize device label\n"
12395 #: ../fish/guestfish-actions.pod:3107 ../src/guestfs-actions.pod:4676
12397 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12398 "the journal labeled C<label>."
12402 #: ../fish/guestfish-actions.pod:3110
12403 msgid "See also L</mke2journal-L>."
12407 #: ../fish/guestfish-actions.pod:3112
12412 #: ../fish/guestfish-actions.pod:3114
12415 " mke2fs-JU fstype blocksize device uuid\n"
12420 #: ../fish/guestfish-actions.pod:3116 ../src/guestfs-actions.pod:4694
12422 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12423 "the journal with UUID C<uuid>."
12427 #: ../fish/guestfish-actions.pod:3119
12428 msgid "See also L</mke2journal-U>."
12432 #: ../fish/guestfish-actions.pod:3121
12433 msgid "mke2journal"
12437 #: ../fish/guestfish-actions.pod:3123
12440 " mke2journal blocksize device\n"
12445 #: ../fish/guestfish-actions.pod:3125 ../src/guestfs-actions.pod:4710
12447 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12452 #: ../fish/guestfish-actions.pod:3128 ../src/guestfs-actions.pod:4713
12455 " mke2fs -O journal_dev -b blocksize device\n"
12460 #: ../fish/guestfish-actions.pod:3130
12461 msgid "mke2journal-L"
12465 #: ../fish/guestfish-actions.pod:3132
12468 " mke2journal-L blocksize label device\n"
12473 #: ../fish/guestfish-actions.pod:3134 ../src/guestfs-actions.pod:4727
12474 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12478 #: ../fish/guestfish-actions.pod:3136
12479 msgid "mke2journal-U"
12483 #: ../fish/guestfish-actions.pod:3138
12486 " mke2journal-U blocksize uuid device\n"
12491 #: ../fish/guestfish-actions.pod:3140 ../src/guestfs-actions.pod:4741
12492 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12496 #: ../fish/guestfish-actions.pod:3142
12501 #: ../fish/guestfish-actions.pod:3144
12504 " mkfifo mode path\n"
12509 #: ../fish/guestfish-actions.pod:3146
12511 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12512 "is just a convenient wrapper around L</mknod>."
12516 #: ../fish/guestfish-actions.pod:3152
12521 #: ../fish/guestfish-actions.pod:3154
12524 " mkfs fstype device\n"
12529 #: ../fish/guestfish-actions.pod:3156 ../src/guestfs-actions.pod:4771
12531 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12532 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12536 #: ../fish/guestfish-actions.pod:3160
12541 #: ../fish/guestfish-actions.pod:3162
12544 " mkfs-b fstype blocksize device\n"
12549 #: ../fish/guestfish-actions.pod:3164
12551 "This call is similar to L</mkfs>, but it allows you to control the block "
12552 "size of the resulting filesystem. Supported block sizes depend on the "
12553 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12557 #: ../fish/guestfish-actions.pod:3169 ../fish/guestfish-actions.pod:3196
12558 #: ../src/guestfs-actions.pod:4799 ../src/guestfs-actions.pod:4837
12560 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12565 #: ../fish/guestfish-actions.pod:3172
12567 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12572 #: ../fish/guestfish-actions.pod:3179
12577 #: ../fish/guestfish-actions.pod:3181
12580 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
12585 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4824
12587 "This function creates a filesystem on C<device>. The filesystem type is "
12588 "C<fstype>, for example C<ext3>."
12592 #: ../fish/guestfish-actions.pod:3190 ../src/guestfs-actions.pod:4831
12593 msgid "C<blocksize>"
12597 #: ../fish/guestfish-actions.pod:3192 ../src/guestfs-actions.pod:4833
12599 "The filesystem block size. Supported block sizes depend on the filesystem "
12600 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12605 #: ../fish/guestfish-actions.pod:3199 ../src/guestfs-actions.pod:4840
12606 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12610 #: ../fish/guestfish-actions.pod:3201 ../src/guestfs-actions.pod:4842
12611 msgid "C<features>"
12615 #: ../fish/guestfish-actions.pod:3203 ../src/guestfs-actions.pod:4844
12616 msgid "This passes the I<-O> parameter to the external mkfs program."
12620 #: ../fish/guestfish-actions.pod:3205 ../src/guestfs-actions.pod:4846
12622 "For certain filesystem types, this allows extra filesystem features to be "
12623 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12627 #: ../fish/guestfish-actions.pod:3209 ../src/guestfs-actions.pod:4850
12629 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12634 #: ../fish/guestfish-actions.pod:3212 ../src/guestfs-actions.pod:4853
12639 #: ../fish/guestfish-actions.pod:3214 ../src/guestfs-actions.pod:4855
12641 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12642 "sets the inode size (only for ext2/3/4 filesystems at present)."
12646 #: ../fish/guestfish-actions.pod:3217 ../src/guestfs-actions.pod:4858
12647 msgid "C<sectorsize>"
12651 #: ../fish/guestfish-actions.pod:3219 ../src/guestfs-actions.pod:4860
12653 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12654 "sets sector size for ufs filesystem."
12658 #: ../fish/guestfish-actions.pod:3226
12659 msgid "mkmountpoint"
12663 #: ../fish/guestfish-actions.pod:3228
12666 " mkmountpoint exemptpath\n"
12671 #: ../fish/guestfish-actions.pod:3230
12673 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12674 "to create extra mountpoints before mounting the first filesystem."
12678 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4903
12680 "These calls are I<only> necessary in some very limited circumstances, mainly "
12681 "the case where you want to mount a mix of unrelated and/or read-only "
12682 "filesystems together."
12686 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4907
12688 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12689 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12690 "inside that. You can unpack this as follows in guestfish:"
12694 #: ../fish/guestfish-actions.pod:3243 ../src/guestfs-actions.pod:4912
12697 " add-ro Fedora-11-i686-Live.iso\n"
12699 " mkmountpoint /cd\n"
12700 " mkmountpoint /sqsh\n"
12701 " mkmountpoint /ext3fs\n"
12702 " mount /dev/sda /cd\n"
12703 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12704 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12709 #: ../fish/guestfish-actions.pod:3252 ../src/guestfs-actions.pod:4921
12710 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12714 #: ../fish/guestfish-actions.pod:3254
12716 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
12717 "unexpected errors if you try to mix these calls. It is safest to manually "
12718 "unmount filesystems and remove mountpoints after use."
12722 #: ../fish/guestfish-actions.pod:3258
12724 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
12725 "for this to work for manual mountpoints, you must ensure that the innermost "
12726 "mountpoints have the longest pathnames, as in the example code above."
12730 #: ../fish/guestfish-actions.pod:3263 ../src/guestfs-actions.pod:4932
12732 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12736 #: ../fish/guestfish-actions.pod:3265
12738 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
12739 "L</umount-all> to be called when the handle is closed which can also trigger "
12744 #: ../fish/guestfish-actions.pod:3269
12749 #: ../fish/guestfish-actions.pod:3271
12752 " mknod mode devmajor devminor path\n"
12757 #: ../fish/guestfish-actions.pod:3273 ../src/guestfs-actions.pod:4951
12759 "This call creates block or character special devices, or named pipes (FIFOs)."
12763 #: ../fish/guestfish-actions.pod:3276 ../src/guestfs-actions.pod:4954
12765 "The C<mode> parameter should be the mode, using the standard constants. "
12766 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
12767 "used when creating block and character special devices."
12771 #: ../fish/guestfish-actions.pod:3281
12773 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
12774 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
12775 "regular file). These constants are available in the standard Linux header "
12776 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
12777 "wrappers around this command which bitwise OR in the appropriate constant "
12782 #: ../fish/guestfish-actions.pod:3291
12787 #: ../fish/guestfish-actions.pod:3293
12790 " mknod-b mode devmajor devminor path\n"
12795 #: ../fish/guestfish-actions.pod:3295
12797 "This call creates a block device node called C<path> with mode C<mode> and "
12798 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12799 "wrapper around L</mknod>."
12803 #: ../fish/guestfish-actions.pod:3301
12808 #: ../fish/guestfish-actions.pod:3303
12811 " mknod-c mode devmajor devminor path\n"
12816 #: ../fish/guestfish-actions.pod:3305
12818 "This call creates a char device node called C<path> with mode C<mode> and "
12819 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12820 "wrapper around L</mknod>."
12824 #: ../fish/guestfish-actions.pod:3311
12829 #: ../fish/guestfish-actions.pod:3313
12837 #: ../fish/guestfish-actions.pod:3315 ../src/guestfs-actions.pod:5017
12838 msgid "Create a swap partition on C<device>."
12842 #: ../fish/guestfish-actions.pod:3317
12847 #: ../fish/guestfish-actions.pod:3319
12850 " mkswap-L label device\n"
12855 #: ../fish/guestfish-actions.pod:3321 ../src/guestfs-actions.pod:5030
12856 msgid "Create a swap partition on C<device> with label C<label>."
12860 #: ../fish/guestfish-actions.pod:3323 ../src/guestfs-actions.pod:5032
12862 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
12863 "sda>), just to a partition. This appears to be a limitation of the kernel "
12868 #: ../fish/guestfish-actions.pod:3327
12873 #: ../fish/guestfish-actions.pod:3329
12876 " mkswap-U uuid device\n"
12881 #: ../fish/guestfish-actions.pod:3331 ../src/guestfs-actions.pod:5047
12882 msgid "Create a swap partition on C<device> with UUID C<uuid>."
12886 #: ../fish/guestfish-actions.pod:3333
12887 msgid "mkswap-file"
12891 #: ../fish/guestfish-actions.pod:3335
12894 " mkswap-file path\n"
12899 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5059
12900 msgid "Create a swap file."
12904 #: ../fish/guestfish-actions.pod:3339
12906 "This command just writes a swap file signature to an existing file. To "
12907 "create the file itself, use something like L</fallocate>."
12911 #: ../fish/guestfish-actions.pod:3342
12916 #: ../fish/guestfish-actions.pod:3344
12919 " modprobe modulename\n"
12924 #: ../fish/guestfish-actions.pod:3346 ../src/guestfs-actions.pod:5074
12925 msgid "This loads a kernel module in the appliance."
12929 #: ../fish/guestfish-actions.pod:3348 ../src/guestfs-actions.pod:5076
12931 "The kernel module must have been whitelisted when libguestfs was built (see "
12932 "C<appliance/kmod.whitelist.in> in the source)."
12936 #: ../fish/guestfish-actions.pod:3351
12941 #: ../fish/guestfish-actions.pod:3353
12944 " mount device mountpoint\n"
12949 #: ../fish/guestfish-actions.pod:3355 ../src/guestfs-actions.pod:5090
12951 "Mount a guest disk at a position in the filesystem. Block devices are named "
12952 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
12953 "those block devices contain partitions, they will have the usual names (eg. "
12954 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
12958 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5096
12960 "The rules are the same as for L<mount(2)>: A filesystem must first be "
12961 "mounted on C</> before others can be mounted. Other filesystems can only be "
12962 "mounted on directories which already exist."
12966 #: ../fish/guestfish-actions.pod:3366 ../src/guestfs-actions.pod:5101
12968 "The mounted filesystem is writable, if we have sufficient permissions on the "
12969 "underlying device."
12973 #: ../fish/guestfish-actions.pod:3369
12975 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
12976 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
12977 "problems for users. If your program might need to work with older versions "
12978 "of libguestfs, use L</mount-options> instead (using an empty string for the "
12979 "first parameter if you don't want any options)."
12983 #: ../fish/guestfish-actions.pod:3376
12988 #: ../fish/guestfish-actions.pod:3378
12991 " mount-9p mounttag mountpoint [options:..]\n"
12996 #: ../fish/guestfish-actions.pod:3380 ../src/guestfs-actions.pod:5130
12998 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
13003 #: ../fish/guestfish-actions.pod:3383 ../src/guestfs-actions.pod:5133
13005 "If required, C<trans=virtio> will be automatically added to the options. "
13006 "Any other options required can be passed in the optional C<options> "
13011 #: ../fish/guestfish-actions.pod:3389
13016 #: ../fish/guestfish-actions.pod:3391
13019 " mount-loop file mountpoint\n"
13024 #: ../fish/guestfish-actions.pod:3393 ../src/guestfs-actions.pod:5172
13026 "This command lets you mount C<file> (a filesystem image in a file) on a "
13027 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13032 #: ../fish/guestfish-actions.pod:3397
13033 msgid "mount-options"
13037 #: ../fish/guestfish-actions.pod:3399
13040 " mount-options options device mountpoint\n"
13045 #: ../fish/guestfish-actions.pod:3401
13047 "This is the same as the L</mount> command, but it allows you to set the "
13048 "mount options as for the L<mount(8)> I<-o> flag."
13052 #: ../fish/guestfish-actions.pod:3405 ../src/guestfs-actions.pod:5192
13054 "If the C<options> parameter is an empty string, then no options are passed "
13055 "(all options default to whatever the filesystem uses)."
13059 #: ../fish/guestfish-actions.pod:3409
13064 #: ../fish/guestfish-actions.pod:3411
13067 " mount-ro device mountpoint\n"
13072 #: ../fish/guestfish-actions.pod:3413
13074 "This is the same as the L</mount> command, but it mounts the filesystem with "
13075 "the read-only (I<-o ro>) flag."
13079 #: ../fish/guestfish-actions.pod:3416
13084 #: ../fish/guestfish-actions.pod:3418
13087 " mount-vfs options vfstype device mountpoint\n"
13092 #: ../fish/guestfish-actions.pod:3420
13094 "This is the same as the L</mount> command, but it allows you to set both the "
13095 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13099 #: ../fish/guestfish-actions.pod:3424
13100 msgid "mountpoints"
13104 #: ../fish/guestfish-actions.pod:3426
13112 #: ../fish/guestfish-actions.pod:3428
13114 "This call is similar to L</mounts>. That call returns a list of devices. "
13115 "This one returns a hash table (map) of device name to directory where the "
13116 "device is mounted."
13120 #: ../fish/guestfish-actions.pod:3432
13125 #: ../fish/guestfish-actions.pod:3434
13133 #: ../fish/guestfish-actions.pod:3436 ../src/guestfs-actions.pod:5253
13135 "This returns the list of currently mounted filesystems. It returns the list "
13136 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13140 #: ../fish/guestfish-actions.pod:3439 ../src/guestfs-actions.pod:5256
13141 msgid "Some internal mounts are not shown."
13145 #: ../fish/guestfish-actions.pod:3441
13146 msgid "See also: L</mountpoints>"
13150 #: ../fish/guestfish-actions.pod:3443
13155 #: ../fish/guestfish-actions.pod:3445
13163 #: ../fish/guestfish-actions.pod:3447 ../src/guestfs-actions.pod:5273
13165 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13166 "destination filename or destination directory."
13170 #: ../fish/guestfish-actions.pod:3450
13171 msgid "ntfs-3g-probe"
13175 #: ../fish/guestfish-actions.pod:3452
13178 " ntfs-3g-probe true|false device\n"
13183 #: ../fish/guestfish-actions.pod:3454 ../src/guestfs-actions.pod:5287
13185 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13186 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
13187 "write, and some cannot be mounted at all)."
13191 #: ../fish/guestfish-actions.pod:3458 ../src/guestfs-actions.pod:5291
13193 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13194 "can be mounted read-write. Set it to false if you want to test if the "
13195 "volume can be mounted read-only."
13199 #: ../fish/guestfish-actions.pod:3462 ../src/guestfs-actions.pod:5295
13201 "The return value is an integer which C<0> if the operation would succeed, or "
13202 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13206 #: ../fish/guestfish-actions.pod:3466
13211 #: ../fish/guestfish-actions.pod:3468
13214 " ntfsresize device\n"
13219 #: ../fish/guestfish-actions.pod:3470 ../fish/guestfish-actions.pod:3494
13220 #: ../src/guestfs-actions.pod:5316 ../src/guestfs-actions.pod:5348
13222 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13223 "size of the underlying device."
13227 #: ../fish/guestfish-actions.pod:3473 ../src/guestfs-actions.pod:5319
13229 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13230 "consistency check (for safety). You have to boot into Windows to perform "
13231 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13232 "resize filesystems which have been marked in this way. So in effect it is "
13233 "not possible to call ntfsresize multiple times on a single filesystem "
13234 "without booting into Windows between each resize."
13238 #: ../fish/guestfish-actions.pod:3481 ../fish/guestfish-actions.pod:3520
13239 #: ../src/guestfs-actions.pod:5327 ../src/guestfs-actions.pod:5374
13240 msgid "See also L<ntfsresize(8)>."
13244 #: ../fish/guestfish-actions.pod:3483 ../fish/guestfish-actions.pod:3531
13246 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13251 #: ../fish/guestfish-actions.pod:3490
13252 msgid "ntfsresize-opts"
13256 #: ../fish/guestfish-actions.pod:3492
13259 " ntfsresize-opts device [size:..] [force:..]\n"
13264 #: ../fish/guestfish-actions.pod:3503 ../src/guestfs-actions.pod:5357
13266 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13267 "resized to fit the container (eg. partition)."
13271 #: ../fish/guestfish-actions.pod:3506 ../src/guestfs-actions.pod:5360
13276 #: ../fish/guestfish-actions.pod:3508 ../src/guestfs-actions.pod:5362
13278 "If this option is true, then force the resize of the filesystem even if the "
13279 "filesystem is marked as requiring a consistency check."
13283 #: ../fish/guestfish-actions.pod:3511
13285 "After the resize operation, the filesystem is always marked as requiring a "
13286 "consistency check (for safety). You have to boot into Windows to perform "
13287 "this check and clear this condition. If you I<don't> set the C<force> "
13288 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13289 "a single filesystem without booting into Windows between each resize."
13293 #: ../fish/guestfish-actions.pod:3524
13294 msgid "ntfsresize-size"
13298 #: ../fish/guestfish-actions.pod:3526
13301 " ntfsresize-size device size\n"
13306 #: ../fish/guestfish-actions.pod:3528
13308 "This command is the same as L</ntfsresize> except that it allows you to "
13309 "specify the new size (in bytes) explicitly."
13313 #: ../fish/guestfish-actions.pod:3538
13318 #: ../fish/guestfish-actions.pod:3540
13321 " part-add device prlogex startsect endsect\n"
13326 #: ../fish/guestfish-actions.pod:3542
13328 "This command adds a partition to C<device>. If there is no partition table "
13329 "on the device, call L</part-init> first."
13333 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5435
13335 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13336 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13337 "C<logical>) and C<e> (or C<extended>) partition types."
13341 #: ../fish/guestfish-actions.pod:3550 ../src/guestfs-actions.pod:5440
13343 "C<startsect> and C<endsect> are the start and end of the partition in "
13344 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13345 "from the end of the disk (C<-1> is the last sector)."
13349 #: ../fish/guestfish-actions.pod:3554
13351 "Creating a partition which covers the whole disk is not so easy. Use L</"
13352 "part-disk> to do that."
13356 #: ../fish/guestfish-actions.pod:3557
13361 #: ../fish/guestfish-actions.pod:3559
13364 " part-del device partnum\n"
13369 #: ../fish/guestfish-actions.pod:3561 ../src/guestfs-actions.pod:5458
13370 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13374 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5460
13376 "Note that in the case of MBR partitioning, deleting an extended partition "
13377 "also deletes any logical partitions it contains."
13381 #: ../fish/guestfish-actions.pod:3567
13386 #: ../fish/guestfish-actions.pod:3569
13389 " part-disk device parttype\n"
13394 #: ../fish/guestfish-actions.pod:3571
13396 "This command is simply a combination of L</part-init> followed by L</part-"
13397 "add> to create a single primary partition covering the whole disk."
13401 #: ../fish/guestfish-actions.pod:3575
13403 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13404 "possible values are described in L</part-init>."
13408 #: ../fish/guestfish-actions.pod:3581
13409 msgid "part-get-bootable"
13413 #: ../fish/guestfish-actions.pod:3583
13416 " part-get-bootable device partnum\n"
13421 #: ../fish/guestfish-actions.pod:3585 ../src/guestfs-actions.pod:5496
13423 "This command returns true if the partition C<partnum> on C<device> has the "
13424 "bootable flag set."
13428 #: ../fish/guestfish-actions.pod:3588
13429 msgid "See also L</part-set-bootable>."
13433 #: ../fish/guestfish-actions.pod:3590
13434 msgid "part-get-mbr-id"
13438 #: ../fish/guestfish-actions.pod:3592
13441 " part-get-mbr-id device partnum\n"
13446 #: ../fish/guestfish-actions.pod:3594 ../src/guestfs-actions.pod:5512
13448 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13449 "partition C<partnum>."
13453 #: ../fish/guestfish-actions.pod:3597 ../fish/guestfish-actions.pod:3741
13455 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13456 "undefined results for other partition table types (see L</part-get-"
13461 #: ../fish/guestfish-actions.pod:3601
13462 msgid "part-get-parttype"
13466 #: ../fish/guestfish-actions.pod:3603
13469 " part-get-parttype device\n"
13474 #: ../fish/guestfish-actions.pod:3605 ../src/guestfs-actions.pod:5529
13476 "This command examines the partition table on C<device> and returns the "
13477 "partition table type (format) being used."
13481 #: ../fish/guestfish-actions.pod:3608
13483 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13484 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13485 "possible, although unusual. See L</part-init> for a full list."
13489 #: ../fish/guestfish-actions.pod:3613
13494 #: ../fish/guestfish-actions.pod:3615
13497 " part-init device parttype\n"
13502 #: ../fish/guestfish-actions.pod:3617 ../src/guestfs-actions.pod:5549
13504 "This creates an empty partition table on C<device> of one of the partition "
13505 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13506 "(for large disks)."
13510 #: ../fish/guestfish-actions.pod:3621
13512 "Initially there are no partitions. Following this, you should call L</part-"
13513 "add> for each partition required."
13517 #: ../fish/guestfish-actions.pod:3624 ../src/guestfs-actions.pod:5556
13518 msgid "Possible values for C<parttype> are:"
13522 #: ../fish/guestfish-actions.pod:3628 ../src/guestfs-actions.pod:5560
13527 #: ../fish/guestfish-actions.pod:3630 ../src/guestfs-actions.pod:5562
13532 #: ../fish/guestfish-actions.pod:3632 ../src/guestfs-actions.pod:5564
13533 msgid "Intel EFI / GPT partition table."
13537 #: ../fish/guestfish-actions.pod:3634 ../src/guestfs-actions.pod:5566
13539 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13540 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13541 "the C<mbr> format."
13545 #: ../fish/guestfish-actions.pod:3638 ../src/guestfs-actions.pod:5570
13550 #: ../fish/guestfish-actions.pod:3640 ../src/guestfs-actions.pod:5572
13555 #: ../fish/guestfish-actions.pod:3642 ../src/guestfs-actions.pod:5574
13557 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13558 "Windows. This partition type will B<only> work for device sizes up to 2 "
13559 "TB. For large disks we recommend using C<gpt>."
13563 #: ../fish/guestfish-actions.pod:3649 ../src/guestfs-actions.pod:5581
13565 "Other partition table types that may work but are not supported include:"
13569 #: ../fish/guestfish-actions.pod:3654 ../src/guestfs-actions.pod:5586
13574 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5588
13575 msgid "AIX disk labels."
13579 #: ../fish/guestfish-actions.pod:3658 ../src/guestfs-actions.pod:5590
13584 #: ../fish/guestfish-actions.pod:3660 ../src/guestfs-actions.pod:5592
13589 #: ../fish/guestfish-actions.pod:3662 ../src/guestfs-actions.pod:5594
13590 msgid "Amiga \"Rigid Disk Block\" format."
13594 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5596
13599 #: ../fish/guestfish-actions.pod:3666 ../src/guestfs-actions.pod:5598
13600 msgid "BSD disk labels."
13604 #: ../fish/guestfish-actions.pod:3668 ../src/guestfs-actions.pod:5600
13609 #: ../fish/guestfish-actions.pod:3670 ../src/guestfs-actions.pod:5602
13610 msgid "DASD, used on IBM mainframes."
13614 #: ../fish/guestfish-actions.pod:3672 ../src/guestfs-actions.pod:5604
13619 #: ../fish/guestfish-actions.pod:3674 ../src/guestfs-actions.pod:5606
13620 msgid "MIPS/SGI volumes."
13624 #: ../fish/guestfish-actions.pod:3676 ../src/guestfs-actions.pod:5608
13629 #: ../fish/guestfish-actions.pod:3678 ../src/guestfs-actions.pod:5610
13630 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13634 #: ../fish/guestfish-actions.pod:3680 ../src/guestfs-actions.pod:5612
13639 #: ../fish/guestfish-actions.pod:3682 ../src/guestfs-actions.pod:5614
13640 msgid "NEC PC-98 format, common in Japan apparently."
13644 #: ../fish/guestfish-actions.pod:3684 ../src/guestfs-actions.pod:5616
13649 #: ../fish/guestfish-actions.pod:3686 ../src/guestfs-actions.pod:5618
13650 msgid "Sun disk labels."
13654 #: ../fish/guestfish-actions.pod:3690
13659 #: ../fish/guestfish-actions.pod:3692
13662 " part-list device\n"
13667 #: ../fish/guestfish-actions.pod:3694 ../src/guestfs-actions.pod:5632
13669 "This command parses the partition table on C<device> and returns the list of "
13670 "partitions found."
13674 #: ../fish/guestfish-actions.pod:3697 ../src/guestfs-actions.pod:5635
13675 msgid "The fields in the returned structure are:"
13679 #: ../fish/guestfish-actions.pod:3701 ../src/guestfs-actions.pod:5639
13680 msgid "B<part_num>"
13684 #: ../fish/guestfish-actions.pod:3703 ../src/guestfs-actions.pod:5641
13685 msgid "Partition number, counting from 1."
13689 #: ../fish/guestfish-actions.pod:3705 ../src/guestfs-actions.pod:5643
13690 msgid "B<part_start>"
13694 #: ../fish/guestfish-actions.pod:3707
13696 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13697 "the device's sector size, see L</blockdev-getss>."
13701 #: ../fish/guestfish-actions.pod:3710 ../src/guestfs-actions.pod:5648
13702 msgid "B<part_end>"
13706 #: ../fish/guestfish-actions.pod:3712 ../src/guestfs-actions.pod:5650
13707 msgid "End of the partition in bytes."
13711 #: ../fish/guestfish-actions.pod:3714 ../src/guestfs-actions.pod:5652
13712 msgid "B<part_size>"
13716 #: ../fish/guestfish-actions.pod:3716 ../src/guestfs-actions.pod:5654
13717 msgid "Size of the partition in bytes."
13721 #: ../fish/guestfish-actions.pod:3720
13722 msgid "part-set-bootable"
13726 #: ../fish/guestfish-actions.pod:3722
13729 " part-set-bootable device partnum true|false\n"
13734 #: ../fish/guestfish-actions.pod:3724 ../src/guestfs-actions.pod:5672
13736 "This sets the bootable flag on partition numbered C<partnum> on device "
13737 "C<device>. Note that partitions are numbered from 1."
13741 #: ../fish/guestfish-actions.pod:3727 ../src/guestfs-actions.pod:5675
13743 "The bootable flag is used by some operating systems (notably Windows) to "
13744 "determine which partition to boot from. It is by no means universally "
13749 #: ../fish/guestfish-actions.pod:3731
13750 msgid "part-set-mbr-id"
13754 #: ../fish/guestfish-actions.pod:3733
13757 " part-set-mbr-id device partnum idbyte\n"
13762 #: ../fish/guestfish-actions.pod:3735 ../src/guestfs-actions.pod:5691
13764 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
13765 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
13766 "documentation are in fact hexadecimal numbers, but usually documented "
13767 "without any leading \"0x\" which might be confusing."
13771 #: ../fish/guestfish-actions.pod:3745
13772 msgid "part-set-name"
13776 #: ../fish/guestfish-actions.pod:3747
13779 " part-set-name device partnum name\n"
13784 #: ../fish/guestfish-actions.pod:3749 ../src/guestfs-actions.pod:5713
13786 "This sets the partition name on partition numbered C<partnum> on device "
13787 "C<device>. Note that partitions are numbered from 1."
13791 #: ../fish/guestfish-actions.pod:3752 ../src/guestfs-actions.pod:5716
13793 "The partition name can only be set on certain types of partition table. "
13794 "This works on C<gpt> but not on C<mbr> partitions."
13798 #: ../fish/guestfish-actions.pod:3755
13799 msgid "part-to-dev"
13803 #: ../fish/guestfish-actions.pod:3757
13806 " part-to-dev partition\n"
13811 #: ../fish/guestfish-actions.pod:3759 ../src/guestfs-actions.pod:5729
13813 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
13814 "partition number, returning the device name (eg. \"/dev/sdb\")."
13818 #: ../fish/guestfish-actions.pod:3763
13820 "The named partition must exist, for example as a string returned from L</"
13821 "list-partitions>."
13825 #: ../fish/guestfish-actions.pod:3766
13826 msgid "ping-daemon"
13830 #: ../fish/guestfish-actions.pod:3768
13838 #: ../fish/guestfish-actions.pod:3770 ../src/guestfs-actions.pod:5746
13840 "This is a test probe into the guestfs daemon running inside the qemu "
13841 "subprocess. Calling this function checks that the daemon responds to the "
13842 "ping message, without affecting the daemon or attached block device(s) in "
13847 #: ../fish/guestfish-actions.pod:3775
13852 #: ../fish/guestfish-actions.pod:3777
13855 " pread path count offset\n"
13860 #: ../fish/guestfish-actions.pod:3779 ../src/guestfs-actions.pod:5764
13862 "This command lets you read part of a file. It reads C<count> bytes of the "
13863 "file, starting at C<offset>, from file C<path>."
13867 #: ../fish/guestfish-actions.pod:3782 ../fish/guestfish-actions.pod:3797
13868 #: ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5793
13870 "This may read fewer bytes than requested. For further details see the "
13871 "L<pread(2)> system call."
13875 #: ../fish/guestfish-actions.pod:3785
13876 msgid "See also L</pwrite>, L</pread-device>."
13880 #: ../fish/guestfish-actions.pod:3790
13881 msgid "pread-device"
13885 #: ../fish/guestfish-actions.pod:3792
13888 " pread-device device count offset\n"
13893 #: ../fish/guestfish-actions.pod:3794 ../src/guestfs-actions.pod:5790
13895 "This command lets you read part of a file. It reads C<count> bytes of "
13896 "C<device>, starting at C<offset>."
13900 #: ../fish/guestfish-actions.pod:3800
13901 msgid "See also L</pread>."
13905 #: ../fish/guestfish-actions.pod:3805
13910 #: ../fish/guestfish-actions.pod:3807
13913 " pvcreate device\n"
13918 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5813
13920 "This creates an LVM physical volume on the named C<device>, where C<device> "
13921 "should usually be a partition name such as C</dev/sda1>."
13925 #: ../fish/guestfish-actions.pod:3813
13930 #: ../fish/guestfish-actions.pod:3815
13933 " pvremove device\n"
13938 #: ../fish/guestfish-actions.pod:3817 ../src/guestfs-actions.pod:5827
13940 "This wipes a physical volume C<device> so that LVM will no longer recognise "
13945 #: ../fish/guestfish-actions.pod:3820 ../src/guestfs-actions.pod:5830
13947 "The implementation uses the C<pvremove> command which refuses to wipe "
13948 "physical volumes that contain any volume groups, so you have to remove those "
13953 #: ../fish/guestfish-actions.pod:3824
13958 #: ../fish/guestfish-actions.pod:3826
13961 " pvresize device\n"
13966 #: ../fish/guestfish-actions.pod:3828 ../src/guestfs-actions.pod:5844
13968 "This resizes (expands or shrinks) an existing LVM physical volume to match "
13969 "the new size of the underlying device."
13973 #: ../fish/guestfish-actions.pod:3831
13974 msgid "pvresize-size"
13978 #: ../fish/guestfish-actions.pod:3833
13981 " pvresize-size device size\n"
13986 #: ../fish/guestfish-actions.pod:3835
13988 "This command is the same as L</pvresize> except that it allows you to "
13989 "specify the new size (in bytes) explicitly."
13993 #: ../fish/guestfish-actions.pod:3838
13998 #: ../fish/guestfish-actions.pod:3840
14006 #: ../fish/guestfish-actions.pod:3842 ../src/guestfs-actions.pod:5870
14008 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14013 #: ../fish/guestfish-actions.pod:3845 ../src/guestfs-actions.pod:5873
14015 "This returns a list of just the device names that contain PVs (eg. C</dev/"
14020 #: ../fish/guestfish-actions.pod:3848
14021 msgid "See also L</pvs-full>."
14025 #: ../fish/guestfish-actions.pod:3850
14030 #: ../fish/guestfish-actions.pod:3852
14038 #: ../fish/guestfish-actions.pod:3854 ../src/guestfs-actions.pod:5889
14040 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14041 "(8)> command. The \"full\" version includes all fields."
14045 #: ../fish/guestfish-actions.pod:3857
14050 #: ../fish/guestfish-actions.pod:3859
14058 #: ../fish/guestfish-actions.pod:3861 ../src/guestfs-actions.pod:5904
14059 msgid "This command returns the UUID of the LVM PV C<device>."
14063 #: ../fish/guestfish-actions.pod:3863
14068 #: ../fish/guestfish-actions.pod:3865
14071 " pwrite path content offset\n"
14076 #: ../fish/guestfish-actions.pod:3867 ../src/guestfs-actions.pod:5920
14078 "This command writes to part of a file. It writes the data buffer C<content> "
14079 "to the file C<path> starting at offset C<offset>."
14083 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:5923
14085 "This command implements the L<pwrite(2)> system call, and like that system "
14086 "call it may not write the full data requested. The return value is the "
14087 "number of bytes that were actually written to the file. This could even be "
14088 "0, although short writes are unlikely for regular files in ordinary "
14093 #: ../fish/guestfish-actions.pod:3876
14094 msgid "See also L</pread>, L</pwrite-device>."
14098 #: ../fish/guestfish-actions.pod:3881
14099 msgid "pwrite-device"
14103 #: ../fish/guestfish-actions.pod:3883
14106 " pwrite-device device content offset\n"
14111 #: ../fish/guestfish-actions.pod:3885 ../src/guestfs-actions.pod:5947
14113 "This command writes to part of a device. It writes the data buffer "
14114 "C<content> to C<device> starting at offset C<offset>."
14118 #: ../fish/guestfish-actions.pod:3888 ../src/guestfs-actions.pod:5950
14120 "This command implements the L<pwrite(2)> system call, and like that system "
14121 "call it may not write the full data requested (although short writes to disk "
14122 "devices and partitions are probably impossible with standard Linux kernels)."
14126 #: ../fish/guestfish-actions.pod:3893
14127 msgid "See also L</pwrite>."
14131 #: ../fish/guestfish-actions.pod:3898
14136 #: ../fish/guestfish-actions.pod:3900
14139 " read-file path\n"
14144 #: ../fish/guestfish-actions.pod:3902 ../src/guestfs-actions.pod:5971
14145 msgid "This calls returns the contents of the file C<path> as a buffer."
14149 #: ../fish/guestfish-actions.pod:3905
14151 "Unlike L</cat>, this function can correctly handle files that contain "
14152 "embedded ASCII NUL characters. However unlike L</download>, this function "
14153 "is limited in the total size of file that can be handled."
14157 #: ../fish/guestfish-actions.pod:3913
14162 #: ../fish/guestfish-actions.pod:3915
14165 " read-lines path\n"
14170 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:5996
14172 "The file contents are returned as a list of lines. Trailing C<LF> and "
14173 "C<CRLF> character sequences are I<not> returned."
14177 #: ../fish/guestfish-actions.pod:3922
14179 "Note that this function cannot correctly handle binary files (specifically, "
14180 "files containing C<\\0> character which is treated as end of line). For "
14181 "those you need to use the L</read-file> function which has a more complex "
14186 #: ../fish/guestfish-actions.pod:3927
14191 #: ../fish/guestfish-actions.pod:3929
14199 #: ../fish/guestfish-actions.pod:3931 ../src/guestfs-actions.pod:6016
14200 msgid "This returns the list of directory entries in directory C<dir>."
14204 #: ../fish/guestfish-actions.pod:3933 ../src/guestfs-actions.pod:6018
14206 "All entries in the directory are returned, including C<.> and C<..>. The "
14207 "entries are I<not> sorted, but returned in the same order as the underlying "
14212 #: ../fish/guestfish-actions.pod:3937 ../src/guestfs-actions.pod:6022
14214 "Also this call returns basic file type information about each file. The "
14215 "C<ftyp> field will contain one of the following characters:"
14219 #: ../fish/guestfish-actions.pod:3942 ../src/guestfs-actions.pod:6027
14224 #: ../fish/guestfish-actions.pod:3944 ../src/guestfs-actions.pod:6029
14225 msgid "Block special"
14229 #: ../fish/guestfish-actions.pod:3946 ../src/guestfs-actions.pod:6031
14234 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6033
14235 msgid "Char special"
14239 #: ../fish/guestfish-actions.pod:3950 ../src/guestfs-actions.pod:6035
14244 #: ../fish/guestfish-actions.pod:3952 ../src/guestfs-actions.pod:6037
14249 #: ../fish/guestfish-actions.pod:3954 ../src/guestfs-actions.pod:6039
14254 #: ../fish/guestfish-actions.pod:3956 ../src/guestfs-actions.pod:6041
14255 msgid "FIFO (named pipe)"
14259 #: ../fish/guestfish-actions.pod:3958 ../src/guestfs-actions.pod:6043
14264 #: ../fish/guestfish-actions.pod:3960 ../src/guestfs-actions.pod:6045
14265 msgid "Symbolic link"
14269 #: ../fish/guestfish-actions.pod:3962 ../src/guestfs-actions.pod:6047
14274 #: ../fish/guestfish-actions.pod:3964 ../src/guestfs-actions.pod:6049
14275 msgid "Regular file"
14279 #: ../fish/guestfish-actions.pod:3966 ../src/guestfs-actions.pod:6051
14284 #: ../fish/guestfish-actions.pod:3968 ../src/guestfs-actions.pod:6053
14289 #: ../fish/guestfish-actions.pod:3970 ../src/guestfs-actions.pod:6055
14294 #: ../fish/guestfish-actions.pod:3972 ../src/guestfs-actions.pod:6057
14295 msgid "Unknown file type"
14299 #: ../fish/guestfish-actions.pod:3974 ../src/guestfs-actions.pod:6059
14304 #: ../fish/guestfish-actions.pod:3976 ../src/guestfs-actions.pod:6061
14306 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14310 #: ../fish/guestfish-actions.pod:3981
14312 "This function is primarily intended for use by programs. To get a simple "
14313 "list of names, use L</ls>. To get a printable directory for human "
14314 "consumption, use L</ll>."
14318 #: ../fish/guestfish-actions.pod:3985
14323 #: ../fish/guestfish-actions.pod:3987
14331 #: ../fish/guestfish-actions.pod:3989 ../src/guestfs-actions.pod:6082
14332 msgid "This command reads the target of a symbolic link."
14336 #: ../fish/guestfish-actions.pod:3991
14337 msgid "readlinklist"
14341 #: ../fish/guestfish-actions.pod:3993
14344 " readlinklist path 'names ...'\n"
14349 #: ../fish/guestfish-actions.pod:3995 ../src/guestfs-actions.pod:6096
14351 "This call allows you to do a C<readlink> operation on multiple files, where "
14352 "all files are in the directory C<path>. C<names> is the list of files from "
14357 #: ../fish/guestfish-actions.pod:3999 ../src/guestfs-actions.pod:6100
14359 "On return you get a list of strings, with a one-to-one correspondence to the "
14360 "C<names> list. Each string is the value of the symbolic link."
14364 #: ../fish/guestfish-actions.pod:4003 ../src/guestfs-actions.pod:6104
14366 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14367 "result string is the empty string C<\"\">. However the whole operation is "
14368 "completed even if there were C<readlink(2)> errors, and so you can call this "
14369 "function with names where you don't know if they are symbolic links already "
14370 "(albeit slightly less efficient)."
14374 #: ../fish/guestfish-actions.pod:4010 ../src/guestfs-actions.pod:6111
14376 "This call is intended for programs that want to efficiently list a directory "
14377 "contents without making many round-trips. Very long directory listings "
14378 "might cause the protocol message size to be exceeded, causing this call to "
14379 "fail. The caller must split up such requests into smaller groups of names."
14383 #: ../fish/guestfish-actions.pod:4017
14388 #: ../fish/guestfish-actions.pod:4019
14396 #: ../fish/guestfish-actions.pod:4021 ../src/guestfs-actions.pod:6130
14398 "Return the canonicalized absolute pathname of C<path>. The returned path "
14399 "has no C<.>, C<..> or symbolic link path elements."
14403 #: ../fish/guestfish-actions.pod:4024
14404 msgid "removexattr"
14408 #: ../fish/guestfish-actions.pod:4026
14411 " removexattr xattr path\n"
14416 #: ../fish/guestfish-actions.pod:4028 ../src/guestfs-actions.pod:6145
14418 "This call removes the extended attribute named C<xattr> of the file C<path>."
14422 #: ../fish/guestfish-actions.pod:4031
14423 msgid "See also: L</lremovexattr>, L<attr(5)>."
14427 #: ../fish/guestfish-actions.pod:4033
14432 #: ../fish/guestfish-actions.pod:4035
14435 " resize2fs device\n"
14440 #: ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:6160
14442 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14443 "underlying device."
14447 #: ../fish/guestfish-actions.pod:4040
14449 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14450 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14451 "gives an error about this and sometimes not. In any case, it is always safe "
14452 "to call L</e2fsck-f> before calling this function."
14456 #: ../fish/guestfish-actions.pod:4046
14457 msgid "resize2fs-M"
14461 #: ../fish/guestfish-actions.pod:4048
14464 " resize2fs-M device\n"
14469 #: ../fish/guestfish-actions.pod:4050
14471 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14472 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14477 #: ../fish/guestfish-actions.pod:4054
14479 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14480 "and read the C<Block size> and C<Block count> values. These two numbers, "
14481 "multiplied together, give the resulting size of the minimal filesystem in "
14486 #: ../fish/guestfish-actions.pod:4059
14487 msgid "resize2fs-size"
14491 #: ../fish/guestfish-actions.pod:4061
14494 " resize2fs-size device size\n"
14499 #: ../fish/guestfish-actions.pod:4063
14501 "This command is the same as L</resize2fs> except that it allows you to "
14502 "specify the new size (in bytes) explicitly."
14506 #: ../fish/guestfish-actions.pod:4066
14511 #: ../fish/guestfish-actions.pod:4068
14519 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6212
14520 msgid "Remove the single file C<path>."
14524 #: ../fish/guestfish-actions.pod:4072
14529 #: ../fish/guestfish-actions.pod:4074
14537 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6224
14539 "Remove the file or directory C<path>, recursively removing the contents if "
14540 "its a directory. This is like the C<rm -rf> shell command."
14544 #: ../fish/guestfish-actions.pod:4080
14549 #: ../fish/guestfish-actions.pod:4082
14557 #: ../fish/guestfish-actions.pod:4084 ../src/guestfs-actions.pod:6238
14558 msgid "Remove the single directory C<path>."
14562 #: ../fish/guestfish-actions.pod:4086
14563 msgid "rmmountpoint"
14567 #: ../fish/guestfish-actions.pod:4088
14570 " rmmountpoint exemptpath\n"
14575 #: ../fish/guestfish-actions.pod:4090
14577 "This calls removes a mountpoint that was previously created with L</"
14578 "mkmountpoint>. See L</mkmountpoint> for full details."
14582 #: ../fish/guestfish-actions.pod:4094
14583 msgid "scrub-device"
14587 #: ../fish/guestfish-actions.pod:4096
14590 " scrub-device device\n"
14595 #: ../fish/guestfish-actions.pod:4098 ../src/guestfs-actions.pod:6264
14597 "This command writes patterns over C<device> to make data retrieval more "
14602 #: ../fish/guestfish-actions.pod:4101 ../fish/guestfish-actions.pod:4116
14603 #: ../fish/guestfish-actions.pod:4129 ../src/guestfs-actions.pod:6267
14604 #: ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:6307
14606 "It is an interface to the L<scrub(1)> program. See that manual page for "
14611 #: ../fish/guestfish-actions.pod:4107
14616 #: ../fish/guestfish-actions.pod:4109
14619 " scrub-file file\n"
14624 #: ../fish/guestfish-actions.pod:4111 ../src/guestfs-actions.pod:6283
14626 "This command writes patterns over a file to make data retrieval more "
14631 #: ../fish/guestfish-actions.pod:4114 ../src/guestfs-actions.pod:6286
14632 msgid "The file is I<removed> after scrubbing."
14636 #: ../fish/guestfish-actions.pod:4119
14637 msgid "scrub-freespace"
14641 #: ../fish/guestfish-actions.pod:4121
14644 " scrub-freespace dir\n"
14649 #: ../fish/guestfish-actions.pod:4123
14651 "This command creates the directory C<dir> and then fills it with files until "
14652 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14653 "deletes them. The intention is to scrub any free space on the partition "
14654 "containing C<dir>."
14658 #: ../fish/guestfish-actions.pod:4132
14663 #: ../fish/guestfish-actions.pod:4134
14668 #: ../fish/guestfish-actions.pod:4136
14671 " set-append append\n"
14676 #: ../fish/guestfish-actions.pod:4138 ../src/guestfs-actions.pod:6320
14678 "This function is used to add additional options to the guest kernel command "
14683 #: ../fish/guestfish-actions.pod:4141 ../src/guestfs-actions.pod:6323
14685 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14686 "environment variable."
14690 #: ../fish/guestfish-actions.pod:4144 ../src/guestfs-actions.pod:6326
14692 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14693 "(libguestfs always adds a few of its own)."
14697 #: ../fish/guestfish-actions.pod:4147
14698 msgid "set-attach-method"
14702 #: ../fish/guestfish-actions.pod:4149
14703 msgid "attach-method"
14707 #: ../fish/guestfish-actions.pod:4151
14710 " set-attach-method attachmethod\n"
14715 #: ../fish/guestfish-actions.pod:4153 ../src/guestfs-actions.pod:6339
14717 "Set the method that libguestfs uses to connect to the back end guestfsd "
14718 "daemon. Possible methods are:"
14722 #: ../fish/guestfish-actions.pod:4158 ../src/guestfs-actions.pod:6344
14723 #: ../src/guestfs.pod:2901
14724 msgid "C<appliance>"
14728 #: ../fish/guestfish-actions.pod:4160 ../src/guestfs-actions.pod:6346
14730 "Launch an appliance and connect to it. This is the ordinary method and the "
14735 #: ../fish/guestfish-actions.pod:4163 ../src/guestfs-actions.pod:6349
14736 msgid "C<unix:I<path>>"
14740 #: ../fish/guestfish-actions.pod:4165 ../src/guestfs-actions.pod:6351
14741 msgid "Connect to the Unix domain socket I<path>."
14745 #: ../fish/guestfish-actions.pod:4167 ../src/guestfs-actions.pod:6353
14747 "This method lets you connect to an existing daemon or (using virtio-serial) "
14748 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
14749 "RUNNING DAEMONS>."
14753 #: ../fish/guestfish-actions.pod:4173
14754 msgid "set-autosync"
14758 #: ../fish/guestfish-actions.pod:4175
14763 #: ../fish/guestfish-actions.pod:4177
14766 " set-autosync true|false\n"
14771 #: ../fish/guestfish-actions.pod:4179 ../src/guestfs-actions.pod:6369
14773 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
14774 "effort attempt to make filesystems consistent and synchronized when the "
14775 "handle is closed (also if the program exits without closing handles)."
14779 #: ../fish/guestfish-actions.pod:4184 ../src/guestfs-actions.pod:6374
14781 "This is enabled by default (since libguestfs 1.5.24, previously it was "
14782 "disabled by default)."
14786 #: ../fish/guestfish-actions.pod:4187
14791 #: ../fish/guestfish-actions.pod:4189
14796 #: ../fish/guestfish-actions.pod:4191
14799 " set-direct true|false\n"
14804 #: ../fish/guestfish-actions.pod:4193 ../src/guestfs-actions.pod:6387
14806 "If the direct appliance mode flag is enabled, then stdin and stdout are "
14807 "passed directly through to the appliance once it is launched."
14811 #: ../fish/guestfish-actions.pod:4197
14813 "One consequence of this is that log messages aren't caught by the library "
14814 "and handled by L</set-log-message-callback>, but go straight to stdout."
14818 #: ../fish/guestfish-actions.pod:4201 ../src/guestfs-actions.pod:6395
14819 msgid "You probably don't want to use this unless you know what you are doing."
14823 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6398
14824 msgid "The default is disabled."
14828 #: ../fish/guestfish-actions.pod:4206
14829 msgid "set-e2label"
14833 #: ../fish/guestfish-actions.pod:4208
14836 " set-e2label device label\n"
14841 #: ../fish/guestfish-actions.pod:4210 ../src/guestfs-actions.pod:6411
14843 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
14844 "C<label>. Filesystem labels are limited to 16 characters."
14848 #: ../fish/guestfish-actions.pod:4214
14850 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
14851 "label on a filesystem."
14855 #: ../fish/guestfish-actions.pod:4217
14860 #: ../fish/guestfish-actions.pod:4219
14863 " set-e2uuid device uuid\n"
14868 #: ../fish/guestfish-actions.pod:4221 ../src/guestfs-actions.pod:6429
14870 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
14871 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
14872 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
14876 #: ../fish/guestfish-actions.pod:4226
14878 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
14879 "UUID of a filesystem."
14883 #: ../fish/guestfish-actions.pod:4229
14884 msgid "set-memsize"
14888 #: ../fish/guestfish-actions.pod:4231
14893 #: ../fish/guestfish-actions.pod:4233
14896 " set-memsize memsize\n"
14901 #: ../fish/guestfish-actions.pod:4235
14903 "This sets the memory size in megabytes allocated to the qemu subprocess. "
14904 "This only has any effect if called before L</launch>."
14908 #: ../fish/guestfish-actions.pod:4239 ../src/guestfs-actions.pod:6451
14910 "You can also change this by setting the environment variable "
14911 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
14915 #: ../fish/guestfish-actions.pod:4246
14916 msgid "set-network"
14920 #: ../fish/guestfish-actions.pod:4248
14925 #: ../fish/guestfish-actions.pod:4250
14928 " set-network true|false\n"
14933 #: ../fish/guestfish-actions.pod:4252 ../src/guestfs-actions.pod:6468
14935 "If C<network> is true, then the network is enabled in the libguestfs "
14936 "appliance. The default is false."
14940 #: ../fish/guestfish-actions.pod:4255 ../src/guestfs-actions.pod:6471
14942 "This affects whether commands are able to access the network (see L<guestfs"
14943 "(3)/RUNNING COMMANDS>)."
14947 #: ../fish/guestfish-actions.pod:4258
14949 "You must call this before calling L</launch>, otherwise it has no effect."
14953 #: ../fish/guestfish-actions.pod:4261
14958 #: ../fish/guestfish-actions.pod:4265
14961 " set-path searchpath\n"
14966 #: ../fish/guestfish-actions.pod:4267 ../src/guestfs-actions.pod:6487
14967 msgid "Set the path that libguestfs searches for kernel and initrd.img."
14971 #: ../fish/guestfish-actions.pod:4269 ../src/guestfs-actions.pod:6489
14973 "The default is C<$libdir/guestfs> unless overridden by setting "
14974 "C<LIBGUESTFS_PATH> environment variable."
14978 #: ../fish/guestfish-actions.pod:4272 ../src/guestfs-actions.pod:6492
14979 msgid "Setting C<path> to C<NULL> restores the default path."
14983 #: ../fish/guestfish-actions.pod:4274
14988 #: ../fish/guestfish-actions.pod:4276
14993 #: ../fish/guestfish-actions.pod:4278
14996 " set-pgroup true|false\n"
15001 #: ../fish/guestfish-actions.pod:4280 ../src/guestfs-actions.pod:6504
15003 "If C<pgroup> is true, child processes are placed into their own process "
15008 #: ../fish/guestfish-actions.pod:4283 ../src/guestfs-actions.pod:6507
15010 "The practical upshot of this is that signals like C<SIGINT> (from users "
15011 "pressing C<^C>) won't be received by the child process."
15015 #: ../fish/guestfish-actions.pod:4286 ../src/guestfs-actions.pod:6510
15017 "The default for this flag is false, because usually you want C<^C> to kill "
15022 #: ../fish/guestfish-actions.pod:4289
15027 #: ../fish/guestfish-actions.pod:4291
15032 #: ../fish/guestfish-actions.pod:4293
15040 #: ../fish/guestfish-actions.pod:4295 ../src/guestfs-actions.pod:6523
15041 msgid "Set the qemu binary that we will use."
15045 #: ../fish/guestfish-actions.pod:4297 ../src/guestfs-actions.pod:6525
15047 "The default is chosen when the library was compiled by the configure script."
15051 #: ../fish/guestfish-actions.pod:4300 ../src/guestfs-actions.pod:6528
15053 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15058 #: ../fish/guestfish-actions.pod:4303 ../src/guestfs-actions.pod:6531
15059 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15063 #: ../fish/guestfish-actions.pod:4305 ../src/guestfs-actions.pod:6533
15065 "Note that you should call this function as early as possible after creating "
15066 "the handle. This is because some pre-launch operations depend on testing "
15067 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15068 "don't retest features, and so you might see inconsistent results. Using the "
15069 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15070 "the qemu binary at the same time as the handle is created."
15074 #: ../fish/guestfish-actions.pod:4313
15075 msgid "set-recovery-proc"
15079 #: ../fish/guestfish-actions.pod:4315
15080 msgid "recovery-proc"
15084 #: ../fish/guestfish-actions.pod:4317
15087 " set-recovery-proc true|false\n"
15092 #: ../fish/guestfish-actions.pod:4319
15094 "If this is called with the parameter C<false> then L</launch> does not "
15095 "create a recovery process. The purpose of the recovery process is to stop "
15096 "runaway qemu processes in the case where the main program aborts abruptly."
15100 #: ../fish/guestfish-actions.pod:4324
15102 "This only has any effect if called before L</launch>, and the default is "
15107 #: ../fish/guestfish-actions.pod:4327 ../src/guestfs-actions.pod:6559
15109 "About the only time when you would want to disable this is if the main "
15110 "process will fork itself into the background (\"daemonize\" itself). In "
15111 "this case the recovery process thinks that the main program has disappeared "
15112 "and so kills qemu, which is not very helpful."
15116 #: ../fish/guestfish-actions.pod:4333
15117 msgid "set-selinux"
15121 #: ../fish/guestfish-actions.pod:4335
15126 #: ../fish/guestfish-actions.pod:4337
15129 " set-selinux true|false\n"
15134 #: ../fish/guestfish-actions.pod:4339 ../src/guestfs-actions.pod:6575
15136 "This sets the selinux flag that is passed to the appliance at boot time. "
15137 "The default is C<selinux=0> (disabled)."
15141 #: ../fish/guestfish-actions.pod:4342 ../src/guestfs-actions.pod:6578
15143 "Note that if SELinux is enabled, it is always in Permissive mode "
15144 "(C<enforcing=0>)."
15148 #: ../fish/guestfish-actions.pod:4348
15153 #: ../fish/guestfish-actions.pod:4350
15158 #: ../fish/guestfish-actions.pod:4352
15166 #: ../fish/guestfish-actions.pod:4354 ../src/guestfs-actions.pod:6594
15168 "Change the number of virtual CPUs assigned to the appliance. The default is "
15169 "C<1>. Increasing this may improve performance, though often it has no "
15174 #: ../fish/guestfish-actions.pod:4358
15175 msgid "This function must be called before L</launch>."
15179 #: ../fish/guestfish-actions.pod:4360
15184 #: ../fish/guestfish-actions.pod:4362
15189 #: ../fish/guestfish-actions.pod:4364
15192 " set-trace true|false\n"
15197 #: ../fish/guestfish-actions.pod:4366 ../src/guestfs-actions.pod:6610
15199 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15200 "return values are traced."
15204 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6613
15206 "If you want to trace C API calls into libguestfs (and other libraries) then "
15207 "possibly a better way is to use the external ltrace(1) command."
15211 #: ../fish/guestfish-actions.pod:4373 ../src/guestfs-actions.pod:6617
15213 "Command traces are disabled unless the environment variable "
15214 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15218 #: ../fish/guestfish-actions.pod:4376
15220 "Trace messages are normally sent to C<stderr>, unless you register a "
15221 "callback to send them somewhere else (see L</set-event-callback>)."
15225 #: ../fish/guestfish-actions.pod:4380
15226 msgid "set-verbose"
15230 #: ../fish/guestfish-actions.pod:4382
15235 #: ../fish/guestfish-actions.pod:4384
15238 " set-verbose true|false\n"
15243 #: ../fish/guestfish-actions.pod:4386 ../src/guestfs-actions.pod:6634
15244 msgid "If C<verbose> is true, this turns on verbose messages."
15248 #: ../fish/guestfish-actions.pod:4388 ../src/guestfs-actions.pod:6636
15250 "Verbose messages are disabled unless the environment variable "
15251 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15255 #: ../fish/guestfish-actions.pod:4391
15257 "Verbose messages are normally sent to C<stderr>, unless you register a "
15258 "callback to send them somewhere else (see L</set-event-callback>)."
15262 #: ../fish/guestfish-actions.pod:4395
15267 #: ../fish/guestfish-actions.pod:4397
15270 " setcon context\n"
15275 #: ../fish/guestfish-actions.pod:4399 ../src/guestfs-actions.pod:6653
15277 "This sets the SELinux security context of the daemon to the string "
15282 #: ../fish/guestfish-actions.pod:4402 ../src/guestfs-actions.pod:6656
15283 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15287 #: ../fish/guestfish-actions.pod:4404
15292 #: ../fish/guestfish-actions.pod:4406
15295 " setxattr xattr val vallen path\n"
15300 #: ../fish/guestfish-actions.pod:4408 ../src/guestfs-actions.pod:6671
15302 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15303 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15307 #: ../fish/guestfish-actions.pod:4412
15308 msgid "See also: L</lsetxattr>, L<attr(5)>."
15312 #: ../fish/guestfish-actions.pod:4414
15317 #: ../fish/guestfish-actions.pod:4416
15320 " sfdisk device cyls heads sectors 'lines ...'\n"
15325 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6698
15327 "This is a direct interface to the L<sfdisk(8)> program for creating "
15328 "partitions on block devices."
15332 #: ../fish/guestfish-actions.pod:4421 ../src/guestfs-actions.pod:6701
15333 msgid "C<device> should be a block device, for example C</dev/sda>."
15337 #: ../fish/guestfish-actions.pod:4423 ../src/guestfs-actions.pod:6703
15339 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15340 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
15341 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15342 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15343 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15344 "the kernel) cannot work out the right geometry and you will need to tell it."
15348 #: ../fish/guestfish-actions.pod:4431 ../src/guestfs-actions.pod:6711
15350 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15351 "refer to the L<sfdisk(8)> manpage."
15355 #: ../fish/guestfish-actions.pod:4434 ../src/guestfs-actions.pod:6714
15357 "To create a single partition occupying the whole disk, you would pass "
15358 "C<lines> as a single element list, when the single element being the string "
15363 #: ../fish/guestfish-actions.pod:4438
15364 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15368 #: ../fish/guestfish-actions.pod:4444 ../fish/guestfish-actions.pod:4467
15369 #: ../fish/guestfish-actions.pod:4489
15371 "I<This function is deprecated.> In new code, use the L</part_add> call "
15376 #: ../fish/guestfish-actions.pod:4451
15381 #: ../fish/guestfish-actions.pod:4453
15384 " sfdiskM device 'lines ...'\n"
15389 #: ../fish/guestfish-actions.pod:4455
15391 "This is a simplified interface to the L</sfdisk> command, where partition "
15392 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15393 "you don't need to specify the cyls, heads and sectors parameters which were "
15394 "rarely if ever used anyway."
15398 #: ../fish/guestfish-actions.pod:4461
15399 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15403 #: ../fish/guestfish-actions.pod:4474
15408 #: ../fish/guestfish-actions.pod:4476
15411 " sfdisk-N device partnum cyls heads sectors line\n"
15416 #: ../fish/guestfish-actions.pod:4478 ../src/guestfs-actions.pod:6776
15418 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15419 "(note: C<n> counts from 1)."
15423 #: ../fish/guestfish-actions.pod:4481
15425 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15426 "cyls/heads/sectors parameters."
15430 #: ../fish/guestfish-actions.pod:4484
15431 msgid "See also: L</part-add>"
15435 #: ../fish/guestfish-actions.pod:4496
15436 msgid "sfdisk-disk-geometry"
15440 #: ../fish/guestfish-actions.pod:4498
15443 " sfdisk-disk-geometry device\n"
15448 #: ../fish/guestfish-actions.pod:4500
15450 "This displays the disk geometry of C<device> read from the partition table. "
15451 "Especially in the case where the underlying block device has been resized, "
15452 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
15453 "kernel-geometry>)."
15457 #: ../fish/guestfish-actions.pod:4505 ../fish/guestfish-actions.pod:4514
15458 #: ../src/guestfs-actions.pod:6802 ../src/guestfs-actions.pod:6818
15459 msgid "The result is in human-readable format, and not designed to be parsed."
15463 #: ../fish/guestfish-actions.pod:4508
15464 msgid "sfdisk-kernel-geometry"
15468 #: ../fish/guestfish-actions.pod:4510
15471 " sfdisk-kernel-geometry device\n"
15476 #: ../fish/guestfish-actions.pod:4512 ../src/guestfs-actions.pod:6816
15477 msgid "This displays the kernel's idea of the geometry of C<device>."
15481 #: ../fish/guestfish-actions.pod:4517
15486 #: ../fish/guestfish-actions.pod:4519
15489 " sfdisk-l device\n"
15494 #: ../fish/guestfish-actions.pod:4521 ../src/guestfs-actions.pod:6839
15496 "This displays the partition table on C<device>, in the human-readable output "
15497 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15501 #: ../fish/guestfish-actions.pod:4525
15502 msgid "See also: L</part-list>"
15506 #: ../fish/guestfish-actions.pod:4527
15508 "I<This function is deprecated.> In new code, use the L</part_list> call "
15513 #: ../fish/guestfish-actions.pod:4534
15518 #: ../fish/guestfish-actions.pod:4536
15526 #: ../fish/guestfish-actions.pod:4538 ../src/guestfs-actions.pod:6856
15528 "This call runs a command from the guest filesystem via the guest's C</bin/"
15533 #: ../fish/guestfish-actions.pod:4541
15534 msgid "This is like L</command>, but passes the command to:"
15538 #: ../fish/guestfish-actions.pod:4543 ../src/guestfs-actions.pod:6861
15541 " /bin/sh -c \"command\"\n"
15546 #: ../fish/guestfish-actions.pod:4545 ../src/guestfs-actions.pod:6863
15548 "Depending on the guest's shell, this usually results in wildcards being "
15549 "expanded, shell expressions being interpolated and so on."
15553 #: ../fish/guestfish-actions.pod:4549
15554 msgid "All the provisos about L</command> apply to this call."
15558 #: ../fish/guestfish-actions.pod:4551
15563 #: ../fish/guestfish-actions.pod:4553
15566 " sh-lines command\n"
15571 #: ../fish/guestfish-actions.pod:4555
15572 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15576 #: ../fish/guestfish-actions.pod:4558
15577 msgid "See also: L</command-lines>"
15581 #: ../fish/guestfish-actions.pod:4560
15586 #: ../fish/guestfish-actions.pod:4562
15594 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:6897
15595 msgid "Sleep for C<secs> seconds."
15599 #: ../fish/guestfish-actions.pod:4566
15604 #: ../fish/guestfish-actions.pod:4568
15612 #: ../fish/guestfish-actions.pod:4572 ../src/guestfs-actions.pod:6911
15613 msgid "This is the same as the C<stat(2)> system call."
15617 #: ../fish/guestfish-actions.pod:4574
15622 #: ../fish/guestfish-actions.pod:4576
15630 #: ../fish/guestfish-actions.pod:4578 ../src/guestfs-actions.pod:6925
15632 "Returns file system statistics for any mounted file system. C<path> should "
15633 "be a file or directory in the mounted file system (typically it is the mount "
15634 "point itself, but it doesn't need to be)."
15638 #: ../fish/guestfish-actions.pod:4582 ../src/guestfs-actions.pod:6929
15639 msgid "This is the same as the C<statvfs(2)> system call."
15643 #: ../fish/guestfish-actions.pod:4584
15648 #: ../fish/guestfish-actions.pod:4586
15656 #: ../fish/guestfish-actions.pod:4588 ../src/guestfs-actions.pod:6943
15658 "This runs the L<strings(1)> command on a file and returns the list of "
15659 "printable strings found."
15663 #: ../fish/guestfish-actions.pod:4594
15668 #: ../fish/guestfish-actions.pod:4596
15671 " strings-e encoding path\n"
15676 #: ../fish/guestfish-actions.pod:4598
15678 "This is like the L</strings> command, but allows you to specify the encoding "
15679 "of strings that are looked for in the source file C<path>."
15683 #: ../fish/guestfish-actions.pod:4602 ../src/guestfs-actions.pod:6966
15684 msgid "Allowed encodings are:"
15688 #: ../fish/guestfish-actions.pod:4606 ../src/guestfs-actions.pod:6970
15693 #: ../fish/guestfish-actions.pod:4608
15695 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15696 "ISO-8859-X (this is what L</strings> uses)."
15700 #: ../fish/guestfish-actions.pod:4611 ../src/guestfs-actions.pod:6975
15705 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:6977
15706 msgid "Single 8-bit-byte characters."
15710 #: ../fish/guestfish-actions.pod:4615 ../src/guestfs-actions.pod:6979
15715 #: ../fish/guestfish-actions.pod:4617 ../src/guestfs-actions.pod:6981
15716 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15720 #: ../fish/guestfish-actions.pod:4620 ../src/guestfs-actions.pod:6984
15721 msgid "l (lower case letter L)"
15725 #: ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:6986
15727 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
15728 "examining binaries in Windows guests."
15732 #: ../fish/guestfish-actions.pod:4625 ../src/guestfs-actions.pod:6989
15737 #: ../fish/guestfish-actions.pod:4627 ../src/guestfs-actions.pod:6991
15738 msgid "32-bit big endian such as UCS-4BE."
15742 #: ../fish/guestfish-actions.pod:4629 ../src/guestfs-actions.pod:6993
15747 #: ../fish/guestfish-actions.pod:4631 ../src/guestfs-actions.pod:6995
15748 msgid "32-bit little endian such as UCS-4LE."
15752 #: ../fish/guestfish-actions.pod:4635 ../src/guestfs-actions.pod:6999
15753 msgid "The returned strings are transcoded to UTF-8."
15757 #: ../fish/guestfish-actions.pod:4640
15758 msgid "swapoff-device"
15762 #: ../fish/guestfish-actions.pod:4642
15765 " swapoff-device device\n"
15770 #: ../fish/guestfish-actions.pod:4644
15772 "This command disables the libguestfs appliance swap device or partition "
15773 "named C<device>. See L</swapon-device>."
15777 #: ../fish/guestfish-actions.pod:4648
15778 msgid "swapoff-file"
15782 #: ../fish/guestfish-actions.pod:4650
15785 " swapoff-file file\n"
15790 #: ../fish/guestfish-actions.pod:4652 ../src/guestfs-actions.pod:7030
15791 msgid "This command disables the libguestfs appliance swap on file."
15795 #: ../fish/guestfish-actions.pod:4654
15796 msgid "swapoff-label"
15800 #: ../fish/guestfish-actions.pod:4656
15803 " swapoff-label label\n"
15808 #: ../fish/guestfish-actions.pod:4658 ../src/guestfs-actions.pod:7042
15810 "This command disables the libguestfs appliance swap on labeled swap "
15815 #: ../fish/guestfish-actions.pod:4661
15816 msgid "swapoff-uuid"
15820 #: ../fish/guestfish-actions.pod:4663
15823 " swapoff-uuid uuid\n"
15828 #: ../fish/guestfish-actions.pod:4665 ../src/guestfs-actions.pod:7055
15830 "This command disables the libguestfs appliance swap partition with the given "
15835 #: ../fish/guestfish-actions.pod:4668
15836 msgid "swapon-device"
15840 #: ../fish/guestfish-actions.pod:4670
15843 " swapon-device device\n"
15848 #: ../fish/guestfish-actions.pod:4672
15850 "This command enables the libguestfs appliance to use the swap device or "
15851 "partition named C<device>. The increased memory is made available for all "
15852 "commands, for example those run using L</command> or L</sh>."
15856 #: ../fish/guestfish-actions.pod:4677 ../src/guestfs-actions.pod:7073
15858 "Note that you should not swap to existing guest swap partitions unless you "
15859 "know what you are doing. They may contain hibernation information, or other "
15860 "information that the guest doesn't want you to trash. You also risk leaking "
15861 "information about the host to the guest this way. Instead, attach a new "
15862 "host device to the guest and swap on that."
15866 #: ../fish/guestfish-actions.pod:4684
15867 msgid "swapon-file"
15871 #: ../fish/guestfish-actions.pod:4686
15874 " swapon-file file\n"
15879 #: ../fish/guestfish-actions.pod:4688
15881 "This command enables swap to a file. See L</swapon-device> for other notes."
15885 #: ../fish/guestfish-actions.pod:4691
15886 msgid "swapon-label"
15890 #: ../fish/guestfish-actions.pod:4693
15893 " swapon-label label\n"
15898 #: ../fish/guestfish-actions.pod:4695
15900 "This command enables swap to a labeled swap partition. See L</swapon-"
15901 "device> for other notes."
15905 #: ../fish/guestfish-actions.pod:4698
15906 msgid "swapon-uuid"
15910 #: ../fish/guestfish-actions.pod:4700
15913 " swapon-uuid uuid\n"
15918 #: ../fish/guestfish-actions.pod:4702
15920 "This command enables swap to a swap partition with the given UUID. See L</"
15921 "swapon-device> for other notes."
15925 #: ../fish/guestfish-actions.pod:4705
15930 #: ../fish/guestfish-actions.pod:4707
15938 #: ../fish/guestfish-actions.pod:4709 ../src/guestfs-actions.pod:7128
15940 "This syncs the disk, so that any writes are flushed through to the "
15941 "underlying disk image."
15945 #: ../fish/guestfish-actions.pod:4712 ../src/guestfs-actions.pod:7131
15947 "You should always call this if you have modified a disk image, before "
15948 "closing the handle."
15952 #: ../fish/guestfish-actions.pod:4715
15957 #: ../fish/guestfish-actions.pod:4717
15965 #: ../fish/guestfish-actions.pod:4719 ../src/guestfs-actions.pod:7144
15967 "This command returns up to the last 10 lines of a file as a list of strings."
15971 #: ../fish/guestfish-actions.pod:4725
15976 #: ../fish/guestfish-actions.pod:4727
15979 " tail-n nrlines path\n"
15984 #: ../fish/guestfish-actions.pod:4729 ../src/guestfs-actions.pod:7163
15986 "If the parameter C<nrlines> is a positive number, this returns the last "
15987 "C<nrlines> lines of the file C<path>."
15991 #: ../fish/guestfish-actions.pod:4732 ../src/guestfs-actions.pod:7166
15993 "If the parameter C<nrlines> is a negative number, this returns lines from "
15994 "the file C<path>, starting with the C<-nrlines>th line."
15998 #: ../fish/guestfish-actions.pod:4740
16003 #: ../fish/guestfish-actions.pod:4742
16006 " tar-in (tarfile|-) directory\n"
16011 #: ../fish/guestfish-actions.pod:4744 ../src/guestfs-actions.pod:7187
16013 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16014 "tar file) into C<directory>."
16018 #: ../fish/guestfish-actions.pod:4747
16019 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16023 #: ../fish/guestfish-actions.pod:4752
16028 #: ../fish/guestfish-actions.pod:4754
16031 " tar-out directory (tarfile|-)\n"
16036 #: ../fish/guestfish-actions.pod:4756 ../src/guestfs-actions.pod:7204
16038 "This command packs the contents of C<directory> and downloads it to local "
16043 #: ../fish/guestfish-actions.pod:4759
16044 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16048 #: ../fish/guestfish-actions.pod:4764
16053 #: ../fish/guestfish-actions.pod:4766
16056 " tgz-in (tarball|-) directory\n"
16061 #: ../fish/guestfish-actions.pod:4768 ../src/guestfs-actions.pod:7221
16063 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16064 "tar file) into C<directory>."
16068 #: ../fish/guestfish-actions.pod:4771
16069 msgid "To upload an uncompressed tarball, use L</tar-in>."
16073 #: ../fish/guestfish-actions.pod:4775
16078 #: ../fish/guestfish-actions.pod:4777
16081 " tgz-out directory (tarball|-)\n"
16086 #: ../fish/guestfish-actions.pod:4779 ../src/guestfs-actions.pod:7237
16088 "This command packs the contents of C<directory> and downloads it to local "
16093 #: ../fish/guestfish-actions.pod:4782
16094 msgid "To download an uncompressed tarball, use L</tar-out>."
16098 #: ../fish/guestfish-actions.pod:4786
16103 #: ../fish/guestfish-actions.pod:4788
16111 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7252
16113 "Touch acts like the L<touch(1)> command. It can be used to update the "
16114 "timestamps on a file, or, if the file does not exist, to create a new zero-"
16119 #: ../fish/guestfish-actions.pod:4794 ../src/guestfs-actions.pod:7256
16121 "This command only works on regular files, and will fail on other file types "
16122 "such as directories, symbolic links, block special etc."
16126 #: ../fish/guestfish-actions.pod:4797
16131 #: ../fish/guestfish-actions.pod:4799
16139 #: ../fish/guestfish-actions.pod:4801 ../src/guestfs-actions.pod:7269
16141 "This command truncates C<path> to a zero-length file. The file must exist "
16146 #: ../fish/guestfish-actions.pod:4804
16147 msgid "truncate-size"
16151 #: ../fish/guestfish-actions.pod:4806
16154 " truncate-size path size\n"
16159 #: ../fish/guestfish-actions.pod:4808 ../src/guestfs-actions.pod:7283
16161 "This command truncates C<path> to size C<size> bytes. The file must exist "
16166 #: ../fish/guestfish-actions.pod:4811
16168 "If the current file size is less than C<size> then the file is extended to "
16169 "the required size with zero bytes. This creates a sparse file (ie. disk "
16170 "blocks are not allocated for the file until you write to it). To create a "
16171 "non-sparse file of zeroes, use L</fallocate64> instead."
16175 #: ../fish/guestfish-actions.pod:4817
16180 #: ../fish/guestfish-actions.pod:4819
16183 " tune2fs-l device\n"
16188 #: ../fish/guestfish-actions.pod:4821 ../src/guestfs-actions.pod:7302
16190 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16195 #: ../fish/guestfish-actions.pod:4824 ../src/guestfs-actions.pod:7305
16197 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16198 "for more details. The list of fields returned isn't clearly defined, and "
16199 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16200 "and the filesystem itself."
16204 #: ../fish/guestfish-actions.pod:4829
16209 #: ../fish/guestfish-actions.pod:4831
16212 " txz-in (tarball|-) directory\n"
16217 #: ../fish/guestfish-actions.pod:4833 ../src/guestfs-actions.pod:7325
16219 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16220 "tar file) into C<directory>."
16224 #: ../fish/guestfish-actions.pod:4838
16229 #: ../fish/guestfish-actions.pod:4840
16232 " txz-out directory (tarball|-)\n"
16237 #: ../fish/guestfish-actions.pod:4842 ../src/guestfs-actions.pod:7339
16239 "This command packs the contents of C<directory> and downloads it to local "
16240 "file C<tarball> (as an xz compressed tar archive)."
16244 #: ../fish/guestfish-actions.pod:4847
16249 #: ../fish/guestfish-actions.pod:4849
16257 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7352
16259 "This function sets the mask used for creating new files and device nodes to "
16264 #: ../fish/guestfish-actions.pod:4854 ../src/guestfs-actions.pod:7355
16266 "Typical umask values would be C<022> which creates new files with "
16267 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16268 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16272 #: ../fish/guestfish-actions.pod:4859 ../src/guestfs-actions.pod:7360
16274 "The default umask is C<022>. This is important because it means that "
16275 "directories and device nodes will be created with C<0644> or C<0755> mode "
16276 "even if you specify C<0777>."
16280 #: ../fish/guestfish-actions.pod:4863
16281 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16285 #: ../fish/guestfish-actions.pod:4866 ../src/guestfs-actions.pod:7367
16286 msgid "This call returns the previous umask."
16290 #: ../fish/guestfish-actions.pod:4868
16295 #: ../fish/guestfish-actions.pod:4870
16300 #: ../fish/guestfish-actions.pod:4872
16303 " umount pathordevice\n"
16308 #: ../fish/guestfish-actions.pod:4874 ../src/guestfs-actions.pod:7379
16310 "This unmounts the given filesystem. The filesystem may be specified either "
16311 "by its mountpoint (path) or the device which contains the filesystem."
16315 #: ../fish/guestfish-actions.pod:4878
16320 #: ../fish/guestfish-actions.pod:4880
16321 msgid "unmount-all"
16325 #: ../fish/guestfish-actions.pod:4882
16333 #: ../fish/guestfish-actions.pod:4884 ../src/guestfs-actions.pod:7392
16334 msgid "This unmounts all mounted filesystems."
16338 #: ../fish/guestfish-actions.pod:4886 ../src/guestfs-actions.pod:7394
16339 msgid "Some internal mounts are not unmounted by this call."
16343 #: ../fish/guestfish-actions.pod:4888
16348 #: ../fish/guestfish-actions.pod:4890
16351 " upload (filename|-) remotefilename\n"
16356 #: ../fish/guestfish-actions.pod:4892 ../fish/guestfish-actions.pod:4905
16357 #: ../src/guestfs-actions.pod:7407 ../src/guestfs-actions.pod:7431
16358 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16362 #: ../fish/guestfish-actions.pod:4897
16363 msgid "See also L</download>."
16367 #: ../fish/guestfish-actions.pod:4901
16368 msgid "upload-offset"
16372 #: ../fish/guestfish-actions.pod:4903
16375 " upload-offset (filename|-) remotefilename offset\n"
16380 #: ../fish/guestfish-actions.pod:4908 ../src/guestfs-actions.pod:7434
16382 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16383 "The intention is to overwrite parts of existing files or devices, although "
16384 "if a non-existant file is specified then it is created with a \"hole\" "
16385 "before C<offset>. The size of the data written is implicit in the size of "
16386 "the source C<filename>."
16390 #: ../fish/guestfish-actions.pod:4915
16392 "Note that there is no limit on the amount of data that can be uploaded with "
16393 "this call, unlike with L</pwrite>, and this call always writes the full "
16394 "amount unless an error occurs."
16398 #: ../fish/guestfish-actions.pod:4920
16399 msgid "See also L</upload>, L</pwrite>."
16403 #: ../fish/guestfish-actions.pod:4924
16408 #: ../fish/guestfish-actions.pod:4926
16411 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16416 #: ../fish/guestfish-actions.pod:4928 ../src/guestfs-actions.pod:7467
16417 msgid "This command sets the timestamps of a file with nanosecond precision."
16421 #: ../fish/guestfish-actions.pod:4931 ../src/guestfs-actions.pod:7470
16423 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16428 #: ../fish/guestfish-actions.pod:4934 ../src/guestfs-actions.pod:7473
16430 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16431 "nanoseconds from the epoch."
16435 #: ../fish/guestfish-actions.pod:4937 ../src/guestfs-actions.pod:7476
16437 "If the C<*nsecs> field contains the special value C<-1> then the "
16438 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16439 "ignored in this case)."
16443 #: ../fish/guestfish-actions.pod:4941 ../src/guestfs-actions.pod:7480
16445 "If the C<*nsecs> field contains the special value C<-2> then the "
16446 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16451 #: ../fish/guestfish-actions.pod:4945
16456 #: ../fish/guestfish-actions.pod:4947
16464 #: ../fish/guestfish-actions.pod:4949 ../src/guestfs-actions.pod:7493
16466 "Return the libguestfs version number that the program is linked against."
16470 #: ../fish/guestfish-actions.pod:4952 ../src/guestfs-actions.pod:7496
16472 "Note that because of dynamic linking this is not necessarily the version of "
16473 "libguestfs that you compiled against. You can compile the program, and then "
16474 "at runtime dynamically link against a completely different C<libguestfs.so> "
16479 #: ../fish/guestfish-actions.pod:4957 ../src/guestfs-actions.pod:7501
16481 "This call was added in version C<1.0.58>. In previous versions of "
16482 "libguestfs there was no way to get the version number. From C code you can "
16483 "use dynamic linker functions to find out if this symbol exists (if it "
16484 "doesn't, then it's an earlier version)."
16488 #: ../fish/guestfish-actions.pod:4963 ../src/guestfs-actions.pod:7507
16490 "The call returns a structure with four elements. The first three (C<major>, "
16491 "C<minor> and C<release>) are numbers and correspond to the usual version "
16492 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16493 "but may be used for distro-specific information."
16497 #: ../fish/guestfish-actions.pod:4969 ../src/guestfs-actions.pod:7513
16499 "To construct the original version string: C<$major.$minor.$release$extra>"
16503 #: ../fish/guestfish-actions.pod:4972 ../src/guestfs-actions.pod:7516
16504 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16508 #: ../fish/guestfish-actions.pod:4974
16510 "I<Note:> Don't use this call to test for availability of features. In "
16511 "enterprise distributions we backport features from later versions into "
16512 "earlier versions, making this an unreliable way to test for features. Use "
16513 "L</available> instead."
16517 #: ../fish/guestfish-actions.pod:4980
16522 #: ../fish/guestfish-actions.pod:4982
16525 " vfs-label device\n"
16530 #: ../fish/guestfish-actions.pod:4984 ../src/guestfs-actions.pod:7536
16531 msgid "This returns the filesystem label of the filesystem on C<device>."
16535 #: ../fish/guestfish-actions.pod:4987 ../src/guestfs-actions.pod:7539
16536 msgid "If the filesystem is unlabeled, this returns the empty string."
16540 #: ../fish/guestfish-actions.pod:4989
16541 msgid "To find a filesystem from the label, use L</findfs-label>."
16545 #: ../fish/guestfish-actions.pod:4991
16550 #: ../fish/guestfish-actions.pod:4993
16553 " vfs-type device\n"
16558 #: ../fish/guestfish-actions.pod:4995 ../src/guestfs-actions.pod:7554
16560 "This command gets the filesystem type corresponding to the filesystem on "
16565 #: ../fish/guestfish-actions.pod:4998 ../src/guestfs-actions.pod:7557
16567 "For most filesystems, the result is the name of the Linux VFS module which "
16568 "would be used to mount this filesystem if you mounted it without specifying "
16569 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16573 #: ../fish/guestfish-actions.pod:5003
16578 #: ../fish/guestfish-actions.pod:5005
16581 " vfs-uuid device\n"
16586 #: ../fish/guestfish-actions.pod:5007 ../src/guestfs-actions.pod:7573
16587 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16591 #: ../fish/guestfish-actions.pod:5010 ../src/guestfs-actions.pod:7576
16592 msgid "If the filesystem does not have a UUID, this returns the empty string."
16596 #: ../fish/guestfish-actions.pod:5012
16597 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16601 #: ../fish/guestfish-actions.pod:5014
16602 msgid "vg-activate"
16606 #: ../fish/guestfish-actions.pod:5016
16609 " vg-activate true|false 'volgroups ...'\n"
16614 #: ../fish/guestfish-actions.pod:5018 ../src/guestfs-actions.pod:7592
16616 "This command activates or (if C<activate> is false) deactivates all logical "
16617 "volumes in the listed volume groups C<volgroups>."
16621 #: ../fish/guestfish-actions.pod:5021 ../src/guestfs-actions.pod:7595
16622 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16626 #: ../fish/guestfish-actions.pod:5023 ../src/guestfs-actions.pod:7597
16628 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16629 "activated or deactivated."
16633 #: ../fish/guestfish-actions.pod:5026
16634 msgid "vg-activate-all"
16638 #: ../fish/guestfish-actions.pod:5028
16641 " vg-activate-all true|false\n"
16646 #: ../fish/guestfish-actions.pod:5030 ../src/guestfs-actions.pod:7610
16648 "This command activates or (if C<activate> is false) deactivates all logical "
16649 "volumes in all volume groups."
16653 #: ../fish/guestfish-actions.pod:5033 ../src/guestfs-actions.pod:7613
16654 msgid "This command is the same as running C<vgchange -a y|n>"
16658 #: ../fish/guestfish-actions.pod:5035
16663 #: ../fish/guestfish-actions.pod:5037
16666 " vgcreate volgroup 'physvols ...'\n"
16671 #: ../fish/guestfish-actions.pod:5039 ../src/guestfs-actions.pod:7626
16673 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16674 "of physical volumes C<physvols>."
16678 #: ../fish/guestfish-actions.pod:5042
16683 #: ../fish/guestfish-actions.pod:5044
16686 " vglvuuids vgname\n"
16691 #: ../fish/guestfish-actions.pod:5046 ../src/guestfs-actions.pod:7639
16693 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16694 "volumes created in this volume group."
16698 #: ../fish/guestfish-actions.pod:5049
16700 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
16701 "logical volumes and volume groups."
16705 #: ../fish/guestfish-actions.pod:5052
16706 msgid "See also L</vgpvuuids>."
16710 #: ../fish/guestfish-actions.pod:5054
16715 #: ../fish/guestfish-actions.pod:5056
16718 " vgpvuuids vgname\n"
16723 #: ../fish/guestfish-actions.pod:5058 ../src/guestfs-actions.pod:7659
16725 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
16726 "volumes that this volume group resides on."
16730 #: ../fish/guestfish-actions.pod:5061
16732 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
16733 "physical volumes and volume groups."
16737 #: ../fish/guestfish-actions.pod:5064
16738 msgid "See also L</vglvuuids>."
16742 #: ../fish/guestfish-actions.pod:5066
16747 #: ../fish/guestfish-actions.pod:5068
16750 " vgremove vgname\n"
16755 #: ../fish/guestfish-actions.pod:5070 ../src/guestfs-actions.pod:7679
16756 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
16760 #: ../fish/guestfish-actions.pod:5072 ../src/guestfs-actions.pod:7681
16762 "This also forcibly removes all logical volumes in the volume group (if any)."
16766 #: ../fish/guestfish-actions.pod:5075
16771 #: ../fish/guestfish-actions.pod:5077
16774 " vgrename volgroup newvolgroup\n"
16779 #: ../fish/guestfish-actions.pod:5079 ../src/guestfs-actions.pod:7695
16780 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
16784 #: ../fish/guestfish-actions.pod:5081
16789 #: ../fish/guestfish-actions.pod:5083
16797 #: ../fish/guestfish-actions.pod:5085 ../src/guestfs-actions.pod:7706
16799 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
16804 #: ../fish/guestfish-actions.pod:5088 ../src/guestfs-actions.pod:7709
16806 "This returns a list of just the volume group names that were detected (eg. "
16811 #: ../fish/guestfish-actions.pod:5091
16812 msgid "See also L</vgs-full>."
16816 #: ../fish/guestfish-actions.pod:5093
16821 #: ../fish/guestfish-actions.pod:5095
16829 #: ../fish/guestfish-actions.pod:5097 ../src/guestfs-actions.pod:7725
16831 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
16832 "> command. The \"full\" version includes all fields."
16836 #: ../fish/guestfish-actions.pod:5100
16841 #: ../fish/guestfish-actions.pod:5102
16849 #: ../fish/guestfish-actions.pod:5104 ../src/guestfs-actions.pod:7739
16851 "This rescans all block devices and rebuilds the list of LVM physical "
16852 "volumes, volume groups and logical volumes."
16856 #: ../fish/guestfish-actions.pod:5107
16861 #: ../fish/guestfish-actions.pod:5109
16869 #: ../fish/guestfish-actions.pod:5111 ../src/guestfs-actions.pod:7752
16870 msgid "This command returns the UUID of the LVM VG named C<vgname>."
16874 #: ../fish/guestfish-actions.pod:5113
16879 #: ../fish/guestfish-actions.pod:5115
16887 #: ../fish/guestfish-actions.pod:5117 ../src/guestfs-actions.pod:7792
16889 "This command counts the characters in a file, using the C<wc -c> external "
16894 #: ../fish/guestfish-actions.pod:5120
16899 #: ../fish/guestfish-actions.pod:5122
16907 #: ../fish/guestfish-actions.pod:5124 ../src/guestfs-actions.pod:7805
16909 "This command counts the lines in a file, using the C<wc -l> external command."
16913 #: ../fish/guestfish-actions.pod:5127
16918 #: ../fish/guestfish-actions.pod:5129
16926 #: ../fish/guestfish-actions.pod:5131 ../src/guestfs-actions.pod:7818
16928 "This command counts the words in a file, using the C<wc -w> external command."
16932 #: ../fish/guestfish-actions.pod:5134
16937 #: ../fish/guestfish-actions.pod:5136
16940 " write path content\n"
16945 #: ../fish/guestfish-actions.pod:5138 ../src/guestfs-actions.pod:7833
16947 "This call creates a file called C<path>. The content of the file is the "
16948 "string C<content> (which can contain any 8 bit data)."
16952 #: ../fish/guestfish-actions.pod:5141
16953 msgid "See also L</write-append>."
16957 #: ../fish/guestfish-actions.pod:5146
16958 msgid "write-append"
16962 #: ../fish/guestfish-actions.pod:5148
16965 " write-append path content\n"
16970 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7853
16972 "This call appends C<content> to the end of file C<path>. If C<path> does "
16973 "not exist, then a new file is created."
16977 #: ../fish/guestfish-actions.pod:5153
16978 msgid "See also L</write>."
16982 #: ../fish/guestfish-actions.pod:5158
16987 #: ../fish/guestfish-actions.pod:5160
16990 " write-file path content size\n"
16995 #: ../fish/guestfish-actions.pod:5162 ../src/guestfs-actions.pod:7880
16997 "This call creates a file called C<path>. The contents of the file is the "
16998 "string C<content> (which can contain any 8 bit data), with length C<size>."
17002 #: ../fish/guestfish-actions.pod:5166 ../src/guestfs-actions.pod:7884
17004 "As a special case, if C<size> is C<0> then the length is calculated using "
17005 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17009 #: ../fish/guestfish-actions.pod:5170 ../src/guestfs-actions.pod:7888
17011 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17012 "I<not> work, even if the length is specified."
17016 #: ../fish/guestfish-actions.pod:5176
17018 "I<This function is deprecated.> In new code, use the L</write> call instead."
17022 #: ../fish/guestfish-actions.pod:5183
17027 #: ../fish/guestfish-actions.pod:5185
17030 " zegrep regex path\n"
17035 #: ../fish/guestfish-actions.pod:5187 ../src/guestfs-actions.pod:7905
17037 "This calls the external C<zegrep> program and returns the matching lines."
17041 #: ../fish/guestfish-actions.pod:5193
17046 #: ../fish/guestfish-actions.pod:5195
17049 " zegrepi regex path\n"
17054 #: ../fish/guestfish-actions.pod:5197 ../src/guestfs-actions.pod:7924
17056 "This calls the external C<zegrep -i> program and returns the matching lines."
17060 #: ../fish/guestfish-actions.pod:5203
17065 #: ../fish/guestfish-actions.pod:5205
17073 #: ../fish/guestfish-actions.pod:5207 ../src/guestfs-actions.pod:7942
17074 msgid "This command writes zeroes over the first few blocks of C<device>."
17078 #: ../fish/guestfish-actions.pod:5209 ../src/guestfs-actions.pod:7944
17080 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17081 "securely wipe the device). It should be sufficient to remove any partition "
17082 "tables, filesystem superblocks and so on."
17086 #: ../fish/guestfish-actions.pod:5213 ../fish/guestfish-actions.pod:5228
17087 #: ../src/guestfs-actions.pod:7948 ../src/guestfs-actions.pod:7974
17089 "If blocks are already zero, then this command avoids writing zeroes. This "
17090 "prevents the underlying device from becoming non-sparse or growing "
17095 #: ../fish/guestfish-actions.pod:5217
17096 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17100 #: ../fish/guestfish-actions.pod:5220
17101 msgid "zero-device"
17105 #: ../fish/guestfish-actions.pod:5222
17108 " zero-device device\n"
17113 #: ../fish/guestfish-actions.pod:5224
17115 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17116 "which just zeroes the first few blocks of a device."
17120 #: ../fish/guestfish-actions.pod:5235
17125 #: ../fish/guestfish-actions.pod:5237
17128 " zerofree device\n"
17133 #: ../fish/guestfish-actions.pod:5239 ../src/guestfs-actions.pod:7996
17135 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17136 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17137 "possible to compress the filesystem more effectively."
17141 #: ../fish/guestfish-actions.pod:5244 ../src/guestfs-actions.pod:8001
17142 msgid "You should B<not> run this program if the filesystem is mounted."
17146 #: ../fish/guestfish-actions.pod:5247 ../src/guestfs-actions.pod:8004
17148 "It is possible that using this program can damage the filesystem or data on "
17153 #: ../fish/guestfish-actions.pod:5250
17158 #: ../fish/guestfish-actions.pod:5252
17161 " zfgrep pattern path\n"
17166 #: ../fish/guestfish-actions.pod:5254 ../src/guestfs-actions.pod:8018
17168 "This calls the external C<zfgrep> program and returns the matching lines."
17172 #: ../fish/guestfish-actions.pod:5260
17177 #: ../fish/guestfish-actions.pod:5262
17180 " zfgrepi pattern path\n"
17185 #: ../fish/guestfish-actions.pod:5264 ../src/guestfs-actions.pod:8037
17187 "This calls the external C<zfgrep -i> program and returns the matching lines."
17191 #: ../fish/guestfish-actions.pod:5270
17196 #: ../fish/guestfish-actions.pod:5272
17199 " zfile meth path\n"
17204 #: ../fish/guestfish-actions.pod:5274 ../src/guestfs-actions.pod:8063
17206 "This command runs C<file> after first decompressing C<path> using C<method>."
17210 #: ../fish/guestfish-actions.pod:5277 ../src/guestfs-actions.pod:8066
17211 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17215 #: ../fish/guestfish-actions.pod:5279
17217 "Since 1.0.63, use L</file> instead which can now process compressed files."
17221 #: ../fish/guestfish-actions.pod:5282
17223 "I<This function is deprecated.> In new code, use the L</file> call instead."
17227 #: ../fish/guestfish-actions.pod:5289
17232 #: ../fish/guestfish-actions.pod:5291
17235 " zgrep regex path\n"
17240 #: ../fish/guestfish-actions.pod:5293 ../src/guestfs-actions.pod:8083
17242 "This calls the external C<zgrep> program and returns the matching lines."
17246 #: ../fish/guestfish-actions.pod:5299
17251 #: ../fish/guestfish-actions.pod:5301
17254 " zgrepi regex path\n"
17259 #: ../fish/guestfish-actions.pod:5303 ../src/guestfs-actions.pod:8102
17261 "This calls the external C<zgrep -i> program and returns the matching lines."
17265 #: ../fish/guestfish-commands.pod:1
17270 #: ../fish/guestfish-commands.pod:3
17275 #: ../fish/guestfish-commands.pod:5
17278 " alloc filename size\n"
17283 #: ../fish/guestfish-commands.pod:7
17285 "This creates an empty (zeroed) file of the given size, and then adds so it "
17286 "can be further examined."
17290 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17291 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17295 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17296 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17300 #: ../fish/guestfish-commands.pod:14
17302 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17303 "image, see L</PREPARED DISK IMAGES>."
17307 #: ../fish/guestfish-commands.pod:17
17312 #: ../fish/guestfish-commands.pod:19
17315 " copy-in local [local ...] /remotedir\n"
17320 #: ../fish/guestfish-commands.pod:21
17322 "C<copy-in> copies local files or directories recursively into the disk "
17323 "image, placing them in the directory called C</remotedir> (which must "
17324 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17325 "other commands as necessary."
17329 #: ../fish/guestfish-commands.pod:26
17331 "Multiple local files and directories can be specified, but the last "
17332 "parameter must always be a remote directory. Wildcards cannot be used."
17336 #: ../fish/guestfish-commands.pod:30
17341 #: ../fish/guestfish-commands.pod:32
17344 " copy-out remote [remote ...] localdir\n"
17349 #: ../fish/guestfish-commands.pod:34
17351 "C<copy-out> copies remote files or directories recursively out of the disk "
17352 "image, placing them on the host disk in a local directory called C<localdir> "
17353 "(which must exist). This guestfish meta-command turns into a sequence of L</"
17354 "download>, L</tar-out> and other commands as necessary."
17358 #: ../fish/guestfish-commands.pod:40
17360 "Multiple remote files and directories can be specified, but the last "
17361 "parameter must always be a local directory. To download to the current "
17362 "directory, use C<.> as in:"
17366 #: ../fish/guestfish-commands.pod:44
17369 " copy-out /home .\n"
17374 #: ../fish/guestfish-commands.pod:46
17376 "Wildcards cannot be used in the ordinary command, but you can use them with "
17377 "the help of L</glob> like this:"
17381 #: ../fish/guestfish-commands.pod:49
17384 " glob copy-out /home/* .\n"
17389 #: ../fish/guestfish-commands.pod:51
17394 #: ../fish/guestfish-commands.pod:53
17397 " display filename\n"
17402 #: ../fish/guestfish-commands.pod:55
17404 "Use C<display> (a graphical display program) to display an image file. It "
17405 "downloads the file, and runs C<display> on it."
17409 #: ../fish/guestfish-commands.pod:58
17411 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17412 "environment variable. For example to use the GNOME display program:"
17416 #: ../fish/guestfish-commands.pod:61
17419 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17424 #: ../fish/guestfish-commands.pod:63
17425 msgid "See also L<display(1)>."
17429 #: ../fish/guestfish-commands.pod:65
17434 #: ../fish/guestfish-commands.pod:67
17437 " echo [params ...]\n"
17442 #: ../fish/guestfish-commands.pod:69
17443 msgid "This echos the parameters to the terminal."
17447 #: ../fish/guestfish-commands.pod:71
17452 #: ../fish/guestfish-commands.pod:73
17457 #: ../fish/guestfish-commands.pod:75
17462 #: ../fish/guestfish-commands.pod:77
17470 #: ../fish/guestfish-commands.pod:79
17472 "This is used to edit a file. It downloads the file, edits it locally using "
17473 "your editor, then uploads the result."
17477 #: ../fish/guestfish-commands.pod:82
17479 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17480 "or C<emacs> you will get those corresponding editors."
17484 #: ../fish/guestfish-commands.pod:86
17489 #: ../fish/guestfish-commands.pod:88
17492 " glob command args...\n"
17497 #: ../fish/guestfish-commands.pod:90
17499 "Expand wildcards in any paths in the args list, and run C<command> "
17500 "repeatedly on each matching path."
17504 #: ../fish/guestfish-commands.pod:93
17505 msgid "See L</WILDCARDS AND GLOBBING>."
17509 #: ../fish/guestfish-commands.pod:95
17514 #: ../fish/guestfish-commands.pod:97
17517 " hexedit <filename|device>\n"
17518 " hexedit <filename|device> <max>\n"
17519 " hexedit <filename|device> <start> <max>\n"
17524 #: ../fish/guestfish-commands.pod:101
17526 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17531 #: ../fish/guestfish-commands.pod:104
17533 "This command works by downloading potentially the whole file or device, "
17534 "editing it locally, then uploading it. If the file or device is large, you "
17535 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17536 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17537 "usual modifiers allowed such as C<1M> (1 megabyte)."
17541 #: ../fish/guestfish-commands.pod:111
17542 msgid "For example to edit the first few sectors of a disk you might do:"
17546 #: ../fish/guestfish-commands.pod:114
17549 " hexedit /dev/sda 1M\n"
17554 #: ../fish/guestfish-commands.pod:116
17556 "which would allow you to edit anywhere within the first megabyte of the disk."
17560 #: ../fish/guestfish-commands.pod:119
17561 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17565 #: ../fish/guestfish-commands.pod:121
17568 " hexedit /dev/sda1 0x400 0x400\n"
17573 #: ../fish/guestfish-commands.pod:123
17574 msgid "(assuming the superblock is in the standard location)."
17578 #: ../fish/guestfish-commands.pod:125
17580 "This command requires the external L<hexedit(1)> program. You can specify "
17581 "another program to use by setting the C<HEXEDITOR> environment variable."
17585 #: ../fish/guestfish-commands.pod:129
17586 msgid "See also L</hexdump>."
17590 #: ../fish/guestfish-commands.pod:131
17595 #: ../fish/guestfish-commands.pod:133
17603 #: ../fish/guestfish-commands.pod:135
17605 "Change the local directory, ie. the current directory of guestfish itself."
17609 #: ../fish/guestfish-commands.pod:138
17610 msgid "Note that C<!cd> won't do what you might expect."
17614 #: ../fish/guestfish-commands.pod:140
17619 #: ../fish/guestfish-commands.pod:142
17624 #: ../fish/guestfish-commands.pod:144
17632 #: ../fish/guestfish-commands.pod:146
17633 msgid "Opens the manual page for guestfish."
17637 #: ../fish/guestfish-commands.pod:148
17642 #: ../fish/guestfish-commands.pod:150
17647 #: ../fish/guestfish-commands.pod:152
17655 #: ../fish/guestfish-commands.pod:154
17663 #: ../fish/guestfish-commands.pod:156
17664 msgid "This is used to view a file."
17668 #: ../fish/guestfish-commands.pod:158
17670 "The default viewer is C<$PAGER>. However if you use the alternate command "
17671 "C<less> you will get the C<less> command specifically."
17675 #: ../fish/guestfish-commands.pod:161
17680 #: ../fish/guestfish-commands.pod:163
17688 #: ../fish/guestfish-commands.pod:165
17690 "Close and reopen the libguestfs handle. It is not necessary to use this "
17691 "normally, because the handle is closed properly when guestfish exits. "
17692 "However this is occasionally useful for testing."
17696 #: ../fish/guestfish-commands.pod:169
17701 #: ../fish/guestfish-commands.pod:171
17704 " setenv VAR value\n"
17709 #: ../fish/guestfish-commands.pod:173
17710 msgid "Set the environment variable C<VAR> to the string C<value>."
17714 #: ../fish/guestfish-commands.pod:175
17716 "To print the value of an environment variable use a shell command such as:"
17720 #: ../fish/guestfish-commands.pod:178
17728 #: ../fish/guestfish-commands.pod:180
17733 #: ../fish/guestfish-commands.pod:182
17736 " sparse filename size\n"
17741 #: ../fish/guestfish-commands.pod:184
17743 "This creates an empty sparse file of the given size, and then adds so it can "
17744 "be further examined."
17748 #: ../fish/guestfish-commands.pod:187
17750 "In all respects it works the same as the L</alloc> command, except that the "
17751 "image file is allocated sparsely, which means that disk blocks are not "
17752 "assigned to the file until they are needed. Sparse disk files only use "
17753 "space when written to, but they are slower and there is a danger you could "
17754 "run out of real disk space during a write operation."
17758 #: ../fish/guestfish-commands.pod:197
17763 #: ../fish/guestfish-commands.pod:199
17771 #: ../fish/guestfish-commands.pod:201
17773 "This command returns a list of the optional groups known to the daemon, and "
17774 "indicates which ones are supported by this build of the libguestfs appliance."
17778 #: ../fish/guestfish-commands.pod:205
17779 msgid "See also L<guestfs(3)/AVAILABILITY>."
17783 #: ../fish/guestfish-commands.pod:207
17788 #: ../fish/guestfish-commands.pod:209
17791 " time command args...\n"
17796 #: ../fish/guestfish-commands.pod:211
17798 "Run the command as usual, but print the elapsed time afterwards. This can "
17799 "be useful for benchmarking operations."
17803 #: ../fish/guestfish-commands.pod:214
17808 #: ../fish/guestfish-commands.pod:216
17816 #: ../fish/guestfish-commands.pod:218
17817 msgid "Remove C<VAR> from the environment."
17821 #: ../fish/guestfish.pod:5
17822 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
17826 #: ../fish/guestfish.pod:9
17829 " guestfish [--options] [commands]\n"
17834 #: ../fish/guestfish.pod:11
17842 #: ../fish/guestfish.pod:13
17845 " guestfish [--ro|--rw] -a disk.img\n"
17850 #: ../fish/guestfish.pod:15
17853 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
17858 #: ../fish/guestfish.pod:17
17861 " guestfish -d libvirt-domain\n"
17866 #: ../fish/guestfish.pod:19
17869 " guestfish [--ro|--rw] -a disk.img -i\n"
17874 #: ../fish/guestfish.pod:21
17877 " guestfish -d libvirt-domain -i\n"
17882 #: ../fish/guestfish.pod:25
17884 "Using guestfish in read/write mode on live virtual machines can be "
17885 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
17886 "option to use guestfish safely if the disk image or virtual machine might be "
17891 #: ../fish/guestfish.pod:32
17893 "Guestfish is a shell and command-line tool for examining and modifying "
17894 "virtual machine filesystems. It uses libguestfs and exposes all of the "
17895 "functionality of the guestfs API, see L<guestfs(3)>."
17899 #: ../fish/guestfish.pod:36
17901 "Guestfish gives you structured access to the libguestfs API, from shell "
17902 "scripts or the command line or interactively. If you want to rescue a "
17903 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
17908 #: ../fish/guestfish.pod:43
17909 msgid "As an interactive shell"
17913 #: ../fish/guestfish.pod:45
17921 #: ../fish/guestfish.pod:47
17924 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
17925 " editing virtual machine filesystems.\n"
17930 #: ../fish/guestfish.pod:50
17933 " Type: 'help' for a list of commands\n"
17934 " 'man' to read the manual\n"
17935 " 'quit' to quit the shell\n"
17940 #: ../fish/guestfish.pod:54
17943 " ><fs> add-ro disk.img\n"
17945 " ><fs> list-filesystems\n"
17946 " /dev/sda1: ext4\n"
17947 " /dev/vg_guest/lv_root: ext4\n"
17948 " /dev/vg_guest/lv_swap: swap\n"
17949 " ><fs> mount /dev/vg_guest/lv_root /\n"
17950 " ><fs> cat /etc/fstab\n"
17952 " # Created by anaconda\n"
17959 #: ../fish/guestfish.pod:67
17960 msgid "From shell scripts"
17964 #: ../fish/guestfish.pod:69
17965 msgid "Create a new C</etc/motd> file in a guest or disk image:"
17969 #: ../fish/guestfish.pod:71
17972 " guestfish <<_EOF_\n"
17975 " mount /dev/vg_guest/lv_root /\n"
17976 " write /etc/motd \"Welcome, new users\"\n"
17982 #: ../fish/guestfish.pod:78
17983 msgid "List the LVM logical volumes in a disk image:"
17987 #: ../fish/guestfish.pod:80
17990 " guestfish -a disk.img --ro <<_EOF_\n"
17998 #: ../fish/guestfish.pod:85
17999 msgid "List all the filesystems in a disk image:"
18003 #: ../fish/guestfish.pod:87
18006 " guestfish -a disk.img --ro <<_EOF_\n"
18008 " list-filesystems\n"
18014 #: ../fish/guestfish.pod:92
18015 msgid "On one command line"
18019 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18020 msgid "Update C</etc/resolv.conf> in a guest:"
18024 #: ../fish/guestfish.pod:96
18028 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18029 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18034 #: ../fish/guestfish.pod:100
18035 msgid "Edit C</boot/grub/grub.conf> interactively:"
18039 #: ../fish/guestfish.pod:102
18042 " guestfish --rw --add disk.img \\\n"
18043 " --mount /dev/vg_guest/lv_root \\\n"
18044 " --mount /dev/sda1:/boot \\\n"
18045 " edit /boot/grub/grub.conf\n"
18050 #: ../fish/guestfish.pod:107
18051 msgid "Mount disks automatically"
18055 #: ../fish/guestfish.pod:109
18057 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
18061 #: ../fish/guestfish.pod:112
18064 " guestfish --ro -a disk.img -i cat /etc/group\n"
18069 #: ../fish/guestfish.pod:114
18072 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18077 #: ../fish/guestfish.pod:116
18078 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18082 #: ../fish/guestfish.pod:118
18085 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18090 #: ../fish/guestfish.pod:120
18091 msgid "As a script interpreter"
18095 #: ../fish/guestfish.pod:122
18096 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18100 #: ../fish/guestfish.pod:124
18103 " #!/usr/bin/guestfish -f\n"
18104 " sparse test1.img 100M\n"
18106 " part-disk /dev/sda mbr\n"
18107 " mkfs ext2 /dev/sda1\n"
18112 #: ../fish/guestfish.pod:130
18113 msgid "Start with a prepared disk"
18117 #: ../fish/guestfish.pod:132
18119 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18120 "single ext2-formatted partition:"
18124 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2228
18127 " guestfish -N fs\n"
18132 #: ../fish/guestfish.pod:137
18133 msgid "To list what is available do:"
18137 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18140 " guestfish -N help | less\n"
18145 #: ../fish/guestfish.pod:141
18146 msgid "Remote control"
18150 #: ../fish/guestfish.pod:143
18153 " eval \"`guestfish --listen`\"\n"
18154 " guestfish --remote add-ro disk.img\n"
18155 " guestfish --remote run\n"
18156 " guestfish --remote lvs\n"
18161 #: ../fish/guestfish.pod:154
18162 msgid "Displays general help on options."
18166 #: ../fish/guestfish.pod:158
18167 msgid "B<--cmd-help>"
18171 #: ../fish/guestfish.pod:160
18172 msgid "Lists all available guestfish commands."
18176 #: ../fish/guestfish.pod:162
18181 #: ../fish/guestfish.pod:164
18182 msgid "B<--cmd-help cmd>"
18186 #: ../fish/guestfish.pod:166
18187 msgid "Displays detailed help on a single command C<cmd>."
18191 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18192 msgid "B<-a image>"
18196 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18197 msgid "B<--add image>"
18201 #: ../fish/guestfish.pod:172
18202 msgid "Add a block device or virtual machine image to the shell."
18206 #: ../fish/guestfish.pod:177
18208 "Using this flag is mostly equivalent to using the C<add> command, with "
18209 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18210 "the I<--format=...> flag was given."
18214 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18216 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18217 "URI to use. The default is to use the default libvirt connection."
18221 #: ../fish/guestfish.pod:189
18226 #: ../fish/guestfish.pod:191
18228 "If using the I<--listen> option and a csh-like shell, use this option. See "
18229 "section L</REMOTE CONTROL AND CSH> below."
18233 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18234 msgid "B<-d libvirt-domain>"
18238 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18239 msgid "B<--domain libvirt-domain>"
18243 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18245 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18246 "used, then any libvirt domain can be used. However in write mode, only "
18247 "libvirt domains which are shut down can be named here."
18251 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18252 msgid "Domain UUIDs can be used instead of names."
18256 #: ../fish/guestfish.pod:204
18258 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18259 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18260 "if the I<--format:...> flag was given."
18264 #: ../fish/guestfish.pod:208
18269 #: ../fish/guestfish.pod:210
18270 msgid "B<--no-dest-paths>"
18274 #: ../fish/guestfish.pod:212
18276 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18277 "to hit the tab key to complete paths on the guest filesystem, but this "
18278 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18279 "allow this feature to be disabled."
18283 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18285 "When prompting for keys and passphrases, guestfish normally turns echoing "
18286 "off so you cannot see what you are typing. If you are not worried about "
18287 "Tempest attacks and there is no one else in the room you can specify this "
18288 "flag to see what you are typing."
18292 #: ../fish/guestfish.pod:224
18297 #: ../fish/guestfish.pod:226
18298 msgid "B<--file file>"
18302 #: ../fish/guestfish.pod:228
18303 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18307 #: ../fish/guestfish.pod:231
18310 " #!/usr/bin/guestfish -f\n"
18315 #: ../fish/guestfish.pod:244
18318 " guestfish --format=raw -a disk.img\n"
18323 #: ../fish/guestfish.pod:248
18326 " guestfish --format=raw -a disk.img --format -a another.img\n"
18331 #: ../fish/guestfish.pod:253
18333 "If you have untrusted raw-format guest disk images, you should use this "
18334 "option to specify the disk format. This avoids a possible security problem "
18335 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18339 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18340 msgid "B<--inspector>"
18344 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18346 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18347 "system and mount filesystems as they would be mounted on the real virtual "
18352 #: ../fish/guestfish.pod:266
18353 msgid "Typical usage is either:"
18357 #: ../fish/guestfish.pod:268
18360 " guestfish -d myguest -i\n"
18365 #: ../fish/guestfish.pod:270
18366 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18370 #: ../fish/guestfish.pod:272
18373 " guestfish --ro -d myguest -i\n"
18378 #: ../fish/guestfish.pod:274
18379 msgid "(for active domains, readonly), or specify the block device directly:"
18383 #: ../fish/guestfish.pod:276
18386 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18391 #: ../fish/guestfish.pod:278
18393 "Note that the command line syntax changed slightly over older versions of "
18394 "guestfish. You can still use the old syntax:"
18398 #: ../fish/guestfish.pod:281
18401 " guestfish [--ro] -i disk.img\n"
18406 #: ../fish/guestfish.pod:283
18409 " guestfish [--ro] -i libvirt-domain\n"
18414 #: ../fish/guestfish.pod:285
18416 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18417 "then using other commands to mount the filesystems that were found."
18421 #: ../fish/guestfish.pod:294
18422 msgid "B<--listen>"
18426 #: ../fish/guestfish.pod:296
18428 "Fork into the background and listen for remote commands. See section L</"
18429 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18433 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18438 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18440 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
18441 "ATTACHING TO RUNNING DAEMONS>)."
18445 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18446 msgid "B<-m dev[:mountpoint[:options]]>"
18450 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18451 msgid "B<--mount dev[:mountpoint[:options]]>"
18455 #: ../fish/guestfish.pod:308
18456 msgid "Mount the named partition or logical volume on the given mountpoint."
18460 #: ../fish/guestfish.pod:310
18461 msgid "If the mountpoint is omitted, it defaults to C</>."
18465 #: ../fish/guestfish.pod:312
18466 msgid "You have to mount something on C</> before most commands will work."
18470 #: ../fish/guestfish.pod:314
18472 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18477 #: ../fish/guestfish.pod:317
18479 "If you don't know what filesystems a disk image contains, you can either run "
18480 "guestfish without this option, then list the partitions, filesystems and LVs "
18481 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18482 "commands), or you can use the L<virt-filesystems(1)> program."
18486 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18488 "The third (and rarely used) part of the mount parameter is the list of mount "
18489 "options used to mount the underlying filesystem. If this is not given, then "
18490 "the mount options are either the empty string or C<ro> (the latter if the "
18491 "I<--ro> flag is used). By specifying the mount options, you override this "
18492 "default choice. Probably the only time you would use this is to enable ACLs "
18493 "and/or extended attributes if the filesystem can support them:"
18497 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18500 " -m /dev/sda1:/:acl,user_xattr\n"
18505 #: ../fish/guestfish.pod:333
18506 msgid "Using this flag is equivalent to using the C<mount-options> command."
18510 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
18511 #: ../resize/virt-resize.pod:414
18516 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18517 msgid "B<--no-sync>"
18521 #: ../fish/guestfish.pod:339
18523 "Disable autosync. This is enabled by default. See the discussion of "
18524 "autosync in the L<guestfs(3)> manpage."
18528 #: ../fish/guestfish.pod:342
18533 #: ../fish/guestfish.pod:344
18534 msgid "B<--new type>"
18538 #: ../fish/guestfish.pod:346
18543 #: ../fish/guestfish.pod:348
18545 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18546 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18547 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18552 #: ../fish/guestfish.pod:353
18553 msgid "B<--progress-bars>"
18557 #: ../fish/guestfish.pod:355
18558 msgid "Enable progress bars, even when guestfish is used non-interactively."
18562 #: ../fish/guestfish.pod:357
18564 "Progress bars are enabled by default when guestfish is used as an "
18565 "interactive shell."
18569 #: ../fish/guestfish.pod:360
18570 msgid "B<--no-progress-bars>"
18574 #: ../fish/guestfish.pod:362
18575 msgid "Disable progress bars."
18579 #: ../fish/guestfish.pod:364
18580 msgid "B<--remote[=pid]>"
18584 #: ../fish/guestfish.pod:366
18586 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18587 "CONTROL GUESTFISH OVER A SOCKET> below."
18591 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
18592 #: ../rescue/virt-rescue.pod:161
18597 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
18598 #: ../rescue/virt-rescue.pod:163
18603 #: ../fish/guestfish.pod:373
18605 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18606 "mounts are done read-only."
18610 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18612 "The option must always be used if the disk image or virtual machine might be "
18613 "running, and is generally recommended in cases where you don't need write "
18614 "access to the disk."
18618 #: ../fish/guestfish.pod:380
18620 "Note that prepared disk images created with I<-N> are not affected by this "
18621 "option. Also commands like C<add> are not affected - you have to specify "
18622 "the C<readonly:true> option explicitly if you need it."
18626 #: ../fish/guestfish.pod:384
18627 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18631 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
18632 #: ../rescue/virt-rescue.pod:173
18633 msgid "B<--selinux>"
18637 #: ../fish/guestfish.pod:388
18638 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18642 #: ../fish/guestfish.pod:394
18644 "Enable very verbose messages. This is particularly useful if you find a bug."
18648 #: ../fish/guestfish.pod:401
18649 msgid "Display the guestfish / libguestfs version number and exit."
18653 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
18654 #: ../rescue/virt-rescue.pod:194
18659 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
18660 #: ../rescue/virt-rescue.pod:196
18665 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18667 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18668 "mounts are done read-write."
18672 #: ../fish/guestfish.pod:410
18673 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18677 #: ../fish/guestfish.pod:414
18678 msgid "Echo each command before executing it."
18682 #: ../fish/guestfish.pod:418
18683 msgid "COMMANDS ON COMMAND LINE"
18687 #: ../fish/guestfish.pod:420
18689 "Any additional (non-option) arguments are treated as commands to execute."
18693 #: ../fish/guestfish.pod:423
18695 "Commands to execute should be separated by a colon (C<:>), where the colon "
18696 "is a separate parameter. Thus:"
18700 #: ../fish/guestfish.pod:426
18703 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18708 #: ../fish/guestfish.pod:428
18710 "If there are no additional arguments, then we enter a shell, either an "
18711 "interactive shell with a prompt (if the input is a terminal) or a non-"
18712 "interactive shell."
18716 #: ../fish/guestfish.pod:432
18718 "In either command line mode or non-interactive shell, the first command that "
18719 "gives an error causes the whole shell to exit. In interactive mode (with a "
18720 "prompt) if a command fails, you can continue to enter commands."
18724 #: ../fish/guestfish.pod:437
18725 msgid "USING launch (OR run)"
18729 #: ../fish/guestfish.pod:439
18731 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18732 "then launch it, then mount any disks you need, and finally issue actions/"
18733 "commands. So the general order of the day is:"
18737 #: ../fish/guestfish.pod:447
18738 msgid "add or -a/--add"
18742 #: ../fish/guestfish.pod:451
18743 msgid "launch (aka run)"
18747 #: ../fish/guestfish.pod:455
18748 msgid "mount or -m/--mount"
18752 #: ../fish/guestfish.pod:459
18753 msgid "any other commands"
18757 #: ../fish/guestfish.pod:463
18759 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
18760 "guest before mounting or performing any other commands."
18764 #: ../fish/guestfish.pod:466
18766 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
18767 "I<--new> options were given then C<run> is done automatically, simply "
18768 "because guestfish can't perform the action you asked for without doing this."
18772 #: ../fish/guestfish.pod:471
18773 msgid "OPENING DISKS FOR READ AND WRITE"
18777 #: ../fish/guestfish.pod:473
18779 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
18780 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
18781 "I<-i> and I<-m> open disk images read-only or for writing."
18785 #: ../fish/guestfish.pod:478
18787 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
18788 "opening disk images supplied on the command line for write. To open a disk "
18789 "image read-only you have to do I<-a image --ro>."
18793 #: ../fish/guestfish.pod:482
18795 "This matters: If you accidentally open a live VM disk image writable then "
18796 "you will cause irreversible disk corruption."
18800 #: ../fish/guestfish.pod:485
18802 "In a future libguestfs we intend to change the default the other way. Disk "
18803 "images will be opened read-only. You will have to either specify "
18804 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
18805 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
18806 "access for disk images specified by those other command line options."
18810 #: ../fish/guestfish.pod:492
18812 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
18813 "which does nothing (it is already the default). However it is highly "
18814 "recommended that you use this option to indicate that you need write access, "
18815 "and prepare your scripts for the day when this option will be required for "
18820 #: ../fish/guestfish.pod:498
18822 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
18823 "other libguestfs program apart from guestfish and guestmount."
18827 #: ../fish/guestfish.pod:501
18832 #: ../fish/guestfish.pod:503
18834 "You can quote ordinary parameters using either single or double quotes. For "
18839 #: ../fish/guestfish.pod:506
18842 " add \"file with a space.img\"\n"
18847 #: ../fish/guestfish.pod:508
18850 " rm '/file name'\n"
18855 #: ../fish/guestfish.pod:510
18863 #: ../fish/guestfish.pod:512
18865 "A few commands require a list of strings to be passed. For these, use a "
18866 "whitespace-separated list, enclosed in quotes. Strings containing "
18867 "whitespace to be passed through must be enclosed in single quotes. A "
18868 "literal single quote must be escaped with a backslash."
18872 #: ../fish/guestfish.pod:517
18875 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
18876 " command \"/bin/echo 'foo bar'\"\n"
18877 " command \"/bin/echo \\'foo\\'\"\n"
18882 #: ../fish/guestfish.pod:521
18883 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
18887 #: ../fish/guestfish.pod:523
18889 "In double-quoted arguments (only) use backslash to insert special characters:"
18893 #: ../fish/guestfish.pod:528
18898 #: ../fish/guestfish.pod:530
18899 msgid "Alert (bell) character."
18903 #: ../fish/guestfish.pod:532
18908 #: ../fish/guestfish.pod:534
18909 msgid "Backspace character."
18913 #: ../fish/guestfish.pod:536
18918 #: ../fish/guestfish.pod:538
18919 msgid "Form feed character."
18923 #: ../fish/guestfish.pod:540
18928 #: ../fish/guestfish.pod:542
18929 msgid "Newline character."
18933 #: ../fish/guestfish.pod:544
18938 #: ../fish/guestfish.pod:546
18939 msgid "Carriage return character."
18943 #: ../fish/guestfish.pod:548
18948 #: ../fish/guestfish.pod:550
18949 msgid "Horizontal tab character."
18953 #: ../fish/guestfish.pod:552
18958 #: ../fish/guestfish.pod:554
18959 msgid "Vertical tab character."
18963 #: ../fish/guestfish.pod:556
18968 #: ../fish/guestfish.pod:558
18969 msgid "A literal double quote character."
18973 #: ../fish/guestfish.pod:560
18978 #: ../fish/guestfish.pod:562
18980 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
18985 #: ../fish/guestfish.pod:565
18990 #: ../fish/guestfish.pod:567
18992 "A character with hex value I<hh>. There must be precisely 2 hex digits."
18996 #: ../fish/guestfish.pod:570
18998 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
19003 #: ../fish/guestfish.pod:573
19008 #: ../fish/guestfish.pod:575
19009 msgid "A literal backslash character."
19013 #: ../fish/guestfish.pod:579
19014 msgid "OPTIONAL ARGUMENTS"
19018 #: ../fish/guestfish.pod:581
19020 "Some commands take optional arguments. These arguments appear in this "
19021 "documentation as C<[argname:..]>. You can use them as in these examples:"
19025 #: ../fish/guestfish.pod:585
19028 " add-drive-opts filename\n"
19033 #: ../fish/guestfish.pod:587
19036 " add-drive-opts filename readonly:true\n"
19041 #: ../fish/guestfish.pod:589
19044 " add-drive-opts filename format:qcow2 readonly:false\n"
19049 #: ../fish/guestfish.pod:591
19051 "Each optional argument can appear at most once. All optional arguments must "
19052 "appear after the required ones."
19056 #: ../fish/guestfish.pod:594
19061 #: ../fish/guestfish.pod:596
19063 "This section applies to all commands which can take integers as parameters."
19067 #: ../fish/guestfish.pod:599
19068 msgid "SIZE SUFFIX"
19072 #: ../fish/guestfish.pod:601
19074 "When the command takes a parameter measured in bytes, you can use one of the "
19075 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19079 #: ../fish/guestfish.pod:607
19080 msgid "B<k> or B<K> or B<KiB>"
19084 #: ../fish/guestfish.pod:609
19085 msgid "The size in kilobytes (multiplied by 1024)."
19089 #: ../fish/guestfish.pod:611
19094 #: ../fish/guestfish.pod:613
19095 msgid "The size in SI 1000 byte units."
19099 #: ../fish/guestfish.pod:615
19100 msgid "B<M> or B<MiB>"
19104 #: ../fish/guestfish.pod:617
19105 msgid "The size in megabytes (multiplied by 1048576)."
19109 #: ../fish/guestfish.pod:619
19114 #: ../fish/guestfish.pod:621
19115 msgid "The size in SI 1000000 byte units."
19119 #: ../fish/guestfish.pod:623
19120 msgid "B<G> or B<GiB>"
19124 #: ../fish/guestfish.pod:625
19125 msgid "The size in gigabytes (multiplied by 2**30)."
19129 #: ../fish/guestfish.pod:627
19134 #: ../fish/guestfish.pod:629
19135 msgid "The size in SI 10**9 byte units."
19139 #: ../fish/guestfish.pod:631
19140 msgid "B<T> or B<TiB>"
19144 #: ../fish/guestfish.pod:633
19145 msgid "The size in terabytes (multiplied by 2**40)."
19149 #: ../fish/guestfish.pod:635
19154 #: ../fish/guestfish.pod:637
19155 msgid "The size in SI 10**12 byte units."
19159 #: ../fish/guestfish.pod:639
19160 msgid "B<P> or B<PiB>"
19164 #: ../fish/guestfish.pod:641
19165 msgid "The size in petabytes (multiplied by 2**50)."
19169 #: ../fish/guestfish.pod:643
19174 #: ../fish/guestfish.pod:645
19175 msgid "The size in SI 10**15 byte units."
19179 #: ../fish/guestfish.pod:647
19180 msgid "B<E> or B<EiB>"
19184 #: ../fish/guestfish.pod:649
19185 msgid "The size in exabytes (multiplied by 2**60)."
19189 #: ../fish/guestfish.pod:651
19194 #: ../fish/guestfish.pod:653
19195 msgid "The size in SI 10**18 byte units."
19199 #: ../fish/guestfish.pod:655
19200 msgid "B<Z> or B<ZiB>"
19204 #: ../fish/guestfish.pod:657
19205 msgid "The size in zettabytes (multiplied by 2**70)."
19209 #: ../fish/guestfish.pod:659
19214 #: ../fish/guestfish.pod:661
19215 msgid "The size in SI 10**21 byte units."
19219 #: ../fish/guestfish.pod:663
19220 msgid "B<Y> or B<YiB>"
19224 #: ../fish/guestfish.pod:665
19225 msgid "The size in yottabytes (multiplied by 2**80)."
19229 #: ../fish/guestfish.pod:667
19234 #: ../fish/guestfish.pod:669
19235 msgid "The size in SI 10**24 byte units."
19239 #: ../fish/guestfish.pod:675
19242 " truncate-size /file 1G\n"
19247 #: ../fish/guestfish.pod:677
19248 msgid "would truncate the file to 1 gigabyte."
19252 #: ../fish/guestfish.pod:679
19254 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
19255 "the parameter to L</memsize> is specified in megabytes already). Adding a "
19256 "suffix will probably not do what you expect."
19260 #: ../fish/guestfish.pod:683
19261 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19265 #: ../fish/guestfish.pod:685
19267 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19268 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19272 #: ../fish/guestfish.pod:688
19275 " 1234 decimal number 1234\n"
19276 " 02322 octal number, equivalent to decimal 1234\n"
19277 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19282 #: ../fish/guestfish.pod:692
19284 "When using the C<chmod> command, you almost always want to specify an octal "
19285 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19286 "L<chmod(1)> program):"
19290 #: ../fish/guestfish.pod:696
19293 " chmod 0777 /public # OK\n"
19294 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19299 #: ../fish/guestfish.pod:699
19301 "Commands that return numbers usually print them in decimal, but some "
19302 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19303 "octal, preceeded by C<0>)."
19307 #: ../fish/guestfish.pod:703
19308 msgid "WILDCARDS AND GLOBBING"
19312 #: ../fish/guestfish.pod:705
19314 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19315 "(globbing) by default. So for example the following will not do what you "
19320 #: ../fish/guestfish.pod:709
19328 #: ../fish/guestfish.pod:711
19330 "Assuming you don't have a directory called literally C</home/*> then the "
19331 "above command will return an error."
19335 #: ../fish/guestfish.pod:714
19336 msgid "To perform wildcard expansion, use the C<glob> command."
19340 #: ../fish/guestfish.pod:716
19343 " glob rm-rf /home/*\n"
19348 #: ../fish/guestfish.pod:718
19350 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19351 "many times), equivalent to:"
19355 #: ../fish/guestfish.pod:721
19358 " rm-rf /home/jim\n"
19359 " rm-rf /home/joe\n"
19360 " rm-rf /home/mary\n"
19365 #: ../fish/guestfish.pod:725
19366 msgid "C<glob> only works on simple guest paths and not on device names."
19370 #: ../fish/guestfish.pod:727
19372 "If you have several parameters, each containing a wildcard, then glob will "
19373 "perform a Cartesian product."
19377 #: ../fish/guestfish.pod:730
19382 #: ../fish/guestfish.pod:732
19384 "Any line which starts with a I<#> character is treated as a comment and "
19385 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19386 "a command. For example:"
19390 #: ../fish/guestfish.pod:736
19393 " # this is a comment\n"
19394 " # this is a comment\n"
19395 " foo # NOT a comment\n"
19400 #: ../fish/guestfish.pod:740
19401 msgid "Blank lines are also ignored."
19405 #: ../fish/guestfish.pod:742
19406 msgid "RUNNING COMMANDS LOCALLY"
19410 #: ../fish/guestfish.pod:744
19412 "Any line which starts with a I<!> character is treated as a command sent to "
19413 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19417 #: ../fish/guestfish.pod:748
19421 " tgz-out /remote local/remote-data.tar.gz\n"
19426 #: ../fish/guestfish.pod:751
19428 "will create a directory C<local> on the host, and then export the contents "
19429 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19430 "(See C<tgz-out>)."
19434 #: ../fish/guestfish.pod:755
19436 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19437 "effect, due to the way that subprocesses work in Unix."
19441 #: ../fish/guestfish.pod:758
19442 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19446 #: ../fish/guestfish.pod:760
19448 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19449 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19450 "and executed as guestfish commands."
19454 #: ../fish/guestfish.pod:764
19456 "Thus you can use shell script to construct arbitrary guestfish commands "
19457 "which are then parsed by guestfish."
19461 #: ../fish/guestfish.pod:767
19463 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19464 "through C</foo.100>) using guestfish commands alone. However this is simple "
19465 "if we use a shell script to create the guestfish commands for us:"
19469 #: ../fish/guestfish.pod:772
19472 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19477 #: ../fish/guestfish.pod:774
19478 msgid "or with names like C</foo.001>:"
19482 #: ../fish/guestfish.pod:776
19485 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19490 #: ../fish/guestfish.pod:778
19492 "When using guestfish interactively it can be helpful to just run the shell "
19493 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19494 "ordinary I<!> local command), see what guestfish commands it would run, and "
19495 "when you are happy with those prepend the C<E<lt>> character to run the "
19496 "guestfish commands for real."
19500 #: ../fish/guestfish.pod:784
19505 #: ../fish/guestfish.pod:786
19507 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19508 "command (a guestfish command) to the second command (any host command). For "
19513 #: ../fish/guestfish.pod:790
19516 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19521 #: ../fish/guestfish.pod:792
19523 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19524 "program). The above command would list all accounts in the guest filesystem "
19525 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19529 #: ../fish/guestfish.pod:797
19532 " hexdump /bin/ls | head\n"
19533 " list-devices | tail -1\n"
19534 " tgz-out / - | tar ztf -\n"
19539 #: ../fish/guestfish.pod:801
19541 "The space before the pipe symbol is required, any space after the pipe "
19542 "symbol is optional. Everything after the pipe symbol is just passed "
19543 "straight to the host shell, so it can contain redirections, globs and "
19544 "anything else that makes sense on the host side."
19548 #: ../fish/guestfish.pod:806
19550 "To use a literal argument which begins with a pipe symbol, you have to quote "
19555 #: ../fish/guestfish.pod:809
19563 #: ../fish/guestfish.pod:811
19564 msgid "HOME DIRECTORIES"
19568 #: ../fish/guestfish.pod:813
19570 "If a parameter starts with the character C<~> then the tilde may be expanded "
19571 "as a home directory path (either C<~> for the current user's home directory, "
19572 "or C<~user> for another user)."
19576 #: ../fish/guestfish.pod:817
19578 "Note that home directory expansion happens for users known I<on the host>, "
19579 "not in the guest filesystem."
19583 #: ../fish/guestfish.pod:820
19585 "To use a literal argument which begins with a tilde, you have to quote it, "
19590 #: ../fish/guestfish.pod:823
19598 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:519
19599 msgid "ENCRYPTED DISKS"
19603 #: ../fish/guestfish.pod:827
19605 "Libguestfs has some support for Linux guests encrypted according to the "
19606 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19607 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
19608 "LUKS is supported."
19612 #: ../fish/guestfish.pod:832
19613 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19617 #: ../fish/guestfish.pod:834
19620 " ><fs> vfs-type /dev/sda2\n"
19626 #: ../fish/guestfish.pod:837
19628 "Then open those devices using L</luks-open>. This creates a device-mapper "
19629 "device called C</dev/mapper/luksdev>."
19633 #: ../fish/guestfish.pod:840
19636 " ><fs> luks-open /dev/sda2 luksdev\n"
19637 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19642 #: ../fish/guestfish.pod:843
19644 "Finally you have to tell LVM to scan for volume groups on the newly created "
19649 #: ../fish/guestfish.pod:846
19653 " vg-activate-all true\n"
19658 #: ../fish/guestfish.pod:849
19659 msgid "The logical volume(s) can now be mounted in the usual way."
19663 #: ../fish/guestfish.pod:851
19665 "Before closing a LUKS device you must unmount any logical volumes on it and "
19666 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19667 "one. Then you can close the mapper device:"
19671 #: ../fish/guestfish.pod:855
19674 " vg-activate false /dev/VG\n"
19675 " luks-close /dev/mapper/luksdev\n"
19680 #: ../fish/guestfish.pod:860
19682 "If a path is prefixed with C<win:> then you can use Windows-style drive "
19683 "letters and paths (with some limitations). The following commands are "
19688 #: ../fish/guestfish.pod:864
19691 " file /WINDOWS/system32/config/system.LOG\n"
19696 #: ../fish/guestfish.pod:866
19699 " file win:\\windows\\system32\\config\\system.log\n"
19704 #: ../fish/guestfish.pod:868
19707 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
19712 #: ../fish/guestfish.pod:870
19714 "The parameter is rewritten \"behind the scenes\" by looking up the position "
19715 "where the drive is mounted, prepending that to the path, changing all "
19716 "backslash characters to forward slash, then resolving the result using L</"
19717 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
19718 "the parameter might be rewritten like this:"
19722 #: ../fish/guestfish.pod:876
19725 " win:e:\\foo\\bar => /e/FOO/bar\n"
19730 #: ../fish/guestfish.pod:878
19731 msgid "This only works in argument positions that expect a path."
19735 #: ../fish/guestfish.pod:880
19736 msgid "UPLOADING AND DOWNLOADING FILES"
19740 #: ../fish/guestfish.pod:882
19742 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
19743 "others which upload from or download to a local file, you can use the "
19744 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
19748 #: ../fish/guestfish.pod:886
19756 #: ../fish/guestfish.pod:888
19758 "reads stdin and creates from that a file C</foo> in the disk image, and:"
19762 #: ../fish/guestfish.pod:891
19765 " tar-out /etc - | tar tf -\n"
19770 #: ../fish/guestfish.pod:893
19772 "writes the tarball to stdout and then pipes that into the external \"tar\" "
19773 "command (see L</PIPES>)."
19777 #: ../fish/guestfish.pod:896
19779 "When using C<-> to read from stdin, the input is read up to the end of "
19780 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
19781 "some arbitrary end marker:"
19785 #: ../fish/guestfish.pod:900
19788 " upload -<<END /foo\n"
19797 #: ../fish/guestfish.pod:906
19799 "Any string of characters can be used instead of C<END>. The end marker must "
19800 "appear on a line of its own, without any preceeding or following characters "
19801 "(not even spaces)."
19805 #: ../fish/guestfish.pod:910
19807 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
19808 "upload local files (so-called \"FileIn\" parameters in the generator)."
19812 #: ../fish/guestfish.pod:913
19813 msgid "EXIT ON ERROR BEHAVIOUR"
19817 #: ../fish/guestfish.pod:915
19819 "By default, guestfish will ignore any errors when in interactive mode (ie. "
19820 "taking commands from a human over a tty), and will exit on the first error "
19821 "in non-interactive mode (scripts, commands given on the command line)."
19825 #: ../fish/guestfish.pod:920
19827 "If you prefix a command with a I<-> character, then that command will not "
19828 "cause guestfish to exit, even if that (one) command returns an error."
19832 #: ../fish/guestfish.pod:924
19833 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
19837 #: ../fish/guestfish.pod:926
19839 "Guestfish can be remote-controlled over a socket. This is useful "
19840 "particularly in shell scripts where you want to make several different "
19841 "changes to a filesystem, but you don't want the overhead of starting up a "
19842 "guestfish process each time."
19846 #: ../fish/guestfish.pod:931
19847 msgid "Start a guestfish server process using:"
19851 #: ../fish/guestfish.pod:933
19854 " eval \"`guestfish --listen`\"\n"
19859 #: ../fish/guestfish.pod:935
19860 msgid "and then send it commands by doing:"
19864 #: ../fish/guestfish.pod:937
19867 " guestfish --remote cmd [...]\n"
19872 #: ../fish/guestfish.pod:939
19873 msgid "To cause the server to exit, send it the exit command:"
19877 #: ../fish/guestfish.pod:943
19879 "Note that the server will normally exit if there is an error in a command. "
19880 "You can change this in the usual way. See section L</EXIT ON ERROR "
19885 #: ../fish/guestfish.pod:947
19886 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
19890 #: ../fish/guestfish.pod:949
19892 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
19893 "is how the I<--remote> option knows where to send the commands. You can "
19894 "have several guestfish listener processes running using:"
19898 #: ../fish/guestfish.pod:953
19901 " eval \"`guestfish --listen`\"\n"
19902 " pid1=$GUESTFISH_PID\n"
19903 " eval \"`guestfish --listen`\"\n"
19904 " pid2=$GUESTFISH_PID\n"
19906 " guestfish --remote=$pid1 cmd\n"
19907 " guestfish --remote=$pid2 cmd\n"
19912 #: ../fish/guestfish.pod:961
19913 msgid "REMOTE CONTROL AND CSH"
19917 #: ../fish/guestfish.pod:963
19919 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
19924 #: ../fish/guestfish.pod:966
19927 " eval \"`guestfish --listen --csh`\"\n"
19932 #: ../fish/guestfish.pod:968
19933 msgid "REMOTE CONTROL DETAILS"
19937 #: ../fish/guestfish.pod:970
19939 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
19940 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
19941 "and C<$PID> is the process ID of the server."
19945 #: ../fish/guestfish.pod:974
19946 msgid "Guestfish client and server versions must match exactly."
19950 #: ../fish/guestfish.pod:976
19951 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
19955 #: ../fish/guestfish.pod:978
19957 "From Bash, you can use the following code which creates a guestfish "
19958 "instance, correctly quotes the command line, handles failure to start, and "
19959 "cleans up guestfish when the script exits:"
19963 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:965
19971 #: ../fish/guestfish.pod:986
19974 " guestfish[0]=\"guestfish\"\n"
19975 " guestfish[1]=\"--listen\"\n"
19976 " guestfish[2]=\"--ro\"\n"
19977 " guestfish[3]=\"-a\"\n"
19978 " guestfish[4]=\"disk.img\"\n"
19983 #: ../fish/guestfish.pod:992
19986 " GUESTFISH_PID=\n"
19987 " eval $(\"${guestfish[@]}\")\n"
19988 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
19989 " echo \"error: guestfish didn't start up, see error messages above\"\n"
19996 #: ../fish/guestfish.pod:999
19999 " cleanup_guestfish ()\n"
20001 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
20003 " trap cleanup_guestfish EXIT ERR\n"
20008 #: ../fish/guestfish.pod:1005
20011 " guestfish --remote -- run\n"
20016 #: ../fish/guestfish.pod:1007
20024 #: ../fish/guestfish.pod:1009
20025 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20029 #: ../fish/guestfish.pod:1011
20031 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20032 "context hangs, ie. don't do (note the backquotes):"
20036 #: ../fish/guestfish.pod:1014
20039 " a=`guestfish --remote run`\n"
20044 #: ../fish/guestfish.pod:1016
20046 "Since the C<run> command produces no output on stdout, this is not useful "
20047 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
20052 #: ../fish/guestfish.pod:1020
20053 msgid "PREPARED DISK IMAGES"
20057 #: ../fish/guestfish.pod:1022
20059 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20060 "preformatted disk images that guestfish can make for you to save typing. "
20061 "This is particularly useful for testing purposes. This option is used "
20062 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20063 "can be mixed with I<-a>)."
20067 #: ../fish/guestfish.pod:1028
20069 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20070 "the second and so on. Existing files in the current directory are "
20075 #: ../fish/guestfish.pod:1032
20077 "The type briefly describes how the disk should be sized, partitioned, how "
20078 "filesystem(s) should be created, and how content should be added. "
20079 "Optionally the type can be followed by extra parameters, separated by C<:> "
20080 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
20081 "allocated disk, containing a single partition, with the partition formatted "
20082 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
20087 #: ../fish/guestfish.pod:1040
20088 msgid "To list the available types and any extra parameters they take, run:"
20092 #: ../fish/guestfish.pod:1044
20094 "Note that the prepared filesystem is not mounted. You would usually have to "
20095 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20099 #: ../fish/guestfish.pod:1048
20101 "If any I<-N> or I<--new> options are given, the guest is automatically "
20106 #: ../fish/guestfish.pod:1053
20107 msgid "Create a 100MB disk with an ext4-formatted partition:"
20111 #: ../fish/guestfish.pod:1055
20114 " guestfish -N fs:ext4\n"
20119 #: ../fish/guestfish.pod:1057
20120 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20124 #: ../fish/guestfish.pod:1059
20127 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20132 #: ../fish/guestfish.pod:1061
20133 msgid "Create a blank 200MB disk:"
20137 #: ../fish/guestfish.pod:1063
20140 " guestfish -N disk:200M\n"
20145 #: ../fish/guestfish.pod:1065
20146 msgid "PROGRESS BARS"
20150 #: ../fish/guestfish.pod:1067
20152 "Some (not all) long-running commands send progress notification messages as "
20153 "they are running. Guestfish turns these messages into progress bars."
20157 #: ../fish/guestfish.pod:1071
20159 "When a command that supports progress bars takes longer than two seconds to "
20160 "run, and if progress bars are enabled, then you will see one appearing below "
20165 #: ../fish/guestfish.pod:1075
20168 " ><fs> copy-size /large-file /another-file 2048M\n"
20169 " / 10% [#####-----------------------------------------] 00:30\n"
20174 #: ../fish/guestfish.pod:1078
20176 "The spinner on the left hand side moves round once for every progress "
20177 "notification received from the backend. This is a (reasonably) golden "
20178 "assurance that the command is \"doing something\" even if the progress bar "
20179 "is not moving, because the command is able to send the progress "
20180 "notifications. When the bar reaches 100% and the command finishes, the "
20181 "spinner disappears."
20185 #: ../fish/guestfish.pod:1085
20187 "Progress bars are enabled by default when guestfish is used interactively. "
20188 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20189 "and you can disable them completely using I<--no-progress-bars>."
20193 #: ../fish/guestfish.pod:1090
20194 msgid "GUESTFISH COMMANDS"
20198 #: ../fish/guestfish.pod:1092
20200 "The commands in this section are guestfish convenience commands, in other "
20201 "words, they are not part of the L<guestfs(3)> API."
20205 #: ../fish/guestfish.pod:1095
20210 #: ../fish/guestfish.pod:1097
20219 #: ../fish/guestfish.pod:1100
20220 msgid "Without any parameter, this provides general help."
20224 #: ../fish/guestfish.pod:1102
20225 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20229 #: ../fish/guestfish.pod:1104
20230 msgid "quit | exit"
20234 #: ../fish/guestfish.pod:1106
20235 msgid "This exits guestfish. You can also use C<^D> key."
20239 #: ../fish/guestfish.pod:1108
20240 msgid "@FISH_COMMANDS@"
20244 #: ../fish/guestfish.pod:1110
20249 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1505
20254 #: ../fish/guestfish.pod:1116
20256 "guestfish returns 0 if the commands completed without error, or 1 if there "
20261 #: ../fish/guestfish.pod:1123
20266 #: ../fish/guestfish.pod:1125
20268 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20273 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3198
20274 msgid "FEBOOTSTRAP_KERNEL"
20278 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3200
20279 msgid "FEBOOTSTRAP_MODULES"
20283 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3202
20285 "These two environment variables allow the kernel that libguestfs uses in the "
20286 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20287 "most recent host kernel is chosen. For more information about kernel "
20288 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20289 "available in febootstrap E<ge> 3.8."
20293 #: ../fish/guestfish.pod:1138
20294 msgid "GUESTFISH_DISPLAY_IMAGE"
20298 #: ../fish/guestfish.pod:1140
20300 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20301 "If not set, it uses L<display(1)>."
20305 #: ../fish/guestfish.pod:1143
20306 msgid "GUESTFISH_PID"
20310 #: ../fish/guestfish.pod:1145
20312 "Used with the I<--remote> option to specify the remote guestfish process to "
20313 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20317 #: ../fish/guestfish.pod:1149
20322 #: ../fish/guestfish.pod:1151
20324 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20325 "not specified, the external L<hexedit(1)> program is used."
20329 #: ../fish/guestfish.pod:1155
20334 #: ../fish/guestfish.pod:1157
20336 "If compiled with GNU readline support, various files in the home directory "
20337 "can be used. See L</FILES>."
20341 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3208
20342 msgid "LIBGUESTFS_APPEND"
20346 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3210
20347 msgid "Pass additional options to the guest kernel."
20351 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3212
20352 msgid "LIBGUESTFS_DEBUG"
20356 #: ../fish/guestfish.pod:1166
20358 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20359 "effect as using the B<-v> option."
20363 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3217
20364 msgid "LIBGUESTFS_MEMSIZE"
20368 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3219
20370 "Set the memory allocated to the qemu process, in megabytes. For example:"
20374 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3222
20377 " LIBGUESTFS_MEMSIZE=700\n"
20382 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3224
20383 msgid "LIBGUESTFS_PATH"
20387 #: ../fish/guestfish.pod:1178
20389 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20390 "the discussion of paths in L<guestfs(3)>."
20394 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3229
20395 msgid "LIBGUESTFS_QEMU"
20399 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3231
20401 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20402 "which was found at compile time by the configure script is used."
20406 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3237
20407 msgid "LIBGUESTFS_TRACE"
20411 #: ../fish/guestfish.pod:1189
20412 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20416 #: ../fish/guestfish.pod:1191
20421 #: ../fish/guestfish.pod:1193
20423 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20428 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236
20429 #: ../src/guestfs.pod:3242
20434 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3244
20436 "Location of temporary directory, defaults to C</tmp> except for the cached "
20437 "supermin appliance which defaults to C</var/tmp>."
20441 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3247
20443 "If libguestfs was compiled to use the supermin appliance then the real "
20444 "appliance is cached in this directory, shared between all handles belonging "
20445 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20446 "use in case C</var/tmp> is not large enough."
20450 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
20451 #: ../rescue/virt-rescue.pod:273
20456 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
20457 #: ../rescue/virt-rescue.pod:277
20458 msgid "$HOME/.libguestfs-tools.rc"
20462 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
20463 #: ../rescue/virt-rescue.pod:279
20464 msgid "/etc/libguestfs-tools.conf"
20468 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
20469 #: ../rescue/virt-rescue.pod:281
20471 "This configuration file controls the default read-only or read-write mode "
20472 "(I<--ro> or I<--rw>)."
20476 #: ../fish/guestfish.pod:1220
20477 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20481 #: ../fish/guestfish.pod:1222
20482 msgid "$HOME/.guestfish"
20486 #: ../fish/guestfish.pod:1224
20488 "If compiled with GNU readline support, then the command history is saved in "
20493 #: ../fish/guestfish.pod:1227
20494 msgid "$HOME/.inputrc"
20498 #: ../fish/guestfish.pod:1229
20499 msgid "/etc/inputrc"
20503 #: ../fish/guestfish.pod:1231
20505 "If compiled with GNU readline support, then these files can be used to "
20506 "configure readline. For further information, please see L<readline(3)/"
20507 "INITIALIZATION FILE>."
20511 #: ../fish/guestfish.pod:1235
20512 msgid "To write rules which only apply to guestfish, use:"
20516 #: ../fish/guestfish.pod:1237
20526 #: ../fish/guestfish.pod:1241
20528 "Variables that you can set in inputrc that change the behaviour of guestfish "
20529 "in useful ways include:"
20533 #: ../fish/guestfish.pod:1246
20534 msgid "completion-ignore-case (default: on)"
20538 #: ../fish/guestfish.pod:1248
20540 "By default, guestfish will ignore case when tab-completing paths on the "
20545 #: ../fish/guestfish.pod:1251
20548 " set completion-ignore-case off\n"
20553 #: ../fish/guestfish.pod:1253
20554 msgid "to make guestfish case sensitive."
20558 #: ../fish/guestfish.pod:1257
20563 #: ../fish/guestfish.pod:1259
20564 msgid "test2.img (etc)"
20568 #: ../fish/guestfish.pod:1261
20570 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20571 "will be created in the file C<test1.img> in the current directory. The "
20572 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20573 "the same name will be overwritten."
20577 #: ../fish/guestfish.pod:1270
20579 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
20580 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit"
20581 "(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems"
20582 "(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-"
20583 "rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, "
20584 "L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, "
20585 "L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
20589 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3339
20590 #: ../test-tool/libguestfs-test-tool.pod:112
20591 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20595 #: ../fish/virt-copy-in.pod:5
20597 "virt-copy-in - Copy files and directories into a virtual machine disk image."
20601 #: ../fish/virt-copy-in.pod:9
20604 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20609 #: ../fish/virt-copy-in.pod:11
20612 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20617 #: ../fish/virt-copy-in.pod:15
20619 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20620 "causing disk corruption. The virtual machine must be shut down before you "
20621 "use this command."
20625 #: ../fish/virt-copy-in.pod:21
20627 "C<virt-copy-in> copies files and directories from the local disk into a "
20628 "virtual machine disk image or named libvirt domain."
20632 #: ../fish/virt-copy-in.pod:24
20634 "You can give one of more filenames and directories on the command line. "
20635 "Directories are copied in recursively. The final parameter must be the "
20636 "destination directory in the disk image which must be an absolute path "
20637 "starting with a C</> character."
20641 #: ../fish/virt-copy-in.pod:33
20644 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20649 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20650 msgid "Upload a home directory to a guest:"
20654 #: ../fish/virt-copy-in.pod:37
20657 " virt-copy-in -d MyGuest skel /home\n"
20662 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
20663 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20664 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20668 #: ../fish/virt-copy-in.pod:41
20670 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20671 "> C<copy-in> command. For anything more complex than a trivial copy, you "
20672 "are probably better off using guestfish directly."
20676 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
20677 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20679 "Since the shell script just passes options straight to guestfish, read "
20680 "L<guestfish(1)> to see the full list of options."
20684 #: ../fish/virt-copy-in.pod:52
20686 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20687 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20691 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
20692 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
20693 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
20697 #: ../fish/virt-copy-out.pod:5
20699 "virt-copy-out - Copy files and directories out of a virtual machine disk "
20704 #: ../fish/virt-copy-out.pod:9
20707 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
20712 #: ../fish/virt-copy-out.pod:11
20715 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
20720 #: ../fish/virt-copy-out.pod:15
20722 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
20723 "image or named libvirt domain."
20727 #: ../fish/virt-copy-out.pod:18
20729 "You can give one of more filenames and directories on the command line. "
20730 "Directories are copied out recursively."
20734 #: ../fish/virt-copy-out.pod:23
20735 msgid "Download the home directories from a virtual machine:"
20739 #: ../fish/virt-copy-out.pod:25
20743 " virt-copy-out -d MyGuest /home homes\n"
20748 #: ../fish/virt-copy-out.pod:30
20750 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20751 "> C<copy-out> command. For anything more complex than a trivial copy, you "
20752 "are probably better off using guestfish directly."
20756 #: ../fish/virt-copy-out.pod:41
20758 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
20759 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20763 #: ../fish/virt-tar-in.pod:5
20764 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
20768 #: ../fish/virt-tar-in.pod:9
20771 " virt-tar-in -a disk.img data.tar /destination\n"
20776 #: ../fish/virt-tar-in.pod:11
20779 " virt-tar-in -d domain data.tar /destination\n"
20784 #: ../fish/virt-tar-in.pod:13
20787 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
20792 #: ../fish/virt-tar-in.pod:17
20794 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
20795 "causing disk corruption. The virtual machine must be shut down before you "
20796 "use this command."
20800 #: ../fish/virt-tar-in.pod:23
20802 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
20803 "image or named libvirt domain."
20807 #: ../fish/virt-tar-in.pod:26
20809 "The first parameter is the tar file. Use C<-> to read the tar file from "
20810 "standard input. The second parameter is the absolute target directory to "
20815 #: ../fish/virt-tar-in.pod:34
20818 " virt-tar-in -d MyGuest homes.tar /home\n"
20823 #: ../fish/virt-tar-in.pod:38
20825 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20826 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
20827 "probably better off using guestfish directly."
20831 #: ../fish/virt-tar-in.pod:49
20833 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
20834 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
20839 #: ../fish/virt-tar-out.pod:5
20841 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
20845 #: ../fish/virt-tar-out.pod:9
20848 " virt-tar-out -a disk.img /dir files.tar\n"
20853 #: ../fish/virt-tar-out.pod:11
20856 " virt-tar-out -d domain /dir files.tar\n"
20861 #: ../fish/virt-tar-out.pod:13
20864 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
20869 #: ../fish/virt-tar-out.pod:17
20871 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
20875 #: ../fish/virt-tar-out.pod:20
20877 "The first parameter is the absolute path of the virtual machine directory. "
20878 "The second parameter is the tar file to write. Use C<-> to write to "
20883 #: ../fish/virt-tar-out.pod:26
20884 msgid "Download the home directories from a guest:"
20888 #: ../fish/virt-tar-out.pod:28
20891 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
20896 #: ../fish/virt-tar-out.pod:32
20898 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20899 "> C<tar-out> command. For anything more complex than a trivial copy, you "
20900 "are probably better off using guestfish directly."
20904 #: ../fish/virt-tar-out.pod:43
20906 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
20907 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
20911 #: ../fuse/guestmount.pod:5
20913 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
20917 #: ../fuse/guestmount.pod:9
20920 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
20925 #: ../fuse/guestmount.pod:11
20928 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
20933 #: ../fuse/guestmount.pod:13
20936 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
20941 #: ../fuse/guestmount.pod:17
20943 "You must I<not> use C<guestmount> in read-write mode on live virtual "
20944 "machines. If you do this, you risk disk corruption in the VM."
20948 #: ../fuse/guestmount.pod:22
20950 "The guestmount program can be used to mount virtual machine filesystems and "
20951 "other disk images on the host. It uses libguestfs for access to the guest "
20952 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
20953 "a mountable device."
20957 #: ../fuse/guestmount.pod:27
20959 "Along with other options, you have to give at least one device (I<-a> "
20960 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
20961 "option) or use the I<-i> inspection option. How this works is better "
20962 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
20967 #: ../fuse/guestmount.pod:33
20969 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
20970 "by you, and the filesystem will not be visible to any other users unless you "
20971 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
20972 "the filesystem, use the C<fusermount -u> command."
20976 #: ../fuse/guestmount.pod:41
20978 "For a typical Windows guest which has its main filesystem on the first "
20983 #: ../fuse/guestmount.pod:44
20986 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
20991 #: ../fuse/guestmount.pod:46
20993 "For a typical Linux guest which has a /boot filesystem on the first "
20994 "partition, and the root filesystem on a logical volume:"
20998 #: ../fuse/guestmount.pod:49
21001 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21006 #: ../fuse/guestmount.pod:51
21007 msgid "To get libguestfs to detect guest mountpoints for you:"
21011 #: ../fuse/guestmount.pod:53
21014 " guestmount -a guest.img -i --ro /mnt\n"
21019 #: ../fuse/guestmount.pod:55
21020 msgid "For a libvirt guest called \"Guest\" you could do:"
21024 #: ../fuse/guestmount.pod:57
21027 " guestmount -d Guest -i --ro /mnt\n"
21032 #: ../fuse/guestmount.pod:59
21034 "If you don't know what filesystems are contained in a guest or disk image, "
21035 "use L<virt-filesystems(1)> first:"
21039 #: ../fuse/guestmount.pod:62
21042 " virt-filesystems MyGuest\n"
21047 #: ../fuse/guestmount.pod:64
21049 "If you want to trace the libguestfs calls but without excessive debugging "
21050 "information, we recommend:"
21054 #: ../fuse/guestmount.pod:67
21057 " guestmount [...] --trace /mnt\n"
21062 #: ../fuse/guestmount.pod:69
21063 msgid "If you want to debug the program, we recommend:"
21067 #: ../fuse/guestmount.pod:71
21070 " guestmount [...] --trace --verbose /mnt\n"
21075 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
21076 #: ../resize/virt-resize.pod:600
21081 #: ../fuse/guestmount.pod:75
21082 msgid "Other users cannot see the filesystem by default"
21086 #: ../fuse/guestmount.pod:77
21088 "If you mount a filesystem as one user (eg. root), then other users will not "
21089 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21090 "option when mounting:"
21094 #: ../fuse/guestmount.pod:81
21097 " sudo guestmount [...] -o allow_other /mnt\n"
21102 #: ../fuse/guestmount.pod:83
21103 msgid "Enabling FUSE"
21107 #: ../fuse/guestmount.pod:85
21109 "On some distros, you may need to add yourself to a special group (eg. "
21110 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21111 "Debian and derivatives."
21115 #: ../fuse/guestmount.pod:89
21117 "On other distros, no special group is required. It is not necessary on "
21118 "Fedora or Red Hat Enterprise Linux."
21122 #: ../fuse/guestmount.pod:100
21123 msgid "Add a block device or virtual machine image."
21127 #: ../fuse/guestmount.pod:123
21128 msgid "B<--dir-cache-timeout N>"
21132 #: ../fuse/guestmount.pod:125
21134 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21135 "seconds. The readdir cache [actually, there are several semi-independent "
21136 "caches] is populated after a readdir(2) call with the stat and extended "
21137 "attributes of the files in the directory, in anticipation that they will be "
21138 "requested soon after."
21142 #: ../fuse/guestmount.pod:131
21144 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21145 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21146 "requests, only cache existing ones."
21150 #: ../fuse/guestmount.pod:151
21152 "If you have untrusted raw-format guest disk images, you should use this "
21153 "option to specify the disk format. This avoids a possible security problem "
21154 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
21155 "guestfs_add_drive_opts>."
21159 #: ../fuse/guestmount.pod:156
21160 msgid "B<--fuse-help>"
21164 #: ../fuse/guestmount.pod:158
21165 msgid "Display help on special FUSE options (see I<-o> below)."
21169 #: ../fuse/guestmount.pod:162
21170 msgid "Display brief help and exit."
21174 #: ../fuse/guestmount.pod:186
21176 "Mount the named partition or logical volume on the given mountpoint B<in the "
21177 "guest> (this has nothing to do with mountpoints in the host)."
21181 #: ../fuse/guestmount.pod:189
21183 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21184 "something on C</>."
21188 #: ../fuse/guestmount.pod:206
21190 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21191 "unmounted. If you specify this option, then we don't attempt to sync the "
21192 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21196 #: ../fuse/guestmount.pod:211
21197 msgid "B<-o option>"
21201 #: ../fuse/guestmount.pod:213
21202 msgid "B<--option option>"
21206 #: ../fuse/guestmount.pod:215
21207 msgid "Pass extra options to FUSE."
21211 #: ../fuse/guestmount.pod:217
21213 "To get a list of all the extra options supported by FUSE, use the command "
21214 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21215 "of them are a good idea."
21219 #: ../fuse/guestmount.pod:221
21222 " guestmount --fuse-help\n"
21227 #: ../fuse/guestmount.pod:223
21228 msgid "Some potentially useful FUSE options:"
21232 #: ../fuse/guestmount.pod:227
21233 msgid "B<-o allow_other>"
21237 #: ../fuse/guestmount.pod:229
21238 msgid "Allow other users to see the filesystem."
21242 #: ../fuse/guestmount.pod:231
21243 msgid "B<-o attr_timeout=N>"
21247 #: ../fuse/guestmount.pod:233
21248 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21252 #: ../fuse/guestmount.pod:235
21253 msgid "B<-o kernel_cache>"
21257 #: ../fuse/guestmount.pod:237
21259 "Allow the kernel to cache files (reduces the number of reads that have to go "
21260 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21261 "afford the extra memory usage."
21265 #: ../fuse/guestmount.pod:241
21266 msgid "B<-o uid=N> B<-o gid=N>"
21270 #: ../fuse/guestmount.pod:243
21272 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21273 "the chosen values."
21277 #: ../fuse/guestmount.pod:252
21279 "Add devices and mount everything read-only. Also disallow writes and make "
21280 "the disk appear read-only to FUSE."
21284 #: ../fuse/guestmount.pod:255
21286 "This is highly recommended if you are not going to edit the guest disk. If "
21287 "the guest is running and this option is I<not> supplied, then there is a "
21288 "strong risk of disk corruption in the guest. We try to prevent this from "
21289 "happening, but it is not always possible."
21293 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21294 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21298 #: ../fuse/guestmount.pod:264
21299 msgid "Enable SELinux support for the guest."
21303 #: ../fuse/guestmount.pod:270
21304 msgid "Enable verbose messages from underlying libguestfs."
21308 #: ../fuse/guestmount.pod:276
21309 msgid "Display the program version and exit."
21313 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
21314 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21315 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21319 #: ../fuse/guestmount.pod:289
21324 #: ../fuse/guestmount.pod:291
21325 msgid "Trace libguestfs calls and entry into each FUSE function."
21329 #: ../fuse/guestmount.pod:293
21330 msgid "This also stops the daemon from forking into the background."
21334 #: ../fuse/guestmount.pod:319
21336 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21337 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
21342 #: ../fuse/guestmount.pod:334
21343 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21347 #: ../inspector/virt-inspector.pod:5
21349 "virt-inspector - Display operating system version and other information "
21350 "about a virtual machine"
21354 #: ../inspector/virt-inspector.pod:9
21357 " virt-inspector [--options] -d domname\n"
21362 #: ../inspector/virt-inspector.pod:11
21365 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21370 #: ../inspector/virt-inspector.pod:15
21373 " virt-inspector domname\n"
21378 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
21381 " virt-inspector disk.img [disk.img ...]\n"
21386 #: ../inspector/virt-inspector.pod:21
21388 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21389 "determine the version of the operating system and other information about "
21390 "the virtual machine."
21394 #: ../inspector/virt-inspector.pod:25
21395 msgid "Virt-inspector produces XML output for feeding into other programs."
21399 #: ../inspector/virt-inspector.pod:27
21401 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21402 "the libvirt domain (see: C<virsh list --all>)."
21406 #: ../inspector/virt-inspector.pod:30
21408 "You can also run virt-inspector directly on disk images from a single "
21409 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21410 "has several block devices, in which case you should list several I<-a> "
21411 "options one after another, with the first corresponding to the guest's C</"
21412 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
21416 #: ../inspector/virt-inspector.pod:37
21418 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21419 "keys and similar."
21423 #: ../inspector/virt-inspector.pod:40
21425 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21426 "inspect several virtual machines, you have to run virt-inspector several "
21427 "times (for example, from a shell script for-loop)."
21431 #: ../inspector/virt-inspector.pod:45
21433 "Because virt-inspector needs direct access to guest images, it won't "
21434 "normally work over remote libvirt connections."
21438 #: ../inspector/virt-inspector.pod:48
21440 "All of the information available from virt-inspector is also available "
21441 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21442 "The same information can also be fetched using guestfish or via libguestfs "
21443 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21444 "WITH OTHER PROGRAMMING LANGUAGES>)."
21448 #: ../inspector/virt-inspector.pod:81
21450 "Libvirt is only used if you specify a C<domname> on the command line. If "
21451 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21456 #: ../inspector/virt-inspector.pod:94
21458 "When prompting for keys and passphrases, virt-inspector normally turns "
21459 "echoing off so you cannot see what you are typing. If you are not worried "
21460 "about Tempest attacks and there is no one else in the room you can specify "
21461 "this flag to see what you are typing."
21465 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
21466 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
21467 #: ../tools/virt-win-reg.pl:144
21469 "Specify the format of disk images given on the command line. If this is "
21470 "omitted then the format is autodetected from the content of the disk image."
21474 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
21475 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
21476 #: ../tools/virt-win-reg.pl:148
21478 "If disk images are requested from libvirt, then this program asks libvirt "
21479 "for this information. In this case, the value of the format parameter is "
21484 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:370
21485 #: ../resize/virt-resize.pod:462 ../sparsify/virt-sparsify.pod:132
21486 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
21487 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21489 "If working with untrusted raw-format guest disk images, you should ensure "
21490 "the format is always specified."
21494 #: ../inspector/virt-inspector.pod:139
21495 msgid "Previous versions of virt-inspector allowed you to write either:"
21499 #: ../inspector/virt-inspector.pod:145
21502 " virt-inspector guestname\n"
21507 #: ../inspector/virt-inspector.pod:153
21512 #: ../inspector/virt-inspector.pod:155
21514 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21515 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21516 "just an overview."
21520 #: ../inspector/virt-inspector.pod:159
21522 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21523 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21524 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21525 "which is vanishingly rare in real world VMs."
21529 #: ../inspector/virt-inspector.pod:164
21530 msgid "E<lt>operatingsystemE<gt>"
21534 #: ../inspector/virt-inspector.pod:166
21536 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21537 "describe the operating system, its architecture, the descriptive \"product "
21538 "name\" string, the type of OS and so on, as in this example:"
21542 #: ../inspector/virt-inspector.pod:170
21545 " <operatingsystems>\n"
21546 " <operatingsystem>\n"
21547 " <root>/dev/sda2</root>\n"
21548 " <name>windows</name>\n"
21549 " <arch>i386</arch>\n"
21550 " <distro>windows</distro>\n"
21551 " <product_name>Windows 7 Enterprise</product_name>\n"
21552 " <product_variant>Client</product_variant>\n"
21553 " <major_version>6</major_version>\n"
21554 " <minor_version>1</minor_version>\n"
21555 " <windows_systemroot>/Windows</windows_systemroot>\n"
21556 " <format>installed</format>\n"
21561 #: ../inspector/virt-inspector.pod:183
21563 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21564 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21565 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21566 "architecture. The other fields are fairly self-explanatory, but because "
21567 "these fields are taken directly from the libguestfs inspection API you can "
21568 "find precise information from L<guestfs(3)/INSPECTION>."
21572 #: ../inspector/virt-inspector.pod:191
21574 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21575 "of view of libguestfs (block devices may have completely different names "
21576 "inside the VM itself)."
21580 #: ../inspector/virt-inspector.pod:195
21581 msgid "E<lt>mountpointsE<gt>"
21585 #: ../inspector/virt-inspector.pod:197
21587 "Un*x-like guests typically have multiple filesystems which are mounted at "
21588 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21589 "element which looks like this:"
21593 #: ../inspector/virt-inspector.pod:201
21596 " <operatingsystems>\n"
21597 " <operatingsystem>\n"
21600 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21601 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21602 " </mountpoints>\n"
21607 #: ../inspector/virt-inspector.pod:209
21609 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21610 "and may have completely different names inside the guest. Only mountable "
21611 "filesystems appear in this list, not things like swap devices."
21615 #: ../inspector/virt-inspector.pod:214
21616 msgid "E<lt>filesystemsE<gt>"
21620 #: ../inspector/virt-inspector.pod:216
21622 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21623 "filesystems belonging to the guest, including swap and empty partitions. "
21624 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21625 "this OS or shared with this OS and other OSes)."
21629 #: ../inspector/virt-inspector.pod:222
21630 msgid "You might see something like this:"
21634 #: ../inspector/virt-inspector.pod:224
21637 " <operatingsystems>\n"
21638 " <operatingsystem>\n"
21641 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21642 " <type>ext4</type>\n"
21643 " <label>Fedora-13-x86_64</label>\n"
21644 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21650 #: ../inspector/virt-inspector.pod:234
21652 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21653 "the label, and the UUID."
21657 #: ../inspector/virt-inspector.pod:237
21658 msgid "E<lt>applicationsE<gt>"
21662 #: ../inspector/virt-inspector.pod:239
21664 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21665 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21670 #: ../inspector/virt-inspector.pod:243
21672 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21673 "Typical values would be C<rpm> and C<deb>."
21677 #: ../inspector/virt-inspector.pod:246
21679 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21680 "Typical values include C<yum>, C<up2date> and C<apt>"
21684 #: ../inspector/virt-inspector.pod:249
21685 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21689 #: ../inspector/virt-inspector.pod:252
21692 " <operatingsystems>\n"
21693 " <operatingsystem>\n"
21695 " <applications>\n"
21697 " <name>coreutils</name>\n"
21698 " <version>8.5</version>\n"
21699 " <release>1</release>\n"
21700 " </application>\n"
21705 #: ../inspector/virt-inspector.pod:262
21707 "The version and release fields may not be available for some types guests. "
21708 "Other fields are possible, see L<guestfs(3)/"
21709 "guestfs_inspect_list_applications>."
21713 #: ../inspector/virt-inspector.pod:266
21714 msgid "E<lt>drive_mappingsE<gt>"
21718 #: ../inspector/virt-inspector.pod:268
21720 "For operating systems like Windows which use drive letters, virt-inspector "
21721 "is able to find out how drive letters map to filesystems."
21725 #: ../inspector/virt-inspector.pod:272
21728 " <operatingsystems>\n"
21729 " <operatingsystem>\n"
21731 " <drive_mappings>\n"
21732 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
21733 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
21734 " </drive_mappings>\n"
21739 #: ../inspector/virt-inspector.pod:280
21741 "In the example above, drive C maps to the filesystem on the second partition "
21742 "on the first disk, and drive E maps to the filesystem on the first partition "
21743 "on the second disk."
21747 #: ../inspector/virt-inspector.pod:284
21749 "Note that this only covers permanent local filesystem mappings, not things "
21750 "like network shares. Furthermore NTFS volume mount points may not be listed "
21755 #: ../inspector/virt-inspector.pod:288
21756 msgid "E<lt>iconE<gt>"
21760 #: ../inspector/virt-inspector.pod:290
21762 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
21763 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
21764 "very large and high quality."
21768 #: ../inspector/virt-inspector.pod:294
21771 " <operatingsystems>\n"
21772 " <operatingsystem>\n"
21775 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
21776 " [... many lines of base64 data ...]\n"
21782 #: ../inspector/virt-inspector.pod:302
21784 "To display the icon, you have to extract it and convert the base64 data back "
21785 "to a binary file. Use an XPath query or simply an editor to extract the "
21786 "data, then use the coreutils L<base64(1)> program to do the conversion back "
21791 #: ../inspector/virt-inspector.pod:307
21794 " base64 -i -d < icon.data > icon.png\n"
21799 #: ../inspector/virt-inspector.pod:309
21800 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
21804 #: ../inspector/virt-inspector.pod:311
21806 "Virt-inspector can detect some operating system installers on install disks, "
21807 "live CDs, bootable USB keys and more."
21811 #: ../inspector/virt-inspector.pod:314
21813 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
21814 "fields may be present to indicate a live CD, network installer, or one part "
21815 "of a multipart CD. For example:"
21819 #: ../inspector/virt-inspector.pod:318
21822 " <operatingsystems>\n"
21823 " <operatingsystem>\n"
21824 " <root>/dev/sda</root>\n"
21825 " <name>linux</name>\n"
21826 " <arch>i386</arch>\n"
21827 " <distro>ubuntu</distro>\n"
21828 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
21829 " <major_version>10</major_version>\n"
21830 " <minor_version>10</minor_version>\n"
21831 " <format>installer</format>\n"
21837 #: ../inspector/virt-inspector.pod:330
21838 msgid "USING XPATH"
21842 #: ../inspector/virt-inspector.pod:332
21844 "You can use the XPath query language to select parts of the XML. We "
21845 "recommend using C<xmlstarlet> to perform XPath queries from the command line."
21849 #: ../inspector/virt-inspector.pod:338
21852 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
21854 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21855 " <type>ext4</type>\n"
21861 #: ../inspector/virt-inspector.pod:344
21864 " $ virt-inspector -d Guest | \\\n"
21865 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
21871 #: ../inspector/virt-inspector.pod:348
21874 " $ virt-inspector -d Guest | \\\n"
21875 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
21876 " [displays the guest icon, if there is one]\n"
21881 #: ../inspector/virt-inspector.pod:359
21882 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
21886 #: ../inspector/virt-inspector.pod:361
21888 "Early versions of libguestfs shipped with a different virt-inspector program "
21889 "written in Perl (the current version is written in C). The XML output of "
21890 "the Perl virt-inspector was different and it could also output in other "
21891 "formats like text."
21895 #: ../inspector/virt-inspector.pod:366
21897 "The old virt-inspector is no longer supported or shipped with libguestfs."
21901 #: ../inspector/virt-inspector.pod:369
21903 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
21904 "versions of virt-inspector with different names:"
21908 #: ../inspector/virt-inspector.pod:372
21911 " virt-inspector Old Perl version.\n"
21912 " virt-inspector2 New C version.\n"
21917 #: ../inspector/virt-inspector.pod:382
21919 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
21920 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
21924 #: ../inspector/virt-inspector.pod:399
21925 msgid "Matthew Booth L<mbooth@redhat.com>"
21929 #: ../java/examples/guestfs-java.pod:5
21930 msgid "guestfs-java - How to use libguestfs from Java"
21934 #: ../java/examples/guestfs-java.pod:9
21937 " import com.redhat.et.libguestfs.*;\n"
21942 #: ../java/examples/guestfs-java.pod:11
21945 " GuestFS g = new GuestFS ();\n"
21946 " g.add_drive_opts (\"disk.img\", null);\n"
21952 #: ../java/examples/guestfs-java.pod:17
21954 "This manual page documents how to call libguestfs from the Java programming "
21955 "language. This page just documents the differences from the C API and gives "
21956 "some examples. If you are not familiar with using libguestfs, you also need "
21957 "to read L<guestfs(3)>."
21961 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
21962 msgid "CLOSING THE HANDLE"
21966 #: ../java/examples/guestfs-java.pod:24
21968 "The handle is closed when it is reaped by the garbage collector. Because "
21969 "libguestfs handles include a lot of state, it is also possible to close (and "
21970 "hence free) them explicitly by calling the C<close> method."
21974 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
21975 #: ../python/examples/guestfs-python.pod:21
21976 #: ../ruby/examples/guestfs-ruby.pod:22
21981 #: ../java/examples/guestfs-java.pod:31
21983 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
21984 "exception. This has a single parameter which is the error message (a "
21989 #: ../java/examples/guestfs-java.pod:35
21990 msgid "Calling any method on a closed handle raises the same exception."
21994 #: ../java/examples/guestfs-java.pod:47
21996 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
21997 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
21998 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22002 #: ../ocaml/examples/guestfs-ocaml.pod:5
22003 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22007 #: ../ocaml/examples/guestfs-ocaml.pod:9
22008 msgid "Module style:"
22012 #: ../ocaml/examples/guestfs-ocaml.pod:11
22015 " let g = Guestfs.create () in\n"
22016 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22017 " Guestfs.launch g;\n"
22022 #: ../ocaml/examples/guestfs-ocaml.pod:15
22023 msgid "Object-oriented style:"
22027 #: ../ocaml/examples/guestfs-ocaml.pod:17
22030 " let g = new Guestfs.guestfs () in\n"
22031 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22037 #: ../ocaml/examples/guestfs-ocaml.pod:21
22040 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22042 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22047 #: ../ocaml/examples/guestfs-ocaml.pod:27
22049 "This manual page documents how to call libguestfs from the OCaml programming "
22050 "language. This page just documents the differences from the C API and gives "
22051 "some examples. If you are not familiar with using libguestfs, you also need "
22052 "to read L<guestfs(3)>."
22056 #: ../ocaml/examples/guestfs-ocaml.pod:32
22057 msgid "PROGRAMMING STYLES"
22061 #: ../ocaml/examples/guestfs-ocaml.pod:34
22063 "There are two different programming styles supported by the OCaml bindings. "
22064 "You can use a module style, with each C function mapped to an OCaml function:"
22068 #: ../ocaml/examples/guestfs-ocaml.pod:38
22071 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22076 #: ../ocaml/examples/guestfs-ocaml.pod:40
22081 #: ../ocaml/examples/guestfs-ocaml.pod:42
22084 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22089 #: ../ocaml/examples/guestfs-ocaml.pod:44
22091 "Alternately you can use an object-oriented style, calling methods on the "
22092 "class C<Guestfs.guestfs>:"
22096 #: ../ocaml/examples/guestfs-ocaml.pod:47
22099 " method set_verbose : bool -> unit\n"
22104 #: ../ocaml/examples/guestfs-ocaml.pod:49
22106 "The object-oriented style is usually briefer, and the minor performance "
22107 "penalty isn't noticable in the general overhead of performing libguestfs "
22112 #: ../ocaml/examples/guestfs-ocaml.pod:55
22114 "The handle is closed when it is reaped by the garbage collector. Because "
22115 "libguestfs handles include a lot of state, it is also possible to close (and "
22116 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22121 #: ../ocaml/examples/guestfs-ocaml.pod:62
22123 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22124 "exception. This has a single parameter which is the error message (a "
22129 #: ../ocaml/examples/guestfs-ocaml.pod:66
22131 "Calling any function/method on a closed handle raises C<Guestfs."
22132 "Handle_closed>. The single parameter is the name of the function that you "
22137 #: ../ocaml/examples/guestfs-ocaml.pod:80
22139 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22140 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22141 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22145 #: ../perl/examples/guestfs-perl.pod:5
22146 msgid "guestfs-perl - How to use libguestfs from Perl"
22150 #: ../perl/examples/guestfs-perl.pod:9
22153 " use Sys::Guestfs;\n"
22158 #: ../perl/examples/guestfs-perl.pod:11
22161 " my $h = Sys::Guestfs->new ();\n"
22162 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22163 " $h->launch ();\n"
22164 " $h->mount_options ('', '/dev/sda1', '/');\n"
22165 " $h->touch ('/hello');\n"
22171 #: ../perl/examples/guestfs-perl.pod:20
22173 "This manual page documents how to call libguestfs from the Perl programming "
22174 "language. This page just documents the differences from the C API and gives "
22175 "some examples. If you are not familiar with using libguestfs, you also need "
22176 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22180 #: ../perl/examples/guestfs-perl.pod:26
22185 #: ../perl/examples/guestfs-perl.pod:28
22187 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
22192 #: ../perl/examples/guestfs-perl.pod:41
22194 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
22195 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
22196 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22200 #: ../python/examples/guestfs-python.pod:5
22201 msgid "guestfs-python - How to use libguestfs from Python"
22205 #: ../python/examples/guestfs-python.pod:9
22208 " import guestfs\n"
22209 " g = guestfs.GuestFS ()\n"
22210 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22216 #: ../python/examples/guestfs-python.pod:16
22218 "This manual page documents how to call libguestfs from the Python "
22219 "programming language. This page just documents the differences from the C "
22220 "API and gives some examples. If you are not familiar with using libguestfs, "
22221 "you also need to read L<guestfs(3)>."
22225 #: ../python/examples/guestfs-python.pod:23
22227 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22228 "single string argument which is the error message."
22232 #: ../python/examples/guestfs-python.pod:26
22233 msgid "MORE DOCUMENTATION"
22237 #: ../python/examples/guestfs-python.pod:28
22242 #: ../python/examples/guestfs-python.pod:30
22246 " >>> import guestfs\n"
22247 " >>> help (guestfs)\n"
22252 #: ../python/examples/guestfs-python.pod:44
22254 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22255 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
22256 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22260 #: ../rescue/virt-rescue.pod:5
22261 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22265 #: ../rescue/virt-rescue.pod:9
22268 " virt-rescue [--options] -d domname\n"
22273 #: ../rescue/virt-rescue.pod:11
22276 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22281 #: ../rescue/virt-rescue.pod:15
22284 " virt-rescue [--options] domname\n"
22289 #: ../rescue/virt-rescue.pod:17
22292 " virt-rescue [--options] disk.img [disk.img ...]\n"
22297 #: ../rescue/virt-rescue.pod:21
22299 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22300 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22301 "you from doing this, but doesn't catch all cases."
22305 #: ../rescue/virt-rescue.pod:25
22307 "However if you use the I<--ro> (read only) option, then you can attach a "
22308 "shell to a live virtual machine. The results might be strange or "
22309 "inconsistent at times but you won't get disk corruption."
22313 #: ../rescue/virt-rescue.pod:31
22315 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22316 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22317 "recovery tools which you can use to examine or rescue a virtual machine or "
22322 #: ../rescue/virt-rescue.pod:36
22324 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22325 "on disk image(s):"
22329 #: ../rescue/virt-rescue.pod:39
22332 " virt-rescue -d GuestName\n"
22337 #: ../rescue/virt-rescue.pod:41
22340 " virt-rescue --ro -a /path/to/disk.img\n"
22345 #: ../rescue/virt-rescue.pod:43
22348 " virt-rescue -a /dev/sdc\n"
22353 #: ../rescue/virt-rescue.pod:45
22354 msgid "For live VMs you I<must> use the --ro option."
22358 #: ../rescue/virt-rescue.pod:47
22360 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22361 "in an interactive bash shell where you can use many ordinary Linux "
22362 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22363 "appliance. You must mount the virtual machine's filesystems by hand. There "
22364 "is an empty directory called C</sysroot> where you can mount filesystems."
22368 #: ../rescue/virt-rescue.pod:54
22370 "In the example below, we list logical volumes, then choose one to mount "
22371 "under C</sysroot>:"
22375 #: ../rescue/virt-rescue.pod:57
22379 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22380 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22381 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22382 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22383 " ><rescue> ls /sysroot\n"
22388 #: ../rescue/virt-rescue.pod:64
22390 "If you don't know what filesystems are available on the virtual machine then "
22391 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22395 #: ../rescue/virt-rescue.pod:70
22397 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22398 "virtual machine. For example you can use it on a blank file if you want to "
22399 "partition that file (although we would recommend using L<guestfish(1)> "
22400 "instead as it is more suitable for this purpose). You can even use virt-"
22401 "rescue on things like SD cards."
22405 #: ../rescue/virt-rescue.pod:76
22407 "Virt-rescue does not require root. You only need to run it as root if you "
22408 "need root to open the disk image."
22412 #: ../rescue/virt-rescue.pod:79
22414 "This tool is just designed for quick interactive hacking on a virtual "
22415 "machine. For more structured access to a virtual machine disk image, you "
22416 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22417 "make scripted changes to guests, use L<guestfish(1)>."
22421 #: ../rescue/virt-rescue.pod:103
22422 msgid "B<--append kernelopts>"
22426 #: ../rescue/virt-rescue.pod:105
22427 msgid "Pass additional options to the rescue kernel."
22431 #: ../rescue/virt-rescue.pod:135
22434 " virt-rescue --format=raw -a disk.img\n"
22439 #: ../rescue/virt-rescue.pod:139
22442 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22447 #: ../rescue/virt-rescue.pod:148
22452 #: ../rescue/virt-rescue.pod:150
22453 msgid "B<--memsize MB>"
22457 #: ../rescue/virt-rescue.pod:152
22459 "Change the amount of memory allocated to the rescue system. The default is "
22460 "set by libguestfs and is small but adequate for running system tools. The "
22461 "occasional program might need more memory. The parameter is specified in "
22466 #: ../rescue/virt-rescue.pod:157
22467 msgid "B<--network>"
22471 #: ../rescue/virt-rescue.pod:159
22472 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22476 #: ../rescue/virt-rescue.pod:165
22477 msgid "Open the image read-only."
22481 #: ../rescue/virt-rescue.pod:175
22483 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
22484 "SELINUX> before using this option."
22488 #: ../rescue/virt-rescue.pod:178
22493 #: ../rescue/virt-rescue.pod:180
22494 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22498 #: ../rescue/virt-rescue.pod:198
22500 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22501 "are done read-write."
22505 #: ../rescue/virt-rescue.pod:211
22506 msgid "Previous versions of virt-rescue allowed you to write either:"
22510 #: ../rescue/virt-rescue.pod:213
22513 " virt-rescue disk.img [disk.img ...]\n"
22518 #: ../rescue/virt-rescue.pod:217
22521 " virt-rescue guestname\n"
22526 #: ../rescue/virt-rescue.pod:225
22531 #: ../rescue/virt-rescue.pod:227
22533 "Adding the I<--network> option enables QEMU user networking in the rescue "
22534 "appliance. There are some differences between user networking and ordinary "
22539 #: ../rescue/virt-rescue.pod:233
22540 msgid "ping does not work"
22544 #: ../rescue/virt-rescue.pod:235
22546 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22547 "send the ping packets, and because virt-rescue must be able to run as non-"
22548 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
22549 "The ping command will appear to resolve addresses but will not be able to "
22550 "send or receive any packets. This does not mean that the network is not "
22555 #: ../rescue/virt-rescue.pod:242
22556 msgid "cannot receive connections"
22560 #: ../rescue/virt-rescue.pod:244
22561 msgid "QEMU user networking cannot receive incoming connections."
22565 #: ../rescue/virt-rescue.pod:246
22566 msgid "making TCP connections"
22570 #: ../rescue/virt-rescue.pod:248
22572 "The virt-rescue appliance needs to be small and so does not include many "
22573 "network tools. In particular there is no L<telnet(1)> command. You can "
22574 "make TCP connections from the shell using the magical C</dev/tcp/"
22575 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22579 #: ../rescue/virt-rescue.pod:253
22582 " exec 3<>/dev/tcp/redhat.com/80\n"
22583 " echo \"GET /\" >&3\n"
22589 #: ../rescue/virt-rescue.pod:257
22590 msgid "See L<bash(1)> for more details."
22594 #: ../rescue/virt-rescue.pod:263
22596 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
22597 "ENVIRONMENT VARIABLES> for the complete list."
22601 #: ../rescue/virt-rescue.pod:290
22603 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<http://"
22604 "libguestfs.org/>."
22608 #: ../resize/virt-resize.pod:5
22609 msgid "virt-resize - Resize a virtual machine disk"
22613 #: ../resize/virt-resize.pod:9
22616 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22617 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22618 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22623 #: ../resize/virt-resize.pod:15
22625 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22626 "larger or smaller overall, and resizing or deleting any partitions contained "
22631 #: ../resize/virt-resize.pod:19
22633 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22634 "not> be used on live virtual machines - for consistent results, shut the "
22635 "virtual machine down before resizing it."
22639 #: ../resize/virt-resize.pod:23
22641 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22642 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22646 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:576
22647 #: ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:469
22648 #: ../src/guestfs.pod:1287 ../src/guestfs.pod:1426 ../src/guestfs.pod:2675
22653 #: ../resize/virt-resize.pod:33
22655 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22656 "fill the extra 5GB of space."
22660 #: ../resize/virt-resize.pod:36
22663 " virt-filesystems --long -h --all -a olddisk\n"
22668 #: ../resize/virt-resize.pod:38
22671 " truncate -r olddisk newdisk\n"
22672 " truncate -s +5G newdisk\n"
22677 #: ../resize/virt-resize.pod:41
22680 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
22681 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
22686 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:583
22687 #: ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:475
22688 #: ../src/guestfs.pod:1291 ../src/guestfs.pod:1430 ../src/guestfs.pod:2700
22693 #: ../resize/virt-resize.pod:46
22695 "As above, but make the /boot partition 200MB bigger, while giving the "
22696 "remaining space to /dev/sda2:"
22700 #: ../resize/virt-resize.pod:49
22703 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22704 " olddisk newdisk\n"
22709 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:589
22710 #: ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:486
22711 #: ../src/guestfs.pod:1436
22716 #: ../resize/virt-resize.pod:54
22718 "As in the first example, but expand a logical volume as the final step. "
22719 "This is what you would typically use for Linux guests that use LVM:"
22723 #: ../resize/virt-resize.pod:58
22726 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
22727 " olddisk newdisk\n"
22732 #: ../resize/virt-resize.pod:61
22737 #: ../resize/virt-resize.pod:63
22739 "As in the first example, but the output format will be qcow2 instead of a "
22744 #: ../resize/virt-resize.pod:66
22747 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
22748 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
22753 #: ../resize/virt-resize.pod:71
22754 msgid "DETAILED USAGE"
22758 #: ../resize/virt-resize.pod:73
22759 msgid "EXPANDING A VIRTUAL MACHINE DISK"
22763 #: ../resize/virt-resize.pod:77
22764 msgid "1. Shut down the virtual machine"
22768 #: ../resize/virt-resize.pod:79
22769 msgid "2. Locate input disk image"
22773 #: ../resize/virt-resize.pod:81
22775 "Locate the input disk image (ie. the file or device on the host containing "
22776 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
22777 "dumpxml> like this to find the disk image name:"
22781 #: ../resize/virt-resize.pod:85
22784 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
22785 " Found 1 nodes:\n"
22787 " <source dev=\"/dev/vg/lv_guest\" />\n"
22792 #: ../resize/virt-resize.pod:90
22793 msgid "3. Look at current sizing"
22797 #: ../resize/virt-resize.pod:92
22798 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
22802 #: ../resize/virt-resize.pod:95
22805 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
22806 " Name Type Size Parent\n"
22807 " /dev/sda1 partition 101M /dev/sda\n"
22808 " /dev/sda2 partition 7.9G /dev/sda\n"
22809 " /dev/sda device 8.0G -\n"
22814 #: ../resize/virt-resize.pod:101
22816 "(This example is a virtual machine with an 8 GB disk which we would like to "
22817 "expand up to 10 GB)."
22821 #: ../resize/virt-resize.pod:104
22822 msgid "4. Create output disk"
22826 #: ../resize/virt-resize.pod:106
22828 "Virt-resize cannot do in-place disk modifications. You have to have space "
22829 "to store the resized output disk."
22833 #: ../resize/virt-resize.pod:109
22835 "To store the resized disk image in a file, create a file of a suitable size:"
22839 #: ../resize/virt-resize.pod:112
22842 " # rm -f outdisk\n"
22843 " # truncate -s 10G outdisk\n"
22848 #: ../resize/virt-resize.pod:115
22849 msgid "Or use L<lvcreate(1)> to create a logical volume:"
22853 #: ../resize/virt-resize.pod:117
22856 " # lvcreate -L 10G -n lv_name vg_name\n"
22861 #: ../resize/virt-resize.pod:119
22862 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
22866 #: ../resize/virt-resize.pod:121
22869 " # virsh pool-list\n"
22870 " # virsh vol-create-as poolname newvol 10G\n"
22875 #: ../resize/virt-resize.pod:124
22880 #: ../resize/virt-resize.pod:126
22882 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
22883 "file) and the output disk. The output disk is the one created in the "
22888 #: ../resize/virt-resize.pod:130
22891 " # virt-resize indisk outdisk\n"
22896 #: ../resize/virt-resize.pod:132
22898 "This command just copies disk image C<indisk> to disk image C<outdisk> "
22899 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
22900 "larger, then an extra, empty partition is created at the end of the disk "
22901 "covering the extra space. If C<outdisk> is smaller, then it will give an "
22906 #: ../resize/virt-resize.pod:138
22908 "More realistically you'd want to expand existing partitions in the disk "
22909 "image by passing extra options (for the full list see the L</OPTIONS> "
22914 #: ../resize/virt-resize.pod:142
22916 "L</--expand> is the most useful option. It expands the named partition "
22917 "within the disk to fill any extra space:"
22921 #: ../resize/virt-resize.pod:145
22924 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
22929 #: ../resize/virt-resize.pod:147
22931 "(In this case, an extra partition is I<not> created at the end of the disk, "
22932 "because there will be no unused space)."
22936 #: ../resize/virt-resize.pod:150
22938 "L</--resize> is the other commonly used option. The following would "
22939 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
22940 "rest of the available space:"
22944 #: ../resize/virt-resize.pod:154
22947 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22948 " indisk outdisk\n"
22953 #: ../resize/virt-resize.pod:157
22955 "If the expanded partition in the image contains a filesystem or LVM PV, then "
22956 "if virt-resize knows how, it will resize the contents, the equivalent of "
22957 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
22958 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
22959 "filesystems, so you would have to online resize them after booting the guest."
22963 #: ../resize/virt-resize.pod:164
22964 msgid "Other options are covered below."
22968 #: ../resize/virt-resize.pod:166
22973 #: ../resize/virt-resize.pod:168
22974 msgid "Thoroughly test the new disk image I<before> discarding the old one."
22978 #: ../resize/virt-resize.pod:170
22979 msgid "If you are using libvirt, edit the XML to point at the new disk:"
22983 #: ../resize/virt-resize.pod:172
22986 " # virsh edit guestname\n"
22991 #: ../resize/virt-resize.pod:174
22993 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
22994 "html#elementsDisks>"
22998 #: ../resize/virt-resize.pod:177
22999 msgid "Then start up the domain with the new, resized disk:"
23003 #: ../resize/virt-resize.pod:179
23006 " # virsh start guestname\n"
23011 #: ../resize/virt-resize.pod:181
23013 "and check that it still works. See also the L</NOTES> section below for "
23014 "additional information."
23018 #: ../resize/virt-resize.pod:184
23019 msgid "7. Resize LVs etc inside the guest"
23023 #: ../resize/virt-resize.pod:186
23024 msgid "(This can also be done offline using L<guestfish(1)>)"
23028 #: ../resize/virt-resize.pod:188
23030 "Once the guest has booted you should see the new space available, at least "
23031 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23032 "may need to resize LVs inside PVs, and also resize filesystem types that "
23033 "virt-resize does not know how to expand."
23037 #: ../resize/virt-resize.pod:195
23038 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23042 #: ../resize/virt-resize.pod:197
23044 "Shrinking is somewhat more complex than expanding, and only an overview is "
23049 #: ../resize/virt-resize.pod:200
23051 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23052 "filesystems). The user has to shrink content before passing the disk image "
23053 "to virt-resize, and virt-resize will check that the content has been shrunk "
23058 #: ../resize/virt-resize.pod:205
23059 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23063 #: ../resize/virt-resize.pod:207
23065 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23066 "steps 3 and 4 above to allocate a new disk image."
23070 #: ../resize/virt-resize.pod:210
23072 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23076 #: ../resize/virt-resize.pod:213
23077 msgid "IGNORING OR DELETING PARTITIONS"
23081 #: ../resize/virt-resize.pod:215
23083 "virt-resize also gives a convenient way to ignore or delete partitions when "
23084 "copying from the input disk to the output disk. Ignoring a partition speeds "
23085 "up the copy where you don't care about the existing contents of a "
23086 "partition. Deleting a partition removes it completely, but note that it "
23087 "also renumbers any partitions after the one which is deleted, which can "
23088 "leave some guests unbootable."
23092 #: ../resize/virt-resize.pod:222
23093 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23097 #: ../resize/virt-resize.pod:224
23099 "If the input disk is in qcow2 format, then you may prefer that the output is "
23100 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23101 "the fly. The output format is simply determined by the format of the empty "
23102 "output container that you provide. Thus to create qcow2 output, use:"
23106 #: ../resize/virt-resize.pod:230
23109 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23114 #: ../resize/virt-resize.pod:232
23115 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23119 #: ../resize/virt-resize.pod:234
23120 msgid "Similarly, to get non-sparse raw output use:"
23124 #: ../resize/virt-resize.pod:236
23127 " fallocate -l size outdisk\n"
23132 #: ../resize/virt-resize.pod:238
23134 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
23135 "dev/zero of=outdisk bs=1M count=..>)"
23139 #: ../resize/virt-resize.pod:247 ../sparsify/virt-sparsify.pod:105
23140 msgid "Display help."
23144 #: ../resize/virt-resize.pod:249
23145 msgid "B<--align-first auto>"
23149 #: ../resize/virt-resize.pod:251
23150 msgid "B<--align-first never>"
23154 #: ../resize/virt-resize.pod:253
23155 msgid "B<--align-first always>"
23159 #: ../resize/virt-resize.pod:255
23161 "Align the first partition for improved performance (see also the I<--"
23162 "alignment> option)."
23166 #: ../resize/virt-resize.pod:258
23168 "The default is I<--align-first auto> which only aligns the first partition "
23169 "if it is safe to do so. That is, only when we know how to fix the "
23170 "bootloader automatically, and at the moment that can only be done for "
23175 #: ../resize/virt-resize.pod:263
23177 "I<--align-first never> means we never move the first partition. This is the "
23178 "safest option. Try this if the guest does not boot after resizing."
23182 #: ../resize/virt-resize.pod:267
23184 "I<--align-first always> means we always align the first partition (if it "
23185 "needs to be aligned). For some guests this will break the bootloader, "
23186 "making the guest unbootable."
23190 #: ../resize/virt-resize.pod:271
23191 msgid "B<--alignment N>"
23195 #: ../resize/virt-resize.pod:273
23197 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
23198 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
23202 #: ../resize/virt-resize.pod:277
23204 "Assuming 512 byte sector size inside the guest, here are some suitable "
23209 #: ../resize/virt-resize.pod:282
23210 msgid "I<--alignment 1> (512 bytes)"
23214 #: ../resize/virt-resize.pod:284
23216 "The partitions would be packed together as closely as possible, but would be "
23217 "completely unaligned. In some cases this can cause very poor performance. "
23218 "See L<virt-alignment-scan(1)> for further details."
23222 #: ../resize/virt-resize.pod:288
23223 msgid "I<--alignment 8> (4K)"
23227 #: ../resize/virt-resize.pod:290
23229 "This would be the minimum acceptable alignment for reasonable performance on "
23234 #: ../resize/virt-resize.pod:293
23235 msgid "I<--alignment 128> (64K)"
23239 #: ../resize/virt-resize.pod:295
23241 "This alignment provides good performance when the host is using high end "
23246 #: ../resize/virt-resize.pod:298
23247 msgid "I<--alignment 2048> (1M)"
23251 #: ../resize/virt-resize.pod:300
23253 "This is the standard alignment used by all newly installed guests since "
23258 #: ../resize/virt-resize.pod:305
23263 #: ../resize/virt-resize.pod:307 ../tools/virt-make-fs.pl:177
23264 #: ../tools/virt-win-reg.pl:120
23269 #: ../resize/virt-resize.pod:309 ../tools/virt-win-reg.pl:122
23270 msgid "Enable debugging messages."
23274 #: ../resize/virt-resize.pod:311
23275 msgid "B<--delete part>"
23279 #: ../resize/virt-resize.pod:313
23281 "Delete the named partition. It would be more accurate to describe this as "
23282 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23283 "the original disk image is left intact."
23287 #: ../resize/virt-resize.pod:317
23289 "Note that when you delete a partition, then anything contained in the "
23290 "partition is also deleted. Furthermore, this causes any partitions that "
23291 "come after to be I<renumbered>, which can easily make your guest unbootable."
23295 #: ../resize/virt-resize.pod:322 ../resize/virt-resize.pod:383
23296 #: ../resize/virt-resize.pod:510 ../sparsify/virt-sparsify.pod:145
23297 msgid "You can give this option multiple times."
23301 #: ../resize/virt-resize.pod:324
23302 msgid "B<--expand part>"
23306 #: ../resize/virt-resize.pod:326
23308 "Expand the named partition so it uses up all extra space (space left over "
23309 "after any other resize changes that you request have been done)."
23313 #: ../resize/virt-resize.pod:329
23315 "If virt-resize knows how, it will expand the direct content of the "
23316 "partition. For example, if the partition is an LVM PV, it will expand the "
23317 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23318 "content it doesn't know about alone."
23322 #: ../resize/virt-resize.pod:334
23323 msgid "Currently virt-resize can resize:"
23327 #: ../resize/virt-resize.pod:340
23328 msgid "ext2, ext3 and ext4 filesystems."
23332 #: ../resize/virt-resize.pod:344
23333 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23337 #: ../resize/virt-resize.pod:346
23339 "The filesystem must have been shut down consistently last time it was used. "
23340 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23341 "consistency check, so at the first boot after resizing Windows will check "
23346 #: ../resize/virt-resize.pod:353
23348 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23349 "inside the PV, but see the I<--LV-expand> option. The user could also "
23350 "resize LVs as desired after boot."
23354 #: ../resize/virt-resize.pod:359
23355 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23359 #: ../resize/virt-resize.pod:363 ../resize/virt-resize.pod:538
23360 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23364 #: ../resize/virt-resize.pod:365 ../sparsify/virt-sparsify.pod:125
23365 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
23366 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23367 msgid "B<--format> raw"
23371 #: ../resize/virt-resize.pod:367 ../sparsify/virt-sparsify.pod:129
23373 "Specify the format of the input disk image. If this flag is not given then "
23374 "it is auto-detected from the image itself."
23378 #: ../resize/virt-resize.pod:373
23380 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23381 "AND NON-SPARSE RAW FORMATS>."
23385 #: ../resize/virt-resize.pod:376
23386 msgid "B<--ignore part>"
23390 #: ../resize/virt-resize.pod:378
23392 "Ignore the named partition. Effectively this means the partition is "
23393 "allocated on the destination disk, but the content is not copied across from "
23394 "the source disk. The content of the partition will be blank (all zero "
23399 #: ../resize/virt-resize.pod:385
23400 msgid "B<--LV-expand logvol>"
23404 #: ../resize/virt-resize.pod:387
23406 "This takes the logical volume and, as a final step, expands it to fill all "
23407 "the space available in its volume group. A typical usage, assuming a Linux "
23408 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
23409 "lv_root> would be:"
23413 #: ../resize/virt-resize.pod:392
23416 " virt-resize indisk outdisk \\\n"
23417 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23422 #: ../resize/virt-resize.pod:395
23424 "This would first expand the partition (and PV), and then expand the root "
23425 "device to fill the extra space in the PV."
23429 #: ../resize/virt-resize.pod:398
23431 "The contents of the LV are also resized if virt-resize knows how to do "
23432 "that. You can stop virt-resize from trying to expand the content by using "
23433 "the option I<--no-expand-content>."
23437 #: ../resize/virt-resize.pod:402
23438 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23442 #: ../resize/virt-resize.pod:404
23444 "You can give this option multiple times, I<but> it doesn't make sense to do "
23445 "this unless the logical volumes you specify are all in different volume "
23450 #: ../resize/virt-resize.pod:408 ../sparsify/virt-sparsify.pod:147
23451 msgid "B<--machine-readable>"
23455 #: ../resize/virt-resize.pod:410 ../sparsify/virt-sparsify.pod:149
23457 "This option is used to make the output more machine friendly when being "
23458 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23462 #: ../resize/virt-resize.pod:416
23463 msgid "B<--dryrun>"
23467 #: ../resize/virt-resize.pod:418
23468 msgid "Print a summary of what would be done, but don't do anything."
23472 #: ../resize/virt-resize.pod:420
23473 msgid "B<--no-copy-boot-loader>"
23477 #: ../resize/virt-resize.pod:422
23479 "By default, virt-resize copies over some sectors at the start of the disk "
23480 "(up to the beginning of the first partition). Commonly these sectors "
23481 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23482 "in order for the guest to boot correctly."
23486 #: ../resize/virt-resize.pod:427
23488 "If you specify this flag, then this initial copy is not done. You may need "
23489 "to reinstall the boot loader in this case."
23493 #: ../resize/virt-resize.pod:430
23494 msgid "B<--no-extra-partition>"
23498 #: ../resize/virt-resize.pod:432
23500 "By default, virt-resize creates an extra partition if there is any extra, "
23501 "unused space after all resizing has happened. Use this option to prevent "
23502 "the extra partition from being created. If you do this then the extra space "
23503 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23504 "tool in the guest."
23508 #: ../resize/virt-resize.pod:438
23510 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23515 #: ../resize/virt-resize.pod:441
23516 msgid "B<--no-expand-content>"
23520 #: ../resize/virt-resize.pod:443
23522 "By default, virt-resize will try to expand the direct contents of "
23523 "partitions, if it knows how (see I<--expand> option above)."
23527 #: ../resize/virt-resize.pod:446
23529 "If you give the I<--no-expand-content> option then virt-resize will not "
23534 #: ../resize/virt-resize.pod:449
23535 msgid "B<--ntfsresize-force>"
23539 #: ../resize/virt-resize.pod:451
23541 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23542 "the NTFS disk is marked as needing a consistency check. You have to use "
23543 "this option if you want to resize a Windows guest multiple times without "
23544 "booting into Windows between each resize."
23548 #: ../resize/virt-resize.pod:457
23549 msgid "B<--output-format> raw"
23553 #: ../resize/virt-resize.pod:459
23555 "Specify the format of the output disk image. If this flag is not given then "
23556 "it is auto-detected from the image itself."
23560 #: ../resize/virt-resize.pod:465
23562 "Note that this option I<does not create> the output format. This option "
23563 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23564 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
23565 "SPARSE RAW FORMATS>."
23569 #: ../resize/virt-resize.pod:474
23570 msgid "Don't print the summary."
23574 #: ../resize/virt-resize.pod:476
23575 msgid "B<--resize part=size>"
23579 #: ../resize/virt-resize.pod:478
23581 "Resize the named partition (expanding or shrinking it) so that it has the "
23586 #: ../resize/virt-resize.pod:481
23588 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23589 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23590 "size; or as a relative number or percentage. For example:"
23594 #: ../resize/virt-resize.pod:487
23597 " --resize /dev/sda2=10G\n"
23602 #: ../resize/virt-resize.pod:489
23605 " --resize /dev/sda4=90%\n"
23610 #: ../resize/virt-resize.pod:491
23613 " --resize /dev/sda2=+1G\n"
23618 #: ../resize/virt-resize.pod:493
23621 " --resize /dev/sda2=-200M\n"
23626 #: ../resize/virt-resize.pod:495
23629 " --resize /dev/sda1=+128K\n"
23634 #: ../resize/virt-resize.pod:497
23637 " --resize /dev/sda1=+10%\n"
23642 #: ../resize/virt-resize.pod:499
23645 " --resize /dev/sda1=-10%\n"
23650 #: ../resize/virt-resize.pod:501
23652 "You can increase the size of any partition. Virt-resize will expand the "
23653 "direct content of the partition if it knows how (see I<--expand> below)."
23657 #: ../resize/virt-resize.pod:505
23659 "You can only I<decrease> the size of partitions that contain filesystems or "
23660 "PVs which have already been shrunk. Virt-resize will check this has been "
23661 "done before proceeding, or else will print an error (see also I<--resize-"
23666 #: ../resize/virt-resize.pod:512
23667 msgid "B<--resize-force part=size>"
23671 #: ../resize/virt-resize.pod:514
23673 "This is the same as I<--resize> except that it will let you decrease the "
23674 "size of any partition. Generally this means you will lose any data which "
23675 "was at the end of the partition you shrink, but you may not care about that "
23676 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
23677 "as a swap partition)."
23681 #: ../resize/virt-resize.pod:520
23682 msgid "See also the I<--ignore> option."
23686 #: ../resize/virt-resize.pod:522
23687 msgid "B<--shrink part>"
23691 #: ../resize/virt-resize.pod:524
23693 "Shrink the named partition until the overall disk image fits in the "
23694 "destination. The named partition B<must> contain a filesystem or PV which "
23695 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
23696 "online tools). Virt-resize will check this and give an error if it has not "
23701 #: ../resize/virt-resize.pod:530
23703 "The amount by which the overall disk must be shrunk (after carrying out all "
23704 "other operations requested by the user) is called the \"deficit\". For "
23705 "example, a straight copy (assume no other operations) from a 5GB disk image "
23706 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
23707 "would give an error unless the user specified a partition to shrink and that "
23708 "partition had more than a gigabyte of free space."
23712 #: ../resize/virt-resize.pod:548 ../sparsify/virt-sparsify.pod:177
23713 msgid "MACHINE READABLE OUTPUT"
23717 #: ../resize/virt-resize.pod:550
23719 "The I<--machine-readable> option can be used to make the output more machine "
23720 "friendly, which is useful when calling virt-resize from other programs, GUIs "
23725 #: ../resize/virt-resize.pod:554 ../sparsify/virt-sparsify.pod:183
23726 msgid "There are two ways to use this option."
23730 #: ../resize/virt-resize.pod:556
23732 "Firstly use the option on its own to query the capabilities of the virt-"
23733 "resize binary. Typical output looks like this:"
23737 #: ../resize/virt-resize.pod:559
23740 " $ virt-resize --machine-readable\n"
23742 " ntfsresize-force\n"
23750 #: ../resize/virt-resize.pod:566 ../sparsify/virt-sparsify.pod:193
23752 "A list of features is printed, one per line, and the program exits with "
23757 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:196
23759 "Secondly use the option in conjunction with other options to make the "
23760 "regular program output more machine friendly."
23764 #: ../resize/virt-resize.pod:572 ../sparsify/virt-sparsify.pod:199
23765 msgid "At the moment this means:"
23769 #: ../resize/virt-resize.pod:578 ../sparsify/virt-sparsify.pod:205
23771 "Progress bar messages can be parsed from stdout by looking for this regular "
23776 #: ../resize/virt-resize.pod:581 ../sparsify/virt-sparsify.pod:208
23779 " ^[0-9]+/[0-9]+$\n"
23784 #: ../resize/virt-resize.pod:585 ../sparsify/virt-sparsify.pod:212
23786 "The calling program should treat messages sent to stdout (except for "
23787 "progress bar messages) as status messages. They can be logged and/or "
23788 "displayed to the user."
23792 #: ../resize/virt-resize.pod:591
23794 "The calling program should treat messages sent to stderr as error messages. "
23795 "In addition, virt-resize exits with a non-zero status code if there was a "
23800 #: ../resize/virt-resize.pod:597
23802 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
23803 "readable> option and will return an error."
23807 #: ../resize/virt-resize.pod:602
23808 msgid "\"Partition 1 does not end on cylinder boundary.\""
23812 #: ../resize/virt-resize.pod:604
23814 "Virt-resize aligns partitions to multiples of 128 sectors (see the I<--"
23815 "alignment> parameter). Usually this means the partitions will not be "
23816 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
23817 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
23818 "drives. Alignment of partitions to cylinders is not required by any modern "
23819 "operating system."
23823 #: ../resize/virt-resize.pod:611
23824 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
23828 #: ../resize/virt-resize.pod:613
23830 "In Windows Vista and later versions, Microsoft switched to using a separate "
23831 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
23832 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
23833 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
23834 "the second partition (ie. C: drive) should work."
23838 #: ../resize/virt-resize.pod:620
23840 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
23841 "NTFS partitions have been expanded. This is just a safety check and (unless "
23842 "it find errors) is nothing to worry about."
23846 #: ../resize/virt-resize.pod:624
23847 msgid "GUEST BOOT STUCK AT \"GRUB\""
23851 #: ../resize/virt-resize.pod:626
23853 "If a Linux guest does not boot after resizing, and the boot is stuck after "
23854 "printing C<GRUB> on the console, try reinstalling grub."
23858 #: ../resize/virt-resize.pod:629
23861 " guestfish -i -a newdisk\n"
23862 " ><fs> cat /boot/grub/device.map\n"
23863 " # check the contents of this file are sensible or\n"
23864 " # edit the file if necessary\n"
23865 " ><fs> grub-install / /dev/vda\n"
23871 #: ../resize/virt-resize.pod:636
23873 "For more flexible guest reconfiguration, including if you need to specify "
23874 "other parameters to grub-install, use L<virt-rescue(1)>."
23878 #: ../resize/virt-resize.pod:639
23879 msgid "ALTERNATIVE TOOLS"
23883 #: ../resize/virt-resize.pod:641
23885 "There are several proprietary tools for resizing partitions. We won't "
23886 "mention any here."
23890 #: ../resize/virt-resize.pod:644
23892 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
23893 "operations on disk images. They can resize and move partitions, but I don't "
23894 "think they can do anything with the contents, and they certainly don't "
23899 #: ../resize/virt-resize.pod:649
23901 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
23902 "but at a much lower level. You will probably end up hand-calculating sector "
23903 "offsets, which is something that virt-resize was designed to avoid. If you "
23904 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
23909 #: ../resize/virt-resize.pod:669
23911 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
23912 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
23913 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
23914 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-sparsify(1)>, "
23915 "L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
23919 #: ../ruby/examples/guestfs-ruby.pod:5
23920 msgid "guestfs-ruby - How to use libguestfs from Ruby"
23924 #: ../ruby/examples/guestfs-ruby.pod:9
23927 " require 'guestfs'\n"
23928 " g = Guestfs::Guestfs.new()\n"
23929 " g.add_drive_opts(\"disk.img\",\n"
23930 " :readonly => 1, :format => \"raw\")\n"
23936 #: ../ruby/examples/guestfs-ruby.pod:17
23938 "This manual page documents how to call libguestfs from the Ruby programming "
23939 "language. This page just documents the differences from the C API and gives "
23940 "some examples. If you are not familiar with using libguestfs, you also need "
23941 "to read L<guestfs(3)>."
23945 #: ../ruby/examples/guestfs-ruby.pod:24
23947 "Errors from libguestfs functions are mapped into the C<Error> exception. "
23948 "This has a single parameter which is the error message (a string)."
23952 #: ../ruby/examples/guestfs-ruby.pod:38
23954 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
23955 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
23956 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
23960 #: ../sparsify/virt-sparsify.pod:5
23961 msgid "virt-sparsify - Make a virtual machine disk sparse"
23965 #: ../sparsify/virt-sparsify.pod:9
23968 " virt-sparsify [--options] indisk outdisk\n"
23973 #: ../sparsify/virt-sparsify.pod:13
23975 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
23976 "image) sparse a.k.a. thin-provisioned. This means that free space within "
23977 "the disk image can be converted back to free space on the host."
23981 #: ../sparsify/virt-sparsify.pod:18
23983 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
23984 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
23988 #: ../sparsify/virt-sparsify.pod:21
23990 "Virt-sparsify can also convert between some disk formats, for example "
23991 "converting a raw disk image to a thin-provisioned qcow2 image."
23995 #: ../sparsify/virt-sparsify.pod:24
23997 "Virt-sparsify can operate on any disk image, not just ones from virtual "
23998 "machines. If a virtual machine has more than one attached disk, you must "
23999 "sparsify each one separately."
24003 #: ../sparsify/virt-sparsify.pod:28
24004 msgid "IMPORTANT LIMITATIONS"
24008 #: ../sparsify/virt-sparsify.pod:34
24010 "Virt-sparsify does not do in-place modifications. It copies from a source "
24011 "image to a destination image, leaving the source unchanged. I<Check that "
24012 "the sparsification was successful before deleting the source image>."
24016 #: ../sparsify/virt-sparsify.pod:41
24017 msgid "The virtual machine I<must be shut down> before using this tool."
24021 #: ../sparsify/virt-sparsify.pod:45
24023 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
24024 "(1 temporary copy + 1 destination image). This is in the worst case and "
24025 "usually much less space is required."
24029 #: ../sparsify/virt-sparsify.pod:51
24031 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
24035 #: ../sparsify/virt-sparsify.pod:56
24036 msgid "Virt-sparsify cannot handle encrypted disks."
24040 #: ../sparsify/virt-sparsify.pod:60
24042 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
24043 "this space is often used for critical items like bootloaders so it's not "
24048 #: ../sparsify/virt-sparsify.pod:66
24050 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
24051 "to do this unless we can be sure there is no hibernation data, so at the "
24052 "moment swap partitions are ignored."
24056 #: ../sparsify/virt-sparsify.pod:72
24058 "You may also want to read the manual pages for the associated tools L<virt-"
24059 "filesystems(1)> and L<virt-df(1)> before starting."
24063 #: ../sparsify/virt-sparsify.pod:77
24064 msgid "Typical usage is:"
24068 #: ../sparsify/virt-sparsify.pod:79
24071 " virt-sparsify indisk outdisk\n"
24076 #: ../sparsify/virt-sparsify.pod:81
24078 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
24079 "is created, or overwritten if it already exists. The format of the input "
24080 "disk is detected (eg. qcow2) and the same format is used for the output disk."
24084 #: ../sparsify/virt-sparsify.pod:86
24085 msgid "To convert between formats, use the I<--convert> option:"
24089 #: ../sparsify/virt-sparsify.pod:88
24092 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
24097 #: ../sparsify/virt-sparsify.pod:90
24099 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
24100 "can find within the source disk image. You can get it to ignore (don't zero "
24101 "free space on) certain filesystems by doing:"
24105 #: ../sparsify/virt-sparsify.pod:94
24108 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
24113 #: ../sparsify/virt-sparsify.pod:96
24115 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
24119 #: ../sparsify/virt-sparsify.pod:107
24120 msgid "B<--convert> raw"
24124 #: ../sparsify/virt-sparsify.pod:109
24125 msgid "B<--convert> qcow2"
24129 #: ../sparsify/virt-sparsify.pod:111
24130 msgid "B<--convert> [other formats]"
24134 #: ../sparsify/virt-sparsify.pod:113
24136 "Use C<output-format> as the format for the destination image. If this is "
24137 "not specified, then the input format is used."
24141 #: ../sparsify/virt-sparsify.pod:116
24142 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24146 #: ../sparsify/virt-sparsify.pod:118
24148 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
24149 "C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24153 #: ../sparsify/virt-sparsify.pod:122
24155 "Specifying the I<--convert> option is usually a good idea, because then virt-"
24156 "sparsify doesn't need to try to guess the input format."
24160 #: ../sparsify/virt-sparsify.pod:127
24161 msgid "B<--format> qcow2"
24165 #: ../sparsify/virt-sparsify.pod:135
24166 msgid "B<--ignore> filesystem"
24170 #: ../sparsify/virt-sparsify.pod:137
24171 msgid "B<--ignore> volgroup"
24175 #: ../sparsify/virt-sparsify.pod:139
24177 "Ignore the named filesystem. Free space on the filesystem will not be "
24178 "zeroed, but existing blocks of zeroes will still be sparsified."
24182 #: ../sparsify/virt-sparsify.pod:142
24184 "In the second form, this ignores the named volume group. Use the volume "
24185 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24189 #: ../sparsify/virt-sparsify.pod:157
24190 msgid "This disables progress bars and other unnecessary output."
24194 #: ../sparsify/virt-sparsify.pod:179
24196 "The I<--machine-readable> option can be used to make the output more machine "
24197 "friendly, which is useful when calling virt-sparsify from other programs, "
24202 #: ../sparsify/virt-sparsify.pod:185
24204 "Firstly use the option on its own to query the capabilities of the virt-"
24205 "sparsify binary. Typical output looks like this:"
24209 #: ../sparsify/virt-sparsify.pod:188
24212 " $ virt-sparsify --machine-readable\n"
24220 #: ../sparsify/virt-sparsify.pod:218
24222 "The calling program should treat messages sent to stderr as error messages. "
24223 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24228 #: ../sparsify/virt-sparsify.pod:224
24230 "All versions of virt-sparsify have supported the I<--machine-readable> "
24235 #: ../sparsify/virt-sparsify.pod:238
24237 "Location of the temporary directory used for the potentially large temporary "
24242 #: ../sparsify/virt-sparsify.pod:241
24244 "You should ensure there is enough free space in the worst case for a full "
24245 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24246 "to another directory that has enough space."
24250 #: ../sparsify/virt-sparsify.pod:245
24251 msgid "This defaults to C</tmp>."
24255 #: ../sparsify/virt-sparsify.pod:249
24257 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24261 #: ../sparsify/virt-sparsify.pod:253
24263 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24264 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-img"
24265 "(1)>, L<http://libguestfs.org/>."
24269 #: ../src/guestfs-actions.pod:1
24270 msgid "guestfs_add_cdrom"
24274 #: ../src/guestfs-actions.pod:3
24278 " guestfs_add_cdrom (guestfs_h *g,\n"
24279 " const char *filename);\n"
24284 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:255
24285 #: ../src/guestfs-actions.pod:276
24287 "I<This function is deprecated.> In new code, use the L</"
24288 "guestfs_add_drive_opts> call instead."
24292 #: ../src/guestfs-actions.pod:24
24294 "This call checks for the existence of C<filename>. This stops you from "
24295 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24296 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24301 #: ../src/guestfs-actions.pod:31
24303 "If you just want to add an ISO file (often you use this as an efficient way "
24304 "to transfer large files into the guest), then you should probably use "
24305 "C<guestfs_add_drive_ro> instead."
24309 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:140
24310 #: ../src/guestfs-actions.pod:207 ../src/guestfs-actions.pod:244
24311 #: ../src/guestfs-actions.pod:265 ../src/guestfs-actions.pod:286
24312 #: ../src/guestfs-actions.pod:299 ../src/guestfs-actions.pod:313
24313 #: ../src/guestfs-actions.pod:433 ../src/guestfs-actions.pod:453
24314 #: ../src/guestfs-actions.pod:467 ../src/guestfs-actions.pod:512
24315 #: ../src/guestfs-actions.pod:540 ../src/guestfs-actions.pod:558
24316 #: ../src/guestfs-actions.pod:625 ../src/guestfs-actions.pod:658
24317 #: ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:687
24318 #: ../src/guestfs-actions.pod:786 ../src/guestfs-actions.pod:804
24319 #: ../src/guestfs-actions.pod:818 ../src/guestfs-actions.pod:832
24320 #: ../src/guestfs-actions.pod:869 ../src/guestfs-actions.pod:1052
24321 #: ../src/guestfs-actions.pod:1072 ../src/guestfs-actions.pod:1090
24322 #: ../src/guestfs-actions.pod:1180 ../src/guestfs-actions.pod:1239
24323 #: ../src/guestfs-actions.pod:1285 ../src/guestfs-actions.pod:1303
24324 #: ../src/guestfs-actions.pod:1322 ../src/guestfs-actions.pod:1336
24325 #: ../src/guestfs-actions.pod:1356 ../src/guestfs-actions.pod:1426
24326 #: ../src/guestfs-actions.pod:1457 ../src/guestfs-actions.pod:1482
24327 #: ../src/guestfs-actions.pod:1524 ../src/guestfs-actions.pod:1637
24328 #: ../src/guestfs-actions.pod:1664 ../src/guestfs-actions.pod:1879
24329 #: ../src/guestfs-actions.pod:1901 ../src/guestfs-actions.pod:1988
24330 #: ../src/guestfs-actions.pod:2496 ../src/guestfs-actions.pod:2640
24331 #: ../src/guestfs-actions.pod:2701 ../src/guestfs-actions.pod:2736
24332 #: ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:3808
24333 #: ../src/guestfs-actions.pod:3833 ../src/guestfs-actions.pod:4022
24334 #: ../src/guestfs-actions.pod:4036 ../src/guestfs-actions.pod:4049
24335 #: ../src/guestfs-actions.pod:4063 ../src/guestfs-actions.pod:4078
24336 #: ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:4186
24337 #: ../src/guestfs-actions.pod:4206 ../src/guestfs-actions.pod:4223
24338 #: ../src/guestfs-actions.pod:4246 ../src/guestfs-actions.pod:4269
24339 #: ../src/guestfs-actions.pod:4304 ../src/guestfs-actions.pod:4323
24340 #: ../src/guestfs-actions.pod:4342 ../src/guestfs-actions.pod:4377
24341 #: ../src/guestfs-actions.pod:4389 ../src/guestfs-actions.pod:4425
24342 #: ../src/guestfs-actions.pod:4441 ../src/guestfs-actions.pod:4454
24343 #: ../src/guestfs-actions.pod:4469 ../src/guestfs-actions.pod:4486
24344 #: ../src/guestfs-actions.pod:4579 ../src/guestfs-actions.pod:4599
24345 #: ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4663
24346 #: ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:4699
24347 #: ../src/guestfs-actions.pod:4715 ../src/guestfs-actions.pod:4729
24348 #: ../src/guestfs-actions.pod:4743 ../src/guestfs-actions.pod:4760
24349 #: ../src/guestfs-actions.pod:4775 ../src/guestfs-actions.pod:4802
24350 #: ../src/guestfs-actions.pod:4865 ../src/guestfs-actions.pod:4938
24351 #: ../src/guestfs-actions.pod:4969 ../src/guestfs-actions.pod:4988
24352 #: ../src/guestfs-actions.pod:5007 ../src/guestfs-actions.pod:5019
24353 #: ../src/guestfs-actions.pod:5036 ../src/guestfs-actions.pod:5049
24354 #: ../src/guestfs-actions.pod:5064 ../src/guestfs-actions.pod:5079
24355 #: ../src/guestfs-actions.pod:5111 ../src/guestfs-actions.pod:5137
24356 #: ../src/guestfs-actions.pod:5176 ../src/guestfs-actions.pod:5196
24357 #: ../src/guestfs-actions.pod:5210 ../src/guestfs-actions.pod:5227
24358 #: ../src/guestfs-actions.pod:5276 ../src/guestfs-actions.pod:5329
24359 #: ../src/guestfs-actions.pod:5376 ../src/guestfs-actions.pod:5419
24360 #: ../src/guestfs-actions.pod:5447 ../src/guestfs-actions.pod:5464
24361 #: ../src/guestfs-actions.pod:5482 ../src/guestfs-actions.pod:5622
24362 #: ../src/guestfs-actions.pod:5679 ../src/guestfs-actions.pod:5701
24363 #: ../src/guestfs-actions.pod:5719 ../src/guestfs-actions.pod:5751
24364 #: ../src/guestfs-actions.pod:5817 ../src/guestfs-actions.pod:5834
24365 #: ../src/guestfs-actions.pod:5847 ../src/guestfs-actions.pod:5861
24366 #: ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6169
24367 #: ../src/guestfs-actions.pod:6188 ../src/guestfs-actions.pod:6202
24368 #: ../src/guestfs-actions.pod:6214 ../src/guestfs-actions.pod:6228
24369 #: ../src/guestfs-actions.pod:6240 ../src/guestfs-actions.pod:6254
24370 #: ../src/guestfs-actions.pod:6270 ../src/guestfs-actions.pod:6291
24371 #: ../src/guestfs-actions.pod:6310 ../src/guestfs-actions.pod:6329
24372 #: ../src/guestfs-actions.pod:6359 ../src/guestfs-actions.pod:6377
24373 #: ../src/guestfs-actions.pod:6400 ../src/guestfs-actions.pod:6418
24374 #: ../src/guestfs-actions.pod:6437 ../src/guestfs-actions.pod:6458
24375 #: ../src/guestfs-actions.pod:6477 ../src/guestfs-actions.pod:6494
24376 #: ../src/guestfs-actions.pod:6513 ../src/guestfs-actions.pod:6541
24377 #: ../src/guestfs-actions.pod:6565 ../src/guestfs-actions.pod:6584
24378 #: ../src/guestfs-actions.pod:6600 ../src/guestfs-actions.pod:6624
24379 #: ../src/guestfs-actions.pod:6643 ../src/guestfs-actions.pod:6658
24380 #: ../src/guestfs-actions.pod:6677 ../src/guestfs-actions.pod:6721
24381 #: ../src/guestfs-actions.pod:6751 ../src/guestfs-actions.pod:6784
24382 #: ../src/guestfs-actions.pod:6899 ../src/guestfs-actions.pod:7020
24383 #: ../src/guestfs-actions.pod:7032 ../src/guestfs-actions.pod:7045
24384 #: ../src/guestfs-actions.pod:7058 ../src/guestfs-actions.pod:7080
24385 #: ../src/guestfs-actions.pod:7093 ../src/guestfs-actions.pod:7106
24386 #: ../src/guestfs-actions.pod:7119 ../src/guestfs-actions.pod:7134
24387 #: ../src/guestfs-actions.pod:7193 ../src/guestfs-actions.pod:7210
24388 #: ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7242
24389 #: ../src/guestfs-actions.pod:7259 ../src/guestfs-actions.pod:7272
24390 #: ../src/guestfs-actions.pod:7292 ../src/guestfs-actions.pod:7328
24391 #: ../src/guestfs-actions.pod:7342 ../src/guestfs-actions.pod:7383
24392 #: ../src/guestfs-actions.pod:7396 ../src/guestfs-actions.pod:7414
24393 #: ../src/guestfs-actions.pod:7448 ../src/guestfs-actions.pod:7484
24394 #: ../src/guestfs-actions.pod:7600 ../src/guestfs-actions.pod:7615
24395 #: ../src/guestfs-actions.pod:7629 ../src/guestfs-actions.pod:7684
24396 #: ../src/guestfs-actions.pod:7697 ../src/guestfs-actions.pod:7742
24397 #: ../src/guestfs-actions.pod:7782 ../src/guestfs-actions.pod:7838
24398 #: ../src/guestfs-actions.pod:7858 ../src/guestfs-actions.pod:7891
24399 #: ../src/guestfs-actions.pod:7955 ../src/guestfs-actions.pod:7978
24400 #: ../src/guestfs-actions.pod:8007
24401 msgid "This function returns 0 on success or -1 on error."
24405 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
24406 #: ../src/guestfs-actions.pod:1287 ../src/guestfs-actions.pod:2102
24407 #: ../src/guestfs-actions.pod:2200 ../src/guestfs-actions.pod:2325
24408 #: ../src/guestfs-actions.pod:3795 ../src/guestfs-actions.pod:3815
24409 #: ../src/guestfs-actions.pod:5113 ../src/guestfs-actions.pod:6379
24410 #: ../src/guestfs-actions.pod:6496 ../src/guestfs-actions.pod:6645
24411 #: ../src/guestfs-actions.pod:7136 ../src/guestfs-actions.pod:7261
24412 #: ../src/guestfs-actions.pod:7784
24413 msgid "(Added in 0.3)"
24417 #: ../src/guestfs-actions.pod:41
24418 msgid "guestfs_add_domain"
24422 #: ../src/guestfs-actions.pod:43
24426 " guestfs_add_domain (guestfs_h *g,\n"
24427 " const char *dom,\n"
24433 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
24434 #: ../src/guestfs-actions.pod:843 ../src/guestfs-actions.pod:1167
24435 #: ../src/guestfs-actions.pod:1219 ../src/guestfs-actions.pod:2993
24436 #: ../src/guestfs-actions.pod:4814 ../src/guestfs-actions.pod:5123
24437 #: ../src/guestfs-actions.pod:5340
24439 "You may supply a list of optional arguments to this call. Use zero or more "
24440 "of the following pairs of parameters, and terminate the list with C<-1> on "
24441 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24445 #: ../src/guestfs-actions.pod:53
24448 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24449 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24450 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24451 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24452 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24457 #: ../src/guestfs-actions.pod:59
24459 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24460 "It works by connecting to libvirt, requesting the domain and domain XML from "
24461 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24466 #: ../src/guestfs-actions.pod:94
24468 "The other optional parameters are passed directly through to "
24469 "C<guestfs_add_drive_opts>."
24473 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:356
24474 #: ../src/guestfs-actions.pod:526 ../src/guestfs-actions.pod:704
24475 #: ../src/guestfs-actions.pod:735 ../src/guestfs-actions.pod:753
24476 #: ../src/guestfs-actions.pod:772 ../src/guestfs-actions.pod:1502
24477 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:2061
24478 #: ../src/guestfs-actions.pod:2172 ../src/guestfs-actions.pod:2223
24479 #: ../src/guestfs-actions.pod:2275 ../src/guestfs-actions.pod:2289
24480 #: ../src/guestfs-actions.pod:2312 ../src/guestfs-actions.pod:2627
24481 #: ../src/guestfs-actions.pod:3111 ../src/guestfs-actions.pod:3129
24482 #: ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:5519
24483 #: ../src/guestfs-actions.pod:5931 ../src/guestfs-actions.pod:5957
24484 #: ../src/guestfs-actions.pod:7369 ../src/guestfs-actions.pod:7795
24485 #: ../src/guestfs-actions.pod:7808 ../src/guestfs-actions.pod:7821
24486 msgid "On error this function returns -1."
24490 #: ../src/guestfs-actions.pod:99
24491 msgid "(Added in 1.7.4)"
24495 #: ../src/guestfs-actions.pod:101
24496 msgid "guestfs_add_domain_va"
24500 #: ../src/guestfs-actions.pod:103
24504 " guestfs_add_domain_va (guestfs_h *g,\n"
24505 " const char *dom,\n"
24506 " va_list args);\n"
24511 #: ../src/guestfs-actions.pod:108
24512 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24516 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
24517 #: ../src/guestfs-actions.pod:220 ../src/guestfs-actions.pod:231
24518 #: ../src/guestfs-actions.pod:882 ../src/guestfs-actions.pod:893
24519 #: ../src/guestfs-actions.pod:1195 ../src/guestfs-actions.pod:1208
24520 #: ../src/guestfs-actions.pod:1254 ../src/guestfs-actions.pod:1267
24521 #: ../src/guestfs-actions.pod:3077 ../src/guestfs-actions.pod:3089
24522 #: ../src/guestfs-actions.pod:4879 ../src/guestfs-actions.pod:4891
24523 #: ../src/guestfs-actions.pod:5151 ../src/guestfs-actions.pod:5163
24524 #: ../src/guestfs-actions.pod:5389 ../src/guestfs-actions.pod:5400
24525 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24529 #: ../src/guestfs-actions.pod:112
24530 msgid "guestfs_add_domain_argv"
24534 #: ../src/guestfs-actions.pod:114
24538 " guestfs_add_domain_argv (guestfs_h *g,\n"
24539 " const char *dom,\n"
24540 " const struct guestfs_add_domain_argv *optargs);\n"
24545 #: ../src/guestfs-actions.pod:119
24546 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24550 #: ../src/guestfs-actions.pod:123
24551 msgid "guestfs_add_drive"
24555 #: ../src/guestfs-actions.pod:125
24559 " guestfs_add_drive (guestfs_h *g,\n"
24560 " const char *filename);\n"
24565 #: ../src/guestfs-actions.pod:129
24567 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24568 "optional parameters, so the disk is added writable, with the format being "
24569 "detected automatically."
24573 #: ../src/guestfs-actions.pod:133
24575 "Automatic detection of the format opens you up to a potential security hole "
24576 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24577 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24578 "you should think about replacing calls to this function with calls to "
24579 "C<guestfs_add_drive_opts>, and specifying the format."
24583 #: ../src/guestfs-actions.pod:144
24584 msgid "guestfs_add_drive_opts"
24588 #: ../src/guestfs-actions.pod:146
24592 " guestfs_add_drive_opts (guestfs_h *g,\n"
24593 " const char *filename,\n"
24599 #: ../src/guestfs-actions.pod:156
24602 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24603 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24604 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24605 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
24610 #: ../src/guestfs-actions.pod:186
24612 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24613 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24614 "Possible formats include C<raw> and C<qcow2>."
24618 #: ../src/guestfs-actions.pod:197
24620 "This rarely-used option lets you emulate the behaviour of the deprecated "
24621 "C<guestfs_add_drive_with_if> call (q.v.)"
24625 #: ../src/guestfs-actions.pod:209
24626 msgid "(Added in 1.5.23)"
24630 #: ../src/guestfs-actions.pod:211
24631 msgid "guestfs_add_drive_opts_va"
24635 #: ../src/guestfs-actions.pod:213
24639 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24640 " const char *filename,\n"
24641 " va_list args);\n"
24646 #: ../src/guestfs-actions.pod:218
24647 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24651 #: ../src/guestfs-actions.pod:222
24652 msgid "guestfs_add_drive_opts_argv"
24656 #: ../src/guestfs-actions.pod:224
24660 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24661 " const char *filename,\n"
24662 " const struct guestfs_add_drive_opts_argv *optargs);\n"
24667 #: ../src/guestfs-actions.pod:229
24668 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
24672 #: ../src/guestfs-actions.pod:233
24673 msgid "guestfs_add_drive_ro"
24677 #: ../src/guestfs-actions.pod:235
24681 " guestfs_add_drive_ro (guestfs_h *g,\n"
24682 " const char *filename);\n"
24687 #: ../src/guestfs-actions.pod:239
24689 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
24690 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
24691 "disk is added read-only, with the format being detected automatically."
24695 #: ../src/guestfs-actions.pod:246
24696 msgid "(Added in 1.0.38)"
24700 #: ../src/guestfs-actions.pod:248
24701 msgid "guestfs_add_drive_ro_with_if"
24705 #: ../src/guestfs-actions.pod:250
24709 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
24710 " const char *filename,\n"
24711 " const char *iface);\n"
24716 #: ../src/guestfs-actions.pod:262
24718 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
24719 "QEMU interface emulation to use at run time."
24723 #: ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:288
24724 #: ../src/guestfs-actions.pod:2586
24725 msgid "(Added in 1.0.84)"
24729 #: ../src/guestfs-actions.pod:269
24730 msgid "guestfs_add_drive_with_if"
24734 #: ../src/guestfs-actions.pod:271
24738 " guestfs_add_drive_with_if (guestfs_h *g,\n"
24739 " const char *filename,\n"
24740 " const char *iface);\n"
24745 #: ../src/guestfs-actions.pod:283
24747 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
24748 "QEMU interface emulation to use at run time."
24752 #: ../src/guestfs-actions.pod:290
24753 msgid "guestfs_aug_clear"
24757 #: ../src/guestfs-actions.pod:292
24761 " guestfs_aug_clear (guestfs_h *g,\n"
24762 " const char *augpath);\n"
24767 #: ../src/guestfs-actions.pod:301 ../src/guestfs-actions.pod:2314
24768 msgid "(Added in 1.3.4)"
24772 #: ../src/guestfs-actions.pod:303
24773 msgid "guestfs_aug_close"
24777 #: ../src/guestfs-actions.pod:305
24781 " guestfs_aug_close (guestfs_h *g);\n"
24786 #: ../src/guestfs-actions.pod:308
24788 "Close the current Augeas handle and free up any resources used by it. After "
24789 "calling this, you have to call C<guestfs_aug_init> again before you can use "
24790 "any other Augeas functions."
24794 #: ../src/guestfs-actions.pod:315 ../src/guestfs-actions.pod:340
24795 #: ../src/guestfs-actions.pod:358 ../src/guestfs-actions.pod:372
24796 #: ../src/guestfs-actions.pod:435 ../src/guestfs-actions.pod:455
24797 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:500
24798 #: ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:528
24799 #: ../src/guestfs-actions.pod:542 ../src/guestfs-actions.pod:560
24800 #: ../src/guestfs-actions.pod:6008
24801 msgid "(Added in 0.7)"
24805 #: ../src/guestfs-actions.pod:317
24806 msgid "guestfs_aug_defnode"
24810 #: ../src/guestfs-actions.pod:319
24813 " struct guestfs_int_bool *\n"
24814 " guestfs_aug_defnode (guestfs_h *g,\n"
24815 " const char *name,\n"
24816 " const char *expr,\n"
24817 " const char *val);\n"
24822 #: ../src/guestfs-actions.pod:328
24824 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
24825 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
24826 "containing that single node."
24830 #: ../src/guestfs-actions.pod:336
24832 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
24833 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
24837 #: ../src/guestfs-actions.pod:342
24838 msgid "guestfs_aug_defvar"
24842 #: ../src/guestfs-actions.pod:344
24846 " guestfs_aug_defvar (guestfs_h *g,\n"
24847 " const char *name,\n"
24848 " const char *expr);\n"
24853 #: ../src/guestfs-actions.pod:360
24854 msgid "guestfs_aug_get"
24858 #: ../src/guestfs-actions.pod:362
24862 " guestfs_aug_get (guestfs_h *g,\n"
24863 " const char *augpath);\n"
24868 #: ../src/guestfs-actions.pod:369 ../src/guestfs-actions.pod:933
24869 #: ../src/guestfs-actions.pod:951 ../src/guestfs-actions.pod:1011
24870 #: ../src/guestfs-actions.pod:1027 ../src/guestfs-actions.pod:1130
24871 #: ../src/guestfs-actions.pod:1371 ../src/guestfs-actions.pod:1388
24872 #: ../src/guestfs-actions.pod:1407 ../src/guestfs-actions.pod:1541
24873 #: ../src/guestfs-actions.pod:1729 ../src/guestfs-actions.pod:1841
24874 #: ../src/guestfs-actions.pod:2004 ../src/guestfs-actions.pod:2021
24875 #: ../src/guestfs-actions.pod:2088 ../src/guestfs-actions.pod:2131
24876 #: ../src/guestfs-actions.pod:2152 ../src/guestfs-actions.pod:2337
24877 #: ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:2755
24878 #: ../src/guestfs-actions.pod:2857 ../src/guestfs-actions.pod:2961
24879 #: ../src/guestfs-actions.pod:2980 ../src/guestfs-actions.pod:3195
24880 #: ../src/guestfs-actions.pod:3223 ../src/guestfs-actions.pod:3244
24881 #: ../src/guestfs-actions.pod:3278 ../src/guestfs-actions.pod:3341
24882 #: ../src/guestfs-actions.pod:3361 ../src/guestfs-actions.pod:3381
24883 #: ../src/guestfs-actions.pod:4008 ../src/guestfs-actions.pod:4361
24884 #: ../src/guestfs-actions.pod:4531 ../src/guestfs-actions.pod:4641
24885 #: ../src/guestfs-actions.pod:5537 ../src/guestfs-actions.pod:5736
24886 #: ../src/guestfs-actions.pod:5906 ../src/guestfs-actions.pod:6084
24887 #: ../src/guestfs-actions.pod:6133 ../src/guestfs-actions.pod:6805
24888 #: ../src/guestfs-actions.pod:6821 ../src/guestfs-actions.pod:6845
24889 #: ../src/guestfs-actions.pod:6869 ../src/guestfs-actions.pod:7543
24890 #: ../src/guestfs-actions.pod:7562 ../src/guestfs-actions.pod:7580
24891 #: ../src/guestfs-actions.pod:7754 ../src/guestfs-actions.pod:8071
24893 "This function returns a string, or NULL on error. I<The caller must free "
24894 "the returned string after use>."
24898 #: ../src/guestfs-actions.pod:374
24899 msgid "guestfs_aug_init"
24903 #: ../src/guestfs-actions.pod:376
24907 " guestfs_aug_init (guestfs_h *g,\n"
24908 " const char *root,\n"
24914 #: ../src/guestfs-actions.pod:385
24915 msgid "You must call this before using any other C<guestfs_aug_*> commands."
24919 #: ../src/guestfs-actions.pod:410
24921 "This option is only useful when debugging Augeas lenses. Use of this option "
24922 "may require additional memory for the libguestfs appliance. You may need to "
24923 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
24924 "C<guestfs_set_memsize>."
24928 #: ../src/guestfs-actions.pod:425
24929 msgid "Do not load the tree in C<guestfs_aug_init>."
24933 #: ../src/guestfs-actions.pod:429
24934 msgid "To close the handle, you can call C<guestfs_aug_close>."
24938 #: ../src/guestfs-actions.pod:437
24939 msgid "guestfs_aug_insert"
24943 #: ../src/guestfs-actions.pod:439
24947 " guestfs_aug_insert (guestfs_h *g,\n"
24948 " const char *augpath,\n"
24949 " const char *label,\n"
24955 #: ../src/guestfs-actions.pod:457
24956 msgid "guestfs_aug_load"
24960 #: ../src/guestfs-actions.pod:459
24964 " guestfs_aug_load (guestfs_h *g);\n"
24969 #: ../src/guestfs-actions.pod:471
24970 msgid "guestfs_aug_ls"
24974 #: ../src/guestfs-actions.pod:473
24978 " guestfs_aug_ls (guestfs_h *g,\n"
24979 " const char *augpath);\n"
24984 #: ../src/guestfs-actions.pod:477
24986 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
24987 "sorting the resulting nodes into alphabetical order."
24991 #: ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:496
24992 #: ../src/guestfs-actions.pod:642 ../src/guestfs-actions.pod:1149
24993 #: ../src/guestfs-actions.pod:1556 ../src/guestfs-actions.pod:1575
24994 #: ../src/guestfs-actions.pod:1678 ../src/guestfs-actions.pod:1697
24995 #: ../src/guestfs-actions.pod:1943 ../src/guestfs-actions.pod:2409
24996 #: ../src/guestfs-actions.pod:2425 ../src/guestfs-actions.pod:2444
24997 #: ../src/guestfs-actions.pod:2509 ../src/guestfs-actions.pod:2533
24998 #: ../src/guestfs-actions.pod:2604 ../src/guestfs-actions.pod:2653
24999 #: ../src/guestfs-actions.pod:2922 ../src/guestfs-actions.pod:3297
25000 #: ../src/guestfs-actions.pod:3577 ../src/guestfs-actions.pod:3891
25001 #: ../src/guestfs-actions.pod:3908 ../src/guestfs-actions.pod:3928
25002 #: ../src/guestfs-actions.pod:3990 ../src/guestfs-actions.pod:4095
25003 #: ../src/guestfs-actions.pod:4503 ../src/guestfs-actions.pod:5260
25004 #: ../src/guestfs-actions.pod:5878 ../src/guestfs-actions.pod:6004
25005 #: ../src/guestfs-actions.pod:6118 ../src/guestfs-actions.pod:6885
25006 #: ../src/guestfs-actions.pod:6946 ../src/guestfs-actions.pod:7001
25007 #: ../src/guestfs-actions.pod:7147 ../src/guestfs-actions.pod:7171
25008 #: ../src/guestfs-actions.pod:7647 ../src/guestfs-actions.pod:7667
25009 #: ../src/guestfs-actions.pod:7714 ../src/guestfs-actions.pod:7908
25010 #: ../src/guestfs-actions.pod:7927 ../src/guestfs-actions.pod:8021
25011 #: ../src/guestfs-actions.pod:8040 ../src/guestfs-actions.pod:8086
25012 #: ../src/guestfs-actions.pod:8105
25014 "This function returns a NULL-terminated array of strings (like L<environ(3)"
25015 ">), or NULL if there was an error. I<The caller must free the strings and "
25016 "the array after use>."
25020 #: ../src/guestfs-actions.pod:484 ../src/guestfs-actions.pod:1074
25021 #: ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1613
25022 #: ../src/guestfs-actions.pod:3655 ../src/guestfs-actions.pod:3686
25023 #: ../src/guestfs-actions.pod:4344 ../src/guestfs-actions.pod:4394
25024 #: ../src/guestfs-actions.pod:4581 ../src/guestfs-actions.pod:4614
25025 #: ../src/guestfs-actions.pod:4777 ../src/guestfs-actions.pod:5264
25026 #: ../src/guestfs-actions.pod:5819 ../src/guestfs-actions.pod:6216
25027 #: ../src/guestfs-actions.pod:6230 ../src/guestfs-actions.pod:6242
25028 #: ../src/guestfs-actions.pod:6726 ../src/guestfs-actions.pod:7385
25029 #: ../src/guestfs-actions.pod:7398 ../src/guestfs-actions.pod:7631
25030 #: ../src/guestfs-actions.pod:7896
25031 msgid "(Added in 0.8)"
25035 #: ../src/guestfs-actions.pod:486
25036 msgid "guestfs_aug_match"
25040 #: ../src/guestfs-actions.pod:488
25044 " guestfs_aug_match (guestfs_h *g,\n"
25045 " const char *augpath);\n"
25050 #: ../src/guestfs-actions.pod:502
25051 msgid "guestfs_aug_mv"
25055 #: ../src/guestfs-actions.pod:504
25059 " guestfs_aug_mv (guestfs_h *g,\n"
25060 " const char *src,\n"
25061 " const char *dest);\n"
25066 #: ../src/guestfs-actions.pod:516
25067 msgid "guestfs_aug_rm"
25071 #: ../src/guestfs-actions.pod:518
25075 " guestfs_aug_rm (guestfs_h *g,\n"
25076 " const char *augpath);\n"
25081 #: ../src/guestfs-actions.pod:530
25082 msgid "guestfs_aug_save"
25086 #: ../src/guestfs-actions.pod:532
25090 " guestfs_aug_save (guestfs_h *g);\n"
25095 #: ../src/guestfs-actions.pod:537
25097 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
25102 #: ../src/guestfs-actions.pod:544
25103 msgid "guestfs_aug_set"
25107 #: ../src/guestfs-actions.pod:546
25111 " guestfs_aug_set (guestfs_h *g,\n"
25112 " const char *augpath,\n"
25113 " const char *val);\n"
25118 #: ../src/guestfs-actions.pod:553
25120 "In the Augeas API, it is possible to clear a node by setting the value to "
25121 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25122 "this call. Instead you must use the C<guestfs_aug_clear> call."
25126 #: ../src/guestfs-actions.pod:562
25127 msgid "guestfs_available"
25131 #: ../src/guestfs-actions.pod:564
25135 " guestfs_available (guestfs_h *g,\n"
25136 " char *const *groups);\n"
25141 #: ../src/guestfs-actions.pod:572
25143 "The libguestfs groups, and the functions that those groups correspond to, "
25144 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25145 "runtime by calling C<guestfs_available_all_groups>."
25149 #: ../src/guestfs-actions.pod:596
25150 msgid "You must call C<guestfs_launch> before calling this function."
25154 #: ../src/guestfs-actions.pod:618
25156 "This call was added in version C<1.0.80>. In previous versions of "
25157 "libguestfs all you could do would be to speculatively execute a command to "
25158 "find out if the daemon implemented it. See also C<guestfs_version>."
25162 #: ../src/guestfs-actions.pod:627 ../src/guestfs-actions.pod:1358
25163 msgid "(Added in 1.0.80)"
25167 #: ../src/guestfs-actions.pod:629
25168 msgid "guestfs_available_all_groups"
25172 #: ../src/guestfs-actions.pod:631
25176 " guestfs_available_all_groups (guestfs_h *g);\n"
25181 #: ../src/guestfs-actions.pod:634
25183 "This command returns a list of all optional groups that this daemon knows "
25184 "about. Note this returns both supported and unsupported groups. To find "
25185 "out which ones the daemon can actually support you have to call "
25186 "C<guestfs_available> on each member of the returned list."
25190 #: ../src/guestfs-actions.pod:640
25191 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25195 #: ../src/guestfs-actions.pod:646
25196 msgid "(Added in 1.3.15)"
25200 #: ../src/guestfs-actions.pod:648
25201 msgid "guestfs_base64_in"
25205 #: ../src/guestfs-actions.pod:650
25209 " guestfs_base64_in (guestfs_h *g,\n"
25210 " const char *base64file,\n"
25211 " const char *filename);\n"
25216 #: ../src/guestfs-actions.pod:660 ../src/guestfs-actions.pod:674
25217 msgid "(Added in 1.3.5)"
25221 #: ../src/guestfs-actions.pod:662
25222 msgid "guestfs_base64_out"
25226 #: ../src/guestfs-actions.pod:664
25230 " guestfs_base64_out (guestfs_h *g,\n"
25231 " const char *filename,\n"
25232 " const char *base64file);\n"
25237 #: ../src/guestfs-actions.pod:676
25238 msgid "guestfs_blockdev_flushbufs"
25242 #: ../src/guestfs-actions.pod:678
25246 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25247 " const char *device);\n"
25252 #: ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:706
25253 #: ../src/guestfs-actions.pod:721 ../src/guestfs-actions.pod:737
25254 #: ../src/guestfs-actions.pod:755 ../src/guestfs-actions.pod:774
25255 #: ../src/guestfs-actions.pod:788 ../src/guestfs-actions.pod:806
25256 #: ../src/guestfs-actions.pod:820 ../src/guestfs-actions.pod:834
25257 msgid "(Added in 0.9.3)"
25261 #: ../src/guestfs-actions.pod:691
25262 msgid "guestfs_blockdev_getbsz"
25266 #: ../src/guestfs-actions.pod:693
25270 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25271 " const char *device);\n"
25276 #: ../src/guestfs-actions.pod:708
25277 msgid "guestfs_blockdev_getro"
25281 #: ../src/guestfs-actions.pod:710
25285 " guestfs_blockdev_getro (guestfs_h *g,\n"
25286 " const char *device);\n"
25291 #: ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:1596
25292 #: ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:2100
25293 #: ../src/guestfs-actions.pod:2111 ../src/guestfs-actions.pod:2183
25294 #: ../src/guestfs-actions.pod:2209 ../src/guestfs-actions.pod:2249
25295 #: ../src/guestfs-actions.pod:2264 ../src/guestfs-actions.pod:2300
25296 #: ../src/guestfs-actions.pod:2323 ../src/guestfs-actions.pod:3398
25297 #: ../src/guestfs-actions.pod:3414 ../src/guestfs-actions.pod:3432
25298 #: ../src/guestfs-actions.pod:3594 ../src/guestfs-actions.pod:3608
25299 #: ../src/guestfs-actions.pod:3623 ../src/guestfs-actions.pod:3637
25300 #: ../src/guestfs-actions.pod:3653 ../src/guestfs-actions.pod:3668
25301 #: ../src/guestfs-actions.pod:3684 ../src/guestfs-actions.pod:3698
25302 #: ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3725
25303 #: ../src/guestfs-actions.pod:3740 ../src/guestfs-actions.pod:3755
25304 #: ../src/guestfs-actions.pod:3768 ../src/guestfs-actions.pod:3782
25305 #: ../src/guestfs-actions.pod:5501
25306 msgid "This function returns a C truth value on success or -1 on error."
25310 #: ../src/guestfs-actions.pod:723
25311 msgid "guestfs_blockdev_getsize64"
25315 #: ../src/guestfs-actions.pod:725
25319 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25320 " const char *device);\n"
25325 #: ../src/guestfs-actions.pod:731
25326 msgid "See also C<guestfs_blockdev_getsz>."
25330 #: ../src/guestfs-actions.pod:739
25331 msgid "guestfs_blockdev_getss"
25335 #: ../src/guestfs-actions.pod:741
25339 " guestfs_blockdev_getss (guestfs_h *g,\n"
25340 " const char *device);\n"
25345 #: ../src/guestfs-actions.pod:748
25347 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25352 #: ../src/guestfs-actions.pod:757
25353 msgid "guestfs_blockdev_getsz"
25357 #: ../src/guestfs-actions.pod:759
25361 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25362 " const char *device);\n"
25367 #: ../src/guestfs-actions.pod:766
25369 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25370 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25374 #: ../src/guestfs-actions.pod:776
25375 msgid "guestfs_blockdev_rereadpt"
25379 #: ../src/guestfs-actions.pod:778
25383 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25384 " const char *device);\n"
25389 #: ../src/guestfs-actions.pod:790
25390 msgid "guestfs_blockdev_setbsz"
25394 #: ../src/guestfs-actions.pod:792
25398 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25399 " const char *device,\n"
25400 " int blocksize);\n"
25405 #: ../src/guestfs-actions.pod:808
25406 msgid "guestfs_blockdev_setro"
25410 #: ../src/guestfs-actions.pod:810
25414 " guestfs_blockdev_setro (guestfs_h *g,\n"
25415 " const char *device);\n"
25420 #: ../src/guestfs-actions.pod:822
25421 msgid "guestfs_blockdev_setrw"
25425 #: ../src/guestfs-actions.pod:824
25429 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25430 " const char *device);\n"
25435 #: ../src/guestfs-actions.pod:836
25436 msgid "guestfs_btrfs_filesystem_resize"
25440 #: ../src/guestfs-actions.pod:838
25444 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25445 " const char *mountpoint,\n"
25451 #: ../src/guestfs-actions.pod:848
25454 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25459 #: ../src/guestfs-actions.pod:871
25460 msgid "(Added in 1.11.17)"
25464 #: ../src/guestfs-actions.pod:873
25465 msgid "guestfs_btrfs_filesystem_resize_va"
25469 #: ../src/guestfs-actions.pod:875
25473 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25474 " const char *mountpoint,\n"
25475 " va_list args);\n"
25480 #: ../src/guestfs-actions.pod:880
25481 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25485 #: ../src/guestfs-actions.pod:884
25486 msgid "guestfs_btrfs_filesystem_resize_argv"
25490 #: ../src/guestfs-actions.pod:886
25494 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25495 " const char *mountpoint,\n"
25496 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25501 #: ../src/guestfs-actions.pod:891
25502 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25506 #: ../src/guestfs-actions.pod:895
25507 msgid "guestfs_case_sensitive_path"
25511 #: ../src/guestfs-actions.pod:897
25515 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25516 " const char *path);\n"
25521 #: ../src/guestfs-actions.pod:923
25523 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
25524 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25525 "how the directories were originally created under Windows)."
25529 #: ../src/guestfs-actions.pod:931
25530 msgid "See also C<guestfs_realpath>."
25534 #: ../src/guestfs-actions.pod:936 ../src/guestfs-actions.pod:7565
25535 msgid "(Added in 1.0.75)"
25539 #: ../src/guestfs-actions.pod:938
25540 msgid "guestfs_cat"
25544 #: ../src/guestfs-actions.pod:940
25548 " guestfs_cat (guestfs_h *g,\n"
25549 " const char *path);\n"
25554 #: ../src/guestfs-actions.pod:946
25556 "Note that this function cannot correctly handle binary files (specifically, "
25557 "files containing C<\\0> character which is treated as end of string). For "
25558 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25559 "functions which have a more complex interface."
25563 #: ../src/guestfs-actions.pod:957 ../src/guestfs-actions.pod:3912
25564 #: ../src/guestfs-actions.pod:3994 ../src/guestfs-actions.pod:4011
25565 #: ../src/guestfs-actions.pod:4099 ../src/guestfs-actions.pod:4507
25566 #: ../src/guestfs-actions.pod:4521 ../src/guestfs-actions.pod:5882
25567 #: ../src/guestfs-actions.pod:5896 ../src/guestfs-actions.pod:7718
25568 #: ../src/guestfs-actions.pod:7732
25569 msgid "(Added in 0.4)"
25573 #: ../src/guestfs-actions.pod:959
25574 msgid "guestfs_checksum"
25578 #: ../src/guestfs-actions.pod:961
25582 " guestfs_checksum (guestfs_h *g,\n"
25583 " const char *csumtype,\n"
25584 " const char *path);\n"
25589 #: ../src/guestfs-actions.pod:1007
25590 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25594 #: ../src/guestfs-actions.pod:1009
25595 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25599 #: ../src/guestfs-actions.pod:1014 ../src/guestfs-actions.pod:1433
25600 #: ../src/guestfs-actions.pod:2291 ../src/guestfs-actions.pod:3610
25601 #: ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3700
25602 #: ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:7421
25603 msgid "(Added in 1.0.2)"
25607 #: ../src/guestfs-actions.pod:1016
25608 msgid "guestfs_checksum_device"
25612 #: ../src/guestfs-actions.pod:1018
25616 " guestfs_checksum_device (guestfs_h *g,\n"
25617 " const char *csumtype,\n"
25618 " const char *device);\n"
25623 #: ../src/guestfs-actions.pod:1023
25625 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25626 "device named C<device>. For the types of checksums supported see the "
25627 "C<guestfs_checksum> command."
25631 #: ../src/guestfs-actions.pod:1030 ../src/guestfs-actions.pod:5331
25632 #: ../src/guestfs-actions.pod:5466 ../src/guestfs-actions.pod:5503
25633 #: ../src/guestfs-actions.pod:5521 ../src/guestfs-actions.pod:5703
25634 #: ../src/guestfs-actions.pod:7330 ../src/guestfs-actions.pod:7344
25635 #: ../src/guestfs-actions.pod:7744
25636 msgid "(Added in 1.3.2)"
25640 #: ../src/guestfs-actions.pod:1032
25641 msgid "guestfs_checksums_out"
25645 #: ../src/guestfs-actions.pod:1034
25649 " guestfs_checksums_out (guestfs_h *g,\n"
25650 " const char *csumtype,\n"
25651 " const char *directory,\n"
25652 " const char *sumsfile);\n"
25657 #: ../src/guestfs-actions.pod:1054
25658 msgid "(Added in 1.3.7)"
25662 #: ../src/guestfs-actions.pod:1056
25663 msgid "guestfs_chmod"
25667 #: ../src/guestfs-actions.pod:1058
25671 " guestfs_chmod (guestfs_h *g,\n"
25673 " const char *path);\n"
25678 #: ../src/guestfs-actions.pod:1076
25679 msgid "guestfs_chown"
25683 #: ../src/guestfs-actions.pod:1078
25687 " guestfs_chown (guestfs_h *g,\n"
25690 " const char *path);\n"
25695 #: ../src/guestfs-actions.pod:1094
25696 msgid "guestfs_command"
25700 #: ../src/guestfs-actions.pod:1096
25704 " guestfs_command (guestfs_h *g,\n"
25705 " char *const *arguments);\n"
25710 #: ../src/guestfs-actions.pod:1105
25712 "The single parameter is an argv-style list of arguments. The first element "
25713 "is the name of the program to run. Subsequent elements are parameters. The "
25714 "list must be non-empty (ie. must contain a program name). Note that the "
25715 "command runs directly, and is I<not> invoked via the shell (see "
25720 #: ../src/guestfs-actions.pod:1136 ../src/guestfs-actions.pod:1156
25721 #: ../src/guestfs-actions.pod:1732
25722 msgid "(Added in 0.9.1)"
25726 #: ../src/guestfs-actions.pod:1138
25727 msgid "guestfs_command_lines"
25731 #: ../src/guestfs-actions.pod:1140
25735 " guestfs_command_lines (guestfs_h *g,\n"
25736 " char *const *arguments);\n"
25741 #: ../src/guestfs-actions.pod:1144
25743 "This is the same as C<guestfs_command>, but splits the result into a list of "
25748 #: ../src/guestfs-actions.pod:1147
25749 msgid "See also: C<guestfs_sh_lines>"
25753 #: ../src/guestfs-actions.pod:1158
25754 msgid "guestfs_compress_device_out"
25758 #: ../src/guestfs-actions.pod:1160
25762 " guestfs_compress_device_out (guestfs_h *g,\n"
25763 " const char *ctype,\n"
25764 " const char *device,\n"
25765 " const char *zdevice,\n"
25771 #: ../src/guestfs-actions.pod:1172
25774 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
25779 #: ../src/guestfs-actions.pod:1177
25781 "The C<ctype> and optional C<level> parameters have the same meaning as in "
25782 "C<guestfs_compress_out>."
25786 #: ../src/guestfs-actions.pod:1182 ../src/guestfs-actions.pod:1241
25787 #: ../src/guestfs-actions.pod:2277 ../src/guestfs-actions.pod:6602
25788 msgid "(Added in 1.13.15)"
25792 #: ../src/guestfs-actions.pod:1184
25793 msgid "guestfs_compress_device_out_va"
25797 #: ../src/guestfs-actions.pod:1186
25801 " guestfs_compress_device_out_va (guestfs_h *g,\n"
25802 " const char *ctype,\n"
25803 " const char *device,\n"
25804 " const char *zdevice,\n"
25805 " va_list args);\n"
25810 #: ../src/guestfs-actions.pod:1193
25811 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
25815 #: ../src/guestfs-actions.pod:1197
25816 msgid "guestfs_compress_device_out_argv"
25820 #: ../src/guestfs-actions.pod:1199
25824 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
25825 " const char *ctype,\n"
25826 " const char *device,\n"
25827 " const char *zdevice,\n"
25828 " const struct guestfs_compress_device_out_argv *optargs);\n"
25833 #: ../src/guestfs-actions.pod:1206
25834 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
25838 #: ../src/guestfs-actions.pod:1210
25839 msgid "guestfs_compress_out"
25843 #: ../src/guestfs-actions.pod:1212
25847 " guestfs_compress_out (guestfs_h *g,\n"
25848 " const char *ctype,\n"
25849 " const char *file,\n"
25850 " const char *zfile,\n"
25856 #: ../src/guestfs-actions.pod:1224
25859 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
25864 #: ../src/guestfs-actions.pod:1243
25865 msgid "guestfs_compress_out_va"
25869 #: ../src/guestfs-actions.pod:1245
25873 " guestfs_compress_out_va (guestfs_h *g,\n"
25874 " const char *ctype,\n"
25875 " const char *file,\n"
25876 " const char *zfile,\n"
25877 " va_list args);\n"
25882 #: ../src/guestfs-actions.pod:1252
25883 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
25887 #: ../src/guestfs-actions.pod:1256
25888 msgid "guestfs_compress_out_argv"
25892 #: ../src/guestfs-actions.pod:1258
25896 " guestfs_compress_out_argv (guestfs_h *g,\n"
25897 " const char *ctype,\n"
25898 " const char *file,\n"
25899 " const char *zfile,\n"
25900 " const struct guestfs_compress_out_argv *optargs);\n"
25905 #: ../src/guestfs-actions.pod:1265
25906 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
25910 #: ../src/guestfs-actions.pod:1269
25911 msgid "guestfs_config"
25915 #: ../src/guestfs-actions.pod:1271
25919 " guestfs_config (guestfs_h *g,\n"
25920 " const char *qemuparam,\n"
25921 " const char *qemuvalue);\n"
25926 #: ../src/guestfs-actions.pod:1289
25927 msgid "guestfs_copy_size"
25931 #: ../src/guestfs-actions.pod:1291
25935 " guestfs_copy_size (guestfs_h *g,\n"
25936 " const char *src,\n"
25937 " const char *dest,\n"
25938 " int64_t size);\n"
25943 #: ../src/guestfs-actions.pod:1305 ../src/guestfs-actions.pod:1428
25944 #: ../src/guestfs-actions.pod:1459 ../src/guestfs-actions.pod:1504
25945 #: ../src/guestfs-actions.pod:1881 ../src/guestfs-actions.pod:1903
25946 #: ../src/guestfs-actions.pod:3810 ../src/guestfs-actions.pod:7416
25947 #: ../src/guestfs-actions.pod:7450 ../src/guestfs-actions.pod:7957
25948 #: ../src/guestfs-actions.pod:7980
25950 "This long-running command can generate progress notification messages so "
25951 "that the caller can display a progress bar or indicator. To receive these "
25952 "messages, the caller must register a progress event callback. See L<guestfs"
25953 "(3)/GUESTFS_EVENT_PROGRESS>."
25957 #: ../src/guestfs-actions.pod:1310 ../src/guestfs-actions.pod:4534
25958 #: ../src/guestfs-actions.pod:5909 ../src/guestfs-actions.pod:7651
25959 #: ../src/guestfs-actions.pod:7671 ../src/guestfs-actions.pod:7757
25960 msgid "(Added in 1.0.87)"
25964 #: ../src/guestfs-actions.pod:1312
25969 #: ../src/guestfs-actions.pod:1314
25973 " guestfs_cp (guestfs_h *g,\n"
25974 " const char *src,\n"
25975 " const char *dest);\n"
25980 #: ../src/guestfs-actions.pod:1324 ../src/guestfs-actions.pod:1338
25981 #: ../src/guestfs-actions.pod:1410 ../src/guestfs-actions.pod:1484
25982 #: ../src/guestfs-actions.pod:1598 ../src/guestfs-actions.pod:5278
25983 #: ../src/guestfs-actions.pod:5753
25984 msgid "(Added in 1.0.18)"
25988 #: ../src/guestfs-actions.pod:1326
25989 msgid "guestfs_cp_a"
25993 #: ../src/guestfs-actions.pod:1328
25997 " guestfs_cp_a (guestfs_h *g,\n"
25998 " const char *src,\n"
25999 " const char *dest);\n"
26004 #: ../src/guestfs-actions.pod:1340
26009 #: ../src/guestfs-actions.pod:1342
26013 " guestfs_dd (guestfs_h *g,\n"
26014 " const char *src,\n"
26015 " const char *dest);\n"
26020 #: ../src/guestfs-actions.pod:1352
26022 "If the destination is a device, it must be as large or larger than the "
26023 "source file or device, otherwise the copy will fail. This command cannot do "
26024 "partial copies (see C<guestfs_copy_size>)."
26028 #: ../src/guestfs-actions.pod:1360
26033 #: ../src/guestfs-actions.pod:1362
26037 " guestfs_df (guestfs_h *g);\n"
26042 #: ../src/guestfs-actions.pod:1367 ../src/guestfs-actions.pod:1384
26044 "This command is mostly useful for interactive sessions. It is I<not> "
26045 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
26050 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1391
26051 #: ../src/guestfs-actions.pod:1509 ../src/guestfs-actions.pod:2516
26052 #: ../src/guestfs-actions.pod:2540 ../src/guestfs-actions.pod:2608
26053 #: ../src/guestfs-actions.pod:4644 ../src/guestfs-actions.pod:5178
26054 #: ../src/guestfs-actions.pod:7154 ../src/guestfs-actions.pod:7178
26055 #: ../src/guestfs-actions.pod:7797 ../src/guestfs-actions.pod:7810
26056 #: ../src/guestfs-actions.pod:7823
26057 msgid "(Added in 1.0.54)"
26061 #: ../src/guestfs-actions.pod:1376
26062 msgid "guestfs_df_h"
26066 #: ../src/guestfs-actions.pod:1378
26070 " guestfs_df_h (guestfs_h *g);\n"
26075 #: ../src/guestfs-actions.pod:1393
26076 msgid "guestfs_dmesg"
26080 #: ../src/guestfs-actions.pod:1395
26084 " guestfs_dmesg (guestfs_h *g);\n"
26089 #: ../src/guestfs-actions.pod:1402
26091 "Another way to get the same information is to enable verbose messages with "
26092 "C<guestfs_set_verbose> or by setting the environment variable "
26093 "C<LIBGUESTFS_DEBUG=1> before running the program."
26097 #: ../src/guestfs-actions.pod:1412
26098 msgid "guestfs_download"
26102 #: ../src/guestfs-actions.pod:1414
26106 " guestfs_download (guestfs_h *g,\n"
26107 " const char *remotefilename,\n"
26108 " const char *filename);\n"
26113 #: ../src/guestfs-actions.pod:1424
26114 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
26118 #: ../src/guestfs-actions.pod:1435
26119 msgid "guestfs_download_offset"
26123 #: ../src/guestfs-actions.pod:1437
26127 " guestfs_download_offset (guestfs_h *g,\n"
26128 " const char *remotefilename,\n"
26129 " const char *filename,\n"
26130 " int64_t offset,\n"
26131 " int64_t size);\n"
26136 #: ../src/guestfs-actions.pod:1450
26138 "Note that there is no limit on the amount of data that can be downloaded "
26139 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26140 "full amount unless an error occurs."
26144 #: ../src/guestfs-actions.pod:1455
26145 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26149 #: ../src/guestfs-actions.pod:1464 ../src/guestfs-actions.pod:7455
26150 msgid "(Added in 1.5.17)"
26154 #: ../src/guestfs-actions.pod:1466
26155 msgid "guestfs_drop_caches"
26159 #: ../src/guestfs-actions.pod:1468
26163 " guestfs_drop_caches (guestfs_h *g,\n"
26164 " int whattodrop);\n"
26169 #: ../src/guestfs-actions.pod:1486
26174 #: ../src/guestfs-actions.pod:1488
26178 " guestfs_du (guestfs_h *g,\n"
26179 " const char *path);\n"
26184 #: ../src/guestfs-actions.pod:1511
26185 msgid "guestfs_e2fsck_f"
26189 #: ../src/guestfs-actions.pod:1513
26193 " guestfs_e2fsck_f (guestfs_h *g,\n"
26194 " const char *device);\n"
26199 #: ../src/guestfs-actions.pod:1521
26201 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26202 "Normally you should use C<guestfs_fsck>."
26206 #: ../src/guestfs-actions.pod:1526
26207 msgid "(Added in 1.0.29)"
26211 #: ../src/guestfs-actions.pod:1528
26212 msgid "guestfs_echo_daemon"
26216 #: ../src/guestfs-actions.pod:1530
26220 " guestfs_echo_daemon (guestfs_h *g,\n"
26221 " char *const *words);\n"
26226 #: ../src/guestfs-actions.pod:1539
26227 msgid "See also C<guestfs_ping_daemon>."
26231 #: ../src/guestfs-actions.pod:1544 ../src/guestfs-actions.pod:2302
26232 #: ../src/guestfs-actions.pod:6626
26233 msgid "(Added in 1.0.69)"
26237 #: ../src/guestfs-actions.pod:1546
26238 msgid "guestfs_egrep"
26242 #: ../src/guestfs-actions.pod:1548
26246 " guestfs_egrep (guestfs_h *g,\n"
26247 " const char *regex,\n"
26248 " const char *path);\n"
26253 #: ../src/guestfs-actions.pod:1563 ../src/guestfs-actions.pod:1582
26254 #: ../src/guestfs-actions.pod:1639 ../src/guestfs-actions.pod:1685
26255 #: ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:2432
26256 #: ../src/guestfs-actions.pod:2451 ../src/guestfs-actions.pod:2629
26257 #: ../src/guestfs-actions.pod:2642 ../src/guestfs-actions.pod:2657
26258 #: ../src/guestfs-actions.pod:2703 ../src/guestfs-actions.pod:2725
26259 #: ../src/guestfs-actions.pod:2738 ../src/guestfs-actions.pod:4024
26260 #: ../src/guestfs-actions.pod:4038 ../src/guestfs-actions.pod:4051
26261 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:5066
26262 #: ../src/guestfs-actions.pod:6087 ../src/guestfs-actions.pod:6136
26263 #: ../src/guestfs-actions.pod:7022 ../src/guestfs-actions.pod:7034
26264 #: ../src/guestfs-actions.pod:7047 ../src/guestfs-actions.pod:7060
26265 #: ../src/guestfs-actions.pod:7082 ../src/guestfs-actions.pod:7095
26266 #: ../src/guestfs-actions.pod:7108 ../src/guestfs-actions.pod:7121
26267 #: ../src/guestfs-actions.pod:7915 ../src/guestfs-actions.pod:7934
26268 #: ../src/guestfs-actions.pod:8028 ../src/guestfs-actions.pod:8047
26269 #: ../src/guestfs-actions.pod:8093 ../src/guestfs-actions.pod:8112
26270 msgid "(Added in 1.0.66)"
26274 #: ../src/guestfs-actions.pod:1565
26275 msgid "guestfs_egrepi"
26279 #: ../src/guestfs-actions.pod:1567
26283 " guestfs_egrepi (guestfs_h *g,\n"
26284 " const char *regex,\n"
26285 " const char *path);\n"
26290 #: ../src/guestfs-actions.pod:1584
26291 msgid "guestfs_equal"
26295 #: ../src/guestfs-actions.pod:1586
26299 " guestfs_equal (guestfs_h *g,\n"
26300 " const char *file1,\n"
26301 " const char *file2);\n"
26306 #: ../src/guestfs-actions.pod:1600
26307 msgid "guestfs_exists"
26311 #: ../src/guestfs-actions.pod:1602
26315 " guestfs_exists (guestfs_h *g,\n"
26316 " const char *path);\n"
26321 #: ../src/guestfs-actions.pod:1609
26322 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26326 #: ../src/guestfs-actions.pod:1615
26327 msgid "guestfs_fallocate"
26331 #: ../src/guestfs-actions.pod:1617
26335 " guestfs_fallocate (guestfs_h *g,\n"
26336 " const char *path,\n"
26342 #: ../src/guestfs-actions.pod:1622
26344 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
26349 #: ../src/guestfs-actions.pod:1641
26350 msgid "guestfs_fallocate64"
26354 #: ../src/guestfs-actions.pod:1643
26358 " guestfs_fallocate64 (guestfs_h *g,\n"
26359 " const char *path,\n"
26365 #: ../src/guestfs-actions.pod:1652
26367 "Note that this call allocates disk blocks for the file. To create a sparse "
26368 "file use C<guestfs_truncate_size> instead."
26372 #: ../src/guestfs-actions.pod:1655
26374 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
26375 "oversight it only allowed 30 bit lengths to be specified, effectively "
26376 "limiting the maximum size of files created through that call to 1GB."
26380 #: ../src/guestfs-actions.pod:1666
26381 msgid "(Added in 1.3.17)"
26385 #: ../src/guestfs-actions.pod:1668
26386 msgid "guestfs_fgrep"
26390 #: ../src/guestfs-actions.pod:1670
26394 " guestfs_fgrep (guestfs_h *g,\n"
26395 " const char *pattern,\n"
26396 " const char *path);\n"
26401 #: ../src/guestfs-actions.pod:1687
26402 msgid "guestfs_fgrepi"
26406 #: ../src/guestfs-actions.pod:1689
26410 " guestfs_fgrepi (guestfs_h *g,\n"
26411 " const char *pattern,\n"
26412 " const char *path);\n"
26417 #: ../src/guestfs-actions.pod:1706
26418 msgid "guestfs_file"
26422 #: ../src/guestfs-actions.pod:1708
26426 " guestfs_file (guestfs_h *g,\n"
26427 " const char *path);\n"
26432 #: ../src/guestfs-actions.pod:1726
26434 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
26435 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
26439 #: ../src/guestfs-actions.pod:1734
26440 msgid "guestfs_file_architecture"
26444 #: ../src/guestfs-actions.pod:1736
26448 " guestfs_file_architecture (guestfs_h *g,\n"
26449 " const char *filename);\n"
26454 #: ../src/guestfs-actions.pod:1844 ../src/guestfs-actions.pod:2007
26455 #: ../src/guestfs-actions.pod:2024 ../src/guestfs-actions.pod:2758
26456 #: ../src/guestfs-actions.pod:2860 ../src/guestfs-actions.pod:2926
26457 #: ../src/guestfs-actions.pod:3113 ../src/guestfs-actions.pod:3131
26458 #: ../src/guestfs-actions.pod:3171 ../src/guestfs-actions.pod:3247
26459 #: ../src/guestfs-actions.pod:3344 ../src/guestfs-actions.pod:3581
26460 #: ../src/guestfs-actions.pod:3713
26461 msgid "(Added in 1.5.3)"
26465 #: ../src/guestfs-actions.pod:1846
26466 msgid "guestfs_filesize"
26470 #: ../src/guestfs-actions.pod:1848
26474 " guestfs_filesize (guestfs_h *g,\n"
26475 " const char *file);\n"
26480 #: ../src/guestfs-actions.pod:1854
26482 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
26483 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
26484 "devices, use C<guestfs_blockdev_getsize64>."
26488 #: ../src/guestfs-actions.pod:1860
26489 msgid "(Added in 1.0.82)"
26493 #: ../src/guestfs-actions.pod:1862
26494 msgid "guestfs_fill"
26498 #: ../src/guestfs-actions.pod:1864
26502 " guestfs_fill (guestfs_h *g,\n"
26505 " const char *path);\n"
26510 #: ../src/guestfs-actions.pod:1874
26512 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26513 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
26514 "bytes use C<guestfs_fill_pattern>."
26518 #: ../src/guestfs-actions.pod:1886
26519 msgid "(Added in 1.0.79)"
26523 #: ../src/guestfs-actions.pod:1888
26524 msgid "guestfs_fill_pattern"
26528 #: ../src/guestfs-actions.pod:1890
26532 " guestfs_fill_pattern (guestfs_h *g,\n"
26533 " const char *pattern,\n"
26535 " const char *path);\n"
26540 #: ../src/guestfs-actions.pod:1896
26542 "This function is like C<guestfs_fill> except that it creates a new file of "
26543 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
26544 "pattern is truncated if necessary to ensure the length of the file is "
26545 "exactly C<len> bytes."
26549 #: ../src/guestfs-actions.pod:1908
26550 msgid "(Added in 1.3.12)"
26554 #: ../src/guestfs-actions.pod:1910
26555 msgid "guestfs_find"
26559 #: ../src/guestfs-actions.pod:1912
26563 " guestfs_find (guestfs_h *g,\n"
26564 " const char *directory);\n"
26569 #: ../src/guestfs-actions.pod:1928
26571 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
26575 #: ../src/guestfs-actions.pod:1941
26576 msgid "See also C<guestfs_find0>."
26580 #: ../src/guestfs-actions.pod:1950 ../src/guestfs-actions.pod:4471
26581 #: ../src/guestfs-actions.pod:6171
26582 msgid "(Added in 1.0.27)"
26586 #: ../src/guestfs-actions.pod:1952
26587 msgid "guestfs_find0"
26591 #: ../src/guestfs-actions.pod:1954
26595 " guestfs_find0 (guestfs_h *g,\n"
26596 " const char *directory,\n"
26597 " const char *files);\n"
26602 #: ../src/guestfs-actions.pod:1963
26604 "This command works the same way as C<guestfs_find> with the following "
26609 #: ../src/guestfs-actions.pod:1990
26610 msgid "(Added in 1.0.74)"
26614 #: ../src/guestfs-actions.pod:1992
26615 msgid "guestfs_findfs_label"
26619 #: ../src/guestfs-actions.pod:1994
26623 " guestfs_findfs_label (guestfs_h *g,\n"
26624 " const char *label);\n"
26629 #: ../src/guestfs-actions.pod:2002
26630 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
26634 #: ../src/guestfs-actions.pod:2009
26635 msgid "guestfs_findfs_uuid"
26639 #: ../src/guestfs-actions.pod:2011
26643 " guestfs_findfs_uuid (guestfs_h *g,\n"
26644 " const char *uuid);\n"
26649 #: ../src/guestfs-actions.pod:2019
26650 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
26654 #: ../src/guestfs-actions.pod:2026
26655 msgid "guestfs_fsck"
26659 #: ../src/guestfs-actions.pod:2028
26663 " guestfs_fsck (guestfs_h *g,\n"
26664 " const char *fstype,\n"
26665 " const char *device);\n"
26670 #: ../src/guestfs-actions.pod:2063 ../src/guestfs-actions.pod:7962
26671 msgid "(Added in 1.0.16)"
26675 #: ../src/guestfs-actions.pod:2065
26676 msgid "guestfs_get_append"
26680 #: ../src/guestfs-actions.pod:2067
26684 " guestfs_get_append (guestfs_h *g);\n"
26689 #: ../src/guestfs-actions.pod:2075
26691 "This function returns a string which may be NULL. There is no way to return "
26692 "an error from this function. The string is owned by the guest handle and "
26693 "must I<not> be freed."
26697 #: ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:5849
26698 #: ../src/guestfs-actions.pod:6331 ../src/guestfs-actions.pod:6789
26699 #: ../src/guestfs-actions.pod:6808 ../src/guestfs-actions.pod:6824
26700 #: ../src/guestfs-actions.pod:6848 ../src/guestfs-actions.pod:7602
26701 #: ../src/guestfs-actions.pod:7617 ../src/guestfs-actions.pod:8009
26702 msgid "(Added in 1.0.26)"
26706 #: ../src/guestfs-actions.pod:2081
26707 msgid "guestfs_get_attach_method"
26711 #: ../src/guestfs-actions.pod:2083
26715 " guestfs_get_attach_method (guestfs_h *g);\n"
26720 #: ../src/guestfs-actions.pod:2086
26721 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
26725 #: ../src/guestfs-actions.pod:2091 ../src/guestfs-actions.pod:6361
26726 msgid "(Added in 1.9.8)"
26730 #: ../src/guestfs-actions.pod:2093
26731 msgid "guestfs_get_autosync"
26735 #: ../src/guestfs-actions.pod:2095
26739 " guestfs_get_autosync (guestfs_h *g);\n"
26744 #: ../src/guestfs-actions.pod:2104
26745 msgid "guestfs_get_direct"
26749 #: ../src/guestfs-actions.pod:2106
26753 " guestfs_get_direct (guestfs_h *g);\n"
26758 #: ../src/guestfs-actions.pod:2113 ../src/guestfs-actions.pod:6402
26759 msgid "(Added in 1.0.72)"
26763 #: ../src/guestfs-actions.pod:2115
26764 msgid "guestfs_get_e2label"
26768 #: ../src/guestfs-actions.pod:2117
26772 " guestfs_get_e2label (guestfs_h *g,\n"
26773 " const char *device);\n"
26778 #: ../src/guestfs-actions.pod:2121
26780 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
26785 #: ../src/guestfs-actions.pod:2134 ../src/guestfs-actions.pod:2155
26786 #: ../src/guestfs-actions.pod:6420 ../src/guestfs-actions.pod:6439
26787 msgid "(Added in 1.0.15)"
26791 #: ../src/guestfs-actions.pod:2136
26792 msgid "guestfs_get_e2uuid"
26796 #: ../src/guestfs-actions.pod:2138
26800 " guestfs_get_e2uuid (guestfs_h *g,\n"
26801 " const char *device);\n"
26806 #: ../src/guestfs-actions.pod:2142
26808 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
26813 #: ../src/guestfs-actions.pod:2157
26814 msgid "guestfs_get_memsize"
26818 #: ../src/guestfs-actions.pod:2159
26822 " guestfs_get_memsize (guestfs_h *g);\n"
26827 #: ../src/guestfs-actions.pod:2165
26829 "If C<guestfs_set_memsize> was not called on this handle, and if "
26830 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
26831 "value for memsize."
26835 #: ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:4762
26836 #: ../src/guestfs-actions.pod:4971 ../src/guestfs-actions.pod:4990
26837 #: ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:5021
26838 #: ../src/guestfs-actions.pod:5038 ../src/guestfs-actions.pod:5051
26839 #: ../src/guestfs-actions.pod:6074 ../src/guestfs-actions.pod:6460
26840 #: ../src/guestfs-actions.pod:6756 ../src/guestfs-actions.pod:7371
26841 msgid "(Added in 1.0.55)"
26845 #: ../src/guestfs-actions.pod:2176
26846 msgid "guestfs_get_network"
26850 #: ../src/guestfs-actions.pod:2178
26854 " guestfs_get_network (guestfs_h *g);\n"
26859 #: ../src/guestfs-actions.pod:2185 ../src/guestfs-actions.pod:6479
26860 msgid "(Added in 1.5.4)"
26864 #: ../src/guestfs-actions.pod:2187
26865 msgid "guestfs_get_path"
26869 #: ../src/guestfs-actions.pod:2189
26873 " guestfs_get_path (guestfs_h *g);\n"
26878 #: ../src/guestfs-actions.pod:2197 ../src/guestfs-actions.pod:2237
26880 "This function returns a string, or NULL on error. The string is owned by "
26881 "the guest handle and must I<not> be freed."
26885 #: ../src/guestfs-actions.pod:2202
26886 msgid "guestfs_get_pgroup"
26890 #: ../src/guestfs-actions.pod:2204
26894 " guestfs_get_pgroup (guestfs_h *g);\n"
26899 #: ../src/guestfs-actions.pod:2211 ../src/guestfs-actions.pod:6515
26900 #: ../src/guestfs-actions.pod:7863
26901 msgid "(Added in 1.11.18)"
26905 #: ../src/guestfs-actions.pod:2213
26906 msgid "guestfs_get_pid"
26910 #: ../src/guestfs-actions.pod:2215
26914 " guestfs_get_pid (guestfs_h *g);\n"
26919 #: ../src/guestfs-actions.pod:2225
26920 msgid "(Added in 1.0.56)"
26924 #: ../src/guestfs-actions.pod:2227
26925 msgid "guestfs_get_qemu"
26929 #: ../src/guestfs-actions.pod:2229
26933 " guestfs_get_qemu (guestfs_h *g);\n"
26938 #: ../src/guestfs-actions.pod:2240 ../src/guestfs-actions.pod:6543
26939 msgid "(Added in 1.0.6)"
26943 #: ../src/guestfs-actions.pod:2242
26944 msgid "guestfs_get_recovery_proc"
26948 #: ../src/guestfs-actions.pod:2244
26952 " guestfs_get_recovery_proc (guestfs_h *g);\n"
26957 #: ../src/guestfs-actions.pod:2251 ../src/guestfs-actions.pod:3835
26958 #: ../src/guestfs-actions.pod:4166 ../src/guestfs-actions.pod:4569
26959 #: ../src/guestfs-actions.pod:4601 ../src/guestfs-actions.pod:5779
26960 #: ../src/guestfs-actions.pod:6122 ../src/guestfs-actions.pod:6567
26961 #: ../src/guestfs-actions.pod:7274 ../src/guestfs-actions.pod:7294
26962 #: ../src/guestfs-actions.pod:7486
26963 msgid "(Added in 1.0.77)"
26967 #: ../src/guestfs-actions.pod:2253
26968 msgid "guestfs_get_selinux"
26972 #: ../src/guestfs-actions.pod:2255
26976 " guestfs_get_selinux (guestfs_h *g);\n"
26981 #: ../src/guestfs-actions.pod:2258
26983 "This returns the current setting of the selinux flag which is passed to the "
26984 "appliance at boot time. See C<guestfs_set_selinux>."
26988 #: ../src/guestfs-actions.pod:2266 ../src/guestfs-actions.pod:2340
26989 #: ../src/guestfs-actions.pod:6586 ../src/guestfs-actions.pod:6660
26990 msgid "(Added in 1.0.67)"
26994 #: ../src/guestfs-actions.pod:2268
26995 msgid "guestfs_get_smp"
26999 #: ../src/guestfs-actions.pod:2270
27003 " guestfs_get_smp (guestfs_h *g);\n"
27008 #: ../src/guestfs-actions.pod:2279
27009 msgid "guestfs_get_state"
27013 #: ../src/guestfs-actions.pod:2281
27017 " guestfs_get_state (guestfs_h *g);\n"
27022 #: ../src/guestfs-actions.pod:2293
27023 msgid "guestfs_get_trace"
27027 #: ../src/guestfs-actions.pod:2295
27031 " guestfs_get_trace (guestfs_h *g);\n"
27036 #: ../src/guestfs-actions.pod:2304
27037 msgid "guestfs_get_umask"
27041 #: ../src/guestfs-actions.pod:2306
27045 " guestfs_get_umask (guestfs_h *g);\n"
27050 #: ../src/guestfs-actions.pod:2309
27052 "Return the current umask. By default the umask is C<022> unless it has been "
27053 "set by calling C<guestfs_umask>."
27057 #: ../src/guestfs-actions.pod:2316
27058 msgid "guestfs_get_verbose"
27062 #: ../src/guestfs-actions.pod:2318
27066 " guestfs_get_verbose (guestfs_h *g);\n"
27071 #: ../src/guestfs-actions.pod:2327
27072 msgid "guestfs_getcon"
27076 #: ../src/guestfs-actions.pod:2329
27080 " guestfs_getcon (guestfs_h *g);\n"
27085 #: ../src/guestfs-actions.pod:2334
27087 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
27091 #: ../src/guestfs-actions.pod:2342
27092 msgid "guestfs_getxattr"
27096 #: ../src/guestfs-actions.pod:2344
27100 " guestfs_getxattr (guestfs_h *g,\n"
27101 " const char *path,\n"
27102 " const char *name,\n"
27103 " size_t *size_r);\n"
27108 #: ../src/guestfs-actions.pod:2350
27110 "Get a single extended attribute from file C<path> named C<name>. This call "
27111 "follows symlinks. If you want to lookup an extended attribute for the "
27112 "symlink itself, use C<guestfs_lgetxattr>."
27116 #: ../src/guestfs-actions.pod:2354 ../src/guestfs-actions.pod:3849
27118 "Normally it is better to get all extended attributes from a file in one go "
27119 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
27120 "implementations are buggy and do not provide a way to list out attributes. "
27121 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27122 "extended attributes you want in advance and call this function."
27126 #: ../src/guestfs-actions.pod:2364
27127 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27131 #: ../src/guestfs-actions.pod:2366 ../src/guestfs-actions.pod:2579
27132 #: ../src/guestfs-actions.pod:3061 ../src/guestfs-actions.pod:3861
27133 #: ../src/guestfs-actions.pod:5772 ../src/guestfs-actions.pod:5798
27134 #: ../src/guestfs-actions.pod:5979
27136 "This function returns a buffer, or NULL on error. The size of the returned "
27137 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27142 #: ../src/guestfs-actions.pod:2370 ../src/guestfs-actions.pod:3865
27143 msgid "(Added in 1.7.24)"
27147 #: ../src/guestfs-actions.pod:2372
27148 msgid "guestfs_getxattrs"
27152 #: ../src/guestfs-actions.pod:2374
27155 " struct guestfs_xattr_list *\n"
27156 " guestfs_getxattrs (guestfs_h *g,\n"
27157 " const char *path);\n"
27162 #: ../src/guestfs-actions.pod:2384
27163 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27167 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:3877
27168 #: ../src/guestfs-actions.pod:4565
27170 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27171 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27175 #: ../src/guestfs-actions.pod:2390 ../src/guestfs-actions.pod:3881
27176 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4116
27177 #: ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:6679
27178 #: ../src/guestfs-actions.pod:8074
27179 msgid "(Added in 1.0.59)"
27183 #: ../src/guestfs-actions.pod:2392
27184 msgid "guestfs_glob_expand"
27188 #: ../src/guestfs-actions.pod:2394
27192 " guestfs_glob_expand (guestfs_h *g,\n"
27193 " const char *pattern);\n"
27198 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:6872
27199 #: ../src/guestfs-actions.pod:6889
27200 msgid "(Added in 1.0.50)"
27204 #: ../src/guestfs-actions.pod:2415
27205 msgid "guestfs_grep"
27209 #: ../src/guestfs-actions.pod:2417
27213 " guestfs_grep (guestfs_h *g,\n"
27214 " const char *regex,\n"
27215 " const char *path);\n"
27220 #: ../src/guestfs-actions.pod:2434
27221 msgid "guestfs_grepi"
27225 #: ../src/guestfs-actions.pod:2436
27229 " guestfs_grepi (guestfs_h *g,\n"
27230 " const char *regex,\n"
27231 " const char *path);\n"
27236 #: ../src/guestfs-actions.pod:2453
27237 msgid "guestfs_grub_install"
27241 #: ../src/guestfs-actions.pod:2455
27245 " guestfs_grub_install (guestfs_h *g,\n"
27246 " const char *root,\n"
27247 " const char *device);\n"
27252 #: ../src/guestfs-actions.pod:2498
27253 msgid "(Added in 1.0.17)"
27257 #: ../src/guestfs-actions.pod:2500
27258 msgid "guestfs_head"
27262 #: ../src/guestfs-actions.pod:2502
27266 " guestfs_head (guestfs_h *g,\n"
27267 " const char *path);\n"
27272 #: ../src/guestfs-actions.pod:2518
27273 msgid "guestfs_head_n"
27277 #: ../src/guestfs-actions.pod:2520
27281 " guestfs_head_n (guestfs_h *g,\n"
27283 " const char *path);\n"
27288 #: ../src/guestfs-actions.pod:2542
27289 msgid "guestfs_hexdump"
27293 #: ../src/guestfs-actions.pod:2544
27297 " guestfs_hexdump (guestfs_h *g,\n"
27298 " const char *path);\n"
27303 #: ../src/guestfs-actions.pod:2557 ../src/guestfs-actions.pod:6953
27304 #: ../src/guestfs-actions.pod:7008
27305 msgid "(Added in 1.0.22)"
27309 #: ../src/guestfs-actions.pod:2559
27310 msgid "guestfs_initrd_cat"
27314 #: ../src/guestfs-actions.pod:2561
27318 " guestfs_initrd_cat (guestfs_h *g,\n"
27319 " const char *initrdpath,\n"
27320 " const char *filename,\n"
27321 " size_t *size_r);\n"
27326 #: ../src/guestfs-actions.pod:2577
27327 msgid "See also C<guestfs_initrd_list>."
27331 #: ../src/guestfs-actions.pod:2588
27332 msgid "guestfs_initrd_list"
27336 #: ../src/guestfs-actions.pod:2590
27340 " guestfs_initrd_list (guestfs_h *g,\n"
27341 " const char *path);\n"
27346 #: ../src/guestfs-actions.pod:2610
27347 msgid "guestfs_inotify_add_watch"
27351 #: ../src/guestfs-actions.pod:2612
27355 " guestfs_inotify_add_watch (guestfs_h *g,\n"
27356 " const char *path,\n"
27362 #: ../src/guestfs-actions.pod:2631
27363 msgid "guestfs_inotify_close"
27367 #: ../src/guestfs-actions.pod:2633
27371 " guestfs_inotify_close (guestfs_h *g);\n"
27376 #: ../src/guestfs-actions.pod:2644
27377 msgid "guestfs_inotify_files"
27381 #: ../src/guestfs-actions.pod:2646
27385 " guestfs_inotify_files (guestfs_h *g);\n"
27390 #: ../src/guestfs-actions.pod:2649
27392 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
27393 "returns a list of pathnames of objects that were touched. The returned "
27394 "pathnames are sorted and deduplicated."
27398 #: ../src/guestfs-actions.pod:2659
27399 msgid "guestfs_inotify_init"
27403 #: ../src/guestfs-actions.pod:2661
27407 " guestfs_inotify_init (guestfs_h *g,\n"
27408 " int maxevents);\n"
27413 #: ../src/guestfs-actions.pod:2669
27415 "C<maxevents> is the maximum number of events which will be queued up between "
27416 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
27417 "passed as C<0>, then the kernel (or previously set) default is used. For "
27418 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
27419 "throws away events, but records the fact that it threw them away by setting "
27420 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
27421 "C<guestfs_inotify_read>)."
27425 #: ../src/guestfs-actions.pod:2679
27427 "Before any events are generated, you have to add some watches to the "
27428 "internal watch list. See: C<guestfs_inotify_add_watch>, "
27429 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
27433 #: ../src/guestfs-actions.pod:2685
27435 "Queued up events should be read periodically by calling "
27436 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
27437 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
27438 "often enough then you risk the internal queue overflowing."
27442 #: ../src/guestfs-actions.pod:2692
27444 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
27445 "This also removes any watches automatically."
27449 #: ../src/guestfs-actions.pod:2705
27450 msgid "guestfs_inotify_read"
27454 #: ../src/guestfs-actions.pod:2707
27457 " struct guestfs_inotify_event_list *\n"
27458 " guestfs_inotify_read (guestfs_h *g);\n"
27463 #: ../src/guestfs-actions.pod:2721
27465 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
27466 "there was an error. I<The caller must call "
27467 "C<guestfs_free_inotify_event_list> after use>."
27471 #: ../src/guestfs-actions.pod:2727
27472 msgid "guestfs_inotify_rm_watch"
27476 #: ../src/guestfs-actions.pod:2729
27480 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
27486 #: ../src/guestfs-actions.pod:2733
27488 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
27492 #: ../src/guestfs-actions.pod:2740
27493 msgid "guestfs_inspect_get_arch"
27497 #: ../src/guestfs-actions.pod:2742
27501 " guestfs_inspect_get_arch (guestfs_h *g,\n"
27502 " const char *root);\n"
27507 #: ../src/guestfs-actions.pod:2746
27509 "This returns the architecture of the inspected operating system. The "
27510 "possible return values are listed under C<guestfs_file_architecture>."
27514 #: ../src/guestfs-actions.pod:2760
27515 msgid "guestfs_inspect_get_distro"
27519 #: ../src/guestfs-actions.pod:2762
27523 " guestfs_inspect_get_distro (guestfs_h *g,\n"
27524 " const char *root);\n"
27529 #: ../src/guestfs-actions.pod:2862
27530 msgid "guestfs_inspect_get_drive_mappings"
27534 #: ../src/guestfs-actions.pod:2864
27538 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
27539 " const char *root);\n"
27544 #: ../src/guestfs-actions.pod:2893
27546 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27547 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
27551 #: ../src/guestfs-actions.pod:2897 ../src/guestfs-actions.pod:3165
27552 #: ../src/guestfs-actions.pod:3968 ../src/guestfs-actions.pod:5240
27553 #: ../src/guestfs-actions.pod:7310
27555 "This function returns a NULL-terminated array of strings, or NULL if there "
27556 "was an error. The array of strings will always have length C<2n+1>, where "
27557 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
27558 "caller must free the strings and the array after use>."
27562 #: ../src/guestfs-actions.pod:2903 ../src/guestfs-actions.pod:3364
27563 msgid "(Added in 1.9.17)"
27567 #: ../src/guestfs-actions.pod:2905
27568 msgid "guestfs_inspect_get_filesystems"
27572 #: ../src/guestfs-actions.pod:2907
27576 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
27577 " const char *root);\n"
27582 #: ../src/guestfs-actions.pod:2919
27584 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27585 "C<guestfs_inspect_get_mountpoints>."
27589 #: ../src/guestfs-actions.pod:2928
27590 msgid "guestfs_inspect_get_format"
27594 #: ../src/guestfs-actions.pod:2930
27598 " guestfs_inspect_get_format (guestfs_h *g,\n"
27599 " const char *root);\n"
27604 #: ../src/guestfs-actions.pod:2964 ../src/guestfs-actions.pod:3400
27605 #: ../src/guestfs-actions.pod:3416 ../src/guestfs-actions.pod:3434
27606 #: ../src/guestfs-actions.pod:6190
27607 msgid "(Added in 1.9.4)"
27611 #: ../src/guestfs-actions.pod:2966
27612 msgid "guestfs_inspect_get_hostname"
27616 #: ../src/guestfs-actions.pod:2968
27620 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
27621 " const char *root);\n"
27626 #: ../src/guestfs-actions.pod:2983
27627 msgid "(Added in 1.7.9)"
27631 #: ../src/guestfs-actions.pod:2985
27632 msgid "guestfs_inspect_get_icon"
27636 #: ../src/guestfs-actions.pod:2987
27640 " guestfs_inspect_get_icon (guestfs_h *g,\n"
27641 " const char *root,\n"
27642 " size_t *size_r,\n"
27648 #: ../src/guestfs-actions.pod:2998
27651 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
27652 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
27657 #: ../src/guestfs-actions.pod:3065 ../src/guestfs-actions.pod:3895
27658 #: ../src/guestfs-actions.pod:5139
27659 msgid "(Added in 1.11.12)"
27663 #: ../src/guestfs-actions.pod:3067
27664 msgid "guestfs_inspect_get_icon_va"
27668 #: ../src/guestfs-actions.pod:3069
27672 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
27673 " const char *root,\n"
27674 " size_t *size_r,\n"
27675 " va_list args);\n"
27680 #: ../src/guestfs-actions.pod:3075
27681 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
27685 #: ../src/guestfs-actions.pod:3079
27686 msgid "guestfs_inspect_get_icon_argv"
27690 #: ../src/guestfs-actions.pod:3081
27694 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
27695 " const char *root,\n"
27696 " size_t *size_r,\n"
27697 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
27702 #: ../src/guestfs-actions.pod:3087
27703 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
27707 #: ../src/guestfs-actions.pod:3091
27708 msgid "guestfs_inspect_get_major_version"
27712 #: ../src/guestfs-actions.pod:3093
27716 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
27717 " const char *root);\n"
27722 #: ../src/guestfs-actions.pod:3115
27723 msgid "guestfs_inspect_get_minor_version"
27727 #: ../src/guestfs-actions.pod:3117
27731 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
27732 " const char *root);\n"
27737 #: ../src/guestfs-actions.pod:3126
27739 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27740 "C<guestfs_inspect_get_major_version>."
27744 #: ../src/guestfs-actions.pod:3133
27745 msgid "guestfs_inspect_get_mountpoints"
27749 #: ../src/guestfs-actions.pod:3135
27753 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
27754 " const char *root);\n"
27759 #: ../src/guestfs-actions.pod:3156
27761 "For operating systems like Windows which still use drive letters, this call "
27762 "will only return an entry for the first drive \"mounted on\" C</>. For "
27763 "information about the mapping of drive letters to partitions, see "
27764 "C<guestfs_inspect_get_drive_mappings>."
27768 #: ../src/guestfs-actions.pod:3162
27770 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27771 "C<guestfs_inspect_get_filesystems>."
27775 #: ../src/guestfs-actions.pod:3173
27776 msgid "guestfs_inspect_get_package_format"
27780 #: ../src/guestfs-actions.pod:3175
27784 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
27785 " const char *root);\n"
27790 #: ../src/guestfs-actions.pod:3179
27792 "This function and C<guestfs_inspect_get_package_management> return the "
27793 "package format and package management tool used by the inspected operating "
27794 "system. For example for Fedora these functions would return C<rpm> (package "
27795 "format) and C<yum> (package management)."
27799 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3226
27800 msgid "(Added in 1.7.5)"
27804 #: ../src/guestfs-actions.pod:3200
27805 msgid "guestfs_inspect_get_package_management"
27809 #: ../src/guestfs-actions.pod:3202
27813 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
27814 " const char *root);\n"
27819 #: ../src/guestfs-actions.pod:3206
27821 "C<guestfs_inspect_get_package_format> and this function return the package "
27822 "format and package management tool used by the inspected operating system. "
27823 "For example for Fedora these functions would return C<rpm> (package format) "
27824 "and C<yum> (package management)."
27828 #: ../src/guestfs-actions.pod:3228
27829 msgid "guestfs_inspect_get_product_name"
27833 #: ../src/guestfs-actions.pod:3230
27837 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
27838 " const char *root);\n"
27843 #: ../src/guestfs-actions.pod:3249
27844 msgid "guestfs_inspect_get_product_variant"
27848 #: ../src/guestfs-actions.pod:3251
27852 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
27853 " const char *root);\n"
27858 #: ../src/guestfs-actions.pod:3274
27860 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27861 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
27865 #: ../src/guestfs-actions.pod:3281
27866 msgid "(Added in 1.9.13)"
27870 #: ../src/guestfs-actions.pod:3283
27871 msgid "guestfs_inspect_get_roots"
27875 #: ../src/guestfs-actions.pod:3285
27879 " guestfs_inspect_get_roots (guestfs_h *g);\n"
27884 #: ../src/guestfs-actions.pod:3288
27886 "This function is a convenient way to get the list of root devices, as "
27887 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
27888 "the whole inspection process."
27892 #: ../src/guestfs-actions.pod:3292
27894 "This returns an empty list if either no root devices were found or the "
27895 "caller has not called C<guestfs_inspect_os>."
27899 #: ../src/guestfs-actions.pod:3301
27900 msgid "(Added in 1.7.3)"
27904 #: ../src/guestfs-actions.pod:3303
27905 msgid "guestfs_inspect_get_type"
27909 #: ../src/guestfs-actions.pod:3305
27913 " guestfs_inspect_get_type (guestfs_h *g,\n"
27914 " const char *root);\n"
27919 #: ../src/guestfs-actions.pod:3346
27920 msgid "guestfs_inspect_get_windows_current_control_set"
27924 #: ../src/guestfs-actions.pod:3348
27928 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
27929 " const char *root);\n"
27934 #: ../src/guestfs-actions.pod:3366
27935 msgid "guestfs_inspect_get_windows_systemroot"
27939 #: ../src/guestfs-actions.pod:3368
27943 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
27944 " const char *root);\n"
27949 #: ../src/guestfs-actions.pod:3384
27950 msgid "(Added in 1.5.25)"
27954 #: ../src/guestfs-actions.pod:3386
27955 msgid "guestfs_inspect_is_live"
27959 #: ../src/guestfs-actions.pod:3388
27963 " guestfs_inspect_is_live (guestfs_h *g,\n"
27964 " const char *root);\n"
27969 #: ../src/guestfs-actions.pod:3392
27971 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
27972 "disk), then this returns true if a live image was detected on the disk."
27976 #: ../src/guestfs-actions.pod:3402
27977 msgid "guestfs_inspect_is_multipart"
27981 #: ../src/guestfs-actions.pod:3404
27985 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
27986 " const char *root);\n"
27991 #: ../src/guestfs-actions.pod:3408
27993 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
27994 "disk), then this returns true if the disk is part of a set."
27998 #: ../src/guestfs-actions.pod:3418
27999 msgid "guestfs_inspect_is_netinst"
28003 #: ../src/guestfs-actions.pod:3420
28007 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
28008 " const char *root);\n"
28013 #: ../src/guestfs-actions.pod:3424
28015 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
28016 "disk), then this returns true if the disk is a network installer, ie. not a "
28017 "self-contained install CD but one which is likely to require network access "
28018 "to complete the install."
28022 #: ../src/guestfs-actions.pod:3436
28023 msgid "guestfs_inspect_list_applications"
28027 #: ../src/guestfs-actions.pod:3438
28030 " struct guestfs_application_list *\n"
28031 " guestfs_inspect_list_applications (guestfs_h *g,\n"
28032 " const char *root);\n"
28037 #: ../src/guestfs-actions.pod:3444
28039 "I<Note:> This call works differently from other parts of the inspection "
28040 "API. You have to call C<guestfs_inspect_os>, then "
28041 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
28042 "this. Listing applications is a significantly more difficult operation "
28043 "which requires access to the full filesystem. Also note that unlike the "
28044 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
28045 "the libguestfs handle, this call actually reads parts of the mounted "
28046 "filesystems during the call."
28050 #: ../src/guestfs-actions.pod:3534
28052 "This function returns a C<struct guestfs_application_list *>, or NULL if "
28053 "there was an error. I<The caller must call C<guestfs_free_application_list> "
28058 #: ../src/guestfs-actions.pod:3538
28059 msgid "(Added in 1.7.8)"
28063 #: ../src/guestfs-actions.pod:3540
28064 msgid "guestfs_inspect_os"
28068 #: ../src/guestfs-actions.pod:3542
28072 " guestfs_inspect_os (guestfs_h *g);\n"
28077 #: ../src/guestfs-actions.pod:3558
28079 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
28080 "functions in order to query further information about each operating system, "
28081 "such as the name and version."
28085 #: ../src/guestfs-actions.pod:3563
28087 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
28088 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
28089 "the contents. This should be called with no disks currently mounted. The "
28090 "function may also use Augeas, so any existing Augeas handle will be closed."
28094 #: ../src/guestfs-actions.pod:3575 ../src/guestfs-actions.pod:3906
28095 #: ../src/guestfs-actions.pod:3988
28096 msgid "See also C<guestfs_list_filesystems>."
28100 #: ../src/guestfs-actions.pod:3583
28101 msgid "guestfs_is_blockdev"
28105 #: ../src/guestfs-actions.pod:3585
28109 " guestfs_is_blockdev (guestfs_h *g,\n"
28110 " const char *path);\n"
28115 #: ../src/guestfs-actions.pod:3592 ../src/guestfs-actions.pod:3621
28116 #: ../src/guestfs-actions.pod:3651 ../src/guestfs-actions.pod:3666
28117 #: ../src/guestfs-actions.pod:3682 ../src/guestfs-actions.pod:3738
28118 #: ../src/guestfs-actions.pod:3753
28119 msgid "See also C<guestfs_stat>."
28123 #: ../src/guestfs-actions.pod:3596 ../src/guestfs-actions.pod:3625
28124 #: ../src/guestfs-actions.pod:3670 ../src/guestfs-actions.pod:3742
28125 #: ../src/guestfs-actions.pod:3757
28126 msgid "(Added in 1.5.10)"
28130 #: ../src/guestfs-actions.pod:3598
28131 msgid "guestfs_is_busy"
28135 #: ../src/guestfs-actions.pod:3600
28139 " guestfs_is_busy (guestfs_h *g);\n"
28144 #: ../src/guestfs-actions.pod:3612
28145 msgid "guestfs_is_chardev"
28149 #: ../src/guestfs-actions.pod:3614
28153 " guestfs_is_chardev (guestfs_h *g,\n"
28154 " const char *path);\n"
28159 #: ../src/guestfs-actions.pod:3627
28160 msgid "guestfs_is_config"
28164 #: ../src/guestfs-actions.pod:3629
28168 " guestfs_is_config (guestfs_h *g);\n"
28173 #: ../src/guestfs-actions.pod:3641
28174 msgid "guestfs_is_dir"
28178 #: ../src/guestfs-actions.pod:3643
28182 " guestfs_is_dir (guestfs_h *g,\n"
28183 " const char *path);\n"
28188 #: ../src/guestfs-actions.pod:3657
28189 msgid "guestfs_is_fifo"
28193 #: ../src/guestfs-actions.pod:3659
28197 " guestfs_is_fifo (guestfs_h *g,\n"
28198 " const char *path);\n"
28203 #: ../src/guestfs-actions.pod:3672
28204 msgid "guestfs_is_file"
28208 #: ../src/guestfs-actions.pod:3674
28212 " guestfs_is_file (guestfs_h *g,\n"
28213 " const char *path);\n"
28218 #: ../src/guestfs-actions.pod:3688
28219 msgid "guestfs_is_launching"
28223 #: ../src/guestfs-actions.pod:3690
28227 " guestfs_is_launching (guestfs_h *g);\n"
28232 #: ../src/guestfs-actions.pod:3702
28233 msgid "guestfs_is_lv"
28237 #: ../src/guestfs-actions.pod:3704
28241 " guestfs_is_lv (guestfs_h *g,\n"
28242 " const char *device);\n"
28247 #: ../src/guestfs-actions.pod:3715
28248 msgid "guestfs_is_ready"
28252 #: ../src/guestfs-actions.pod:3717
28256 " guestfs_is_ready (guestfs_h *g);\n"
28261 #: ../src/guestfs-actions.pod:3729
28262 msgid "guestfs_is_socket"
28266 #: ../src/guestfs-actions.pod:3731
28270 " guestfs_is_socket (guestfs_h *g,\n"
28271 " const char *path);\n"
28276 #: ../src/guestfs-actions.pod:3744
28277 msgid "guestfs_is_symlink"
28281 #: ../src/guestfs-actions.pod:3746
28285 " guestfs_is_symlink (guestfs_h *g,\n"
28286 " const char *path);\n"
28291 #: ../src/guestfs-actions.pod:3759
28292 msgid "guestfs_is_zero"
28296 #: ../src/guestfs-actions.pod:3761
28300 " guestfs_is_zero (guestfs_h *g,\n"
28301 " const char *path);\n"
28306 #: ../src/guestfs-actions.pod:3770 ../src/guestfs-actions.pod:3784
28307 msgid "(Added in 1.11.8)"
28311 #: ../src/guestfs-actions.pod:3772
28312 msgid "guestfs_is_zero_device"
28316 #: ../src/guestfs-actions.pod:3774
28320 " guestfs_is_zero_device (guestfs_h *g,\n"
28321 " const char *device);\n"
28326 #: ../src/guestfs-actions.pod:3786
28327 msgid "guestfs_kill_subprocess"
28331 #: ../src/guestfs-actions.pod:3788
28335 " guestfs_kill_subprocess (guestfs_h *g);\n"
28340 #: ../src/guestfs-actions.pod:3797
28341 msgid "guestfs_launch"
28345 #: ../src/guestfs-actions.pod:3799
28349 " guestfs_launch (guestfs_h *g);\n"
28354 #: ../src/guestfs-actions.pod:3817
28355 msgid "guestfs_lchown"
28359 #: ../src/guestfs-actions.pod:3819
28363 " guestfs_lchown (guestfs_h *g,\n"
28366 " const char *path);\n"
28371 #: ../src/guestfs-actions.pod:3825
28373 "Change the file owner to C<owner> and group to C<group>. This is like "
28374 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
28375 "changed, not the target."
28379 #: ../src/guestfs-actions.pod:3837
28380 msgid "guestfs_lgetxattr"
28384 #: ../src/guestfs-actions.pod:3839
28388 " guestfs_lgetxattr (guestfs_h *g,\n"
28389 " const char *path,\n"
28390 " const char *name,\n"
28391 " size_t *size_r);\n"
28396 #: ../src/guestfs-actions.pod:3859
28397 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
28401 #: ../src/guestfs-actions.pod:3867
28402 msgid "guestfs_lgetxattrs"
28406 #: ../src/guestfs-actions.pod:3869
28409 " struct guestfs_xattr_list *\n"
28410 " guestfs_lgetxattrs (guestfs_h *g,\n"
28411 " const char *path);\n"
28416 #: ../src/guestfs-actions.pod:3873
28418 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
28419 "then it returns the extended attributes of the link itself."
28423 #: ../src/guestfs-actions.pod:3883
28424 msgid "guestfs_list_9p"
28428 #: ../src/guestfs-actions.pod:3885
28432 " guestfs_list_9p (guestfs_h *g);\n"
28437 #: ../src/guestfs-actions.pod:3897
28438 msgid "guestfs_list_devices"
28442 #: ../src/guestfs-actions.pod:3899
28446 " guestfs_list_devices (guestfs_h *g);\n"
28451 #: ../src/guestfs-actions.pod:3914
28452 msgid "guestfs_list_dm_devices"
28456 #: ../src/guestfs-actions.pod:3916
28460 " guestfs_list_dm_devices (guestfs_h *g);\n"
28465 #: ../src/guestfs-actions.pod:3921
28467 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28468 "previous call to C<guestfs_luks_open>."
28472 #: ../src/guestfs-actions.pod:3924
28474 "Device mapper devices which correspond to logical volumes are I<not> "
28475 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
28480 #: ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:5378
28481 msgid "(Added in 1.11.15)"
28485 #: ../src/guestfs-actions.pod:3934
28486 msgid "guestfs_list_filesystems"
28490 #: ../src/guestfs-actions.pod:3936
28494 " guestfs_list_filesystems (guestfs_h *g);\n"
28499 #: ../src/guestfs-actions.pod:3956
28501 "This command runs other libguestfs commands, which might include "
28502 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
28503 "soon after launch and only when nothing is mounted."
28507 #: ../src/guestfs-actions.pod:3960
28509 "Not all of the filesystems returned will be mountable. In particular, swap "
28510 "partitions are returned in the list. Also this command does not check that "
28511 "each filesystem found is valid and mountable, and some filesystems might be "
28512 "mountable but require special options. Filesystems may not all belong to a "
28513 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
28517 #: ../src/guestfs-actions.pod:3974 ../src/guestfs-actions.pod:5739
28518 msgid "(Added in 1.5.15)"
28522 #: ../src/guestfs-actions.pod:3976
28523 msgid "guestfs_list_partitions"
28527 #: ../src/guestfs-actions.pod:3978
28531 " guestfs_list_partitions (guestfs_h *g);\n"
28536 #: ../src/guestfs-actions.pod:3985
28538 "This does not return logical volumes. For that you will need to call "
28543 #: ../src/guestfs-actions.pod:3996
28548 #: ../src/guestfs-actions.pod:3998
28552 " guestfs_ll (guestfs_h *g,\n"
28553 " const char *directory);\n"
28558 #: ../src/guestfs-actions.pod:4013
28563 #: ../src/guestfs-actions.pod:4015
28567 " guestfs_ln (guestfs_h *g,\n"
28568 " const char *target,\n"
28569 " const char *linkname);\n"
28574 #: ../src/guestfs-actions.pod:4026
28575 msgid "guestfs_ln_f"
28579 #: ../src/guestfs-actions.pod:4028
28583 " guestfs_ln_f (guestfs_h *g,\n"
28584 " const char *target,\n"
28585 " const char *linkname);\n"
28590 #: ../src/guestfs-actions.pod:4040
28591 msgid "guestfs_ln_s"
28595 #: ../src/guestfs-actions.pod:4042
28599 " guestfs_ln_s (guestfs_h *g,\n"
28600 " const char *target,\n"
28601 " const char *linkname);\n"
28606 #: ../src/guestfs-actions.pod:4053
28607 msgid "guestfs_ln_sf"
28611 #: ../src/guestfs-actions.pod:4055
28615 " guestfs_ln_sf (guestfs_h *g,\n"
28616 " const char *target,\n"
28617 " const char *linkname);\n"
28622 #: ../src/guestfs-actions.pod:4067
28623 msgid "guestfs_lremovexattr"
28627 #: ../src/guestfs-actions.pod:4069
28631 " guestfs_lremovexattr (guestfs_h *g,\n"
28632 " const char *xattr,\n"
28633 " const char *path);\n"
28638 #: ../src/guestfs-actions.pod:4074
28640 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
28641 "link, then it removes an extended attribute of the link itself."
28645 #: ../src/guestfs-actions.pod:4082
28650 #: ../src/guestfs-actions.pod:4084
28654 " guestfs_ls (guestfs_h *g,\n"
28655 " const char *directory);\n"
28660 #: ../src/guestfs-actions.pod:4092
28662 "This command is mostly useful for interactive sessions. Programs should "
28663 "probably use C<guestfs_readdir> instead."
28667 #: ../src/guestfs-actions.pod:4101
28668 msgid "guestfs_lsetxattr"
28672 #: ../src/guestfs-actions.pod:4103
28676 " guestfs_lsetxattr (guestfs_h *g,\n"
28677 " const char *xattr,\n"
28678 " const char *val,\n"
28680 " const char *path);\n"
28685 #: ../src/guestfs-actions.pod:4110
28687 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
28688 "then it sets an extended attribute of the link itself."
28692 #: ../src/guestfs-actions.pod:4118
28693 msgid "guestfs_lstat"
28697 #: ../src/guestfs-actions.pod:4120
28700 " struct guestfs_stat *\n"
28701 " guestfs_lstat (guestfs_h *g,\n"
28702 " const char *path);\n"
28707 #: ../src/guestfs-actions.pod:4126
28709 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
28710 "link, then the link is stat-ed, not the file it refers to."
28714 #: ../src/guestfs-actions.pod:4132 ../src/guestfs-actions.pod:6913
28716 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
28717 "error. I<The caller must call C<guestfs_free_stat> after use>."
28721 #: ../src/guestfs-actions.pod:4136 ../src/guestfs-actions.pod:6917
28722 #: ../src/guestfs-actions.pod:6935 ../src/guestfs-actions.pod:7316
28723 msgid "(Added in 0.9.2)"
28727 #: ../src/guestfs-actions.pod:4138
28728 msgid "guestfs_lstatlist"
28732 #: ../src/guestfs-actions.pod:4140
28735 " struct guestfs_stat_list *\n"
28736 " guestfs_lstatlist (guestfs_h *g,\n"
28737 " const char *path,\n"
28738 " char *const *names);\n"
28743 #: ../src/guestfs-actions.pod:4145
28745 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
28746 "files, where all files are in the directory C<path>. C<names> is the list "
28747 "of files from this directory."
28751 #: ../src/guestfs-actions.pod:4154
28753 "This call is intended for programs that want to efficiently list a directory "
28754 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
28755 "for a similarly efficient call for getting extended attributes. Very long "
28756 "directory listings might cause the protocol message size to be exceeded, "
28757 "causing this call to fail. The caller must split up such requests into "
28758 "smaller groups of names."
28762 #: ../src/guestfs-actions.pod:4162
28764 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
28765 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
28769 #: ../src/guestfs-actions.pod:4168
28770 msgid "guestfs_luks_add_key"
28774 #: ../src/guestfs-actions.pod:4170
28778 " guestfs_luks_add_key (guestfs_h *g,\n"
28779 " const char *device,\n"
28780 " const char *key,\n"
28781 " const char *newkey,\n"
28787 #: ../src/guestfs-actions.pod:4182
28789 "Note that if C<keyslot> already contains a key, then this command will "
28790 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
28794 #: ../src/guestfs-actions.pod:4188 ../src/guestfs-actions.pod:4228
28795 #: ../src/guestfs-actions.pod:4251 ../src/guestfs-actions.pod:4271
28796 #: ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4325
28798 "This function takes a key or passphrase parameter which could contain "
28799 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
28804 #: ../src/guestfs-actions.pod:4192 ../src/guestfs-actions.pod:4232
28805 #: ../src/guestfs-actions.pod:4255 ../src/guestfs-actions.pod:4275
28806 msgid "(Added in 1.5.2)"
28810 #: ../src/guestfs-actions.pod:4194
28811 msgid "guestfs_luks_close"
28815 #: ../src/guestfs-actions.pod:4196
28819 " guestfs_luks_close (guestfs_h *g,\n"
28820 " const char *device);\n"
28825 #: ../src/guestfs-actions.pod:4200
28827 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
28828 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
28829 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
28830 "underlying block device."
28834 #: ../src/guestfs-actions.pod:4208 ../src/guestfs-actions.pod:4310
28835 #: ../src/guestfs-actions.pod:4329 ../src/guestfs-actions.pod:4379
28836 #: ../src/guestfs-actions.pod:4427
28837 msgid "(Added in 1.5.1)"
28841 #: ../src/guestfs-actions.pod:4210
28842 msgid "guestfs_luks_format"
28846 #: ../src/guestfs-actions.pod:4212
28850 " guestfs_luks_format (guestfs_h *g,\n"
28851 " const char *device,\n"
28852 " const char *key,\n"
28858 #: ../src/guestfs-actions.pod:4234
28859 msgid "guestfs_luks_format_cipher"
28863 #: ../src/guestfs-actions.pod:4236
28867 " guestfs_luks_format_cipher (guestfs_h *g,\n"
28868 " const char *device,\n"
28869 " const char *key,\n"
28871 " const char *cipher);\n"
28876 #: ../src/guestfs-actions.pod:4243
28878 "This command is the same as C<guestfs_luks_format> but it also allows you to "
28879 "set the C<cipher> used."
28883 #: ../src/guestfs-actions.pod:4257
28884 msgid "guestfs_luks_kill_slot"
28888 #: ../src/guestfs-actions.pod:4259
28892 " guestfs_luks_kill_slot (guestfs_h *g,\n"
28893 " const char *device,\n"
28894 " const char *key,\n"
28900 #: ../src/guestfs-actions.pod:4277
28901 msgid "guestfs_luks_open"
28905 #: ../src/guestfs-actions.pod:4279
28909 " guestfs_luks_open (guestfs_h *g,\n"
28910 " const char *device,\n"
28911 " const char *key,\n"
28912 " const char *mapname);\n"
28917 #: ../src/guestfs-actions.pod:4297
28919 "If this block device contains LVM volume groups, then calling "
28920 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
28925 #: ../src/guestfs-actions.pod:4301
28926 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
28930 #: ../src/guestfs-actions.pod:4312
28931 msgid "guestfs_luks_open_ro"
28935 #: ../src/guestfs-actions.pod:4314
28939 " guestfs_luks_open_ro (guestfs_h *g,\n"
28940 " const char *device,\n"
28941 " const char *key,\n"
28942 " const char *mapname);\n"
28947 #: ../src/guestfs-actions.pod:4320
28949 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
28954 #: ../src/guestfs-actions.pod:4331
28955 msgid "guestfs_lvcreate"
28959 #: ../src/guestfs-actions.pod:4333
28963 " guestfs_lvcreate (guestfs_h *g,\n"
28964 " const char *logvol,\n"
28965 " const char *volgroup,\n"
28971 #: ../src/guestfs-actions.pod:4346
28972 msgid "guestfs_lvm_canonical_lv_name"
28976 #: ../src/guestfs-actions.pod:4348
28980 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
28981 " const char *lvname);\n"
28986 #: ../src/guestfs-actions.pod:4359
28987 msgid "See also C<guestfs_is_lv>."
28991 #: ../src/guestfs-actions.pod:4364
28992 msgid "(Added in 1.5.24)"
28996 #: ../src/guestfs-actions.pod:4366
28997 msgid "guestfs_lvm_clear_filter"
29001 #: ../src/guestfs-actions.pod:4368
29005 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
29010 #: ../src/guestfs-actions.pod:4371
29012 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
29013 "see every block device."
29017 #: ../src/guestfs-actions.pod:4381
29018 msgid "guestfs_lvm_remove_all"
29022 #: ../src/guestfs-actions.pod:4383
29026 " guestfs_lvm_remove_all (guestfs_h *g);\n"
29031 #: ../src/guestfs-actions.pod:4396
29032 msgid "guestfs_lvm_set_filter"
29036 #: ../src/guestfs-actions.pod:4398
29040 " guestfs_lvm_set_filter (guestfs_h *g,\n"
29041 " char *const *devices);\n"
29046 #: ../src/guestfs-actions.pod:4429
29047 msgid "guestfs_lvremove"
29051 #: ../src/guestfs-actions.pod:4431
29055 " guestfs_lvremove (guestfs_h *g,\n"
29056 " const char *device);\n"
29061 #: ../src/guestfs-actions.pod:4443 ../src/guestfs-actions.pod:5836
29062 #: ../src/guestfs-actions.pod:7686
29063 msgid "(Added in 1.0.13)"
29067 #: ../src/guestfs-actions.pod:4445
29068 msgid "guestfs_lvrename"
29072 #: ../src/guestfs-actions.pod:4447
29076 " guestfs_lvrename (guestfs_h *g,\n"
29077 " const char *logvol,\n"
29078 " const char *newlogvol);\n"
29083 #: ../src/guestfs-actions.pod:4456 ../src/guestfs-actions.pod:7699
29084 msgid "(Added in 1.0.83)"
29088 #: ../src/guestfs-actions.pod:4458
29089 msgid "guestfs_lvresize"
29093 #: ../src/guestfs-actions.pod:4460
29097 " guestfs_lvresize (guestfs_h *g,\n"
29098 " const char *device,\n"
29104 #: ../src/guestfs-actions.pod:4473
29105 msgid "guestfs_lvresize_free"
29109 #: ../src/guestfs-actions.pod:4475
29113 " guestfs_lvresize_free (guestfs_h *g,\n"
29114 " const char *lv,\n"
29120 #: ../src/guestfs-actions.pod:4488
29121 msgid "(Added in 1.3.3)"
29125 #: ../src/guestfs-actions.pod:4490
29126 msgid "guestfs_lvs"
29130 #: ../src/guestfs-actions.pod:4492
29134 " guestfs_lvs (guestfs_h *g);\n"
29139 #: ../src/guestfs-actions.pod:4501
29140 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29144 #: ../src/guestfs-actions.pod:4509
29145 msgid "guestfs_lvs_full"
29149 #: ../src/guestfs-actions.pod:4511
29152 " struct guestfs_lvm_lv_list *\n"
29153 " guestfs_lvs_full (guestfs_h *g);\n"
29158 #: ../src/guestfs-actions.pod:4517
29160 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29161 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
29165 #: ../src/guestfs-actions.pod:4523
29166 msgid "guestfs_lvuuid"
29170 #: ../src/guestfs-actions.pod:4525
29174 " guestfs_lvuuid (guestfs_h *g,\n"
29175 " const char *device);\n"
29180 #: ../src/guestfs-actions.pod:4536
29181 msgid "guestfs_lxattrlist"
29185 #: ../src/guestfs-actions.pod:4538
29188 " struct guestfs_xattr_list *\n"
29189 " guestfs_lxattrlist (guestfs_h *g,\n"
29190 " const char *path,\n"
29191 " char *const *names);\n"
29196 #: ../src/guestfs-actions.pod:4557
29198 "This call is intended for programs that want to efficiently list a directory "
29199 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29200 "a similarly efficient call for getting standard stats. Very long directory "
29201 "listings might cause the protocol message size to be exceeded, causing this "
29202 "call to fail. The caller must split up such requests into smaller groups of "
29207 #: ../src/guestfs-actions.pod:4571
29208 msgid "guestfs_mkdir"
29212 #: ../src/guestfs-actions.pod:4573
29216 " guestfs_mkdir (guestfs_h *g,\n"
29217 " const char *path);\n"
29222 #: ../src/guestfs-actions.pod:4583
29223 msgid "guestfs_mkdir_mode"
29227 #: ../src/guestfs-actions.pod:4585
29231 " guestfs_mkdir_mode (guestfs_h *g,\n"
29232 " const char *path,\n"
29238 #: ../src/guestfs-actions.pod:4597
29239 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29243 #: ../src/guestfs-actions.pod:4603
29244 msgid "guestfs_mkdir_p"
29248 #: ../src/guestfs-actions.pod:4605
29252 " guestfs_mkdir_p (guestfs_h *g,\n"
29253 " const char *path);\n"
29258 #: ../src/guestfs-actions.pod:4616
29259 msgid "guestfs_mkdtemp"
29263 #: ../src/guestfs-actions.pod:4618
29267 " guestfs_mkdtemp (guestfs_h *g,\n"
29268 " const char *template);\n"
29273 #: ../src/guestfs-actions.pod:4646
29274 msgid "guestfs_mke2fs_J"
29278 #: ../src/guestfs-actions.pod:4648
29282 " guestfs_mke2fs_J (guestfs_h *g,\n"
29283 " const char *fstype,\n"
29284 " int blocksize,\n"
29285 " const char *device,\n"
29286 " const char *journal);\n"
29291 #: ../src/guestfs-actions.pod:4661
29292 msgid "See also C<guestfs_mke2journal>."
29296 #: ../src/guestfs-actions.pod:4665 ../src/guestfs-actions.pod:4683
29297 #: ../src/guestfs-actions.pod:4701 ../src/guestfs-actions.pod:4717
29298 #: ../src/guestfs-actions.pod:4731 ../src/guestfs-actions.pod:4745
29299 #: ../src/guestfs-actions.pod:4804 ../src/guestfs-actions.pod:5081
29300 msgid "(Added in 1.0.68)"
29304 #: ../src/guestfs-actions.pod:4667
29305 msgid "guestfs_mke2fs_JL"
29309 #: ../src/guestfs-actions.pod:4669
29313 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29314 " const char *fstype,\n"
29315 " int blocksize,\n"
29316 " const char *device,\n"
29317 " const char *label);\n"
29322 #: ../src/guestfs-actions.pod:4679
29323 msgid "See also C<guestfs_mke2journal_L>."
29327 #: ../src/guestfs-actions.pod:4685
29328 msgid "guestfs_mke2fs_JU"
29332 #: ../src/guestfs-actions.pod:4687
29336 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29337 " const char *fstype,\n"
29338 " int blocksize,\n"
29339 " const char *device,\n"
29340 " const char *uuid);\n"
29345 #: ../src/guestfs-actions.pod:4697
29346 msgid "See also C<guestfs_mke2journal_U>."
29350 #: ../src/guestfs-actions.pod:4703
29351 msgid "guestfs_mke2journal"
29355 #: ../src/guestfs-actions.pod:4705
29359 " guestfs_mke2journal (guestfs_h *g,\n"
29360 " int blocksize,\n"
29361 " const char *device);\n"
29366 #: ../src/guestfs-actions.pod:4719
29367 msgid "guestfs_mke2journal_L"
29371 #: ../src/guestfs-actions.pod:4721
29375 " guestfs_mke2journal_L (guestfs_h *g,\n"
29376 " int blocksize,\n"
29377 " const char *label,\n"
29378 " const char *device);\n"
29383 #: ../src/guestfs-actions.pod:4733
29384 msgid "guestfs_mke2journal_U"
29388 #: ../src/guestfs-actions.pod:4735
29392 " guestfs_mke2journal_U (guestfs_h *g,\n"
29393 " int blocksize,\n"
29394 " const char *uuid,\n"
29395 " const char *device);\n"
29400 #: ../src/guestfs-actions.pod:4747
29401 msgid "guestfs_mkfifo"
29405 #: ../src/guestfs-actions.pod:4749
29409 " guestfs_mkfifo (guestfs_h *g,\n"
29411 " const char *path);\n"
29416 #: ../src/guestfs-actions.pod:4754
29418 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
29419 "is just a convenient wrapper around C<guestfs_mknod>."
29423 #: ../src/guestfs-actions.pod:4764
29424 msgid "guestfs_mkfs"
29428 #: ../src/guestfs-actions.pod:4766
29432 " guestfs_mkfs (guestfs_h *g,\n"
29433 " const char *fstype,\n"
29434 " const char *device);\n"
29439 #: ../src/guestfs-actions.pod:4779
29440 msgid "guestfs_mkfs_b"
29444 #: ../src/guestfs-actions.pod:4781
29448 " guestfs_mkfs_b (guestfs_h *g,\n"
29449 " const char *fstype,\n"
29450 " int blocksize,\n"
29451 " const char *device);\n"
29456 #: ../src/guestfs-actions.pod:4787
29458 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
29463 #: ../src/guestfs-actions.pod:4794
29465 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
29466 "block size of the resulting filesystem. Supported block sizes depend on the "
29467 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29471 #: ../src/guestfs-actions.pod:4806
29472 msgid "guestfs_mkfs_opts"
29476 #: ../src/guestfs-actions.pod:4808
29480 " guestfs_mkfs_opts (guestfs_h *g,\n"
29481 " const char *fstype,\n"
29482 " const char *device,\n"
29488 #: ../src/guestfs-actions.pod:4819
29491 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
29492 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
29493 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
29494 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
29499 #: ../src/guestfs-actions.pod:4867
29500 msgid "(Added in 1.7.19)"
29504 #: ../src/guestfs-actions.pod:4869
29505 msgid "guestfs_mkfs_opts_va"
29509 #: ../src/guestfs-actions.pod:4871
29513 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
29514 " const char *fstype,\n"
29515 " const char *device,\n"
29516 " va_list args);\n"
29521 #: ../src/guestfs-actions.pod:4877
29522 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
29526 #: ../src/guestfs-actions.pod:4881
29527 msgid "guestfs_mkfs_opts_argv"
29531 #: ../src/guestfs-actions.pod:4883
29535 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
29536 " const char *fstype,\n"
29537 " const char *device,\n"
29538 " const struct guestfs_mkfs_opts_argv *optargs);\n"
29543 #: ../src/guestfs-actions.pod:4889
29544 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
29548 #: ../src/guestfs-actions.pod:4893
29549 msgid "guestfs_mkmountpoint"
29553 #: ../src/guestfs-actions.pod:4895
29557 " guestfs_mkmountpoint (guestfs_h *g,\n"
29558 " const char *exemptpath);\n"
29563 #: ../src/guestfs-actions.pod:4899
29565 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
29566 "that can be used to create extra mountpoints before mounting the first "
29571 #: ../src/guestfs-actions.pod:4923
29573 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
29574 "may get unexpected errors if you try to mix these calls. It is safest to "
29575 "manually unmount filesystems and remove mountpoints after use."
29579 #: ../src/guestfs-actions.pod:4927
29581 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
29582 "first, so for this to work for manual mountpoints, you must ensure that the "
29583 "innermost mountpoints have the longest pathnames, as in the example code "
29588 #: ../src/guestfs-actions.pod:4934
29590 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
29591 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
29592 "can also trigger these issues."
29596 #: ../src/guestfs-actions.pod:4940 ../src/guestfs-actions.pod:5246
29597 #: ../src/guestfs-actions.pod:6256
29598 msgid "(Added in 1.0.62)"
29602 #: ../src/guestfs-actions.pod:4942
29603 msgid "guestfs_mknod"
29607 #: ../src/guestfs-actions.pod:4944
29611 " guestfs_mknod (guestfs_h *g,\n"
29615 " const char *path);\n"
29620 #: ../src/guestfs-actions.pod:4959
29622 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
29623 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
29624 "regular file). These constants are available in the standard Linux header "
29625 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
29626 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
29627 "the appropriate constant for you."
29631 #: ../src/guestfs-actions.pod:4973
29632 msgid "guestfs_mknod_b"
29636 #: ../src/guestfs-actions.pod:4975
29640 " guestfs_mknod_b (guestfs_h *g,\n"
29644 " const char *path);\n"
29649 #: ../src/guestfs-actions.pod:4982
29651 "This call creates a block device node called C<path> with mode C<mode> and "
29652 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29653 "wrapper around C<guestfs_mknod>."
29657 #: ../src/guestfs-actions.pod:4992
29658 msgid "guestfs_mknod_c"
29662 #: ../src/guestfs-actions.pod:4994
29666 " guestfs_mknod_c (guestfs_h *g,\n"
29670 " const char *path);\n"
29675 #: ../src/guestfs-actions.pod:5001
29677 "This call creates a char device node called C<path> with mode C<mode> and "
29678 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29679 "wrapper around C<guestfs_mknod>."
29683 #: ../src/guestfs-actions.pod:5011
29684 msgid "guestfs_mkswap"
29688 #: ../src/guestfs-actions.pod:5013
29692 " guestfs_mkswap (guestfs_h *g,\n"
29693 " const char *device);\n"
29698 #: ../src/guestfs-actions.pod:5023
29699 msgid "guestfs_mkswap_L"
29703 #: ../src/guestfs-actions.pod:5025
29707 " guestfs_mkswap_L (guestfs_h *g,\n"
29708 " const char *label,\n"
29709 " const char *device);\n"
29714 #: ../src/guestfs-actions.pod:5040
29715 msgid "guestfs_mkswap_U"
29719 #: ../src/guestfs-actions.pod:5042
29723 " guestfs_mkswap_U (guestfs_h *g,\n"
29724 " const char *uuid,\n"
29725 " const char *device);\n"
29730 #: ../src/guestfs-actions.pod:5053
29731 msgid "guestfs_mkswap_file"
29735 #: ../src/guestfs-actions.pod:5055
29739 " guestfs_mkswap_file (guestfs_h *g,\n"
29740 " const char *path);\n"
29745 #: ../src/guestfs-actions.pod:5061
29747 "This command just writes a swap file signature to an existing file. To "
29748 "create the file itself, use something like C<guestfs_fallocate>."
29752 #: ../src/guestfs-actions.pod:5068
29753 msgid "guestfs_modprobe"
29757 #: ../src/guestfs-actions.pod:5070
29761 " guestfs_modprobe (guestfs_h *g,\n"
29762 " const char *modulename);\n"
29767 #: ../src/guestfs-actions.pod:5083
29768 msgid "guestfs_mount"
29772 #: ../src/guestfs-actions.pod:5085
29776 " guestfs_mount (guestfs_h *g,\n"
29777 " const char *device,\n"
29778 " const char *mountpoint);\n"
29783 #: ../src/guestfs-actions.pod:5104
29785 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
29786 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
29787 "problems for users. If your program might need to work with older versions "
29788 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
29789 "for the first parameter if you don't want any options)."
29793 #: ../src/guestfs-actions.pod:5115
29794 msgid "guestfs_mount_9p"
29798 #: ../src/guestfs-actions.pod:5117
29802 " guestfs_mount_9p (guestfs_h *g,\n"
29803 " const char *mounttag,\n"
29804 " const char *mountpoint,\n"
29810 #: ../src/guestfs-actions.pod:5128
29813 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
29818 #: ../src/guestfs-actions.pod:5141
29819 msgid "guestfs_mount_9p_va"
29823 #: ../src/guestfs-actions.pod:5143
29827 " guestfs_mount_9p_va (guestfs_h *g,\n"
29828 " const char *mounttag,\n"
29829 " const char *mountpoint,\n"
29830 " va_list args);\n"
29835 #: ../src/guestfs-actions.pod:5149
29836 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
29840 #: ../src/guestfs-actions.pod:5153
29841 msgid "guestfs_mount_9p_argv"
29845 #: ../src/guestfs-actions.pod:5155
29849 " guestfs_mount_9p_argv (guestfs_h *g,\n"
29850 " const char *mounttag,\n"
29851 " const char *mountpoint,\n"
29852 " const struct guestfs_mount_9p_argv *optargs);\n"
29857 #: ../src/guestfs-actions.pod:5161
29858 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
29862 #: ../src/guestfs-actions.pod:5165
29863 msgid "guestfs_mount_loop"
29867 #: ../src/guestfs-actions.pod:5167
29871 " guestfs_mount_loop (guestfs_h *g,\n"
29872 " const char *file,\n"
29873 " const char *mountpoint);\n"
29878 #: ../src/guestfs-actions.pod:5180
29879 msgid "guestfs_mount_options"
29883 #: ../src/guestfs-actions.pod:5182
29887 " guestfs_mount_options (guestfs_h *g,\n"
29888 " const char *options,\n"
29889 " const char *device,\n"
29890 " const char *mountpoint);\n"
29895 #: ../src/guestfs-actions.pod:5188
29897 "This is the same as the C<guestfs_mount> command, but it allows you to set "
29898 "the mount options as for the L<mount(8)> I<-o> flag."
29902 #: ../src/guestfs-actions.pod:5198 ../src/guestfs-actions.pod:5212
29903 #: ../src/guestfs-actions.pod:5229
29904 msgid "(Added in 1.0.10)"
29908 #: ../src/guestfs-actions.pod:5200
29909 msgid "guestfs_mount_ro"
29913 #: ../src/guestfs-actions.pod:5202
29917 " guestfs_mount_ro (guestfs_h *g,\n"
29918 " const char *device,\n"
29919 " const char *mountpoint);\n"
29924 #: ../src/guestfs-actions.pod:5207
29926 "This is the same as the C<guestfs_mount> command, but it mounts the "
29927 "filesystem with the read-only (I<-o ro>) flag."
29931 #: ../src/guestfs-actions.pod:5214
29932 msgid "guestfs_mount_vfs"
29936 #: ../src/guestfs-actions.pod:5216
29940 " guestfs_mount_vfs (guestfs_h *g,\n"
29941 " const char *options,\n"
29942 " const char *vfstype,\n"
29943 " const char *device,\n"
29944 " const char *mountpoint);\n"
29949 #: ../src/guestfs-actions.pod:5223
29951 "This is the same as the C<guestfs_mount> command, but it allows you to set "
29952 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
29957 #: ../src/guestfs-actions.pod:5231
29958 msgid "guestfs_mountpoints"
29962 #: ../src/guestfs-actions.pod:5233
29966 " guestfs_mountpoints (guestfs_h *g);\n"
29971 #: ../src/guestfs-actions.pod:5236
29973 "This call is similar to C<guestfs_mounts>. That call returns a list of "
29974 "devices. This one returns a hash table (map) of device name to directory "
29975 "where the device is mounted."
29979 #: ../src/guestfs-actions.pod:5248
29980 msgid "guestfs_mounts"
29984 #: ../src/guestfs-actions.pod:5250
29988 " guestfs_mounts (guestfs_h *g);\n"
29993 #: ../src/guestfs-actions.pod:5258
29994 msgid "See also: C<guestfs_mountpoints>"
29998 #: ../src/guestfs-actions.pod:5266
30003 #: ../src/guestfs-actions.pod:5268
30007 " guestfs_mv (guestfs_h *g,\n"
30008 " const char *src,\n"
30009 " const char *dest);\n"
30014 #: ../src/guestfs-actions.pod:5280
30015 msgid "guestfs_ntfs_3g_probe"
30019 #: ../src/guestfs-actions.pod:5282
30023 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
30025 " const char *device);\n"
30030 #: ../src/guestfs-actions.pod:5301
30031 msgid "(Added in 1.0.43)"
30035 #: ../src/guestfs-actions.pod:5303
30036 msgid "guestfs_ntfsresize"
30040 #: ../src/guestfs-actions.pod:5305
30044 " guestfs_ntfsresize (guestfs_h *g,\n"
30045 " const char *device);\n"
30050 #: ../src/guestfs-actions.pod:5309 ../src/guestfs-actions.pod:5409
30052 "I<This function is deprecated.> In new code, use the L</"
30053 "guestfs_ntfsresize_opts> call instead."
30057 #: ../src/guestfs-actions.pod:5333
30058 msgid "guestfs_ntfsresize_opts"
30062 #: ../src/guestfs-actions.pod:5335
30066 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
30067 " const char *device,\n"
30073 #: ../src/guestfs-actions.pod:5345
30076 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
30077 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
30082 #: ../src/guestfs-actions.pod:5365
30084 "After the resize operation, the filesystem is always marked as requiring a "
30085 "consistency check (for safety). You have to boot into Windows to perform "
30086 "this check and clear this condition. If you I<don't> set the C<force> "
30087 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
30088 "times on a single filesystem without booting into Windows between each "
30093 #: ../src/guestfs-actions.pod:5380
30094 msgid "guestfs_ntfsresize_opts_va"
30098 #: ../src/guestfs-actions.pod:5382
30102 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
30103 " const char *device,\n"
30104 " va_list args);\n"
30109 #: ../src/guestfs-actions.pod:5387
30110 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
30114 #: ../src/guestfs-actions.pod:5391
30115 msgid "guestfs_ntfsresize_opts_argv"
30119 #: ../src/guestfs-actions.pod:5393
30123 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30124 " const char *device,\n"
30125 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
30130 #: ../src/guestfs-actions.pod:5398
30131 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30135 #: ../src/guestfs-actions.pod:5402
30136 msgid "guestfs_ntfsresize_size"
30140 #: ../src/guestfs-actions.pod:5404
30144 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30145 " const char *device,\n"
30146 " int64_t size);\n"
30151 #: ../src/guestfs-actions.pod:5416
30153 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30154 "to specify the new size (in bytes) explicitly."
30158 #: ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5863
30159 #: ../src/guestfs-actions.pod:5936 ../src/guestfs-actions.pod:6204
30160 #: ../src/guestfs-actions.pod:7843
30161 msgid "(Added in 1.3.14)"
30165 #: ../src/guestfs-actions.pod:5423
30166 msgid "guestfs_part_add"
30170 #: ../src/guestfs-actions.pod:5425
30174 " guestfs_part_add (guestfs_h *g,\n"
30175 " const char *device,\n"
30176 " const char *prlogex,\n"
30177 " int64_t startsect,\n"
30178 " int64_t endsect);\n"
30183 #: ../src/guestfs-actions.pod:5432
30185 "This command adds a partition to C<device>. If there is no partition table "
30186 "on the device, call C<guestfs_part_init> first."
30190 #: ../src/guestfs-actions.pod:5444
30192 "Creating a partition which covers the whole disk is not so easy. Use "
30193 "C<guestfs_part_disk> to do that."
30197 #: ../src/guestfs-actions.pod:5449 ../src/guestfs-actions.pod:5487
30198 #: ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5624
30199 #: ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5681
30200 #: ../src/guestfs-actions.pod:5721
30201 msgid "(Added in 1.0.78)"
30205 #: ../src/guestfs-actions.pod:5451
30206 msgid "guestfs_part_del"
30210 #: ../src/guestfs-actions.pod:5453
30214 " guestfs_part_del (guestfs_h *g,\n"
30215 " const char *device,\n"
30221 #: ../src/guestfs-actions.pod:5468
30222 msgid "guestfs_part_disk"
30226 #: ../src/guestfs-actions.pod:5470
30230 " guestfs_part_disk (guestfs_h *g,\n"
30231 " const char *device,\n"
30232 " const char *parttype);\n"
30237 #: ../src/guestfs-actions.pod:5475
30239 "This command is simply a combination of C<guestfs_part_init> followed by "
30240 "C<guestfs_part_add> to create a single primary partition covering the whole "
30245 #: ../src/guestfs-actions.pod:5479
30247 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30248 "possible values are described in C<guestfs_part_init>."
30252 #: ../src/guestfs-actions.pod:5489
30253 msgid "guestfs_part_get_bootable"
30257 #: ../src/guestfs-actions.pod:5491
30261 " guestfs_part_get_bootable (guestfs_h *g,\n"
30262 " const char *device,\n"
30268 #: ../src/guestfs-actions.pod:5499
30269 msgid "See also C<guestfs_part_set_bootable>."
30273 #: ../src/guestfs-actions.pod:5505
30274 msgid "guestfs_part_get_mbr_id"
30278 #: ../src/guestfs-actions.pod:5507
30282 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30283 " const char *device,\n"
30289 #: ../src/guestfs-actions.pod:5515 ../src/guestfs-actions.pod:5697
30291 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30292 "undefined results for other partition table types (see "
30293 "C<guestfs_part_get_parttype>)."
30297 #: ../src/guestfs-actions.pod:5523
30298 msgid "guestfs_part_get_parttype"
30302 #: ../src/guestfs-actions.pod:5525
30306 " guestfs_part_get_parttype (guestfs_h *g,\n"
30307 " const char *device);\n"
30312 #: ../src/guestfs-actions.pod:5532
30314 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30315 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30316 "possible, although unusual. See C<guestfs_part_init> for a full list."
30320 #: ../src/guestfs-actions.pod:5542
30321 msgid "guestfs_part_init"
30325 #: ../src/guestfs-actions.pod:5544
30329 " guestfs_part_init (guestfs_h *g,\n"
30330 " const char *device,\n"
30331 " const char *parttype);\n"
30336 #: ../src/guestfs-actions.pod:5553
30338 "Initially there are no partitions. Following this, you should call "
30339 "C<guestfs_part_add> for each partition required."
30343 #: ../src/guestfs-actions.pod:5626
30344 msgid "guestfs_part_list"
30348 #: ../src/guestfs-actions.pod:5628
30351 " struct guestfs_partition_list *\n"
30352 " guestfs_part_list (guestfs_h *g,\n"
30353 " const char *device);\n"
30358 #: ../src/guestfs-actions.pod:5645
30360 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30361 "the device's sector size, see C<guestfs_blockdev_getss>."
30365 #: ../src/guestfs-actions.pod:5658
30367 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
30368 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
30373 #: ../src/guestfs-actions.pod:5664
30374 msgid "guestfs_part_set_bootable"
30378 #: ../src/guestfs-actions.pod:5666
30382 " guestfs_part_set_bootable (guestfs_h *g,\n"
30383 " const char *device,\n"
30385 " int bootable);\n"
30390 #: ../src/guestfs-actions.pod:5683
30391 msgid "guestfs_part_set_mbr_id"
30395 #: ../src/guestfs-actions.pod:5685
30399 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
30400 " const char *device,\n"
30407 #: ../src/guestfs-actions.pod:5705
30408 msgid "guestfs_part_set_name"
30412 #: ../src/guestfs-actions.pod:5707
30416 " guestfs_part_set_name (guestfs_h *g,\n"
30417 " const char *device,\n"
30419 " const char *name);\n"
30424 #: ../src/guestfs-actions.pod:5723
30425 msgid "guestfs_part_to_dev"
30429 #: ../src/guestfs-actions.pod:5725
30433 " guestfs_part_to_dev (guestfs_h *g,\n"
30434 " const char *partition);\n"
30439 #: ../src/guestfs-actions.pod:5733
30441 "The named partition must exist, for example as a string returned from "
30442 "C<guestfs_list_partitions>."
30446 #: ../src/guestfs-actions.pod:5741
30447 msgid "guestfs_ping_daemon"
30451 #: ../src/guestfs-actions.pod:5743
30455 " guestfs_ping_daemon (guestfs_h *g);\n"
30460 #: ../src/guestfs-actions.pod:5755
30461 msgid "guestfs_pread"
30465 #: ../src/guestfs-actions.pod:5757
30469 " guestfs_pread (guestfs_h *g,\n"
30470 " const char *path,\n"
30472 " int64_t offset,\n"
30473 " size_t *size_r);\n"
30478 #: ../src/guestfs-actions.pod:5770
30479 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
30483 #: ../src/guestfs-actions.pod:5781
30484 msgid "guestfs_pread_device"
30488 #: ../src/guestfs-actions.pod:5783
30492 " guestfs_pread_device (guestfs_h *g,\n"
30493 " const char *device,\n"
30495 " int64_t offset,\n"
30496 " size_t *size_r);\n"
30501 #: ../src/guestfs-actions.pod:5796
30502 msgid "See also C<guestfs_pread>."
30506 #: ../src/guestfs-actions.pod:5805
30507 msgid "(Added in 1.5.21)"
30511 #: ../src/guestfs-actions.pod:5807
30512 msgid "guestfs_pvcreate"
30516 #: ../src/guestfs-actions.pod:5809
30520 " guestfs_pvcreate (guestfs_h *g,\n"
30521 " const char *device);\n"
30526 #: ../src/guestfs-actions.pod:5821
30527 msgid "guestfs_pvremove"
30531 #: ../src/guestfs-actions.pod:5823
30535 " guestfs_pvremove (guestfs_h *g,\n"
30536 " const char *device);\n"
30541 #: ../src/guestfs-actions.pod:5838
30542 msgid "guestfs_pvresize"
30546 #: ../src/guestfs-actions.pod:5840
30550 " guestfs_pvresize (guestfs_h *g,\n"
30551 " const char *device);\n"
30556 #: ../src/guestfs-actions.pod:5851
30557 msgid "guestfs_pvresize_size"
30561 #: ../src/guestfs-actions.pod:5853
30565 " guestfs_pvresize_size (guestfs_h *g,\n"
30566 " const char *device,\n"
30567 " int64_t size);\n"
30572 #: ../src/guestfs-actions.pod:5858
30574 "This command is the same as C<guestfs_pvresize> except that it allows you to "
30575 "specify the new size (in bytes) explicitly."
30579 #: ../src/guestfs-actions.pod:5865
30580 msgid "guestfs_pvs"
30584 #: ../src/guestfs-actions.pod:5867
30588 " guestfs_pvs (guestfs_h *g);\n"
30593 #: ../src/guestfs-actions.pod:5876
30594 msgid "See also C<guestfs_pvs_full>."
30598 #: ../src/guestfs-actions.pod:5884
30599 msgid "guestfs_pvs_full"
30603 #: ../src/guestfs-actions.pod:5886
30606 " struct guestfs_lvm_pv_list *\n"
30607 " guestfs_pvs_full (guestfs_h *g);\n"
30612 #: ../src/guestfs-actions.pod:5892
30614 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
30615 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
30619 #: ../src/guestfs-actions.pod:5898
30620 msgid "guestfs_pvuuid"
30624 #: ../src/guestfs-actions.pod:5900
30628 " guestfs_pvuuid (guestfs_h *g,\n"
30629 " const char *device);\n"
30634 #: ../src/guestfs-actions.pod:5911
30635 msgid "guestfs_pwrite"
30639 #: ../src/guestfs-actions.pod:5913
30643 " guestfs_pwrite (guestfs_h *g,\n"
30644 " const char *path,\n"
30645 " const char *content,\n"
30646 " size_t content_size,\n"
30647 " int64_t offset);\n"
30652 #: ../src/guestfs-actions.pod:5929
30653 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
30657 #: ../src/guestfs-actions.pod:5938
30658 msgid "guestfs_pwrite_device"
30662 #: ../src/guestfs-actions.pod:5940
30666 " guestfs_pwrite_device (guestfs_h *g,\n"
30667 " const char *device,\n"
30668 " const char *content,\n"
30669 " size_t content_size,\n"
30670 " int64_t offset);\n"
30675 #: ../src/guestfs-actions.pod:5955
30676 msgid "See also C<guestfs_pwrite>."
30680 #: ../src/guestfs-actions.pod:5962
30681 msgid "(Added in 1.5.20)"
30685 #: ../src/guestfs-actions.pod:5964
30686 msgid "guestfs_read_file"
30690 #: ../src/guestfs-actions.pod:5966
30694 " guestfs_read_file (guestfs_h *g,\n"
30695 " const char *path,\n"
30696 " size_t *size_r);\n"
30701 #: ../src/guestfs-actions.pod:5974
30703 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
30704 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
30705 "function is limited in the total size of file that can be handled."
30709 #: ../src/guestfs-actions.pod:5986
30710 msgid "(Added in 1.0.63)"
30714 #: ../src/guestfs-actions.pod:5988
30715 msgid "guestfs_read_lines"
30719 #: ../src/guestfs-actions.pod:5990
30723 " guestfs_read_lines (guestfs_h *g,\n"
30724 " const char *path);\n"
30729 #: ../src/guestfs-actions.pod:5999
30731 "Note that this function cannot correctly handle binary files (specifically, "
30732 "files containing C<\\0> character which is treated as end of line). For "
30733 "those you need to use the C<guestfs_read_file> function which has a more "
30734 "complex interface."
30738 #: ../src/guestfs-actions.pod:6010
30739 msgid "guestfs_readdir"
30743 #: ../src/guestfs-actions.pod:6012
30746 " struct guestfs_dirent_list *\n"
30747 " guestfs_readdir (guestfs_h *g,\n"
30748 " const char *dir);\n"
30753 #: ../src/guestfs-actions.pod:6066
30755 "This function is primarily intended for use by programs. To get a simple "
30756 "list of names, use C<guestfs_ls>. To get a printable directory for human "
30757 "consumption, use C<guestfs_ll>."
30761 #: ../src/guestfs-actions.pod:6070
30763 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
30764 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
30768 #: ../src/guestfs-actions.pod:6076
30769 msgid "guestfs_readlink"
30773 #: ../src/guestfs-actions.pod:6078
30777 " guestfs_readlink (guestfs_h *g,\n"
30778 " const char *path);\n"
30783 #: ../src/guestfs-actions.pod:6089
30784 msgid "guestfs_readlinklist"
30788 #: ../src/guestfs-actions.pod:6091
30792 " guestfs_readlinklist (guestfs_h *g,\n"
30793 " const char *path,\n"
30794 " char *const *names);\n"
30799 #: ../src/guestfs-actions.pod:6124
30800 msgid "guestfs_realpath"
30804 #: ../src/guestfs-actions.pod:6126
30808 " guestfs_realpath (guestfs_h *g,\n"
30809 " const char *path);\n"
30814 #: ../src/guestfs-actions.pod:6138
30815 msgid "guestfs_removexattr"
30819 #: ../src/guestfs-actions.pod:6140
30823 " guestfs_removexattr (guestfs_h *g,\n"
30824 " const char *xattr,\n"
30825 " const char *path);\n"
30830 #: ../src/guestfs-actions.pod:6148
30831 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
30835 #: ../src/guestfs-actions.pod:6154
30836 msgid "guestfs_resize2fs"
30840 #: ../src/guestfs-actions.pod:6156
30844 " guestfs_resize2fs (guestfs_h *g,\n"
30845 " const char *device);\n"
30850 #: ../src/guestfs-actions.pod:6163
30852 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
30853 "C<device> before calling this command. For unknown reasons C<resize2fs> "
30854 "sometimes gives an error about this and sometimes not. In any case, it is "
30855 "always safe to call C<guestfs_e2fsck_f> before calling this function."
30859 #: ../src/guestfs-actions.pod:6173
30860 msgid "guestfs_resize2fs_M"
30864 #: ../src/guestfs-actions.pod:6175
30868 " guestfs_resize2fs_M (guestfs_h *g,\n"
30869 " const char *device);\n"
30874 #: ../src/guestfs-actions.pod:6179
30876 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
30877 "resized to its minimum size. This works like the I<-M> option to the "
30878 "C<resize2fs> command."
30882 #: ../src/guestfs-actions.pod:6183
30884 "To get the resulting size of the filesystem you should call "
30885 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
30886 "These two numbers, multiplied together, give the resulting size of the "
30887 "minimal filesystem in bytes."
30891 #: ../src/guestfs-actions.pod:6192
30892 msgid "guestfs_resize2fs_size"
30896 #: ../src/guestfs-actions.pod:6194
30900 " guestfs_resize2fs_size (guestfs_h *g,\n"
30901 " const char *device,\n"
30902 " int64_t size);\n"
30907 #: ../src/guestfs-actions.pod:6199
30909 "This command is the same as C<guestfs_resize2fs> except that it allows you "
30910 "to specify the new size (in bytes) explicitly."
30914 #: ../src/guestfs-actions.pod:6206
30919 #: ../src/guestfs-actions.pod:6208
30923 " guestfs_rm (guestfs_h *g,\n"
30924 " const char *path);\n"
30929 #: ../src/guestfs-actions.pod:6218
30930 msgid "guestfs_rm_rf"
30934 #: ../src/guestfs-actions.pod:6220
30938 " guestfs_rm_rf (guestfs_h *g,\n"
30939 " const char *path);\n"
30944 #: ../src/guestfs-actions.pod:6232
30945 msgid "guestfs_rmdir"
30949 #: ../src/guestfs-actions.pod:6234
30953 " guestfs_rmdir (guestfs_h *g,\n"
30954 " const char *path);\n"
30959 #: ../src/guestfs-actions.pod:6244
30960 msgid "guestfs_rmmountpoint"
30964 #: ../src/guestfs-actions.pod:6246
30968 " guestfs_rmmountpoint (guestfs_h *g,\n"
30969 " const char *exemptpath);\n"
30974 #: ../src/guestfs-actions.pod:6250
30976 "This calls removes a mountpoint that was previously created with "
30977 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
30981 #: ../src/guestfs-actions.pod:6258
30982 msgid "guestfs_scrub_device"
30986 #: ../src/guestfs-actions.pod:6260
30990 " guestfs_scrub_device (guestfs_h *g,\n"
30991 " const char *device);\n"
30996 #: ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6293
30997 #: ../src/guestfs-actions.pod:6312
30998 msgid "(Added in 1.0.52)"
31002 #: ../src/guestfs-actions.pod:6277
31003 msgid "guestfs_scrub_file"
31007 #: ../src/guestfs-actions.pod:6279
31011 " guestfs_scrub_file (guestfs_h *g,\n"
31012 " const char *file);\n"
31017 #: ../src/guestfs-actions.pod:6295
31018 msgid "guestfs_scrub_freespace"
31022 #: ../src/guestfs-actions.pod:6297
31026 " guestfs_scrub_freespace (guestfs_h *g,\n"
31027 " const char *dir);\n"
31032 #: ../src/guestfs-actions.pod:6301
31034 "This command creates the directory C<dir> and then fills it with files until "
31035 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
31036 "and deletes them. The intention is to scrub any free space on the partition "
31037 "containing C<dir>."
31041 #: ../src/guestfs-actions.pod:6314
31042 msgid "guestfs_set_append"
31046 #: ../src/guestfs-actions.pod:6316
31050 " guestfs_set_append (guestfs_h *g,\n"
31051 " const char *append);\n"
31056 #: ../src/guestfs-actions.pod:6333
31057 msgid "guestfs_set_attach_method"
31061 #: ../src/guestfs-actions.pod:6335
31065 " guestfs_set_attach_method (guestfs_h *g,\n"
31066 " const char *attachmethod);\n"
31071 #: ../src/guestfs-actions.pod:6363
31072 msgid "guestfs_set_autosync"
31076 #: ../src/guestfs-actions.pod:6365
31080 " guestfs_set_autosync (guestfs_h *g,\n"
31081 " int autosync);\n"
31086 #: ../src/guestfs-actions.pod:6381
31087 msgid "guestfs_set_direct"
31091 #: ../src/guestfs-actions.pod:6383
31095 " guestfs_set_direct (guestfs_h *g,\n"
31101 #: ../src/guestfs-actions.pod:6391
31103 "One consequence of this is that log messages aren't caught by the library "
31104 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
31109 #: ../src/guestfs-actions.pod:6404
31110 msgid "guestfs_set_e2label"
31114 #: ../src/guestfs-actions.pod:6406
31118 " guestfs_set_e2label (guestfs_h *g,\n"
31119 " const char *device,\n"
31120 " const char *label);\n"
31125 #: ../src/guestfs-actions.pod:6415
31127 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31128 "the existing label on a filesystem."
31132 #: ../src/guestfs-actions.pod:6422
31133 msgid "guestfs_set_e2uuid"
31137 #: ../src/guestfs-actions.pod:6424
31141 " guestfs_set_e2uuid (guestfs_h *g,\n"
31142 " const char *device,\n"
31143 " const char *uuid);\n"
31148 #: ../src/guestfs-actions.pod:6434
31150 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31151 "the existing UUID of a filesystem."
31155 #: ../src/guestfs-actions.pod:6441
31156 msgid "guestfs_set_memsize"
31160 #: ../src/guestfs-actions.pod:6443
31164 " guestfs_set_memsize (guestfs_h *g,\n"
31170 #: ../src/guestfs-actions.pod:6447
31172 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31173 "This only has any effect if called before C<guestfs_launch>."
31177 #: ../src/guestfs-actions.pod:6462
31178 msgid "guestfs_set_network"
31182 #: ../src/guestfs-actions.pod:6464
31186 " guestfs_set_network (guestfs_h *g,\n"
31192 #: ../src/guestfs-actions.pod:6474
31194 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31199 #: ../src/guestfs-actions.pod:6481
31200 msgid "guestfs_set_path"
31204 #: ../src/guestfs-actions.pod:6483
31208 " guestfs_set_path (guestfs_h *g,\n"
31209 " const char *searchpath);\n"
31214 #: ../src/guestfs-actions.pod:6498
31215 msgid "guestfs_set_pgroup"
31219 #: ../src/guestfs-actions.pod:6500
31223 " guestfs_set_pgroup (guestfs_h *g,\n"
31229 #: ../src/guestfs-actions.pod:6517
31230 msgid "guestfs_set_qemu"
31234 #: ../src/guestfs-actions.pod:6519
31238 " guestfs_set_qemu (guestfs_h *g,\n"
31239 " const char *qemu);\n"
31244 #: ../src/guestfs-actions.pod:6545
31245 msgid "guestfs_set_recovery_proc"
31249 #: ../src/guestfs-actions.pod:6547
31253 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31254 " int recoveryproc);\n"
31259 #: ../src/guestfs-actions.pod:6551
31261 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31262 "not create a recovery process. The purpose of the recovery process is to "
31263 "stop runaway qemu processes in the case where the main program aborts "
31268 #: ../src/guestfs-actions.pod:6556
31270 "This only has any effect if called before C<guestfs_launch>, and the default "
31275 #: ../src/guestfs-actions.pod:6569
31276 msgid "guestfs_set_selinux"
31280 #: ../src/guestfs-actions.pod:6571
31284 " guestfs_set_selinux (guestfs_h *g,\n"
31290 #: ../src/guestfs-actions.pod:6588
31291 msgid "guestfs_set_smp"
31295 #: ../src/guestfs-actions.pod:6590
31299 " guestfs_set_smp (guestfs_h *g,\n"
31305 #: ../src/guestfs-actions.pod:6598
31306 msgid "This function must be called before C<guestfs_launch>."
31310 #: ../src/guestfs-actions.pod:6604
31311 msgid "guestfs_set_trace"
31315 #: ../src/guestfs-actions.pod:6606
31319 " guestfs_set_trace (guestfs_h *g,\n"
31325 #: ../src/guestfs-actions.pod:6620
31327 "Trace messages are normally sent to C<stderr>, unless you register a "
31328 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31332 #: ../src/guestfs-actions.pod:6628
31333 msgid "guestfs_set_verbose"
31337 #: ../src/guestfs-actions.pod:6630
31341 " guestfs_set_verbose (guestfs_h *g,\n"
31347 #: ../src/guestfs-actions.pod:6639
31349 "Verbose messages are normally sent to C<stderr>, unless you register a "
31350 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31354 #: ../src/guestfs-actions.pod:6647
31355 msgid "guestfs_setcon"
31359 #: ../src/guestfs-actions.pod:6649
31363 " guestfs_setcon (guestfs_h *g,\n"
31364 " const char *context);\n"
31369 #: ../src/guestfs-actions.pod:6662
31370 msgid "guestfs_setxattr"
31374 #: ../src/guestfs-actions.pod:6664
31378 " guestfs_setxattr (guestfs_h *g,\n"
31379 " const char *xattr,\n"
31380 " const char *val,\n"
31382 " const char *path);\n"
31387 #: ../src/guestfs-actions.pod:6675
31388 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
31392 #: ../src/guestfs-actions.pod:6681
31393 msgid "guestfs_sfdisk"
31397 #: ../src/guestfs-actions.pod:6683
31401 " guestfs_sfdisk (guestfs_h *g,\n"
31402 " const char *device,\n"
31406 " char *const *lines);\n"
31411 #: ../src/guestfs-actions.pod:6691 ../src/guestfs-actions.pod:6735
31412 #: ../src/guestfs-actions.pod:6769
31414 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
31419 #: ../src/guestfs-actions.pod:6718
31421 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
31425 #: ../src/guestfs-actions.pod:6728
31426 msgid "guestfs_sfdiskM"
31430 #: ../src/guestfs-actions.pod:6730
31434 " guestfs_sfdiskM (guestfs_h *g,\n"
31435 " const char *device,\n"
31436 " char *const *lines);\n"
31441 #: ../src/guestfs-actions.pod:6742
31443 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
31444 "partition sizes are specified in megabytes only (rounded to the nearest "
31445 "cylinder) and you don't need to specify the cyls, heads and sectors "
31446 "parameters which were rarely if ever used anyway."
31450 #: ../src/guestfs-actions.pod:6748
31452 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
31453 "C<guestfs_part_disk>"
31457 #: ../src/guestfs-actions.pod:6758
31458 msgid "guestfs_sfdisk_N"
31462 #: ../src/guestfs-actions.pod:6760
31466 " guestfs_sfdisk_N (guestfs_h *g,\n"
31467 " const char *device,\n"
31472 " const char *line);\n"
31477 #: ../src/guestfs-actions.pod:6779
31479 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
31480 "for the cyls/heads/sectors parameters."
31484 #: ../src/guestfs-actions.pod:6782
31485 msgid "See also: C<guestfs_part_add>"
31489 #: ../src/guestfs-actions.pod:6791
31490 msgid "guestfs_sfdisk_disk_geometry"
31494 #: ../src/guestfs-actions.pod:6793
31498 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
31499 " const char *device);\n"
31504 #: ../src/guestfs-actions.pod:6797
31506 "This displays the disk geometry of C<device> read from the partition table. "
31507 "Especially in the case where the underlying block device has been resized, "
31508 "this can be different from the kernel's idea of the geometry (see "
31509 "C<guestfs_sfdisk_kernel_geometry>)."
31513 #: ../src/guestfs-actions.pod:6810
31514 msgid "guestfs_sfdisk_kernel_geometry"
31518 #: ../src/guestfs-actions.pod:6812
31522 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
31523 " const char *device);\n"
31528 #: ../src/guestfs-actions.pod:6826
31529 msgid "guestfs_sfdisk_l"
31533 #: ../src/guestfs-actions.pod:6828
31537 " guestfs_sfdisk_l (guestfs_h *g,\n"
31538 " const char *device);\n"
31543 #: ../src/guestfs-actions.pod:6832
31545 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
31550 #: ../src/guestfs-actions.pod:6843
31551 msgid "See also: C<guestfs_part_list>"
31555 #: ../src/guestfs-actions.pod:6850
31560 #: ../src/guestfs-actions.pod:6852
31564 " guestfs_sh (guestfs_h *g,\n"
31565 " const char *command);\n"
31570 #: ../src/guestfs-actions.pod:6859
31571 msgid "This is like C<guestfs_command>, but passes the command to:"
31575 #: ../src/guestfs-actions.pod:6867
31576 msgid "All the provisos about C<guestfs_command> apply to this call."
31580 #: ../src/guestfs-actions.pod:6874
31581 msgid "guestfs_sh_lines"
31585 #: ../src/guestfs-actions.pod:6876
31589 " guestfs_sh_lines (guestfs_h *g,\n"
31590 " const char *command);\n"
31595 #: ../src/guestfs-actions.pod:6880
31597 "This is the same as C<guestfs_sh>, but splits the result into a list of "
31602 #: ../src/guestfs-actions.pod:6883
31603 msgid "See also: C<guestfs_command_lines>"
31607 #: ../src/guestfs-actions.pod:6891
31608 msgid "guestfs_sleep"
31612 #: ../src/guestfs-actions.pod:6893
31616 " guestfs_sleep (guestfs_h *g,\n"
31622 #: ../src/guestfs-actions.pod:6901
31623 msgid "(Added in 1.0.41)"
31627 #: ../src/guestfs-actions.pod:6903 ../src/guestfs-structs.pod:109
31628 msgid "guestfs_stat"
31632 #: ../src/guestfs-actions.pod:6905
31635 " struct guestfs_stat *\n"
31636 " guestfs_stat (guestfs_h *g,\n"
31637 " const char *path);\n"
31642 #: ../src/guestfs-actions.pod:6919 ../src/guestfs-structs.pod:135
31643 msgid "guestfs_statvfs"
31647 #: ../src/guestfs-actions.pod:6921
31650 " struct guestfs_statvfs *\n"
31651 " guestfs_statvfs (guestfs_h *g,\n"
31652 " const char *path);\n"
31657 #: ../src/guestfs-actions.pod:6931
31659 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
31660 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
31664 #: ../src/guestfs-actions.pod:6937
31665 msgid "guestfs_strings"
31669 #: ../src/guestfs-actions.pod:6939
31673 " guestfs_strings (guestfs_h *g,\n"
31674 " const char *path);\n"
31679 #: ../src/guestfs-actions.pod:6955
31680 msgid "guestfs_strings_e"
31684 #: ../src/guestfs-actions.pod:6957
31688 " guestfs_strings_e (guestfs_h *g,\n"
31689 " const char *encoding,\n"
31690 " const char *path);\n"
31695 #: ../src/guestfs-actions.pod:6962
31697 "This is like the C<guestfs_strings> command, but allows you to specify the "
31698 "encoding of strings that are looked for in the source file C<path>."
31702 #: ../src/guestfs-actions.pod:6972
31704 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
31705 "ISO-8859-X (this is what C<guestfs_strings> uses)."
31709 #: ../src/guestfs-actions.pod:7010
31710 msgid "guestfs_swapoff_device"
31714 #: ../src/guestfs-actions.pod:7012
31718 " guestfs_swapoff_device (guestfs_h *g,\n"
31719 " const char *device);\n"
31724 #: ../src/guestfs-actions.pod:7016
31726 "This command disables the libguestfs appliance swap device or partition "
31727 "named C<device>. See C<guestfs_swapon_device>."
31731 #: ../src/guestfs-actions.pod:7024
31732 msgid "guestfs_swapoff_file"
31736 #: ../src/guestfs-actions.pod:7026
31740 " guestfs_swapoff_file (guestfs_h *g,\n"
31741 " const char *file);\n"
31746 #: ../src/guestfs-actions.pod:7036
31747 msgid "guestfs_swapoff_label"
31751 #: ../src/guestfs-actions.pod:7038
31755 " guestfs_swapoff_label (guestfs_h *g,\n"
31756 " const char *label);\n"
31761 #: ../src/guestfs-actions.pod:7049
31762 msgid "guestfs_swapoff_uuid"
31766 #: ../src/guestfs-actions.pod:7051
31770 " guestfs_swapoff_uuid (guestfs_h *g,\n"
31771 " const char *uuid);\n"
31776 #: ../src/guestfs-actions.pod:7062
31777 msgid "guestfs_swapon_device"
31781 #: ../src/guestfs-actions.pod:7064
31785 " guestfs_swapon_device (guestfs_h *g,\n"
31786 " const char *device);\n"
31791 #: ../src/guestfs-actions.pod:7068
31793 "This command enables the libguestfs appliance to use the swap device or "
31794 "partition named C<device>. The increased memory is made available for all "
31795 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
31799 #: ../src/guestfs-actions.pod:7084
31800 msgid "guestfs_swapon_file"
31804 #: ../src/guestfs-actions.pod:7086
31808 " guestfs_swapon_file (guestfs_h *g,\n"
31809 " const char *file);\n"
31814 #: ../src/guestfs-actions.pod:7090
31816 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
31821 #: ../src/guestfs-actions.pod:7097
31822 msgid "guestfs_swapon_label"
31826 #: ../src/guestfs-actions.pod:7099
31830 " guestfs_swapon_label (guestfs_h *g,\n"
31831 " const char *label);\n"
31836 #: ../src/guestfs-actions.pod:7103
31838 "This command enables swap to a labeled swap partition. See "
31839 "C<guestfs_swapon_device> for other notes."
31843 #: ../src/guestfs-actions.pod:7110
31844 msgid "guestfs_swapon_uuid"
31848 #: ../src/guestfs-actions.pod:7112
31852 " guestfs_swapon_uuid (guestfs_h *g,\n"
31853 " const char *uuid);\n"
31858 #: ../src/guestfs-actions.pod:7116
31860 "This command enables swap to a swap partition with the given UUID. See "
31861 "C<guestfs_swapon_device> for other notes."
31865 #: ../src/guestfs-actions.pod:7123
31866 msgid "guestfs_sync"
31870 #: ../src/guestfs-actions.pod:7125
31874 " guestfs_sync (guestfs_h *g);\n"
31879 #: ../src/guestfs-actions.pod:7138
31880 msgid "guestfs_tail"
31884 #: ../src/guestfs-actions.pod:7140
31888 " guestfs_tail (guestfs_h *g,\n"
31889 " const char *path);\n"
31894 #: ../src/guestfs-actions.pod:7156
31895 msgid "guestfs_tail_n"
31899 #: ../src/guestfs-actions.pod:7158
31903 " guestfs_tail_n (guestfs_h *g,\n"
31905 " const char *path);\n"
31910 #: ../src/guestfs-actions.pod:7180
31911 msgid "guestfs_tar_in"
31915 #: ../src/guestfs-actions.pod:7182
31919 " guestfs_tar_in (guestfs_h *g,\n"
31920 " const char *tarfile,\n"
31921 " const char *directory);\n"
31926 #: ../src/guestfs-actions.pod:7190
31928 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
31932 #: ../src/guestfs-actions.pod:7195 ../src/guestfs-actions.pod:7212
31933 #: ../src/guestfs-actions.pod:7228 ../src/guestfs-actions.pod:7244
31934 msgid "(Added in 1.0.3)"
31938 #: ../src/guestfs-actions.pod:7197
31939 msgid "guestfs_tar_out"
31943 #: ../src/guestfs-actions.pod:7199
31947 " guestfs_tar_out (guestfs_h *g,\n"
31948 " const char *directory,\n"
31949 " const char *tarfile);\n"
31954 #: ../src/guestfs-actions.pod:7207
31956 "To download a compressed tarball, use C<guestfs_tgz_out> or "
31957 "C<guestfs_txz_out>."
31961 #: ../src/guestfs-actions.pod:7214
31962 msgid "guestfs_tgz_in"
31966 #: ../src/guestfs-actions.pod:7216
31970 " guestfs_tgz_in (guestfs_h *g,\n"
31971 " const char *tarball,\n"
31972 " const char *directory);\n"
31977 #: ../src/guestfs-actions.pod:7224
31978 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
31982 #: ../src/guestfs-actions.pod:7230
31983 msgid "guestfs_tgz_out"
31987 #: ../src/guestfs-actions.pod:7232
31991 " guestfs_tgz_out (guestfs_h *g,\n"
31992 " const char *directory,\n"
31993 " const char *tarball);\n"
31998 #: ../src/guestfs-actions.pod:7240
31999 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
32003 #: ../src/guestfs-actions.pod:7246
32004 msgid "guestfs_touch"
32008 #: ../src/guestfs-actions.pod:7248
32012 " guestfs_touch (guestfs_h *g,\n"
32013 " const char *path);\n"
32018 #: ../src/guestfs-actions.pod:7263
32019 msgid "guestfs_truncate"
32023 #: ../src/guestfs-actions.pod:7265
32027 " guestfs_truncate (guestfs_h *g,\n"
32028 " const char *path);\n"
32033 #: ../src/guestfs-actions.pod:7276
32034 msgid "guestfs_truncate_size"
32038 #: ../src/guestfs-actions.pod:7278
32042 " guestfs_truncate_size (guestfs_h *g,\n"
32043 " const char *path,\n"
32044 " int64_t size);\n"
32049 #: ../src/guestfs-actions.pod:7286
32051 "If the current file size is less than C<size> then the file is extended to "
32052 "the required size with zero bytes. This creates a sparse file (ie. disk "
32053 "blocks are not allocated for the file until you write to it). To create a "
32054 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
32058 #: ../src/guestfs-actions.pod:7296
32059 msgid "guestfs_tune2fs_l"
32063 #: ../src/guestfs-actions.pod:7298
32067 " guestfs_tune2fs_l (guestfs_h *g,\n"
32068 " const char *device);\n"
32073 #: ../src/guestfs-actions.pod:7318
32074 msgid "guestfs_txz_in"
32078 #: ../src/guestfs-actions.pod:7320
32082 " guestfs_txz_in (guestfs_h *g,\n"
32083 " const char *tarball,\n"
32084 " const char *directory);\n"
32089 #: ../src/guestfs-actions.pod:7332
32090 msgid "guestfs_txz_out"
32094 #: ../src/guestfs-actions.pod:7334
32098 " guestfs_txz_out (guestfs_h *g,\n"
32099 " const char *directory,\n"
32100 " const char *tarball);\n"
32105 #: ../src/guestfs-actions.pod:7346
32106 msgid "guestfs_umask"
32110 #: ../src/guestfs-actions.pod:7348
32114 " guestfs_umask (guestfs_h *g,\n"
32120 #: ../src/guestfs-actions.pod:7364
32122 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32123 "C<guestfs_mkdir>."
32127 #: ../src/guestfs-actions.pod:7373
32128 msgid "guestfs_umount"
32132 #: ../src/guestfs-actions.pod:7375
32136 " guestfs_umount (guestfs_h *g,\n"
32137 " const char *pathordevice);\n"
32142 #: ../src/guestfs-actions.pod:7387
32143 msgid "guestfs_umount_all"
32147 #: ../src/guestfs-actions.pod:7389
32151 " guestfs_umount_all (guestfs_h *g);\n"
32156 #: ../src/guestfs-actions.pod:7400
32157 msgid "guestfs_upload"
32161 #: ../src/guestfs-actions.pod:7402
32165 " guestfs_upload (guestfs_h *g,\n"
32166 " const char *filename,\n"
32167 " const char *remotefilename);\n"
32172 #: ../src/guestfs-actions.pod:7412
32173 msgid "See also C<guestfs_download>."
32177 #: ../src/guestfs-actions.pod:7423
32178 msgid "guestfs_upload_offset"
32182 #: ../src/guestfs-actions.pod:7425
32186 " guestfs_upload_offset (guestfs_h *g,\n"
32187 " const char *filename,\n"
32188 " const char *remotefilename,\n"
32189 " int64_t offset);\n"
32194 #: ../src/guestfs-actions.pod:7441
32196 "Note that there is no limit on the amount of data that can be uploaded with "
32197 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32198 "full amount unless an error occurs."
32202 #: ../src/guestfs-actions.pod:7446
32203 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32207 #: ../src/guestfs-actions.pod:7457
32208 msgid "guestfs_utimens"
32212 #: ../src/guestfs-actions.pod:7459
32216 " guestfs_utimens (guestfs_h *g,\n"
32217 " const char *path,\n"
32218 " int64_t atsecs,\n"
32219 " int64_t atnsecs,\n"
32220 " int64_t mtsecs,\n"
32221 " int64_t mtnsecs);\n"
32226 #: ../src/guestfs-actions.pod:7488 ../src/guestfs-structs.pod:175
32227 msgid "guestfs_version"
32231 #: ../src/guestfs-actions.pod:7490
32234 " struct guestfs_version *\n"
32235 " guestfs_version (guestfs_h *g);\n"
32240 #: ../src/guestfs-actions.pod:7518
32242 "I<Note:> Don't use this call to test for availability of features. In "
32243 "enterprise distributions we backport features from later versions into "
32244 "earlier versions, making this an unreliable way to test for features. Use "
32245 "C<guestfs_available> instead."
32249 #: ../src/guestfs-actions.pod:7524
32251 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32252 "error. I<The caller must call C<guestfs_free_version> after use>."
32256 #: ../src/guestfs-actions.pod:7528
32257 msgid "(Added in 1.0.58)"
32261 #: ../src/guestfs-actions.pod:7530
32262 msgid "guestfs_vfs_label"
32266 #: ../src/guestfs-actions.pod:7532
32270 " guestfs_vfs_label (guestfs_h *g,\n"
32271 " const char *device);\n"
32276 #: ../src/guestfs-actions.pod:7541
32277 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32281 #: ../src/guestfs-actions.pod:7546 ../src/guestfs-actions.pod:7583
32282 msgid "(Added in 1.3.18)"
32286 #: ../src/guestfs-actions.pod:7548
32287 msgid "guestfs_vfs_type"
32291 #: ../src/guestfs-actions.pod:7550
32295 " guestfs_vfs_type (guestfs_h *g,\n"
32296 " const char *device);\n"
32301 #: ../src/guestfs-actions.pod:7567
32302 msgid "guestfs_vfs_uuid"
32306 #: ../src/guestfs-actions.pod:7569
32310 " guestfs_vfs_uuid (guestfs_h *g,\n"
32311 " const char *device);\n"
32316 #: ../src/guestfs-actions.pod:7578
32317 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
32321 #: ../src/guestfs-actions.pod:7585
32322 msgid "guestfs_vg_activate"
32326 #: ../src/guestfs-actions.pod:7587
32330 " guestfs_vg_activate (guestfs_h *g,\n"
32332 " char *const *volgroups);\n"
32337 #: ../src/guestfs-actions.pod:7604
32338 msgid "guestfs_vg_activate_all"
32342 #: ../src/guestfs-actions.pod:7606
32346 " guestfs_vg_activate_all (guestfs_h *g,\n"
32347 " int activate);\n"
32352 #: ../src/guestfs-actions.pod:7619
32353 msgid "guestfs_vgcreate"
32357 #: ../src/guestfs-actions.pod:7621
32361 " guestfs_vgcreate (guestfs_h *g,\n"
32362 " const char *volgroup,\n"
32363 " char *const *physvols);\n"
32368 #: ../src/guestfs-actions.pod:7633
32369 msgid "guestfs_vglvuuids"
32373 #: ../src/guestfs-actions.pod:7635
32377 " guestfs_vglvuuids (guestfs_h *g,\n"
32378 " const char *vgname);\n"
32383 #: ../src/guestfs-actions.pod:7642
32385 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
32386 "associate logical volumes and volume groups."
32390 #: ../src/guestfs-actions.pod:7645
32391 msgid "See also C<guestfs_vgpvuuids>."
32395 #: ../src/guestfs-actions.pod:7653
32396 msgid "guestfs_vgpvuuids"
32400 #: ../src/guestfs-actions.pod:7655
32404 " guestfs_vgpvuuids (guestfs_h *g,\n"
32405 " const char *vgname);\n"
32410 #: ../src/guestfs-actions.pod:7662
32412 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
32413 "associate physical volumes and volume groups."
32417 #: ../src/guestfs-actions.pod:7665
32418 msgid "See also C<guestfs_vglvuuids>."
32422 #: ../src/guestfs-actions.pod:7673
32423 msgid "guestfs_vgremove"
32427 #: ../src/guestfs-actions.pod:7675
32431 " guestfs_vgremove (guestfs_h *g,\n"
32432 " const char *vgname);\n"
32437 #: ../src/guestfs-actions.pod:7688
32438 msgid "guestfs_vgrename"
32442 #: ../src/guestfs-actions.pod:7690
32446 " guestfs_vgrename (guestfs_h *g,\n"
32447 " const char *volgroup,\n"
32448 " const char *newvolgroup);\n"
32453 #: ../src/guestfs-actions.pod:7701
32454 msgid "guestfs_vgs"
32458 #: ../src/guestfs-actions.pod:7703
32462 " guestfs_vgs (guestfs_h *g);\n"
32467 #: ../src/guestfs-actions.pod:7712
32468 msgid "See also C<guestfs_vgs_full>."
32472 #: ../src/guestfs-actions.pod:7720
32473 msgid "guestfs_vgs_full"
32477 #: ../src/guestfs-actions.pod:7722
32480 " struct guestfs_lvm_vg_list *\n"
32481 " guestfs_vgs_full (guestfs_h *g);\n"
32486 #: ../src/guestfs-actions.pod:7728
32488 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
32489 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
32493 #: ../src/guestfs-actions.pod:7734
32494 msgid "guestfs_vgscan"
32498 #: ../src/guestfs-actions.pod:7736
32502 " guestfs_vgscan (guestfs_h *g);\n"
32507 #: ../src/guestfs-actions.pod:7746
32508 msgid "guestfs_vguuid"
32512 #: ../src/guestfs-actions.pod:7748
32516 " guestfs_vguuid (guestfs_h *g,\n"
32517 " const char *vgname);\n"
32522 #: ../src/guestfs-actions.pod:7759
32523 msgid "guestfs_wait_ready"
32527 #: ../src/guestfs-actions.pod:7761
32531 " guestfs_wait_ready (guestfs_h *g);\n"
32536 #: ../src/guestfs-actions.pod:7764
32538 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
32543 #: ../src/guestfs-actions.pod:7771
32544 msgid "This function is a no op."
32548 #: ../src/guestfs-actions.pod:7773
32550 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
32551 "calling C<guestfs_launch> to wait for the launch to complete. However this "
32552 "is no longer necessary because C<guestfs_launch> now does the waiting."
32556 #: ../src/guestfs-actions.pod:7778
32558 "If you see any calls to this function in code then you can just remove them, "
32559 "unless you want to retain compatibility with older versions of the API."
32563 #: ../src/guestfs-actions.pod:7786
32564 msgid "guestfs_wc_c"
32568 #: ../src/guestfs-actions.pod:7788
32572 " guestfs_wc_c (guestfs_h *g,\n"
32573 " const char *path);\n"
32578 #: ../src/guestfs-actions.pod:7799
32579 msgid "guestfs_wc_l"
32583 #: ../src/guestfs-actions.pod:7801
32587 " guestfs_wc_l (guestfs_h *g,\n"
32588 " const char *path);\n"
32593 #: ../src/guestfs-actions.pod:7812
32594 msgid "guestfs_wc_w"
32598 #: ../src/guestfs-actions.pod:7814
32602 " guestfs_wc_w (guestfs_h *g,\n"
32603 " const char *path);\n"
32608 #: ../src/guestfs-actions.pod:7825
32609 msgid "guestfs_write"
32613 #: ../src/guestfs-actions.pod:7827
32617 " guestfs_write (guestfs_h *g,\n"
32618 " const char *path,\n"
32619 " const char *content,\n"
32620 " size_t content_size);\n"
32625 #: ../src/guestfs-actions.pod:7836
32626 msgid "See also C<guestfs_write_append>."
32630 #: ../src/guestfs-actions.pod:7845
32631 msgid "guestfs_write_append"
32635 #: ../src/guestfs-actions.pod:7847
32639 " guestfs_write_append (guestfs_h *g,\n"
32640 " const char *path,\n"
32641 " const char *content,\n"
32642 " size_t content_size);\n"
32647 #: ../src/guestfs-actions.pod:7856
32648 msgid "See also C<guestfs_write>."
32652 #: ../src/guestfs-actions.pod:7865
32653 msgid "guestfs_write_file"
32657 #: ../src/guestfs-actions.pod:7867
32661 " guestfs_write_file (guestfs_h *g,\n"
32662 " const char *path,\n"
32663 " const char *content,\n"
32669 #: ../src/guestfs-actions.pod:7873
32671 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
32676 #: ../src/guestfs-actions.pod:7898
32677 msgid "guestfs_zegrep"
32681 #: ../src/guestfs-actions.pod:7900
32685 " guestfs_zegrep (guestfs_h *g,\n"
32686 " const char *regex,\n"
32687 " const char *path);\n"
32692 #: ../src/guestfs-actions.pod:7917
32693 msgid "guestfs_zegrepi"
32697 #: ../src/guestfs-actions.pod:7919
32701 " guestfs_zegrepi (guestfs_h *g,\n"
32702 " const char *regex,\n"
32703 " const char *path);\n"
32708 #: ../src/guestfs-actions.pod:7936
32709 msgid "guestfs_zero"
32713 #: ../src/guestfs-actions.pod:7938
32717 " guestfs_zero (guestfs_h *g,\n"
32718 " const char *device);\n"
32723 #: ../src/guestfs-actions.pod:7952
32725 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
32726 "C<guestfs_is_zero_device>"
32730 #: ../src/guestfs-actions.pod:7964
32731 msgid "guestfs_zero_device"
32735 #: ../src/guestfs-actions.pod:7966
32739 " guestfs_zero_device (guestfs_h *g,\n"
32740 " const char *device);\n"
32745 #: ../src/guestfs-actions.pod:7970
32747 "This command writes zeroes over the entire C<device>. Compare with "
32748 "C<guestfs_zero> which just zeroes the first few blocks of a device."
32752 #: ../src/guestfs-actions.pod:7988
32753 msgid "(Added in 1.3.1)"
32757 #: ../src/guestfs-actions.pod:7990
32758 msgid "guestfs_zerofree"
32762 #: ../src/guestfs-actions.pod:7992
32766 " guestfs_zerofree (guestfs_h *g,\n"
32767 " const char *device);\n"
32772 #: ../src/guestfs-actions.pod:8011
32773 msgid "guestfs_zfgrep"
32777 #: ../src/guestfs-actions.pod:8013
32781 " guestfs_zfgrep (guestfs_h *g,\n"
32782 " const char *pattern,\n"
32783 " const char *path);\n"
32788 #: ../src/guestfs-actions.pod:8030
32789 msgid "guestfs_zfgrepi"
32793 #: ../src/guestfs-actions.pod:8032
32797 " guestfs_zfgrepi (guestfs_h *g,\n"
32798 " const char *pattern,\n"
32799 " const char *path);\n"
32804 #: ../src/guestfs-actions.pod:8049
32805 msgid "guestfs_zfile"
32809 #: ../src/guestfs-actions.pod:8051
32813 " guestfs_zfile (guestfs_h *g,\n"
32814 " const char *meth,\n"
32815 " const char *path);\n"
32820 #: ../src/guestfs-actions.pod:8056
32822 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
32827 #: ../src/guestfs-actions.pod:8068
32829 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
32834 #: ../src/guestfs-actions.pod:8076
32835 msgid "guestfs_zgrep"
32839 #: ../src/guestfs-actions.pod:8078
32843 " guestfs_zgrep (guestfs_h *g,\n"
32844 " const char *regex,\n"
32845 " const char *path);\n"
32850 #: ../src/guestfs-actions.pod:8095
32851 msgid "guestfs_zgrepi"
32855 #: ../src/guestfs-actions.pod:8097
32859 " guestfs_zgrepi (guestfs_h *g,\n"
32860 " const char *regex,\n"
32861 " const char *path);\n"
32866 #: ../src/guestfs-availability.pod:3
32871 #: ../src/guestfs-availability.pod:5
32873 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
32874 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
32875 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
32876 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
32877 "L</guestfs_aug_save> L</guestfs_aug_set>"
32881 #: ../src/guestfs-availability.pod:21
32886 #: ../src/guestfs-availability.pod:23
32887 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
32891 #: ../src/guestfs-availability.pod:26
32896 #: ../src/guestfs-availability.pod:28
32897 msgid "The following functions: L</guestfs_grub_install>"
32901 #: ../src/guestfs-availability.pod:31
32906 #: ../src/guestfs-availability.pod:33
32908 "The following functions: L</guestfs_inotify_add_watch> L</"
32909 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
32910 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
32914 #: ../src/guestfs-availability.pod:41
32915 msgid "B<linuxfsuuid>"
32919 #: ../src/guestfs-availability.pod:43
32921 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
32922 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
32926 #: ../src/guestfs-availability.pod:50
32927 msgid "B<linuxmodules>"
32931 #: ../src/guestfs-availability.pod:52
32932 msgid "The following functions: L</guestfs_modprobe>"
32936 #: ../src/guestfs-availability.pod:55
32937 msgid "B<linuxxattrs>"
32941 #: ../src/guestfs-availability.pod:57
32943 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
32944 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
32945 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
32946 "guestfs_setxattr>"
32950 #: ../src/guestfs-availability.pod:68
32955 #: ../src/guestfs-availability.pod:70
32957 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
32958 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
32959 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
32963 #: ../src/guestfs-availability.pod:79
32968 #: ../src/guestfs-availability.pod:81
32970 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
32971 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
32972 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
32973 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
32974 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
32975 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
32976 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
32980 #: ../src/guestfs-availability.pod:104
32985 #: ../src/guestfs-availability.pod:106
32987 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
32988 "guestfs_mknod_b> L</guestfs_mknod_c>"
32992 #: ../src/guestfs-availability.pod:112
32997 #: ../src/guestfs-availability.pod:114
32998 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
33002 #: ../src/guestfs-availability.pod:117
33003 msgid "B<ntfsprogs>"
33007 #: ../src/guestfs-availability.pod:119
33009 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
33010 "L</guestfs_ntfsresize_size>"
33014 #: ../src/guestfs-availability.pod:124
33015 msgid "B<realpath>"
33019 #: ../src/guestfs-availability.pod:126
33020 msgid "The following functions: L</guestfs_realpath>"
33024 #: ../src/guestfs-availability.pod:129
33029 #: ../src/guestfs-availability.pod:131
33031 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
33032 "guestfs_scrub_freespace>"
33036 #: ../src/guestfs-availability.pod:136
33041 #: ../src/guestfs-availability.pod:138
33042 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
33046 #: ../src/guestfs-availability.pod:142
33051 #: ../src/guestfs-availability.pod:144
33052 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
33056 #: ../src/guestfs-availability.pod:148
33057 msgid "B<zerofree>"
33061 #: ../src/guestfs-availability.pod:150
33062 msgid "The following functions: L</guestfs_zerofree>"
33066 #: ../src/guestfs-structs.pod:1
33067 msgid "guestfs_int_bool"
33071 #: ../src/guestfs-structs.pod:3
33074 " struct guestfs_int_bool {\n"
33082 #: ../src/guestfs-structs.pod:8
33085 " struct guestfs_int_bool_list {\n"
33086 " uint32_t len; /* Number of elements in list. */\n"
33087 " struct guestfs_int_bool *val; /* Elements. */\n"
33093 #: ../src/guestfs-structs.pod:13
33096 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
33097 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
33102 #: ../src/guestfs-structs.pod:16
33103 msgid "guestfs_lvm_pv"
33107 #: ../src/guestfs-structs.pod:18
33110 " struct guestfs_lvm_pv {\n"
33111 " char *pv_name;\n"
33112 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33113 " char pv_uuid[32];\n"
33115 " uint64_t pv_size;\n"
33116 " uint64_t dev_size;\n"
33117 " uint64_t pv_free;\n"
33118 " uint64_t pv_used;\n"
33119 " char *pv_attr;\n"
33120 " int64_t pv_pe_count;\n"
33121 " int64_t pv_pe_alloc_count;\n"
33122 " char *pv_tags;\n"
33123 " uint64_t pe_start;\n"
33124 " int64_t pv_mda_count;\n"
33125 " uint64_t pv_mda_free;\n"
33131 #: ../src/guestfs-structs.pod:36
33134 " struct guestfs_lvm_pv_list {\n"
33135 " uint32_t len; /* Number of elements in list. */\n"
33136 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33142 #: ../src/guestfs-structs.pod:41
33145 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33146 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33151 #: ../src/guestfs-structs.pod:44
33152 msgid "guestfs_lvm_vg"
33156 #: ../src/guestfs-structs.pod:46
33159 " struct guestfs_lvm_vg {\n"
33160 " char *vg_name;\n"
33161 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33162 " char vg_uuid[32];\n"
33164 " char *vg_attr;\n"
33165 " uint64_t vg_size;\n"
33166 " uint64_t vg_free;\n"
33167 " char *vg_sysid;\n"
33168 " uint64_t vg_extent_size;\n"
33169 " int64_t vg_extent_count;\n"
33170 " int64_t vg_free_count;\n"
33171 " int64_t max_lv;\n"
33172 " int64_t max_pv;\n"
33173 " int64_t pv_count;\n"
33174 " int64_t lv_count;\n"
33175 " int64_t snap_count;\n"
33176 " int64_t vg_seqno;\n"
33177 " char *vg_tags;\n"
33178 " int64_t vg_mda_count;\n"
33179 " uint64_t vg_mda_free;\n"
33185 #: ../src/guestfs-structs.pod:69
33188 " struct guestfs_lvm_vg_list {\n"
33189 " uint32_t len; /* Number of elements in list. */\n"
33190 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33196 #: ../src/guestfs-structs.pod:74
33199 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33200 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33205 #: ../src/guestfs-structs.pod:77
33206 msgid "guestfs_lvm_lv"
33210 #: ../src/guestfs-structs.pod:79
33213 " struct guestfs_lvm_lv {\n"
33214 " char *lv_name;\n"
33215 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33216 " char lv_uuid[32];\n"
33217 " char *lv_attr;\n"
33218 " int64_t lv_major;\n"
33219 " int64_t lv_minor;\n"
33220 " int64_t lv_kernel_major;\n"
33221 " int64_t lv_kernel_minor;\n"
33222 " uint64_t lv_size;\n"
33223 " int64_t seg_count;\n"
33225 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33226 " float snap_percent;\n"
33227 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33228 " float copy_percent;\n"
33229 " char *move_pv;\n"
33230 " char *lv_tags;\n"
33231 " char *mirror_log;\n"
33232 " char *modules;\n"
33238 #: ../src/guestfs-structs.pod:101
33241 " struct guestfs_lvm_lv_list {\n"
33242 " uint32_t len; /* Number of elements in list. */\n"
33243 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33249 #: ../src/guestfs-structs.pod:106
33252 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33253 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33258 #: ../src/guestfs-structs.pod:111
33261 " struct guestfs_stat {\n"
33265 " int64_t nlink;\n"
33270 " int64_t blksize;\n"
33271 " int64_t blocks;\n"
33272 " int64_t atime;\n"
33273 " int64_t mtime;\n"
33274 " int64_t ctime;\n"
33280 #: ../src/guestfs-structs.pod:127
33283 " struct guestfs_stat_list {\n"
33284 " uint32_t len; /* Number of elements in list. */\n"
33285 " struct guestfs_stat *val; /* Elements. */\n"
33291 #: ../src/guestfs-structs.pod:132
33294 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33295 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33300 #: ../src/guestfs-structs.pod:137
33303 " struct guestfs_statvfs {\n"
33304 " int64_t bsize;\n"
33305 " int64_t frsize;\n"
33306 " int64_t blocks;\n"
33307 " int64_t bfree;\n"
33308 " int64_t bavail;\n"
33309 " int64_t files;\n"
33310 " int64_t ffree;\n"
33311 " int64_t favail;\n"
33314 " int64_t namemax;\n"
33320 #: ../src/guestfs-structs.pod:151
33323 " struct guestfs_statvfs_list {\n"
33324 " uint32_t len; /* Number of elements in list. */\n"
33325 " struct guestfs_statvfs *val; /* Elements. */\n"
33331 #: ../src/guestfs-structs.pod:156
33334 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
33335 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
33340 #: ../src/guestfs-structs.pod:159
33341 msgid "guestfs_dirent"
33345 #: ../src/guestfs-structs.pod:161
33348 " struct guestfs_dirent {\n"
33357 #: ../src/guestfs-structs.pod:167
33360 " struct guestfs_dirent_list {\n"
33361 " uint32_t len; /* Number of elements in list. */\n"
33362 " struct guestfs_dirent *val; /* Elements. */\n"
33368 #: ../src/guestfs-structs.pod:172
33371 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
33372 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
33377 #: ../src/guestfs-structs.pod:177
33380 " struct guestfs_version {\n"
33381 " int64_t major;\n"
33382 " int64_t minor;\n"
33383 " int64_t release;\n"
33390 #: ../src/guestfs-structs.pod:184
33393 " struct guestfs_version_list {\n"
33394 " uint32_t len; /* Number of elements in list. */\n"
33395 " struct guestfs_version *val; /* Elements. */\n"
33401 #: ../src/guestfs-structs.pod:189
33404 " void guestfs_free_version (struct guestfs_free_version *);\n"
33405 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
33410 #: ../src/guestfs-structs.pod:192
33411 msgid "guestfs_xattr"
33415 #: ../src/guestfs-structs.pod:194
33418 " struct guestfs_xattr {\n"
33419 " char *attrname;\n"
33420 " /* The next two fields describe a byte array. */\n"
33421 " uint32_t attrval_len;\n"
33422 " char *attrval;\n"
33428 #: ../src/guestfs-structs.pod:201
33431 " struct guestfs_xattr_list {\n"
33432 " uint32_t len; /* Number of elements in list. */\n"
33433 " struct guestfs_xattr *val; /* Elements. */\n"
33439 #: ../src/guestfs-structs.pod:206
33442 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
33443 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
33448 #: ../src/guestfs-structs.pod:209
33449 msgid "guestfs_inotify_event"
33453 #: ../src/guestfs-structs.pod:211
33456 " struct guestfs_inotify_event {\n"
33457 " int64_t in_wd;\n"
33458 " uint32_t in_mask;\n"
33459 " uint32_t in_cookie;\n"
33460 " char *in_name;\n"
33466 #: ../src/guestfs-structs.pod:218
33469 " struct guestfs_inotify_event_list {\n"
33470 " uint32_t len; /* Number of elements in list. */\n"
33471 " struct guestfs_inotify_event *val; /* Elements. */\n"
33477 #: ../src/guestfs-structs.pod:223
33480 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
33481 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
33486 #: ../src/guestfs-structs.pod:226
33487 msgid "guestfs_partition"
33491 #: ../src/guestfs-structs.pod:228
33494 " struct guestfs_partition {\n"
33495 " int32_t part_num;\n"
33496 " uint64_t part_start;\n"
33497 " uint64_t part_end;\n"
33498 " uint64_t part_size;\n"
33504 #: ../src/guestfs-structs.pod:235
33507 " struct guestfs_partition_list {\n"
33508 " uint32_t len; /* Number of elements in list. */\n"
33509 " struct guestfs_partition *val; /* Elements. */\n"
33515 #: ../src/guestfs-structs.pod:240
33518 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
33519 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
33524 #: ../src/guestfs-structs.pod:243
33525 msgid "guestfs_application"
33529 #: ../src/guestfs-structs.pod:245
33532 " struct guestfs_application {\n"
33533 " char *app_name;\n"
33534 " char *app_display_name;\n"
33535 " int32_t app_epoch;\n"
33536 " char *app_version;\n"
33537 " char *app_release;\n"
33538 " char *app_install_path;\n"
33539 " char *app_trans_path;\n"
33540 " char *app_publisher;\n"
33541 " char *app_url;\n"
33542 " char *app_source_package;\n"
33543 " char *app_summary;\n"
33544 " char *app_description;\n"
33550 #: ../src/guestfs-structs.pod:260
33553 " struct guestfs_application_list {\n"
33554 " uint32_t len; /* Number of elements in list. */\n"
33555 " struct guestfs_application *val; /* Elements. */\n"
33561 #: ../src/guestfs-structs.pod:265
33564 " void guestfs_free_application (struct guestfs_free_application *);\n"
33565 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
33570 #: ../src/guestfs.pod:5
33571 msgid "guestfs - Library for accessing and modifying virtual machine images"
33575 #: ../src/guestfs.pod:11
33578 " guestfs_h *g = guestfs_create ();\n"
33579 " guestfs_add_drive (g, \"guest.img\");\n"
33580 " guestfs_launch (g);\n"
33581 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33582 " guestfs_touch (g, \"/hello\");\n"
33583 " guestfs_umount (g, \"/\");\n"
33584 " guestfs_close (g);\n"
33587 " guestfs_h *g = guestfs_create ();\n"
33588 " guestfs_add_drive (g, \"guest.img\");\n"
33589 " guestfs_launch (g);\n"
33590 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33591 " guestfs_touch (g, \"/hello\");\n"
33592 " guestfs_umount (g, \"/\");\n"
33593 " guestfs_close (g);\n"
33597 #: ../src/guestfs.pod:25
33599 "Libguestfs is a library for accessing and modifying guest disk images. "
33600 "Amongst the things this is good for: making batch configuration changes to "
33601 "guests, getting disk used/free statistics (see also: virt-df), migrating "
33602 "between virtualization systems (see also: virt-p2v), performing partial "
33603 "backups, performing partial guest clones, cloning guests and changing "
33604 "registry/UUID/hostname info, and much else besides."
33608 #: ../src/guestfs.pod:33
33610 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
33611 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
33612 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
33617 #: ../src/guestfs.pod:38
33619 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
33620 "what filesystem is in each LV, etc.). It can also run commands in the "
33621 "context of the guest. Also you can access filesystems over FUSE."
33625 #: ../src/guestfs.pod:43
33627 "Libguestfs is a library that can be linked with C and C++ management "
33628 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
33629 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
33634 #: ../src/guestfs.pod:48
33636 "You don't need to be root to use libguestfs, although obviously you do need "
33637 "enough permissions to access the disk images."
33641 #: ../src/guestfs.pod:51
33643 "Libguestfs is a large API because it can do many things. For a gentle "
33644 "introduction, please read the L</API OVERVIEW> section next."
33648 #: ../src/guestfs.pod:54
33650 "There are also some example programs in the L<guestfs-examples(3)> manual "
33655 #: ../src/guestfs.pod:57
33656 msgid "API OVERVIEW"
33660 #: ../src/guestfs.pod:59
33662 "This section provides a gentler overview of the libguestfs API. We also try "
33663 "to group API calls together, where that may not be obvious from reading "
33664 "about the individual calls in the main section of this manual."
33668 #: ../src/guestfs.pod:64
33673 #: ../src/guestfs.pod:66
33675 "Before you can use libguestfs calls, you have to create a handle. Then you "
33676 "must add at least one disk image to the handle, followed by launching the "
33677 "handle, then performing whatever operations you want, and finally closing "
33678 "the handle. By convention we use the single letter C<g> for the name of the "
33679 "handle variable, although of course you can use any name you want."
33683 #: ../src/guestfs.pod:73
33684 msgid "The general structure of all libguestfs-using programs looks like this:"
33688 #: ../src/guestfs.pod:76
33691 " guestfs_h *g = guestfs_create ();\n"
33696 #: ../src/guestfs.pod:78
33699 " /* Call guestfs_add_drive additional times if there are\n"
33700 " * multiple disk images.\n"
33702 " guestfs_add_drive (g, \"guest.img\");\n"
33707 #: ../src/guestfs.pod:83
33710 " /* Most manipulation calls won't work until you've launched\n"
33711 " * the handle 'g'. You have to do this _after_ adding drives\n"
33712 " * and _before_ other commands.\n"
33714 " guestfs_launch (g);\n"
33719 #: ../src/guestfs.pod:89
33722 " /* Now you can examine what partitions, LVs etc are available.\n"
33724 " char **partitions = guestfs_list_partitions (g);\n"
33725 " char **logvols = guestfs_lvs (g);\n"
33730 #: ../src/guestfs.pod:94
33733 " /* To access a filesystem in the image, you must mount it.\n"
33735 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33740 #: ../src/guestfs.pod:98
33743 " /* Now you can perform filesystem actions on the guest\n"
33746 " guestfs_touch (g, \"/hello\");\n"
33751 #: ../src/guestfs.pod:103
33754 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
33755 " * it is done automatically when you close the handle. See\n"
33756 " * discussion of autosync in this page.\n"
33758 " guestfs_sync (g);\n"
33763 #: ../src/guestfs.pod:109
33766 " /* Close the handle 'g'. */\n"
33767 " guestfs_close (g);\n"
33772 #: ../src/guestfs.pod:112
33774 "The code above doesn't include any error checking. In real code you should "
33775 "check return values carefully for errors. In general all functions that "
33776 "return integers return C<-1> on error, and all functions that return "
33777 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
33778 "how to handle errors, and consult the documentation for each function call "
33779 "below to see precisely how they return error indications. See L<guestfs-"
33780 "examples(3)> for fully worked examples."
33784 #: ../src/guestfs.pod:121
33785 msgid "DISK IMAGES"
33789 #: ../src/guestfs.pod:123
33791 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
33792 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
33793 "actual block device, or simply an empty file of zeroes that you have created "
33794 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
33799 #: ../src/guestfs.pod:129
33801 "The call you should use in modern code for adding drives is L</"
33802 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
33803 "specifying that the format is raw, do:"
33807 #: ../src/guestfs.pod:133
33810 " guestfs_add_drive_opts (g, filename,\n"
33811 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
33817 #: ../src/guestfs.pod:137
33818 msgid "You can add a disk read-only using:"
33822 #: ../src/guestfs.pod:139
33825 " guestfs_add_drive_opts (g, filename,\n"
33826 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
33827 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
33833 #: ../src/guestfs.pod:144
33835 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
33836 "libguestfs won't modify the file."
33840 #: ../src/guestfs.pod:147
33842 "Be extremely cautious if the disk image is in use, eg. if it is being used "
33843 "by a virtual machine. Adding it read-write will almost certainly cause disk "
33844 "corruption, but adding it read-only is safe."
33848 #: ../src/guestfs.pod:151
33850 "You must add at least one disk image, and you may add multiple disk images. "
33851 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
33852 "first one you added), C</dev/sdb> (for the second one you added), etc."
33856 #: ../src/guestfs.pod:156
33858 "Once L</guestfs_launch> has been called you cannot add any more images. You "
33859 "can call L</guestfs_list_devices> to get a list of the device names, in the "
33860 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
33864 #: ../src/guestfs.pod:161
33869 #: ../src/guestfs.pod:163
33871 "Before you can read or write files, create directories and so on in a disk "
33872 "image that contains filesystems, you have to mount those filesystems using "
33873 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
33874 "a disk image contains (for example) one partition with a filesystem on that "
33875 "partition, then you can mount it directly:"
33879 #: ../src/guestfs.pod:170
33882 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
33887 #: ../src/guestfs.pod:172
33889 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
33890 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
33891 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
33892 "that these are libguestfs virtual devices, and are nothing to do with host "
33897 #: ../src/guestfs.pod:178
33899 "If you are given a disk image and you don't know what it contains then you "
33900 "have to find out. Libguestfs can do that too: use L</"
33901 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
33902 "LVs, and either try mounting each to see what is mountable, or else examine "
33903 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
33904 "filesystems, use L</guestfs_list_filesystems>."
33908 #: ../src/guestfs.pod:186
33910 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
33911 "L</INSPECTION> below). But you might find it easier to look at higher level "
33912 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
33916 #: ../src/guestfs.pod:191
33918 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
33919 "several other variations of the C<guestfs_mount_*> call."
33923 #: ../src/guestfs.pod:194
33924 msgid "FILESYSTEM ACCESS AND MODIFICATION"
33928 #: ../src/guestfs.pod:196
33930 "The majority of the libguestfs API consists of fairly low-level calls for "
33931 "accessing and modifying the files, directories, symlinks etc on mounted "
33932 "filesystems. There are over a hundred such calls which you can find listed "
33933 "in detail below in this man page, and we don't even pretend to cover them "
33934 "all in this overview."
33938 #: ../src/guestfs.pod:202
33940 "Specify filenames as full paths, starting with C<\"/\"> and including the "
33945 #: ../src/guestfs.pod:205
33947 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
33948 "the file called C<\"etc/passwd\"> then you could do:"
33952 #: ../src/guestfs.pod:208
33955 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
33960 #: ../src/guestfs.pod:210
33962 "This would return C<data> as a newly allocated buffer containing the full "
33963 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
33964 "or C<NULL> if there was an error."
33968 #: ../src/guestfs.pod:214
33970 "As another example, to create a top-level directory on that filesystem "
33971 "called C<\"var\"> you would do:"
33975 #: ../src/guestfs.pod:217
33978 " guestfs_mkdir (g, \"/var\");\n"
33983 #: ../src/guestfs.pod:219
33984 msgid "To create a symlink you could do:"
33988 #: ../src/guestfs.pod:221
33991 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
33992 " \"/etc/rc3.d/S30portmap\");\n"
33997 #: ../src/guestfs.pod:224
33999 "Libguestfs will reject attempts to use relative paths and there is no "
34000 "concept of a current working directory."
34004 #: ../src/guestfs.pod:227
34006 "Libguestfs can return errors in many situations: for example if the "
34007 "filesystem isn't writable, or if a file or directory that you requested "
34008 "doesn't exist. If you are using the C API (documented here) you have to "
34009 "check for those error conditions after each call. (Other language bindings "
34010 "turn these errors into exceptions)."
34014 #: ../src/guestfs.pod:233
34016 "File writes are affected by the per-handle umask, set by calling L</"
34017 "guestfs_umask> and defaulting to 022. See L</UMASK>."
34021 #: ../src/guestfs.pod:236
34022 msgid "PARTITIONING"
34026 #: ../src/guestfs.pod:238
34028 "Libguestfs contains API calls to read, create and modify partition tables on "
34033 #: ../src/guestfs.pod:241
34035 "In the common case where you want to create a single partition covering the "
34036 "whole disk, you should use the L</guestfs_part_disk> call:"
34040 #: ../src/guestfs.pod:245
34043 " const char *parttype = \"mbr\";\n"
34044 " if (disk_is_larger_than_2TB)\n"
34045 " parttype = \"gpt\";\n"
34046 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
34051 #: ../src/guestfs.pod:250
34053 "Obviously this effectively wipes anything that was on that disk image before."
34057 #: ../src/guestfs.pod:253
34062 #: ../src/guestfs.pod:255
34064 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
34065 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
34066 "you familiarize yourself with the concepts of physical volumes, volume "
34067 "groups and logical volumes."
34071 #: ../src/guestfs.pod:260
34073 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
34074 "tldp.org/HOWTO/LVM-HOWTO/>."
34078 #: ../src/guestfs.pod:263
34079 msgid "DOWNLOADING"
34083 #: ../src/guestfs.pod:265
34085 "Use L</guestfs_cat> to download small, text only files. This call is "
34086 "limited to files which are less than 2 MB and which cannot contain any ASCII "
34087 "NUL (C<\\0>) characters. However the API is very simple to use."
34091 #: ../src/guestfs.pod:269
34093 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
34094 "bit data, since it returns a (pointer, size) pair. However it is still "
34095 "limited to \"small\" files, less than 2 MB."
34099 #: ../src/guestfs.pod:273
34101 "L</guestfs_download> can be used to download any file, with no limits on "
34102 "content or size (even files larger than 4 GB)."
34106 #: ../src/guestfs.pod:276
34108 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
34112 #: ../src/guestfs.pod:279
34117 #: ../src/guestfs.pod:281
34119 "It's often the case that you want to write a file or files to the disk image."
34123 #: ../src/guestfs.pod:284
34125 "To write a small file with fixed content, use L</guestfs_write>. To create "
34126 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
34127 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
34128 "of other functions for creating test files, for example L</guestfs_fill> and "
34129 "L</guestfs_fill_pattern>."
34133 #: ../src/guestfs.pod:290
34135 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34136 "file content or size (even files larger than 4 GB)."
34140 #: ../src/guestfs.pod:293
34142 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34146 #: ../src/guestfs.pod:295
34148 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34149 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
34150 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
34151 "in a predictable way (eg. adding it last after all other drives) then you "
34152 "can get the device name from L</guestfs_list_devices> and mount it directly "
34153 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
34154 "portable between kernel versions, and they don't support labels or UUIDs. "
34155 "If you want to pre-build an image or you need to mount it using a label or "
34156 "UUID, use an ISO image instead."
34160 #: ../src/guestfs.pod:306
34165 #: ../src/guestfs.pod:308
34167 "There are various different commands for copying between files and devices "
34168 "and in and out of the guest filesystem. These are summarised in the table "
34173 #: ../src/guestfs.pod:314
34174 msgid "B<file> to B<file>"
34178 #: ../src/guestfs.pod:316
34180 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34181 "directories recursively."
34185 #: ../src/guestfs.pod:319
34186 msgid "B<file or device> to B<file or device>"
34190 #: ../src/guestfs.pod:321
34192 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
34193 "devices in the guest."
34197 #: ../src/guestfs.pod:324
34198 msgid "Example: duplicate the contents of an LV:"
34202 #: ../src/guestfs.pod:326
34205 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
34210 #: ../src/guestfs.pod:328
34212 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34213 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
34214 "guestfs_copy_size>."
34218 #: ../src/guestfs.pod:332
34219 msgid "B<file on the host> to B<file or device>"
34223 #: ../src/guestfs.pod:334
34224 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34228 #: ../src/guestfs.pod:336
34229 msgid "B<file or device> to B<file on the host>"
34233 #: ../src/guestfs.pod:338
34234 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34238 #: ../src/guestfs.pod:342
34239 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34243 #: ../src/guestfs.pod:344
34245 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
34246 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34247 "appears you can only upload and download to files. However many Un*x-like "
34248 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
34249 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
34250 "and arbitrary file descriptor N."
34254 #: ../src/guestfs.pod:352
34255 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34259 #: ../src/guestfs.pod:355
34262 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34267 #: ../src/guestfs.pod:357
34268 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34272 #: ../src/guestfs.pod:359
34275 " char devfd[64];\n"
34276 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34277 " guestfs_tar_out (g, \"/\", devfd);\n"
34282 #: ../src/guestfs.pod:363
34283 msgid "LISTING FILES"
34287 #: ../src/guestfs.pod:365
34289 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
34290 "L<guestfish(1)>-equivalent command C<ll>)."
34294 #: ../src/guestfs.pod:368
34296 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
34297 "programs, as a flat list of strings."
34301 #: ../src/guestfs.pod:371
34303 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
34304 "directory, plus additional information about each one. It is more "
34305 "equivalent to using the L<readdir(3)> call on a local filesystem."
34309 #: ../src/guestfs.pod:375
34311 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
34315 #: ../src/guestfs.pod:378
34316 msgid "RUNNING COMMANDS"
34320 #: ../src/guestfs.pod:380
34322 "Although libguestfs is primarily an API for manipulating files inside guest "
34323 "images, we also provide some limited facilities for running commands inside "
34328 #: ../src/guestfs.pod:384
34329 msgid "There are many limitations to this:"
34333 #: ../src/guestfs.pod:390
34335 "The kernel version that the command runs under will be different from what "
34340 #: ../src/guestfs.pod:395
34342 "If the command needs to communicate with daemons, then most likely they "
34343 "won't be running."
34347 #: ../src/guestfs.pod:400
34348 msgid "The command will be running in limited memory."
34352 #: ../src/guestfs.pod:404
34354 "The network may not be available unless you enable it (see L</"
34355 "guestfs_set_network>)."
34359 #: ../src/guestfs.pod:409
34360 msgid "Only supports Linux guests (not Windows, BSD, etc)."
34364 #: ../src/guestfs.pod:413
34366 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
34370 #: ../src/guestfs.pod:418
34372 "For SELinux guests, you may need to enable SELinux and load policy first. "
34373 "See L</SELINUX> in this manpage."
34377 #: ../src/guestfs.pod:423
34379 "I<Security:> It is not safe to run commands from untrusted, possibly "
34380 "malicious guests. These commands may attempt to exploit your program by "
34381 "sending unexpected output. They could also try to exploit the Linux kernel "
34382 "or qemu provided by the libguestfs appliance. They could use the network "
34383 "provided by the libguestfs appliance to bypass ordinary network partitions "
34384 "and firewalls. They could use the elevated privileges or different SELinux "
34385 "context of your program to their advantage."
34389 #: ../src/guestfs.pod:432
34391 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
34392 "(a script which runs when the guest next boots normally), and to have this "
34393 "script run the commands you want in the normal context of the running guest, "
34394 "network security and so on. For information about other security issues, "
34395 "see L</SECURITY>."
34399 #: ../src/guestfs.pod:440
34401 "The two main API calls to run commands are L</guestfs_command> and L</"
34402 "guestfs_sh> (there are also variations)."
34406 #: ../src/guestfs.pod:443
34408 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
34409 "shell globs, redirections, etc will work."
34413 #: ../src/guestfs.pod:446
34414 msgid "CONFIGURATION FILES"
34418 #: ../src/guestfs.pod:448
34420 "To read and write configuration files in Linux guest filesystems, we "
34421 "strongly recommend using Augeas. For example, Augeas understands how to "
34422 "read and write, say, a Linux shadow password file or X.org configuration "
34423 "file, and so avoids you having to write that code."
34427 #: ../src/guestfs.pod:453
34429 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
34430 "document Augeas itself here because there is excellent documentation on the "
34431 "L<http://augeas.net/> website."
34435 #: ../src/guestfs.pod:457
34437 "If you don't want to use Augeas (you fool!) then try calling L</"
34438 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
34443 #: ../src/guestfs.pod:461
34448 #: ../src/guestfs.pod:463
34450 "We support SELinux guests. To ensure that labeling happens correctly in "
34451 "SELinux guests, you need to enable SELinux and load the guest's policy:"
34455 #: ../src/guestfs.pod:471
34456 msgid "Before launching, do:"
34460 #: ../src/guestfs.pod:473
34463 " guestfs_set_selinux (g, 1);\n"
34468 #: ../src/guestfs.pod:477
34470 "After mounting the guest's filesystem(s), load the policy. This is best "
34471 "done by running the L<load_policy(8)> command in the guest itself:"
34475 #: ../src/guestfs.pod:481
34478 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
34483 #: ../src/guestfs.pod:483
34485 "(Older versions of C<load_policy> require you to specify the name of the "
34490 #: ../src/guestfs.pod:488
34492 "Optionally, set the security context for the API. The correct security "
34493 "context to use can only be known by inspecting the guest. As an example:"
34497 #: ../src/guestfs.pod:492
34500 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
34505 #: ../src/guestfs.pod:496
34506 msgid "This will work for running commands and editing existing files."
34510 #: ../src/guestfs.pod:498
34512 "When new files are created, you may need to label them explicitly, for "
34513 "example by running the external command C<restorecon pathname>."
34517 #: ../src/guestfs.pod:502
34522 #: ../src/guestfs.pod:504
34524 "Certain calls are affected by the current file mode creation mask (the "
34525 "\"umask\"). In particular ones which create files or directories, such as "
34526 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
34527 "either the default mode that the file is created with or modifies the mode "
34532 #: ../src/guestfs.pod:510
34534 "The default umask is C<022>, so files are created with modes such as C<0644> "
34535 "and directories with C<0755>."
34539 #: ../src/guestfs.pod:513
34541 "There are two ways to avoid being affected by umask. Either set umask to 0 "
34542 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
34543 "guestfs_chmod> after creating each file or directory."
34547 #: ../src/guestfs.pod:517
34548 msgid "For more information about umask, see L<umask(2)>."
34552 #: ../src/guestfs.pod:521
34554 "Libguestfs allows you to access Linux guests which have been encrypted using "
34555 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
34556 "standard. This includes nearly all whole disk encryption systems used by "
34557 "modern Linux guests."
34561 #: ../src/guestfs.pod:527
34563 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
34564 "returns the string C<crypto_LUKS>)."
34568 #: ../src/guestfs.pod:530
34570 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
34571 "will require the passphrase!"
34575 #: ../src/guestfs.pod:533
34577 "Opening a LUKS device creates a new device mapper device called C</dev/"
34578 "mapper/mapname> (where C<mapname> is the string you supply to L</"
34579 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
34580 "from and encrypted to the underlying block device respectively."
34584 #: ../src/guestfs.pod:539
34586 "LVM volume groups on the device can be made visible by calling L</"
34587 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
34588 "(s) can now be mounted in the usual way."
34592 #: ../src/guestfs.pod:543
34594 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
34595 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
34596 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
34597 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
34598 "underlying encrypted block device)."
34602 #: ../src/guestfs.pod:550
34607 #: ../src/guestfs.pod:552
34609 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
34610 "contains operating systems, an install CD or a live CD. (These APIs used to "
34611 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
34612 "version 1.5.3 the most frequently used part of this library has been "
34613 "rewritten in C and moved into the core code)."
34617 #: ../src/guestfs.pod:559
34619 "Add all disks belonging to the unknown virtual machine and call L</"
34620 "guestfs_launch> in the usual way."
34624 #: ../src/guestfs.pod:562
34626 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
34627 "and certain heuristics, and returns a list of operating systems that were "
34628 "found. An empty list means none were found. A single element is the root "
34629 "filesystem of the operating system. For dual- or multi-boot guests, "
34630 "multiple roots can be returned, each one corresponding to a separate "
34631 "operating system. (Multi-boot virtual machines are extremely rare in the "
34632 "world of virtualization, but since this scenario can happen, we have built "
34633 "libguestfs to deal with it.)"
34637 #: ../src/guestfs.pod:571
34639 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
34640 "to get additional details about that operating system. For example, call L</"
34641 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
34642 "Windows and Linux-based operating systems respectively."
34646 #: ../src/guestfs.pod:577
34648 "Un*x-like and Linux-based operating systems usually consist of several "
34649 "filesystems which are mounted at boot time (for example, a separate boot "
34650 "partition mounted on C</boot>). The inspection rules are able to detect how "
34651 "filesystems correspond to mount points. Call "
34652 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
34653 "hash table like this example:"
34657 #: ../src/guestfs.pod:584
34660 " /boot => /dev/sda1\n"
34661 " / => /dev/vg_guest/lv_root\n"
34662 " /usr => /dev/vg_guest/lv_usr\n"
34667 #: ../src/guestfs.pod:588
34669 "The caller can then make calls to L</guestfs_mount_options> to mount the "
34670 "filesystems as suggested."
34674 #: ../src/guestfs.pod:591
34676 "Be careful to mount filesystems in the right order (eg. C</> before C</"
34677 "usr>). Sorting the keys of the hash by length, shortest first, should work."
34681 #: ../src/guestfs.pod:595
34683 "Inspection currently only works for some common operating systems. "
34684 "Contributors are welcome to send patches for other operating systems that we "
34685 "currently cannot detect."
34689 #: ../src/guestfs.pod:599
34691 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
34692 "for more details. The L</guestfs_inspect_os> function just ignores any "
34693 "encrypted devices."
34697 #: ../src/guestfs.pod:603
34699 "A note on the implementation: The call L</guestfs_inspect_os> performs "
34700 "inspection and caches the results in the guest handle. Subsequent calls to "
34701 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
34702 "read the disks. If you change the content of the guest disks, you can redo "
34703 "inspection by calling L</guestfs_inspect_os> again. (L</"
34704 "guestfs_inspect_list_applications> works a little differently from the other "
34705 "calls and does read the disks. See documentation for that function for "
34710 #: ../src/guestfs.pod:612
34711 msgid "INSPECTING INSTALL DISKS"
34715 #: ../src/guestfs.pod:614
34717 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
34722 #: ../src/guestfs.pod:617
34724 "Call L</guestfs_inspect_get_format> to return the format of the operating "
34725 "system, which currently can be C<installed> (a regular operating system) or "
34726 "C<installer> (some sort of install disk)."
34730 #: ../src/guestfs.pod:621
34732 "Further information is available about the operating system that can be "
34733 "installed using the regular inspection APIs like L</"
34734 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
34738 #: ../src/guestfs.pod:626
34740 "Some additional information specific to installer disks is also available "
34741 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
34742 "guestfs_inspect_is_multipart> calls."
34746 #: ../src/guestfs.pod:631
34747 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
34751 #: ../src/guestfs.pod:633
34753 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
34754 "ntfs-3g.org/> driver."
34758 #: ../src/guestfs.pod:636
34759 msgid "DRIVE LETTERS AND PATHS"
34763 #: ../src/guestfs.pod:638
34765 "DOS and Windows still use drive letters, and the filesystems are always "
34766 "treated as case insensitive by Windows itself, and therefore you might find "
34767 "a Windows configuration file referring to a path like C<c:\\windows"
34768 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
34769 "might be referred to as C</WINDOWS/System32>."
34773 #: ../src/guestfs.pod:644
34775 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
34776 "L</guestfs_inspect_get_drive_mappings>)"
34780 #: ../src/guestfs.pod:647
34782 "Dealing with separator characters (backslash vs forward slash) is outside "
34783 "the scope of libguestfs, but usually a simple character replacement will "
34788 #: ../src/guestfs.pod:651
34790 "To resolve the case insensitivity of paths, call L</"
34791 "guestfs_case_sensitive_path>."
34795 #: ../src/guestfs.pod:654
34796 msgid "ACCESSING THE WINDOWS REGISTRY"
34800 #: ../src/guestfs.pod:656
34802 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
34803 "files, through the library C<hivex> which is part of the libguestfs project "
34804 "although ships as a separate tarball. You have to locate and download the "
34805 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
34806 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
34807 "reg(1)> for more help on this issue."
34811 #: ../src/guestfs.pod:664
34812 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
34816 #: ../src/guestfs.pod:666
34818 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
34819 "provide something which looks like a Linux symlink. The way it tries to do "
34820 "the rewriting is described here:"
34824 #: ../src/guestfs.pod:670
34826 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
34831 #: ../src/guestfs.pod:672
34833 "The essential problem is that ntfs-3g simply does not have enough "
34834 "information to do a correct job. NTFS links can contain drive letters and "
34835 "references to external device GUIDs that ntfs-3g has no way of resolving. "
34836 "It is almost certainly the case that libguestfs callers should ignore what "
34837 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
34841 #: ../src/guestfs.pod:679
34843 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
34844 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
34845 "attribute, and read the raw reparse data from that (you can find the format "
34846 "documented in various places around the web)."
34850 #: ../src/guestfs.pod:684
34851 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
34855 #: ../src/guestfs.pod:686
34857 "There are other useful extended attributes that can be read from ntfs-3g "
34858 "filesystems (using L</guestfs_getxattr>). See:"
34862 #: ../src/guestfs.pod:689
34864 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
34868 #: ../src/guestfs.pod:691
34869 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
34873 #: ../src/guestfs.pod:693
34875 "Although we don't want to discourage you from using the C API, we will "
34876 "mention here that the same API is also available in other languages."
34880 #: ../src/guestfs.pod:696
34882 "The API is broadly identical in all supported languages. This means that "
34883 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
34884 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
34885 "OCaml. In other words, a straightforward, predictable isomorphism between "
34890 #: ../src/guestfs.pod:702
34892 "Error messages are automatically transformed into exceptions if the language "
34897 #: ../src/guestfs.pod:705
34899 "We don't try to \"object orientify\" parts of the API in OO languages, "
34900 "although contributors are welcome to write higher level APIs above what we "
34901 "provide in their favourite languages if they wish."
34905 #: ../src/guestfs.pod:711
34910 #: ../src/guestfs.pod:713
34912 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
34913 "identical to the C API. C++ classes and exceptions are not used."
34917 #: ../src/guestfs.pod:717
34922 #: ../src/guestfs.pod:719
34924 "The C# bindings are highly experimental. Please read the warnings at the "
34925 "top of C<csharp/Libguestfs.cs>."
34929 #: ../src/guestfs.pod:722
34934 #: ../src/guestfs.pod:724
34935 msgid "See L<guestfs-erlang(3)>."
34939 #: ../src/guestfs.pod:726
34944 #: ../src/guestfs.pod:728
34946 "This is the only language binding that is working but incomplete. Only "
34947 "calls which return simple integers have been bound in Haskell, and we are "
34948 "looking for help to complete this binding."
34952 #: ../src/guestfs.pod:732
34957 #: ../src/guestfs.pod:734
34959 "Full documentation is contained in the Javadoc which is distributed with "
34960 "libguestfs. For examples, see L<guestfs-java(3)>."
34964 #: ../src/guestfs.pod:737
34969 #: ../src/guestfs.pod:739
34970 msgid "See L<guestfs-ocaml(3)>."
34974 #: ../src/guestfs.pod:741
34979 #: ../src/guestfs.pod:743
34980 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
34984 #: ../src/guestfs.pod:745
34989 #: ../src/guestfs.pod:747
34991 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
34992 "the php-libguestfs package for your distribution."
34996 #: ../src/guestfs.pod:750
34997 msgid "The PHP binding only works correctly on 64 bit machines."
35001 #: ../src/guestfs.pod:752
35006 #: ../src/guestfs.pod:754
35007 msgid "See L<guestfs-python(3)>."
35011 #: ../src/guestfs.pod:756
35016 #: ../src/guestfs.pod:758
35017 msgid "See L<guestfs-ruby(3)>."
35021 #: ../src/guestfs.pod:760
35022 msgid "B<shell scripts>"
35026 #: ../src/guestfs.pod:762
35027 msgid "See L<guestfish(1)>."
35031 #: ../src/guestfs.pod:766
35032 msgid "LIBGUESTFS GOTCHAS"
35036 #: ../src/guestfs.pod:768
35038 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
35039 "system [...] that works in the way it is documented but is counterintuitive "
35040 "and almost invites mistakes.\""
35044 #: ../src/guestfs.pod:772
35046 "Since we developed libguestfs and the associated tools, there are several "
35047 "things we would have designed differently, but are now stuck with for "
35048 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
35049 "release, you can expect these to change. Beware of them."
35053 #: ../src/guestfs.pod:780
35054 msgid "Autosync / forgetting to sync."
35058 #: ../src/guestfs.pod:782
35060 "I<Update:> Autosync is enabled by default for all API users starting from "
35061 "libguestfs 1.5.24. This section only applies to older versions."
35065 #: ../src/guestfs.pod:785
35067 "When modifying a filesystem from C or another language, you B<must> unmount "
35068 "all filesystems and call L</guestfs_sync> explicitly before you close the "
35069 "libguestfs handle. You can also call:"
35073 #: ../src/guestfs.pod:789
35076 " guestfs_set_autosync (g, 1);\n"
35081 #: ../src/guestfs.pod:791
35083 "to have the unmount/sync done automatically for you when the handle 'g' is "
35084 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
35088 #: ../src/guestfs.pod:795
35090 "If you forget to do this, then it is entirely possible that your changes "
35091 "won't be written out, or will be partially written, or (very rarely) that "
35092 "you'll get disk corruption."
35096 #: ../src/guestfs.pod:799
35098 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
35099 "guestfish scripts that forget to sync will work just fine, which can make "
35100 "this very puzzling if you are trying to debug a problem."
35104 #: ../src/guestfs.pod:803
35105 msgid "Mount option C<-o sync> should not be the default."
35109 #: ../src/guestfs.pod:805
35111 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
35112 "libguestfs 1.13.16. This section only applies to older versions."
35116 #: ../src/guestfs.pod:808
35118 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
35119 "However C<-o sync> does not add any reliability benefit, but does have a "
35120 "very large performance impact."
35124 #: ../src/guestfs.pod:812
35126 "The work around is to use L</guestfs_mount_options> and set the mount "
35127 "options that you actually want to use."
35131 #: ../src/guestfs.pod:815
35132 msgid "Read-only should be the default."
35136 #: ../src/guestfs.pod:817
35138 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35139 "specify I<--rw> if you want to make changes to the image."
35143 #: ../src/guestfs.pod:820
35144 msgid "This would reduce the potential to corrupt live VM images."
35148 #: ../src/guestfs.pod:822
35150 "Note that many filesystems change the disk when you just mount and unmount, "
35151 "even if you didn't perform any writes. You need to use L</"
35152 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
35156 #: ../src/guestfs.pod:826
35157 msgid "guestfish command line is hard to use."
35161 #: ../src/guestfs.pod:828
35163 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35164 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35165 "exist, so it fails. In earlier versions of guestfish the error message was "
35166 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35167 "we should have used C<guestfish -c command> to run commands."
35171 #: ../src/guestfs.pod:835
35172 msgid "guestfish megabyte modifiers don't work right on all commands"
35176 #: ../src/guestfs.pod:837
35178 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35179 "other modifiers). What guestfish actually does is to multiply the number "
35180 "part by the modifier part and pass the result to the C API. However this "
35181 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35182 "expecting some other unit (eg. megabytes)."
35186 #: ../src/guestfs.pod:844
35187 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35191 #: ../src/guestfs.pod:846
35194 " lvcreate LV VG 100M\n"
35199 #: ../src/guestfs.pod:848
35201 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35202 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35203 "megabytes * megabytes) logical volume. The error message you get from this "
35204 "is also a little obscure."
35208 #: ../src/guestfs.pod:853
35210 "This could be fixed in the generator by specially marking parameters and "
35211 "return values which take bytes or other units."
35215 #: ../src/guestfs.pod:856
35216 msgid "Ambiguity between devices and paths"
35220 #: ../src/guestfs.pod:858
35222 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
35223 "sdb2>) and a similar pathname. A file might just happen to be called "
35224 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35228 #: ../src/guestfs.pod:863
35230 "In the current API we usually resolve this ambiguity by having two separate "
35231 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35232 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35233 "detecting if the path supplied begins with C</dev/>."
35237 #: ../src/guestfs.pod:869
35239 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35240 "make paths/devices into structured names. One way to do this would be to "
35241 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35242 "aspect of grub. Another way would be to use a structured type, equivalent "
35243 "to this OCaml type:"
35247 #: ../src/guestfs.pod:875
35250 " type path = Path of string | Device of int | Partition of int * int\n"
35255 #: ../src/guestfs.pod:877
35256 msgid "which would allow you to pass arguments like:"
35260 #: ../src/guestfs.pod:879
35263 " Path \"/foo/bar\"\n"
35264 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35265 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35266 " Path \"/dev/sdb2\" (* not a device *)\n"
35271 #: ../src/guestfs.pod:884
35273 "As you can see there are still problems to resolve even with this "
35274 "representation. Also consider how it might work in guestfish."
35278 #: ../src/guestfs.pod:889
35279 msgid "KEYS AND PASSPHRASES"
35283 #: ../src/guestfs.pod:891
35285 "Certain libguestfs calls take a parameter that contains sensitive key "
35286 "material, passed in as a C string."
35290 #: ../src/guestfs.pod:894
35292 "In the future we would hope to change the libguestfs implementation so that "
35293 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
35294 "swap. However this is I<not> done at the moment, because of the complexity "
35295 "of such an implementation."
35299 #: ../src/guestfs.pod:899
35301 "Therefore you should be aware that any key parameter you pass to libguestfs "
35302 "might end up being written out to the swap partition. If this is a concern, "
35303 "scrub the swap partition or don't use libguestfs on encrypted devices."
35307 #: ../src/guestfs.pod:904
35308 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
35312 #: ../src/guestfs.pod:906
35314 "All high-level libguestfs actions are synchronous. If you want to use "
35315 "libguestfs asynchronously then you must create a thread."
35319 #: ../src/guestfs.pod:909
35321 "Only use the handle from a single thread. Either use the handle exclusively "
35322 "from one thread, or provide your own mutex so that two threads cannot issue "
35323 "calls on the same handle at the same time."
35327 #: ../src/guestfs.pod:913
35329 "See the graphical program guestfs-browser for one possible architecture for "
35330 "multithreaded programs using libvirt and libguestfs."
35334 #: ../src/guestfs.pod:916
35339 #: ../src/guestfs.pod:918
35341 "Libguestfs needs a supermin appliance, which it finds by looking along an "
35346 #: ../src/guestfs.pod:921
35348 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
35349 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
35353 #: ../src/guestfs.pod:924
35355 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
35356 "to change the directories that libguestfs will search in. The value is a "
35357 "colon-separated list of paths. The current directory is I<not> searched "
35358 "unless the path contains an empty element or C<.>. For example "
35359 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
35360 "then C</usr/lib/guestfs>."
35364 #: ../src/guestfs.pod:931
35365 msgid "QEMU WRAPPERS"
35369 #: ../src/guestfs.pod:933
35371 "If you want to compile your own qemu, run qemu from a non-standard location, "
35372 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
35377 #: ../src/guestfs.pod:937
35379 "There is one important rule to remember: you I<must C<exec qemu>> as the "
35380 "last command in the shell script (so that qemu replaces the shell and "
35381 "becomes the direct child of the libguestfs-using program). If you don't do "
35382 "this, then the qemu process won't be cleaned up correctly."
35386 #: ../src/guestfs.pod:942
35388 "Here is an example of a wrapper, where I have built my own copy of qemu from "
35393 #: ../src/guestfs.pod:945
35397 " qemudir=/home/rjones/d/qemu\n"
35398 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
35403 #: ../src/guestfs.pod:949
35405 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
35406 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
35411 #: ../src/guestfs.pod:953
35414 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
35419 #: ../src/guestfs.pod:955
35421 "Note that libguestfs also calls qemu with the -help and -version options in "
35422 "order to determine features."
35426 #: ../src/guestfs.pod:958
35428 "Wrappers can also be used to edit the options passed to qemu. In the "
35429 "following example, the C<-machine ...> option (C<-machine> and the following "
35430 "argument) are removed from the command line and replaced with C<-machine pc,"
35431 "accel=tcg>. The while loop iterates over the options until it finds the "
35432 "right one to remove, putting the remaining options into the C<args> array."
35436 #: ../src/guestfs.pod:967
35440 " while [ $# -gt 0 ]; do\n"
35441 " case \"$1\" in\n"
35445 " args[i]=\"$1\"\n"
35454 #: ../src/guestfs.pod:979
35457 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
35462 #: ../src/guestfs.pod:981
35463 msgid "ATTACHING TO RUNNING DAEMONS"
35467 #: ../src/guestfs.pod:983
35469 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
35470 "babies. Use with caution."
35474 #: ../src/guestfs.pod:986
35476 "I<Note (2):> This section explains how to attach to a running daemon from a "
35477 "low level perspective. For most users, simply using virt tools such as "
35478 "L<guestfish(1)> with the I<--live> option will \"just work\"."
35482 #: ../src/guestfs.pod:990
35483 msgid "Using guestfs_set_attach_method"
35487 #: ../src/guestfs.pod:992
35489 "By calling L</guestfs_set_attach_method> you can change how the library "
35490 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
35491 "ARCHITECTURE> for some background)."
35495 #: ../src/guestfs.pod:996
35497 "The normal attach method is C<appliance>, where a small appliance is created "
35498 "containing the daemon, and then the library connects to this."
35502 #: ../src/guestfs.pod:999
35504 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
35505 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
35506 "daemon over the Unix domain socket."
35510 #: ../src/guestfs.pod:1003
35512 "The normal use for this is to connect to a running virtual machine that "
35513 "contains a C<guestfsd> daemon, and send commands so you can read and write "
35514 "files inside the live virtual machine."
35518 #: ../src/guestfs.pod:1007
35519 msgid "Using guestfs_add_domain with live flag"
35523 #: ../src/guestfs.pod:1009
35525 "L</guestfs_add_domain> provides some help for getting the correct attach "
35526 "method. If you pass the C<live> option to this function, then (if the "
35527 "virtual machine is running) it will examine the libvirt XML looking for a "
35528 "virtio-serial channel to connect to:"
35532 #: ../src/guestfs.pod:1015
35539 " <channel type='unix'>\n"
35540 " <source mode='bind' path='/path/to/socket'/>\n"
35541 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
35550 #: ../src/guestfs.pod:1027
35552 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
35553 "method to C<unix:/path/to/socket>."
35557 #: ../src/guestfs.pod:1030
35559 "Some of the libguestfs tools (including guestfish) support a I<--live> "
35560 "option which is passed through to L</guestfs_add_domain> thus allowing you "
35561 "to attach to and modify live virtual machines."
35565 #: ../src/guestfs.pod:1034
35567 "The virtual machine needs to have been set up beforehand so that it has the "
35568 "virtio-serial channel and so that guestfsd is running inside it."
35572 #: ../src/guestfs.pod:1038
35573 msgid "ABI GUARANTEE"
35577 #: ../src/guestfs.pod:1040
35579 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
35580 "actions as outlined in this section. Although we will deprecate some "
35581 "actions, for example if they get replaced by newer calls, we will keep the "
35582 "old actions forever. This allows you the developer to program in confidence "
35583 "against the libguestfs API."
35587 #: ../src/guestfs.pod:1046
35588 msgid "BLOCK DEVICE NAMING"
35592 #: ../src/guestfs.pod:1048
35594 "In the kernel there is now quite a profusion of schemata for naming block "
35595 "devices (in this context, by I<block device> I mean a physical or virtual "
35596 "hard drive). The original Linux IDE driver used names starting with C</dev/"
35597 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
35598 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
35599 "for the old IDE driver (particularly for SATA devices) those devices also "
35600 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
35601 "paravirtualized drivers. This has created several different naming systems, "
35602 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
35606 #: ../src/guestfs.pod:1060
35608 "As discussed above, libguestfs uses a qemu appliance running an embedded "
35609 "Linux kernel to access block devices. We can run a variety of appliances "
35610 "based on a variety of Linux kernels."
35614 #: ../src/guestfs.pod:1064
35616 "This causes a problem for libguestfs because many API calls use device or "
35617 "partition names. Working scripts and the recipe (example) scripts that we "
35618 "make available over the internet could fail if the naming scheme changes."
35622 #: ../src/guestfs.pod:1069
35624 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
35625 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
35626 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
35627 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
35631 #: ../src/guestfs.pod:1075
35633 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
35634 "L</guestfs_list_partitions> and similar calls return the true names of the "
35635 "devices and partitions as known to the appliance."
35639 #: ../src/guestfs.pod:1080
35640 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
35644 #: ../src/guestfs.pod:1082
35646 "Usually this translation is transparent. However in some (very rare) cases "
35647 "you may need to know the exact algorithm. Such cases include where you use "
35648 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
35649 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
35653 #: ../src/guestfs.pod:1088
35655 "The algorithm is applied only to I<parameters> which are known to be either "
35656 "device or partition names. Return values from functions such as L</"
35657 "guestfs_list_devices> are never changed."
35661 #: ../src/guestfs.pod:1096
35662 msgid "Is the string a parameter which is a device or partition name?"
35666 #: ../src/guestfs.pod:1100
35667 msgid "Does the string begin with C</dev/sd>?"
35671 #: ../src/guestfs.pod:1104
35673 "Does the named device exist? If so, we use that device. However if I<not> "
35674 "then we continue with this algorithm."
35678 #: ../src/guestfs.pod:1109
35679 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
35683 #: ../src/guestfs.pod:1111
35684 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
35688 #: ../src/guestfs.pod:1113
35689 msgid "If that named device exists, use it. If not, continue."
35693 #: ../src/guestfs.pod:1117
35694 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
35698 #: ../src/guestfs.pod:1119
35699 msgid "If that named device exists, use it. If not, return an error."
35703 #: ../src/guestfs.pod:1123
35704 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
35708 #: ../src/guestfs.pod:1125
35710 "Although the standard naming scheme and automatic translation is useful for "
35711 "simple programs and guestfish scripts, for larger programs it is best not to "
35712 "rely on this mechanism."
35716 #: ../src/guestfs.pod:1129
35718 "Where possible for maximum future portability programs using libguestfs "
35719 "should use these future-proof techniques:"
35723 #: ../src/guestfs.pod:1136
35725 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
35726 "device names, and then use those names directly."
35730 #: ../src/guestfs.pod:1139
35732 "Since those device names exist by definition, they will never be translated."
35736 #: ../src/guestfs.pod:1144
35738 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
35739 "filesystem labels."
35743 #: ../src/guestfs.pod:1151
35745 "This section discusses security implications of using libguestfs, "
35746 "particularly with untrusted or malicious guests or disk images."
35750 #: ../src/guestfs.pod:1154
35751 msgid "GENERAL SECURITY CONSIDERATIONS"
35755 #: ../src/guestfs.pod:1156
35757 "Be careful with any files or data that you download from a guest (by "
35758 "\"download\" we mean not just the L</guestfs_download> command but any "
35759 "command that reads files, filenames, directories or anything else from a "
35760 "disk image). An attacker could manipulate the data to fool your program "
35761 "into doing the wrong thing. Consider cases such as:"
35765 #: ../src/guestfs.pod:1166
35766 msgid "the data (file etc) not being present"
35770 #: ../src/guestfs.pod:1170
35771 msgid "being present but empty"
35775 #: ../src/guestfs.pod:1174
35776 msgid "being much larger than normal"
35780 #: ../src/guestfs.pod:1178
35781 msgid "containing arbitrary 8 bit data"
35785 #: ../src/guestfs.pod:1182
35786 msgid "being in an unexpected character encoding"
35790 #: ../src/guestfs.pod:1186
35791 msgid "containing homoglyphs."
35795 #: ../src/guestfs.pod:1190
35796 msgid "SECURITY OF MOUNTING FILESYSTEMS"
35800 #: ../src/guestfs.pod:1192
35802 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
35803 "(VFS) module can sometimes be escalated into exploits by deliberately "
35804 "creating a malicious, malformed filesystem. These exploits are very severe "
35805 "for two reasons. Firstly there are very many filesystem drivers in the "
35806 "kernel, and many of them are infrequently used and not much developer "
35807 "attention has been paid to the code. Linux userspace helps potential "
35808 "crackers by detecting the filesystem type and automatically choosing the "
35809 "right VFS driver, even if that filesystem type is obscure or unexpected for "
35810 "the administrator. Secondly, a kernel-level exploit is like a local root "
35811 "exploit (worse in some ways), giving immediate and total access to the "
35812 "system right down to the hardware level."
35816 #: ../src/guestfs.pod:1205
35818 "That explains why you should never mount a filesystem from an untrusted "
35819 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
35820 "inside a qemu virtual machine, usually running as a non-root user. The "
35821 "attacker would need to write a filesystem which first exploited the kernel, "
35822 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
35823 "the libguestfs protocol, and finally to be as serious as the host kernel "
35824 "exploit it would need to escalate its privileges to root. This multi-step "
35825 "escalation, performed by a static piece of data, is thought to be extremely "
35826 "hard to do, although we never say 'never' about security issues."
35830 #: ../src/guestfs.pod:1216
35832 "In any case callers can reduce the attack surface by forcing the filesystem "
35833 "type when mounting (use L</guestfs_mount_vfs>)."
35837 #: ../src/guestfs.pod:1219
35838 msgid "PROTOCOL SECURITY"
35842 #: ../src/guestfs.pod:1221
35844 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
35845 "defined upper message size. However a program that uses libguestfs must "
35846 "also take care - for example you can write a program that downloads a binary "
35847 "from a disk image and executes it locally, and no amount of protocol "
35848 "security will save you from the consequences."
35852 #: ../src/guestfs.pod:1227
35853 msgid "INSPECTION SECURITY"
35857 #: ../src/guestfs.pod:1229
35859 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
35860 "directly from the guest, and these could contain any 8 bit data. Callers "
35861 "should be careful to escape these before printing them to a structured file "
35862 "(for example, use HTML escaping if creating a web page)."
35866 #: ../src/guestfs.pod:1235
35868 "Guest configuration may be altered in unusual ways by the administrator of "
35869 "the virtual machine, and may not reflect reality (particularly for untrusted "
35870 "or actively malicious guests). For example we parse the hostname from "
35871 "configuration files like C</etc/sysconfig/network> that we find in the "
35872 "guest, but the guest administrator can easily manipulate these files to "
35873 "provide the wrong hostname."
35877 #: ../src/guestfs.pod:1243
35879 "The inspection API parses guest configuration using two external libraries: "
35880 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
35881 "designed to be robust in the face of malicious data, although denial of "
35882 "service attacks are still possible, for example with oversized configuration "
35887 #: ../src/guestfs.pod:1249
35888 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
35892 #: ../src/guestfs.pod:1251
35894 "Be very cautious about running commands from the guest. By running a "
35895 "command in the guest, you are giving CPU time to a binary that you do not "
35896 "control, under the same user account as the library, albeit wrapped in qemu "
35897 "virtualization. More information and alternatives can be found in the "
35898 "section L</RUNNING COMMANDS>."
35902 #: ../src/guestfs.pod:1257
35903 msgid "CVE-2010-3851"
35907 #: ../src/guestfs.pod:1259
35908 msgid "https://bugzilla.redhat.com/642934"
35912 #: ../src/guestfs.pod:1261
35914 "This security bug concerns the automatic disk format detection that qemu "
35915 "does on disk images."
35919 #: ../src/guestfs.pod:1264
35921 "A raw disk image is just the raw bytes, there is no header. Other disk "
35922 "images like qcow2 contain a special header. Qemu deals with this by looking "
35923 "for one of the known headers, and if none is found then assuming the disk "
35924 "image must be raw."
35928 #: ../src/guestfs.pod:1269
35930 "This allows a guest which has been given a raw disk image to write some "
35931 "other header. At next boot (or when the disk image is accessed by "
35932 "libguestfs) qemu would do autodetection and think the disk image format was, "
35933 "say, qcow2 based on the header written by the guest."
35937 #: ../src/guestfs.pod:1274
35939 "This in itself would not be a problem, but qcow2 offers many features, one "
35940 "of which is to allow a disk image to refer to another image (called the "
35941 "\"backing disk\"). It does this by placing the path to the backing disk "
35942 "into the qcow2 header. This path is not validated and could point to any "
35943 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
35944 "\"holes\" in the qcow2 disk image, which of course is completely under the "
35945 "control of the attacker."
35949 #: ../src/guestfs.pod:1282
35951 "In libguestfs this is rather hard to exploit except under two circumstances:"
35955 #: ../src/guestfs.pod:1289
35956 msgid "You have enabled the network or have opened the disk in write mode."
35960 #: ../src/guestfs.pod:1293
35962 "You are also running untrusted code from the guest (see L</RUNNING "
35967 #: ../src/guestfs.pod:1298
35969 "The way to avoid this is to specify the expected disk format when adding "
35970 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
35971 "should always do this if the disk is raw format, and it's a good idea for "
35976 #: ../src/guestfs.pod:1303
35978 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
35979 "format is fetched from libvirt and passed through."
35983 #: ../src/guestfs.pod:1306
35985 "For libguestfs tools, use the I<--format> command line parameter as "
35990 #: ../src/guestfs.pod:1309
35991 msgid "CONNECTION MANAGEMENT"
35995 #: ../src/guestfs.pod:1311
35996 msgid "guestfs_h *"
36000 #: ../src/guestfs.pod:1313
36002 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
36003 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
36004 "handle and release all resources used."
36008 #: ../src/guestfs.pod:1317
36010 "For information on using multiple handles and threads, see the section L</"
36011 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
36015 #: ../src/guestfs.pod:1320
36016 msgid "guestfs_create"
36020 #: ../src/guestfs.pod:1322
36023 " guestfs_h *guestfs_create (void);\n"
36028 #: ../src/guestfs.pod:1324
36029 msgid "Create a connection handle."
36033 #: ../src/guestfs.pod:1326
36035 "On success this returns a non-NULL pointer to a handle. On error it returns "
36040 #: ../src/guestfs.pod:1329
36042 "You have to \"configure\" the handle after creating it. This includes "
36043 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
36044 "handle at least once."
36048 #: ../src/guestfs.pod:1333
36049 msgid "After configuring the handle, you have to call L</guestfs_launch>."
36053 #: ../src/guestfs.pod:1335
36055 "You may also want to configure error handling for the handle. See the L</"
36056 "ERROR HANDLING> section below."
36060 #: ../src/guestfs.pod:1338
36061 msgid "guestfs_close"
36065 #: ../src/guestfs.pod:1340
36068 " void guestfs_close (guestfs_h *g);\n"
36073 #: ../src/guestfs.pod:1342
36074 msgid "This closes the connection handle and frees up all resources used."
36078 #: ../src/guestfs.pod:1344
36080 "If autosync was set on the handle and the handle was launched, then this "
36081 "implicitly calls various functions to unmount filesystems and sync the "
36082 "disk. See L</guestfs_set_autosync> for more details."
36086 #: ../src/guestfs.pod:1348
36087 msgid "If a close callback was set on the handle, then it is called."
36091 #: ../src/guestfs.pod:1350
36092 msgid "ERROR HANDLING"
36096 #: ../src/guestfs.pod:1352
36098 "API functions can return errors. For example, almost all functions that "
36099 "return C<int> will return C<-1> to indicate an error."
36103 #: ../src/guestfs.pod:1355
36105 "Additional information is available for errors: an error message string and "
36106 "optionally an error number (errno) if the thing that failed was a system "
36111 #: ../src/guestfs.pod:1359
36113 "You can get at the additional information about the last error on the handle "
36114 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
36115 "up an error handler with L</guestfs_set_error_handler>."
36119 #: ../src/guestfs.pod:1364
36121 "When the handle is created, a default error handler is installed which "
36122 "prints the error message string to C<stderr>. For small short-running "
36123 "command line programs it is sufficient to do:"
36127 #: ../src/guestfs.pod:1368
36130 " if (guestfs_launch (g) == -1)\n"
36131 " exit (EXIT_FAILURE);\n"
36136 #: ../src/guestfs.pod:1371
36138 "since the default error handler will ensure that an error message has been "
36139 "printed to C<stderr> before the program exits."
36143 #: ../src/guestfs.pod:1374
36145 "For other programs the caller will almost certainly want to install an "
36146 "alternate error handler or do error handling in-line like this:"
36150 #: ../src/guestfs.pod:1377
36153 " /* This disables the default behaviour of printing errors\n"
36155 " guestfs_set_error_handler (g, NULL, NULL);\n"
36160 #: ../src/guestfs.pod:1381
36163 " if (guestfs_launch (g) == -1) {\n"
36164 " /* Examine the error message and print it etc. */\n"
36165 " char *msg = guestfs_last_error (g);\n"
36166 " int errnum = guestfs_last_errno (g);\n"
36167 " fprintf (stderr, \"%s\", msg);\n"
36168 " if (errnum != 0)\n"
36169 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36170 " fprintf (stderr, \"\\n\");\n"
36177 #: ../src/guestfs.pod:1392
36179 "Out of memory errors are handled differently. The default action is to call "
36180 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
36181 "guestfs_set_out_of_memory_handler>."
36185 #: ../src/guestfs.pod:1396
36187 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36188 "because there is no handle if this happens there is no way to get additional "
36189 "error information. However L</guestfs_create> is supposed to be a "
36190 "lightweight operation which can only fail because of insufficient memory (it "
36191 "returns NULL in this case)."
36195 #: ../src/guestfs.pod:1402
36196 msgid "guestfs_last_error"
36200 #: ../src/guestfs.pod:1404
36203 " const char *guestfs_last_error (guestfs_h *g);\n"
36208 #: ../src/guestfs.pod:1406
36210 "This returns the last error message that happened on C<g>. If there has not "
36211 "been an error since the handle was created, then this returns C<NULL>."
36215 #: ../src/guestfs.pod:1410
36217 "The lifetime of the returned string is until the next error occurs, or L</"
36218 "guestfs_close> is called."
36222 #: ../src/guestfs.pod:1413
36223 msgid "guestfs_last_errno"
36227 #: ../src/guestfs.pod:1415
36230 " int guestfs_last_errno (guestfs_h *g);\n"
36235 #: ../src/guestfs.pod:1417
36236 msgid "This returns the last error number (errno) that happened on C<g>."
36240 #: ../src/guestfs.pod:1419
36241 msgid "If successful, an errno integer not equal to zero is returned."
36245 #: ../src/guestfs.pod:1421
36247 "If no error, this returns 0. This call can return 0 in three situations:"
36251 #: ../src/guestfs.pod:1428
36252 msgid "There has not been any error on the handle."
36256 #: ../src/guestfs.pod:1432
36258 "There has been an error but the errno was meaningless. This corresponds to "
36259 "the case where the error did not come from a failed system call, but for "
36260 "some other reason."
36264 #: ../src/guestfs.pod:1438
36266 "There was an error from a failed system call, but for some reason the errno "
36267 "was not captured and returned. This usually indicates a bug in libguestfs."
36271 #: ../src/guestfs.pod:1444
36273 "Libguestfs tries to convert the errno from inside the applicance into a "
36274 "corresponding errno for the caller (not entirely trivial: the appliance "
36275 "might be running a completely different operating system from the library "
36276 "and error numbers are not standardized across Un*xen). If this could not be "
36277 "done, then the error is translated to C<EINVAL>. In practice this should "
36278 "only happen in very rare circumstances."
36282 #: ../src/guestfs.pod:1452
36283 msgid "guestfs_set_error_handler"
36287 #: ../src/guestfs.pod:1454
36290 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
36292 " const char *msg);\n"
36293 " void guestfs_set_error_handler (guestfs_h *g,\n"
36294 " guestfs_error_handler_cb cb,\n"
36295 " void *opaque);\n"
36300 #: ../src/guestfs.pod:1461
36302 "The callback C<cb> will be called if there is an error. The parameters "
36303 "passed to the callback are an opaque data pointer and the error message "
36308 #: ../src/guestfs.pod:1465
36310 "C<errno> is not passed to the callback. To get that the callback must call "
36311 "L</guestfs_last_errno>."
36315 #: ../src/guestfs.pod:1468
36317 "Note that the message string C<msg> is freed as soon as the callback "
36318 "function returns, so if you want to stash it somewhere you must make your "
36323 #: ../src/guestfs.pod:1472
36324 msgid "The default handler prints messages on C<stderr>."
36328 #: ../src/guestfs.pod:1474
36329 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
36333 #: ../src/guestfs.pod:1476
36334 msgid "guestfs_get_error_handler"
36338 #: ../src/guestfs.pod:1478
36341 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
36342 " void **opaque_rtn);\n"
36347 #: ../src/guestfs.pod:1481
36348 msgid "Returns the current error handler callback."
36352 #: ../src/guestfs.pod:1483
36353 msgid "guestfs_set_out_of_memory_handler"
36357 #: ../src/guestfs.pod:1485
36360 " typedef void (*guestfs_abort_cb) (void);\n"
36361 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
36362 " guestfs_abort_cb);\n"
36367 #: ../src/guestfs.pod:1489
36369 "The callback C<cb> will be called if there is an out of memory situation. "
36370 "I<Note this callback must not return>."
36374 #: ../src/guestfs.pod:1492
36375 msgid "The default is to call L<abort(3)>."
36379 #: ../src/guestfs.pod:1494
36381 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
36385 #: ../src/guestfs.pod:1497
36386 msgid "guestfs_get_out_of_memory_handler"
36390 #: ../src/guestfs.pod:1499
36393 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
36398 #: ../src/guestfs.pod:1501
36399 msgid "This returns the current out of memory handler."
36403 #: ../src/guestfs.pod:1503
36408 #: ../src/guestfs.pod:1507
36413 #: ../src/guestfs.pod:1509
36418 #: ../src/guestfs.pod:1511
36419 msgid "AVAILABILITY"
36423 #: ../src/guestfs.pod:1513
36424 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
36428 #: ../src/guestfs.pod:1515
36430 "Using L</guestfs_available> you can test availability of the following "
36431 "groups of functions. This test queries the appliance to see if the "
36432 "appliance you are currently using supports the functionality."
36436 #: ../src/guestfs.pod:1520
36437 msgid "@AVAILABILITY@"
36441 #: ../src/guestfs.pod:1522
36442 msgid "GUESTFISH supported COMMAND"
36446 #: ../src/guestfs.pod:1524
36448 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
36449 "prints out the available groups and whether they are supported by this build "
36450 "of libguestfs. Note however that you have to do C<run> first."
36454 #: ../src/guestfs.pod:1529
36455 msgid "SINGLE CALLS AT COMPILE TIME"
36459 #: ../src/guestfs.pod:1531
36461 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
36462 "function, such as:"
36466 #: ../src/guestfs.pod:1534
36469 " #define LIBGUESTFS_HAVE_DD 1\n"
36474 #: ../src/guestfs.pod:1536
36475 msgid "if L</guestfs_dd> is available."
36479 #: ../src/guestfs.pod:1538
36481 "Before version 1.5.8, if you needed to test whether a single libguestfs "
36482 "function is available at compile time, we recommended using build tools such "
36483 "as autoconf or cmake. For example in autotools you could use:"
36487 #: ../src/guestfs.pod:1543
36490 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
36491 " AC_CHECK_FUNCS([guestfs_dd])\n"
36496 #: ../src/guestfs.pod:1546
36498 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
36503 #: ../src/guestfs.pod:1549
36504 msgid "SINGLE CALLS AT RUN TIME"
36508 #: ../src/guestfs.pod:1551
36510 "Testing at compile time doesn't guarantee that a function really exists in "
36511 "the library. The reason is that you might be dynamically linked against a "
36512 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
36513 "This situation unfortunately results in a segmentation fault, which is a "
36514 "shortcoming of the C dynamic linking system itself."
36518 #: ../src/guestfs.pod:1558
36520 "You can use L<dlopen(3)> to test if a function is available at run time, as "
36521 "in this example program (note that you still need the compile time check as "
36526 #: ../src/guestfs.pod:1562
36529 " #include <stdio.h>\n"
36530 " #include <stdlib.h>\n"
36531 " #include <unistd.h>\n"
36532 " #include <dlfcn.h>\n"
36533 " #include <guestfs.h>\n"
36538 #: ../src/guestfs.pod:1568
36543 " #ifdef LIBGUESTFS_HAVE_DD\n"
36545 " int has_function;\n"
36550 #: ../src/guestfs.pod:1574
36553 " /* Test if the function guestfs_dd is really available. */\n"
36554 " dl = dlopen (NULL, RTLD_LAZY);\n"
36556 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
36557 " exit (EXIT_FAILURE);\n"
36559 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
36565 #: ../src/guestfs.pod:1583
36568 " if (!has_function)\n"
36569 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
36571 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
36572 " /* Now it's safe to call\n"
36573 " guestfs_dd (g, \"foo\", \"bar\");\n"
36577 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
36584 #: ../src/guestfs.pod:1596
36586 "You may think the above is an awful lot of hassle, and it is. There are "
36587 "other ways outside of the C linking system to ensure that this kind of "
36588 "incompatibility never arises, such as using package versioning:"
36592 #: ../src/guestfs.pod:1601
36595 " Requires: libguestfs >= 1.0.80\n"
36600 #: ../src/guestfs.pod:1603
36601 msgid "CALLS WITH OPTIONAL ARGUMENTS"
36605 #: ../src/guestfs.pod:1605
36607 "A recent feature of the API is the introduction of calls which take optional "
36608 "arguments. In C these are declared 3 ways. The main way is as a call which "
36609 "takes variable arguments (ie. C<...>), as in this example:"
36613 #: ../src/guestfs.pod:1610
36616 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
36621 #: ../src/guestfs.pod:1612
36623 "Call this with a list of optional arguments, terminated by C<-1>. So to "
36624 "call with no optional arguments specified:"
36628 #: ../src/guestfs.pod:1615
36631 " guestfs_add_drive_opts (g, filename, -1);\n"
36636 #: ../src/guestfs.pod:1617
36637 msgid "With a single optional argument:"
36641 #: ../src/guestfs.pod:1619
36644 " guestfs_add_drive_opts (g, filename,\n"
36645 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
36651 #: ../src/guestfs.pod:1623
36656 #: ../src/guestfs.pod:1625
36659 " guestfs_add_drive_opts (g, filename,\n"
36660 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
36661 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
36667 #: ../src/guestfs.pod:1630
36669 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
36674 #: ../src/guestfs.pod:1633
36675 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
36679 #: ../src/guestfs.pod:1635
36681 "The second variant has the same name with the suffix C<_va>, which works the "
36682 "same way but takes a C<va_list>. See the C manual for details. For the "
36683 "example function, this is declared:"
36687 #: ../src/guestfs.pod:1639
36690 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
36691 " va_list args);\n"
36696 #: ../src/guestfs.pod:1642
36697 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
36701 #: ../src/guestfs.pod:1644
36703 "The third variant is useful where you need to construct these calls. You "
36704 "pass in a structure where you fill in the optional fields. The structure "
36705 "has a bitmask as the first element which you must set to indicate which "
36706 "fields you have filled in. For our example function the structure and call "
36711 #: ../src/guestfs.pod:1650
36714 " struct guestfs_add_drive_opts_argv {\n"
36715 " uint64_t bitmask;\n"
36717 " const char *format;\n"
36720 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
36721 " const struct guestfs_add_drive_opts_argv *optargs);\n"
36726 #: ../src/guestfs.pod:1659
36727 msgid "You could call it like this:"
36731 #: ../src/guestfs.pod:1661
36734 " struct guestfs_add_drive_opts_argv optargs = {\n"
36735 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
36736 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
36737 " .readonly = 1,\n"
36738 " .format = \"qcow2\"\n"
36744 #: ../src/guestfs.pod:1668
36747 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
36752 #: ../src/guestfs.pod:1676
36753 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
36757 #: ../src/guestfs.pod:1681
36758 msgid "You do not need to fill in all fields of the structure."
36762 #: ../src/guestfs.pod:1685
36764 "There must be a one-to-one correspondence between fields of the structure "
36765 "that are filled in, and bits set in the bitmask."
36769 #: ../src/guestfs.pod:1690
36770 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
36774 #: ../src/guestfs.pod:1692
36776 "In other languages, optional arguments are expressed in the way that is "
36777 "natural for that language. We refer you to the language-specific "
36778 "documentation for more details on that."
36782 #: ../src/guestfs.pod:1696
36783 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
36787 #: ../src/guestfs.pod:1698
36788 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
36792 #: ../src/guestfs.pod:1700
36794 "B<Note:> This section documents the generic event mechanism introduced in "
36795 "libguestfs 1.10, which you should use in new code if possible. The old "
36796 "functions C<guestfs_set_log_message_callback>, "
36797 "C<guestfs_set_subprocess_quit_callback>, "
36798 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
36799 "C<guestfs_set_progress_callback> are no longer documented in this manual "
36800 "page. Because of the ABI guarantee, the old functions continue to work."
36804 #: ../src/guestfs.pod:1709
36806 "Handles generate events when certain things happen, such as log messages "
36807 "being generated, progress messages during long-running operations, or the "
36808 "handle being closed. The API calls described below let you register a "
36809 "callback to be called when events happen. You can register multiple "
36810 "callbacks (for the same, different or overlapping sets of events), and "
36811 "individually remove callbacks. If callbacks are not removed, then they "
36812 "remain in force until the handle is closed."
36816 #: ../src/guestfs.pod:1717
36818 "In the current implementation, events are only generated synchronously: that "
36819 "means that events (and hence callbacks) can only happen while you are in the "
36820 "middle of making another libguestfs call. The callback is called in the "
36825 #: ../src/guestfs.pod:1722
36827 "Events may contain a payload, usually nothing (void), an array of 64 bit "
36828 "unsigned integers, or a message buffer. Payloads are discussed later on."
36832 #: ../src/guestfs.pod:1726
36833 msgid "CLASSES OF EVENTS"
36837 #: ../src/guestfs.pod:1730
36838 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
36842 #: ../src/guestfs.pod:1733
36844 "The callback function will be called while the handle is being closed "
36845 "(synchronously from L</guestfs_close>)."
36849 #: ../src/guestfs.pod:1736
36851 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
36852 "handles that are open when the program exits. This means that this callback "
36853 "might be called indirectly from L<exit(3)>, which can cause unexpected "
36854 "problems in higher-level languages (eg. if your HLL interpreter has already "
36855 "been cleaned up by the time this is called, and if your callback then jumps "
36856 "into some HLL function)."
36860 #: ../src/guestfs.pod:1743
36862 "If no callback is registered: the handle is closed without any callback "
36867 #: ../src/guestfs.pod:1746
36868 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
36872 #: ../src/guestfs.pod:1749
36874 "The callback function will be called when the child process quits, either "
36875 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
36876 "corresponds to a transition from any state to the CONFIG state)."
36880 #: ../src/guestfs.pod:1753 ../src/guestfs.pod:1762 ../src/guestfs.pod:1879
36881 msgid "If no callback is registered: the event is ignored."
36885 #: ../src/guestfs.pod:1755
36886 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
36890 #: ../src/guestfs.pod:1758
36892 "The callback function will be called when the child process becomes ready "
36893 "first time after it has been launched. (This corresponds to a transition "
36894 "from LAUNCHING to the READY state)."
36898 #: ../src/guestfs.pod:1764
36899 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
36903 #: ../src/guestfs.pod:1767
36905 "Some long-running operations can generate progress messages. If this "
36906 "callback is registered, then it will be called each time a progress message "
36907 "is generated (usually two seconds after the operation started, and three "
36908 "times per second thereafter until it completes, although the frequency may "
36909 "change in future versions)."
36913 #: ../src/guestfs.pod:1773
36915 "The callback receives in the payload four unsigned 64 bit numbers which are "
36916 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
36920 #: ../src/guestfs.pod:1776
36922 "The units of C<total> are not defined, although for some operations C<total> "
36923 "may relate in some way to the amount of data to be transferred (eg. in bytes "
36924 "or megabytes), and C<position> may be the portion which has been transferred."
36928 #: ../src/guestfs.pod:1781
36929 msgid "The only defined and stable parts of the API are:"
36933 #: ../src/guestfs.pod:1787
36935 "The callback can display to the user some type of progress bar or indicator "
36936 "which shows the ratio of C<position>:C<total>."
36940 #: ../src/guestfs.pod:1792
36941 msgid "0 E<lt>= C<position> E<lt>= C<total>"
36945 #: ../src/guestfs.pod:1796
36947 "If any progress notification is sent during a call, then a final progress "
36948 "notification is always sent when C<position> = C<total> (I<unless> the call "
36949 "fails with an error)."
36953 #: ../src/guestfs.pod:1800
36955 "This is to simplify caller code, so callers can easily set the progress "
36956 "indicator to \"100%\" at the end of the operation, without requiring special "
36957 "code to detect this case."
36961 #: ../src/guestfs.pod:1806
36963 "For some calls we are unable to estimate the progress of the call, but we "
36964 "can still generate progress messages to indicate activity. This is known as "
36965 "\"pulse mode\", and is directly supported by certain progress bar "
36966 "implementations (eg. GtkProgressBar)."
36970 #: ../src/guestfs.pod:1811
36972 "For these calls, zero or more progress messages are generated with "
36973 "C<position = 0> and C<total = 1>, followed by a final message with "
36974 "C<position = total = 1>."
36978 #: ../src/guestfs.pod:1815
36980 "As noted above, if the call fails with an error then the final message may "
36981 "not be generated."
36985 #: ../src/guestfs.pod:1820
36987 "The callback also receives the procedure number (C<proc_nr>) and serial "
36988 "number (C<serial>) of the call. These are only useful for debugging "
36989 "protocol issues, and the callback can normally ignore them. The callback "
36990 "may want to print these numbers in error messages or debugging messages."
36994 #: ../src/guestfs.pod:1826
36995 msgid "If no callback is registered: progress messages are discarded."
36999 #: ../src/guestfs.pod:1828
37000 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
37004 #: ../src/guestfs.pod:1831
37006 "The callback function is called whenever a log message is generated by qemu, "
37007 "the appliance kernel, guestfsd (daemon), or utility programs."
37011 #: ../src/guestfs.pod:1834
37013 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
37014 "guestfs_launch>) then additional debug messages are generated."
37018 #: ../src/guestfs.pod:1837 ../src/guestfs.pod:1851
37020 "If no callback is registered: the messages are discarded unless the verbose "
37021 "flag is set in which case they are sent to stderr. You can override the "
37022 "printing of verbose messages to stderr by setting up a callback."
37026 #: ../src/guestfs.pod:1842
37027 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
37031 #: ../src/guestfs.pod:1845
37033 "The callback function is called whenever a log message is generated by the "
37034 "library part of libguestfs."
37038 #: ../src/guestfs.pod:1848
37040 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
37041 "messages are generated."
37045 #: ../src/guestfs.pod:1856
37046 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
37050 #: ../src/guestfs.pod:1859
37052 "The callback function is called whenever a trace message is generated. This "
37053 "only applies if the trace flag (L</guestfs_set_trace>) is set."
37057 #: ../src/guestfs.pod:1862
37059 "If no callback is registered: the messages are sent to stderr. You can "
37060 "override the printing of trace messages to stderr by setting up a callback."
37064 #: ../src/guestfs.pod:1866
37065 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
37069 #: ../src/guestfs.pod:1869
37071 "The callback function is called whenever a libguestfs function is entered."
37075 #: ../src/guestfs.pod:1872
37077 "The payload is a string which contains the name of the function that we are "
37078 "entering (not including C<guestfs_> prefix)."
37082 #: ../src/guestfs.pod:1875
37084 "Note that libguestfs functions can call themselves, so you may see many "
37085 "events from a single call. A few libguestfs functions do not generate this "
37090 #: ../src/guestfs.pod:1883
37091 msgid "guestfs_set_event_callback"
37095 #: ../src/guestfs.pod:1885
37098 " int guestfs_set_event_callback (guestfs_h *g,\n"
37099 " guestfs_event_callback cb,\n"
37100 " uint64_t event_bitmask,\n"
37102 " void *opaque);\n"
37107 #: ../src/guestfs.pod:1891
37109 "This function registers a callback (C<cb>) for all event classes in the "
37110 "C<event_bitmask>."
37114 #: ../src/guestfs.pod:1894
37116 "For example, to register for all log message events, you could call this "
37117 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
37118 "To register a single callback for all possible classes of events, use "
37119 "C<GUESTFS_EVENT_ALL>."
37123 #: ../src/guestfs.pod:1900
37124 msgid "C<flags> should always be passed as 0."
37128 #: ../src/guestfs.pod:1902
37130 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37131 "it for any purpose."
37135 #: ../src/guestfs.pod:1905
37137 "The return value is the event handle (an integer) which you can use to "
37138 "delete the callback (see below)."
37142 #: ../src/guestfs.pod:1908
37144 "If there is an error, this function returns C<-1>, and sets the error in the "
37145 "handle in the usual way (see L</guestfs_last_error> etc.)"
37149 #: ../src/guestfs.pod:1911
37151 "Callbacks remain in effect until they are deleted, or until the handle is "
37156 #: ../src/guestfs.pod:1914
37158 "In the case where multiple callbacks are registered for a particular event "
37159 "class, all of the callbacks are called. The order in which multiple "
37160 "callbacks are called is not defined."
37164 #: ../src/guestfs.pod:1918
37165 msgid "guestfs_delete_event_callback"
37169 #: ../src/guestfs.pod:1920
37172 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37177 #: ../src/guestfs.pod:1922
37179 "Delete a callback that was previously registered. C<event_handle> should be "
37180 "the integer that was returned by a previous call to "
37181 "C<guestfs_set_event_callback> on the same handle."
37185 #: ../src/guestfs.pod:1926
37186 msgid "guestfs_event_callback"
37190 #: ../src/guestfs.pod:1928
37193 " typedef void (*guestfs_event_callback) (\n"
37196 " uint64_t event,\n"
37197 " int event_handle,\n"
37199 " const char *buf, size_t buf_len,\n"
37200 " const uint64_t *array, size_t array_len);\n"
37205 #: ../src/guestfs.pod:1937
37207 "This is the type of the event callback function that you have to provide."
37211 #: ../src/guestfs.pod:1940
37213 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37214 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37215 "handle, and C<flags> which in the current API you should ignore."
37219 #: ../src/guestfs.pod:1944
37221 "The remaining parameters contain the event payload (if any). Each event may "
37222 "contain a payload, which usually relates to the event class, but for future "
37223 "proofing your code should be written to handle any payload for any event "
37228 #: ../src/guestfs.pod:1949
37230 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37231 "there is no message buffer). Note that this message buffer can contain "
37232 "arbitrary 8 bit data, including NUL bytes."
37236 #: ../src/guestfs.pod:1953
37238 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37239 "moment this is only used for progress messages."
37243 #: ../src/guestfs.pod:1956
37244 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37248 #: ../src/guestfs.pod:1958
37250 "One motivation for the generic event API was to allow GUI programs to "
37251 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37252 "unconditionally to C<stderr>."
37256 #: ../src/guestfs.pod:1962
37258 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37259 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37260 "messages are not events; you must capture error messages separately)."
37264 #: ../src/guestfs.pod:1967
37266 "Programs have to set up a callback to capture the classes of events of "
37271 #: ../src/guestfs.pod:1970
37275 " guestfs_set_event_callback\n"
37276 " (g, message_callback,\n"
37277 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37278 " GUESTFS_EVENT_TRACE,\n"
37279 " 0, NULL) == -1)\n"
37280 " if (eh == -1) {\n"
37281 " // handle error in the usual way\n"
37287 #: ../src/guestfs.pod:1980
37289 "The callback can then direct messages to the appropriate place. In this "
37290 "example, messages are directed to syslog:"
37294 #: ../src/guestfs.pod:1983
37298 " message_callback (\n"
37301 " uint64_t event,\n"
37302 " int event_handle,\n"
37304 " const char *buf, size_t buf_len,\n"
37305 " const uint64_t *array, size_t array_len)\n"
37307 " const int priority = LOG_USER|LOG_INFO;\n"
37308 " if (buf_len > 0)\n"
37309 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
37315 #: ../src/guestfs.pod:1998
37316 msgid "CANCELLING LONG TRANSFERS"
37320 #: ../src/guestfs.pod:2000
37322 "Some operations can be cancelled by the caller while they are in progress. "
37323 "Currently only operations that involve uploading or downloading data can be "
37324 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
37325 "parameters in the generator)."
37329 #: ../src/guestfs.pod:2005
37330 msgid "guestfs_user_cancel"
37334 #: ../src/guestfs.pod:2007
37337 " void guestfs_user_cancel (guestfs_h *g);\n"
37342 #: ../src/guestfs.pod:2009
37344 "C<guestfs_user_cancel> cancels the current upload or download operation."
37348 #: ../src/guestfs.pod:2012
37350 "Unlike most other libguestfs calls, this function is signal safe and thread "
37351 "safe. You can call it from a signal handler or from another thread, without "
37352 "needing to do any locking."
37356 #: ../src/guestfs.pod:2016
37358 "The transfer that was in progress (if there is one) will stop shortly "
37359 "afterwards, and will return an error. The errno (see L</"
37360 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
37361 "out if the operation was cancelled or failed because of another error."
37365 #: ../src/guestfs.pod:2022
37367 "No cleanup is performed: for example, if a file was being uploaded then "
37368 "after cancellation there may be a partially uploaded file. It is the "
37369 "caller's responsibility to clean up if necessary."
37373 #: ../src/guestfs.pod:2026
37374 msgid "There are two common places that you might call C<guestfs_user_cancel>."
37378 #: ../src/guestfs.pod:2028
37380 "In an interactive text-based program, you might call it from a C<SIGINT> "
37381 "signal handler so that pressing C<^C> cancels the current operation. (You "
37382 "also need to call L</guestfs_set_pgroup> so that child processes don't "
37383 "receive the C<^C> signal)."
37387 #: ../src/guestfs.pod:2033
37389 "In a graphical program, when the main thread is displaying a progress bar "
37390 "with a cancel button, wire up the cancel button to call this function."
37394 #: ../src/guestfs.pod:2037
37395 msgid "PRIVATE DATA AREA"
37399 #: ../src/guestfs.pod:2039
37401 "You can attach named pieces of private data to the libguestfs handle, fetch "
37402 "them by name, and walk over them, for the lifetime of the handle. This is "
37403 "called the private data area and is only available from the C API."
37407 #: ../src/guestfs.pod:2044
37408 msgid "To attach a named piece of data, use the following call:"
37412 #: ../src/guestfs.pod:2046
37415 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
37420 #: ../src/guestfs.pod:2048
37422 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
37423 "pointer (which can be C<NULL>). Any previous item with the same key is "
37428 #: ../src/guestfs.pod:2052
37430 "You can use any C<key> you want, but your key should I<not> start with an "
37431 "underscore character. Keys beginning with an underscore character are "
37432 "reserved for internal libguestfs purposes (eg. for implementing language "
37433 "bindings). It is recommended that you prefix the key with some unique "
37434 "string to avoid collisions with other users."
37438 #: ../src/guestfs.pod:2058
37439 msgid "To retrieve the pointer, use:"
37443 #: ../src/guestfs.pod:2060
37446 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
37451 #: ../src/guestfs.pod:2062
37453 "This function returns C<NULL> if either no data is found associated with "
37454 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
37459 #: ../src/guestfs.pod:2066
37461 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
37462 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
37463 "all. In particular, libguestfs does I<not> try to free the data when the "
37464 "handle is closed. If the data must be freed, then the caller must either "
37465 "free it before calling L</guestfs_close> or must set up a close callback to "
37466 "do it (see L</GUESTFS_EVENT_CLOSE>)."
37470 #: ../src/guestfs.pod:2073
37471 msgid "To walk over all entries, use these two functions:"
37475 #: ../src/guestfs.pod:2075
37478 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
37483 #: ../src/guestfs.pod:2077
37486 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
37491 #: ../src/guestfs.pod:2079
37493 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
37494 "not have any particular meaning -- keys are not returned in any defined "
37495 "order). A pointer to the key is returned in C<*key_rtn> and the "
37496 "corresponding data pointer is returned from the function. C<NULL> is "
37497 "returned if there are no keys stored in the handle."
37501 #: ../src/guestfs.pod:2085
37503 "C<guestfs_next_private> returns the next key, pointer pair. The return "
37504 "value of this function is also C<NULL> is there are no further entries to "
37509 #: ../src/guestfs.pod:2089
37510 msgid "Notes about walking over entries:"
37514 #: ../src/guestfs.pod:2095
37516 "You must not call C<guestfs_set_private> while walking over the entries."
37520 #: ../src/guestfs.pod:2100
37522 "The handle maintains an internal iterator which is reset when you call "
37523 "C<guestfs_first_private>. This internal iterator is invalidated when you "
37524 "call C<guestfs_set_private>."
37528 #: ../src/guestfs.pod:2106
37529 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
37533 #: ../src/guestfs.pod:2108
37536 " guestfs_set_private (g, key, NULL);\n"
37541 #: ../src/guestfs.pod:2110
37542 msgid "then that C<key> is not returned when walking."
37546 #: ../src/guestfs.pod:2114
37548 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
37549 "C<guestfs_next_private> or C<guestfs_set_private>."
37553 #: ../src/guestfs.pod:2120
37555 "The following example code shows how to print all keys and data pointers "
37556 "that are associated with the handle C<g>:"
37560 #: ../src/guestfs.pod:2123
37563 " const char *key;\n"
37564 " void *data = guestfs_first_private (g, &key);\n"
37565 " while (data != NULL)\n"
37567 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37568 " data = guestfs_next_private (g, &key);\n"
37574 #: ../src/guestfs.pod:2131
37576 "More commonly you are only interested in keys that begin with an application-"
37577 "specific prefix C<foo_>. Modify the loop like so:"
37581 #: ../src/guestfs.pod:2134
37584 " const char *key;\n"
37585 " void *data = guestfs_first_private (g, &key);\n"
37586 " while (data != NULL)\n"
37588 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
37589 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37590 " data = guestfs_next_private (g, &key);\n"
37596 #: ../src/guestfs.pod:2143
37598 "If you need to modify keys while walking, then you have to jump back to the "
37599 "beginning of the loop. For example, to delete all keys prefixed with "
37604 #: ../src/guestfs.pod:2147
37607 " const char *key;\n"
37610 " data = guestfs_first_private (g, &key);\n"
37611 " while (data != NULL)\n"
37613 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
37615 " guestfs_set_private (g, key, NULL);\n"
37616 " /* note that 'key' pointer is now invalid, and so is\n"
37617 " the internal iterator */\n"
37620 " data = guestfs_next_private (g, &key);\n"
37626 #: ../src/guestfs.pod:2163
37628 "Note that the above loop is guaranteed to terminate because the keys are "
37629 "being deleted, but other manipulations of keys within the loop might not "
37630 "terminate unless you also maintain an indication of which keys have been "
37635 #: ../src/guestfs.pod:2168
37640 #: ../src/guestfs.pod:2170
37642 "The libguestfs C library can be probed using systemtap or DTrace. This is "
37643 "true of any library, not just libguestfs. However libguestfs also contains "
37644 "static markers to help in probing internal operations."
37648 #: ../src/guestfs.pod:2174
37649 msgid "You can list all the static markers by doing:"
37653 #: ../src/guestfs.pod:2176
37656 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
37657 " .provider(\"guestfs\").mark(\"*\")'\n"
37662 #: ../src/guestfs.pod:2179
37664 "B<Note:> These static markers are I<not> part of the stable API and may "
37665 "change in future versions."
37669 #: ../src/guestfs.pod:2182
37670 msgid "SYSTEMTAP SCRIPT EXAMPLE"
37674 #: ../src/guestfs.pod:2184
37676 "This script contains examples of displaying both the static markers and some "
37677 "ordinary C entry points:"
37681 #: ../src/guestfs.pod:2187
37689 #: ../src/guestfs.pod:2189
37692 " function display_time () {\n"
37693 " now = gettimeofday_us ();\n"
37696 " delta = now - last;\n"
37702 #: ../src/guestfs.pod:2196
37705 " printf (\"%d (+%d):\", now, delta);\n"
37711 #: ../src/guestfs.pod:2199
37716 " printf (\"ready\\n\");\n"
37722 #: ../src/guestfs.pod:2204
37725 " /* Display all calls to static markers. */\n"
37726 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
37727 " .provider(\"guestfs\").mark(\"*\") ? {\n"
37728 " display_time();\n"
37729 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
37735 #: ../src/guestfs.pod:2211
37738 " /* Display all calls to guestfs_mkfs* functions. */\n"
37739 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
37740 " .function(\"guestfs_mkfs*\") ? {\n"
37741 " display_time();\n"
37742 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
37748 #: ../src/guestfs.pod:2218
37750 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
37751 "program. Note that you either have to be root, or you have to add yourself "
37752 "to several special stap groups. Consult the systemtap documentation for "
37753 "more information."
37757 #: ../src/guestfs.pod:2223
37760 " # stap /tmp/test.stap\n"
37766 #: ../src/guestfs.pod:2226
37767 msgid "In another terminal, run a guestfish command such as this:"
37771 #: ../src/guestfs.pod:2230
37772 msgid "In the first terminal, stap trace output similar to this is shown:"
37776 #: ../src/guestfs.pod:2232
37779 " 1318248056692655 (+0):\tlaunch_start\n"
37780 " 1318248056692850 (+195): launch_build_appliance_start\n"
37781 " 1318248056818285 (+125435): launch_build_appliance_end\n"
37782 " 1318248056838059 (+19774): launch_run_qemu\n"
37783 " 1318248061071167 (+4233108): launch_end\n"
37784 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
37789 #: ../src/guestfs.pod:2239 ../src/guestfs.pod:2244
37794 #: ../src/guestfs.pod:2241
37796 "<!-- old anchor for the next section --> <a name="
37797 "\"state_machine_and_low_level_event_api\"/>"
37801 #: ../src/guestfs.pod:2246
37802 msgid "ARCHITECTURE"
37806 #: ../src/guestfs.pod:2248
37808 "Internally, libguestfs is implemented by running an appliance (a special "
37809 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
37810 "process of the main program."
37814 #: ../src/guestfs.pod:2252
37817 " ___________________\n"
37819 " | main program |\n"
37821 " | | child process / appliance\n"
37822 " | | __________________________\n"
37824 " +-------------------+ RPC | +-----------------+ |\n"
37825 " | libguestfs <--------------------> guestfsd | |\n"
37826 " | | | +-----------------+ |\n"
37827 " \\___________________/ | | Linux kernel | |\n"
37828 " | +--^--------------+ |\n"
37829 " \\_________|________________/\n"
37831 " _______v______\n"
37834 " | disk image |\n"
37835 " \\______________/\n"
37840 #: ../src/guestfs.pod:2272
37842 "The library, linked to the main program, creates the child process and hence "
37843 "the appliance in the L</guestfs_launch> function."
37847 #: ../src/guestfs.pod:2275
37849 "Inside the appliance is a Linux kernel and a complete stack of userspace "
37850 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
37851 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
37852 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
37853 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
37854 "attached to the qemu process which translates device access by the "
37855 "appliance's Linux kernel into accesses to the image."
37859 #: ../src/guestfs.pod:2284
37861 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
37862 "Although the disk image you are attached to might also be used by some "
37863 "virtual machine, libguestfs doesn't know or care about this. (But you will "
37864 "care if both libguestfs's qemu process and your virtual machine are trying "
37865 "to update the disk image at the same time, since these usually results in "
37866 "massive disk corruption)."
37870 #: ../src/guestfs.pod:2291
37871 msgid "STATE MACHINE"
37875 #: ../src/guestfs.pod:2293
37876 msgid "libguestfs uses a state machine to model the child process:"
37880 #: ../src/guestfs.pod:2295
37884 " guestfs_create\n"
37892 " / | \\ \\ guestfs_launch\n"
37893 " / | _\\__V______\n"
37895 " / | | LAUNCHING |\n"
37896 " / | \\___________/\n"
37898 " / | guestfs_launch\n"
37900 " ______ / __|____V\n"
37901 " / \\ ------> / \\\n"
37902 " | BUSY | | READY |\n"
37903 " \\______/ <------ \\________/\n"
37908 #: ../src/guestfs.pod:2317
37910 "The normal transitions are (1) CONFIG (when the handle is created, but there "
37911 "is no child process), (2) LAUNCHING (when the child process is booting up), "
37912 "(3) alternating between READY and BUSY as commands are issued to, and "
37913 "carried out by, the child process."
37917 #: ../src/guestfs.pod:2322
37919 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
37920 "asynchronously at any time (eg. due to some internal error), and that causes "
37921 "the state to transition back to CONFIG."
37925 #: ../src/guestfs.pod:2326
37927 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
37928 "issued when in the CONFIG state."
37932 #: ../src/guestfs.pod:2329
37934 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
37935 "L</guestfs_launch> blocks until the child process is READY to accept "
37936 "commands (or until some failure or timeout). L</guestfs_launch> internally "
37937 "moves the state from CONFIG to LAUNCHING while it is running."
37941 #: ../src/guestfs.pod:2335
37943 "API actions such as L</guestfs_mount> can only be issued when in the READY "
37944 "state. These API calls block waiting for the command to be carried out (ie. "
37945 "the state to transition to BUSY and then back to READY). There are no non-"
37946 "blocking versions, and no way to issue more than one command per handle at "
37951 #: ../src/guestfs.pod:2341
37953 "Finally, the child process sends asynchronous messages back to the main "
37954 "program, such as kernel log messages. You can register a callback to "
37955 "receive these messages."
37959 #: ../src/guestfs.pod:2345
37964 #: ../src/guestfs.pod:2347
37965 msgid "APPLIANCE BOOT PROCESS"
37969 #: ../src/guestfs.pod:2349
37971 "This process has evolved and continues to evolve. The description here "
37972 "corresponds only to the current version of libguestfs and is provided for "
37973 "information only."
37977 #: ../src/guestfs.pod:2353
37979 "In order to follow the stages involved below, enable libguestfs debugging "
37980 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
37984 #: ../src/guestfs.pod:2358
37985 msgid "Create the appliance"
37989 #: ../src/guestfs.pod:2360
37991 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
37992 "initrd and the appliance."
37996 #: ../src/guestfs.pod:2363
37998 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
37999 "directory if C<TMPDIR> is set)."
38003 #: ../src/guestfs.pod:2366
38005 "For a complete description of how the appliance is created and cached, read "
38006 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
38010 #: ../src/guestfs.pod:2370
38011 msgid "Start qemu and boot the kernel"
38015 #: ../src/guestfs.pod:2372
38016 msgid "qemu is invoked to boot the kernel."
38020 #: ../src/guestfs.pod:2374
38021 msgid "Run the initrd"
38025 #: ../src/guestfs.pod:2376
38027 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
38028 "appliance. The purpose of the initrd is to load enough kernel modules in "
38029 "order that the appliance itself can be mounted and started."
38033 #: ../src/guestfs.pod:2380
38035 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
38040 #: ../src/guestfs.pod:2383
38042 "When the initrd has started you will see messages showing that kernel "
38043 "modules are being loaded, similar to this:"
38047 #: ../src/guestfs.pod:2386
38050 " febootstrap: ext2 mini initrd starting up\n"
38051 " febootstrap: mounting /sys\n"
38052 " febootstrap: internal insmod libcrc32c.ko\n"
38053 " febootstrap: internal insmod crc32c-intel.ko\n"
38058 #: ../src/guestfs.pod:2391
38059 msgid "Find and mount the appliance device"
38063 #: ../src/guestfs.pod:2393
38065 "The appliance is a sparse file containing an ext2 filesystem which contains "
38066 "a familiar (although reduced in size) Linux operating system. It would "
38067 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
38071 #: ../src/guestfs.pod:2397
38073 "The regular disks being inspected by libguestfs are the first devices "
38074 "exposed by qemu (eg. as C</dev/vda>)."
38078 #: ../src/guestfs.pod:2400
38080 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
38081 "there was only one regular disk)."
38085 #: ../src/guestfs.pod:2403
38087 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
38088 "and switch root into the appliance, and run C</init> from the appliance."
38092 #: ../src/guestfs.pod:2407
38093 msgid "If this works successfully you will see messages such as:"
38097 #: ../src/guestfs.pod:2409
38100 " febootstrap: picked /sys/block/vdb/dev as root device\n"
38101 " febootstrap: creating /dev/root as block special 252:16\n"
38102 " febootstrap: mounting new root on /root\n"
38103 " febootstrap: chroot\n"
38104 " Starting /init script ...\n"
38109 #: ../src/guestfs.pod:2415
38111 "Note that C<Starting /init script ...> indicates that the appliance's init "
38112 "script is now running."
38116 #: ../src/guestfs.pod:2418
38117 msgid "Initialize the appliance"
38121 #: ../src/guestfs.pod:2420
38123 "The appliance itself now initializes itself. This involves starting certain "
38124 "processes like C<udev>, possibly printing some debug information, and "
38125 "finally running the daemon (C<guestfsd>)."
38129 #: ../src/guestfs.pod:2424
38134 #: ../src/guestfs.pod:2426
38136 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38141 #: ../src/guestfs.pod:2429
38144 " verbose daemon enabled\n"
38149 #: ../src/guestfs.pod:2431
38151 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38152 "connected on the other end to the library."
38156 #: ../src/guestfs.pod:2434
38158 "The daemon connects to this port (and hence to the library) and sends a four "
38159 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38160 "protocol (see below)."
38164 #: ../src/guestfs.pod:2440
38165 msgid "COMMUNICATION PROTOCOL"
38169 #: ../src/guestfs.pod:2442
38171 "Don't rely on using this protocol directly. This section documents how it "
38172 "currently works, but it may change at any time."
38176 #: ../src/guestfs.pod:2445
38178 "The protocol used to talk between the library and the daemon running inside "
38179 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38180 "1014, RFC 1832, RFC 4506)."
38184 #: ../src/guestfs.pod:2449
38186 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38187 "this file is automatically generated)."
38191 #: ../src/guestfs.pod:2452
38193 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38194 "and C<FileOut> parameters, which are handled with very simple request/reply "
38195 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38196 "parameters, which use the same request and reply messages, but they may also "
38197 "be followed by files sent using a chunked encoding."
38201 #: ../src/guestfs.pod:2459
38202 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38206 #: ../src/guestfs.pod:2461
38207 msgid "For ordinary functions, the request message is:"
38211 #: ../src/guestfs.pod:2463
38214 " total length (header + arguments,\n"
38215 " but not including the length word itself)\n"
38216 " struct guestfs_message_header (encoded as XDR)\n"
38217 " struct guestfs_<foo>_args (encoded as XDR)\n"
38222 #: ../src/guestfs.pod:2468
38224 "The total length field allows the daemon to allocate a fixed size buffer "
38225 "into which it slurps the rest of the message. As a result, the total length "
38226 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38227 "effective size of any request is limited to somewhere under this size."
38231 #: ../src/guestfs.pod:2474
38233 "Note also that many functions don't take any arguments, in which case the "
38234 "C<guestfs_I<foo>_args> is completely omitted."
38238 #: ../src/guestfs.pod:2477
38240 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38241 "receiver knows what type of args structure to expect, or none at all."
38245 #: ../src/guestfs.pod:2481
38247 "For functions that take optional arguments, the optional arguments are "
38248 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38249 "arguments. A bitmask in the header indicates which optional arguments are "
38250 "meaningful. The bitmask is also checked to see if it contains bits set "
38251 "which the daemon does not know about (eg. if more optional arguments were "
38252 "added in a later version of the library), and this causes the call to be "
38257 #: ../src/guestfs.pod:2489
38258 msgid "The reply message for ordinary functions is:"
38262 #: ../src/guestfs.pod:2491
38265 " total length (header + ret,\n"
38266 " but not including the length word itself)\n"
38267 " struct guestfs_message_header (encoded as XDR)\n"
38268 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38273 #: ../src/guestfs.pod:2496
38275 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38276 "functions that return no formal return values."
38280 #: ../src/guestfs.pod:2499
38282 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38286 #: ../src/guestfs.pod:2502
38288 "In the case of an error, a flag is set in the header, and the reply message "
38289 "is slightly changed:"
38293 #: ../src/guestfs.pod:2505
38296 " total length (header + error,\n"
38297 " but not including the length word itself)\n"
38298 " struct guestfs_message_header (encoded as XDR)\n"
38299 " struct guestfs_message_error (encoded as XDR)\n"
38304 #: ../src/guestfs.pod:2510
38306 "The C<guestfs_message_error> structure contains the error message as a "
38311 #: ../src/guestfs.pod:2513
38312 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
38316 #: ../src/guestfs.pod:2515
38318 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
38319 "The normal request message is sent (see above). However this is followed by "
38320 "a sequence of file chunks."
38324 #: ../src/guestfs.pod:2519
38327 " total length (header + arguments,\n"
38328 " but not including the length word itself,\n"
38329 " and not including the chunks)\n"
38330 " struct guestfs_message_header (encoded as XDR)\n"
38331 " struct guestfs_<foo>_args (encoded as XDR)\n"
38332 " sequence of chunks for FileIn param #0\n"
38333 " sequence of chunks for FileIn param #1 etc.\n"
38338 #: ../src/guestfs.pod:2527
38339 msgid "The \"sequence of chunks\" is:"
38343 #: ../src/guestfs.pod:2529
38346 " length of chunk (not including length word itself)\n"
38347 " struct guestfs_chunk (encoded as XDR)\n"
38348 " length of chunk\n"
38349 " struct guestfs_chunk (encoded as XDR)\n"
38351 " length of chunk\n"
38352 " struct guestfs_chunk (with data.data_len == 0)\n"
38357 #: ../src/guestfs.pod:2537
38359 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
38360 "is set in the final chunk to indicate either successful completion or early "
38365 #: ../src/guestfs.pod:2541
38367 "At time of writing there are no functions that have more than one FileIn "
38368 "parameter. However this is (theoretically) supported, by sending the "
38369 "sequence of chunks for each FileIn parameter one after another (from left to "
38374 #: ../src/guestfs.pod:2546
38376 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
38377 "transfer. The library does this by sending a chunk with a special flag set "
38378 "to indicate cancellation. When the daemon sees this, it cancels the whole "
38379 "RPC, does I<not> send any reply, and goes back to reading the next request."
38383 #: ../src/guestfs.pod:2552
38385 "The daemon may also cancel. It does this by writing a special word "
38386 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
38387 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
38388 "cancel chunk). The special word is chosen so that even if cancellation "
38389 "happens right at the end of the transfer (after the library has finished "
38390 "writing and has started listening for the reply), the \"spurious\" cancel "
38391 "flag will not be confused with the reply message."
38395 #: ../src/guestfs.pod:2561
38397 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
38398 "limit), and also files where the size is not known in advance (eg. from "
38399 "pipes or sockets). However the chunks are rather small "
38400 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
38401 "to keep much in memory."
38405 #: ../src/guestfs.pod:2567
38406 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
38410 #: ../src/guestfs.pod:2569
38412 "The protocol for FileOut parameters is exactly the same as for FileIn "
38413 "parameters, but with the roles of daemon and library reversed."
38417 #: ../src/guestfs.pod:2572
38420 " total length (header + ret,\n"
38421 " but not including the length word itself,\n"
38422 " and not including the chunks)\n"
38423 " struct guestfs_message_header (encoded as XDR)\n"
38424 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38425 " sequence of chunks for FileOut param #0\n"
38426 " sequence of chunks for FileOut param #1 etc.\n"
38431 #: ../src/guestfs.pod:2580
38432 msgid "INITIAL MESSAGE"
38436 #: ../src/guestfs.pod:2582
38438 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
38439 "which indicates that the guest and daemon is alive. This is what L</"
38440 "guestfs_launch> waits for."
38444 #: ../src/guestfs.pod:2586
38445 msgid "PROGRESS NOTIFICATION MESSAGES"
38449 #: ../src/guestfs.pod:2588
38451 "The daemon may send progress notification messages at any time. These are "
38452 "distinguished by the normal length word being replaced by "
38453 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
38457 #: ../src/guestfs.pod:2592
38459 "The library turns them into progress callbacks (see L</"
38460 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
38465 #: ../src/guestfs.pod:2596
38467 "The daemon self-limits the frequency of progress messages it sends (see "
38468 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
38473 #: ../src/guestfs.pod:2600
38474 msgid "LIBGUESTFS VERSION NUMBERS"
38478 #: ../src/guestfs.pod:2602
38480 "Since April 2010, libguestfs has started to make separate development and "
38481 "stable releases, along with corresponding branches in our git repository. "
38482 "These separate releases can be identified by version number:"
38486 #: ../src/guestfs.pod:2607
38489 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
38490 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
38496 " | `-------- sub-version\n"
38498 " `------ always '1' because we don't change the ABI\n"
38503 #: ../src/guestfs.pod:2618
38504 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
38508 #: ../src/guestfs.pod:2620
38510 "As time passes we cherry pick fixes from the development branch and backport "
38511 "those into the stable branch, the effect being that the stable branch should "
38512 "get more stable and less buggy over time. So the stable releases are ideal "
38513 "for people who don't need new features but would just like the software to "
38518 #: ../src/guestfs.pod:2626
38519 msgid "Our criteria for backporting changes are:"
38523 #: ../src/guestfs.pod:2632
38525 "Documentation changes which don't affect any code are backported unless the "
38526 "documentation refers to a future feature which is not in stable."
38530 #: ../src/guestfs.pod:2638
38532 "Bug fixes which are not controversial, fix obvious problems, and have been "
38533 "well tested are backported."
38537 #: ../src/guestfs.pod:2643
38539 "Simple rearrangements of code which shouldn't affect how it works get "
38540 "backported. This is so that the code in the two branches doesn't get too "
38541 "far out of step, allowing us to backport future fixes more easily."
38545 #: ../src/guestfs.pod:2649
38547 "We I<don't> backport new features, new APIs, new tools etc, except in one "
38548 "exceptional case: the new feature is required in order to implement an "
38549 "important bug fix."
38553 #: ../src/guestfs.pod:2655
38555 "A new stable branch starts when we think the new features in development are "
38556 "substantial and compelling enough over the current stable branch to warrant "
38557 "it. When that happens we create new stable and development versions 1.N.0 "
38558 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
38559 "stable at this point, but by backporting fixes from development, that branch "
38560 "will stabilize over time."
38564 #: ../src/guestfs.pod:2663
38565 msgid "EXTENDING LIBGUESTFS"
38569 #: ../src/guestfs.pod:2665
38570 msgid "ADDING A NEW API ACTION"
38574 #: ../src/guestfs.pod:2667
38576 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
38577 "documentation) are generated, and this makes it easy to extend the "
38582 #: ../src/guestfs.pod:2671
38583 msgid "To add a new API action there are two changes:"
38587 #: ../src/guestfs.pod:2677
38589 "You need to add a description of the call (name, parameters, return type, "
38590 "tests, documentation) to C<generator/generator_actions.ml>."
38594 #: ../src/guestfs.pod:2680
38596 "There are two sorts of API action, depending on whether the call goes "
38597 "through to the daemon in the appliance, or is serviced entirely by the "
38598 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
38599 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
38600 "an example of the latter, since a trace flag is maintained in the handle and "
38601 "all tracing is done on the library side."
38605 #: ../src/guestfs.pod:2688
38607 "Most new actions are of the first type, and get added to the "
38608 "C<daemon_functions> list. Each function has a unique procedure number used "
38609 "in the RPC protocol which is assigned to that action when we publish "
38610 "libguestfs and cannot be reused. Take the latest procedure number and "
38615 #: ../src/guestfs.pod:2694
38617 "For library-only actions of the second type, add to the "
38618 "C<non_daemon_functions> list. Since these functions are serviced by the "
38619 "library and do not travel over the RPC mechanism to the daemon, these "
38620 "functions do not need a procedure number, and so the procedure number is set "
38625 #: ../src/guestfs.pod:2702
38626 msgid "Implement the action (in C):"
38630 #: ../src/guestfs.pod:2704
38632 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
38633 "C<daemon/> directory."
38637 #: ../src/guestfs.pod:2707
38639 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
38640 "(note: double underscore) in the C<src/> directory."
38644 #: ../src/guestfs.pod:2710
38645 msgid "In either case, use another function as an example of what to do."
38649 #: ../src/guestfs.pod:2714
38650 msgid "After making these changes, use C<make> to compile."
38654 #: ../src/guestfs.pod:2716
38656 "Note that you don't need to implement the RPC, language bindings, manual "
38657 "pages or anything else. It's all automatically generated from the OCaml "
38662 #: ../src/guestfs.pod:2720
38663 msgid "ADDING TESTS FOR AN API ACTION"
38667 #: ../src/guestfs.pod:2722
38669 "You can supply zero or as many tests as you want per API call. The tests "
38670 "can either be added as part of the API description (C<generator/"
38671 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
38672 "into C<regressions/>. Note that adding a script to C<regressions/> is "
38673 "slower, so if possible use the first method."
38677 #: ../src/guestfs.pod:2728
38679 "The following describes the test environment used when you add an API test "
38680 "in C<generator_actions.ml>."
38684 #: ../src/guestfs.pod:2731
38685 msgid "The test environment has 4 block devices:"
38689 #: ../src/guestfs.pod:2735
38690 msgid "C</dev/sda> 500MB"
38694 #: ../src/guestfs.pod:2737
38695 msgid "General block device for testing."
38699 #: ../src/guestfs.pod:2739
38700 msgid "C</dev/sdb> 50MB"
38704 #: ../src/guestfs.pod:2741
38706 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
38711 #: ../src/guestfs.pod:2744
38712 msgid "C</dev/sdc> 10MB"
38716 #: ../src/guestfs.pod:2746
38717 msgid "Used in a few tests where two block devices are needed."
38721 #: ../src/guestfs.pod:2748
38722 msgid "C</dev/sdd>"
38726 #: ../src/guestfs.pod:2750
38727 msgid "ISO with fixed content (see C<images/test.iso>)."
38731 #: ../src/guestfs.pod:2754
38733 "To be able to run the tests in a reasonable amount of time, the libguestfs "
38734 "appliance and block devices are reused between tests. So don't try testing "
38735 "L</guestfs_kill_subprocess> :-x"
38739 #: ../src/guestfs.pod:2758
38741 "Each test starts with an initial scenario, selected using one of the "
38742 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
38743 "initialize the disks mentioned above in a particular way as documented in "
38744 "C<generator_types.ml>. You should not assume anything about the previous "
38745 "contents of other disks that are not initialized."
38749 #: ../src/guestfs.pod:2764
38751 "You can add a prerequisite clause to any individual test. This is a run-"
38752 "time check, which, if it fails, causes the test to be skipped. Useful if "
38753 "testing a command which might not work on all variations of libguestfs "
38754 "builds. A test that has prerequisite of C<Always> means to run "
38759 #: ../src/guestfs.pod:2770
38761 "In addition, packagers can skip individual tests by setting environment "
38762 "variables before running C<make check>."
38766 #: ../src/guestfs.pod:2773
38769 " SKIP_TEST_<CMD>_<NUM>=1\n"
38774 #: ../src/guestfs.pod:2775
38775 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
38779 #: ../src/guestfs.pod:2777
38784 #: ../src/guestfs.pod:2779
38787 " SKIP_TEST_<CMD>=1\n"
38792 #: ../src/guestfs.pod:2781
38793 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
38797 #: ../src/guestfs.pod:2783
38798 msgid "Packagers can run only certain tests by setting for example:"
38802 #: ../src/guestfs.pod:2785
38805 " TEST_ONLY=\"vfs_type zerofree\"\n"
38810 #: ../src/guestfs.pod:2787
38812 "See C<capitests/tests.c> for more details of how these environment variables "
38817 #: ../src/guestfs.pod:2790
38818 msgid "DEBUGGING NEW API ACTIONS"
38822 #: ../src/guestfs.pod:2792
38823 msgid "Test new actions work before submitting them."
38827 #: ../src/guestfs.pod:2794
38828 msgid "You can use guestfish to try out new commands."
38832 #: ../src/guestfs.pod:2796
38834 "Debugging the daemon is a problem because it runs inside a minimal "
38835 "environment. However you can fprintf messages in the daemon to stderr, and "
38836 "they will show up if you use C<guestfish -v>."
38840 #: ../src/guestfs.pod:2800
38841 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
38845 #: ../src/guestfs.pod:2802
38847 "Our C source code generally adheres to some basic code-formatting "
38848 "conventions. The existing code base is not totally consistent on this "
38849 "front, but we do prefer that contributed code be formatted similarly. In "
38850 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
38851 "indentation level, and other than that, follow the K&R style."
38855 #: ../src/guestfs.pod:2808
38857 "If you use Emacs, add the following to one of one of your start-up files (e."
38858 "g., ~/.emacs), to help ensure that you get indentation right:"
38862 #: ../src/guestfs.pod:2811
38865 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
38866 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
38867 " (add-hook 'find-file-hook\n"
38868 " '(lambda () (if (and buffer-file-name\n"
38869 " (string-match \"/libguestfs\\\\>\"\n"
38870 " (buffer-file-name))\n"
38871 " (not (string-equal mode-name \"Change Log\"))\n"
38872 " (not (string-equal mode-name \"Makefile\")))\n"
38873 " (setq indent-tabs-mode nil))))\n"
38878 #: ../src/guestfs.pod:2821
38881 " ;;; When editing C sources in libguestfs, use this style.\n"
38882 " (defun libguestfs-c-mode ()\n"
38883 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
38885 " (c-set-style \"K&R\")\n"
38886 " (setq c-indent-level 2)\n"
38887 " (setq c-basic-offset 2))\n"
38888 " (add-hook 'c-mode-hook\n"
38889 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
38890 " (buffer-file-name))\n"
38891 " (libguestfs-c-mode))))\n"
38896 #: ../src/guestfs.pod:2833
38897 msgid "Enable warnings when compiling (and fix any problems this finds):"
38901 #: ../src/guestfs.pod:2836
38904 " ./configure --enable-gcc-warnings\n"
38909 #: ../src/guestfs.pod:2838
38910 msgid "Useful targets are:"
38914 #: ../src/guestfs.pod:2840
38917 " make syntax-check # checks the syntax of the C code\n"
38918 " make check # runs the test suite\n"
38923 #: ../src/guestfs.pod:2843
38924 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
38928 #: ../src/guestfs.pod:2845
38930 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
38931 "which are used to do shell quoting."
38935 #: ../src/guestfs.pod:2850
38940 #: ../src/guestfs.pod:2852
38942 "Simple shell quoted string. Any spaces or other shell characters are "
38947 #: ../src/guestfs.pod:2855
38952 #: ../src/guestfs.pod:2857
38954 "Same as C<%Q> except the string is treated as a path which is prefixed by "
38959 #: ../src/guestfs.pod:2864
38962 " asprintf (&cmd, \"cat %R\", path);\n"
38967 #: ../src/guestfs.pod:2866
38968 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
38972 #: ../src/guestfs.pod:2868
38974 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
38975 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
38976 "they are not passed via the shell (instead, straight to exec). You probably "
38977 "want to use the C<sysroot_path()> function however."
38981 #: ../src/guestfs.pod:2874
38982 msgid "SUBMITTING YOUR NEW API ACTIONS"
38986 #: ../src/guestfs.pod:2876
38988 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
38989 "libguestfs> and CC to L<rjones@redhat.com>."
38993 #: ../src/guestfs.pod:2880
38994 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
38998 #: ../src/guestfs.pod:2882
38999 msgid "We support i18n (gettext anyhow) in the library."
39003 #: ../src/guestfs.pod:2884
39005 "However many messages come from the daemon, and we don't translate those at "
39006 "the moment. One reason is that the appliance generally has all locale files "
39007 "removed from it, because they take up a lot of space. So we'd have to readd "
39008 "some of those, as well as copying our PO files into the appliance."
39012 #: ../src/guestfs.pod:2890
39014 "Debugging messages are never translated, since they are intended for the "
39019 #: ../src/guestfs.pod:2893
39020 msgid "SOURCE CODE SUBDIRECTORIES"
39024 #: ../src/guestfs.pod:2897
39029 #: ../src/guestfs.pod:2899
39030 msgid "L<virt-alignment-scan(1)> command and documentation."
39034 #: ../src/guestfs.pod:2903
39035 msgid "The libguestfs appliance, build scripts and so on."
39039 #: ../src/guestfs.pod:2905
39040 msgid "C<capitests>"
39044 #: ../src/guestfs.pod:2907
39045 msgid "Automated tests of the C API."
39049 #: ../src/guestfs.pod:2909
39054 #: ../src/guestfs.pod:2911
39056 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
39061 #: ../src/guestfs.pod:2914
39066 #: ../src/guestfs.pod:2916
39068 "Safety and liveness tests of components that libguestfs depends upon (not of "
39069 "libguestfs itself). Mainly this is for qemu and the kernel."
39073 #: ../src/guestfs.pod:2919
39078 #: ../src/guestfs.pod:2921
39080 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
39081 "command and documentation."
39085 #: ../src/guestfs.pod:2924
39090 #: ../src/guestfs.pod:2926
39091 msgid "Outside contributions, experimental parts."
39095 #: ../src/guestfs.pod:2928
39100 #: ../src/guestfs.pod:2930
39102 "The daemon that runs inside the libguestfs appliance and carries out actions."
39106 #: ../src/guestfs.pod:2933
39111 #: ../src/guestfs.pod:2935
39112 msgid "L<virt-df(1)> command and documentation."
39116 #: ../src/guestfs.pod:2937
39121 #: ../src/guestfs.pod:2939
39122 msgid "L<virt-edit(1)> command and documentation."
39126 #: ../src/guestfs.pod:2941
39127 msgid "C<examples>"
39131 #: ../src/guestfs.pod:2943
39132 msgid "C API example code."
39136 #: ../src/guestfs.pod:2945
39141 #: ../src/guestfs.pod:2947
39143 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39144 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39145 "L<virt-tar-out(1)>."
39149 #: ../src/guestfs.pod:2951
39154 #: ../src/guestfs.pod:2953
39156 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39160 #: ../src/guestfs.pod:2955
39161 msgid "C<generator>"
39165 #: ../src/guestfs.pod:2957
39167 "The crucially important generator, used to automatically generate large "
39168 "amounts of boilerplate C code for things like RPC and bindings."
39172 #: ../src/guestfs.pod:2960
39177 #: ../src/guestfs.pod:2962
39178 msgid "Files used by the test suite."
39182 #: ../src/guestfs.pod:2964
39183 msgid "Some \"phony\" guest images which we test against."
39187 #: ../src/guestfs.pod:2966
39188 msgid "C<inspector>"
39192 #: ../src/guestfs.pod:2968
39193 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39197 #: ../src/guestfs.pod:2970
39202 #: ../src/guestfs.pod:2972
39203 msgid "Logo used on the website. The fish is called Arthur by the way."
39207 #: ../src/guestfs.pod:2974
39212 #: ../src/guestfs.pod:2976
39213 msgid "M4 macros used by autoconf."
39217 #: ../src/guestfs.pod:2978
39222 #: ../src/guestfs.pod:2980
39223 msgid "Translations of simple gettext strings."
39227 #: ../src/guestfs.pod:2982
39232 #: ../src/guestfs.pod:2984
39234 "The build infrastructure and PO files for translations of manpages and POD "
39235 "files. Eventually this will be combined with the C<po> directory, but that "
39236 "is rather complicated."
39240 #: ../src/guestfs.pod:2988
39241 msgid "C<regressions>"
39245 #: ../src/guestfs.pod:2990
39246 msgid "Regression tests."
39250 #: ../src/guestfs.pod:2992
39255 #: ../src/guestfs.pod:2994
39256 msgid "L<virt-rescue(1)> command and documentation."
39260 #: ../src/guestfs.pod:2996
39265 #: ../src/guestfs.pod:2998
39266 msgid "L<virt-resize(1)> command and documentation."
39270 #: ../src/guestfs.pod:3000
39271 msgid "C<sparsify>"
39275 #: ../src/guestfs.pod:3002
39276 msgid "L<virt-sparsify(1)> command and documentation."
39280 #: ../src/guestfs.pod:3004
39285 #: ../src/guestfs.pod:3006
39286 msgid "Source code to the C library."
39290 #: ../src/guestfs.pod:3008
39295 #: ../src/guestfs.pod:3010
39297 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
39301 #: ../src/guestfs.pod:3012
39302 msgid "C<test-tool>"
39306 #: ../src/guestfs.pod:3014
39308 "Test tool for end users to test if their qemu/kernel combination will work "
39313 #: ../src/guestfs.pod:3017
39318 #: ../src/guestfs.pod:3019
39323 #: ../src/guestfs.pod:3021
39328 #: ../src/guestfs.pod:3023
39333 #: ../src/guestfs.pod:3025
39338 #: ../src/guestfs.pod:3027
39343 #: ../src/guestfs.pod:3029
39348 #: ../src/guestfs.pod:3031
39353 #: ../src/guestfs.pod:3033
39358 #: ../src/guestfs.pod:3035
39359 msgid "Language bindings."
39363 #: ../src/guestfs.pod:3039
39364 msgid "MAKING A STABLE RELEASE"
39368 #: ../src/guestfs.pod:3041
39370 "When we make a stable release, there are several steps documented here. See "
39371 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
39376 #: ../src/guestfs.pod:3049
39378 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
39382 #: ../src/guestfs.pod:3054
39383 msgid "Finalize RELEASE-NOTES."
39387 #: ../src/guestfs.pod:3058
39388 msgid "Update ROADMAP."
39392 #: ../src/guestfs.pod:3062
39393 msgid "Run C<src/api-support/update-from-tarballs.sh>."
39397 #: ../src/guestfs.pod:3066
39398 msgid "Push and pull from Transifex."
39402 #: ../src/guestfs.pod:3068
39407 #: ../src/guestfs.pod:3070
39415 #: ../src/guestfs.pod:3072
39416 msgid "to push the latest POT files to Transifex. Then run:"
39420 #: ../src/guestfs.pod:3074
39428 #: ../src/guestfs.pod:3076
39429 msgid "which is a wrapper to pull the latest translated C<*.po> files."
39433 #: ../src/guestfs.pod:3080
39435 "Create new stable and development directories under L<http://libguestfs.org/"
39440 #: ../src/guestfs.pod:3085
39441 msgid "Create the branch in git:"
39445 #: ../src/guestfs.pod:3087
39448 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
39449 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
39450 " git branch stable-1.XX\n"
39451 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
39456 #: ../src/guestfs.pod:3094
39461 #: ../src/guestfs.pod:3096
39462 msgid "PROTOCOL LIMITS"
39466 #: ../src/guestfs.pod:3098
39468 "Internally libguestfs uses a message-based protocol to pass API calls and "
39469 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
39470 "plenty more detail about this). The maximum message size used by the "
39471 "protocol is slightly less than 4 MB. For some API calls you may need to be "
39472 "aware of this limit. The API calls which may be affected are individually "
39473 "documented, with a link back to this section of the documentation."
39477 #: ../src/guestfs.pod:3106
39479 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
39480 "a simple string. Because this string is at some point internally encoded as "
39481 "a message, the maximum size that it can return is slightly under 4 MB. If "
39482 "the requested file is larger than this then you will get an error."
39486 #: ../src/guestfs.pod:3112
39488 "In order to transfer large files into and out of the guest filesystem, you "
39489 "need to use particular calls that support this. The sections L</UPLOADING> "
39490 "and L</DOWNLOADING> document how to do this."
39494 #: ../src/guestfs.pod:3116
39496 "You might also consider mounting the disk image using our FUSE filesystem "
39497 "support (L<guestmount(1)>)."
39501 #: ../src/guestfs.pod:3119
39502 msgid "MAXIMUM NUMBER OF DISKS"
39506 #: ../src/guestfs.pod:3121
39507 msgid "When using virtio disks (the default) the current limit is B<25> disks."
39511 #: ../src/guestfs.pod:3124
39513 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
39514 "slots. However febootstrap only understands disks with names C</dev/vda> "
39515 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
39520 #: ../src/guestfs.pod:3129
39522 "We are working to substantially raise this limit in future versions but it "
39523 "requires complex changes to qemu."
39527 #: ../src/guestfs.pod:3132
39529 "In future versions of libguestfs it should also be possible to \"hot plug\" "
39530 "disks (add and remove disks after calling L</guestfs_launch>). This also "
39531 "requires changes to qemu."
39535 #: ../src/guestfs.pod:3136
39536 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
39540 #: ../src/guestfs.pod:3138
39541 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
39545 #: ../src/guestfs.pod:3140
39547 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
39548 "vda>, and C</dev/vda1> through C</dev/vda15>)."
39552 #: ../src/guestfs.pod:3143
39554 "If you attach a disk with more than 15 partitions, the extra partitions are "
39555 "ignored by libguestfs."
39559 #: ../src/guestfs.pod:3146
39560 msgid "MAXIMUM SIZE OF A DISK"
39564 #: ../src/guestfs.pod:3148
39565 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
39569 #: ../src/guestfs.pod:3150
39571 "We have tested block devices up to 1 exabyte (2**60 or "
39572 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
39577 #: ../src/guestfs.pod:3154
39579 "Although libguestfs probably does not impose any limit, the underlying host "
39580 "storage will. If you store disk images on a host ext4 filesystem, then the "
39581 "maximum size will be limited by the maximum ext4 file size (currently 16 "
39582 "TB). If you store disk images as host logical volumes then you are limited "
39583 "by the maximum size of an LV."
39587 #: ../src/guestfs.pod:3160
39589 "For the hugest disk image files, we recommend using XFS on the host for "
39594 #: ../src/guestfs.pod:3163
39595 msgid "MAXIMUM SIZE OF A PARTITION"
39599 #: ../src/guestfs.pod:3165
39601 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
39602 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
39603 "address a partition located beyond 2 TB on the disk."
39607 #: ../src/guestfs.pod:3169
39609 "It is recommended that you use GPT partitions on disks which are larger than "
39610 "this size. GPT uses 64 bit sector numbers and so can address partitions "
39611 "which are theoretically larger than the largest disk we could support."
39615 #: ../src/guestfs.pod:3174
39616 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
39620 #: ../src/guestfs.pod:3176
39622 "This depends on the filesystem type. libguestfs itself does not impose any "
39623 "known limit. Consult Wikipedia or the filesystem documentation to find out "
39624 "what these limits are."
39628 #: ../src/guestfs.pod:3180
39629 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
39633 #: ../src/guestfs.pod:3182
39635 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
39636 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
39637 "uploads and downloads."
39641 #: ../src/guestfs.pod:3186
39642 msgid "INSPECTION LIMITS"
39646 #: ../src/guestfs.pod:3188
39648 "The inspection code has several arbitrary limits on things like the size of "
39649 "Windows Registry hive it will read, and the length of product name. These "
39650 "are intended to stop a malicious guest from consuming arbitrary amounts of "
39651 "memory and disk space on the host, and should not be reached in practice. "
39652 "See the source code for more information."
39656 #: ../src/guestfs.pod:3214
39658 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
39659 "effect as calling C<guestfs_set_verbose (g, 1)>."
39663 #: ../src/guestfs.pod:3226
39665 "Set the path that libguestfs uses to search for a supermin appliance. See "
39666 "the discussion of paths in section L</PATH> above."
39670 #: ../src/guestfs.pod:3235
39671 msgid "See also L</QEMU WRAPPERS> above."
39675 #: ../src/guestfs.pod:3239
39677 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
39678 "effect as calling C<guestfs_set_trace (g, 1)>."
39682 #: ../src/guestfs.pod:3257
39684 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
39685 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
39686 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-cat(1)"
39687 ">, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
39688 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
39689 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue"
39690 "(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar"
39691 "(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
39692 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)"
39693 ">, L<http://libguestfs.org/>."
39697 #: ../src/guestfs.pod:3293
39699 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
39700 "(8)>, L<disktype(1)>."
39704 #: ../src/guestfs.pod:3300 ../tools/virt-make-fs.pl:553
39705 #: ../tools/virt-win-reg.pl:761
39710 #: ../src/guestfs.pod:3302
39711 msgid "To get a list of bugs against libguestfs use this link:"
39715 #: ../src/guestfs.pod:3304
39717 "L<https://bugzilla.redhat.com/buglist.cgi?"
39718 "component=libguestfs&product=Virtualization+Tools>"
39722 #: ../src/guestfs.pod:3306
39723 msgid "To report a new bug against libguestfs use this link:"
39727 #: ../src/guestfs.pod:3308
39729 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
39730 "component=libguestfs&product=Virtualization+Tools>"
39734 #: ../src/guestfs.pod:3310
39735 msgid "When reporting a bug, please check:"
39739 #: ../src/guestfs.pod:3316
39740 msgid "That the bug hasn't been reported already."
39744 #: ../src/guestfs.pod:3320
39745 msgid "That you are testing a recent version."
39749 #: ../src/guestfs.pod:3324
39750 msgid "Describe the bug accurately, and give a way to reproduce it."
39754 #: ../src/guestfs.pod:3328
39756 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
39761 #: ../test-tool/libguestfs-test-tool.pod:5
39762 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
39766 #: ../test-tool/libguestfs-test-tool.pod:9
39769 " libguestfs-test-tool [--options]\n"
39774 #: ../test-tool/libguestfs-test-tool.pod:13
39776 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
39777 "to check basic libguestfs functionality is working. This is needed because "
39778 "libguestfs occasionally breaks for reasons beyond our control: usually "
39779 "because of changes in the underlying qemu or kernel packages, or the host "
39784 #: ../test-tool/libguestfs-test-tool.pod:19
39785 msgid "If you suspect a problem in libguestfs, then just run:"
39789 #: ../test-tool/libguestfs-test-tool.pod:21
39792 " libguestfs-test-tool\n"
39797 #: ../test-tool/libguestfs-test-tool.pod:23
39798 msgid "It will print lots of diagnostic messages."
39802 #: ../test-tool/libguestfs-test-tool.pod:25
39803 msgid "If it runs to completion successfully, you will see this near the end:"
39807 #: ../test-tool/libguestfs-test-tool.pod:27
39810 " ===== TEST FINISHED OK =====\n"
39815 #: ../test-tool/libguestfs-test-tool.pod:29
39816 msgid "and the test tool will exit with code 0."
39820 #: ../test-tool/libguestfs-test-tool.pod:31
39822 "If it fails (and/or exits with non-zero error code), please paste the "
39823 "I<complete, unedited> output of the test tool into a bug report. More "
39824 "information about reporting bugs can be found on the L<http://libguestfs.org/"
39829 #: ../test-tool/libguestfs-test-tool.pod:42
39830 msgid "Display short usage information and exit."
39834 #: ../test-tool/libguestfs-test-tool.pod:44
39835 msgid "B<--qemu qemu_binary>"
39839 #: ../test-tool/libguestfs-test-tool.pod:46
39841 "If you have downloaded another qemu binary, point this option at the full "
39842 "path of the binary to try it."
39846 #: ../test-tool/libguestfs-test-tool.pod:49
39847 msgid "B<--qemudir qemu_source_dir>"
39851 #: ../test-tool/libguestfs-test-tool.pod:51
39853 "If you have compiled qemu from source, point this option at the source "
39854 "directory to try it."
39858 #: ../test-tool/libguestfs-test-tool.pod:54
39863 #: ../test-tool/libguestfs-test-tool.pod:56
39864 msgid "B<--timeout N>"
39868 #: ../test-tool/libguestfs-test-tool.pod:58
39870 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
39871 "minutes) which does not usually need to be adjusted."
39875 #: ../test-tool/libguestfs-test-tool.pod:63
39876 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
39880 #: ../test-tool/libguestfs-test-tool.pod:65
39882 "If you have compiled another version of qemu from source and would like to "
39883 "try that, then you can use the I<--qemudir> option to point to the qemu "
39884 "source directory."
39888 #: ../test-tool/libguestfs-test-tool.pod:69
39890 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
39891 "option to point to the binary."
39895 #: ../test-tool/libguestfs-test-tool.pod:72
39897 "Note when using these options, you can ignore the business of qemu wrapper "
39898 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
39899 "wrapper script for you if one is needed."
39903 #: ../test-tool/libguestfs-test-tool.pod:76
39904 msgid "TRYING OUT A DIFFERENT KERNEL"
39908 #: ../test-tool/libguestfs-test-tool.pod:78
39910 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
39911 "libguestfs tries. You do this by setting the environment variables "
39912 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
39916 #: ../test-tool/libguestfs-test-tool.pod:82
39918 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
39923 #: ../test-tool/libguestfs-test-tool.pod:85
39924 msgid "SELF-DIAGNOSIS"
39928 #: ../test-tool/libguestfs-test-tool.pod:87
39930 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
39931 "produced by libguestfs-test-tool and/or possible errors."
39935 #: ../test-tool/libguestfs-test-tool.pod:92
39937 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
39938 "I<1> if there was an error."
39942 #: ../test-tool/libguestfs-test-tool.pod:97
39944 "For the full list of environment variables which may affect libguestfs, "
39945 "please see the L<guestfs(3)> manual page."
39949 #: ../test-tool/libguestfs-test-tool.pod:102
39950 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
39954 #: ../tools/virt-list-filesystems.pl:32
39956 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
39960 #: ../tools/virt-list-filesystems.pl:36
39963 " virt-list-filesystems [--options] domname\n"
39968 #: ../tools/virt-list-filesystems.pl:38
39971 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
39976 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
39978 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
39983 #: ../tools/virt-list-filesystems.pl:45
39985 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
39986 "are contained in a virtual machine or disk image."
39990 #: ../tools/virt-list-filesystems.pl:49
39992 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
39993 "functionality. For more complex cases you should look at the L<guestfish(1)"
39998 #: ../tools/virt-list-filesystems.pl:112
40000 "With this option, C<virt-list-filesystems> displays the type of each "
40001 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
40005 #: ../tools/virt-list-filesystems.pl:119
40010 #: ../tools/virt-list-filesystems.pl:123
40012 "Normally we only show mountable filesystems. If this option is given then "
40013 "swap devices are shown too."
40017 #: ../tools/virt-list-filesystems.pl:197
40019 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
40020 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
40021 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40025 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
40026 msgid "Copyright (C) 2009 Red Hat Inc."
40030 #: ../tools/virt-list-partitions.pl:32
40032 "virt-list-partitions - List partitions in a virtual machine or disk image"
40036 #: ../tools/virt-list-partitions.pl:36
40039 " virt-list-partitions [--options] domname\n"
40044 #: ../tools/virt-list-partitions.pl:38
40047 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
40052 #: ../tools/virt-list-partitions.pl:45
40054 "C<virt-list-partitions> is a command line tool to list the partitions that "
40055 "are contained in a virtual machine or disk image. It is mainly useful as a "
40056 "first step to using L<virt-resize(1)>."
40060 #: ../tools/virt-list-partitions.pl:50
40062 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
40063 "functionality. For more complex cases you should look at the L<guestfish(1)"
40068 #: ../tools/virt-list-partitions.pl:113
40069 msgid "Show sizes in human-readable form (eg. \"1G\")."
40073 #: ../tools/virt-list-partitions.pl:123
40075 "With this option, C<virt-list-partitions> displays the type and size of each "
40076 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
40080 #: ../tools/virt-list-partitions.pl:130
40085 #: ../tools/virt-list-partitions.pl:132
40090 #: ../tools/virt-list-partitions.pl:134
40092 "Display the total size of each block device (as a separate row or rows)."
40096 #: ../tools/virt-list-partitions.pl:267
40098 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
40099 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
40100 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
40104 #: ../tools/virt-list-partitions.pl:283
40105 msgid "Copyright (C) 2009-2010 Red Hat Inc."
40109 #: ../tools/virt-make-fs.pl:37
40110 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
40114 #: ../tools/virt-make-fs.pl:41
40117 " virt-make-fs [--options] input.tar output.img\n"
40122 #: ../tools/virt-make-fs.pl:43
40125 " virt-make-fs [--options] input.tar.gz output.img\n"
40130 #: ../tools/virt-make-fs.pl:45
40133 " virt-make-fs [--options] directory output.img\n"
40138 #: ../tools/virt-make-fs.pl:49
40140 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40141 "archive or some files in a directory. It is similar to tools like L<mkisofs"
40142 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
40143 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
40144 "you want to attach these filesystems to existing virtual machines (eg. to "
40145 "import large amounts of read-only data to a VM)."
40149 #: ../tools/virt-make-fs.pl:57
40150 msgid "Basic usage is:"
40154 #: ../tools/virt-make-fs.pl:59
40157 " virt-make-fs input output\n"
40162 #: ../tools/virt-make-fs.pl:61
40164 "where C<input> is either a directory containing files that you want to add, "
40165 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40166 "C<output> is a disk image. The input type is detected automatically. The "
40167 "output disk image defaults to a raw ext2 image unless you specify extra "
40168 "flags (see L</OPTIONS> below)."
40172 #: ../tools/virt-make-fs.pl:67
40173 msgid "EXTRA SPACE"
40177 #: ../tools/virt-make-fs.pl:69
40179 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
40180 "the files that it contains, but might have extra space. Depending on how "
40181 "you are going to use the output, you might think this extra space is wasted "
40182 "and want to minimize it, or you might want to leave space so that more files "
40183 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
40184 "but you can use the I<--size> flag to leave space in the filesystem if you "
40189 #: ../tools/virt-make-fs.pl:77
40191 "An alternative way to leave extra space but not make the output image any "
40192 "bigger is to use an alternative disk image format (instead of the default "
40193 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
40194 "image format (check your hypervisor supports this before using it). This "
40195 "allows you to choose a large I<--size> but the extra space won't actually be "
40196 "allocated in the image until you try to store something in it."
40200 #: ../tools/virt-make-fs.pl:85
40202 "Don't forget that you can also use local commands including L<resize2fs(8)> "
40203 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
40204 "to build another image from scratch."
40208 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
40209 #: ../tools/virt-make-fs.pl:142
40214 #: ../tools/virt-make-fs.pl:91
40217 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
40222 #: ../tools/virt-make-fs.pl:93
40223 msgid "FILESYSTEM TYPE"
40227 #: ../tools/virt-make-fs.pl:95
40229 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40230 "libguestfs supports can be used (but I<not> read-only formats like "
40231 "ISO9660). Here are some of the more common choices:"
40235 #: ../tools/virt-make-fs.pl:101
40240 #: ../tools/virt-make-fs.pl:103
40242 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40243 "you are not going to use the filesystem in a way that requires the journal, "
40244 "then this is just wasted overhead."
40248 #: ../tools/virt-make-fs.pl:107
40249 msgid "I<ntfs> or I<vfat>"
40253 #: ../tools/virt-make-fs.pl:109
40254 msgid "Useful if exporting data to a Windows guest."
40258 #: ../tools/virt-make-fs.pl:111
40260 "I<Note for vfat>: The tar archive or local directory must only contain files "
40261 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40262 "program running within libguestfs is unable to change the ownership of non-"
40263 "root files, since vfat itself does not support this."
40267 #: ../tools/virt-make-fs.pl:116
40272 #: ../tools/virt-make-fs.pl:118
40274 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40275 "total filesystem size."
40279 #: ../tools/virt-make-fs.pl:125
40282 " virt-make-fs --type=minix input minixfs.img\n"
40287 #: ../tools/virt-make-fs.pl:127
40288 msgid "TO PARTITION OR NOT TO PARTITION"
40292 #: ../tools/virt-make-fs.pl:129
40293 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40297 #: ../tools/virt-make-fs.pl:131
40299 "Adding a partition can make the disk image more compatible with certain "
40300 "virtualized operating systems which don't expect to see a filesystem "
40301 "directly located on a block device (Linux doesn't care and will happily "
40302 "handle both types)."
40306 #: ../tools/virt-make-fs.pl:136
40308 "On the other hand, if you have a partition table then the output image is no "
40309 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40310 "directly on a partitioned disk image. (However libguestfs tools such as "
40311 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40315 #: ../tools/virt-make-fs.pl:144
40316 msgid "Add an MBR partition:"
40320 #: ../tools/virt-make-fs.pl:146
40323 " virt-make-fs --partition -- input disk.img\n"
40328 #: ../tools/virt-make-fs.pl:148
40330 "If the output disk image could be terabyte-sized or larger, it's better to "
40331 "use an EFI/GPT-compatible partition table:"
40335 #: ../tools/virt-make-fs.pl:151
40338 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
40343 #: ../tools/virt-make-fs.pl:179
40344 msgid "Enable debugging information."
40348 #: ../tools/virt-make-fs.pl:185
40349 msgid "B<--size=E<lt>NE<gt>>"
40353 #: ../tools/virt-make-fs.pl:187
40354 msgid "B<--size=+E<lt>NE<gt>>"
40358 #: ../tools/virt-make-fs.pl:189
40359 msgid "B<-s E<lt>NE<gt>>"
40363 #: ../tools/virt-make-fs.pl:191
40364 msgid "B<-s +E<lt>NE<gt>>"
40368 #: ../tools/virt-make-fs.pl:193
40370 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
40374 #: ../tools/virt-make-fs.pl:196
40376 "If this option is I<not> given, then the output image will be just large "
40377 "enough to contain all the files, with not much wasted space."
40381 #: ../tools/virt-make-fs.pl:199
40383 "To choose a fixed size output disk, specify an absolute number followed by b/"
40384 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40385 "Petabytes or Exabytes. This must be large enough to contain all the input "
40386 "files, else you will get an error."
40390 #: ../tools/virt-make-fs.pl:204
40392 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
40393 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40394 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
40395 "the input files, and (approximately) an extra 200 MB free space."
40399 #: ../tools/virt-make-fs.pl:210
40401 "Note that virt-make-fs estimates free space, and therefore will not produce "
40402 "filesystems containing precisely the free space requested. (It is much more "
40403 "expensive and time-consuming to produce a filesystem which has precisely the "
40404 "desired free space)."
40408 #: ../tools/virt-make-fs.pl:219
40409 msgid "B<--format=E<lt>fmtE<gt>>"
40413 #: ../tools/virt-make-fs.pl:221
40414 msgid "B<-F E<lt>fmtE<gt>>"
40418 #: ../tools/virt-make-fs.pl:223
40419 msgid "Choose the output disk image format."
40423 #: ../tools/virt-make-fs.pl:225
40424 msgid "The default is C<raw> (raw disk image)."
40428 #: ../tools/virt-make-fs.pl:227
40430 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
40431 "that would really make sense here is C<qcow2>."
40435 #: ../tools/virt-make-fs.pl:234
40436 msgid "B<--type=E<lt>fsE<gt>>"
40440 #: ../tools/virt-make-fs.pl:236
40441 msgid "B<-t E<lt>fsE<gt>>"
40445 #: ../tools/virt-make-fs.pl:238
40446 msgid "Choose the output filesystem type."
40450 #: ../tools/virt-make-fs.pl:240
40451 msgid "The default is C<ext2>."
40455 #: ../tools/virt-make-fs.pl:242
40457 "Any filesystem which is supported read-write by libguestfs can be used here."
40461 #: ../tools/virt-make-fs.pl:249
40462 msgid "B<--partition>"
40466 #: ../tools/virt-make-fs.pl:251
40467 msgid "B<--partition=E<lt>parttypeE<gt>>"
40471 #: ../tools/virt-make-fs.pl:253
40473 "If specified, this flag adds an MBR partition table to the output disk image."
40477 #: ../tools/virt-make-fs.pl:256
40479 "You can change the partition table type, eg. I<--partition=gpt> for large "
40484 #: ../tools/virt-make-fs.pl:259
40486 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
40487 "might consider the next parameter to be the partition type. For example:"
40491 #: ../tools/virt-make-fs.pl:263
40494 " virt-make-fs --partition input.tar ...\n"
40499 #: ../tools/virt-make-fs.pl:265
40501 "would cause virt-make-fs to think you wanted to use a partition type of "
40502 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
40503 "dash) between options and the input file argument:"
40507 #: ../tools/virt-make-fs.pl:269
40510 " virt-make-fs --partition -- input.tar ...\n"
40515 #: ../tools/virt-make-fs.pl:541
40517 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
40518 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
40519 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
40523 #: ../tools/virt-make-fs.pl:555 ../tools/virt-win-reg.pl:763
40525 "When reporting bugs, please enable debugging and capture the I<complete> "
40530 #: ../tools/virt-make-fs.pl:558
40533 " export LIBGUESTFS_DEBUG=1\n"
40534 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
40539 #: ../tools/virt-make-fs.pl:561
40541 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
40546 #: ../tools/virt-tar.pl:33
40547 msgid "virt-tar - Extract or upload files to a virtual machine"
40551 #: ../tools/virt-tar.pl:37
40554 " virt-tar [--options] -x domname directory tarball\n"
40559 #: ../tools/virt-tar.pl:39
40562 " virt-tar [--options] -u domname tarball directory\n"
40567 #: ../tools/virt-tar.pl:41
40570 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
40575 #: ../tools/virt-tar.pl:43
40578 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
40583 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
40588 #: ../tools/virt-tar.pl:47
40590 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
40591 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
40595 #: ../tools/virt-tar.pl:52
40596 msgid "Download C</home> from the VM into a local tarball:"
40600 #: ../tools/virt-tar.pl:54
40603 " virt-tar -x domname /home home.tar\n"
40608 #: ../tools/virt-tar.pl:56
40611 " virt-tar -zx domname /home home.tar.gz\n"
40616 #: ../tools/virt-tar.pl:58
40617 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
40621 #: ../tools/virt-tar.pl:60
40624 " virt-tar -u domname uploadstuff.tar /tmp\n"
40629 #: ../tools/virt-tar.pl:62
40632 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
40637 #: ../tools/virt-tar.pl:66
40639 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
40640 "virtual machines. If you do this, you risk disk corruption in the VM. "
40641 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
40645 #: ../tools/virt-tar.pl:71
40647 "You can use I<-x> (extract) on live virtual machines, but you might get "
40648 "inconsistent results or errors if there is filesystem activity inside the "
40649 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
40650 "work, but the only way to guarantee consistent results is if the virtual "
40651 "machine is shut down."
40655 #: ../tools/virt-tar.pl:79
40657 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
40658 "parts of a guest filesystem. There are many possibilities: making backups, "
40659 "uploading data files, snooping on guest activity, fixing or customizing "
40664 #: ../tools/virt-tar.pl:84
40666 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
40667 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
40668 "should look at the L<guestfish(1)> tool."
40672 #: ../tools/virt-tar.pl:88
40674 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
40675 "its contents (recursively) from the virtual machine into a local tarball. "
40676 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
40677 "virtual machine. You cannot use these two options together."
40681 #: ../tools/virt-tar.pl:94
40683 "In addition, you may need to use the I<-z> (gZip) option to enable "
40684 "compression. When uploading, you have to specify I<-z> if the upload file "
40685 "is compressed because virt-tar won't detect this on its own."
40689 #: ../tools/virt-tar.pl:98
40691 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
40692 "example it cannot do PKZip files or bzip2 compression. If you want that "
40693 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
40694 "the L<libguestfs(3)> API)."
40698 #: ../tools/virt-tar.pl:160
40699 msgid "B<--extract>"
40703 #: ../tools/virt-tar.pl:162
40704 msgid "B<--download>"
40708 #: ../tools/virt-tar.pl:164
40713 #: ../tools/virt-tar.pl:166
40714 msgid "B<--upload>"
40718 #: ../tools/virt-tar.pl:168
40720 "Use I<-x> to extract (download) a directory from a virtual machine to a "
40725 #: ../tools/virt-tar.pl:171
40727 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
40728 "Please read the L</WARNING> section above before using this option."
40732 #: ../tools/virt-tar.pl:175
40733 msgid "You must specify exactly one of these options."
40737 #: ../tools/virt-tar.pl:181
40742 #: ../tools/virt-tar.pl:183
40747 #: ../tools/virt-tar.pl:185
40748 msgid "Specify that the input or output tarball is gzip-compressed."
40752 #: ../tools/virt-tar.pl:298
40754 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
40755 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
40756 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
40761 #: ../tools/virt-win-reg.pl:37
40763 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
40767 #: ../tools/virt-win-reg.pl:41
40770 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
40775 #: ../tools/virt-win-reg.pl:43
40778 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
40783 #: ../tools/virt-win-reg.pl:45
40786 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
40791 #: ../tools/virt-win-reg.pl:47
40794 " virt-win-reg --merge domname [input.reg ...]\n"
40799 #: ../tools/virt-win-reg.pl:49
40802 " virt-win-reg [--options] disk.img ... # instead of domname\n"
40807 #: ../tools/virt-win-reg.pl:53
40809 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
40810 "virtual machines. If you do this, you I<will> get irreversible disk "
40811 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
40812 "but doesn't catch all cases."
40816 #: ../tools/virt-win-reg.pl:58
40818 "Modifying the Windows Registry is an inherently risky operation. The format "
40819 "is deliberately obscure and undocumented, and Registry changes can leave the "
40820 "system unbootable. Therefore when using the I<--merge> option, make sure "
40821 "you have a reliable backup first."
40825 #: ../tools/virt-win-reg.pl:65
40827 "This program can export and merge Windows Registry entries from a Windows "
40832 #: ../tools/virt-win-reg.pl:68
40834 "The first parameter is the libvirt guest name or the raw disk image of a "
40839 #: ../tools/virt-win-reg.pl:71
40841 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
40842 "exported (recursively). For example:"
40846 #: ../tools/virt-win-reg.pl:74
40849 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
40854 #: ../tools/virt-win-reg.pl:76
40856 "You can also display single values from within registry keys, for example:"
40860 #: ../tools/virt-win-reg.pl:79
40863 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
40864 " $ virt-win-reg Windows7 $cvkey ProductName\n"
40865 " Windows 7 Enterprise\n"
40870 #: ../tools/virt-win-reg.pl:83
40872 "With I<--merge>, you can merge a textual regedit file into the Windows "
40877 #: ../tools/virt-win-reg.pl:86
40880 " $ virt-win-reg --merge Windows7 changes.reg\n"
40885 #: ../tools/virt-win-reg.pl:90
40887 "This program is only meant for simple access to the registry. If you want "
40888 "to do complicated things with the registry, we suggest you download the "
40889 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
40890 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
40891 "L<hivexregedit(1)>."
40895 #: ../tools/virt-win-reg.pl:159
40900 #: ../tools/virt-win-reg.pl:161
40902 "In merge mode, this merges a textual regedit file into the Windows Registry "
40903 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
40904 "displays or exports Registry entries instead."
40908 #: ../tools/virt-win-reg.pl:165
40910 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
40911 "result in disk corruption. However exporting (without this flag) is always "
40916 #: ../tools/virt-win-reg.pl:173
40917 msgid "B<--encoding> UTF-16LE|ASCII"
40921 #: ../tools/virt-win-reg.pl:175
40923 "When merging (only), you may need to specify the encoding for strings to be "
40924 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
40925 "(3)/ENCODING STRINGS>."
40929 #: ../tools/virt-win-reg.pl:179
40931 "The default is to use UTF-16LE, which should work with recent versions of "
40936 #: ../tools/virt-win-reg.pl:186
40937 msgid "B<--unsafe-printable-strings>"
40941 #: ../tools/virt-win-reg.pl:188
40943 "When exporting (only), assume strings are UTF-16LE and print them as strings "
40944 "instead of hex sequences. Remove the final zero codepoint from strings if "
40949 #: ../tools/virt-win-reg.pl:192
40951 "This is unsafe and does not preserve the fidelity of strings in the original "
40952 "Registry for various reasons:"
40956 #: ../tools/virt-win-reg.pl:199
40958 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
40959 "other encodings will be corrupted by this transformation."
40963 #: ../tools/virt-win-reg.pl:204
40965 "Assumes that everything which has type 1 or 2 is really a string and that "
40966 "everything else is not a string, but the type field in real Registries is "
40971 #: ../tools/virt-win-reg.pl:210
40973 "Loses information about whether a zero codepoint followed the string in the "
40978 #: ../tools/virt-win-reg.pl:215
40980 "This all happens because the Registry itself contains no information about "
40981 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
40985 #: ../tools/virt-win-reg.pl:219
40987 "You should only use this option for quick hacking and debugging of the "
40988 "Registry contents, and I<never> use it if the output is going to be passed "
40989 "into another program or stored in another Registry."
40993 #: ../tools/virt-win-reg.pl:556
40994 msgid "SUPPORTED SYSTEMS"
40998 #: ../tools/virt-win-reg.pl:558
41000 "The program currently supports Windows NT-derived guests starting with "
41001 "Windows XP through to at least Windows 7."
41005 #: ../tools/virt-win-reg.pl:561
41006 msgid "The following Registry keys are supported:"
41010 #: ../tools/virt-win-reg.pl:565
41011 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
41015 #: ../tools/virt-win-reg.pl:567
41016 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
41020 #: ../tools/virt-win-reg.pl:569
41021 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
41025 #: ../tools/virt-win-reg.pl:571
41026 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
41030 #: ../tools/virt-win-reg.pl:573
41031 msgid "C<HKEY_USERS\\.DEFAULT>"
41035 #: ../tools/virt-win-reg.pl:575
41036 msgid "C<HKEY_USERS\\I<SID>>"
41040 #: ../tools/virt-win-reg.pl:577
41041 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
41045 #: ../tools/virt-win-reg.pl:579
41046 msgid "C<HKEY_USERS\\I<username>>"
41050 #: ../tools/virt-win-reg.pl:581
41052 "where I<username> is a local user name (this is a libguestfs extension)."
41056 #: ../tools/virt-win-reg.pl:585
41058 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
41063 #: ../tools/virt-win-reg.pl:588
41065 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
41066 "supported (there is no \"current user\")."
41070 #: ../tools/virt-win-reg.pl:591
41075 #: ../tools/virt-win-reg.pl:593
41077 "C<virt-win-reg> expects that regedit files have already been reencoded in "
41078 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
41079 "style line endings. Since Windows regedit files are often in UTF-16LE with "
41080 "Windows-style line endings, you may need to reencode the whole file before "
41081 "or after processing."
41085 #: ../tools/virt-win-reg.pl:599
41087 "To reencode a file from Windows format to Linux (before processing it with "
41088 "the I<--merge> option), you would do something like this:"
41092 #: ../tools/virt-win-reg.pl:602
41095 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
41100 #: ../tools/virt-win-reg.pl:604
41102 "To go in the opposite direction, after exporting and before sending the file "
41103 "to a Windows user, do something like this:"
41107 #: ../tools/virt-win-reg.pl:607
41110 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
41115 #: ../tools/virt-win-reg.pl:609
41116 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
41120 #: ../tools/virt-win-reg.pl:611
41122 "If you are unsure about the current encoding, use the L<file(1)> command. "
41123 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
41124 "style (CRLF) line endings, like this:"
41128 #: ../tools/virt-win-reg.pl:615
41131 " $ file software.reg\n"
41132 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41133 " with CRLF line terminators\n"
41138 #: ../tools/virt-win-reg.pl:619
41139 msgid "This file would need conversion before you could I<--merge> it."
41143 #: ../tools/virt-win-reg.pl:621
41144 msgid "CurrentControlSet etc."
41148 #: ../tools/virt-win-reg.pl:623
41150 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41151 "Registry at the level of the hive file, and therefore you cannot modify "
41156 #: ../tools/virt-win-reg.pl:627
41158 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41159 "circumstances it might refer to another control set. The way to find out is "
41160 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41164 #: ../tools/virt-win-reg.pl:631
41167 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41168 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41169 " \"Current\"=dword:00000001\n"
41170 " \"Default\"=dword:00000001\n"
41171 " \"Failed\"=dword:00000000\n"
41172 " \"LastKnownGood\"=dword:00000002\n"
41177 #: ../tools/virt-win-reg.pl:638
41178 msgid "\"Current\" is the one which Windows will choose when it boots."
41182 #: ../tools/virt-win-reg.pl:640
41184 "Similarly, other C<Current...> keys in the path may need to be replaced."
41188 #: ../tools/virt-win-reg.pl:643
41189 msgid "WINDOWS TIPS"
41193 #: ../tools/virt-win-reg.pl:645
41195 "Note that some of these tips modify the guest disk image. The guest I<must> "
41196 "be shut off, else you will get disk corruption."
41200 #: ../tools/virt-win-reg.pl:648
41201 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41205 #: ../tools/virt-win-reg.pl:650
41207 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41208 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41209 "is uploaded into C<C:\\>:"
41213 #: ../tools/virt-win-reg.pl:654
41216 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41221 #: ../tools/virt-win-reg.pl:656
41222 msgid "Prepare a regedit file containing the registry change:"
41226 #: ../tools/virt-win-reg.pl:658
41229 " cat > test.reg <<'EOF'\n"
41230 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41231 " \"Test\"=\"c:\\\\test.bat\"\n"
41237 #: ../tools/virt-win-reg.pl:663
41239 "In this example we use the key C<RunOnce> which means that the script will "
41240 "run precisely once when the first user logs in. If you want it to run every "
41241 "time a user logs in, replace C<RunOnce> with C<Run>."
41245 #: ../tools/virt-win-reg.pl:667
41246 msgid "Now update the registry:"
41250 #: ../tools/virt-win-reg.pl:669
41253 " virt-win-reg --merge WindowsGuest test.reg\n"
41258 #: ../tools/virt-win-reg.pl:671
41259 msgid "INSTALLING A SERVICE"
41263 #: ../tools/virt-win-reg.pl:673
41265 "This section assumes you are familiar with Windows services, and you either "
41266 "have a program which handles the Windows Service Control Protocol directly "
41267 "or you want to run any program using a service wrapper like SrvAny or the "
41272 #: ../tools/virt-win-reg.pl:678
41274 "First upload the program and optionally the service wrapper. In this case "
41275 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
41279 #: ../tools/virt-win-reg.pl:682
41282 " guestfish -i -d WindowsGuest <<EOF\n"
41283 " upload rhsrvany.exe /rhsrvany.exe\n"
41284 " upload test.exe /test.exe\n"
41290 #: ../tools/virt-win-reg.pl:687
41292 "Prepare a regedit file containing the registry changes. In this example, "
41293 "the first registry change is needed for the service itself or the service "
41294 "wrapper (if used). The second registry change is only needed because I am "
41295 "using the RHSrvAny service wrapper."
41299 #: ../tools/virt-win-reg.pl:692
41302 " cat > service.reg <<'EOF'\n"
41303 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
41304 " \"Type\"=dword:00000010\n"
41305 " \"Start\"=dword:00000002\n"
41306 " \"ErrorControl\"=dword:00000001\n"
41307 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
41308 " \"DisplayName\"=\"RHSrvAny\"\n"
41309 " \"ObjectName\"=\"NetworkService\"\n"
41314 #: ../tools/virt-win-reg.pl:701
41317 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
41318 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
41319 " \"PWD\"=\"c:\\\\Temp\"\n"
41325 #: ../tools/virt-win-reg.pl:712
41327 "For use of C<ControlSet001> see the section above in this manual page. You "
41328 "may need to adjust this according to the control set that is in use by the "
41333 #: ../tools/virt-win-reg.pl:718
41335 "C<\"ObjectName\"> controls the privileges that the service will have. An "
41336 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
41337 "privileged account."
41341 #: ../tools/virt-win-reg.pl:724
41343 "For the meaning of the magic numbers, see this Microsoft KB article: "
41344 "L<http://support.microsoft.com/kb/103000>."
41348 #: ../tools/virt-win-reg.pl:729
41349 msgid "Update the registry:"
41353 #: ../tools/virt-win-reg.pl:731
41356 " virt-win-reg --merge WindowsGuest service.reg\n"
41361 #: ../tools/virt-win-reg.pl:735
41363 "Be careful when passing parameters containing C<\\> (backslash) in the "
41364 "shell. Usually you will have to use 'single quotes' or double backslashes "
41365 "(but not both) to protect them from the shell."
41369 #: ../tools/virt-win-reg.pl:739
41370 msgid "Paths and value names are case-insensitive."
41374 #: ../tools/virt-win-reg.pl:748
41376 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
41377 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
41378 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41382 #: ../tools/virt-win-reg.pl:766
41385 " export LIBGUESTFS_DEBUG=1\n"
41386 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
41391 #: ../tools/virt-win-reg.pl:769
41393 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."