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-12-22 16:09+0000\n"
13 "PO-Revision-Date: 2011-10-27 09:15+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 ../examples/guestfs-testing.pod:3
28 #: ../fish/guestfish.pod:3 ../fish/virt-copy-in.pod:3
29 #: ../fish/virt-copy-out.pod:3 ../fish/virt-tar-in.pod:3
30 #: ../fish/virt-tar-out.pod:3 ../fuse/guestmount.pod:3
31 #: ../inspector/virt-inspector.pod:3 ../java/examples/guestfs-java.pod:3
32 #: ../ocaml/examples/guestfs-ocaml.pod:3 ../perl/examples/guestfs-perl.pod:3
33 #: ../python/examples/guestfs-python.pod:3 ../rescue/virt-rescue.pod:3
34 #: ../resize/virt-resize.pod:3 ../ruby/examples/guestfs-ruby.pod:3
35 #: ../sparsify/virt-sparsify.pod:3 ../src/guestfs.pod:3
36 #: ../test-tool/libguestfs-test-tool.pod:3
37 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
38 #: ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31
39 #: ../tools/virt-win-reg.pl:35
44 #: ../align/virt-alignment-scan.pod:5
45 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
49 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7
50 #: ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7
51 #: ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7
52 #: ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7
53 #: ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7
54 #: ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7
55 #: ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7
56 #: ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7
57 #: ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7
58 #: ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7
59 #: ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7
60 #: ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7
61 #: ../test-tool/libguestfs-test-tool.pod:7
62 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
63 #: ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35
64 #: ../tools/virt-win-reg.pl:39
69 #: ../align/virt-alignment-scan.pod:9
72 " virt-alignment-scan [--options] -d domname\n"
77 #: ../align/virt-alignment-scan.pod:11
80 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
85 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19
86 #: ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19
87 #: ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27
88 #: ../erlang/examples/guestfs-erlang.pod:16
89 #: ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18
90 #: ../examples/guestfs-testing.pod:7 ../fish/guestfish.pod:30
91 #: ../fish/virt-copy-in.pod:19 ../fish/virt-copy-out.pod:13
92 #: ../fish/virt-tar-in.pod:21 ../fish/virt-tar-out.pod:15
93 #: ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pod:19
94 #: ../java/examples/guestfs-java.pod:15 ../ocaml/examples/guestfs-ocaml.pod:25
95 #: ../perl/examples/guestfs-perl.pod:18
96 #: ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:31
97 #: ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15
98 #: ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23
99 #: ../test-tool/libguestfs-test-tool.pod:11
100 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
101 #: ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77
102 #: ../tools/virt-win-reg.pl:63
107 #: ../align/virt-alignment-scan.pod:15
109 "When older operating systems install themselves, the partitioning tools "
110 "place partitions at a sector misaligned with the underlying storage "
111 "(commonly the first partition starts on sector C<63>). Misaligned "
112 "partitions can result in an operating system issuing more I/O than should be "
117 #: ../align/virt-alignment-scan.pod:21
119 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
120 "machines and disk images and warns you if there are alignment problems."
124 #: ../align/virt-alignment-scan.pod:25
126 "Currently there is no virt tool for fixing alignment problems. You can only "
127 "reinstall the guest operating system. The following NetApp document "
128 "summarises the problem and possible solutions: L<http://media.netapp.com/"
129 "documents/tr-3747.pdf>"
133 #: ../align/virt-alignment-scan.pod:30
138 #: ../align/virt-alignment-scan.pod:32
139 msgid "To run this tool on a disk image directly, use the I<-a> option:"
143 #: ../align/virt-alignment-scan.pod:34
146 " $ virt-alignment-scan -a winxp.img\n"
147 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
152 #: ../align/virt-alignment-scan.pod:37
155 " $ virt-alignment-scan -a fedora16.img\n"
156 " /dev/sda1 1048576 1024K ok\n"
157 " /dev/sda2 2097152 2048K ok\n"
158 " /dev/sda3 526385152 2048K ok\n"
163 #: ../align/virt-alignment-scan.pod:42
165 "To run the tool on a guest known to libvirt, use the I<-d> option and "
166 "possibly the I<-c> option:"
170 #: ../align/virt-alignment-scan.pod:45
173 " # virt-alignment-scan -d RHEL5\n"
174 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
175 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
180 #: ../align/virt-alignment-scan.pod:49
183 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
184 " /dev/sda1 1048576 1024K ok\n"
185 " /dev/sda2 105906176 1024K ok\n"
186 " /dev/sdb1 65536 64K ok\n"
191 #: ../align/virt-alignment-scan.pod:54
193 "The output consists of 4 or more whitespace-separated columns. Only the "
194 "first 4 columns are signficant if you want to parse this from a program. "
199 #: ../align/virt-alignment-scan.pod:60
204 #: ../align/virt-alignment-scan.pod:62
206 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
207 "on the first block device)"
211 #: ../align/virt-alignment-scan.pod:65
216 #: ../align/virt-alignment-scan.pod:67
217 msgid "the start of the partition in bytes"
221 #: ../align/virt-alignment-scan.pod:69
226 #: ../align/virt-alignment-scan.pod:71
227 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
231 #: ../align/virt-alignment-scan.pod:73
236 #: ../align/virt-alignment-scan.pod:75
238 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
239 "can cause performance problems"
243 #: ../align/virt-alignment-scan.pod:78
248 #: ../align/virt-alignment-scan.pod:80
249 msgid "optional free-text explanation."
253 #: ../align/virt-alignment-scan.pod:84
255 "The exit code from the program changes depending on whether poorly aligned "
256 "partitions were found. See L</EXIT STATUS> below."
260 #: ../align/virt-alignment-scan.pod:87
261 msgid "If you just want the exit code with no output, use the I<-q> option."
265 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62
266 #: ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261
267 #: ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62
268 #: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45
269 #: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42
270 #: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92
271 #: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:112
272 #: ../resize/virt-resize.pod:262 ../sparsify/virt-sparsify.pod:99
273 #: ../test-tool/libguestfs-test-tool.pod:36
274 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54
275 #: ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103
276 #: ../tools/virt-win-reg.pl:96
281 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66
282 #: ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265
283 #: ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66
284 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160
285 #: ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:116
286 #: ../resize/virt-resize.pod:266 ../sparsify/virt-sparsify.pod:103
287 #: ../test-tool/libguestfs-test-tool.pod:40
288 #: ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62
289 #: ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111
290 #: ../tools/virt-win-reg.pl:104
295 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68
296 #: ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267
297 #: ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68
298 #: ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:118
299 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64
300 #: ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113
301 #: ../tools/virt-win-reg.pl:106
302 msgid "Display brief help."
306 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70
307 #: ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269
308 #: ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70
309 #: ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:120
314 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72
315 #: ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271
316 #: ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72
317 #: ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:122
318 msgid "B<--add> file"
322 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
323 msgid "Add I<file> which should be a disk image from a virtual machine."
327 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78
328 #: ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277
329 #: ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78
330 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102
331 #: ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:128
333 "The format of the disk image is auto-detected. To override this and force a "
334 "particular format use the I<--format=..> option."
338 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81
339 #: ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291
340 #: ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78
341 #: ../rescue/virt-rescue.pod:135
346 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83
347 #: ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293
348 #: ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80
349 #: ../rescue/virt-rescue.pod:137
350 msgid "B<--connect> URI"
354 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85
355 #: ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295
356 #: ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99
357 #: ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:139
358 #: ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82
359 #: ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
361 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
362 "to the default libvirt hypervisor."
366 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88
367 #: ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298
368 #: ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85
369 #: ../rescue/virt-rescue.pod:142
371 "If you specify guest block devices directly (I<-a>), then libvirt is not "
376 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91
377 #: ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307
378 #: ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105
379 #: ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:145
384 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93
385 #: ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309
386 #: ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107
387 #: ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:147
388 msgid "B<--domain> guest"
392 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95
393 #: ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311
394 #: ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109
395 #: ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:149
397 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
402 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105
403 #: ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328
404 #: ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101
405 #: ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142
406 #: ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:152
407 msgid "B<--format=raw|qcow2|..>"
411 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107
412 #: ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330
413 #: ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103
414 #: ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235
415 #: ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101
416 #: ../rescue/virt-rescue.pod:154
421 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109
422 #: ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332
423 #: ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105
424 #: ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237
425 #: ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:156
427 "The default for the I<-a> option is to auto-detect the format of the disk "
428 "image. Using this forces the disk format for I<-a> options which follow on "
429 "the command line. Using I<--format> with no argument switches back to auto-"
430 "detection for subsequent I<-a> options."
434 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114
435 #: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337
436 #: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110
437 #: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242
438 #: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:351
439 #: ../rescue/virt-rescue.pod:161 ../src/guestfs.pod:2878
444 #: ../align/virt-alignment-scan.pod:134
447 " virt-alignment-scan --format=raw -a disk.img\n"
452 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118
453 #: ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341
454 #: ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114
455 #: ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246
456 #: ../rescue/virt-rescue.pod:165
457 msgid "forces raw format (no auto-detection) for C<disk.img>."
461 #: ../align/virt-alignment-scan.pod:138
464 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
469 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122
470 #: ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345
471 #: ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118
472 #: ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250
473 #: ../rescue/virt-rescue.pod:169
475 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
476 "detection for C<another.img>."
480 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125
481 #: ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348
482 #: ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121
483 #: ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:172
485 "If you have untrusted raw-format guest disk images, you should use this "
486 "option to specify the disk format. This avoids a possible security problem "
487 "with malicious guests (CVE-2010-3851)."
491 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:497
492 #: ../sparsify/virt-sparsify.pod:177
497 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:499
498 #: ../sparsify/virt-sparsify.pod:179
503 #: ../align/virt-alignment-scan.pod:151
505 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
510 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134
511 #: ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425
512 #: ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173
513 #: ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390
514 #: ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119
515 #: ../rescue/virt-rescue.pod:219 ../sparsify/virt-sparsify.pod:183
520 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136
521 #: ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427
522 #: ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175
523 #: ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392
524 #: ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121
525 #: ../rescue/virt-rescue.pod:221 ../sparsify/virt-sparsify.pod:185
530 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138
531 #: ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429
532 #: ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177
533 #: ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123
534 #: ../rescue/virt-rescue.pod:223 ../sparsify/virt-sparsify.pod:187
535 msgid "Enable verbose messages for debugging."
539 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140
540 #: ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431
541 #: ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179
542 #: ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397
543 #: ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125
544 #: ../rescue/virt-rescue.pod:225 ../resize/virt-resize.pod:567
545 #: ../sparsify/virt-sparsify.pod:189
550 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142
551 #: ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433
552 #: ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181
553 #: ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399
554 #: ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127
555 #: ../rescue/virt-rescue.pod:227 ../resize/virt-resize.pod:569
556 #: ../sparsify/virt-sparsify.pod:191 ../tools/virt-list-filesystems.pl:69
557 #: ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169
558 #: ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
563 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144
564 #: ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435
565 #: ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183
566 #: ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129
567 #: ../rescue/virt-rescue.pod:229 ../resize/virt-resize.pod:571
568 #: ../sparsify/virt-sparsify.pod:193 ../tools/virt-list-filesystems.pl:71
569 #: ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171
570 #: ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
571 msgid "Display version number and exit."
575 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146
576 #: ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437
577 #: ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185
578 #: ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412
579 #: ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131
580 #: ../rescue/virt-rescue.pod:240 ../sparsify/virt-sparsify.pod:195
581 #: ../tools/virt-tar.pl:158
586 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148
587 #: ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439
588 #: ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187
589 #: ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133
590 #: ../rescue/virt-rescue.pod:242 ../sparsify/virt-sparsify.pod:197
591 msgid "Enable tracing of libguestfs API calls."
595 #: ../align/virt-alignment-scan.pod:172
596 msgid "RECOMMENDED ALIGNMENT"
600 #: ../align/virt-alignment-scan.pod:174
602 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
603 "first sector of the first partition at sector 63, with a 512 byte sector "
604 "size. This happens because of a historical accident. Drives have to report "
605 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
606 "completely meaningless on modern drives, but it happens that the geometry "
607 "reported always has 63 sectors per track. The operating system therefore "
608 "places the first partition at the start of the second \"track\", at sector "
613 #: ../align/virt-alignment-scan.pod:183
615 "When the guest OS is virtualized, the host operating system and hypervisor "
616 "may prefer accesses aligned to one of:"
620 #: ../align/virt-alignment-scan.pod:188
625 #: ../align/virt-alignment-scan.pod:190
627 "if the host OS uses local storage directly on hard drive partitions, and the "
628 "hard drive has 512 byte physical sectors."
632 #: ../align/virt-alignment-scan.pod:193
637 #: ../align/virt-alignment-scan.pod:195
639 "for local storage on new hard drives with 4Kbyte physical sectors; for file-"
640 "backed storage on filesystems with 4Kbyte block size; or for some types of "
641 "network-attached storage."
645 #: ../align/virt-alignment-scan.pod:199
650 #: ../align/virt-alignment-scan.pod:201
652 "for high-end network-attached storage. This is the optimal block size for "
653 "some NetApp hardware."
657 #: ../align/virt-alignment-scan.pod:204
662 #: ../align/virt-alignment-scan.pod:206
663 msgid "see L</1 MB PARTITION ALIGNMENT> below."
667 #: ../align/virt-alignment-scan.pod:210
669 "Partitions which are not aligned correctly to the underlying storage cause "
670 "extra I/O. For example:"
674 #: ../align/virt-alignment-scan.pod:213
678 " +--------------------------+------\n"
680 " | filesystem block |\n"
681 " ---+------------------+------+-------------------+-----+---\n"
682 " | host block | host block |\n"
684 " ---+-------------------------+-------------------------+---\n"
689 #: ../align/virt-alignment-scan.pod:222
691 "In this example, each time a 4K guest block is read, two blocks on the host "
692 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
693 "written, two host blocks must first be read, the old and new data combined, "
694 "and the two blocks written back (4x I/O)."
698 #: ../align/virt-alignment-scan.pod:227
699 msgid "LINUX HOST BLOCK AND I/O SIZE"
703 #: ../align/virt-alignment-scan.pod:229
705 "New versions of the Linux kernel expose the physical and logical block size, "
706 "and minimum and recommended I/O size."
710 #: ../align/virt-alignment-scan.pod:232
711 msgid "For a typical consumer hard drive with 512 byte sectors:"
715 #: ../align/virt-alignment-scan.pod:234
718 " $ cat /sys/block/sda/queue/hw_sector_size\n"
720 " $ cat /sys/block/sda/queue/physical_block_size\n"
722 " $ cat /sys/block/sda/queue/logical_block_size\n"
724 " $ cat /sys/block/sda/queue/minimum_io_size\n"
726 " $ cat /sys/block/sda/queue/optimal_io_size\n"
732 #: ../align/virt-alignment-scan.pod:245
733 msgid "For a new consumer hard drive with 4Kbyte sectors:"
737 #: ../align/virt-alignment-scan.pod:247
740 " $ cat /sys/block/sda/queue/hw_sector_size\n"
742 " $ cat /sys/block/sda/queue/physical_block_size\n"
744 " $ cat /sys/block/sda/queue/logical_block_size\n"
746 " $ cat /sys/block/sda/queue/minimum_io_size\n"
748 " $ cat /sys/block/sda/queue/optimal_io_size\n"
754 #: ../align/virt-alignment-scan.pod:258
755 msgid "For a NetApp LUN:"
759 #: ../align/virt-alignment-scan.pod:260
762 " $ cat /sys/block/sdc/queue/logical_block_size\n"
764 " $ cat /sys/block/sdc/queue/physical_block_size\n"
766 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
768 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
774 #: ../align/virt-alignment-scan.pod:269
776 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
777 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
781 #: ../align/virt-alignment-scan.pod:273
783 "For detailed information about what these numbers mean, see L<http://docs."
784 "redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/"
785 "Storage_Administration_Guide/newstorage-iolimits.html>"
789 #: ../align/virt-alignment-scan.pod:276
791 "[Thanks to Matt Booth for providing 4K drive data. Thanks to Mike Snitzer "
792 "for providing NetApp data and additional information.]"
796 #: ../align/virt-alignment-scan.pod:279
797 msgid "1 MB PARTITION ALIGNMENT"
801 #: ../align/virt-alignment-scan.pod:281
803 "Microsoft picked 1 MB as the default alignment for all partitions starting "
804 "with Windows 2008 Server, and Linux has followed this."
808 #: ../align/virt-alignment-scan.pod:284
810 "Assuming 512 byte sectors in the guest, you will now see the first partition "
811 "starting at sector 2048, and subsequent partitions (if any) will start at a "
812 "multiple of 2048 sectors."
816 #: ../align/virt-alignment-scan.pod:288
818 "1 MB alignment is compatible with all current alignment requirements (4K, "
819 "64K) and provides room for future growth in physical block sizes."
823 #: ../align/virt-alignment-scan.pod:291
824 msgid "SETTING ALIGNMENT"
828 #: ../align/virt-alignment-scan.pod:293
830 "L<virt-resize(1)> can change the alignment of the partitions of some "
831 "guests. Currently it can fully align all the partitions of all Windows "
832 "guests, and it will fix the bootloader where necessary. For Linux guests, "
833 "it can align the second and subsequent partitions, so the majority of OS "
834 "accesses except at boot will be aligned."
838 #: ../align/virt-alignment-scan.pod:299
840 "Another way to correct partition alignment problems is to reinstall your "
841 "guest operating systems. If you install operating systems from templates, "
842 "ensure these have correct partition alignment too."
846 #: ../align/virt-alignment-scan.pod:303
848 "For older versions of Windows, the following NetApp document contains useful "
849 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
853 #: ../align/virt-alignment-scan.pod:306
855 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
856 "an explicit C<%pre> section that creates aligned partitions using L<parted(8)"
857 ">. Do not use the Kickstart C<part> command. The NetApp document above "
858 "contains an example."
862 #: ../align/virt-alignment-scan.pod:311 ../cat/virt-cat.pod:231
863 #: ../cat/virt-filesystems.pod:373 ../cat/virt-ls.pod:483
864 #: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:241
865 #: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:367
866 #: ../rescue/virt-rescue.pod:303 ../resize/virt-resize.pod:682
867 #: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
868 #: ../tools/virt-make-fs.pl:550 ../tools/virt-tar.pl:289
869 #: ../tools/virt-win-reg.pl:744
870 msgid "SHELL QUOTING"
874 #: ../align/virt-alignment-scan.pod:313 ../cat/virt-cat.pod:233
875 #: ../cat/virt-filesystems.pod:375 ../cat/virt-ls.pod:485
876 #: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:243
877 #: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:369
878 #: ../rescue/virt-rescue.pod:305 ../resize/virt-resize.pod:684
879 #: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
880 #: ../tools/virt-make-fs.pl:552 ../tools/virt-tar.pl:291
881 #: ../tools/virt-win-reg.pl:752
883 "Libvirt guest names can contain arbitrary characters, some of which have "
884 "meaning to the shell such as C<#> and space. You may need to quote or "
885 "escape these characters on the command line. See the shell manual page L<sh"
890 #: ../align/virt-alignment-scan.pod:318 ../cat/virt-cat.pod:238
891 #: ../cat/virt-filesystems.pod:380 ../cat/virt-ls.pod:490
892 #: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:248
893 #: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
894 #: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:390
895 #: ../resize/virt-resize.pod:689 ../sparsify/virt-sparsify.pod:251
896 #: ../test-tool/libguestfs-test-tool.pod:90
901 #: ../align/virt-alignment-scan.pod:320
902 msgid "This program returns:"
906 #: ../align/virt-alignment-scan.pod:324 ../align/virt-alignment-scan.pod:330
907 #: ../align/virt-alignment-scan.pod:336 ../align/virt-alignment-scan.pod:343
908 #: ../cat/virt-cat.pod:177 ../cat/virt-cat.pod:182 ../cat/virt-cat.pod:187
909 #: ../cat/virt-cat.pod:198 ../cat/virt-cat.pod:202
910 #: ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287
911 #: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295
912 #: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314
913 #: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322
914 #: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362
915 #: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388
916 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
917 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
918 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
919 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
920 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
921 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
922 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
923 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
924 #: ../examples/guestfs-testing.pod:110 ../examples/guestfs-testing.pod:114
925 #: ../examples/guestfs-testing.pod:118 ../fish/guestfish-actions.pod:13
926 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:441
927 #: ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:456
928 #: ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:1293
929 #: ../fish/guestfish-actions.pod:1297 ../fish/guestfish-actions.pod:1301
930 #: ../fish/guestfish-actions.pod:1305 ../fish/guestfish-actions.pod:1313
931 #: ../fish/guestfish-actions.pod:1317 ../fish/guestfish-actions.pod:1321
932 #: ../fish/guestfish-actions.pod:1331 ../fish/guestfish-actions.pod:1335
933 #: ../fish/guestfish-actions.pod:1339 ../fish/guestfish-actions.pod:1429
934 #: ../fish/guestfish-actions.pod:1433 ../fish/guestfish-actions.pod:1438
935 #: ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:1485
936 #: ../fish/guestfish-actions.pod:1489 ../fish/guestfish-actions.pod:1494
937 #: ../fish/guestfish-actions.pod:1750 ../fish/guestfish-actions.pod:1757
938 #: ../fish/guestfish-actions.pod:1764 ../fish/guestfish-actions.pod:2167
939 #: ../fish/guestfish-actions.pod:2173 ../fish/guestfish-actions.pod:2181
940 #: ../fish/guestfish-actions.pod:2188 ../fish/guestfish-actions.pod:2195
941 #: ../fish/guestfish.pod:445 ../fish/guestfish.pod:449
942 #: ../fish/guestfish.pod:453 ../fish/guestfish.pod:457
943 #: ../inspector/virt-inspector.pod:408 ../inspector/virt-inspector.pod:412
944 #: ../resize/virt-resize.pod:365 ../resize/virt-resize.pod:369
945 #: ../resize/virt-resize.pod:378 ../resize/virt-resize.pod:384
946 #: ../sparsify/virt-sparsify.pod:32 ../sparsify/virt-sparsify.pod:39
947 #: ../sparsify/virt-sparsify.pod:43 ../sparsify/virt-sparsify.pod:49
948 #: ../sparsify/virt-sparsify.pod:54 ../sparsify/virt-sparsify.pod:58
949 #: ../sparsify/virt-sparsify.pod:64 ../src/guestfs-actions.pod:22
950 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:641
951 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:656
952 #: ../src/guestfs-actions.pod:663 ../src/guestfs-actions.pod:2118
953 #: ../src/guestfs-actions.pod:2122 ../src/guestfs-actions.pod:2126
954 #: ../src/guestfs-actions.pod:2130 ../src/guestfs-actions.pod:2138
955 #: ../src/guestfs-actions.pod:2142 ../src/guestfs-actions.pod:2146
956 #: ../src/guestfs-actions.pod:2156 ../src/guestfs-actions.pod:2160
957 #: ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:2302
958 #: ../src/guestfs-actions.pod:2306 ../src/guestfs-actions.pod:2311
959 #: ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2377
960 #: ../src/guestfs-actions.pod:2381 ../src/guestfs-actions.pod:2386
961 #: ../src/guestfs-actions.pod:2801 ../src/guestfs-actions.pod:2808
962 #: ../src/guestfs-actions.pod:2815 ../src/guestfs-actions.pod:3360
963 #: ../src/guestfs-actions.pod:3366 ../src/guestfs-actions.pod:3374
964 #: ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:3388
965 #: ../src/guestfs.pod:403 ../src/guestfs.pod:408 ../src/guestfs.pod:413
966 #: ../src/guestfs.pod:417 ../src/guestfs.pod:422 ../src/guestfs.pod:426
967 #: ../src/guestfs.pod:431 ../src/guestfs.pod:436 ../src/guestfs.pod:1109
968 #: ../src/guestfs.pod:1113 ../src/guestfs.pod:1117 ../src/guestfs.pod:1122
969 #: ../src/guestfs.pod:1130 ../src/guestfs.pod:1149 ../src/guestfs.pod:1157
970 #: ../src/guestfs.pod:1179 ../src/guestfs.pod:1183 ../src/guestfs.pod:1187
971 #: ../src/guestfs.pod:1191 ../src/guestfs.pod:1195 ../src/guestfs.pod:1199
972 #: ../src/guestfs.pod:1689 ../src/guestfs.pod:1694 ../src/guestfs.pod:1698
973 #: ../src/guestfs.pod:1800 ../src/guestfs.pod:1805 ../src/guestfs.pod:1809
974 #: ../src/guestfs.pod:1819 ../src/guestfs.pod:2108 ../src/guestfs.pod:2113
975 #: ../src/guestfs.pod:2119 ../src/guestfs.pod:2127 ../src/guestfs.pod:2645
976 #: ../src/guestfs.pod:2651 ../src/guestfs.pod:2656 ../src/guestfs.pod:2662
977 #: ../src/guestfs.pod:3048 ../src/guestfs.pod:3053 ../src/guestfs.pod:3057
978 #: ../src/guestfs.pod:3061 ../src/guestfs.pod:3065 ../src/guestfs.pod:3079
979 #: ../src/guestfs.pod:3084 ../src/guestfs.pod:3316 ../src/guestfs.pod:3320
980 #: ../src/guestfs.pod:3324 ../src/guestfs.pod:3328
981 #: ../tools/virt-win-reg.pl:197 ../tools/virt-win-reg.pl:202
982 #: ../tools/virt-win-reg.pl:208 ../tools/virt-win-reg.pl:721
983 #: ../tools/virt-win-reg.pl:727 ../tools/virt-win-reg.pl:733
988 #: ../align/virt-alignment-scan.pod:326
993 #: ../align/virt-alignment-scan.pod:328
995 "successful exit, all partitions are aligned E<ge> 64K for best performance"
999 #: ../align/virt-alignment-scan.pod:332
1004 #: ../align/virt-alignment-scan.pod:334
1005 msgid "an error scanning the disk image or guest"
1009 #: ../align/virt-alignment-scan.pod:338
1014 #: ../align/virt-alignment-scan.pod:340
1016 "successful exit, some partitions have alignment E<lt> 64K which can result "
1017 "in poor performance on high end network storage"
1021 #: ../align/virt-alignment-scan.pod:345
1026 #: ../align/virt-alignment-scan.pod:347
1028 "successful exit, some partitions have alignment E<lt> 4K which can result in "
1029 "poor performance on most hypervisors"
1033 #: ../align/virt-alignment-scan.pod:352 ../cat/virt-cat.pod:243
1034 #: ../cat/virt-filesystems.pod:385 ../cat/virt-ls.pod:495
1035 #: ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:253
1036 #: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97
1037 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
1038 #: ../examples/guestfs-testing.pod:291 ../fish/guestfish.pod:1268
1039 #: ../fish/virt-copy-in.pod:50 ../fish/virt-copy-out.pod:39
1040 #: ../fish/virt-tar-in.pod:47 ../fish/virt-tar-out.pod:41
1041 #: ../fuse/guestmount.pod:317 ../inspector/virt-inspector.pod:395
1042 #: ../java/examples/guestfs-java.pod:45 ../ocaml/examples/guestfs-ocaml.pod:78
1043 #: ../perl/examples/guestfs-perl.pod:39
1044 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:325
1045 #: ../resize/virt-resize.pod:694 ../ruby/examples/guestfs-ruby.pod:36
1046 #: ../sparsify/virt-sparsify.pod:275 ../src/guestfs.pod:3256
1047 #: ../test-tool/libguestfs-test-tool.pod:100
1048 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
1049 #: ../tools/virt-make-fs.pl:557 ../tools/virt-tar.pl:296
1050 #: ../tools/virt-win-reg.pl:757
1055 #: ../align/virt-alignment-scan.pod:354
1057 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
1058 "L<virt-resize(1)>, L<http://libguestfs.org/>."
1062 #: ../align/virt-alignment-scan.pod:361 ../cat/virt-cat.pod:252
1063 #: ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:507
1064 #: ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:261
1065 #: ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:334
1066 #: ../resize/virt-resize.pod:717 ../sparsify/virt-sparsify.pod:288
1067 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
1068 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:311
1069 #: ../tools/virt-win-reg.pl:783
1074 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:254
1075 #: ../cat/virt-filesystems.pod:398 ../cat/virt-ls.pod:509
1076 #: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:263
1077 #: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:410
1078 #: ../rescue/virt-rescue.pod:336 ../resize/virt-resize.pod:719
1079 #: ../sparsify/virt-sparsify.pod:290 ../tools/virt-list-filesystems.pl:210
1080 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:584
1081 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:785
1082 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
1086 #: ../align/virt-alignment-scan.pod:365 ../cat/virt-cat.pod:256
1087 #: ../cat/virt-filesystems.pod:400 ../cat/virt-ls.pod:511
1088 #: ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:265
1089 #: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114
1090 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
1091 #: ../examples/guestfs-testing.pod:302 ../fish/guestfish.pod:1300
1092 #: ../fish/virt-copy-in.pod:64 ../fish/virt-copy-out.pod:53
1093 #: ../fish/virt-tar-in.pod:62 ../fish/virt-tar-out.pod:55
1094 #: ../fuse/guestmount.pod:332 ../inspector/virt-inspector.pod:418
1095 #: ../java/examples/guestfs-java.pod:62 ../ocaml/examples/guestfs-ocaml.pod:95
1096 #: ../perl/examples/guestfs-perl.pod:56
1097 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:338
1098 #: ../resize/virt-resize.pod:721 ../ruby/examples/guestfs-ruby.pod:52
1099 #: ../sparsify/virt-sparsify.pod:292 ../src/guestfs.pod:3339
1100 #: ../test-tool/libguestfs-test-tool.pod:110
1101 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
1102 #: ../tools/virt-make-fs.pl:586 ../tools/virt-tar.pl:315
1103 #: ../tools/virt-win-reg.pl:787
1108 #: ../align/virt-alignment-scan.pod:367 ../clone/virt-sysprep.pod:507
1109 #: ../sparsify/virt-sparsify.pod:294
1110 msgid "Copyright (C) 2011 Red Hat Inc."
1114 #: ../align/virt-alignment-scan.pod:369 ../cat/virt-cat.pod:260
1115 #: ../cat/virt-filesystems.pod:404 ../cat/virt-ls.pod:515
1116 #: ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:269
1117 #: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
1118 #: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
1119 #: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
1120 #: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:422
1121 #: ../rescue/virt-rescue.pod:342 ../resize/virt-resize.pod:725
1122 #: ../sparsify/virt-sparsify.pod:296 ../test-tool/libguestfs-test-tool.pod:115
1123 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
1124 #: ../tools/virt-make-fs.pl:590 ../tools/virt-tar.pl:319
1125 #: ../tools/virt-win-reg.pl:791
1127 "This program is free software; you can redistribute it and/or modify it "
1128 "under the terms of the GNU General Public License as published by the Free "
1129 "Software Foundation; either version 2 of the License, or (at your option) "
1130 "any later version."
1134 #: ../align/virt-alignment-scan.pod:374 ../cat/virt-cat.pod:265
1135 #: ../cat/virt-filesystems.pod:409 ../cat/virt-ls.pod:520
1136 #: ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:274
1137 #: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
1138 #: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
1139 #: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
1140 #: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:427
1141 #: ../rescue/virt-rescue.pod:347 ../resize/virt-resize.pod:730
1142 #: ../sparsify/virt-sparsify.pod:301 ../test-tool/libguestfs-test-tool.pod:120
1143 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
1144 #: ../tools/virt-make-fs.pl:595 ../tools/virt-tar.pl:324
1145 #: ../tools/virt-win-reg.pl:796
1147 "This program is distributed in the hope that it will be useful, but WITHOUT "
1148 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
1149 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
1154 #: ../align/virt-alignment-scan.pod:379 ../cat/virt-cat.pod:270
1155 #: ../cat/virt-filesystems.pod:414 ../cat/virt-ls.pod:525
1156 #: ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:279
1157 #: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
1158 #: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
1159 #: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
1160 #: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:432
1161 #: ../rescue/virt-rescue.pod:352 ../resize/virt-resize.pod:735
1162 #: ../sparsify/virt-sparsify.pod:306 ../test-tool/libguestfs-test-tool.pod:125
1163 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
1164 #: ../tools/virt-make-fs.pl:600 ../tools/virt-tar.pl:329
1165 #: ../tools/virt-win-reg.pl:801
1167 "You should have received a copy of the GNU General Public License along with "
1168 "this program; if not, write to the Free Software Foundation, Inc., 51 "
1169 "Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA."
1173 #: ../cat/virt-cat.pod:5
1174 msgid "virt-cat - Display files in a virtual machine"
1178 #: ../cat/virt-cat.pod:9
1181 " virt-cat [--options] -d domname file [file ...]\n"
1186 #: ../cat/virt-cat.pod:11
1189 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
1194 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
1195 #: ../inspector/virt-inspector.pod:13
1200 #: ../cat/virt-cat.pod:15
1203 " virt-cat domname file\n"
1208 #: ../cat/virt-cat.pod:17
1211 " virt-cat disk.img file\n"
1216 #: ../cat/virt-cat.pod:21
1218 "C<virt-cat> is a command line tool to display the contents of C<file> where "
1219 "C<file> exists in the named virtual machine (or disk image)."
1223 #: ../cat/virt-cat.pod:24
1225 "Multiple filenames can be given, in which case they are concatenated "
1226 "together. Each filename must be a full path, starting at the root directory "
1227 "(starting with '/')."
1231 #: ../cat/virt-cat.pod:28
1233 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
1234 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
1235 "(see L</USING GUESTFISH> below)."
1239 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
1240 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
1241 #: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29
1242 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
1243 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
1244 #: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75
1245 #: ../tools/virt-tar.pl:50
1250 #: ../cat/virt-cat.pod:34
1252 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
1256 #: ../cat/virt-cat.pod:37
1259 " virt-cat -d mydomain /etc/fstab\n"
1264 #: ../cat/virt-cat.pod:39
1265 msgid "List syslog messages from a VM disk image file:"
1269 #: ../cat/virt-cat.pod:41
1272 " virt-cat -a disk.img /var/log/messages | tail\n"
1277 #: ../cat/virt-cat.pod:43
1278 msgid "Find out what DHCP IP address a VM acquired:"
1282 #: ../cat/virt-cat.pod:45
1285 " virt-cat -d mydomain /var/log/messages | \\\n"
1286 " grep 'dhclient: bound to' | tail\n"
1291 #: ../cat/virt-cat.pod:48
1292 msgid "Find out what packages were recently installed:"
1296 #: ../cat/virt-cat.pod:50
1299 " virt-cat -d mydomain /var/log/yum.log | tail\n"
1304 #: ../cat/virt-cat.pod:52
1305 msgid "Find out who is logged on inside a virtual machine:"
1309 #: ../cat/virt-cat.pod:54
1312 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
1318 #: ../cat/virt-cat.pod:57
1319 msgid "or who was logged on:"
1323 #: ../cat/virt-cat.pod:59
1326 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
1327 " last -f /tmp/wtmp\n"
1332 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
1333 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
1334 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:124
1336 "Add I<file> which should be a disk image from a virtual machine. If the "
1337 "virtual machine has multiple block devices, you must supply all of them with "
1338 "separate I<-a> options."
1342 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
1343 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
1344 #: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
1345 msgid "B<--echo-keys>"
1349 #: ../cat/virt-cat.pod:100
1351 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
1352 "so you cannot see what you are typing. If you are not worried about Tempest "
1353 "attacks and there is no one else in the room you can specify this flag to "
1354 "see what you are typing."
1358 #: ../cat/virt-cat.pod:116
1361 " virt-cat --format=raw -a disk.img file\n"
1366 #: ../cat/virt-cat.pod:120
1369 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
1374 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
1375 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
1376 #: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
1377 msgid "B<--keys-from-stdin>"
1381 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
1382 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
1383 #: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1385 "Read key or passphrase parameters from stdin. The default is to try to read "
1386 "passphrases from the user by opening C</dev/tty>."
1390 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
1391 #: ../inspector/virt-inspector.pod:144 ../rescue/virt-rescue.pod:246
1392 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1396 #: ../cat/virt-cat.pod:154
1397 msgid "Previous versions of virt-cat allowed you to write either:"
1401 #: ../cat/virt-cat.pod:156
1404 " virt-cat disk.img [disk.img ...] file\n"
1409 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
1410 #: ../inspector/virt-inspector.pod:150 ../rescue/virt-rescue.pod:252
1415 #: ../cat/virt-cat.pod:160
1418 " virt-cat guestname file\n"
1423 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
1424 #: ../inspector/virt-inspector.pod:154 ../rescue/virt-rescue.pod:256
1426 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1427 "the confusing case where a disk image might have the same name as a guest."
1431 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
1432 #: ../inspector/virt-inspector.pod:158 ../rescue/virt-rescue.pod:260
1433 msgid "For compatibility the old style is still supported."
1437 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
1438 msgid "WINDOWS PATHS"
1442 #: ../cat/virt-cat.pod:170
1444 "C<virt-cat> has a limited ability to understand Windows drive letters and "
1445 "paths (eg. C<E:\\foo\\bar.txt>)."
1449 #: ../cat/virt-cat.pod:173 ../edit/virt-edit.pod:262
1450 msgid "If and only if the guest is running Windows then:"
1454 #: ../cat/virt-cat.pod:179 ../edit/virt-edit.pod:268
1456 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
1457 "to the correct filesystem."
1461 #: ../cat/virt-cat.pod:184 ../edit/virt-edit.pod:273
1463 "Any backslash (C<\\>) characters in the path are replaced with forward "
1464 "slashes so that libguestfs can process it."
1468 #: ../cat/virt-cat.pod:189
1470 "The path is resolved case insensitively to locate the file that should be "
1475 #: ../cat/virt-cat.pod:194 ../edit/virt-edit.pod:283
1476 msgid "There are some known shortcomings:"
1480 #: ../cat/virt-cat.pod:200 ../edit/virt-edit.pod:289
1481 msgid "Some NTFS symbolic links may not be followed correctly."
1485 #: ../cat/virt-cat.pod:204 ../edit/virt-edit.pod:293
1486 msgid "NTFS junction points that cross filesystems are not followed."
1490 #: ../cat/virt-cat.pod:208 ../edit/virt-edit.pod:297
1491 msgid "USING GUESTFISH"
1495 #: ../cat/virt-cat.pod:210
1497 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1498 "C<virt-cat> doesn't work."
1502 #: ../cat/virt-cat.pod:213
1503 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1507 #: ../cat/virt-cat.pod:215
1510 " guestfish --ro -i -d domname download file -\n"
1515 #: ../cat/virt-cat.pod:217
1517 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1518 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1522 #: ../cat/virt-cat.pod:221
1524 "The command above uses libguestfs's guest inspection feature and so does not "
1525 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1526 "disk images that don't contain guests. To display a file from a disk image "
1531 #: ../cat/virt-cat.pod:226
1534 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1539 #: ../cat/virt-cat.pod:228
1541 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1542 "the disk image, and C<file> is the full path to the file."
1546 #: ../cat/virt-cat.pod:240 ../cat/virt-filesystems.pod:382
1547 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:250 ../edit/virt-edit.pod:351
1548 #: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:392
1549 #: ../resize/virt-resize.pod:691 ../sparsify/virt-sparsify.pod:253
1551 "This program returns 0 if successful, or non-zero if there was an error."
1555 #: ../cat/virt-cat.pod:245
1557 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L<virt-"
1558 "tar-out(1)>, L<http://libguestfs.org/>."
1562 #: ../cat/virt-cat.pod:258 ../inspector/virt-inspector.pod:420
1563 #: ../resize/virt-resize.pod:723 ../tools/virt-make-fs.pl:588
1564 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1568 #: ../cat/virt-filesystems.pod:5
1570 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1571 "virtual machine or disk image"
1575 #: ../cat/virt-filesystems.pod:9
1578 " virt-filesystems [--options] -d domname\n"
1583 #: ../cat/virt-filesystems.pod:11
1586 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1591 #: ../cat/virt-filesystems.pod:15
1593 "This tool allows you to discover filesystems, partitions, logical volumes, "
1594 "and their sizes in a disk image or virtual machine. It is a replacement for "
1595 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1599 #: ../cat/virt-filesystems.pod:20
1601 "One use for this tool is from shell scripts to iterate over all filesystems "
1602 "from a disk image:"
1606 #: ../cat/virt-filesystems.pod:23
1609 " for fs in $(virt-filesystems -a disk.img); do\n"
1616 #: ../cat/virt-filesystems.pod:27
1618 "Another use is to list partitions before using another tool to modify those "
1619 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1620 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1624 #: ../cat/virt-filesystems.pod:32
1626 "Various command line options control what this program displays. You need "
1627 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1628 "guest respectively. If you just specify that then the program shows "
1629 "filesystems found, one per line, like this:"
1633 #: ../cat/virt-filesystems.pod:37
1636 " $ virt-filesystems -a disk.img\n"
1638 " /dev/vg_guest/lv_root\n"
1643 #: ../cat/virt-filesystems.pod:41
1645 "If you add I<-l> or I<--long> then the output includes extra information:"
1649 #: ../cat/virt-filesystems.pod:44
1652 " $ virt-filesystems -a disk.img -l\n"
1653 " Name Type VFS Label Size\n"
1654 " /dev/sda1 filesystem ext4 boot 524288000\n"
1655 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1660 #: ../cat/virt-filesystems.pod:49
1662 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1667 #: ../cat/virt-filesystems.pod:52
1670 " $ virt-filesystems -a disk.img --extra\n"
1672 " /dev/vg_guest/lv_root\n"
1673 " /dev/vg_guest/lv_swap\n"
1674 " /dev/vg_guest/lv_data\n"
1679 #: ../cat/virt-filesystems.pod:58
1681 "If you add I<--partitions> then partitions are shown instead of filesystems:"
1685 #: ../cat/virt-filesystems.pod:60
1688 " $ virt-filesystems -a disk.img --partitions\n"
1695 #: ../cat/virt-filesystems.pod:64
1697 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-"
1698 "volumes>, I<--block-devices> to list those items."
1702 #: ../cat/virt-filesystems.pod:67
1704 "You can use these options in combination as well (if you want a combination "
1705 "including filesystems, you have to add I<--filesystems>). Notice that some "
1706 "items fall into several categories (eg. C</dev/sda1> might be both a "
1707 "partition and a filesystem). These items are listed several times. To get "
1708 "a list which includes absolutely everything that virt-filesystems knows "
1709 "about, use the I<--all> option."
1713 #: ../cat/virt-filesystems.pod:74
1715 "UUIDs (because they are quite long) are not shown by default. Add the I<--"
1716 "uuid> option to display device and filesystem UUIDs in the long output."
1720 #: ../cat/virt-filesystems.pod:78
1722 "I<--all --long --uuid> is a useful combination to display all possible "
1723 "information about everything."
1727 #: ../cat/virt-filesystems.pod:81
1730 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1731 " Name Type VFS Label Size Parent UUID\n"
1732 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1733 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1734 " /dev/sda1 partition - - 100M /dev/sda -\n"
1735 " /dev/sda2 partition - - 20G /dev/sda -\n"
1736 " /dev/sda device - - 20G - -\n"
1741 #: ../cat/virt-filesystems.pod:89
1743 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1747 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1752 #: ../cat/virt-filesystems.pod:112
1754 "Display everything. This is currently the same as specifying these options: "
1755 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--"
1756 "logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be "
1757 "added to this list in future)."
1761 #: ../cat/virt-filesystems.pod:117
1762 msgid "See also I<--long>."
1766 #: ../cat/virt-filesystems.pod:119
1767 msgid "B<--blkdevs>"
1771 #: ../cat/virt-filesystems.pod:121
1772 msgid "B<--block-devices>"
1776 #: ../cat/virt-filesystems.pod:123
1777 msgid "Display block devices."
1781 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1786 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1788 "Write out the results in CSV format (comma-separated values). This format "
1789 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1790 "ABOUT CSV FORMAT> below."
1794 #: ../cat/virt-filesystems.pod:150
1796 "When prompting for keys and passphrases, virt-filesystems normally turns "
1797 "echoing off so you cannot see what you are typing. If you are not worried "
1798 "about Tempest attacks and there is no one else in the room you can specify "
1799 "this flag to see what you are typing."
1803 #: ../cat/virt-filesystems.pod:155
1808 #: ../cat/virt-filesystems.pod:157
1810 "This causes filesystems that are not ordinary, mountable filesystems to be "
1811 "displayed. This category includes swapspace, and filesystems that are empty "
1812 "or contain unknown data."
1816 #: ../cat/virt-filesystems.pod:161
1817 msgid "This option implies I<--filesystems>."
1821 #: ../cat/virt-filesystems.pod:163
1822 msgid "B<--filesystems>"
1826 #: ../cat/virt-filesystems.pod:165
1828 "Display mountable filesystems. If no display option was selected then this "
1829 "option is implied."
1833 #: ../cat/virt-filesystems.pod:168
1834 msgid "With I<--extra>, non-mountable filesystems are shown too."
1838 #: ../cat/virt-filesystems.pod:181
1841 " virt-filesystems --format=raw -a disk.img\n"
1846 #: ../cat/virt-filesystems.pod:185
1849 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1854 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1855 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1856 #: ../tools/virt-list-partitions.pl:109
1861 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1862 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1863 msgid "B<--human-readable>"
1867 #: ../cat/virt-filesystems.pod:198
1868 msgid "In I<--long> mode, display sizes in human-readable format."
1872 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1873 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1878 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1879 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1884 #: ../cat/virt-filesystems.pod:209
1885 msgid "Display extra columns of data (\"long format\")."
1889 #: ../cat/virt-filesystems.pod:211
1890 msgid "A title row is added unless you also specify I<--no-title>."
1894 #: ../cat/virt-filesystems.pod:213
1896 "The extra columns displayed depend on what output you select, and the "
1897 "ordering of columns may change in future versions. Use the title row, I<--"
1898 "csv> output and/or L<csvtool(1)> to match columns to data in external "
1903 #: ../cat/virt-filesystems.pod:218
1905 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1906 "default is to show raw numbers of I<bytes>."
1910 #: ../cat/virt-filesystems.pod:221
1911 msgid "Use I<--uuid> to display UUIDs too."
1915 #: ../cat/virt-filesystems.pod:223
1920 #: ../cat/virt-filesystems.pod:225
1921 msgid "B<--logvols>"
1925 #: ../cat/virt-filesystems.pod:227
1926 msgid "B<--logical-volumes>"
1930 #: ../cat/virt-filesystems.pod:229
1932 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1933 "of whether the LVs contain filesystems."
1937 #: ../cat/virt-filesystems.pod:232
1938 msgid "B<--no-title>"
1942 #: ../cat/virt-filesystems.pod:234
1943 msgid "In I<--long> mode, don't add a title row."
1947 #: ../cat/virt-filesystems.pod:236
1949 "Note that the order of the columns is not fixed, and may change in future "
1950 "versions of virt-filesystems, so using this option may give you unexpected "
1955 #: ../cat/virt-filesystems.pod:240
1960 #: ../cat/virt-filesystems.pod:242
1961 msgid "B<--partitions>"
1965 #: ../cat/virt-filesystems.pod:244
1967 "Display partitions. In this mode, these are displayed irrespective of "
1968 "whether the partitions contain filesystems."
1972 #: ../cat/virt-filesystems.pod:247
1977 #: ../cat/virt-filesystems.pod:249
1978 msgid "B<--physvols>"
1982 #: ../cat/virt-filesystems.pod:251
1983 msgid "B<--physical-volumes>"
1987 #: ../cat/virt-filesystems.pod:253
1988 msgid "Display LVM physical volumes."
1992 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1997 #: ../cat/virt-filesystems.pod:257
2002 #: ../cat/virt-filesystems.pod:259
2003 msgid "In I<--long> mode, display UUIDs as well."
2007 #: ../cat/virt-filesystems.pod:273
2012 #: ../cat/virt-filesystems.pod:275
2013 msgid "B<--volgroups>"
2017 #: ../cat/virt-filesystems.pod:277
2018 msgid "B<--volume-groups>"
2022 #: ../cat/virt-filesystems.pod:279
2023 msgid "Display LVM volume groups."
2027 #: ../cat/virt-filesystems.pod:287
2032 #: ../cat/virt-filesystems.pod:289
2034 "Note that columns in the output are subject to reordering and change in "
2035 "future versions of this tool."
2039 #: ../cat/virt-filesystems.pod:294
2044 #: ../cat/virt-filesystems.pod:296
2045 msgid "The filesystem, partition, block device or LVM name."
2049 #: ../cat/virt-filesystems.pod:298
2051 "For device and partition names these are displayed as canonical libguestfs "
2052 "names, so that for example C</dev/sda2> is the second partition on the first "
2057 #: ../cat/virt-filesystems.pod:302
2059 "If the I<--long> option is B<not> specified, then only the name column is "
2060 "shown in the output."
2064 #: ../cat/virt-filesystems.pod:305
2069 #: ../cat/virt-filesystems.pod:307
2070 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
2074 #: ../cat/virt-filesystems.pod:309
2079 #: ../cat/virt-filesystems.pod:311
2081 "If there is a filesystem, then this column displays the filesystem type if "
2082 "one could be detected, eg. C<ext4>."
2086 #: ../cat/virt-filesystems.pod:314
2091 #: ../cat/virt-filesystems.pod:316
2093 "If the object has a label (used for identifying and mounting filesystems) "
2094 "then this column contains the label."
2098 #: ../cat/virt-filesystems.pod:319
2103 #: ../cat/virt-filesystems.pod:321
2105 "The partition type byte, displayed as a two digit hexadecimal number. A "
2106 "comprehensive list of partition types can be found here: L<http://www.win."
2107 "tue.nl/~aeb/partitions/partition_types-1.html>"
2111 #: ../cat/virt-filesystems.pod:325
2112 msgid "This is only applicable for DOS (MBR) partitions."
2116 #: ../cat/virt-filesystems.pod:327
2121 #: ../cat/virt-filesystems.pod:329
2123 "The size of the object in bytes. If the I<--human> option is used then the "
2124 "size is displayed in a human-readable form."
2128 #: ../cat/virt-filesystems.pod:332
2133 #: ../cat/virt-filesystems.pod:334
2135 "The parent column records the parent relationship between objects. For "
2136 "example, if the object is a partition, then this column contains the name of "
2137 "the containing device. If the object is a logical volume, then this column "
2138 "is the name of the volume group."
2142 #: ../cat/virt-filesystems.pod:339
2147 #: ../cat/virt-filesystems.pod:341
2149 "If the object has a UUID (used for identifying and mounting filesystems and "
2150 "block devices) then this column contains the UUID as a string."
2154 #: ../cat/virt-filesystems.pod:345
2155 msgid "The UUID is only displayed if the I<--uuid> option is given."
2159 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:459
2160 #: ../df/virt-df.pod:217
2161 msgid "NOTE ABOUT CSV FORMAT"
2165 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:461
2166 #: ../df/virt-df.pod:219
2168 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
2169 "should be easy to parse, but it is definitely not easy to parse."
2173 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:464
2174 #: ../df/virt-df.pod:222
2176 "Myth: Just split fields at commas. Reality: This does I<not> work "
2177 "reliably. This example has two columns:"
2181 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:467
2182 #: ../df/virt-df.pod:225
2185 " \"foo,bar\",baz\n"
2190 #: ../cat/virt-filesystems.pod:359 ../cat/virt-ls.pod:469
2191 #: ../df/virt-df.pod:227
2193 "Myth: Read the file one line at a time. Reality: This does I<not> work "
2194 "reliably. This example has one row:"
2198 #: ../cat/virt-filesystems.pod:362 ../cat/virt-ls.pod:472
2199 #: ../df/virt-df.pod:230
2208 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:475
2209 #: ../df/virt-df.pod:233
2211 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
2212 "packaged in major Linux distributions)."
2216 #: ../cat/virt-filesystems.pod:368 ../cat/virt-ls.pod:478
2217 #: ../df/virt-df.pod:236
2219 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
2220 "or Python's built-in csv library)."
2224 #: ../cat/virt-filesystems.pod:371 ../cat/virt-ls.pod:481
2225 #: ../df/virt-df.pod:239
2226 msgid "Most spreadsheets and databases can import CSV directly."
2230 #: ../cat/virt-filesystems.pod:387
2232 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
2233 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, L<http://"
2238 #: ../cat/virt-filesystems.pod:402 ../tools/virt-win-reg.pl:789
2239 msgid "Copyright (C) 2010 Red Hat Inc."
2243 #: ../cat/virt-ls.pod:5
2244 msgid "virt-ls - List files in a virtual machine"
2248 #: ../cat/virt-ls.pod:9
2251 " virt-ls [--options] -d domname directory [directory ...]\n"
2256 #: ../cat/virt-ls.pod:11
2259 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
2264 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:15
2269 #: ../cat/virt-ls.pod:15
2272 " virt-ls [--options] domname directory\n"
2277 #: ../cat/virt-ls.pod:17
2280 " virt-ls [--options] disk.img [disk.img ...] directory\n"
2285 #: ../cat/virt-ls.pod:21
2287 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
2288 "more from a virtual machine or disk image."
2292 #: ../cat/virt-ls.pod:24
2294 "Multiple directory names can be given, in which case the output from each is "
2299 #: ../cat/virt-ls.pod:27
2301 "To list directories from a libvirt guest use the I<-d> option to specify the "
2302 "name of the guest. For a disk image, use the I<-a> option."
2306 #: ../cat/virt-ls.pod:31
2308 "C<virt-ls> can do many simple file listings. For more complicated cases you "
2309 "may need to use L<guestfish(1)>, or write a program directly to the L<guestfs"
2314 #: ../cat/virt-ls.pod:37
2315 msgid "Get a list of all files and directories in a virtual machine:"
2319 #: ../cat/virt-ls.pod:39
2322 " virt-ls -R -d guest /\n"
2327 #: ../cat/virt-ls.pod:41 ../examples/guestfs-testing.pod:182
2328 msgid "List all setuid or setgid programs in a Linux virtual machine:"
2332 #: ../cat/virt-ls.pod:43
2335 " virt-ls -lR -d guest / | grep '^- [42]'\n"
2340 #: ../cat/virt-ls.pod:45 ../examples/guestfs-testing.pod:186
2341 msgid "List all public-writable directories in a Linux virtual machine:"
2345 #: ../cat/virt-ls.pod:47
2348 " virt-ls -lR -d guest / | grep '^d ...7'\n"
2353 #: ../cat/virt-ls.pod:49 ../examples/guestfs-testing.pod:190
2354 msgid "List all Unix domain sockets in a Linux virtual machine:"
2358 #: ../cat/virt-ls.pod:51
2361 " virt-ls -lR -d guest / | grep '^s'\n"
2366 #: ../cat/virt-ls.pod:53 ../examples/guestfs-testing.pod:194
2367 msgid "List all regular files with filenames ending in '.png':"
2371 #: ../cat/virt-ls.pod:55
2374 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
2379 #: ../cat/virt-ls.pod:57
2380 msgid "To display files larger than 10MB in home directories:"
2384 #: ../cat/virt-ls.pod:59
2387 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
2392 #: ../cat/virt-ls.pod:61 ../examples/guestfs-testing.pod:202
2393 msgid "Find everything modified in the last 7 days:"
2397 #: ../cat/virt-ls.pod:63
2400 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
2405 #: ../cat/virt-ls.pod:65 ../examples/guestfs-testing.pod:206
2406 msgid "Find regular files modified in the last 24 hours:"
2410 #: ../cat/virt-ls.pod:67
2413 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2418 #: ../cat/virt-ls.pod:69
2419 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2423 #: ../cat/virt-ls.pod:71
2425 "Find the differences between files in a guest and an earlier snapshot of the "
2430 #: ../cat/virt-ls.pod:74
2433 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2434 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2435 " diff -u old new | less\n"
2440 #: ../cat/virt-ls.pod:78
2442 "The commands above won't find files where the content has changed but the "
2443 "metadata (eg. file size and modification date) is the same. To do that, you "
2444 "need to add the I<--checksum> parameter to both C<virt-ls> commands. I<--"
2445 "checksum> can be quite slow since it has to read and compute a checksum of "
2446 "every regular file in the virtual machine."
2450 #: ../cat/virt-ls.pod:84
2451 msgid "OUTPUT MODES"
2455 #: ../cat/virt-ls.pod:86
2457 "C<virt-ls> has four output modes, controlled by different combinations of "
2458 "the I<-l> and I<-R> options."
2462 #: ../cat/virt-ls.pod:89
2463 msgid "SIMPLE LISTING"
2467 #: ../cat/virt-ls.pod:91
2468 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2472 #: ../cat/virt-ls.pod:93
2475 " $ virt-ls -d guest /\n"
2483 #: ../cat/virt-ls.pod:98
2484 msgid "LONG LISTING"
2488 #: ../cat/virt-ls.pod:100
2490 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2491 "(more specifically, like the C<guestfs_ll> function)."
2495 #: ../cat/virt-ls.pod:103
2498 " $ virt-ls -l -d guest /\n"
2500 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2501 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2507 #: ../cat/virt-ls.pod:109
2509 "Note that while this is useful for displaying a directory, do not try "
2510 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2515 #: ../cat/virt-ls.pod:113
2516 msgid "RECURSIVE LISTING"
2520 #: ../cat/virt-ls.pod:115
2522 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2523 "and directories recursively:"
2527 #: ../cat/virt-ls.pod:118
2530 " $ virt-ls -R -d guest /tmp\n"
2538 #: ../cat/virt-ls.pod:123
2540 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2541 "converts C<\\0> characters to C<\\n>."
2545 #: ../cat/virt-ls.pod:126
2546 msgid "RECURSIVE LONG LISTING"
2550 #: ../cat/virt-ls.pod:128
2552 "Using I<-lR> options together changes the output to display directories "
2553 "recursively, with file stats, and optionally other features such as "
2554 "checksums and extended attributes."
2558 #: ../cat/virt-ls.pod:132
2560 "Most of the interesting features of C<virt-ls> are only available when using "
2565 #: ../cat/virt-ls.pod:135
2567 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2568 "you cannot use the output in another program (because filenames can contain "
2569 "spaces and other unsafe characters). If the guest was untrusted and someone "
2570 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2571 "on you by creating filenames with embedded newline characters. To B<safely> "
2572 "parse the output in another program, use the I<--csv> (Comma-Separated "
2577 #: ../cat/virt-ls.pod:143
2579 "Note that this output format is completely unrelated to the C<ls -lR> "
2584 #: ../cat/virt-ls.pod:146
2587 " $ virt-ls -lR -d guest /bin\n"
2588 " d 0555 4096 /bin\n"
2589 " - 0755 123 /bin/alsaunmute\n"
2590 " - 0755 28328 /bin/arch\n"
2591 " l 0777 4 /bin/awk -> gawk\n"
2592 " - 0755 27216 /bin/basename\n"
2593 " - 0755 943360 /bin/bash\n"
2599 #: ../cat/virt-ls.pod:155
2600 msgid "These basic fields are always shown:"
2604 #: ../cat/virt-ls.pod:159
2609 #: ../cat/virt-ls.pod:161
2611 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2612 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2613 "link), C<s> (socket) or C<u> (unknown)."
2617 #: ../cat/virt-ls.pod:171
2622 #: ../cat/virt-ls.pod:173
2623 msgid "The Unix permissions, displayed as a 4 digit octal number."
2627 #: ../cat/virt-ls.pod:175
2632 #: ../cat/virt-ls.pod:177
2634 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
2635 "readable> option is given, in which case this is shown as a human-readable "
2640 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4519
2645 #: ../cat/virt-ls.pod:183
2646 msgid "The full path of the file or directory."
2650 #: ../cat/virt-ls.pod:185
2655 #: ../cat/virt-ls.pod:187
2656 msgid "For symbolic links only, the link target."
2660 #: ../cat/virt-ls.pod:191
2662 "In I<-lR> mode, additional command line options enable the display of more "
2667 #: ../cat/virt-ls.pod:194
2669 "With the I<--uids> flag, these additional fields are displayed before the "
2674 #: ../cat/virt-ls.pod:199
2679 #: ../cat/virt-ls.pod:201
2684 #: ../cat/virt-ls.pod:203
2686 "The UID and GID of the owner of the file (displayed numerically). Note "
2687 "these only make sense in the context of a Unix-like guest."
2691 #: ../cat/virt-ls.pod:208
2692 msgid "With the I<--times> flag, these additional fields are displayed:"
2696 #: ../cat/virt-ls.pod:212
2701 #: ../cat/virt-ls.pod:214
2702 msgid "The time of last access."
2706 #: ../cat/virt-ls.pod:216
2711 #: ../cat/virt-ls.pod:218
2712 msgid "The time of last modification."
2716 #: ../cat/virt-ls.pod:220
2721 #: ../cat/virt-ls.pod:222
2722 msgid "The time of last status change."
2726 #: ../cat/virt-ls.pod:226
2728 "The time fields are displayed as string dates and times, unless one of the "
2729 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2733 #: ../cat/virt-ls.pod:229
2734 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2738 #: ../cat/virt-ls.pod:233
2743 #: ../cat/virt-ls.pod:235
2745 "The device containing the file (displayed as major:minor). This may not "
2746 "match devices as known to the guest."
2750 #: ../cat/virt-ls.pod:238
2755 #: ../cat/virt-ls.pod:240
2756 msgid "The inode number."
2760 #: ../cat/virt-ls.pod:242
2765 #: ../cat/virt-ls.pod:244
2766 msgid "The number of hard links."
2770 #: ../cat/virt-ls.pod:246
2775 #: ../cat/virt-ls.pod:248
2777 "For block and char special files, the device (displayed as major:minor)."
2781 #: ../cat/virt-ls.pod:251
2786 #: ../cat/virt-ls.pod:253
2787 msgid "The number of 512 byte blocks allocated to the file."
2791 #: ../cat/virt-ls.pod:257
2793 "With the I<--checksum> flag, the checksum of the file contents is shown "
2794 "(only for regular files). Computing file checksums can take a considerable "
2799 #: ../cat/virt-ls.pod:280
2800 msgid "B<--checksum>"
2804 #: ../cat/virt-ls.pod:282
2805 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2809 #: ../cat/virt-ls.pod:284
2811 "Display checksum over file contents for regular files. With no argument, "
2812 "this defaults to using I<md5>. Using an argument, you can select the "
2813 "checksum type to use."
2817 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2818 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2819 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2821 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2826 #: ../cat/virt-ls.pod:316
2828 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2829 "so you cannot see what you are typing. If you are not worried about Tempest "
2830 "attacks and there is no one else in the room you can specify this flag to "
2831 "see what you are typing."
2835 #: ../cat/virt-ls.pod:321
2836 msgid "B<--extra-stats>"
2840 #: ../cat/virt-ls.pod:323
2841 msgid "Display extra stats."
2845 #: ../cat/virt-ls.pod:339
2848 " virt-ls --format=raw -a disk.img /dir\n"
2853 #: ../cat/virt-ls.pod:343
2856 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2861 #: ../cat/virt-ls.pod:356
2862 msgid "Display file sizes in human-readable format."
2866 #: ../cat/virt-ls.pod:370
2871 #: ../cat/virt-ls.pod:372
2872 msgid "B<--recursive>"
2876 #: ../cat/virt-ls.pod:374
2878 "Select the mode. With neither of these options, C<virt-ls> produces a "
2879 "simple, flat list of the files in the named directory. See L</SIMPLE "
2884 #: ../cat/virt-ls.pod:378
2886 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See L</"
2891 #: ../cat/virt-ls.pod:381
2893 "C<virt-ls -R> produces a recursive list of files starting at the named "
2894 "directory. See L</RECURSIVE LISTING>."
2898 #: ../cat/virt-ls.pod:384
2900 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2901 "parsed. See L</RECURSIVE LONG LISTING>."
2905 #: ../cat/virt-ls.pod:387
2910 #: ../cat/virt-ls.pod:389
2911 msgid "Display time fields."
2915 #: ../cat/virt-ls.pod:394
2916 msgid "B<--time-days>"
2920 #: ../cat/virt-ls.pod:396
2921 msgid "Display time fields as days before now (negative if in the future)."
2925 #: ../cat/virt-ls.pod:398
2927 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2928 "of the file is between 0 and 86399 seconds."
2932 #: ../cat/virt-ls.pod:404
2933 msgid "B<--time-relative>"
2937 #: ../cat/virt-ls.pod:406
2938 msgid "Display time fields as seconds before now (negative if in the future)."
2942 #: ../cat/virt-ls.pod:411
2947 #: ../cat/virt-ls.pod:413
2948 msgid "Display time fields as seconds since the Unix epoch."
2952 #: ../cat/virt-ls.pod:418
2957 #: ../cat/virt-ls.pod:420
2958 msgid "Display UID and GID fields."
2962 #: ../cat/virt-ls.pod:445
2963 msgid "Previous versions of virt-ls allowed you to write either:"
2967 #: ../cat/virt-ls.pod:447
2970 " virt-ls disk.img [disk.img ...] /dir\n"
2975 #: ../cat/virt-ls.pod:451
2978 " virt-ls guestname /dir\n"
2983 #: ../cat/virt-ls.pod:497
2985 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2986 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2987 "L<http://libguestfs.org/>."
2991 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:267 ../edit/virt-edit.pod:374
2992 #: ../rescue/virt-rescue.pod:340
2993 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2997 #: ../clone/virt-sysprep.pod:5
2999 "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
3003 #: ../clone/virt-sysprep.pod:9
3006 " virt-sysprep [--options] -d domname\n"
3011 #: ../clone/virt-sysprep.pod:11
3014 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
3019 #: ../clone/virt-sysprep.pod:15
3021 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
3022 "can be made from it. Steps in this process include removing SSH host keys, "
3023 "removing persistent network MAC configuration, and removing user accounts. "
3024 "Each step can be enabled or disabled as required."
3028 #: ../clone/virt-sysprep.pod:21
3030 "Virt-sysprep is a simple shell script, allowing easy inspection or "
3031 "customization by the system administrator."
3035 #: ../clone/virt-sysprep.pod:24
3037 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
3038 "be shut down. If you want to preserve the existing contents of the guest, "
3039 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> below."
3043 #: ../clone/virt-sysprep.pod:29
3045 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
3046 "recommend that you don't. The time you might want to run it as root is when "
3047 "you need root in order to access the disk image, but even in this case it "
3048 "would be better to change the permissions on the disk image to be writable "
3049 "as the non-root user running virt-sysprep."
3053 #: ../clone/virt-sysprep.pod:35
3055 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
3056 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
3057 "machines in preparation for cloning them. Having said that, virt-sysprep "
3058 "does I<not> currently work on Microsoft Windows guests. We plan to support "
3059 "Windows sysprepping in a future version, and we already have code to do it."
3063 #: ../clone/virt-sysprep.pod:76
3064 msgid "B<--enable=...>"
3068 #: ../clone/virt-sysprep.pod:78
3070 "Choose which sysprep operations to perform. Give a comma-separated list of "
3071 "operations, for example:"
3075 #: ../clone/virt-sysprep.pod:81
3078 " --enable=ssh-hostkeys,udev-persistent-net\n"
3083 #: ../clone/virt-sysprep.pod:83
3085 "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
3089 #: ../clone/virt-sysprep.pod:85
3091 "If the I<--enable> option is not given, then we default to trying all "
3092 "possible sysprep operations. But some sysprep operations are skipped for "
3097 #: ../clone/virt-sysprep.pod:89
3099 "Use I<--list-operations> to list operations supported by a particular "
3100 "version of virt-sysprep."
3104 #: ../clone/virt-sysprep.pod:92
3106 "See L</OPERATIONS> below for a list and an explanation of each operation."
3110 #: ../clone/virt-sysprep.pod:106
3113 " virt-sysprep --format=raw -a disk.img\n"
3118 #: ../clone/virt-sysprep.pod:110
3121 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
3126 #: ../clone/virt-sysprep.pod:119
3127 msgid "B<--hostname> newhostname"
3131 #: ../clone/virt-sysprep.pod:121
3133 "Change the hostname. See the L</hostname> operation below. If not given, "
3134 "defaults to C<localhost.localdomain>."
3138 #: ../clone/virt-sysprep.pod:124
3139 msgid "B<--list-operations>"
3143 #: ../clone/virt-sysprep.pod:126
3144 msgid "List the operations supported by the virt-sysprep program."
3148 #: ../clone/virt-sysprep.pod:128
3149 msgid "B<--selinux-relabel>"
3153 #: ../clone/virt-sysprep.pod:130
3154 msgid "B<--no-selinux-relabel>"
3158 #: ../clone/virt-sysprep.pod:132
3160 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
3161 "I<--no-selinux-relabel> disables relabelling."
3165 #: ../clone/virt-sysprep.pod:135
3167 "The default is to try to detect if SELinux relabelling is required. See L</"
3168 "SELINUX RELABELLING> below for more details."
3172 #: ../clone/virt-sysprep.pod:156
3177 #: ../clone/virt-sysprep.pod:158
3179 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
3180 "enabled>, although some are skipped depending on the type of guest."
3184 #: ../clone/virt-sysprep.pod:162
3186 "Operations can be individually enabled using the I<--enable> option. Use a "
3187 "comma-separated list, for example:"
3191 #: ../clone/virt-sysprep.pod:165
3194 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
3199 #: ../clone/virt-sysprep.pod:167
3201 "To list the operations supported by the current version of virt-sysprep, use "
3202 "I<--list-operations>."
3206 #: ../clone/virt-sysprep.pod:170
3208 "Future versions of virt-sysprep may add more operations. If you are using "
3209 "virt-sysprep and want predictable behaviour, specify only the operations "
3210 "that you want to have enabled."
3214 #: ../clone/virt-sysprep.pod:174
3219 #: ../clone/virt-sysprep.pod:176
3220 msgid "Remove user at-jobs and cron-jobs."
3224 #: ../clone/virt-sysprep.pod:178
3225 msgid "dhcp-client-state"
3229 #: ../clone/virt-sysprep.pod:180
3230 msgid "Remove DHCP client leases."
3234 #: ../clone/virt-sysprep.pod:182
3235 msgid "dhcp-server-state"
3239 #: ../clone/virt-sysprep.pod:184
3240 msgid "Remove DHCP server leases."
3244 #: ../clone/virt-sysprep.pod:186
3249 #: ../clone/virt-sysprep.pod:188
3251 "Changes the hostname of the guest to the value given in the I<--hostname> "
3256 #: ../clone/virt-sysprep.pod:191
3258 "If the I<--hostname> parameter is not given, then the hostname is changed to "
3259 "C<localhost.localdomain>."
3263 #: ../clone/virt-sysprep.pod:194
3268 #: ../clone/virt-sysprep.pod:196
3269 msgid "Remove many log files."
3273 #: ../clone/virt-sysprep.pod:198
3278 #: ../clone/virt-sysprep.pod:200
3279 msgid "Remove email from the local mail spool directory."
3283 #: ../clone/virt-sysprep.pod:202
3288 #: ../clone/virt-sysprep.pod:204
3290 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
3291 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
3295 #: ../clone/virt-sysprep.pod:207
3300 #: ../clone/virt-sysprep.pod:209
3302 "Write some random bytes from the host into the random seed file of the guest."
3306 #: ../clone/virt-sysprep.pod:212
3307 msgid "See L</RANDOM SEED> below."
3311 #: ../clone/virt-sysprep.pod:214
3312 msgid "rhn-systemid"
3316 #: ../clone/virt-sysprep.pod:216
3317 msgid "Remove the RHN system ID."
3321 #: ../clone/virt-sysprep.pod:218
3326 #: ../clone/virt-sysprep.pod:220
3327 msgid "Remove the Smolt hardware UUID."
3331 #: ../clone/virt-sysprep.pod:222
3332 msgid "ssh-hostkeys"
3336 #: ../clone/virt-sysprep.pod:224
3337 msgid "Remove the SSH host keys in the guest."
3341 #: ../clone/virt-sysprep.pod:226
3343 "The SSH host keys are regenerated (differently) next time the guest is "
3348 #: ../clone/virt-sysprep.pod:229
3350 "If, after cloning, the guest gets the same IP address, ssh will give you a "
3351 "stark warning about the host key changing:"
3355 #: ../clone/virt-sysprep.pod:232
3358 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3359 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
3360 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3361 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
3366 #: ../clone/virt-sysprep.pod:237
3367 msgid "udev-persistent-net"
3371 #: ../clone/virt-sysprep.pod:239
3373 "Remove udev persistent net rules which map the guest's existing MAC address "
3374 "to a fixed ethernet device (eg. eth0)."
3378 #: ../clone/virt-sysprep.pod:242
3380 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
3381 "address occupies the old name (eg. eth0), this means the fresh MAC address "
3382 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
3383 "Erasing the udev persistent net rules avoids this."
3387 #: ../clone/virt-sysprep.pod:247
3392 #: ../clone/virt-sysprep.pod:249
3393 msgid "Remove the utmp file."
3397 #: ../clone/virt-sysprep.pod:251
3399 "This records who is currently logged in on a machine. In modern Linux "
3400 "distros it is stored in a ramdisk and hence not part of the virtual "
3401 "machine's disk, but it was stored on disk in older distros."
3405 #: ../clone/virt-sysprep.pod:255
3410 #: ../clone/virt-sysprep.pod:257
3411 msgid "Remove the yum UUID."
3415 #: ../clone/virt-sysprep.pod:259
3417 "Yum creates a fresh UUID the next time it runs when it notices that the "
3418 "original UUID has been erased."
3422 #: ../clone/virt-sysprep.pod:262
3423 msgid "COPYING AND CLONING"
3427 #: ../clone/virt-sysprep.pod:264
3429 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3430 "prepare a template from which guests can be cloned. There are many "
3431 "different ways to achieve this using the virt tools, and this section is "
3432 "just an introduction."
3436 #: ../clone/virt-sysprep.pod:269
3437 msgid "A virtual machine (when switched off) consists of two parts:"
3441 #: ../clone/virt-sysprep.pod:273
3442 msgid "I<configuration>"
3446 #: ../clone/virt-sysprep.pod:275
3448 "The configuration or description of the guest. eg. The libvirt XML (see "
3449 "C<virsh dumpxml>), the running configuration of the guest, or another "
3450 "external format like OVF."
3454 #: ../clone/virt-sysprep.pod:279
3455 msgid "Some configuration items that might need to be changed:"
3459 #: ../clone/virt-sysprep.pod:285
3464 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3469 #: ../clone/virt-sysprep.pod:293
3470 msgid "path to block device(s)"
3474 #: ../clone/virt-sysprep.pod:297
3475 msgid "network card MAC address"
3479 #: ../clone/virt-sysprep.pod:301
3480 msgid "I<block device(s)>"
3484 #: ../clone/virt-sysprep.pod:303
3486 "One or more hard disk images, themselves containing files, directories, "
3487 "applications, kernels, configuration, etc."
3491 #: ../clone/virt-sysprep.pod:306
3492 msgid "Some things inside the block devices that might need to be changed:"
3496 #: ../clone/virt-sysprep.pod:312
3497 msgid "hostname and other net configuration"
3501 #: ../clone/virt-sysprep.pod:320
3502 msgid "SSH host keys"
3506 #: ../clone/virt-sysprep.pod:324
3507 msgid "Windows unique security ID (SID)"
3511 #: ../clone/virt-sysprep.pod:328
3512 msgid "Puppet registration"
3516 #: ../clone/virt-sysprep.pod:334
3517 msgid "COPYING THE BLOCK DEVICE"
3521 #: ../clone/virt-sysprep.pod:336
3523 "Starting with an original guest, you probably wish to copy the guest block "
3524 "device and its configuration to make a template. Then once you are happy "
3525 "with the template, you will want to make many clones from it."
3529 #: ../clone/virt-sysprep.pod:341
3535 " original guest --------> template ---------->\n"
3536 " \\------> cloned\n"
3537 " \\-----> guests\n"
3543 #: ../clone/virt-sysprep.pod:349
3545 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3550 #: ../clone/virt-sysprep.pod:352
3554 " original guest --------> template ---------->\n"
3555 " \\------> cloned\n"
3556 " \\-----> guests\n"
3562 #: ../clone/virt-sysprep.pod:358
3563 msgid "There are some smarter (and faster) ways too:"
3567 #: ../clone/virt-sysprep.pod:364
3571 " template ---------->\n"
3572 " \\------> cloned\n"
3573 " \\-----> guests\n"
3579 #: ../clone/virt-sysprep.pod:370
3581 "Use the block device as a backing file and create a snapshot on top for each "
3582 "guest. The advantage is that you don't need to copy the block device (very "
3583 "fast) and only changes are stored (less storage required)."
3587 #: ../clone/virt-sysprep.pod:375
3589 "Note that writing to the backing file once you have created guests on top of "
3590 "it is not possible: you will corrupt the guests."
3594 #: ../clone/virt-sysprep.pod:378
3596 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 -"
3597 "o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3598 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3599 "also create cheap snapshots from files or LUNs."
3603 #: ../clone/virt-sysprep.pod:386
3604 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3608 #: ../clone/virt-sysprep.pod:390
3609 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3613 #: ../clone/virt-sysprep.pod:394
3618 #: ../clone/virt-sysprep.pod:396
3620 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3621 "and/or modify the external libvirt configuration of a guest. It will reset "
3622 "the name, UUID and MAC address of the guest in the libvirt XML."
3626 #: ../clone/virt-sysprep.pod:401
3628 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3629 "image. This was the original motivation to write virt-sysprep."
3633 #: ../clone/virt-sysprep.pod:404
3638 #: ../clone/virt-sysprep.pod:406
3642 " original guest --------> template\n"
3647 #: ../clone/virt-sysprep.pod:409
3649 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3650 "it easier to compress and/or faster to copy."
3654 #: ../clone/virt-sysprep.pod:412
3656 "Notice that since virt-sparsify also copies the image, you can use it to "
3657 "make the initial copy (instead of C<dd>)."
3661 #: ../clone/virt-sysprep.pod:415
3666 #: ../clone/virt-sysprep.pod:417
3670 " template ---------->\n"
3671 " \\------> cloned\n"
3672 " \\-----> guests\n"
3678 #: ../clone/virt-sysprep.pod:423
3680 "If you want to give people cloned guests, but let them pick the size of the "
3681 "guest themselves (eg. depending on how much they are prepared to pay for "
3682 "disk space), then instead of copying the template, you can run L<virt-resize"
3683 "(1)>. Virt-resize performs a copy and resize, and thus is ideal for cloning "
3684 "guests from a template."
3688 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1164
3693 #: ../clone/virt-sysprep.pod:431
3695 "Although virt-sysprep removes some sensitive information from the guest, it "
3696 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3697 "above, and the implementation of the operations in the shell script. You "
3698 "should also examine the guest afterwards."
3702 #: ../clone/virt-sysprep.pod:436
3704 "Sensitive files are simply removed. The data they contained may still exist "
3705 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3706 "L<virt-sparsify(1)> as one way to remove this content. See also the L<scrub"
3707 "(1)> command to get rid of deleted content in directory entries and inodes."
3711 #: ../clone/virt-sysprep.pod:442
3716 #: ../clone/virt-sysprep.pod:444
3717 msgid "I<(This section applies to Linux guests only)>"
3721 #: ../clone/virt-sysprep.pod:446
3723 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3724 "from the host into the guest's random seed file."
3728 #: ../clone/virt-sysprep.pod:449
3730 "If this is just done once and the guest is cloned from the same template, "
3731 "then each guest will start with the same entropy, and things like SSH host "
3732 "keys and TCP sequence numbers may be predictable."
3736 #: ../clone/virt-sysprep.pod:453
3738 "Therefore you should arrange to add more randomness I<after> cloning from a "
3739 "template too, which can be done by just enabling the C<random-seed> "
3744 #: ../clone/virt-sysprep.pod:457
3747 " cp template.img newguest.img\n"
3748 " virt-sysprep --enable=random-seed -a newguest.img\n"
3753 #: ../clone/virt-sysprep.pod:460
3754 msgid "SELINUX RELABELLING"
3758 #: ../clone/virt-sysprep.pod:462
3759 msgid "I<(This section applies to Linux guests using SELinux only)>"
3763 #: ../clone/virt-sysprep.pod:464
3765 "If any new files are created by virt-sysprep, then virt-sysprep touches C</."
3766 "autorelabel> so that these will be correctly labelled by SELinux the next "
3767 "time the guest is booted. This process interrupts boot and can take some "
3772 #: ../clone/virt-sysprep.pod:469
3774 "You can force relabelling for all guests by supplying the I<--selinux-"
3779 #: ../clone/virt-sysprep.pod:472
3781 "You can disable relabelling entirely by supplying the I<--no-selinux-"
3786 #: ../clone/virt-sysprep.pod:484
3787 msgid "This program returns 0 on success, or 1 if there was an error."
3791 #: ../clone/virt-sysprep.pod:488
3793 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, L<virt-"
3794 "resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-img(1)"
3795 ">, L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3799 #: ../df/virt-df.pod:5
3800 msgid "virt-df - Display free space on virtual filesystems"
3804 #: ../df/virt-df.pod:9
3807 " virt-df [--options]\n"
3812 #: ../df/virt-df.pod:11
3815 " virt-df [--options] -d domname\n"
3820 #: ../df/virt-df.pod:13
3823 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3828 #: ../df/virt-df.pod:17
3831 " virt-df [--options] domname\n"
3836 #: ../df/virt-df.pod:19
3839 " virt-df [--options] disk.img [disk.img ...]\n"
3844 #: ../df/virt-df.pod:23
3846 "C<virt-df> is a command line tool to display free space on virtual machine "
3847 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3848 "allocated to a virtual machine, but can look inside disk images to see how "
3849 "much space is really being used."
3853 #: ../df/virt-df.pod:28
3855 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3856 "to get a list of all active and inactive guests, and performs a C<df>-type "
3857 "operation on each one in turn, printing out the results."
3861 #: ../df/virt-df.pod:32
3863 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a C<df>-"
3864 "type operation on either the single named libvirt domain, or on the disk "
3865 "image(s) listed on the command line (which must all belong to a single VM). "
3866 "In this mode (with arguments), C<virt-df> will I<only work for a single "
3867 "guest>. If you want to run on multiple guests, then you have to invoke "
3868 "C<virt-df> multiple times."
3872 #: ../df/virt-df.pod:39
3874 "Use the I<--csv> option to get a format which can be easily parsed by other "
3875 "programs. Other options are similar to the standard L<df(1)> command."
3879 #: ../df/virt-df.pod:45
3881 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3882 "output human-readable:"
3886 #: ../df/virt-df.pod:48
3889 " # virt-df -d F14x64 -h\n"
3890 " Filesystem Size Used Available Use%\n"
3891 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3892 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3897 #: ../df/virt-df.pod:53
3898 msgid "Show disk usage for a disk image file called C<test.img>:"
3902 #: ../df/virt-df.pod:55
3905 " $ virt-df -a test1.img\n"
3906 " Filesystem 1K-blocks Used Available Use%\n"
3907 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3912 #: ../df/virt-df.pod:112
3915 " virt-df --format=raw -a disk.img\n"
3920 #: ../df/virt-df.pod:116
3923 " virt-df --format=raw -a disk.img --format -a another.img\n"
3928 #: ../df/virt-df.pod:129
3929 msgid "Print sizes in human-readable format."
3933 #: ../df/virt-df.pod:131
3934 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3938 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3943 #: ../df/virt-df.pod:135
3948 #: ../df/virt-df.pod:137
3949 msgid "Print inodes instead of blocks."
3953 #: ../df/virt-df.pod:139
3954 msgid "B<--one-per-guest>"
3958 #: ../df/virt-df.pod:141
3960 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3961 "disks from several guests to a single libguestfs appliance."
3965 #: ../df/virt-df.pod:144
3966 msgid "You might use this option in the following circumstances:"
3970 #: ../df/virt-df.pod:150
3972 "If you think an untrusted guest might actively try to exploit the libguestfs "
3973 "appliance kernel, then this prevents one guest from interfering with the "
3974 "stats printed for another guest."
3978 #: ../df/virt-df.pod:156
3980 "If the kernel has a bug which stops it from accessing a filesystem in one "
3981 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3982 "and report stats for further guests."
3986 #: ../df/virt-df.pod:165
3988 "Print UUIDs instead of names. This is useful for following a guest even "
3989 "when the guest is migrated or renamed, or when two guests happen to have the "
3994 #: ../df/virt-df.pod:169
3996 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3997 "images, we still print the disk image name even when this option is "
4002 #: ../df/virt-df.pod:191
4003 msgid "STATVFS NUMBERS"
4007 #: ../df/virt-df.pod:193
4009 "C<virt-df> (and L<df(1)>) get information by issuing a L<statvfs(3)> system "
4010 "call. You can get the same information directly, either from the host "
4011 "(using libguestfs) or inside the guest:"
4015 #: ../df/virt-df.pod:199
4016 msgid "From the host"
4020 #: ../df/virt-df.pod:201 ../df/virt-df.pod:209
4021 msgid "Run this command:"
4025 #: ../df/virt-df.pod:203
4028 " guestfish --ro -d GuestName -i statvfs /\n"
4033 #: ../df/virt-df.pod:205 ../df/virt-df.pod:213
4034 msgid "(change C</> to see stats for other filesystems)."
4038 #: ../df/virt-df.pod:207
4039 msgid "From inside the guest"
4043 #: ../df/virt-df.pod:211
4046 " python -c 'import os; s = os.statvfs (\"/\"); print s'\n"
4051 #: ../df/virt-df.pod:255
4053 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<http://"
4058 #: ../edit/virt-edit.pod:5
4059 msgid "virt-edit - Edit a file in a virtual machine"
4063 #: ../edit/virt-edit.pod:9
4066 " virt-edit [--options] -d domname file [file ...]\n"
4071 #: ../edit/virt-edit.pod:11
4074 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
4079 #: ../edit/virt-edit.pod:13
4082 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
4087 #: ../edit/virt-edit.pod:17
4090 " virt-edit domname file\n"
4095 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
4098 " virt-edit disk.img [disk.img ...] file\n"
4103 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
4104 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
4105 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:21
4106 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
4111 #: ../edit/virt-edit.pod:23
4113 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
4114 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
4115 "doing this, but doesn't catch all cases."
4119 #: ../edit/virt-edit.pod:29
4121 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
4122 "exists in the named virtual machine (or disk image)."
4126 #: ../edit/virt-edit.pod:32
4128 "Multiple filenames can be given, in which case they are each edited in "
4129 "turn. Each filename must be a full path, starting at the root directory "
4130 "(starting with '/')."
4134 #: ../edit/virt-edit.pod:36
4135 msgid "If you want to just view a file, use L<virt-cat(1)>."
4139 #: ../edit/virt-edit.pod:38
4141 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
4142 "USING GUESTFISH> below)."
4146 #: ../edit/virt-edit.pod:41
4148 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
4149 "that and much more."
4153 #: ../edit/virt-edit.pod:46
4154 msgid "Edit the named files interactively:"
4158 #: ../edit/virt-edit.pod:48
4161 " virt-edit -d mydomain /boot/grub/grub.conf\n"
4166 #: ../edit/virt-edit.pod:50
4169 " virt-edit -d mydomain /etc/passwd\n"
4174 #: ../edit/virt-edit.pod:52
4175 msgid "For Windows guests, some Windows paths are understood:"
4179 #: ../edit/virt-edit.pod:54
4182 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
4187 #: ../edit/virt-edit.pod:56
4189 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
4190 "INTERACTIVE EDITING> below). To change the init default level to 5:"
4194 #: ../edit/virt-edit.pod:60
4197 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
4202 #: ../edit/virt-edit.pod:81
4203 msgid "B<-b> extension"
4207 #: ../edit/virt-edit.pod:83
4208 msgid "B<--backup> extension"
4212 #: ../edit/virt-edit.pod:85
4214 "Create a backup of the original file I<in the guest disk image>. The backup "
4215 "has the original filename with C<extension> added."
4219 #: ../edit/virt-edit.pod:88
4221 "Usually the first character of C<extension> would be a dot C<.> so you would "
4226 #: ../edit/virt-edit.pod:91
4229 " virt-edit -b .orig [etc]\n"
4234 #: ../edit/virt-edit.pod:93
4235 msgid "By default, no backup file is made."
4239 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
4240 #: ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74
4241 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
4242 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
4247 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
4248 #: ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76
4249 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
4250 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
4251 msgid "B<--connect URI>"
4255 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
4256 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
4257 #: ../tools/virt-win-reg.pl:135
4259 "If you specify guest block devices directly, then libvirt is not used at all."
4263 #: ../edit/virt-edit.pod:114
4265 "When prompting for keys and passphrases, virt-edit normally turns echoing "
4266 "off so you cannot see what you are typing. If you are not worried about "
4267 "Tempest attacks and there is no one else in the room you can specify this "
4268 "flag to see what you are typing."
4272 #: ../edit/virt-edit.pod:119
4277 #: ../edit/virt-edit.pod:121
4278 msgid "B<--expr> EXPR"
4282 #: ../edit/virt-edit.pod:123
4284 "Instead of launching the external editor, non-interactively apply the Perl "
4285 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
4290 #: ../edit/virt-edit.pod:127
4292 "Be careful to properly quote the expression to prevent it from being altered "
4297 #: ../edit/virt-edit.pod:130
4298 msgid "Note that this option is only available when Perl 5 is installed."
4302 #: ../edit/virt-edit.pod:132
4303 msgid "B<--format> raw|qcow2|..."
4307 #: ../edit/virt-edit.pod:143
4310 " virt-edit --format=raw -a disk.img file\n"
4315 #: ../edit/virt-edit.pod:147
4318 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
4323 #: ../edit/virt-edit.pod:181
4324 msgid "Previous versions of virt-edit allowed you to write either:"
4328 #: ../edit/virt-edit.pod:187
4331 " virt-edit guestname file\n"
4336 #: ../edit/virt-edit.pod:195
4337 msgid "NON-INTERACTIVE EDITING"
4341 #: ../edit/virt-edit.pod:197
4343 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
4344 "administrator can interactively edit the file."
4348 #: ../edit/virt-edit.pod:200
4350 "There are two ways also to use C<virt-edit> from scripts in order to make "
4351 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
4352 "like this, it's less error-prone to write scripts directly using the "
4353 "libguestfs API and Augeas for configuration file editing.)"
4357 #: ../edit/virt-edit.pod:206
4359 "The first method is to temporarily set C<$EDITOR> to any script or program "
4360 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
4361 "update C<tmpfile> in place however it likes."
4365 #: ../edit/virt-edit.pod:210
4367 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
4368 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
4369 "instances of C<foo> with C<bar> in a file:"
4373 #: ../edit/virt-edit.pod:214
4376 " virt-edit -d domname filename -e 's/foo/bar/'\n"
4381 #: ../edit/virt-edit.pod:216
4383 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
4384 "For example to delete root's password you could do:"
4388 #: ../edit/virt-edit.pod:219
4391 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4396 #: ../edit/virt-edit.pod:221
4398 "What really happens is that the snippet is evaluated as a Perl expression "
4399 "for each line of the file. The line, including the final C<\\n>, is passed "
4400 "in C<$_> and the expression should update C<$_> or leave it unchanged."
4404 #: ../edit/virt-edit.pod:226
4406 "To delete a line, set C<$_> to the empty string. For example, to delete the "
4407 "C<apache> user account from the password file you can do:"
4411 #: ../edit/virt-edit.pod:229
4414 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
4419 #: ../edit/virt-edit.pod:231
4421 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4422 "the end of the file is rather difficult this way since there is no concept "
4423 "of \"last line of the file\" - your expression just doesn't get called "
4424 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4429 #: ../edit/virt-edit.pod:237
4431 "The variable C<$lineno> contains the current line number. As is "
4432 "traditional, the first line in the file is number C<1>."
4436 #: ../edit/virt-edit.pod:240
4438 "The return value from the expression is ignored, but the expression may call "
4439 "C<die> in order to abort the whole program, leaving the original file "
4444 #: ../edit/virt-edit.pod:244
4446 "Remember when matching the end of a line that C<$_> may contain the final C<"
4447 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4448 "newline then neither of these. Thus to match or substitute some text at the "
4449 "end of a line, use this regular expression:"
4453 #: ../edit/virt-edit.pod:249
4456 " /some text(\\r?\\n)?$/\n"
4461 #: ../edit/virt-edit.pod:251
4463 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
4464 "$_> itself (since that would remove all newlines from the file):"
4468 #: ../edit/virt-edit.pod:255
4471 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4476 #: ../edit/virt-edit.pod:259
4478 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4479 "paths (eg. C<E:\\foo\\bar.txt>)."
4483 #: ../edit/virt-edit.pod:278
4485 "The path is resolved case insensitively to locate the file that should be "
4490 #: ../edit/virt-edit.pod:299
4492 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4493 "C<virt-edit> doesn't work."
4497 #: ../edit/virt-edit.pod:302
4498 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4502 #: ../edit/virt-edit.pod:304
4505 " guestfish --rw -i -d domname edit /file\n"
4510 #: ../edit/virt-edit.pod:306
4512 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4517 #: ../edit/virt-edit.pod:309
4519 "The command above uses libguestfs's guest inspection feature and so does not "
4520 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4521 "disk images that don't contain guests. To edit a file on a disk image "
4526 #: ../edit/virt-edit.pod:314
4529 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4534 #: ../edit/virt-edit.pod:316
4536 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4537 "the disk image to edit, and C</file> is the full path to the file."
4541 #: ../edit/virt-edit.pod:320
4543 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4544 "C<write> or C<upload> instead:"
4548 #: ../edit/virt-edit.pod:323
4551 " guestfish --rw -i -d domname touch /newfile\n"
4556 #: ../edit/virt-edit.pod:325
4559 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4564 #: ../edit/virt-edit.pod:327
4567 " guestfish --rw -i -d domname upload localfile /newfile\n"
4572 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119
4573 #: ../rescue/virt-rescue.pod:298 ../sparsify/virt-sparsify.pod:256
4574 #: ../src/guestfs.pod:3195 ../test-tool/libguestfs-test-tool.pod:95
4575 msgid "ENVIRONMENT VARIABLES"
4579 #: ../edit/virt-edit.pod:333
4584 #: ../edit/virt-edit.pod:335
4586 "If set, this string is used as the editor. It may contain arguments, eg. C<"
4591 #: ../edit/virt-edit.pod:338
4592 msgid "If not set, C<vi> is used."
4596 #: ../edit/virt-edit.pod:356
4598 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
4599 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
4600 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4604 #: ../erlang/examples/guestfs-erlang.pod:5
4605 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4609 #: ../erlang/examples/guestfs-erlang.pod:9
4612 " {ok, G} = guestfs:create(),\n"
4613 " ok = guestfs:add_drive_opts(G, Disk,\n"
4614 " [{format, \"raw\"}, {readonly, true}]),\n"
4615 " ok = guestfs:launch(G),\n"
4616 " [Device] = guestfs:list_devices(G),\n"
4617 " ok = guestfs:close(G).\n"
4622 #: ../erlang/examples/guestfs-erlang.pod:18
4624 "This manual page documents how to call libguestfs from the Erlang "
4625 "programming language. This page just documents the differences from the C "
4626 "API and gives some examples. If you are not familiar with using libguestfs, "
4627 "you also need to read L<guestfs(3)>."
4631 #: ../erlang/examples/guestfs-erlang.pod:23
4632 msgid "OPENING AND CLOSING THE HANDLE"
4636 #: ../erlang/examples/guestfs-erlang.pod:25
4638 "The Erlang bindings are implemented using an external program called C<erl-"
4639 "guestfs>. This program must be on the current PATH, or else you should "
4640 "specify the full path to the program:"
4644 #: ../erlang/examples/guestfs-erlang.pod:29
4647 " {ok, G} = guestfs:create().\n"
4652 #: ../erlang/examples/guestfs-erlang.pod:31
4655 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4660 #: ../erlang/examples/guestfs-erlang.pod:33
4661 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4665 #: ../erlang/examples/guestfs-erlang.pod:36
4666 msgid "To close the handle:"
4670 #: ../erlang/examples/guestfs-erlang.pod:38
4673 " ok = guestfs:close(G).\n"
4678 #: ../erlang/examples/guestfs-erlang.pod:40
4679 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4683 #: ../erlang/examples/guestfs-erlang.pod:42
4685 "For functions that take optional arguments, the first arguments are the non-"
4686 "optional ones. The last argument is a list of tuples supplying the "
4687 "remaining optional arguments."
4691 #: ../erlang/examples/guestfs-erlang.pod:46
4694 " ok = guestfs:add_drive_opts(G, Disk,\n"
4695 " [{format, \"raw\"}, {readonly, true}]).\n"
4700 #: ../erlang/examples/guestfs-erlang.pod:49
4701 msgid "If the last argument would be an empty list, you can also omit it:"
4705 #: ../erlang/examples/guestfs-erlang.pod:51
4708 " ok = guestfs:add_drive_opts(G, Disk).\n"
4713 #: ../erlang/examples/guestfs-erlang.pod:53
4714 msgid "RETURN VALUES AND ERRORS"
4718 #: ../erlang/examples/guestfs-erlang.pod:55
4720 "On success, most functions return a C<Result> term (which could be a list, "
4721 "string, tuple etc.). If there is nothing for the function to return, then "
4722 "the atom C<ok> is returned."
4726 #: ../erlang/examples/guestfs-erlang.pod:59
4727 msgid "On error, you would see one of the following tuples:"
4731 #: ../erlang/examples/guestfs-erlang.pod:63
4732 msgid "C<{error, Msg, Errno}>"
4736 #: ../erlang/examples/guestfs-erlang.pod:65
4737 msgid "This indicates an ordinary error from the function."
4741 #: ../erlang/examples/guestfs-erlang.pod:67
4743 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4748 #: ../erlang/examples/guestfs-erlang.pod:70
4749 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4753 #: ../erlang/examples/guestfs-erlang.pod:72
4754 msgid "C<{unknown, Function}>"
4758 #: ../erlang/examples/guestfs-erlang.pod:74
4760 "This indicates that the function you called is not known. Generally this "
4761 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4762 "which you should not do."
4766 #: ../erlang/examples/guestfs-erlang.pod:78
4767 msgid "C<Function> is the name of the unknown function."
4771 #: ../erlang/examples/guestfs-erlang.pod:80
4772 msgid "C<{unknownarg, Arg}>"
4776 #: ../erlang/examples/guestfs-erlang.pod:82
4778 "This indicates that you called a function with optional arguments, with an "
4779 "unknown argument name."
4783 #: ../erlang/examples/guestfs-erlang.pod:85
4784 msgid "C<Arg> is the name of the unknown argument."
4788 #: ../erlang/examples/guestfs-erlang.pod:89
4789 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
4790 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
4791 #: ../python/examples/guestfs-python.pod:34
4792 #: ../ruby/examples/guestfs-ruby.pod:28
4793 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4797 #: ../erlang/examples/guestfs-erlang.pod:91
4798 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
4799 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
4800 #: ../python/examples/guestfs-python.pod:36
4801 #: ../ruby/examples/guestfs-ruby.pod:30
4806 #: ../erlang/examples/guestfs-erlang.pod:93
4807 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
4808 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
4809 #: ../python/examples/guestfs-python.pod:38
4810 #: ../ruby/examples/guestfs-ruby.pod:32
4811 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4815 #: ../erlang/examples/guestfs-erlang.pod:95
4816 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
4817 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
4818 #: ../python/examples/guestfs-python.pod:40
4819 #: ../ruby/examples/guestfs-ruby.pod:34
4824 #: ../erlang/examples/guestfs-erlang.pod:99
4826 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4827 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4828 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
4832 #: ../erlang/examples/guestfs-erlang.pod:110
4833 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
4834 #: ../examples/guestfs-testing.pod:298 ../fish/guestfish.pod:1296
4835 #: ../fish/virt-copy-in.pod:60 ../fish/virt-copy-out.pod:49
4836 #: ../fish/virt-tar-in.pod:58 ../fish/virt-tar-out.pod:51
4837 #: ../fuse/guestmount.pod:328 ../inspector/virt-inspector.pod:404
4838 #: ../java/examples/guestfs-java.pod:58 ../ocaml/examples/guestfs-ocaml.pod:91
4839 #: ../perl/examples/guestfs-perl.pod:52
4840 #: ../python/examples/guestfs-python.pod:54
4841 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3335
4842 #: ../test-tool/libguestfs-test-tool.pod:106
4847 #: ../erlang/examples/guestfs-erlang.pod:112
4848 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
4849 #: ../examples/guestfs-testing.pod:300 ../fish/guestfish.pod:1298
4850 #: ../fish/virt-copy-in.pod:62 ../fish/virt-copy-out.pod:51
4851 #: ../fish/virt-tar-in.pod:60 ../fish/virt-tar-out.pod:53
4852 #: ../fuse/guestmount.pod:330 ../java/examples/guestfs-java.pod:60
4853 #: ../ocaml/examples/guestfs-ocaml.pod:93 ../perl/examples/guestfs-perl.pod:54
4854 #: ../python/examples/guestfs-python.pod:56
4855 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3337
4856 #: ../test-tool/libguestfs-test-tool.pod:108
4857 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4861 #: ../erlang/examples/guestfs-erlang.pod:116
4862 #: ../examples/guestfs-testing.pod:304 ../java/examples/guestfs-java.pod:64
4863 #: ../perl/examples/guestfs-perl.pod:58
4864 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4868 #: ../erlang/examples/guestfs-erlang.pod:118
4869 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
4870 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
4871 #: ../perl/examples/guestfs-perl.pod:60
4872 #: ../python/examples/guestfs-python.pod:62
4873 #: ../ruby/examples/guestfs-ruby.pod:56
4875 "The examples in this manual page may be freely copied, modified and "
4876 "distributed without any restrictions."
4880 #: ../erlang/examples/guestfs-erlang.pod:121
4881 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
4882 #: ../examples/guestfs-testing.pod:306 ../java/examples/guestfs-java.pod:69
4883 #: ../ocaml/examples/guestfs-ocaml.pod:102
4884 #: ../perl/examples/guestfs-perl.pod:63
4885 #: ../python/examples/guestfs-python.pod:65
4886 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3344
4888 "This library is free software; you can redistribute it and/or modify it "
4889 "under the terms of the GNU Lesser General Public License as published by the "
4890 "Free Software Foundation; either version 2 of the License, or (at your "
4891 "option) any later version."
4895 #: ../erlang/examples/guestfs-erlang.pod:126
4896 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
4897 #: ../examples/guestfs-testing.pod:311 ../java/examples/guestfs-java.pod:74
4898 #: ../ocaml/examples/guestfs-ocaml.pod:107
4899 #: ../perl/examples/guestfs-perl.pod:68
4900 #: ../python/examples/guestfs-python.pod:70
4901 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3349
4903 "This library is distributed in the hope that it will be useful, but WITHOUT "
4904 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4905 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4910 #: ../erlang/examples/guestfs-erlang.pod:131
4911 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
4912 #: ../examples/guestfs-testing.pod:316 ../java/examples/guestfs-java.pod:79
4913 #: ../ocaml/examples/guestfs-ocaml.pod:112
4914 #: ../perl/examples/guestfs-perl.pod:73
4915 #: ../python/examples/guestfs-python.pod:75
4916 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3354
4918 "You should have received a copy of the GNU Lesser General Public License "
4919 "along with this library; if not, write to the Free Software Foundation, "
4920 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4924 #: ../examples/guestfs-examples.pod:5
4925 msgid "guestfs-examples - Examples of using libguestfs from C"
4929 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4932 " #include <guestfs.h>\n"
4934 msgstr "#include <guestfs.h>\n"
4937 #: ../examples/guestfs-examples.pod:11
4940 " guestfs_h *g = guestfs_create ();\n"
4941 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4942 " guestfs_launch (g);\n"
4947 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4950 " cc prog.c -o prog -lguestfs\n"
4952 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4955 " cc prog.c -o prog -lguestfs\n"
4957 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4961 #: ../examples/guestfs-examples.pod:21
4963 "This manual page contains examples of calling libguestfs from the C "
4964 "programming language. If you are not familiar with using libguestfs, you "
4965 "also need to read L<guestfs(3)>."
4969 #: ../examples/guestfs-examples.pod:35
4971 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4972 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4973 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4977 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
4978 #: ../python/examples/guestfs-python.pod:60
4979 #: ../ruby/examples/guestfs-ruby.pod:54
4980 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4984 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4989 #: ../examples/guestfs-recipes.pod:5
4991 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4992 "here. The only way which works for both sorts of output is to just write "
4993 "the URL directly. Do NOT use L<...> for URLs."
4997 #: ../examples/guestfs-recipes.pod:9
4999 "We break with tradition here and don't use ALL CAPS for the section "
5000 "headings, as this makes them much easier to read."
5004 #: ../examples/guestfs-recipes.pod:16
5005 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
5009 #: ../examples/guestfs-recipes.pod:20
5011 "This page contains recipes for and links to things you can do using "
5012 "libguestfs, L<guestfish(1)> and the virt tools."
5016 #: ../examples/guestfs-recipes.pod:23
5017 msgid "Audit a virtual machine for setuid files"
5021 #: ../examples/guestfs-recipes.pod:25
5023 "The link below contains a small program which can be used to audit a Linux "
5024 "virtual machine to see what setuid and setgid files it contains."
5028 #: ../examples/guestfs-recipes.pod:28
5030 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
5035 #: ../examples/guestfs-recipes.pod:30
5036 msgid "Change the background image in a Windows XP VM"
5040 #: ../examples/guestfs-recipes.pod:32
5042 "The links below explain how to use L<guestfish(1)> to change the background "
5043 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
5044 "be substantially different for each version of Windows."
5048 #: ../examples/guestfs-recipes.pod:37
5050 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html https://"
5051 "lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
5055 #: ../examples/guestfs-recipes.pod:40
5056 msgid "Cloning a virtual machine (Linux)"
5060 #: ../examples/guestfs-recipes.pod:42
5062 "The guestfish technique described in the link below works well for most "
5063 "Linux VMs. Depending on the Linux distro you may need to change the paths "
5068 #: ../examples/guestfs-recipes.pod:46
5070 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
5075 #: ../examples/guestfs-recipes.pod:48
5077 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
5082 #: ../examples/guestfs-recipes.pod:51
5083 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
5087 #: ../examples/guestfs-recipes.pod:53
5088 msgid "Cloning a virtual machine (Windows)"
5092 #: ../examples/guestfs-recipes.pod:55
5094 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
5095 "straightforward. Currently there is code in the Aeolus Oz project which "
5096 "does this (using libguestfs). As part of our review of the virt-clone tool, "
5097 "we may add sysprepping ability."
5101 #: ../examples/guestfs-recipes.pod:60
5103 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-tools-"
5104 "list/2011-May/msg00019.html"
5108 #: ../examples/guestfs-recipes.pod:63
5109 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
5113 #: ../examples/guestfs-recipes.pod:65
5114 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
5118 #: ../examples/guestfs-recipes.pod:67
5121 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
5126 #: ../examples/guestfs-recipes.pod:69
5127 msgid "To export just a subdirectory, eg. C</files>, do:"
5131 #: ../examples/guestfs-recipes.pod:71
5134 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
5139 #: ../examples/guestfs-recipes.pod:73
5140 msgid "Create empty disk images"
5144 #: ../examples/guestfs-recipes.pod:75
5146 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
5147 "The useful guide below explains the options available."
5151 #: ../examples/guestfs-recipes.pod:78
5153 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/"
5158 #: ../examples/guestfs-recipes.pod:80
5159 msgid "Dump raw filesystem content from inside a disk image or VM"
5163 #: ../examples/guestfs-recipes.pod:82
5165 "You can use the L<guestfish(1)> C<download> command to extract the raw "
5166 "filesystem content from any filesystem in a disk image or a VM (even one "
5167 "which is encrypted or buried inside an LV):"
5171 #: ../examples/guestfs-recipes.pod:86
5174 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
5179 #: ../examples/guestfs-recipes.pod:88
5182 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
5187 #: ../examples/guestfs-recipes.pod:90
5188 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
5192 #: ../examples/guestfs-recipes.pod:92
5193 msgid "Edit grub configuration in a VM"
5197 #: ../examples/guestfs-recipes.pod:94
5198 msgid "You can use this to:"
5202 #: ../examples/guestfs-recipes.pod:100
5203 msgid "Fix a virtual machine that does not boot."
5207 #: ../examples/guestfs-recipes.pod:104
5208 msgid "Change which kernel is used to boot the VM."
5212 #: ../examples/guestfs-recipes.pod:108
5213 msgid "Change kernel command line options."
5217 #: ../examples/guestfs-recipes.pod:112
5218 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
5222 #: ../examples/guestfs-recipes.pod:114
5225 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
5230 #: ../examples/guestfs-recipes.pod:116
5232 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
5237 #: ../examples/guestfs-recipes.pod:119
5240 " virt-rescue -d BrokenGuest\n"
5245 #: ../examples/guestfs-recipes.pod:121
5246 msgid "Export any directory from a VM"
5250 #: ../examples/guestfs-recipes.pod:123
5252 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
5256 #: ../examples/guestfs-recipes.pod:126 ../examples/guestfs-testing.pod:93
5259 " virt-copy-out -d Guest /home .\n"
5264 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
5265 #: ../fish/guestfish-actions.pod:1481 ../fish/guestfish-actions.pod:1746
5266 #: ../fish/guestfish-actions.pod:2163 ../src/guestfs-actions.pod:18
5267 #: ../src/guestfs-actions.pod:2373 ../src/guestfs-actions.pod:2797
5268 #: ../src/guestfs-actions.pod:3356 ../src/guestfs.pod:1685
5269 #: ../tools/virt-win-reg.pl:717
5274 #: ../examples/guestfs-recipes.pod:134
5276 "The final dot of the command is not a printing error. It means we want to "
5277 "copy out to the current directory."
5281 #: ../examples/guestfs-recipes.pod:139
5282 msgid "This creates a directory called C<home> under the current directory."
5286 #: ../examples/guestfs-recipes.pod:143
5288 "If the guest is a Windows guest then you can use drive letters and "
5289 "backslashes, but you must prefix the path with C<win:> and quote it to "
5290 "protect it from the shell, like this:"
5294 #: ../examples/guestfs-recipes.pod:147
5297 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
5302 #: ../examples/guestfs-recipes.pod:149
5303 msgid "To get the output as a compressed tarball, do:"
5307 #: ../examples/guestfs-recipes.pod:151
5310 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
5315 #: ../examples/guestfs-recipes.pod:153
5317 "Although it sounds tempting, this is usually not a reliable way to get a "
5318 "backup from a running guest. See the entry in the FAQ: http://libguestfs."
5319 "org/FAQ.html#backup"
5323 #: ../examples/guestfs-recipes.pod:157
5324 msgid "Find out which user is using the most space"
5328 #: ../examples/guestfs-recipes.pod:159
5330 "This simple script examines a Linux guest to find out which user is using "
5331 "the most space in their home directory:"
5335 #: ../examples/guestfs-recipes.pod:162
5343 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
5351 #: ../examples/guestfs-recipes.pod:166
5360 #: ../examples/guestfs-recipes.pod:169
5363 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
5368 #: ../examples/guestfs-recipes.pod:171
5371 " for d in $(guestfish --remote ls \"$dir\"); do\n"
5372 " echo -n \"$dir/$d\"\n"
5374 " guestfish --remote du \"$dir/$d\";\n"
5375 " done | sort -nr -k 2\n"
5380 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
5383 " guestfish --remote exit\n"
5388 #: ../examples/guestfs-recipes.pod:179
5389 msgid "Get DHCP address from a VM"
5393 #: ../examples/guestfs-recipes.pod:181
5395 "The link below explains the many different possible techniques for getting "
5396 "the last assigned DHCP address of a virtual machine."
5400 #: ../examples/guestfs-recipes.pod:184
5402 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-"
5403 "a-virtual-machine-disk-image/#content"
5407 #: ../examples/guestfs-recipes.pod:186
5409 "In the libguestfs source examples directory you will find the latest version "
5410 "of the C<virt-dhcp-address.c> program."
5414 #: ../examples/guestfs-recipes.pod:189
5415 msgid "Get the operating system product name string"
5419 #: ../examples/guestfs-recipes.pod:191
5420 msgid "Save the following script into a file called C<product-name.sh>:"
5424 #: ../examples/guestfs-recipes.pod:193
5429 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5430 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5431 " guestfish --remote inspect-get-product-name \"$root\"\n"
5432 " guestfish --remote exit\n"
5437 #: ../examples/guestfs-recipes.pod:200
5438 msgid "Make the script executable and run it on a named guest:"
5442 #: ../examples/guestfs-recipes.pod:202
5445 " # product-name.sh RHEL60x64\n"
5446 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
5451 #: ../examples/guestfs-recipes.pod:205
5453 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
5454 "C<xpath> command line tool or from your favourite programming language:"
5458 #: ../examples/guestfs-recipes.pod:209
5461 " # virt-inspector RHEL60x64 > xml\n"
5462 " # xpath '//product_name' < xml\n"
5465 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
5470 #: ../examples/guestfs-recipes.pod:215
5471 msgid "Get the default boot kernel for a Linux VM"
5475 #: ../examples/guestfs-recipes.pod:217
5477 "The link below contains a program to print the default boot kernel for a "
5482 #: ../examples/guestfs-recipes.pod:220
5484 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-"
5485 "kernel-for-a-vm/#content"
5489 #: ../examples/guestfs-recipes.pod:222
5491 "It uses Augeas, and the technique is generally applicable for many different "
5496 #: ../examples/guestfs-recipes.pod:229
5497 msgid "listing the user accounts in the guest"
5501 #: ../examples/guestfs-recipes.pod:233
5502 msgid "what repositories is it configured to use"
5506 #: ../examples/guestfs-recipes.pod:237
5507 msgid "what NTP servers does it connect to"
5511 #: ../examples/guestfs-recipes.pod:241
5512 msgid "what were the boot messages last time it booted"
5516 #: ../examples/guestfs-recipes.pod:245
5517 msgid "listing who was logged in recently"
5521 #: ../examples/guestfs-recipes.pod:249
5522 msgid "http://augeas.net/"
5526 #: ../examples/guestfs-recipes.pod:251
5527 msgid "Install RPMs in a guest"
5531 #: ../examples/guestfs-recipes.pod:253
5533 "The link below contains a method to install RPMs in a guest. In fact the "
5534 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5535 "installs them next time the guest is booted. You could use this technique "
5536 "to install vital security updates in an offline guest."
5540 #: ../examples/guestfs-recipes.pod:259
5542 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5546 #: ../examples/guestfs-recipes.pod:261
5547 msgid "List applications installed in a VM"
5551 #: ../examples/guestfs-recipes.pod:263
5552 msgid "Save the following to a file C<list-apps.sh>:"
5556 #: ../examples/guestfs-recipes.pod:265
5561 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5562 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5563 " guestfish --remote inspect-list-applications \"$root\"\n"
5564 " guestfish --remote exit\n"
5569 #: ../examples/guestfs-recipes.pod:272
5571 "Make the file executable and then you can run it on any named virtual "
5576 #: ../examples/guestfs-recipes.pod:275
5579 " # list-apps.sh WinGuest\n"
5581 " app_name: Mozilla Firefox (3.6.12)\n"
5582 " app_display_name: Mozilla Firefox (3.6.12)\n"
5584 " app_version: 3.6.12 (en-GB)\n"
5586 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5587 " app_trans_path:\n"
5588 " app_publisher: Mozilla\n"
5589 " app_url: http://www.mozilla.com/en-GB/\n"
5590 " app_source_package:\n"
5592 " app_description: Mozilla Firefox\n"
5595 " app_name: VLC media player\n"
5596 " app_display_name: VLC media player 1.1.5\n"
5598 " app_version: 1.1.5\n"
5600 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5601 " app_trans_path:\n"
5602 " app_publisher: VideoLAN\n"
5603 " app_url: http://www.videolan.org/\n"
5604 " app_source_package:\n"
5606 " app_description:\n"
5612 #: ../examples/guestfs-recipes.pod:305
5614 "If you want to run the script on disk images (instead of libvirt virtual "
5615 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-inspector(1)"
5620 #: ../examples/guestfs-recipes.pod:309
5621 msgid "List files and directories in a VM"
5625 #: ../examples/guestfs-recipes.pod:311
5626 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5630 #: ../examples/guestfs-recipes.pod:313
5633 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5638 #: ../examples/guestfs-recipes.pod:315
5639 msgid "List services in a Windows VM"
5643 #: ../examples/guestfs-recipes.pod:317
5645 "The link below contains a script that can be used to list out the services "
5646 "from a Windows VM, and whether those services run at boot time or are loaded "
5651 #: ../examples/guestfs-recipes.pod:321
5653 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/"
5658 #: ../examples/guestfs-recipes.pod:323
5659 msgid "Make a disk image sparse"
5663 #: ../examples/guestfs-recipes.pod:325
5665 "The link below contains some guides for making a disk image sparse (or "
5666 "reintroducing sparseness)."
5670 #: ../examples/guestfs-recipes.pod:328
5672 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5676 #: ../examples/guestfs-recipes.pod:330
5677 msgid "Monitor disk usage over time"
5681 #: ../examples/guestfs-recipes.pod:332
5683 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5684 "The link below contains a guide."
5688 #: ../examples/guestfs-recipes.pod:335
5689 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5693 #: ../examples/guestfs-recipes.pod:337
5694 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5698 #: ../examples/guestfs-recipes.pod:339
5700 "L<guestfish(1)> plus the tools described in the link below can be used to "
5701 "read out the Windows Event Log from any virtual machine running Windows "
5702 "Vista or a later version."
5706 #: ../examples/guestfs-recipes.pod:343
5708 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
5709 "guestfish/#content"
5713 #: ../examples/guestfs-recipes.pod:345
5714 msgid "Remove root password (Linux)"
5718 #: ../examples/guestfs-recipes.pod:347
5720 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5721 "files. One use is to remove the root password from a Linux guest:"
5725 #: ../examples/guestfs-recipes.pod:350
5728 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5733 #: ../examples/guestfs-recipes.pod:352
5734 msgid "Remove Administrator password (Windows)"
5738 #: ../examples/guestfs-recipes.pod:354
5740 "The link below contains one technique for removing the Administrator "
5741 "password from a Windows VM, or to be more precise, it gives you a command "
5742 "prompt the next time you log in which you can use to bypass any security:"
5746 #: ../examples/guestfs-recipes.pod:359
5748 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
5749 "administrator-password-with-guestfish/"
5753 #: ../examples/guestfs-recipes.pod:361
5754 msgid "Unpack a live CD"
5758 #: ../examples/guestfs-recipes.pod:363
5760 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5761 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5762 "layers, as outlined in the guide below."
5766 #: ../examples/guestfs-recipes.pod:367
5768 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
5773 #: ../examples/guestfs-recipes.pod:369
5774 msgid "Uploading and downloading files"
5778 #: ../examples/guestfs-recipes.pod:371
5780 "The link below contains general tips on uploading (copying in) and "
5781 "downloading (copying out) files from VMs."
5785 #: ../examples/guestfs-recipes.pod:374
5787 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5791 #: ../examples/guestfs-recipes.pod:376
5792 msgid "Use libguestfs tools on VMware ESX guests"
5796 #: ../examples/guestfs-recipes.pod:378
5798 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5799 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5803 #: ../examples/guestfs-recipes.pod:382
5805 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
5810 #: ../examples/guestfs-recipes.pod:386
5812 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)"
5813 ">, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-"
5814 "python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
5818 #: ../examples/guestfs-recipes.pod:403
5819 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5823 #: ../examples/guestfs-testing.pod:5
5824 msgid "guestfs-testing - manual testing of libguestfs, you can help!"
5828 #: ../examples/guestfs-testing.pod:9
5830 "This page has manual tests you can try on libguestfs. Everyone has a "
5831 "slightly different combination of platform, hardware and guests, so this "
5832 "testing is very valuable. Thanks for helping out!"
5836 #: ../examples/guestfs-testing.pod:13
5837 msgid "These tests require libguestfs E<ge> 1.14."
5841 #: ../examples/guestfs-testing.pod:15
5843 "Tests marked with a B<*> (asterisk) can B<destroy data> if you're not "
5844 "careful. The others are safe and won't modify anything."
5848 #: ../examples/guestfs-testing.pod:18
5849 msgid "You can report bugs you find through this link:"
5853 #: ../examples/guestfs-testing.pod:20
5855 "https://bugzilla.redhat.com/enter_bug.cgi?"
5856 "component=libguestfs&product=Virtualization+Tools"
5860 #: ../examples/guestfs-testing.pod:22
5862 "or post on the mailing list (registration is B<not> required, but if you're "
5863 "not registered then you'll have to wait for a moderator to manually approve "
5868 #: ../examples/guestfs-testing.pod:26
5869 msgid "https://www.redhat.com/mailman/listinfo/libguestfs"
5873 #: ../examples/guestfs-testing.pod:28
5878 #: ../examples/guestfs-testing.pod:30
5879 msgid "Check KVM acceleration is being used."
5883 #: ../examples/guestfs-testing.pod:32
5885 "If your host has hardware virt acceleration, then with a hot cache "
5886 "libguestfs should be able to start up in a few seconds. Run the following "
5887 "command a few times:"
5891 #: ../examples/guestfs-testing.pod:36
5894 " time guestfish -a /dev/null run\n"
5899 #: ../examples/guestfs-testing.pod:38
5901 "After a few runs, the time should settle down to a few seconds (under 5 "
5902 "seconds on fast 64 bit hardware)."
5906 #: ../examples/guestfs-testing.pod:41
5907 msgid "How to check for hardware virt:"
5911 #: ../examples/guestfs-testing.pod:43
5912 msgid "http://virt-tools.org/learning/check-hardware-virt/"
5916 #: ../examples/guestfs-testing.pod:45
5918 "If the command above does not work at all, use L<libguestfs-test-tool(1)>."
5922 #: ../examples/guestfs-testing.pod:48
5923 msgid "Run virt-alignment-scan on all your guests."
5927 #: ../examples/guestfs-testing.pod:50
5928 msgid "Run L<virt-alignment-scan(1)> on guests or disk images:"
5932 #: ../examples/guestfs-testing.pod:52
5935 " virt-alignment-scan -a /path/to/disk.img\n"
5940 #: ../examples/guestfs-testing.pod:54 ../examples/guestfs-testing.pod:161
5941 #: ../examples/guestfs-testing.pod:174 ../examples/guestfs-testing.pod:234
5942 #: ../src/guestfs.pod:2793
5947 #: ../examples/guestfs-testing.pod:56
5950 " virt-alignment-scan -d Guest\n"
5955 #: ../examples/guestfs-testing.pod:58
5956 msgid "Does the alignment report match how the guest partitions are aligned?"
5960 #: ../examples/guestfs-testing.pod:60
5961 msgid "Run virt-cat on some files in guests."
5965 #: ../examples/guestfs-testing.pod:62
5966 msgid "L<virt-cat(1)> can display files from guests. For a Linux guest, try:"
5970 #: ../examples/guestfs-testing.pod:64
5973 " virt-cat LinuxGuest /etc/passwd\n"
5978 #: ../examples/guestfs-testing.pod:66
5979 msgid "A recent feature is support for Windows paths, for example:"
5983 #: ../examples/guestfs-testing.pod:68
5986 " virt-cat WindowsGuest 'c:\\windows\\win.ini'\n"
5991 #: ../examples/guestfs-testing.pod:70
5993 "An even better test is if you have a Windows guest with multiple drives. Do "
5994 "C<D:>, C<E:> etc paths work correctly?"
5998 #: ../examples/guestfs-testing.pod:73
5999 msgid "B<*> Copy some files into a B<shut off> guest."
6003 #: ../examples/guestfs-testing.pod:75
6005 "L<virt-copy-in(1)> can recursively copy files and directories into a guest "
6010 #: ../examples/guestfs-testing.pod:78
6013 " virt-copy-in -d Guest /etc /tmp\n"
6018 #: ../examples/guestfs-testing.pod:80
6020 "This should copy local directory C</etc> to C</tmp/etc> in the guest "
6021 "(recursively). If you boot the guest, can you see all of the copied files "
6026 #: ../examples/guestfs-testing.pod:84
6027 msgid "Shut the guest down and try copying multiple files and directories:"
6031 #: ../examples/guestfs-testing.pod:86
6034 " virt-copy-in -d Guest /home /etc/issue /tmp\n"
6039 #: ../examples/guestfs-testing.pod:88
6040 msgid "Copy some files out of a guest."
6044 #: ../examples/guestfs-testing.pod:90
6046 "L<virt-copy-out(1)> can recursively copy files and directories out of a "
6047 "guest or disk image."
6051 #: ../examples/guestfs-testing.pod:95
6052 msgid "Note the final space and period in the command is not a typo."
6056 #: ../examples/guestfs-testing.pod:97
6057 msgid "This should copy C</home> from the guest into the current directory."
6061 #: ../examples/guestfs-testing.pod:99
6062 msgid "Run virt-df."
6066 #: ../examples/guestfs-testing.pod:101
6067 msgid "L<virt-df(1)> lists disk space. Run:"
6071 #: ../examples/guestfs-testing.pod:103
6079 #: ../examples/guestfs-testing.pod:105
6081 "You can try comparing this to the results from L<df(1)> inside the guest, "
6082 "but there are some provisos:"
6086 #: ../examples/guestfs-testing.pod:112
6087 msgid "The guest must be idle."
6091 #: ../examples/guestfs-testing.pod:116
6092 msgid "The guest disks must be synched using L<sync(1)>."
6096 #: ../examples/guestfs-testing.pod:120
6098 "Any action such as booting the guest will write log files causing the "
6099 "numbers to change."
6103 #: ../examples/guestfs-testing.pod:125
6105 "We don't guarantee that the numbers will be identical even under these "
6106 "circumstances. They should be similar. It would indicate a bug if you saw "
6107 "greatly differing numbers."
6111 #: ../examples/guestfs-testing.pod:129
6112 msgid "Try importing virt-df CSV output into a spreadsheet or database."
6116 #: ../examples/guestfs-testing.pod:131 ../src/guestfs.pod:3069
6121 #: ../examples/guestfs-testing.pod:133
6124 " virt-df --csv > /tmp/report.csv\n"
6129 #: ../examples/guestfs-testing.pod:135
6131 "Now try to load this into your favorite spreadsheet or database. Are the "
6132 "results reproduced faithfully in the spreadsheet/database?"
6136 #: ../examples/guestfs-testing.pod:138
6138 "http://www.postgresql.org/docs/8.1/static/sql-copy.html http://dev.mysql.com/"
6139 "doc/refman/5.1/en/load-data.html"
6143 #: ../examples/guestfs-testing.pod:141
6144 msgid "B<*> Edit a file in a B<shut off> guest."
6148 #: ../examples/guestfs-testing.pod:143
6150 "L<virt-edit(1)> can edit files in guests. Try this command on a RHEL or "
6155 #: ../examples/guestfs-testing.pod:146
6158 " virt-edit LinuxGuest /etc/sysconfig/network\n"
6163 #: ../examples/guestfs-testing.pod:148
6164 msgid "On other Linux guests try editing other files such as:"
6168 #: ../examples/guestfs-testing.pod:150
6171 " virt-edit LinuxGuest /etc/motd\n"
6176 #: ../examples/guestfs-testing.pod:152
6177 msgid "Are the changes seen inside the guest when it is booted?"
6181 #: ../examples/guestfs-testing.pod:154
6182 msgid "Display the filesystems / partitions / LVs in a guest."
6186 #: ../examples/guestfs-testing.pod:156
6188 "L<virt-filesystems(1)> can be used to display filesystems in a guest. Try "
6189 "this command on any disk image or guest:"
6193 #: ../examples/guestfs-testing.pod:159
6196 " virt-filesystems -a /path/to/disk.img --all --long -h\n"
6201 #: ../examples/guestfs-testing.pod:163
6204 " virt-filesystems -d Guest --all --long -h\n"
6209 #: ../examples/guestfs-testing.pod:165
6210 msgid "Do the results match what is seen in the guest?"
6214 #: ../examples/guestfs-testing.pod:167
6215 msgid "Run virt-inspector on all your guests."
6219 #: ../examples/guestfs-testing.pod:169
6221 "Use L<virt-inspector(1)> to get a report on all of your guests or disk "
6226 #: ../examples/guestfs-testing.pod:172
6229 " virt-inspector -a /path/to/disk.img | less\n"
6234 #: ../examples/guestfs-testing.pod:176
6237 " virt-inspector -d Guest | less\n"
6242 #: ../examples/guestfs-testing.pod:178
6243 msgid "Do the results match what is actually in the guest?"
6247 #: ../examples/guestfs-testing.pod:180
6248 msgid "Try the auditing features of virt-ls on all your guests."
6252 #: ../examples/guestfs-testing.pod:184
6255 " virt-ls -lR -d Guest / | grep '^- [42]'\n"
6260 #: ../examples/guestfs-testing.pod:188
6263 " virt-ls -lR -d Guest / | grep '^d ...7'\n"
6268 #: ../examples/guestfs-testing.pod:192
6271 " virt-ls -lR -d Guest / | grep '^s'\n"
6276 #: ../examples/guestfs-testing.pod:196
6279 " virt-ls -lR -d Guest / | grep -i '^-.*\\.png$'\n"
6284 #: ../examples/guestfs-testing.pod:198
6285 msgid "Display files larger than 10MB in home directories:"
6289 #: ../examples/guestfs-testing.pod:200
6292 " virt-ls -lR -d Guest /home | awk '$3 > 10*1024*1024'\n"
6297 #: ../examples/guestfs-testing.pod:204
6300 " virt-ls -lR -d Guest --time-days / | awk '$6 <= 7'\n"
6305 #: ../examples/guestfs-testing.pod:208
6308 " virt-ls -lR -d Guest --time-days / | grep '^-' | awk '$6 < 1'\n"
6313 #: ../examples/guestfs-testing.pod:210
6314 msgid "Do the results match what is in the guest?"
6318 #: ../examples/guestfs-testing.pod:212
6319 msgid "Create a disk image from a tarball."
6323 #: ../examples/guestfs-testing.pod:214
6325 "Use L<virt-make-fs(1)> to create a disk image from any tarball that you "
6330 #: ../examples/guestfs-testing.pod:217
6333 " virt-make-fs --partition=mbr --type=vfat /any/tarball.tar.gz output.img\n"
6338 #: ../examples/guestfs-testing.pod:219
6340 "Add 'output.img' as a raw disk to an existing guest. Check the guest can "
6341 "see the files. This test is particularly useful if you try it with a "
6346 #: ../examples/guestfs-testing.pod:223
6347 msgid "Try other partitioning schemes, eg. I<--partition=gpt>."
6351 #: ../examples/guestfs-testing.pod:225
6352 msgid "Try other filesystem formats, eg. I<--type=ntfs>, I<--type=ext2>."
6356 #: ../examples/guestfs-testing.pod:227
6357 msgid "B<*> Run virt-rescue on a B<shut off> disk image or guest."
6361 #: ../examples/guestfs-testing.pod:229
6363 "Use L<virt-rescue(1)> to examine, rescue or repair a B<shut off> guest or "
6368 #: ../examples/guestfs-testing.pod:232
6371 " virt-rescue -a /path/to/disk.img\n"
6376 #: ../examples/guestfs-testing.pod:236
6379 " virt-rescue -d Guest\n"
6384 #: ../examples/guestfs-testing.pod:238
6385 msgid "Can you use ordinary shell commands to examine the guest?"
6389 #: ../examples/guestfs-testing.pod:240
6390 msgid "B<*> Resize your guests."
6394 #: ../examples/guestfs-testing.pod:242
6396 "Use L<virt-resize(1)> to give a guest some more disk space. For example, if "
6397 "you have a disk image that is smaller than 30G, increase it to 30G by doing:"
6401 #: ../examples/guestfs-testing.pod:246
6404 " truncate -s 30G newdisk.img\n"
6405 " virt-filesystems -a /path/to/olddisk.img --all --long -h\n"
6406 " virt-resize /path/to/olddisk.img newdisk.img --expand /dev/sda1\n"
6407 " qemu-kvm -m 1024 -hda newdisk.img\n"
6412 #: ../examples/guestfs-testing.pod:251
6413 msgid "Does the guest still boot? Try expanding other partitions."
6417 #: ../examples/guestfs-testing.pod:253
6418 msgid "B<*> Sparsify a guest disk."
6422 #: ../examples/guestfs-testing.pod:255
6423 msgid "Using L<virt-sparsify(1)>, make a disk image more sparse:"
6427 #: ../examples/guestfs-testing.pod:257
6430 " virt-sparsify /path/to/olddisk.img newdisk.img\n"
6435 #: ../examples/guestfs-testing.pod:259
6437 "Is C<newdisk.img> still bootable after sparsifying? Is the resulting disk "
6438 "image smaller (use C<du> to check)?"
6442 #: ../examples/guestfs-testing.pod:262
6443 msgid "B<*> \"sysprep\" a B<shut off> Linux guest."
6447 #: ../examples/guestfs-testing.pod:264
6449 "Note that this really will mess up an existing guest, so it's better to "
6450 "clone the guest before trying this."
6454 #: ../examples/guestfs-testing.pod:267
6457 " virt-sysprep --hostname newhost.example.com -a /path/to/disk.img\n"
6462 #: ../examples/guestfs-testing.pod:269
6464 "Was the sysprep successful? After booting, what changes were made and were "
6469 #: ../examples/guestfs-testing.pod:272
6470 msgid "Dump the Windows Registry from your Windows guests."
6474 #: ../examples/guestfs-testing.pod:274
6476 "Use L<virt-win-reg(1)> to dump out the Windows Registry from any Windows "
6477 "guests that you have."
6481 #: ../examples/guestfs-testing.pod:277
6484 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\Software' |\n"
6490 #: ../examples/guestfs-testing.pod:280
6493 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKLM\\System' |\n"
6499 #: ../examples/guestfs-testing.pod:283
6500 msgid "Does the output match running C<regedit> inside the guest?"
6504 #: ../examples/guestfs-testing.pod:285
6506 "A recent feature is the ability to dump user registries, so try this, "
6507 "replacing I<username> with the name of a local user in the guest:"
6511 #: ../examples/guestfs-testing.pod:288
6514 " virt-win-reg --unsafe-printable-strings WindowsGuest 'HKEY_USERS\\username' |\n"
6520 #: ../examples/guestfs-testing.pod:293
6522 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<http://libguestfs."
6527 #: ../fish/guestfish-actions.pod:1
6532 #: ../fish/guestfish-actions.pod:3
6535 " add-cdrom filename\n"
6540 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
6541 msgid "This function adds a virtual CD-ROM disk image to the guest."
6545 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
6546 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
6550 #: ../fish/guestfish-actions.pod:15
6552 "This call checks for the existence of C<filename>. This stops you from "
6553 "specifying other types of drive which are supported by qemu such as C<nbd:> "
6554 "and C<http:> URLs. To specify those, use the general L</config> call "
6559 #: ../fish/guestfish-actions.pod:22
6561 "If you just want to add an ISO file (often you use this as an efficient way "
6562 "to transfer large files into the guest), then you should probably use L</add-"
6563 "drive-ro> instead."
6567 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:214
6568 #: ../fish/guestfish-actions.pod:228
6570 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
6575 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:217
6576 #: ../fish/guestfish-actions.pod:231 ../fish/guestfish-actions.pod:972
6577 #: ../fish/guestfish-actions.pod:1007 ../fish/guestfish-actions.pod:1180
6578 #: ../fish/guestfish-actions.pod:1540 ../fish/guestfish-actions.pod:1554
6579 #: ../fish/guestfish-actions.pod:3423 ../fish/guestfish-actions.pod:3734
6580 #: ../fish/guestfish-actions.pod:3782 ../fish/guestfish-actions.pod:4700
6581 #: ../fish/guestfish-actions.pod:4720 ../fish/guestfish-actions.pod:4739
6582 #: ../fish/guestfish-actions.pod:4777 ../fish/guestfish-actions.pod:5505
6583 #: ../fish/guestfish-actions.pod:5608 ../src/guestfs-actions.pod:10
6584 #: ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326
6585 #: ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:1676
6586 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2458
6587 #: ../src/guestfs-actions.pod:2479 ../src/guestfs-actions.pod:5281
6588 #: ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:5903
6589 #: ../src/guestfs-actions.pod:7199 ../src/guestfs-actions.pod:7240
6590 #: ../src/guestfs-actions.pod:7271 ../src/guestfs-actions.pod:7331
6591 #: ../src/guestfs-actions.pod:8385 ../src/guestfs-actions.pod:8494
6592 #: ../src/guestfs-actions.pod:8674
6594 "Deprecated functions will not be removed from the API, but the fact that "
6595 "they are deprecated indicates that there are problems with correct use of "
6600 #: ../fish/guestfish-actions.pod:35
6605 #: ../fish/guestfish-actions.pod:37
6610 #: ../fish/guestfish-actions.pod:39
6613 " add-domain dom [libvirturi:..] [readonly:true|false] [iface:..] [live:true|false] [allowuuid:true|false] [readonlydisk:..]\n"
6618 #: ../fish/guestfish-actions.pod:41
6620 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6621 "It works by connecting to libvirt, requesting the domain and domain XML from "
6622 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
6626 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:65
6628 "The number of disks added is returned. This operation is atomic: if an "
6629 "error is returned, then no disks are added."
6633 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:68
6635 "This function does some minimal checks to make sure the libvirt domain is "
6636 "not running (unless C<readonly> is true). In a future version we will try "
6637 "to acquire the libvirt lock on each disk."
6641 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:72
6643 "Disks must be accessible locally. This often means that adding disks from a "
6644 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6645 "unless those disks are accessible via the same device path locally too."
6649 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:77
6651 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
6652 "libvirt.org/uri.html>). If this is not set then we connect to the default "
6653 "libvirt URI (or one set through an environment variable, see the libvirt "
6654 "documentation for full details)."
6658 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:83
6660 "The optional C<live> flag controls whether this call will try to connect to "
6661 "a running virtual machine C<guestfsd> process if it sees a suitable "
6662 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6663 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6664 "DAEMONS> for more information."
6668 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:90
6670 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6671 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6672 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6677 #: ../fish/guestfish-actions.pod:76 ../src/guestfs-actions.pod:95
6679 "The optional C<readonlydisk> parameter controls what we do for disks which "
6680 "are marked E<lt>readonly/E<gt> in the libvirt XML. Possible values are:"
6684 #: ../fish/guestfish-actions.pod:82 ../src/guestfs-actions.pod:101
6685 msgid "readonlydisk = \"error\""
6689 #: ../fish/guestfish-actions.pod:84 ../fish/guestfish-actions.pod:95
6690 #: ../fish/guestfish-actions.pod:106 ../src/guestfs-actions.pod:103
6691 #: ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:125
6692 msgid "If C<readonly> is false:"
6696 #: ../fish/guestfish-actions.pod:86 ../src/guestfs-actions.pod:105
6698 "The whole call is aborted with an error if any disk with the E<lt>readonly/"
6699 "E<gt> flag is found."
6703 #: ../fish/guestfish-actions.pod:89 ../fish/guestfish-actions.pod:100
6704 #: ../fish/guestfish-actions.pod:110 ../src/guestfs-actions.pod:108
6705 #: ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:129
6706 msgid "If C<readonly> is true:"
6710 #: ../fish/guestfish-actions.pod:91 ../fish/guestfish-actions.pod:102
6711 #: ../fish/guestfish-actions.pod:112 ../src/guestfs-actions.pod:110
6712 #: ../src/guestfs-actions.pod:121 ../src/guestfs-actions.pod:131
6713 msgid "Disks with the E<lt>readonly/E<gt> flag are added read-only."
6717 #: ../fish/guestfish-actions.pod:93 ../src/guestfs-actions.pod:112
6718 msgid "readonlydisk = \"read\""
6722 #: ../fish/guestfish-actions.pod:97 ../src/guestfs-actions.pod:116
6724 "Disks with the E<lt>readonly/E<gt> flag are added read-only. Other disks "
6725 "are added read/write."
6729 #: ../fish/guestfish-actions.pod:104 ../src/guestfs-actions.pod:123
6730 msgid "readonlydisk = \"write\" (default)"
6734 #: ../fish/guestfish-actions.pod:108 ../src/guestfs-actions.pod:127
6735 msgid "Disks with the E<lt>readonly/E<gt> flag are added read/write."
6739 #: ../fish/guestfish-actions.pod:114 ../src/guestfs-actions.pod:133
6740 msgid "readonlydisk = \"ignore\""
6744 #: ../fish/guestfish-actions.pod:116 ../src/guestfs-actions.pod:135
6745 msgid "If C<readonly> is true or false:"
6749 #: ../fish/guestfish-actions.pod:118 ../src/guestfs-actions.pod:137
6750 msgid "Disks with the E<lt>readonly/E<gt> flag are skipped."
6754 #: ../fish/guestfish-actions.pod:122
6756 "The other optional parameters are passed directly through to L</add-drive-"
6761 #: ../fish/guestfish-actions.pod:125 ../fish/guestfish-actions.pod:194
6762 #: ../fish/guestfish-actions.pod:655 ../fish/guestfish-actions.pod:866
6763 #: ../fish/guestfish-actions.pod:887 ../fish/guestfish-actions.pod:925
6764 #: ../fish/guestfish-actions.pod:934 ../fish/guestfish-actions.pod:943
6765 #: ../fish/guestfish-actions.pod:957 ../fish/guestfish-actions.pod:2202
6766 #: ../fish/guestfish-actions.pod:3250 ../fish/guestfish-actions.pod:3472
6767 #: ../fish/guestfish-actions.pod:3635 ../fish/guestfish-actions.pod:3770
6768 #: ../fish/guestfish-actions.pod:5141
6770 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
6774 #: ../fish/guestfish-actions.pod:127
6779 #: ../fish/guestfish-actions.pod:129
6782 " add-drive filename\n"
6787 #: ../fish/guestfish-actions.pod:131
6789 "This function is the equivalent of calling L</add-drive-opts> with no "
6790 "optional parameters, so the disk is added writable, with the format being "
6791 "detected automatically."
6795 #: ../fish/guestfish-actions.pod:135
6797 "Automatic detection of the format opens you up to a potential security hole "
6798 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6799 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6800 "you should think about replacing calls to this function with calls to L</add-"
6801 "drive-opts>, and specifying the format."
6805 #: ../fish/guestfish-actions.pod:142
6806 msgid "add-drive-opts"
6810 #: ../fish/guestfish-actions.pod:144
6815 #: ../fish/guestfish-actions.pod:146
6818 " add-drive-opts filename [readonly:true|false] [format:..] [iface:..] [name:..]\n"
6823 #: ../fish/guestfish-actions.pod:148 ../src/guestfs-actions.pod:208
6825 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6826 "The first time you call this function, the disk appears as C</dev/sda>, the "
6827 "second time as C</dev/sdb>, and so on."
6831 #: ../fish/guestfish-actions.pod:153 ../src/guestfs-actions.pod:213
6833 "You don't necessarily need to be root when using libguestfs. However you "
6834 "obviously do need sufficient permissions to access the filename for whatever "
6835 "operations you want to perform (ie. read access if you just want to read the "
6836 "image or write access if you want to modify the image)."
6840 #: ../fish/guestfish-actions.pod:159 ../src/guestfs-actions.pod:219
6841 msgid "This call checks that C<filename> exists."
6845 #: ../fish/guestfish-actions.pod:161 ../fish/guestfish-actions.pod:3434
6846 #: ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5318
6847 msgid "The optional arguments are:"
6851 #: ../fish/guestfish-actions.pod:165 ../src/guestfs-actions.pod:225
6856 #: ../fish/guestfish-actions.pod:167 ../src/guestfs-actions.pod:227
6858 "If true then the image is treated as read-only. Writes are still allowed, "
6859 "but they are stored in a temporary snapshot overlay which is discarded at "
6860 "the end. The disk that you add is not modified."
6864 #: ../fish/guestfish-actions.pod:171 ../src/guestfs-actions.pod:231
6869 #: ../fish/guestfish-actions.pod:173
6871 "This forces the image format. If you omit this (or use L</add-drive> or L</"
6872 "add-drive-ro>) then the format is automatically detected. Possible formats "
6873 "include C<raw> and C<qcow2>."
6877 #: ../fish/guestfish-actions.pod:177 ../src/guestfs-actions.pod:237
6879 "Automatic detection of the format opens you up to a potential security hole "
6880 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6881 "RHBZ#642934. Specifying the format closes this security hole."
6885 #: ../fish/guestfish-actions.pod:182 ../src/guestfs-actions.pod:242
6890 #: ../fish/guestfish-actions.pod:184
6892 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
6893 "add-drive-with-if> call (q.v.)"
6897 #: ../fish/guestfish-actions.pod:187 ../fish/guestfish-actions.pod:3277
6898 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:5039
6903 #: ../fish/guestfish-actions.pod:189 ../src/guestfs-actions.pod:249
6905 "The name the drive had in the original guest, e.g. /dev/sdb. This is used as "
6906 "a hint to the guest inspection process if it is available."
6910 #: ../fish/guestfish-actions.pod:196
6911 msgid "add-drive-ro"
6915 #: ../fish/guestfish-actions.pod:198
6920 #: ../fish/guestfish-actions.pod:200
6923 " add-drive-ro filename\n"
6928 #: ../fish/guestfish-actions.pod:202
6930 "This function is the equivalent of calling L</add-drive-opts> with the "
6931 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6932 "is added read-only, with the format being detected automatically."
6936 #: ../fish/guestfish-actions.pod:207
6937 msgid "add-drive-ro-with-if"
6941 #: ../fish/guestfish-actions.pod:209
6944 " add-drive-ro-with-if filename iface\n"
6949 #: ../fish/guestfish-actions.pod:211
6951 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6952 "interface emulation to use at run time."
6956 #: ../fish/guestfish-actions.pod:221
6957 msgid "add-drive-with-if"
6961 #: ../fish/guestfish-actions.pod:223
6964 " add-drive-with-if filename iface\n"
6969 #: ../fish/guestfish-actions.pod:225
6971 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6972 "interface emulation to use at run time."
6976 #: ../fish/guestfish-actions.pod:235
6981 #: ../fish/guestfish-actions.pod:237
6984 " aug-clear augpath\n"
6989 #: ../fish/guestfish-actions.pod:239 ../src/guestfs-actions.pod:343
6991 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6992 "L<augtool(1)> C<clear> command."
6996 #: ../fish/guestfish-actions.pod:242
7001 #: ../fish/guestfish-actions.pod:244
7009 #: ../fish/guestfish-actions.pod:246
7011 "Close the current Augeas handle and free up any resources used by it. After "
7012 "calling this, you have to call L</aug-init> again before you can use any "
7013 "other Augeas functions."
7017 #: ../fish/guestfish-actions.pod:251
7022 #: ../fish/guestfish-actions.pod:253
7025 " aug-defnode name expr val\n"
7030 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:372
7032 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
7036 #: ../fish/guestfish-actions.pod:258
7038 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
7039 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
7040 "containing that single node."
7044 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:379
7046 "On success this returns a pair containing the number of nodes in the "
7047 "nodeset, and a boolean flag if a node was created."
7051 #: ../fish/guestfish-actions.pod:266
7056 #: ../fish/guestfish-actions.pod:268
7059 " aug-defvar name expr\n"
7064 #: ../fish/guestfish-actions.pod:270 ../src/guestfs-actions.pod:396
7066 "Defines an Augeas variable C<name> whose value is the result of evaluating "
7067 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
7071 #: ../fish/guestfish-actions.pod:274 ../src/guestfs-actions.pod:400
7073 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
7074 "evaluates to something which is not a nodeset."
7078 #: ../fish/guestfish-actions.pod:277
7083 #: ../fish/guestfish-actions.pod:279
7086 " aug-get augpath\n"
7091 #: ../fish/guestfish-actions.pod:281 ../src/guestfs-actions.pod:413
7093 "Look up the value associated with C<path>. If C<path> matches exactly one "
7094 "node, the C<value> is returned."
7098 #: ../fish/guestfish-actions.pod:284
7103 #: ../fish/guestfish-actions.pod:286
7106 " aug-init root flags\n"
7111 #: ../fish/guestfish-actions.pod:288 ../src/guestfs-actions.pod:428
7113 "Create a new Augeas handle for editing configuration files. If there was "
7114 "any previous Augeas handle associated with this guestfs session, then it is "
7119 #: ../fish/guestfish-actions.pod:292
7120 msgid "You must call this before using any other L</aug-*> commands."
7124 #: ../fish/guestfish-actions.pod:295 ../src/guestfs-actions.pod:435
7126 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
7130 #: ../fish/guestfish-actions.pod:298 ../src/guestfs-actions.pod:438
7132 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
7133 "logical I<or> of the following integers:"
7137 #: ../fish/guestfish-actions.pod:304 ../src/guestfs-actions.pod:444
7138 msgid "C<AUG_SAVE_BACKUP> = 1"
7142 #: ../fish/guestfish-actions.pod:306 ../src/guestfs-actions.pod:446
7143 msgid "Keep the original file with a C<.augsave> extension."
7147 #: ../fish/guestfish-actions.pod:308 ../src/guestfs-actions.pod:448
7148 msgid "C<AUG_SAVE_NEWFILE> = 2"
7152 #: ../fish/guestfish-actions.pod:310 ../src/guestfs-actions.pod:450
7154 "Save changes into a file with extension C<.augnew>, and do not overwrite "
7155 "original. Overrides C<AUG_SAVE_BACKUP>."
7159 #: ../fish/guestfish-actions.pod:313 ../src/guestfs-actions.pod:453
7160 msgid "C<AUG_TYPE_CHECK> = 4"
7164 #: ../fish/guestfish-actions.pod:315 ../src/guestfs-actions.pod:455
7165 msgid "Typecheck lenses."
7169 #: ../fish/guestfish-actions.pod:317
7171 "This option is only useful when debugging Augeas lenses. Use of this option "
7172 "may require additional memory for the libguestfs appliance. You may need to "
7173 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
7177 #: ../fish/guestfish-actions.pod:322 ../src/guestfs-actions.pod:462
7178 msgid "C<AUG_NO_STDINC> = 8"
7182 #: ../fish/guestfish-actions.pod:324 ../src/guestfs-actions.pod:464
7183 msgid "Do not use standard load path for modules."
7187 #: ../fish/guestfish-actions.pod:326 ../src/guestfs-actions.pod:466
7188 msgid "C<AUG_SAVE_NOOP> = 16"
7192 #: ../fish/guestfish-actions.pod:328 ../src/guestfs-actions.pod:468
7193 msgid "Make save a no-op, just record what would have been changed."
7197 #: ../fish/guestfish-actions.pod:330 ../src/guestfs-actions.pod:470
7198 msgid "C<AUG_NO_LOAD> = 32"
7202 #: ../fish/guestfish-actions.pod:332
7203 msgid "Do not load the tree in L</aug-init>."
7207 #: ../fish/guestfish-actions.pod:336
7208 msgid "To close the handle, you can call L</aug-close>."
7212 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:478
7213 msgid "To find out more about Augeas, see L<http://augeas.net/>."
7217 #: ../fish/guestfish-actions.pod:340
7222 #: ../fish/guestfish-actions.pod:342
7225 " aug-insert augpath label true|false\n"
7230 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:492
7232 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
7233 "or after C<path> (depending on the boolean flag C<before>)."
7237 #: ../fish/guestfish-actions.pod:348 ../src/guestfs-actions.pod:496
7239 "C<path> must match exactly one existing node in the tree, and C<label> must "
7240 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
7244 #: ../fish/guestfish-actions.pod:352
7249 #: ../fish/guestfish-actions.pod:354
7257 #: ../fish/guestfish-actions.pod:356 ../src/guestfs-actions.pod:509
7258 msgid "Load files into the tree."
7262 #: ../fish/guestfish-actions.pod:358 ../src/guestfs-actions.pod:511
7263 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
7267 #: ../fish/guestfish-actions.pod:361
7272 #: ../fish/guestfish-actions.pod:363
7280 #: ../fish/guestfish-actions.pod:365
7282 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
7283 "resulting nodes into alphabetical order."
7287 #: ../fish/guestfish-actions.pod:368
7292 #: ../fish/guestfish-actions.pod:370
7295 " aug-match augpath\n"
7300 #: ../fish/guestfish-actions.pod:372 ../src/guestfs-actions.pod:539
7302 "Returns a list of paths which match the path expression C<path>. The "
7303 "returned paths are sufficiently qualified so that they match exactly one "
7304 "node in the current tree."
7308 #: ../fish/guestfish-actions.pod:376
7313 #: ../fish/guestfish-actions.pod:378
7316 " aug-mv src dest\n"
7321 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:556
7323 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
7324 "C<dest> is overwritten if it exists."
7328 #: ../fish/guestfish-actions.pod:383
7333 #: ../fish/guestfish-actions.pod:385
7341 #: ../fish/guestfish-actions.pod:387 ../src/guestfs-actions.pod:569
7342 msgid "Remove C<path> and all of its children."
7346 #: ../fish/guestfish-actions.pod:389 ../src/guestfs-actions.pod:571
7347 msgid "On success this returns the number of entries which were removed."
7351 #: ../fish/guestfish-actions.pod:391
7356 #: ../fish/guestfish-actions.pod:393
7364 #: ../fish/guestfish-actions.pod:395 ../src/guestfs-actions.pod:582
7365 msgid "This writes all pending changes to disk."
7369 #: ../fish/guestfish-actions.pod:397
7371 "The flags which were passed to L</aug-init> affect exactly how files are "
7376 #: ../fish/guestfish-actions.pod:400
7381 #: ../fish/guestfish-actions.pod:402
7384 " aug-set augpath val\n"
7389 #: ../fish/guestfish-actions.pod:404 ../src/guestfs-actions.pod:598
7390 msgid "Set the value associated with C<path> to C<val>."
7394 #: ../fish/guestfish-actions.pod:406
7396 "In the Augeas API, it is possible to clear a node by setting the value to "
7397 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
7398 "this call. Instead you must use the L</aug-clear> call."
7402 #: ../fish/guestfish-actions.pod:411
7407 #: ../fish/guestfish-actions.pod:413
7410 " available 'groups ...'\n"
7415 #: ../fish/guestfish-actions.pod:415 ../src/guestfs-actions.pod:615
7417 "This command is used to check the availability of some groups of "
7418 "functionality in the appliance, which not all builds of the libguestfs "
7419 "appliance will be able to provide."
7423 #: ../fish/guestfish-actions.pod:419
7425 "The libguestfs groups, and the functions that those groups correspond to, "
7426 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
7427 "runtime by calling L</available-all-groups>."
7431 #: ../fish/guestfish-actions.pod:424 ../src/guestfs-actions.pod:624
7433 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
7434 "\"]> would check for the availability of the Linux inotify functions and "
7435 "Augeas (configuration file editing) functions."
7439 #: ../fish/guestfish-actions.pod:429 ../src/guestfs-actions.pod:629
7440 msgid "The command returns no error if I<all> requested groups are available."
7444 #: ../fish/guestfish-actions.pod:431 ../src/guestfs-actions.pod:631
7446 "It fails with an error if one or more of the requested groups is unavailable "
7451 #: ../fish/guestfish-actions.pod:434 ../src/guestfs-actions.pod:634
7453 "If an unknown group name is included in the list of groups then an error is "
7458 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:637
7463 #: ../fish/guestfish-actions.pod:443
7464 msgid "You must call L</launch> before calling this function."
7468 #: ../fish/guestfish-actions.pod:445 ../src/guestfs-actions.pod:645
7470 "The reason is because we don't know what groups are supported by the "
7471 "appliance/daemon until it is running and can be queried."
7475 #: ../fish/guestfish-actions.pod:451 ../src/guestfs-actions.pod:651
7477 "If a group of functions is available, this does not necessarily mean that "
7478 "they will work. You still have to check for errors when calling individual "
7479 "API functions even if they are available."
7483 #: ../fish/guestfish-actions.pod:458 ../src/guestfs-actions.pod:658
7485 "It is usually the job of distro packagers to build complete functionality "
7486 "into the libguestfs appliance. Upstream libguestfs, if built from source "
7487 "with all requirements satisfied, will support everything."
7491 #: ../fish/guestfish-actions.pod:465
7493 "This call was added in version C<1.0.80>. In previous versions of "
7494 "libguestfs all you could do would be to speculatively execute a command to "
7495 "find out if the daemon implemented it. See also L</version>."
7499 #: ../fish/guestfish-actions.pod:472
7500 msgid "available-all-groups"
7504 #: ../fish/guestfish-actions.pod:474
7507 " available-all-groups\n"
7512 #: ../fish/guestfish-actions.pod:476
7514 "This command returns a list of all optional groups that this daemon knows "
7515 "about. Note this returns both supported and unsupported groups. To find "
7516 "out which ones the daemon can actually support you have to call L</"
7517 "available> on each member of the returned list."
7521 #: ../fish/guestfish-actions.pod:482
7522 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
7526 #: ../fish/guestfish-actions.pod:484
7531 #: ../fish/guestfish-actions.pod:486
7534 " base64-in (base64file|-) filename\n"
7539 #: ../fish/guestfish-actions.pod:488 ../src/guestfs-actions.pod:702
7541 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7545 #: ../fish/guestfish-actions.pod:491 ../fish/guestfish-actions.pod:500
7546 #: ../fish/guestfish-actions.pod:780 ../fish/guestfish-actions.pod:864
7547 #: ../fish/guestfish-actions.pod:885 ../fish/guestfish-actions.pod:1056
7548 #: ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1449
7549 #: ../fish/guestfish-actions.pod:4997 ../fish/guestfish-actions.pod:5009
7550 #: ../fish/guestfish-actions.pod:5020 ../fish/guestfish-actions.pod:5031
7551 #: ../fish/guestfish-actions.pod:5162 ../fish/guestfish-actions.pod:5171
7552 #: ../fish/guestfish-actions.pod:5225 ../fish/guestfish-actions.pod:5248
7553 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
7557 #: ../fish/guestfish-actions.pod:493
7562 #: ../fish/guestfish-actions.pod:495
7565 " base64-out filename (base64file|-)\n"
7570 #: ../fish/guestfish-actions.pod:497 ../src/guestfs-actions.pod:716
7572 "This command downloads the contents of C<filename>, writing it out to local "
7573 "file C<base64file> encoded as base64."
7577 #: ../fish/guestfish-actions.pod:502
7582 #: ../fish/guestfish-actions.pod:504
7590 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
7592 "This command returns block device attributes for C<device>. The following "
7593 "fields are usually present in the returned hash. Other fields may also be "
7598 #: ../fish/guestfish-actions.pod:511 ../src/guestfs-actions.pod:734
7603 #: ../fish/guestfish-actions.pod:513 ../src/guestfs-actions.pod:736
7604 msgid "The uuid of this device."
7608 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:738
7613 #: ../fish/guestfish-actions.pod:517 ../src/guestfs-actions.pod:740
7614 msgid "The label of this device."
7618 #: ../fish/guestfish-actions.pod:519 ../src/guestfs-actions.pod:742
7623 #: ../fish/guestfish-actions.pod:521 ../src/guestfs-actions.pod:744
7624 msgid "The version of blkid command."
7628 #: ../fish/guestfish-actions.pod:523 ../src/guestfs-actions.pod:746
7633 #: ../fish/guestfish-actions.pod:525 ../src/guestfs-actions.pod:748
7634 msgid "The filesystem type or RAID of this device."
7638 #: ../fish/guestfish-actions.pod:527 ../src/guestfs-actions.pod:750
7643 #: ../fish/guestfish-actions.pod:529 ../src/guestfs-actions.pod:752
7644 msgid "The usage of this device, for example C<filesystem> or C<raid>."
7648 #: ../fish/guestfish-actions.pod:533
7649 msgid "blockdev-flushbufs"
7653 #: ../fish/guestfish-actions.pod:535
7656 " blockdev-flushbufs device\n"
7661 #: ../fish/guestfish-actions.pod:537 ../src/guestfs-actions.pod:768
7663 "This tells the kernel to flush internal buffers associated with C<device>."
7667 #: ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:551
7668 #: ../fish/guestfish-actions.pod:560 ../fish/guestfish-actions.pod:570
7669 #: ../fish/guestfish-actions.pod:582 ../fish/guestfish-actions.pod:595
7670 #: ../fish/guestfish-actions.pod:603 ../fish/guestfish-actions.pod:614
7671 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:630
7672 #: ../src/guestfs-actions.pod:771 ../src/guestfs-actions.pod:788
7673 #: ../src/guestfs-actions.pod:803 ../src/guestfs-actions.pod:819
7674 #: ../src/guestfs-actions.pod:837 ../src/guestfs-actions.pod:856
7675 #: ../src/guestfs-actions.pod:870 ../src/guestfs-actions.pod:888
7676 #: ../src/guestfs-actions.pod:902 ../src/guestfs-actions.pod:916
7677 msgid "This uses the L<blockdev(8)> command."
7681 #: ../fish/guestfish-actions.pod:542
7682 msgid "blockdev-getbsz"
7686 #: ../fish/guestfish-actions.pod:544
7689 " blockdev-getbsz device\n"
7694 #: ../fish/guestfish-actions.pod:546 ../src/guestfs-actions.pod:783
7695 msgid "This returns the block size of a device."
7699 #: ../fish/guestfish-actions.pod:548 ../fish/guestfish-actions.pod:611
7700 #: ../src/guestfs-actions.pod:785 ../src/guestfs-actions.pod:885
7702 "(Note this is different from both I<size in blocks> and I<filesystem block "
7707 #: ../fish/guestfish-actions.pod:553
7708 msgid "blockdev-getro"
7712 #: ../fish/guestfish-actions.pod:555
7715 " blockdev-getro device\n"
7720 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:800
7722 "Returns a boolean indicating if the block device is read-only (true if read-"
7723 "only, false if not)."
7727 #: ../fish/guestfish-actions.pod:562
7728 msgid "blockdev-getsize64"
7732 #: ../fish/guestfish-actions.pod:564
7735 " blockdev-getsize64 device\n"
7740 #: ../fish/guestfish-actions.pod:566 ../src/guestfs-actions.pod:815
7741 msgid "This returns the size of the device in bytes."
7745 #: ../fish/guestfish-actions.pod:568
7746 msgid "See also L</blockdev-getsz>."
7750 #: ../fish/guestfish-actions.pod:572
7751 msgid "blockdev-getss"
7755 #: ../fish/guestfish-actions.pod:574
7758 " blockdev-getss device\n"
7763 #: ../fish/guestfish-actions.pod:576 ../src/guestfs-actions.pod:831
7765 "This returns the size of sectors on a block device. Usually 512, but can be "
7766 "larger for modern devices."
7770 #: ../fish/guestfish-actions.pod:579
7772 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7776 #: ../fish/guestfish-actions.pod:584
7777 msgid "blockdev-getsz"
7781 #: ../fish/guestfish-actions.pod:586
7784 " blockdev-getsz device\n"
7789 #: ../fish/guestfish-actions.pod:588 ../src/guestfs-actions.pod:849
7791 "This returns the size of the device in units of 512-byte sectors (even if "
7792 "the sectorsize isn't 512 bytes ... weird)."
7796 #: ../fish/guestfish-actions.pod:591
7798 "See also L</blockdev-getss> for the real sector size of the device, and L</"
7799 "blockdev-getsize64> for the more useful I<size in bytes>."
7803 #: ../fish/guestfish-actions.pod:597
7804 msgid "blockdev-rereadpt"
7808 #: ../fish/guestfish-actions.pod:599
7811 " blockdev-rereadpt device\n"
7816 #: ../fish/guestfish-actions.pod:601 ../src/guestfs-actions.pod:868
7817 msgid "Reread the partition table on C<device>."
7821 #: ../fish/guestfish-actions.pod:605
7822 msgid "blockdev-setbsz"
7826 #: ../fish/guestfish-actions.pod:607
7829 " blockdev-setbsz device blocksize\n"
7834 #: ../fish/guestfish-actions.pod:609 ../src/guestfs-actions.pod:883
7835 msgid "This sets the block size of a device."
7839 #: ../fish/guestfish-actions.pod:616
7840 msgid "blockdev-setro"
7844 #: ../fish/guestfish-actions.pod:618
7847 " blockdev-setro device\n"
7852 #: ../fish/guestfish-actions.pod:620 ../src/guestfs-actions.pod:900
7853 msgid "Sets the block device named C<device> to read-only."
7857 #: ../fish/guestfish-actions.pod:624
7858 msgid "blockdev-setrw"
7862 #: ../fish/guestfish-actions.pod:626
7865 " blockdev-setrw device\n"
7870 #: ../fish/guestfish-actions.pod:628 ../src/guestfs-actions.pod:914
7871 msgid "Sets the block device named C<device> to read-write."
7875 #: ../fish/guestfish-actions.pod:632
7876 msgid "btrfs-filesystem-resize"
7880 #: ../fish/guestfish-actions.pod:634
7883 " btrfs-filesystem-resize mountpoint [size:N]\n"
7888 #: ../fish/guestfish-actions.pod:636 ../src/guestfs-actions.pod:936
7889 msgid "This command resizes a btrfs filesystem."
7893 #: ../fish/guestfish-actions.pod:638 ../src/guestfs-actions.pod:938
7895 "Note that unlike other resize calls, the filesystem has to be mounted and "
7896 "the parameter is the mountpoint not the device (this is a requirement of "
7901 #: ../fish/guestfish-actions.pod:642 ../fish/guestfish-actions.pod:3199
7902 #: ../fish/guestfish-actions.pod:3745 ../fish/guestfish-actions.pod:5071
7903 #: ../src/guestfs-actions.pod:942 ../src/guestfs-actions.pod:4935
7904 #: ../src/guestfs-actions.pod:5842 ../src/guestfs-actions.pod:7818
7905 msgid "The optional parameters are:"
7909 #: ../fish/guestfish-actions.pod:646 ../fish/guestfish-actions.pod:3749
7910 #: ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:5846
7915 #: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:948
7917 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7918 "resized to the maximum size."
7922 #: ../fish/guestfish-actions.pod:653 ../src/guestfs-actions.pod:953
7923 msgid "See also L<btrfs(8)>."
7927 #: ../fish/guestfish-actions.pod:657
7928 msgid "case-sensitive-path"
7932 #: ../fish/guestfish-actions.pod:659
7935 " case-sensitive-path path\n"
7940 #: ../fish/guestfish-actions.pod:661 ../src/guestfs-actions.pod:987
7942 "This can be used to resolve case insensitive paths on a filesystem which is "
7943 "case sensitive. The use case is to resolve paths which you have read from "
7944 "Windows configuration files or the Windows Registry, to the true path."
7948 #: ../fish/guestfish-actions.pod:666 ../src/guestfs-actions.pod:992
7950 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7951 "(and probably others), which is that although the underlying filesystem is "
7952 "case-insensitive, the driver exports the filesystem to Linux as case-"
7957 #: ../fish/guestfish-actions.pod:671 ../src/guestfs-actions.pod:997
7959 "One consequence of this is that special directories such as C<c:\\windows> "
7960 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7961 "precise details of how they were created. In Windows itself this would not "
7966 #: ../fish/guestfish-actions.pod:677 ../src/guestfs-actions.pod:1003
7968 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7973 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1006
7975 "This function resolves the true case of each element in the path and returns "
7976 "the case-sensitive path."
7980 #: ../fish/guestfish-actions.pod:683
7982 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
7983 "WINDOWS/system32\"> (the exact return value would depend on details of how "
7984 "the directories were originally created under Windows)."
7988 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1014
7989 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7993 #: ../fish/guestfish-actions.pod:691
7994 msgid "See also L</realpath>."
7998 #: ../fish/guestfish-actions.pod:693
8003 #: ../fish/guestfish-actions.pod:695
8011 #: ../fish/guestfish-actions.pod:697 ../fish/guestfish-actions.pod:4176
8012 #: ../src/guestfs-actions.pod:1030 ../src/guestfs-actions.pod:6502
8013 msgid "Return the contents of the file named C<path>."
8017 #: ../fish/guestfish-actions.pod:699
8019 "Note that this function cannot correctly handle binary files (specifically, "
8020 "files containing C<\\0> character which is treated as end of string). For "
8021 "those you need to use the L</read-file> or L</download> functions which have "
8022 "a more complex interface."
8026 #: ../fish/guestfish-actions.pod:704 ../fish/guestfish-actions.pod:839
8027 #: ../fish/guestfish-actions.pod:851 ../fish/guestfish-actions.pod:1134
8028 #: ../fish/guestfish-actions.pod:1144 ../fish/guestfish-actions.pod:1211
8029 #: ../fish/guestfish-actions.pod:1221 ../fish/guestfish-actions.pod:1413
8030 #: ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1736
8031 #: ../fish/guestfish-actions.pod:1786 ../fish/guestfish-actions.pod:1801
8032 #: ../fish/guestfish-actions.pod:1811 ../fish/guestfish-actions.pod:1830
8033 #: ../fish/guestfish-actions.pod:4046 ../fish/guestfish-actions.pod:4061
8034 #: ../fish/guestfish-actions.pod:4137 ../fish/guestfish-actions.pod:4154
8035 #: ../fish/guestfish-actions.pod:4169 ../fish/guestfish-actions.pod:4838
8036 #: ../fish/guestfish-actions.pod:4884 ../fish/guestfish-actions.pod:4969
8037 #: ../fish/guestfish-actions.pod:4984 ../fish/guestfish-actions.pod:5469
8038 #: ../fish/guestfish-actions.pod:5481 ../fish/guestfish-actions.pod:5499
8039 #: ../fish/guestfish-actions.pod:5516 ../fish/guestfish-actions.pod:5526
8040 #: ../fish/guestfish-actions.pod:5580 ../fish/guestfish-actions.pod:5590
8041 #: ../fish/guestfish-actions.pod:5619 ../fish/guestfish-actions.pod:5629
8042 #: ../src/guestfs-actions.pod:1040 ../src/guestfs-actions.pod:1219
8043 #: ../src/guestfs-actions.pod:1239 ../src/guestfs-actions.pod:1894
8044 #: ../src/guestfs-actions.pod:1913 ../src/guestfs-actions.pod:2016
8045 #: ../src/guestfs-actions.pod:2035 ../src/guestfs-actions.pod:2281
8046 #: ../src/guestfs-actions.pod:2763 ../src/guestfs-actions.pod:2782
8047 #: ../src/guestfs-actions.pod:2847 ../src/guestfs-actions.pod:2871
8048 #: ../src/guestfs-actions.pod:2888 ../src/guestfs-actions.pod:2917
8049 #: ../src/guestfs-actions.pod:6284 ../src/guestfs-actions.pod:6310
8050 #: ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6467
8051 #: ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:7446
8052 #: ../src/guestfs-actions.pod:7501 ../src/guestfs-actions.pod:7647
8053 #: ../src/guestfs-actions.pod:7671 ../src/guestfs-actions.pod:8458
8054 #: ../src/guestfs-actions.pod:8478 ../src/guestfs-actions.pod:8511
8055 #: ../src/guestfs-actions.pod:8530 ../src/guestfs-actions.pod:8549
8056 #: ../src/guestfs-actions.pod:8640 ../src/guestfs-actions.pod:8659
8057 #: ../src/guestfs-actions.pod:8705 ../src/guestfs-actions.pod:8724
8059 "Because of the message protocol, there is a transfer limit of somewhere "
8060 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
8064 #: ../fish/guestfish-actions.pod:707
8069 #: ../fish/guestfish-actions.pod:709
8072 " checksum csumtype path\n"
8077 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1052
8079 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
8083 #: ../fish/guestfish-actions.pod:714 ../src/guestfs-actions.pod:1055
8085 "The type of checksum to compute is given by the C<csumtype> parameter which "
8086 "must have one of the following values:"
8090 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1060
8095 #: ../fish/guestfish-actions.pod:721 ../src/guestfs-actions.pod:1062
8097 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
8102 #: ../fish/guestfish-actions.pod:724 ../src/guestfs-actions.pod:1065
8107 #: ../fish/guestfish-actions.pod:726 ../src/guestfs-actions.pod:1067
8108 msgid "Compute the MD5 hash (using the C<md5sum> program)."
8112 #: ../fish/guestfish-actions.pod:728 ../src/guestfs-actions.pod:1069
8117 #: ../fish/guestfish-actions.pod:730 ../src/guestfs-actions.pod:1071
8118 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
8122 #: ../fish/guestfish-actions.pod:732 ../src/guestfs-actions.pod:1073
8127 #: ../fish/guestfish-actions.pod:734 ../src/guestfs-actions.pod:1075
8128 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
8132 #: ../fish/guestfish-actions.pod:736 ../src/guestfs-actions.pod:1077
8137 #: ../fish/guestfish-actions.pod:738 ../src/guestfs-actions.pod:1079
8138 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
8142 #: ../fish/guestfish-actions.pod:740 ../src/guestfs-actions.pod:1081
8147 #: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1083
8148 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
8152 #: ../fish/guestfish-actions.pod:744 ../src/guestfs-actions.pod:1085
8157 #: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1087
8158 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
8162 #: ../fish/guestfish-actions.pod:750 ../src/guestfs-actions.pod:1091
8163 msgid "The checksum is returned as a printable string."
8167 #: ../fish/guestfish-actions.pod:752
8168 msgid "To get the checksum for a device, use L</checksum-device>."
8172 #: ../fish/guestfish-actions.pod:754
8173 msgid "To get the checksums for many files, use L</checksums-out>."
8177 #: ../fish/guestfish-actions.pod:756
8178 msgid "checksum-device"
8182 #: ../fish/guestfish-actions.pod:758
8185 " checksum-device csumtype device\n"
8190 #: ../fish/guestfish-actions.pod:760
8192 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
8193 "device named C<device>. For the types of checksums supported see the L</"
8194 "checksum> command."
8198 #: ../fish/guestfish-actions.pod:764
8199 msgid "checksums-out"
8203 #: ../fish/guestfish-actions.pod:766
8206 " checksums-out csumtype directory (sumsfile|-)\n"
8211 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1126
8213 "This command computes the checksums of all regular files in C<directory> and "
8214 "then emits a list of those checksums to the local output file C<sumsfile>."
8218 #: ../fish/guestfish-actions.pod:772 ../src/guestfs-actions.pod:1130
8220 "This can be used for verifying the integrity of a virtual machine. However "
8221 "to be properly secure you should pay attention to the output of the checksum "
8222 "command (it uses the ones from GNU coreutils). In particular when the "
8223 "filename is not printable, coreutils uses a special backslash syntax. For "
8224 "more information, see the GNU coreutils info file."
8228 #: ../fish/guestfish-actions.pod:782
8233 #: ../fish/guestfish-actions.pod:784
8236 " chmod mode path\n"
8241 #: ../fish/guestfish-actions.pod:786 ../src/guestfs-actions.pod:1149
8243 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
8248 #: ../fish/guestfish-actions.pod:789 ../src/guestfs-actions.pod:1152
8250 "I<Note>: When using this command from guestfish, C<mode> by default would be "
8251 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
8256 #: ../fish/guestfish-actions.pod:793 ../fish/guestfish-actions.pod:3398
8257 #: ../fish/guestfish-actions.pod:3537 ../fish/guestfish-actions.pod:3547
8258 #: ../fish/guestfish-actions.pod:3557 ../src/guestfs-actions.pod:1156
8259 #: ../src/guestfs-actions.pod:5249 ../src/guestfs-actions.pod:5458
8260 #: ../src/guestfs-actions.pod:5477 ../src/guestfs-actions.pod:5496
8261 msgid "The mode actually set is affected by the umask."
8265 #: ../fish/guestfish-actions.pod:795
8270 #: ../fish/guestfish-actions.pod:797
8273 " chown owner group path\n"
8278 #: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1170
8279 msgid "Change the file owner to C<owner> and group to C<group>."
8283 #: ../fish/guestfish-actions.pod:801 ../fish/guestfish-actions.pod:2738
8284 #: ../src/guestfs-actions.pod:1172 ../src/guestfs-actions.pod:4167
8286 "Only numeric uid and gid are supported. If you want to use names, you will "
8287 "need to locate and parse the password file yourself (Augeas support makes "
8288 "this relatively easy)."
8292 #: ../fish/guestfish-actions.pod:805
8297 #: ../fish/guestfish-actions.pod:807
8300 " command 'arguments ...'\n"
8305 #: ../fish/guestfish-actions.pod:809 ../src/guestfs-actions.pod:1186
8307 "This call runs a command from the guest filesystem. The filesystem must be "
8308 "mounted, and must contain a compatible operating system (ie. something "
8309 "Linux, with the same or compatible processor architecture)."
8313 #: ../fish/guestfish-actions.pod:814
8315 "The single parameter is an argv-style list of arguments. The first element "
8316 "is the name of the program to run. Subsequent elements are parameters. The "
8317 "list must be non-empty (ie. must contain a program name). Note that the "
8318 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
8322 #: ../fish/guestfish-actions.pod:821 ../src/guestfs-actions.pod:1198
8323 msgid "The return value is anything printed to I<stdout> by the command."
8327 #: ../fish/guestfish-actions.pod:824 ../src/guestfs-actions.pod:1201
8329 "If the command returns a non-zero exit status, then this function returns an "
8330 "error message. The error message string is the content of I<stderr> from "
8335 #: ../fish/guestfish-actions.pod:828 ../src/guestfs-actions.pod:1205
8337 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
8338 "bin>. If you require a program from another location, you should provide "
8339 "the full path in the first parameter."
8343 #: ../fish/guestfish-actions.pod:833 ../src/guestfs-actions.pod:1210
8345 "Shared libraries and data files required by the program must be available on "
8346 "filesystems which are mounted in the correct places. It is the caller's "
8347 "responsibility to ensure all filesystems that are needed are mounted at the "
8352 #: ../fish/guestfish-actions.pod:842
8353 msgid "command-lines"
8357 #: ../fish/guestfish-actions.pod:844
8360 " command-lines 'arguments ...'\n"
8365 #: ../fish/guestfish-actions.pod:846
8367 "This is the same as L</command>, but splits the result into a list of lines."
8371 #: ../fish/guestfish-actions.pod:849
8372 msgid "See also: L</sh-lines>"
8376 #: ../fish/guestfish-actions.pod:854
8377 msgid "compress-device-out"
8381 #: ../fish/guestfish-actions.pod:856
8384 " compress-device-out ctype device (zdevice|-) [level:N]\n"
8389 #: ../fish/guestfish-actions.pod:858 ../src/guestfs-actions.pod:1260
8391 "This command compresses C<device> and writes it out to the local file "
8396 #: ../fish/guestfish-actions.pod:861
8398 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
8403 #: ../fish/guestfish-actions.pod:868
8404 msgid "compress-out"
8408 #: ../fish/guestfish-actions.pod:870
8411 " compress-out ctype file (zfile|-) [level:N]\n"
8416 #: ../fish/guestfish-actions.pod:872 ../src/guestfs-actions.pod:1312
8418 "This command compresses C<file> and writes it out to the local file C<zfile>."
8422 #: ../fish/guestfish-actions.pod:875 ../src/guestfs-actions.pod:1315
8424 "The compression program used is controlled by the C<ctype> parameter. "
8425 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
8426 "Some compression types may not be supported by particular builds of "
8427 "libguestfs, in which case you will get an error containing the substring "
8428 "\"not supported\"."
8432 #: ../fish/guestfish-actions.pod:881 ../src/guestfs-actions.pod:1321
8434 "The optional C<level> parameter controls compression level. The meaning and "
8435 "default for this parameter depends on the compression program being used."
8439 #: ../fish/guestfish-actions.pod:889
8444 #: ../fish/guestfish-actions.pod:891
8447 " config qemuparam qemuvalue\n"
8452 #: ../fish/guestfish-actions.pod:893 ../src/guestfs-actions.pod:1362
8454 "This can be used to add arbitrary qemu command line parameters of the form "
8455 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8456 "setting some parameters which would interfere with parameters that we use."
8460 #: ../fish/guestfish-actions.pod:898 ../src/guestfs-actions.pod:1367
8461 msgid "The first character of C<param> string must be a C<-> (dash)."
8465 #: ../fish/guestfish-actions.pod:900 ../src/guestfs-actions.pod:1369
8466 msgid "C<value> can be NULL."
8470 #: ../fish/guestfish-actions.pod:902
8471 msgid "copy-device-to-device"
8475 #: ../fish/guestfish-actions.pod:904
8478 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8483 #: ../fish/guestfish-actions.pod:906
8485 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, L</copy-"
8486 "file-to-device>, and L</copy-file-to-file> let you copy from a source "
8487 "(device|file) to a destination (device|file)."
8491 #: ../fish/guestfish-actions.pod:913 ../src/guestfs-actions.pod:1399
8493 "Partial copies can be made since you can specify optionally the source "
8494 "offset, destination offset and size to copy. These values are all specified "
8495 "in bytes. If not given, the offsets both default to zero, and the size "
8496 "defaults to copying as much as possible until we hit the end of the source."
8500 #: ../fish/guestfish-actions.pod:919 ../src/guestfs-actions.pod:1405
8502 "The source and destination may be the same object. However overlapping "
8503 "regions may not be copied correctly."
8507 #: ../fish/guestfish-actions.pod:922 ../src/guestfs-actions.pod:1408
8509 "If the destination is a file, it is created if required. If the destination "
8510 "file is not large enough, it is extended."
8514 #: ../fish/guestfish-actions.pod:927
8515 msgid "copy-device-to-file"
8519 #: ../fish/guestfish-actions.pod:929
8522 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8527 #: ../fish/guestfish-actions.pod:931 ../fish/guestfish-actions.pod:940
8528 #: ../fish/guestfish-actions.pod:949
8529 msgid "See L</copy-device-to-device> for a general overview of this call."
8533 #: ../fish/guestfish-actions.pod:936
8534 msgid "copy-file-to-device"
8538 #: ../fish/guestfish-actions.pod:938
8541 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8546 #: ../fish/guestfish-actions.pod:945
8547 msgid "copy-file-to-file"
8551 #: ../fish/guestfish-actions.pod:947
8554 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8559 #: ../fish/guestfish-actions.pod:952
8561 "This is B<not> the function you want for copying files. This is for copying "
8562 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
8563 "file copying and moving functions."
8567 #: ../fish/guestfish-actions.pod:959
8572 #: ../fish/guestfish-actions.pod:961
8575 " copy-size src dest size\n"
8580 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1623
8582 "This command copies exactly C<size> bytes from one source device or file "
8583 "C<src> to another destination device or file C<dest>."
8587 #: ../fish/guestfish-actions.pod:966 ../src/guestfs-actions.pod:1626
8589 "Note this will fail if the source is too short or if the destination is not "
8594 #: ../fish/guestfish-actions.pod:969 ../fish/guestfish-actions.pod:1004
8596 "I<This function is deprecated.> In new code, use the L</"
8597 "copy_device_to_device> call instead."
8601 #: ../fish/guestfish-actions.pod:976
8606 #: ../fish/guestfish-actions.pod:978
8614 #: ../fish/guestfish-actions.pod:980 ../src/guestfs-actions.pod:1645
8616 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8617 "destination filename or destination directory."
8621 #: ../fish/guestfish-actions.pod:983
8626 #: ../fish/guestfish-actions.pod:985
8634 #: ../fish/guestfish-actions.pod:987 ../src/guestfs-actions.pod:1659
8636 "This copies a file or directory from C<src> to C<dest> recursively using the "
8641 #: ../fish/guestfish-actions.pod:990
8646 #: ../fish/guestfish-actions.pod:992
8654 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1680
8656 "This command copies from one source device or file C<src> to another "
8657 "destination device or file C<dest>. Normally you would use this to copy to "
8658 "or from a device or partition, for example to duplicate a filesystem."
8662 #: ../fish/guestfish-actions.pod:999
8664 "If the destination is a device, it must be as large or larger than the "
8665 "source file or device, otherwise the copy will fail. This command cannot do "
8666 "partial copies (see L</copy-device-to-device>)."
8670 #: ../fish/guestfish-actions.pod:1011
8675 #: ../fish/guestfish-actions.pod:1013
8683 #: ../fish/guestfish-actions.pod:1015 ../src/guestfs-actions.pod:1699
8684 msgid "This command runs the C<df> command to report disk space used."
8688 #: ../fish/guestfish-actions.pod:1017 ../fish/guestfish-actions.pod:1028
8690 "This command is mostly useful for interactive sessions. It is I<not> "
8691 "intended that you try to parse the output string. Use L</statvfs> from "
8696 #: ../fish/guestfish-actions.pod:1021
8701 #: ../fish/guestfish-actions.pod:1023
8709 #: ../fish/guestfish-actions.pod:1025 ../src/guestfs-actions.pod:1715
8711 "This command runs the C<df -h> command to report disk space used in human-"
8716 #: ../fish/guestfish-actions.pod:1032
8721 #: ../fish/guestfish-actions.pod:1034
8729 #: ../fish/guestfish-actions.pod:1036 ../src/guestfs-actions.pod:1732
8731 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8732 "This is sometimes useful for extended debugging of problems."
8736 #: ../fish/guestfish-actions.pod:1040
8738 "Another way to get the same information is to enable verbose messages with "
8739 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
8740 "before running the program."
8744 #: ../fish/guestfish-actions.pod:1045
8749 #: ../fish/guestfish-actions.pod:1047
8752 " download remotefilename (filename|-)\n"
8757 #: ../fish/guestfish-actions.pod:1049 ../fish/guestfish-actions.pod:1062
8758 #: ../src/guestfs-actions.pod:1753 ../src/guestfs-actions.pod:1778
8760 "Download file C<remotefilename> and save it as C<filename> on the local "
8765 #: ../fish/guestfish-actions.pod:1052 ../fish/guestfish-actions.pod:5221
8766 #: ../src/guestfs-actions.pod:1756 ../src/guestfs-actions.pod:8028
8767 msgid "C<filename> can also be a named pipe."
8771 #: ../fish/guestfish-actions.pod:1054
8772 msgid "See also L</upload>, L</cat>."
8776 #: ../fish/guestfish-actions.pod:1058
8777 msgid "download-offset"
8781 #: ../fish/guestfish-actions.pod:1060
8784 " download-offset remotefilename (filename|-) offset size\n"
8789 #: ../fish/guestfish-actions.pod:1065 ../src/guestfs-actions.pod:1781
8791 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8792 "region must be within the file or device)."
8796 #: ../fish/guestfish-actions.pod:1068
8798 "Note that there is no limit on the amount of data that can be downloaded "
8799 "with this call, unlike with L</pread>, and this call always reads the full "
8800 "amount unless an error occurs."
8804 #: ../fish/guestfish-actions.pod:1073
8805 msgid "See also L</download>, L</pread>."
8809 #: ../fish/guestfish-actions.pod:1077
8814 #: ../fish/guestfish-actions.pod:1079
8817 " drop-caches whattodrop\n"
8822 #: ../fish/guestfish-actions.pod:1081 ../src/guestfs-actions.pod:1806
8824 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8825 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8826 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8830 #: ../fish/guestfish-actions.pod:1086 ../src/guestfs-actions.pod:1811
8831 msgid "Setting C<whattodrop> to 3 should drop everything."
8835 #: ../fish/guestfish-actions.pod:1088 ../src/guestfs-actions.pod:1813
8837 "This automatically calls L<sync(2)> before the operation, so that the "
8838 "maximum guest memory is freed."
8842 #: ../fish/guestfish-actions.pod:1091
8847 #: ../fish/guestfish-actions.pod:1093
8855 #: ../fish/guestfish-actions.pod:1095 ../src/guestfs-actions.pod:1826
8857 "This command runs the C<du -s> command to estimate file space usage for "
8862 #: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1829
8864 "C<path> can be a file or a directory. If C<path> is a directory then the "
8865 "estimate includes the contents of the directory and all subdirectories "
8870 #: ../fish/guestfish-actions.pod:1102 ../src/guestfs-actions.pod:1833
8872 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8876 #: ../fish/guestfish-actions.pod:1105
8881 #: ../fish/guestfish-actions.pod:1107
8884 " e2fsck-f device\n"
8889 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1851
8891 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8892 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8897 #: ../fish/guestfish-actions.pod:1113
8899 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8900 "should use L</fsck>."
8904 #: ../fish/guestfish-actions.pod:1116
8909 #: ../fish/guestfish-actions.pod:1118
8912 " echo-daemon 'words ...'\n"
8917 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1868
8919 "This command concatenates the list of C<words> passed with single spaces "
8920 "between them and returns the resulting string."
8924 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1871
8925 msgid "You can use this command to test the connection through to the daemon."
8929 #: ../fish/guestfish-actions.pod:1125
8930 msgid "See also L</ping-daemon>."
8934 #: ../fish/guestfish-actions.pod:1127
8939 #: ../fish/guestfish-actions.pod:1129
8942 " egrep regex path\n"
8947 #: ../fish/guestfish-actions.pod:1131 ../src/guestfs-actions.pod:1887
8949 "This calls the external C<egrep> program and returns the matching lines."
8953 #: ../fish/guestfish-actions.pod:1137
8958 #: ../fish/guestfish-actions.pod:1139
8961 " egrepi regex path\n"
8966 #: ../fish/guestfish-actions.pod:1141 ../src/guestfs-actions.pod:1906
8968 "This calls the external C<egrep -i> program and returns the matching lines."
8972 #: ../fish/guestfish-actions.pod:1147
8977 #: ../fish/guestfish-actions.pod:1149
8980 " equal file1 file2\n"
8985 #: ../fish/guestfish-actions.pod:1151 ../src/guestfs-actions.pod:1925
8987 "This compares the two files C<file1> and C<file2> and returns true if their "
8988 "content is exactly equal, or false otherwise."
8992 #: ../fish/guestfish-actions.pod:1154 ../src/guestfs-actions.pod:1928
8993 msgid "The external L<cmp(1)> program is used for the comparison."
8997 #: ../fish/guestfish-actions.pod:1156
9002 #: ../fish/guestfish-actions.pod:1158
9010 #: ../fish/guestfish-actions.pod:1160 ../src/guestfs-actions.pod:1940
9012 "This returns C<true> if and only if there is a file, directory (or anything) "
9013 "with the given C<path> name."
9017 #: ../fish/guestfish-actions.pod:1163
9018 msgid "See also L</is-file>, L</is-dir>, L</stat>."
9022 #: ../fish/guestfish-actions.pod:1165
9027 #: ../fish/guestfish-actions.pod:1167
9030 " fallocate path len\n"
9035 #: ../fish/guestfish-actions.pod:1169 ../fish/guestfish-actions.pod:1188
9036 #: ../src/guestfs-actions.pod:1963 ../src/guestfs-actions.pod:1982
9038 "This command preallocates a file (containing zero bytes) named C<path> of "
9039 "size C<len> bytes. If the file exists already, it is overwritten."
9043 #: ../fish/guestfish-actions.pod:1173 ../src/guestfs-actions.pod:1967
9045 "Do not confuse this with the guestfish-specific C<alloc> command which "
9046 "allocates a file in the host and attaches it as a device."
9050 #: ../fish/guestfish-actions.pod:1177
9052 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
9057 #: ../fish/guestfish-actions.pod:1184
9062 #: ../fish/guestfish-actions.pod:1186
9065 " fallocate64 path len\n"
9070 #: ../fish/guestfish-actions.pod:1192
9072 "Note that this call allocates disk blocks for the file. To create a sparse "
9073 "file use L</truncate-size> instead."
9077 #: ../fish/guestfish-actions.pod:1195
9079 "The deprecated call L</fallocate> does the same, but owing to an oversight "
9080 "it only allowed 30 bit lengths to be specified, effectively limiting the "
9081 "maximum size of files created through that call to 1GB."
9085 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:1994
9087 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
9088 "commands which create a file in the host and attach it as a device."
9092 #: ../fish/guestfish-actions.pod:1204
9097 #: ../fish/guestfish-actions.pod:1206
9100 " fgrep pattern path\n"
9105 #: ../fish/guestfish-actions.pod:1208 ../src/guestfs-actions.pod:2009
9107 "This calls the external C<fgrep> program and returns the matching lines."
9111 #: ../fish/guestfish-actions.pod:1214
9116 #: ../fish/guestfish-actions.pod:1216
9119 " fgrepi pattern path\n"
9124 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2028
9126 "This calls the external C<fgrep -i> program and returns the matching lines."
9130 #: ../fish/guestfish-actions.pod:1224
9135 #: ../fish/guestfish-actions.pod:1226
9143 #: ../fish/guestfish-actions.pod:1228 ../src/guestfs-actions.pod:2046
9145 "This call uses the standard L<file(1)> command to determine the type or "
9146 "contents of the file."
9150 #: ../fish/guestfish-actions.pod:1231 ../src/guestfs-actions.pod:2049
9152 "This call will also transparently look inside various types of compressed "
9157 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2052
9159 "The exact command which runs is C<file -zb path>. Note in particular that "
9160 "the filename is not prepended to the output (the I<-b> option)."
9164 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2056
9166 "The output depends on the output of the underlying L<file(1)> command and it "
9167 "can change in future in ways beyond our control. In other words, the output "
9168 "is not guaranteed by the ABI."
9172 #: ../fish/guestfish-actions.pod:1242
9174 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
9175 "(etc), L</is-zero>."
9179 #: ../fish/guestfish-actions.pod:1245
9180 msgid "file-architecture"
9184 #: ../fish/guestfish-actions.pod:1247
9187 " file-architecture filename\n"
9192 #: ../fish/guestfish-actions.pod:1249 ../src/guestfs-actions.pod:2074
9194 "This detects the architecture of the binary C<filename>, and returns it if "
9199 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2077
9200 msgid "Currently defined architectures are:"
9204 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2081
9209 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2083
9211 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
9212 "irrespective of the precise processor requirements of the binary."
9216 #: ../fish/guestfish-actions.pod:1261 ../src/guestfs-actions.pod:2086
9221 #: ../fish/guestfish-actions.pod:1263 ../src/guestfs-actions.pod:2088
9222 msgid "64 bit x86-64."
9226 #: ../fish/guestfish-actions.pod:1265 ../src/guestfs-actions.pod:2090
9231 #: ../fish/guestfish-actions.pod:1267 ../src/guestfs-actions.pod:2092
9232 msgid "32 bit SPARC."
9236 #: ../fish/guestfish-actions.pod:1269 ../src/guestfs-actions.pod:2094
9241 #: ../fish/guestfish-actions.pod:1271 ../src/guestfs-actions.pod:2096
9242 msgid "64 bit SPARC V9 and above."
9246 #: ../fish/guestfish-actions.pod:1273 ../src/guestfs-actions.pod:2098
9251 #: ../fish/guestfish-actions.pod:1275 ../src/guestfs-actions.pod:2100
9252 msgid "Intel Itanium."
9256 #: ../fish/guestfish-actions.pod:1277 ../src/guestfs-actions.pod:2102
9261 #: ../fish/guestfish-actions.pod:1279 ../src/guestfs-actions.pod:2104
9262 msgid "32 bit Power PC."
9266 #: ../fish/guestfish-actions.pod:1281 ../src/guestfs-actions.pod:2106
9271 #: ../fish/guestfish-actions.pod:1283 ../src/guestfs-actions.pod:2108
9272 msgid "64 bit Power PC."
9276 #: ../fish/guestfish-actions.pod:1287 ../src/guestfs-actions.pod:2112
9277 msgid "Libguestfs may return other architecture strings in future."
9281 #: ../fish/guestfish-actions.pod:1289 ../src/guestfs-actions.pod:2114
9282 msgid "The function works on at least the following types of files:"
9286 #: ../fish/guestfish-actions.pod:1295 ../src/guestfs-actions.pod:2120
9287 msgid "many types of Un*x and Linux binary"
9291 #: ../fish/guestfish-actions.pod:1299 ../src/guestfs-actions.pod:2124
9292 msgid "many types of Un*x and Linux shared library"
9296 #: ../fish/guestfish-actions.pod:1303 ../src/guestfs-actions.pod:2128
9297 msgid "Windows Win32 and Win64 binaries"
9301 #: ../fish/guestfish-actions.pod:1307 ../src/guestfs-actions.pod:2132
9302 msgid "Windows Win32 and Win64 DLLs"
9306 #: ../fish/guestfish-actions.pod:1309 ../src/guestfs-actions.pod:2134
9307 msgid "Win32 binaries and DLLs return C<i386>."
9311 #: ../fish/guestfish-actions.pod:1311 ../src/guestfs-actions.pod:2136
9312 msgid "Win64 binaries and DLLs return C<x86_64>."
9316 #: ../fish/guestfish-actions.pod:1315 ../src/guestfs-actions.pod:2140
9317 msgid "Linux kernel modules"
9321 #: ../fish/guestfish-actions.pod:1319 ../src/guestfs-actions.pod:2144
9322 msgid "Linux new-style initrd images"
9326 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2148
9327 msgid "some non-x86 Linux vmlinuz kernels"
9331 #: ../fish/guestfish-actions.pod:1327 ../src/guestfs-actions.pod:2152
9332 msgid "What it can't do currently:"
9336 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2158
9337 msgid "static libraries (libfoo.a)"
9341 #: ../fish/guestfish-actions.pod:1337 ../src/guestfs-actions.pod:2162
9342 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9346 #: ../fish/guestfish-actions.pod:1341 ../src/guestfs-actions.pod:2166
9347 msgid "x86 Linux vmlinuz kernels"
9351 #: ../fish/guestfish-actions.pod:1343 ../src/guestfs-actions.pod:2168
9353 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9354 "compressed code, and are horribly hard to unpack. If you want to find the "
9355 "architecture of a kernel, use the architecture of the associated initrd or "
9356 "kernel module(s) instead."
9360 #: ../fish/guestfish-actions.pod:1350
9365 #: ../fish/guestfish-actions.pod:1352
9373 #: ../fish/guestfish-actions.pod:1354 ../src/guestfs-actions.pod:2186
9374 msgid "This command returns the size of C<file> in bytes."
9378 #: ../fish/guestfish-actions.pod:1356
9380 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
9381 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
9385 #: ../fish/guestfish-actions.pod:1360
9390 #: ../fish/guestfish-actions.pod:1362
9393 " fill c len path\n"
9398 #: ../fish/guestfish-actions.pod:1364 ../src/guestfs-actions.pod:2204
9400 "This command creates a new file called C<path>. The initial content of the "
9401 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9406 #: ../fish/guestfish-actions.pod:1368
9408 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9409 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
9414 #: ../fish/guestfish-actions.pod:1373
9415 msgid "fill-pattern"
9419 #: ../fish/guestfish-actions.pod:1375
9422 " fill-pattern pattern len path\n"
9427 #: ../fish/guestfish-actions.pod:1377
9429 "This function is like L</fill> except that it creates a new file of length "
9430 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
9431 "is truncated if necessary to ensure the length of the file is exactly C<len> "
9436 #: ../fish/guestfish-actions.pod:1382
9441 #: ../fish/guestfish-actions.pod:1384
9449 #: ../fish/guestfish-actions.pod:1386 ../src/guestfs-actions.pod:2250
9451 "This command lists out all files and directories, recursively, starting at "
9452 "C<directory>. It is essentially equivalent to running the shell command "
9453 "C<find directory -print> but some post-processing happens on the output, "
9458 #: ../fish/guestfish-actions.pod:1391 ../src/guestfs-actions.pod:2255
9460 "This returns a list of strings I<without any prefix>. Thus if the directory "
9465 #: ../fish/guestfish-actions.pod:1394 ../src/guestfs-actions.pod:2258
9475 #: ../fish/guestfish-actions.pod:1398
9476 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
9480 #: ../fish/guestfish-actions.pod:1401 ../src/guestfs-actions.pod:2265
9491 #: ../fish/guestfish-actions.pod:1406 ../src/guestfs-actions.pod:2270
9492 msgid "If C<directory> is not a directory, then this command returns an error."
9496 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2273
9497 msgid "The returned list is sorted."
9501 #: ../fish/guestfish-actions.pod:1411
9502 msgid "See also L</find0>."
9506 #: ../fish/guestfish-actions.pod:1416
9511 #: ../fish/guestfish-actions.pod:1418
9514 " find0 directory (files|-)\n"
9519 #: ../fish/guestfish-actions.pod:1420 ../src/guestfs-actions.pod:2293
9521 "This command lists out all files and directories, recursively, starting at "
9522 "C<directory>, placing the resulting list in the external file called "
9527 #: ../fish/guestfish-actions.pod:1424
9529 "This command works the same way as L</find> with the following exceptions:"
9533 #: ../fish/guestfish-actions.pod:1431 ../src/guestfs-actions.pod:2304
9534 msgid "The resulting list is written to an external file."
9538 #: ../fish/guestfish-actions.pod:1435 ../src/guestfs-actions.pod:2308
9540 "Items (filenames) in the result are separated by C<\\0> characters. See "
9541 "L<find(1)> option I<-print0>."
9545 #: ../fish/guestfish-actions.pod:1440 ../src/guestfs-actions.pod:2313
9546 msgid "This command is not limited in the number of names that it can return."
9550 #: ../fish/guestfish-actions.pod:1445 ../src/guestfs-actions.pod:2318
9551 msgid "The result list is not sorted."
9555 #: ../fish/guestfish-actions.pod:1451
9556 msgid "findfs-label"
9560 #: ../fish/guestfish-actions.pod:1453
9563 " findfs-label label\n"
9568 #: ../fish/guestfish-actions.pod:1455 ../src/guestfs-actions.pod:2332
9570 "This command searches the filesystems and returns the one which has the "
9571 "given label. An error is returned if no such filesystem can be found."
9575 #: ../fish/guestfish-actions.pod:1459
9576 msgid "To find the label of a filesystem, use L</vfs-label>."
9580 #: ../fish/guestfish-actions.pod:1461
9585 #: ../fish/guestfish-actions.pod:1463
9588 " findfs-uuid uuid\n"
9593 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
9595 "This command searches the filesystems and returns the one which has the "
9596 "given UUID. An error is returned if no such filesystem can be found."
9600 #: ../fish/guestfish-actions.pod:1469
9601 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
9605 #: ../fish/guestfish-actions.pod:1471
9610 #: ../fish/guestfish-actions.pod:1473
9613 " fsck fstype device\n"
9618 #: ../fish/guestfish-actions.pod:1475 ../src/guestfs-actions.pod:2367
9620 "This runs the filesystem checker (fsck) on C<device> which should have "
9621 "filesystem type C<fstype>."
9625 #: ../fish/guestfish-actions.pod:1478 ../src/guestfs-actions.pod:2370
9627 "The returned integer is the status. See L<fsck(8)> for the list of status "
9628 "codes from C<fsck>."
9632 #: ../fish/guestfish-actions.pod:1487 ../src/guestfs-actions.pod:2379
9633 msgid "Multiple status codes can be summed together."
9637 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2383
9639 "A non-zero return code can mean \"success\", for example if errors have been "
9640 "corrected on the filesystem."
9644 #: ../fish/guestfish-actions.pod:1496 ../src/guestfs-actions.pod:2388
9645 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9649 #: ../fish/guestfish-actions.pod:1501 ../src/guestfs-actions.pod:2393
9651 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9655 #: ../fish/guestfish-actions.pod:1503
9660 #: ../fish/guestfish-actions.pod:1505
9668 #: ../fish/guestfish-actions.pod:1507 ../src/guestfs-actions.pod:2404
9670 "Return the additional kernel options which are added to the guest kernel "
9675 #: ../fish/guestfish-actions.pod:1510 ../src/guestfs-actions.pod:2407
9676 msgid "If C<NULL> then no options are added."
9680 #: ../fish/guestfish-actions.pod:1512
9681 msgid "get-attach-method"
9685 #: ../fish/guestfish-actions.pod:1514
9688 " get-attach-method\n"
9693 #: ../fish/guestfish-actions.pod:1516
9694 msgid "Return the current attach method. See L</set-attach-method>."
9698 #: ../fish/guestfish-actions.pod:1518
9699 msgid "get-autosync"
9703 #: ../fish/guestfish-actions.pod:1520
9711 #: ../fish/guestfish-actions.pod:1522 ../src/guestfs-actions.pod:2432
9712 msgid "Get the autosync flag."
9716 #: ../fish/guestfish-actions.pod:1524
9721 #: ../fish/guestfish-actions.pod:1526
9729 #: ../fish/guestfish-actions.pod:1528 ../src/guestfs-actions.pod:2443
9730 msgid "Return the direct appliance mode flag."
9734 #: ../fish/guestfish-actions.pod:1530
9739 #: ../fish/guestfish-actions.pod:1532
9742 " get-e2label device\n"
9747 #: ../fish/guestfish-actions.pod:1534 ../src/guestfs-actions.pod:2462
9749 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9753 #: ../fish/guestfish-actions.pod:1537
9755 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
9760 #: ../fish/guestfish-actions.pod:1544
9765 #: ../fish/guestfish-actions.pod:1546
9768 " get-e2uuid device\n"
9773 #: ../fish/guestfish-actions.pod:1548 ../src/guestfs-actions.pod:2483
9775 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9779 #: ../fish/guestfish-actions.pod:1551
9781 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9786 #: ../fish/guestfish-actions.pod:1558
9791 #: ../fish/guestfish-actions.pod:1560
9799 #: ../fish/guestfish-actions.pod:1562 ../src/guestfs-actions.pod:2496
9801 "This gets the memory size in megabytes allocated to the qemu subprocess."
9805 #: ../fish/guestfish-actions.pod:1565
9807 "If L</set-memsize> was not called on this handle, and if "
9808 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9809 "value for memsize."
9813 #: ../fish/guestfish-actions.pod:1569 ../fish/guestfish-actions.pod:1626
9814 #: ../fish/guestfish-actions.pod:4499 ../fish/guestfish-actions.pod:4601
9815 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2595
9816 #: ../src/guestfs-actions.pod:6960 ../src/guestfs-actions.pod:7086
9818 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9822 #: ../fish/guestfish-actions.pod:1572
9827 #: ../fish/guestfish-actions.pod:1574
9835 #: ../fish/guestfish-actions.pod:1576 ../src/guestfs-actions.pod:2515
9836 msgid "This returns the enable network flag."
9840 #: ../fish/guestfish-actions.pod:1578
9845 #: ../fish/guestfish-actions.pod:1580
9853 #: ../fish/guestfish-actions.pod:1582 ../src/guestfs-actions.pod:2526
9854 msgid "Return the current search path."
9858 #: ../fish/guestfish-actions.pod:1584 ../src/guestfs-actions.pod:2528
9860 "This is always non-NULL. If it wasn't set already, then this will return "
9865 #: ../fish/guestfish-actions.pod:1587
9870 #: ../fish/guestfish-actions.pod:1589
9878 #: ../fish/guestfish-actions.pod:1591 ../src/guestfs-actions.pod:2541
9879 msgid "This returns the process group flag."
9883 #: ../fish/guestfish-actions.pod:1593
9888 #: ../fish/guestfish-actions.pod:1595
9893 #: ../fish/guestfish-actions.pod:1597
9901 #: ../fish/guestfish-actions.pod:1599 ../src/guestfs-actions.pod:2552
9903 "Return the process ID of the qemu subprocess. If there is no qemu "
9904 "subprocess, then this will return an error."
9908 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2555
9909 msgid "This is an internal call used for debugging and testing."
9913 #: ../fish/guestfish-actions.pod:1604
9918 #: ../fish/guestfish-actions.pod:1606
9926 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2566
9927 msgid "Return the current qemu binary."
9931 #: ../fish/guestfish-actions.pod:1610 ../src/guestfs-actions.pod:2568
9933 "This is always non-NULL. If it wasn't set already, then this will return "
9934 "the default qemu binary name."
9938 #: ../fish/guestfish-actions.pod:1613
9939 msgid "get-recovery-proc"
9943 #: ../fish/guestfish-actions.pod:1615
9946 " get-recovery-proc\n"
9951 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2581
9952 msgid "Return the recovery process enabled flag."
9956 #: ../fish/guestfish-actions.pod:1619
9961 #: ../fish/guestfish-actions.pod:1621
9969 #: ../fish/guestfish-actions.pod:1623
9971 "This returns the current setting of the selinux flag which is passed to the "
9972 "appliance at boot time. See L</set-selinux>."
9976 #: ../fish/guestfish-actions.pod:1629
9981 #: ../fish/guestfish-actions.pod:1631
9989 #: ../fish/guestfish-actions.pod:1633 ../src/guestfs-actions.pod:2607
9990 msgid "This returns the number of virtual CPUs assigned to the appliance."
9994 #: ../fish/guestfish-actions.pod:1635
9999 #: ../fish/guestfish-actions.pod:1637
10007 #: ../fish/guestfish-actions.pod:1639 ../src/guestfs-actions.pod:2618
10009 "This returns the current state as an opaque integer. This is only useful "
10010 "for printing debug and internal error messages."
10014 #: ../fish/guestfish-actions.pod:1642 ../fish/guestfish-actions.pod:2605
10015 #: ../fish/guestfish-actions.pod:2623 ../fish/guestfish-actions.pod:2661
10016 #: ../fish/guestfish-actions.pod:2677 ../src/guestfs-actions.pod:2621
10017 #: ../src/guestfs-actions.pod:3944 ../src/guestfs-actions.pod:3973
10018 #: ../src/guestfs-actions.pod:4034 ../src/guestfs-actions.pod:4061
10019 msgid "For more information on states, see L<guestfs(3)>."
10023 #: ../fish/guestfish-actions.pod:1644
10028 #: ../fish/guestfish-actions.pod:1646
10036 #: ../fish/guestfish-actions.pod:1648 ../src/guestfs-actions.pod:2632
10037 msgid "Return the command trace flag."
10041 #: ../fish/guestfish-actions.pod:1650
10046 #: ../fish/guestfish-actions.pod:1652
10054 #: ../fish/guestfish-actions.pod:1654
10056 "Return the current umask. By default the umask is C<022> unless it has been "
10057 "set by calling L</umask>."
10061 #: ../fish/guestfish-actions.pod:1657
10062 msgid "get-verbose"
10066 #: ../fish/guestfish-actions.pod:1659
10074 #: ../fish/guestfish-actions.pod:1661 ../src/guestfs-actions.pod:2655
10075 msgid "This returns the verbose messages flag."
10079 #: ../fish/guestfish-actions.pod:1663
10084 #: ../fish/guestfish-actions.pod:1665
10092 #: ../fish/guestfish-actions.pod:1667 ../src/guestfs-actions.pod:2666
10093 msgid "This gets the SELinux security context of the daemon."
10097 #: ../fish/guestfish-actions.pod:1669
10098 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
10102 #: ../fish/guestfish-actions.pod:1672
10107 #: ../fish/guestfish-actions.pod:1674
10110 " getxattr path name\n"
10115 #: ../fish/guestfish-actions.pod:1676
10117 "Get a single extended attribute from file C<path> named C<name>. This call "
10118 "follows symlinks. If you want to lookup an extended attribute for the "
10119 "symlink itself, use L</lgetxattr>."
10123 #: ../fish/guestfish-actions.pod:1680 ../fish/guestfish-actions.pod:2750
10125 "Normally it is better to get all extended attributes from a file in one go "
10126 "by calling L</getxattrs>. However some Linux filesystem implementations are "
10127 "buggy and do not provide a way to list out attributes. For these "
10128 "filesystems (notably ntfs-3g) you have to know the names of the extended "
10129 "attributes you want in advance and call this function."
10133 #: ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:2757
10134 #: ../src/guestfs-actions.pod:2695 ../src/guestfs-actions.pod:4194
10136 "Extended attribute values are blobs of binary data. If there is no extended "
10137 "attribute named C<name>, this returns an error."
10141 #: ../fish/guestfish-actions.pod:1690
10142 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
10146 #: ../fish/guestfish-actions.pod:1692
10151 #: ../fish/guestfish-actions.pod:1694
10154 " getxattrs path\n"
10159 #: ../fish/guestfish-actions.pod:1696 ../src/guestfs-actions.pod:2712
10161 "This call lists the extended attributes of the file or directory C<path>."
10165 #: ../fish/guestfish-actions.pod:1699 ../src/guestfs-actions.pod:2715
10167 "At the system call level, this is a combination of the L<listxattr(2)> and "
10168 "L<getxattr(2)> calls."
10172 #: ../fish/guestfish-actions.pod:1702
10173 msgid "See also: L</lgetxattrs>, L<attr(5)>."
10177 #: ../fish/guestfish-actions.pod:1704
10178 msgid "glob-expand"
10182 #: ../fish/guestfish-actions.pod:1706
10185 " glob-expand pattern\n"
10190 #: ../fish/guestfish-actions.pod:1708 ../src/guestfs-actions.pod:2732
10192 "This command searches for all the pathnames matching C<pattern> according to "
10193 "the wildcard expansion rules used by the shell."
10197 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2736
10199 "If no paths match, then this returns an empty list (note: not an error)."
10203 #: ../fish/guestfish-actions.pod:1715 ../src/guestfs-actions.pod:2739
10205 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
10206 "GLOB_BRACE>. See that manual page for more details."
10210 #: ../fish/guestfish-actions.pod:1719
10215 #: ../fish/guestfish-actions.pod:1721
10218 " grep regex path\n"
10223 #: ../fish/guestfish-actions.pod:1723 ../src/guestfs-actions.pod:2756
10224 msgid "This calls the external C<grep> program and returns the matching lines."
10228 #: ../fish/guestfish-actions.pod:1729
10233 #: ../fish/guestfish-actions.pod:1731
10236 " grepi regex path\n"
10241 #: ../fish/guestfish-actions.pod:1733 ../src/guestfs-actions.pod:2775
10243 "This calls the external C<grep -i> program and returns the matching lines."
10247 #: ../fish/guestfish-actions.pod:1739
10248 msgid "grub-install"
10252 #: ../fish/guestfish-actions.pod:1741
10255 " grub-install root device\n"
10260 #: ../fish/guestfish-actions.pod:1743 ../src/guestfs-actions.pod:2794
10262 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
10263 "with the root directory being C<root>."
10267 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2803
10269 "There is currently no way in the API to install grub2, which is used by most "
10270 "modern Linux guests. It is possible to run the grub2 command from the "
10271 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
10275 #: ../fish/guestfish-actions.pod:1759 ../src/guestfs-actions.pod:2810
10277 "This uses C<grub-install> from the host. Unfortunately grub is not always "
10278 "compatible with itself, so this only works in rather narrow circumstances. "
10279 "Careful testing with each guest version is advisable."
10283 #: ../fish/guestfish-actions.pod:1766 ../src/guestfs-actions.pod:2817
10285 "If grub-install reports the error \"No suitable drive was found in the "
10286 "generated device map.\" it may be that you need to create a C</boot/grub/"
10287 "device.map> file first that contains the mapping between grub device names "
10288 "and Linux device names. It is usually sufficient to create a file "
10293 #: ../fish/guestfish-actions.pod:1773 ../src/guestfs-actions.pod:2824
10296 " (hd0) /dev/vda\n"
10301 #: ../fish/guestfish-actions.pod:1775 ../src/guestfs-actions.pod:2826
10302 msgid "replacing C</dev/vda> with the name of the installation device."
10306 #: ../fish/guestfish-actions.pod:1779
10311 #: ../fish/guestfish-actions.pod:1781
10319 #: ../fish/guestfish-actions.pod:1783 ../src/guestfs-actions.pod:2840
10321 "This command returns up to the first 10 lines of a file as a list of strings."
10325 #: ../fish/guestfish-actions.pod:1789
10330 #: ../fish/guestfish-actions.pod:1791
10333 " head-n nrlines path\n"
10338 #: ../fish/guestfish-actions.pod:1793 ../src/guestfs-actions.pod:2859
10340 "If the parameter C<nrlines> is a positive number, this returns the first "
10341 "C<nrlines> lines of the file C<path>."
10345 #: ../fish/guestfish-actions.pod:1796 ../src/guestfs-actions.pod:2862
10347 "If the parameter C<nrlines> is a negative number, this returns lines from "
10348 "the file C<path>, excluding the last C<nrlines> lines."
10352 #: ../fish/guestfish-actions.pod:1799 ../fish/guestfish-actions.pod:4982
10353 #: ../src/guestfs-actions.pod:2865 ../src/guestfs-actions.pod:7665
10354 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
10358 #: ../fish/guestfish-actions.pod:1804
10363 #: ../fish/guestfish-actions.pod:1806
10371 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2882
10373 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
10374 "readable, canonical hex dump of the file."
10378 #: ../fish/guestfish-actions.pod:1814
10383 #: ../fish/guestfish-actions.pod:1816
10386 " initrd-cat initrdpath filename\n"
10391 #: ../fish/guestfish-actions.pod:1818 ../src/guestfs-actions.pod:2901
10393 "This command unpacks the file C<filename> from the initrd file called "
10394 "C<initrdpath>. The filename must be given I<without> the initial C</> "
10399 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2905
10401 "For example, in guestfish you could use the following command to examine the "
10402 "boot script (usually called C</init>) contained in a Linux initrd or "
10407 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2909
10410 " initrd-cat /boot/initrd-<version>.img init\n"
10415 #: ../fish/guestfish-actions.pod:1828
10416 msgid "See also L</initrd-list>."
10420 #: ../fish/guestfish-actions.pod:1833
10421 msgid "initrd-list"
10425 #: ../fish/guestfish-actions.pod:1835
10428 " initrd-list path\n"
10433 #: ../fish/guestfish-actions.pod:1837 ../src/guestfs-actions.pod:2928
10434 msgid "This command lists out files contained in an initrd."
10438 #: ../fish/guestfish-actions.pod:1839 ../src/guestfs-actions.pod:2930
10440 "The files are listed without any initial C</> character. The files are "
10441 "listed in the order they appear (not necessarily alphabetical). Directory "
10442 "names are listed as separate items."
10446 #: ../fish/guestfish-actions.pod:1843 ../src/guestfs-actions.pod:2934
10448 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
10449 "initrd. We I<only> support the newer initramfs format (compressed cpio "
10454 #: ../fish/guestfish-actions.pod:1847
10455 msgid "inotify-add-watch"
10459 #: ../fish/guestfish-actions.pod:1849
10462 " inotify-add-watch path mask\n"
10467 #: ../fish/guestfish-actions.pod:1851 ../src/guestfs-actions.pod:2951
10468 msgid "Watch C<path> for the events listed in C<mask>."
10472 #: ../fish/guestfish-actions.pod:1853 ../src/guestfs-actions.pod:2953
10474 "Note that if C<path> is a directory then events within that directory are "
10475 "watched, but this does I<not> happen recursively (in subdirectories)."
10479 #: ../fish/guestfish-actions.pod:1857 ../src/guestfs-actions.pod:2957
10481 "Note for non-C or non-Linux callers: the inotify events are defined by the "
10482 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
10486 #: ../fish/guestfish-actions.pod:1861
10487 msgid "inotify-close"
10491 #: ../fish/guestfish-actions.pod:1863
10499 #: ../fish/guestfish-actions.pod:1865 ../src/guestfs-actions.pod:2970
10501 "This closes the inotify handle which was previously opened by inotify_init. "
10502 "It removes all watches, throws away any pending events, and deallocates all "
10507 #: ../fish/guestfish-actions.pod:1869
10508 msgid "inotify-files"
10512 #: ../fish/guestfish-actions.pod:1871
10520 #: ../fish/guestfish-actions.pod:1873
10522 "This function is a helpful wrapper around L</inotify-read> which just "
10523 "returns a list of pathnames of objects that were touched. The returned "
10524 "pathnames are sorted and deduplicated."
10528 #: ../fish/guestfish-actions.pod:1877
10529 msgid "inotify-init"
10533 #: ../fish/guestfish-actions.pod:1879
10536 " inotify-init maxevents\n"
10541 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2999
10543 "This command creates a new inotify handle. The inotify subsystem can be "
10544 "used to notify events which happen to objects in the guest filesystem."
10548 #: ../fish/guestfish-actions.pod:1885
10550 "C<maxevents> is the maximum number of events which will be queued up between "
10551 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
10552 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
10553 "default was 16384 events. Beyond this limit, the kernel throws away events, "
10554 "but records the fact that it threw them away by setting a flag "
10555 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
10559 #: ../fish/guestfish-actions.pod:1895
10561 "Before any events are generated, you have to add some watches to the "
10562 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
10563 "L</inotify-watch-all>."
10567 #: ../fish/guestfish-actions.pod:1901
10569 "Queued up events should be read periodically by calling L</inotify-read> (or "
10570 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
10571 "If you don't read the events out often enough then you risk the internal "
10572 "queue overflowing."
10576 #: ../fish/guestfish-actions.pod:1908
10578 "The handle should be closed after use by calling L</inotify-close>. This "
10579 "also removes any watches automatically."
10583 #: ../fish/guestfish-actions.pod:1912 ../src/guestfs-actions.pod:3030
10585 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
10586 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
10587 "that there is one global inotify handle per libguestfs instance."
10591 #: ../fish/guestfish-actions.pod:1917
10592 msgid "inotify-read"
10596 #: ../fish/guestfish-actions.pod:1919
10604 #: ../fish/guestfish-actions.pod:1921 ../src/guestfs-actions.pod:3044
10606 "Return the complete queue of events that have happened since the previous "
10611 #: ../fish/guestfish-actions.pod:1924 ../src/guestfs-actions.pod:3047
10612 msgid "If no events have happened, this returns an empty list."
10616 #: ../fish/guestfish-actions.pod:1926 ../src/guestfs-actions.pod:3049
10618 "I<Note>: In order to make sure that all events have been read, you must call "
10619 "this function repeatedly until it returns an empty list. The reason is that "
10620 "the call will read events up to the maximum appliance-to-host message size "
10621 "and leave remaining events in the queue."
10625 #: ../fish/guestfish-actions.pod:1932
10626 msgid "inotify-rm-watch"
10630 #: ../fish/guestfish-actions.pod:1934
10633 " inotify-rm-watch wd\n"
10638 #: ../fish/guestfish-actions.pod:1936
10639 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
10643 #: ../fish/guestfish-actions.pod:1939
10644 msgid "inspect-get-arch"
10648 #: ../fish/guestfish-actions.pod:1941
10651 " inspect-get-arch root\n"
10656 #: ../fish/guestfish-actions.pod:1943
10658 "This returns the architecture of the inspected operating system. The "
10659 "possible return values are listed under L</file-architecture>."
10663 #: ../fish/guestfish-actions.pod:1947 ../src/guestfs-actions.pod:3084
10665 "If the architecture could not be determined, then the string C<unknown> is "
10670 #: ../fish/guestfish-actions.pod:1950 ../fish/guestfish-actions.pod:2045
10671 #: ../fish/guestfish-actions.pod:2124 ../fish/guestfish-actions.pod:2136
10672 #: ../fish/guestfish-actions.pod:2220 ../fish/guestfish-actions.pod:2282
10673 #: ../fish/guestfish-actions.pod:2303 ../fish/guestfish-actions.pod:2317
10674 #: ../fish/guestfish-actions.pod:2357 ../fish/guestfish-actions.pod:2397
10675 #: ../fish/guestfish-actions.pod:2410 ../fish/guestfish-actions.pod:2423
10676 #: ../fish/guestfish-actions.pod:2433 ../fish/guestfish-actions.pod:2443
10677 #: ../fish/guestfish-actions.pod:2455 ../fish/guestfish-actions.pod:2551
10678 #: ../fish/guestfish-actions.pod:2585 ../src/guestfs-actions.pod:3087
10679 #: ../src/guestfs-actions.pod:3189 ../src/guestfs-actions.pod:3293
10680 #: ../src/guestfs-actions.pod:3312 ../src/guestfs-actions.pod:3443
10681 #: ../src/guestfs-actions.pod:3527 ../src/guestfs-actions.pod:3555
10682 #: ../src/guestfs-actions.pod:3576 ../src/guestfs-actions.pod:3629
10683 #: ../src/guestfs-actions.pod:3677 ../src/guestfs-actions.pod:3697
10684 #: ../src/guestfs-actions.pod:3717 ../src/guestfs-actions.pod:3734
10685 #: ../src/guestfs-actions.pod:3750 ../src/guestfs-actions.pod:3768
10686 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:3911
10687 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10691 #: ../fish/guestfish-actions.pod:1952
10692 msgid "inspect-get-distro"
10696 #: ../fish/guestfish-actions.pod:1954
10699 " inspect-get-distro root\n"
10704 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3100
10706 "This returns the distro (distribution) of the inspected operating system."
10710 #: ../fish/guestfish-actions.pod:1959 ../src/guestfs-actions.pod:3103
10711 msgid "Currently defined distros are:"
10715 #: ../fish/guestfish-actions.pod:1963 ../src/guestfs-actions.pod:3107
10716 msgid "\"archlinux\""
10720 #: ../fish/guestfish-actions.pod:1965 ../src/guestfs-actions.pod:3109
10721 msgid "Arch Linux."
10725 #: ../fish/guestfish-actions.pod:1967 ../src/guestfs-actions.pod:3111
10730 #: ../fish/guestfish-actions.pod:1969 ../src/guestfs-actions.pod:3113
10735 #: ../fish/guestfish-actions.pod:1971 ../src/guestfs-actions.pod:3115
10740 #: ../fish/guestfish-actions.pod:1973 ../src/guestfs-actions.pod:3117
10745 #: ../fish/guestfish-actions.pod:1975 ../src/guestfs-actions.pod:3119
10750 #: ../fish/guestfish-actions.pod:1977 ../src/guestfs-actions.pod:3121
10755 #: ../fish/guestfish-actions.pod:1979 ../src/guestfs-actions.pod:3123
10760 #: ../fish/guestfish-actions.pod:1981 ../src/guestfs-actions.pod:3125
10765 #: ../fish/guestfish-actions.pod:1983 ../src/guestfs-actions.pod:3127
10766 msgid "\"linuxmint\""
10770 #: ../fish/guestfish-actions.pod:1985 ../src/guestfs-actions.pod:3129
10771 msgid "Linux Mint."
10775 #: ../fish/guestfish-actions.pod:1987 ../src/guestfs-actions.pod:3131
10780 #: ../fish/guestfish-actions.pod:1989 ../src/guestfs-actions.pod:3133
10785 #: ../fish/guestfish-actions.pod:1991 ../src/guestfs-actions.pod:3135
10786 msgid "\"mandriva\""
10790 #: ../fish/guestfish-actions.pod:1993 ../src/guestfs-actions.pod:3137
10795 #: ../fish/guestfish-actions.pod:1995 ../src/guestfs-actions.pod:3139
10800 #: ../fish/guestfish-actions.pod:1997 ../src/guestfs-actions.pod:3141
10805 #: ../fish/guestfish-actions.pod:1999 ../src/guestfs-actions.pod:3143
10806 msgid "\"opensuse\""
10810 #: ../fish/guestfish-actions.pod:2001 ../src/guestfs-actions.pod:3145
10815 #: ../fish/guestfish-actions.pod:2003 ../src/guestfs-actions.pod:3147
10820 #: ../fish/guestfish-actions.pod:2005 ../src/guestfs-actions.pod:3149
10825 #: ../fish/guestfish-actions.pod:2007 ../src/guestfs-actions.pod:3151
10826 msgid "\"redhat-based\""
10830 #: ../fish/guestfish-actions.pod:2009 ../src/guestfs-actions.pod:3153
10831 msgid "Some Red Hat-derived distro."
10835 #: ../fish/guestfish-actions.pod:2011 ../src/guestfs-actions.pod:3155
10840 #: ../fish/guestfish-actions.pod:2013 ../src/guestfs-actions.pod:3157
10841 msgid "Red Hat Enterprise Linux."
10845 #: ../fish/guestfish-actions.pod:2015 ../src/guestfs-actions.pod:3159
10846 msgid "\"scientificlinux\""
10850 #: ../fish/guestfish-actions.pod:2017 ../src/guestfs-actions.pod:3161
10851 msgid "Scientific Linux."
10855 #: ../fish/guestfish-actions.pod:2019 ../src/guestfs-actions.pod:3163
10856 msgid "\"slackware\""
10860 #: ../fish/guestfish-actions.pod:2021 ../src/guestfs-actions.pod:3165
10865 #: ../fish/guestfish-actions.pod:2023 ../src/guestfs-actions.pod:3167
10866 msgid "\"ttylinux\""
10870 #: ../fish/guestfish-actions.pod:2025 ../src/guestfs-actions.pod:3169
10875 #: ../fish/guestfish-actions.pod:2027 ../src/guestfs-actions.pod:3171
10880 #: ../fish/guestfish-actions.pod:2029 ../src/guestfs-actions.pod:3173
10885 #: ../fish/guestfish-actions.pod:2031 ../fish/guestfish-actions.pod:2115
10886 #: ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3175
10887 #: ../src/guestfs-actions.pod:3284 ../src/guestfs-actions.pod:3668
10888 msgid "\"unknown\""
10892 #: ../fish/guestfish-actions.pod:2033 ../src/guestfs-actions.pod:3177
10893 msgid "The distro could not be determined."
10897 #: ../fish/guestfish-actions.pod:2035 ../fish/guestfish-actions.pod:2372
10898 #: ../src/guestfs-actions.pod:3179 ../src/guestfs-actions.pod:3652
10899 msgid "\"windows\""
10903 #: ../fish/guestfish-actions.pod:2037 ../src/guestfs-actions.pod:3181
10905 "Windows does not have distributions. This string is returned if the OS type "
10910 #: ../fish/guestfish-actions.pod:2042 ../fish/guestfish-actions.pod:2121
10911 #: ../fish/guestfish-actions.pod:2394 ../src/guestfs-actions.pod:3186
10912 #: ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3674
10914 "Future versions of libguestfs may return other strings here. The caller "
10915 "should be prepared to handle any string."
10919 #: ../fish/guestfish-actions.pod:2047
10920 msgid "inspect-get-drive-mappings"
10924 #: ../fish/guestfish-actions.pod:2049
10927 " inspect-get-drive-mappings root\n"
10932 #: ../fish/guestfish-actions.pod:2051 ../src/guestfs-actions.pod:3202
10934 "This call is useful for Windows which uses a primitive system of assigning "
10935 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10936 "Windows Registry to find out how disks/partitions are mapped to drive "
10937 "letters, and returns a hash table as in the example below:"
10941 #: ../fish/guestfish-actions.pod:2057 ../src/guestfs-actions.pod:3208
10944 " C => /dev/vda2\n"
10945 " E => /dev/vdb1\n"
10946 " F => /dev/vdc1\n"
10951 #: ../fish/guestfish-actions.pod:2061 ../src/guestfs-actions.pod:3212
10953 "Note that keys are drive letters. For Windows, the key is case insensitive "
10954 "and just contains the drive letter, without the customary colon separator "
10959 #: ../fish/guestfish-actions.pod:2065 ../src/guestfs-actions.pod:3216
10961 "In future we may support other operating systems that also used drive "
10962 "letters, but the keys for those might not be case insensitive and might be "
10963 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10968 #: ../fish/guestfish-actions.pod:2070 ../src/guestfs-actions.pod:3221
10970 "For Windows guests, currently only hard drive mappings are returned. "
10971 "Removable disks (eg. DVD-ROMs) are ignored."
10975 #: ../fish/guestfish-actions.pod:2073 ../src/guestfs-actions.pod:3224
10977 "For guests that do not use drive mappings, or if the drive mappings could "
10978 "not be determined, this returns an empty hash table."
10982 #: ../fish/guestfish-actions.pod:2076
10984 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10985 "get-mountpoints>, L</inspect-get-filesystems>."
10989 #: ../fish/guestfish-actions.pod:2080
10990 msgid "inspect-get-filesystems"
10994 #: ../fish/guestfish-actions.pod:2082
10997 " inspect-get-filesystems root\n"
11002 #: ../fish/guestfish-actions.pod:2084 ../src/guestfs-actions.pod:3245
11004 "This returns a list of all the filesystems that we think are associated with "
11005 "this operating system. This includes the root filesystem, other ordinary "
11006 "filesystems, and non-mounted devices like swap partitions."
11010 #: ../fish/guestfish-actions.pod:2089 ../src/guestfs-actions.pod:3250
11012 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
11013 "to be shared between operating systems."
11017 #: ../fish/guestfish-actions.pod:2092
11019 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11020 "get-mountpoints>."
11024 #: ../fish/guestfish-actions.pod:2095
11025 msgid "inspect-get-format"
11029 #: ../fish/guestfish-actions.pod:2097
11032 " inspect-get-format root\n"
11037 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3268
11039 "This returns the format of the inspected operating system. You can use it "
11040 "to detect install images, live CDs and similar."
11044 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3271
11045 msgid "Currently defined formats are:"
11049 #: ../fish/guestfish-actions.pod:2106 ../src/guestfs-actions.pod:3275
11050 msgid "\"installed\""
11054 #: ../fish/guestfish-actions.pod:2108 ../src/guestfs-actions.pod:3277
11055 msgid "This is an installed operating system."
11059 #: ../fish/guestfish-actions.pod:2110 ../src/guestfs-actions.pod:3279
11060 msgid "\"installer\""
11064 #: ../fish/guestfish-actions.pod:2112 ../src/guestfs-actions.pod:3281
11066 "The disk image being inspected is not an installed operating system, but a "
11067 "I<bootable> install disk, live CD, or similar."
11071 #: ../fish/guestfish-actions.pod:2117 ../src/guestfs-actions.pod:3286
11072 msgid "The format of this disk image is not known."
11076 #: ../fish/guestfish-actions.pod:2126
11077 msgid "inspect-get-hostname"
11081 #: ../fish/guestfish-actions.pod:2128
11084 " inspect-get-hostname root\n"
11089 #: ../fish/guestfish-actions.pod:2130 ../src/guestfs-actions.pod:3306
11091 "This function returns the hostname of the operating system as found by "
11092 "inspection of the guest's configuration files."
11096 #: ../fish/guestfish-actions.pod:2133 ../src/guestfs-actions.pod:3309
11098 "If the hostname could not be determined, then the string C<unknown> is "
11103 #: ../fish/guestfish-actions.pod:2138
11104 msgid "inspect-get-icon"
11108 #: ../fish/guestfish-actions.pod:2140
11111 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
11116 #: ../fish/guestfish-actions.pod:2142 ../src/guestfs-actions.pod:3335
11118 "This function returns an icon corresponding to the inspected operating "
11119 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
11120 "to PNG if necessary)."
11124 #: ../fish/guestfish-actions.pod:2146 ../src/guestfs-actions.pod:3339
11126 "If it was not possible to get an icon this function returns a zero-length "
11127 "(non-NULL) buffer. I<Callers must check for this case>."
11131 #: ../fish/guestfish-actions.pod:2149 ../src/guestfs-actions.pod:3342
11133 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
11134 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
11135 "this file will be returned. You can disable favicons by passing the "
11136 "optional C<favicon> boolean as false (default is true)."
11140 #: ../fish/guestfish-actions.pod:2155 ../src/guestfs-actions.pod:3348
11142 "If finding the favicon fails, then we look in other places in the guest for "
11147 #: ../fish/guestfish-actions.pod:2158 ../src/guestfs-actions.pod:3351
11149 "If the optional C<highquality> boolean is true then only high quality icons "
11150 "are returned, which means only icons of high resolution with an alpha "
11151 "channel. The default (false) is to return any icon we can, even if it is of "
11152 "substandard quality."
11156 #: ../fish/guestfish-actions.pod:2169 ../src/guestfs-actions.pod:3362
11158 "Unlike most other inspection API calls, the guest's disks must be mounted up "
11159 "before you call this, since it needs to read information from the guest "
11160 "filesystem during the call."
11164 #: ../fish/guestfish-actions.pod:2175 ../src/guestfs-actions.pod:3368
11166 "B<Security:> The icon data comes from the untrusted guest, and should be "
11167 "treated with caution. PNG files have been known to contain exploits. "
11168 "Ensure that libpng (or other relevant libraries) are fully up to date before "
11169 "trying to process or display the icon."
11173 #: ../fish/guestfish-actions.pod:2183 ../src/guestfs-actions.pod:3376
11175 "The PNG image returned can be any size. It might not be square. Libguestfs "
11176 "tries to return the largest, highest quality icon available. The "
11177 "application must scale the icon to the required size."
11181 #: ../fish/guestfish-actions.pod:2190 ../src/guestfs-actions.pod:3383
11183 "Extracting icons from Windows guests requires the external C<wrestool> "
11184 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
11185 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
11186 "installed separately."
11190 #: ../fish/guestfish-actions.pod:2197 ../src/guestfs-actions.pod:3390
11192 "Operating system icons are usually trademarks. Seek legal advice before "
11193 "using trademarks in applications."
11197 #: ../fish/guestfish-actions.pod:2204
11198 msgid "inspect-get-major-version"
11202 #: ../fish/guestfish-actions.pod:2206
11205 " inspect-get-major-version root\n"
11210 #: ../fish/guestfish-actions.pod:2208 ../src/guestfs-actions.pod:3431
11212 "This returns the major version number of the inspected operating system."
11216 #: ../fish/guestfish-actions.pod:2211 ../src/guestfs-actions.pod:3434
11218 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
11219 "popular public names used by the operating system. Notably the operating "
11220 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
11221 "1). You can find out the real versions corresponding to releases of Windows "
11222 "by consulting Wikipedia or MSDN."
11226 #: ../fish/guestfish-actions.pod:2218 ../fish/guestfish-actions.pod:2229
11227 #: ../src/guestfs-actions.pod:3441 ../src/guestfs-actions.pod:3458
11228 msgid "If the version could not be determined, then C<0> is returned."
11232 #: ../fish/guestfish-actions.pod:2222
11233 msgid "inspect-get-minor-version"
11237 #: ../fish/guestfish-actions.pod:2224
11240 " inspect-get-minor-version root\n"
11245 #: ../fish/guestfish-actions.pod:2226 ../src/guestfs-actions.pod:3455
11247 "This returns the minor version number of the inspected operating system."
11251 #: ../fish/guestfish-actions.pod:2231
11253 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11254 "get-major-version>."
11258 #: ../fish/guestfish-actions.pod:2234
11259 msgid "inspect-get-mountpoints"
11263 #: ../fish/guestfish-actions.pod:2236
11266 " inspect-get-mountpoints root\n"
11271 #: ../fish/guestfish-actions.pod:2238 ../src/guestfs-actions.pod:3473
11273 "This returns a hash of where we think the filesystems associated with this "
11274 "operating system should be mounted. Callers should note that this is at "
11275 "best an educated guess made by reading configuration files such as C</etc/"
11276 "fstab>. I<In particular note> that this may return filesystems which are "
11277 "non-existent or not mountable and callers should be prepared to handle or "
11278 "ignore failures if they try to mount them."
11282 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3482
11284 "Each element in the returned hashtable has a key which is the path of the "
11285 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
11286 "mounted there (eg. C</dev/sda1>)."
11290 #: ../fish/guestfish-actions.pod:2252 ../src/guestfs-actions.pod:3487
11292 "Non-mounted devices such as swap devices are I<not> returned in this list."
11296 #: ../fish/guestfish-actions.pod:2255
11298 "For operating systems like Windows which still use drive letters, this call "
11299 "will only return an entry for the first drive \"mounted on\" C</>. For "
11300 "information about the mapping of drive letters to partitions, see L</inspect-"
11301 "get-drive-mappings>."
11305 #: ../fish/guestfish-actions.pod:2261
11307 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11308 "get-filesystems>."
11312 #: ../fish/guestfish-actions.pod:2264
11313 msgid "inspect-get-package-format"
11317 #: ../fish/guestfish-actions.pod:2266
11320 " inspect-get-package-format root\n"
11325 #: ../fish/guestfish-actions.pod:2268
11327 "This function and L</inspect-get-package-management> return the package "
11328 "format and package management tool used by the inspected operating system. "
11329 "For example for Fedora these functions would return C<rpm> (package format) "
11330 "and C<yum> (package management)."
11334 #: ../fish/guestfish-actions.pod:2274 ../src/guestfs-actions.pod:3519
11336 "This returns the string C<unknown> if we could not determine the package "
11337 "format I<or> if the operating system does not have a real packaging system "
11342 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3523
11344 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
11345 "C<pkgsrc>. Future versions of libguestfs may return other strings."
11349 #: ../fish/guestfish-actions.pod:2284
11350 msgid "inspect-get-package-management"
11354 #: ../fish/guestfish-actions.pod:2286
11357 " inspect-get-package-management root\n"
11362 #: ../fish/guestfish-actions.pod:2288
11364 "L</inspect-get-package-format> and this function return the package format "
11365 "and package management tool used by the inspected operating system. For "
11366 "example for Fedora these functions would return C<rpm> (package format) and "
11367 "C<yum> (package management)."
11371 #: ../fish/guestfish-actions.pod:2294 ../src/guestfs-actions.pod:3546
11373 "This returns the string C<unknown> if we could not determine the package "
11374 "management tool I<or> if the operating system does not have a real packaging "
11375 "system (eg. Windows)."
11379 #: ../fish/guestfish-actions.pod:2298 ../src/guestfs-actions.pod:3550
11381 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
11382 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
11383 "versions of libguestfs may return other strings."
11387 #: ../fish/guestfish-actions.pod:2305
11388 msgid "inspect-get-product-name"
11392 #: ../fish/guestfish-actions.pod:2307
11395 " inspect-get-product-name root\n"
11400 #: ../fish/guestfish-actions.pod:2309 ../src/guestfs-actions.pod:3568
11402 "This returns the product name of the inspected operating system. The "
11403 "product name is generally some freeform string which can be displayed to the "
11404 "user, but should not be parsed by programs."
11408 #: ../fish/guestfish-actions.pod:2314 ../src/guestfs-actions.pod:3573
11410 "If the product name could not be determined, then the string C<unknown> is "
11415 #: ../fish/guestfish-actions.pod:2319
11416 msgid "inspect-get-product-variant"
11420 #: ../fish/guestfish-actions.pod:2321
11423 " inspect-get-product-variant root\n"
11428 #: ../fish/guestfish-actions.pod:2323 ../src/guestfs-actions.pod:3589
11429 msgid "This returns the product variant of the inspected operating system."
11433 #: ../fish/guestfish-actions.pod:2326 ../src/guestfs-actions.pod:3592
11435 "For Windows guests, this returns the contents of the Registry key C<HKLM"
11436 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
11437 "is usually a string such as C<Client> or C<Server> (other values are "
11438 "possible). This can be used to distinguish consumer and enterprise versions "
11439 "of Windows that have the same version number (for example, Windows 7 and "
11440 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
11441 "the latter is C<Server>)."
11445 #: ../fish/guestfish-actions.pod:2335 ../src/guestfs-actions.pod:3601
11447 "For enterprise Linux guests, in future we intend this to return the product "
11448 "variant such as C<Desktop>, C<Server> and so on. But this is not "
11449 "implemented at present."
11453 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3605
11455 "If the product variant could not be determined, then the string C<unknown> "
11460 #: ../fish/guestfish-actions.pod:2342
11462 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11463 "get-product-name>, L</inspect-get-major-version>."
11467 #: ../fish/guestfish-actions.pod:2346
11468 msgid "inspect-get-roots"
11472 #: ../fish/guestfish-actions.pod:2348
11475 " inspect-get-roots\n"
11480 #: ../fish/guestfish-actions.pod:2350
11482 "This function is a convenient way to get the list of root devices, as "
11483 "returned from a previous call to L</inspect-os>, but without redoing the "
11484 "whole inspection process."
11488 #: ../fish/guestfish-actions.pod:2354
11490 "This returns an empty list if either no root devices were found or the "
11491 "caller has not called L</inspect-os>."
11495 #: ../fish/guestfish-actions.pod:2359
11496 msgid "inspect-get-type"
11500 #: ../fish/guestfish-actions.pod:2361
11503 " inspect-get-type root\n"
11508 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3643
11510 "This returns the type of the inspected operating system. Currently defined "
11515 #: ../fish/guestfish-actions.pod:2368 ../src/guestfs-actions.pod:3648
11520 #: ../fish/guestfish-actions.pod:2370 ../src/guestfs-actions.pod:3650
11521 msgid "Any Linux-based operating system."
11525 #: ../fish/guestfish-actions.pod:2374 ../src/guestfs-actions.pod:3654
11526 msgid "Any Microsoft Windows operating system."
11530 #: ../fish/guestfish-actions.pod:2376 ../src/guestfs-actions.pod:3656
11531 msgid "\"freebsd\""
11535 #: ../fish/guestfish-actions.pod:2378 ../src/guestfs-actions.pod:3658
11540 #: ../fish/guestfish-actions.pod:2380 ../src/guestfs-actions.pod:3660
11545 #: ../fish/guestfish-actions.pod:2382 ../src/guestfs-actions.pod:3662
11550 #: ../fish/guestfish-actions.pod:2384 ../src/guestfs-actions.pod:3664
11555 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3666
11560 #: ../fish/guestfish-actions.pod:2390 ../src/guestfs-actions.pod:3670
11561 msgid "The operating system type could not be determined."
11565 #: ../fish/guestfish-actions.pod:2399
11566 msgid "inspect-get-windows-current-control-set"
11570 #: ../fish/guestfish-actions.pod:2401
11573 " inspect-get-windows-current-control-set root\n"
11578 #: ../fish/guestfish-actions.pod:2403 ../src/guestfs-actions.pod:3690
11580 "This returns the Windows CurrentControlSet of the inspected guest. The "
11581 "CurrentControlSet is a registry key name such as C<ControlSet001>."
11585 #: ../fish/guestfish-actions.pod:2406 ../src/guestfs-actions.pod:3693
11587 "This call assumes that the guest is Windows and that the Registry could be "
11588 "examined by inspection. If this is not the case then an error is returned."
11592 #: ../fish/guestfish-actions.pod:2412
11593 msgid "inspect-get-windows-systemroot"
11597 #: ../fish/guestfish-actions.pod:2414
11600 " inspect-get-windows-systemroot root\n"
11605 #: ../fish/guestfish-actions.pod:2416 ../src/guestfs-actions.pod:3710
11607 "This returns the Windows systemroot of the inspected guest. The systemroot "
11608 "is a directory path such as C</WINDOWS>."
11612 #: ../fish/guestfish-actions.pod:2419 ../src/guestfs-actions.pod:3713
11614 "This call assumes that the guest is Windows and that the systemroot could be "
11615 "determined by inspection. If this is not the case then an error is returned."
11619 #: ../fish/guestfish-actions.pod:2425
11620 msgid "inspect-is-live"
11624 #: ../fish/guestfish-actions.pod:2427
11627 " inspect-is-live root\n"
11632 #: ../fish/guestfish-actions.pod:2429
11634 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11635 "then this returns true if a live image was detected on the disk."
11639 #: ../fish/guestfish-actions.pod:2435
11640 msgid "inspect-is-multipart"
11644 #: ../fish/guestfish-actions.pod:2437
11647 " inspect-is-multipart root\n"
11652 #: ../fish/guestfish-actions.pod:2439
11654 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11655 "then this returns true if the disk is part of a set."
11659 #: ../fish/guestfish-actions.pod:2445
11660 msgid "inspect-is-netinst"
11664 #: ../fish/guestfish-actions.pod:2447
11667 " inspect-is-netinst root\n"
11672 #: ../fish/guestfish-actions.pod:2449
11674 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11675 "then this returns true if the disk is a network installer, ie. not a self-"
11676 "contained install CD but one which is likely to require network access to "
11677 "complete the install."
11681 #: ../fish/guestfish-actions.pod:2457
11682 msgid "inspect-list-applications"
11686 #: ../fish/guestfish-actions.pod:2459
11689 " inspect-list-applications root\n"
11694 #: ../fish/guestfish-actions.pod:2461 ../src/guestfs-actions.pod:3780
11695 msgid "Return the list of applications installed in the operating system."
11699 #: ../fish/guestfish-actions.pod:2463
11701 "I<Note:> This call works differently from other parts of the inspection "
11702 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
11703 "then mount up the disks, before calling this. Listing applications is a "
11704 "significantly more difficult operation which requires access to the full "
11705 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
11706 "are just returning data cached in the libguestfs handle, this call actually "
11707 "reads parts of the mounted filesystems during the call."
11711 #: ../fish/guestfish-actions.pod:2473 ../src/guestfs-actions.pod:3792
11713 "This returns an empty list if the inspection code was not able to determine "
11714 "the list of applications."
11718 #: ../fish/guestfish-actions.pod:2476 ../src/guestfs-actions.pod:3795
11719 msgid "The application structure contains the following fields:"
11723 #: ../fish/guestfish-actions.pod:2480 ../src/guestfs-actions.pod:3799
11724 msgid "C<app_name>"
11728 #: ../fish/guestfish-actions.pod:2482 ../src/guestfs-actions.pod:3801
11730 "The name of the application. For Red Hat-derived and Debian-derived Linux "
11731 "guests, this is the package name."
11735 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3804
11736 msgid "C<app_display_name>"
11740 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3806
11742 "The display name of the application, sometimes localized to the install "
11743 "language of the guest operating system."
11747 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3809
11749 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11750 "to display something can use C<app_name> instead."
11754 #: ../fish/guestfish-actions.pod:2493 ../src/guestfs-actions.pod:3812
11755 msgid "C<app_epoch>"
11759 #: ../fish/guestfish-actions.pod:2495 ../src/guestfs-actions.pod:3814
11761 "For package managers which use epochs, this contains the epoch of the "
11762 "package (an integer). If unavailable, this is returned as C<0>."
11766 #: ../fish/guestfish-actions.pod:2498 ../src/guestfs-actions.pod:3817
11767 msgid "C<app_version>"
11771 #: ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:3819
11773 "The version string of the application or package. If unavailable this is "
11774 "returned as an empty string C<\"\">."
11778 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3822
11779 msgid "C<app_release>"
11783 #: ../fish/guestfish-actions.pod:2505 ../src/guestfs-actions.pod:3824
11785 "The release string of the application or package, for package managers that "
11786 "use this. If unavailable this is returned as an empty string C<\"\">."
11790 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3828
11791 msgid "C<app_install_path>"
11795 #: ../fish/guestfish-actions.pod:2511 ../src/guestfs-actions.pod:3830
11797 "The installation path of the application (on operating systems such as "
11798 "Windows which use installation paths). This path is in the format used by "
11799 "the guest operating system, it is not a libguestfs path."
11803 #: ../fish/guestfish-actions.pod:2516 ../src/guestfs-actions.pod:3835
11804 msgid "If unavailable this is returned as an empty string C<\"\">."
11808 #: ../fish/guestfish-actions.pod:2518 ../src/guestfs-actions.pod:3837
11809 msgid "C<app_trans_path>"
11813 #: ../fish/guestfish-actions.pod:2520 ../src/guestfs-actions.pod:3839
11815 "The install path translated into a libguestfs path. If unavailable this is "
11816 "returned as an empty string C<\"\">."
11820 #: ../fish/guestfish-actions.pod:2523 ../src/guestfs-actions.pod:3842
11821 msgid "C<app_publisher>"
11825 #: ../fish/guestfish-actions.pod:2525 ../src/guestfs-actions.pod:3844
11827 "The name of the publisher of the application, for package managers that use "
11828 "this. If unavailable this is returned as an empty string C<\"\">."
11832 #: ../fish/guestfish-actions.pod:2529 ../src/guestfs-actions.pod:3848
11837 #: ../fish/guestfish-actions.pod:2531 ../src/guestfs-actions.pod:3850
11839 "The URL (eg. upstream URL) of the application. If unavailable this is "
11840 "returned as an empty string C<\"\">."
11844 #: ../fish/guestfish-actions.pod:2534 ../src/guestfs-actions.pod:3853
11845 msgid "C<app_source_package>"
11849 #: ../fish/guestfish-actions.pod:2536 ../src/guestfs-actions.pod:3855
11851 "For packaging systems which support this, the name of the source package. "
11852 "If unavailable this is returned as an empty string C<\"\">."
11856 #: ../fish/guestfish-actions.pod:2539 ../src/guestfs-actions.pod:3858
11857 msgid "C<app_summary>"
11861 #: ../fish/guestfish-actions.pod:2541 ../src/guestfs-actions.pod:3860
11863 "A short (usually one line) description of the application or package. If "
11864 "unavailable this is returned as an empty string C<\"\">."
11868 #: ../fish/guestfish-actions.pod:2544 ../src/guestfs-actions.pod:3863
11869 msgid "C<app_description>"
11873 #: ../fish/guestfish-actions.pod:2546 ../src/guestfs-actions.pod:3865
11875 "A longer description of the application or package. If unavailable this is "
11876 "returned as an empty string C<\"\">."
11880 #: ../fish/guestfish-actions.pod:2553
11885 #: ../fish/guestfish-actions.pod:2555
11893 #: ../fish/guestfish-actions.pod:2557 ../src/guestfs-actions.pod:3883
11895 "This function uses other libguestfs functions and certain heuristics to "
11896 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11897 "for operating systems."
11901 #: ../fish/guestfish-actions.pod:2561 ../src/guestfs-actions.pod:3887
11902 msgid "The list returned is empty if no operating systems were found."
11906 #: ../fish/guestfish-actions.pod:2563 ../src/guestfs-actions.pod:3889
11908 "If one operating system was found, then this returns a list with a single "
11909 "element, which is the name of the root filesystem of this operating system. "
11910 "It is also possible for this function to return a list containing more than "
11911 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11912 "element being the root filesystem of one of the operating systems."
11916 #: ../fish/guestfish-actions.pod:2570
11918 "You can pass the root string(s) returned to other L</inspect-get-*> "
11919 "functions in order to query further information about each operating system, "
11920 "such as the name and version."
11924 #: ../fish/guestfish-actions.pod:2575
11926 "This function uses other libguestfs features such as L</mount-ro> and L</"
11927 "umount-all> in order to mount and unmount filesystems and look at the "
11928 "contents. This should be called with no disks currently mounted. The "
11929 "function may also use Augeas, so any existing Augeas handle will be closed."
11933 #: ../fish/guestfish-actions.pod:2581 ../src/guestfs-actions.pod:3907
11935 "This function cannot decrypt encrypted disks. The caller must do that first "
11936 "(supplying the necessary keys) if the disk is encrypted."
11940 #: ../fish/guestfish-actions.pod:2587 ../fish/guestfish-actions.pod:2785
11941 #: ../fish/guestfish-actions.pod:2850
11942 msgid "See also L</list-filesystems>."
11946 #: ../fish/guestfish-actions.pod:2589
11947 msgid "is-blockdev"
11951 #: ../fish/guestfish-actions.pod:2591
11954 " is-blockdev path\n"
11959 #: ../fish/guestfish-actions.pod:2593 ../src/guestfs-actions.pod:3927
11961 "This returns C<true> if and only if there is a block device with the given "
11966 #: ../fish/guestfish-actions.pod:2596 ../fish/guestfish-actions.pod:2614
11967 #: ../fish/guestfish-actions.pod:2633 ../fish/guestfish-actions.pod:2642
11968 #: ../fish/guestfish-actions.pod:2652 ../fish/guestfish-actions.pod:2686
11969 #: ../fish/guestfish-actions.pod:2695
11970 msgid "See also L</stat>."
11974 #: ../fish/guestfish-actions.pod:2598
11979 #: ../fish/guestfish-actions.pod:2600
11987 #: ../fish/guestfish-actions.pod:2602 ../src/guestfs-actions.pod:3941
11989 "This returns true iff this handle is busy processing a command (in the "
11994 #: ../fish/guestfish-actions.pod:2607
11999 #: ../fish/guestfish-actions.pod:2609
12002 " is-chardev path\n"
12007 #: ../fish/guestfish-actions.pod:2611 ../src/guestfs-actions.pod:3956
12009 "This returns C<true> if and only if there is a character device with the "
12010 "given C<path> name."
12014 #: ../fish/guestfish-actions.pod:2616
12019 #: ../fish/guestfish-actions.pod:2618
12027 #: ../fish/guestfish-actions.pod:2620 ../src/guestfs-actions.pod:3970
12029 "This returns true iff this handle is being configured (in the C<CONFIG> "
12034 #: ../fish/guestfish-actions.pod:2625
12039 #: ../fish/guestfish-actions.pod:2627
12047 #: ../fish/guestfish-actions.pod:2629 ../src/guestfs-actions.pod:3985
12049 "This returns C<true> if and only if there is a directory with the given "
12050 "C<path> name. Note that it returns false for other objects like files."
12054 #: ../fish/guestfish-actions.pod:2635
12059 #: ../fish/guestfish-actions.pod:2637
12067 #: ../fish/guestfish-actions.pod:2639 ../src/guestfs-actions.pod:4001
12069 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
12070 "given C<path> name."
12074 #: ../fish/guestfish-actions.pod:2644
12079 #: ../fish/guestfish-actions.pod:2646
12087 #: ../fish/guestfish-actions.pod:2648 ../src/guestfs-actions.pod:4016
12089 "This returns C<true> if and only if there is a regular file with the given "
12090 "C<path> name. Note that it returns false for other objects like directories."
12094 #: ../fish/guestfish-actions.pod:2654
12095 msgid "is-launching"
12099 #: ../fish/guestfish-actions.pod:2656
12107 #: ../fish/guestfish-actions.pod:2658 ../src/guestfs-actions.pod:4031
12109 "This returns true iff this handle is launching the subprocess (in the "
12110 "C<LAUNCHING> state)."
12114 #: ../fish/guestfish-actions.pod:2663
12119 #: ../fish/guestfish-actions.pod:2665
12127 #: ../fish/guestfish-actions.pod:2667 ../src/guestfs-actions.pod:4046
12129 "This command tests whether C<device> is a logical volume, and returns true "
12130 "iff this is the case."
12134 #: ../fish/guestfish-actions.pod:2670
12139 #: ../fish/guestfish-actions.pod:2672
12147 #: ../fish/guestfish-actions.pod:2674 ../src/guestfs-actions.pod:4058
12149 "This returns true iff this handle is ready to accept commands (in the "
12154 #: ../fish/guestfish-actions.pod:2679
12159 #: ../fish/guestfish-actions.pod:2681
12162 " is-socket path\n"
12167 #: ../fish/guestfish-actions.pod:2683 ../src/guestfs-actions.pod:4073
12169 "This returns C<true> if and only if there is a Unix domain socket with the "
12170 "given C<path> name."
12174 #: ../fish/guestfish-actions.pod:2688
12179 #: ../fish/guestfish-actions.pod:2690
12182 " is-symlink path\n"
12187 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:4088
12189 "This returns C<true> if and only if there is a symbolic link with the given "
12194 #: ../fish/guestfish-actions.pod:2697
12199 #: ../fish/guestfish-actions.pod:2699
12207 #: ../fish/guestfish-actions.pod:2701 ../src/guestfs-actions.pod:4103
12209 "This returns true iff the file exists and the file is empty or it contains "
12214 #: ../fish/guestfish-actions.pod:2704
12215 msgid "is-zero-device"
12219 #: ../fish/guestfish-actions.pod:2706
12222 " is-zero-device device\n"
12227 #: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4116
12228 msgid "This returns true iff the device exists and contains all zero bytes."
12232 #: ../fish/guestfish-actions.pod:2710 ../src/guestfs-actions.pod:4118
12233 msgid "Note that for large devices this can take a long time to run."
12237 #: ../fish/guestfish-actions.pod:2712
12238 msgid "kill-subprocess"
12242 #: ../fish/guestfish-actions.pod:2714
12245 " kill-subprocess\n"
12250 #: ../fish/guestfish-actions.pod:2716 ../src/guestfs-actions.pod:4129
12251 msgid "This kills the qemu subprocess. You should never need to call this."
12255 #: ../fish/guestfish-actions.pod:2718
12260 #: ../fish/guestfish-actions.pod:2720
12265 #: ../fish/guestfish-actions.pod:2722
12273 #: ../fish/guestfish-actions.pod:2724 ../src/guestfs-actions.pod:4140
12275 "Internally libguestfs is implemented by running a virtual machine using "
12280 #: ../fish/guestfish-actions.pod:2727 ../src/guestfs-actions.pod:4143
12282 "You should call this after configuring the handle (eg. adding drives) but "
12283 "before performing any actions."
12287 #: ../fish/guestfish-actions.pod:2730
12292 #: ../fish/guestfish-actions.pod:2732
12295 " lchown owner group path\n"
12300 #: ../fish/guestfish-actions.pod:2734
12302 "Change the file owner to C<owner> and group to C<group>. This is like L</"
12303 "chown> but if C<path> is a symlink then the link itself is changed, not the "
12308 #: ../fish/guestfish-actions.pod:2742
12313 #: ../fish/guestfish-actions.pod:2744
12316 " lgetxattr path name\n"
12321 #: ../fish/guestfish-actions.pod:2746 ../src/guestfs-actions.pod:4183
12323 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
12324 "is a symlink, then this call returns an extended attribute from the symlink."
12328 #: ../fish/guestfish-actions.pod:2760
12329 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
12333 #: ../fish/guestfish-actions.pod:2762
12338 #: ../fish/guestfish-actions.pod:2764
12341 " lgetxattrs path\n"
12346 #: ../fish/guestfish-actions.pod:2766
12348 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
12349 "it returns the extended attributes of the link itself."
12353 #: ../fish/guestfish-actions.pod:2770
12358 #: ../fish/guestfish-actions.pod:2772
12366 #: ../fish/guestfish-actions.pod:2774 ../src/guestfs-actions.pod:4226
12368 "List all 9p filesystems attached to the guest. A list of mount tags is "
12373 #: ../fish/guestfish-actions.pod:2777
12374 msgid "list-devices"
12378 #: ../fish/guestfish-actions.pod:2779
12386 #: ../fish/guestfish-actions.pod:2781 ../src/guestfs-actions.pod:4240
12387 msgid "List all the block devices."
12391 #: ../fish/guestfish-actions.pod:2783 ../src/guestfs-actions.pod:4242
12392 msgid "The full block device names are returned, eg. C</dev/sda>."
12396 #: ../fish/guestfish-actions.pod:2787
12397 msgid "list-dm-devices"
12401 #: ../fish/guestfish-actions.pod:2789
12404 " list-dm-devices\n"
12409 #: ../fish/guestfish-actions.pod:2791 ../src/guestfs-actions.pod:4257
12410 msgid "List all device mapper devices."
12414 #: ../fish/guestfish-actions.pod:2793
12416 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
12417 "previous call to L</luks-open>."
12421 #: ../fish/guestfish-actions.pod:2796
12423 "Device mapper devices which correspond to logical volumes are I<not> "
12424 "returned in this list. Call L</lvs> if you want to list logical volumes."
12428 #: ../fish/guestfish-actions.pod:2800
12429 msgid "list-filesystems"
12433 #: ../fish/guestfish-actions.pod:2802
12436 " list-filesystems\n"
12441 #: ../fish/guestfish-actions.pod:2804 ../src/guestfs-actions.pod:4277
12443 "This inspection command looks for filesystems on partitions, block devices "
12444 "and logical volumes, returning a list of devices containing filesystems and "
12449 #: ../fish/guestfish-actions.pod:2808 ../src/guestfs-actions.pod:4281
12451 "The return value is a hash, where the keys are the devices containing "
12452 "filesystems, and the values are the filesystem types. For example:"
12456 #: ../fish/guestfish-actions.pod:2812 ../src/guestfs-actions.pod:4285
12459 " \"/dev/sda1\" => \"ntfs\"\n"
12460 " \"/dev/sda2\" => \"ext2\"\n"
12461 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
12462 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
12467 #: ../fish/guestfish-actions.pod:2817 ../src/guestfs-actions.pod:4290
12469 "The value can have the special value \"unknown\", meaning the content of the "
12470 "device is undetermined or empty. \"swap\" means a Linux swap partition."
12474 #: ../fish/guestfish-actions.pod:2821
12476 "This command runs other libguestfs commands, which might include L</mount> "
12477 "and L</umount>, and therefore you should use this soon after launch and only "
12478 "when nothing is mounted."
12482 #: ../fish/guestfish-actions.pod:2825
12484 "Not all of the filesystems returned will be mountable. In particular, swap "
12485 "partitions are returned in the list. Also this command does not check that "
12486 "each filesystem found is valid and mountable, and some filesystems might be "
12487 "mountable but require special options. Filesystems may not all belong to a "
12488 "single logical operating system (use L</inspect-os> to look for OSes)."
12492 #: ../fish/guestfish-actions.pod:2833
12493 msgid "list-md-devices"
12497 #: ../fish/guestfish-actions.pod:2835
12500 " list-md-devices\n"
12505 #: ../fish/guestfish-actions.pod:2837 ../src/guestfs-actions.pod:4319
12506 msgid "List all Linux md devices."
12510 #: ../fish/guestfish-actions.pod:2839
12511 msgid "list-partitions"
12515 #: ../fish/guestfish-actions.pod:2841
12518 " list-partitions\n"
12523 #: ../fish/guestfish-actions.pod:2843 ../src/guestfs-actions.pod:4332
12524 msgid "List all the partitions detected on all block devices."
12528 #: ../fish/guestfish-actions.pod:2845 ../src/guestfs-actions.pod:4334
12529 msgid "The full partition device names are returned, eg. C</dev/sda1>"
12533 #: ../fish/guestfish-actions.pod:2847
12535 "This does not return logical volumes. For that you will need to call L</"
12540 #: ../fish/guestfish-actions.pod:2852
12545 #: ../fish/guestfish-actions.pod:2854
12553 #: ../fish/guestfish-actions.pod:2856 ../src/guestfs-actions.pod:4353
12555 "List the files in C<directory> (relative to the root directory, there is no "
12556 "cwd) in the format of 'ls -la'."
12560 #: ../fish/guestfish-actions.pod:2859 ../src/guestfs-actions.pod:4356
12562 "This command is mostly useful for interactive sessions. It is I<not> "
12563 "intended that you try to parse the output string."
12567 #: ../fish/guestfish-actions.pod:2862
12572 #: ../fish/guestfish-actions.pod:2864
12575 " ln target linkname\n"
12580 #: ../fish/guestfish-actions.pod:2866 ../src/guestfs-actions.pod:4371
12581 msgid "This command creates a hard link using the C<ln> command."
12585 #: ../fish/guestfish-actions.pod:2868
12590 #: ../fish/guestfish-actions.pod:2870
12593 " ln-f target linkname\n"
12598 #: ../fish/guestfish-actions.pod:2872 ../src/guestfs-actions.pod:4384
12600 "This command creates a hard link using the C<ln -f> command. The I<-f> "
12601 "option removes the link (C<linkname>) if it exists already."
12605 #: ../fish/guestfish-actions.pod:2875
12610 #: ../fish/guestfish-actions.pod:2877
12613 " ln-s target linkname\n"
12618 #: ../fish/guestfish-actions.pod:2879 ../src/guestfs-actions.pod:4398
12619 msgid "This command creates a symbolic link using the C<ln -s> command."
12623 #: ../fish/guestfish-actions.pod:2881
12628 #: ../fish/guestfish-actions.pod:2883
12631 " ln-sf target linkname\n"
12636 #: ../fish/guestfish-actions.pod:2885 ../src/guestfs-actions.pod:4411
12638 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
12639 "option removes the link (C<linkname>) if it exists already."
12643 #: ../fish/guestfish-actions.pod:2888
12644 msgid "lremovexattr"
12648 #: ../fish/guestfish-actions.pod:2890
12651 " lremovexattr xattr path\n"
12656 #: ../fish/guestfish-actions.pod:2892
12658 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
12659 "it removes an extended attribute of the link itself."
12663 #: ../fish/guestfish-actions.pod:2896
12668 #: ../fish/guestfish-actions.pod:2898
12676 #: ../fish/guestfish-actions.pod:2900 ../src/guestfs-actions.pod:4439
12678 "List the files in C<directory> (relative to the root directory, there is no "
12679 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
12683 #: ../fish/guestfish-actions.pod:2904
12685 "This command is mostly useful for interactive sessions. Programs should "
12686 "probably use L</readdir> instead."
12690 #: ../fish/guestfish-actions.pod:2907
12695 #: ../fish/guestfish-actions.pod:2909
12698 " lsetxattr xattr val vallen path\n"
12703 #: ../fish/guestfish-actions.pod:2911
12705 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
12706 "sets an extended attribute of the link itself."
12710 #: ../fish/guestfish-actions.pod:2915
12715 #: ../fish/guestfish-actions.pod:2917
12723 #: ../fish/guestfish-actions.pod:2919 ../fish/guestfish-actions.pod:4817
12724 #: ../src/guestfs-actions.pod:4475 ../src/guestfs-actions.pod:7405
12725 msgid "Returns file information for the given C<path>."
12729 #: ../fish/guestfish-actions.pod:2921
12731 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
12732 "the link is stat-ed, not the file it refers to."
12736 #: ../fish/guestfish-actions.pod:2925 ../src/guestfs-actions.pod:4481
12737 msgid "This is the same as the C<lstat(2)> system call."
12741 #: ../fish/guestfish-actions.pod:2927
12746 #: ../fish/guestfish-actions.pod:2929
12749 " lstatlist path 'names ...'\n"
12754 #: ../fish/guestfish-actions.pod:2931
12756 "This call allows you to perform the L</lstat> operation on multiple files, "
12757 "where all files are in the directory C<path>. C<names> is the list of files "
12758 "from this directory."
12762 #: ../fish/guestfish-actions.pod:2935 ../src/guestfs-actions.pod:4500
12764 "On return you get a list of stat structs, with a one-to-one correspondence "
12765 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12766 "then the C<ino> field of that structure is set to C<-1>."
12770 #: ../fish/guestfish-actions.pod:2940
12772 "This call is intended for programs that want to efficiently list a directory "
12773 "contents without making many round-trips. See also L</lxattrlist> for a "
12774 "similarly efficient call for getting extended attributes. Very long "
12775 "directory listings might cause the protocol message size to be exceeded, "
12776 "causing this call to fail. The caller must split up such requests into "
12777 "smaller groups of names."
12781 #: ../fish/guestfish-actions.pod:2948
12782 msgid "luks-add-key"
12786 #: ../fish/guestfish-actions.pod:2950
12789 " luks-add-key device keyslot\n"
12794 #: ../fish/guestfish-actions.pod:2952 ../src/guestfs-actions.pod:4528
12796 "This command adds a new key on LUKS device C<device>. C<key> is any "
12797 "existing key, and is used to access the device. C<newkey> is the new key to "
12798 "add. C<keyslot> is the key slot that will be replaced."
12802 #: ../fish/guestfish-actions.pod:2957
12804 "Note that if C<keyslot> already contains a key, then this command will "
12805 "fail. You have to use L</luks-kill-slot> first to remove that key."
12809 #: ../fish/guestfish-actions.pod:2961 ../fish/guestfish-actions.pod:2983
12810 #: ../fish/guestfish-actions.pod:2993 ../fish/guestfish-actions.pod:3004
12811 #: ../fish/guestfish-actions.pod:3030 ../fish/guestfish-actions.pod:3040
12813 "This command has one or more key or passphrase parameters. Guestfish will "
12814 "prompt for these separately."
12818 #: ../fish/guestfish-actions.pod:2964
12823 #: ../fish/guestfish-actions.pod:2966
12826 " luks-close device\n"
12831 #: ../fish/guestfish-actions.pod:2968
12833 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
12834 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
12835 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
12840 #: ../fish/guestfish-actions.pod:2974
12841 msgid "luks-format"
12845 #: ../fish/guestfish-actions.pod:2976
12848 " luks-format device keyslot\n"
12853 #: ../fish/guestfish-actions.pod:2978 ../src/guestfs-actions.pod:4569
12855 "This command erases existing data on C<device> and formats the device as a "
12856 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12857 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12861 #: ../fish/guestfish-actions.pod:2986
12862 msgid "luks-format-cipher"
12866 #: ../fish/guestfish-actions.pod:2988
12869 " luks-format-cipher device keyslot cipher\n"
12874 #: ../fish/guestfish-actions.pod:2990
12876 "This command is the same as L</luks-format> but it also allows you to set "
12877 "the C<cipher> used."
12881 #: ../fish/guestfish-actions.pod:2996
12882 msgid "luks-kill-slot"
12886 #: ../fish/guestfish-actions.pod:2998
12889 " luks-kill-slot device keyslot\n"
12894 #: ../fish/guestfish-actions.pod:3000 ../src/guestfs-actions.pod:4610
12896 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12897 "device C<device>. C<key> must be one of the I<other> keys."
12901 #: ../fish/guestfish-actions.pod:3007
12906 #: ../fish/guestfish-actions.pod:3009
12909 " luks-open device mapname\n"
12914 #: ../fish/guestfish-actions.pod:3011 ../src/guestfs-actions.pod:4630
12916 "This command opens a block device which has been encrypted according to the "
12917 "Linux Unified Key Setup (LUKS) standard."
12921 #: ../fish/guestfish-actions.pod:3014 ../src/guestfs-actions.pod:4633
12922 msgid "C<device> is the encrypted block device or partition."
12926 #: ../fish/guestfish-actions.pod:3016 ../src/guestfs-actions.pod:4635
12928 "The caller must supply one of the keys associated with the LUKS block "
12929 "device, in the C<key> parameter."
12933 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4638
12935 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12936 "writes to this block device are decrypted from and encrypted to the "
12937 "underlying C<device> respectively."
12941 #: ../fish/guestfish-actions.pod:3023
12943 "If this block device contains LVM volume groups, then calling L</vgscan> "
12944 "followed by L</vg-activate-all> will make them visible."
12948 #: ../fish/guestfish-actions.pod:3027
12949 msgid "Use L</list-dm-devices> to list all device mapper devices."
12953 #: ../fish/guestfish-actions.pod:3033
12954 msgid "luks-open-ro"
12958 #: ../fish/guestfish-actions.pod:3035
12961 " luks-open-ro device mapname\n"
12966 #: ../fish/guestfish-actions.pod:3037
12968 "This is the same as L</luks-open> except that a read-only mapping is created."
12972 #: ../fish/guestfish-actions.pod:3043
12977 #: ../fish/guestfish-actions.pod:3045
12980 " lvcreate logvol volgroup mbytes\n"
12985 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4684
12987 "This creates an LVM logical volume called C<logvol> on the volume group "
12988 "C<volgroup>, with C<size> megabytes."
12992 #: ../fish/guestfish-actions.pod:3050
12993 msgid "lvm-canonical-lv-name"
12997 #: ../fish/guestfish-actions.pod:3052
13000 " lvm-canonical-lv-name lvname\n"
13005 #: ../fish/guestfish-actions.pod:3054 ../src/guestfs-actions.pod:4697
13007 "This converts alternative naming schemes for LVs that you might find to the "
13008 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
13013 #: ../fish/guestfish-actions.pod:3058 ../src/guestfs-actions.pod:4701
13015 "This command returns an error if the C<lvname> parameter does not refer to a "
13020 #: ../fish/guestfish-actions.pod:3061
13021 msgid "See also L</is-lv>."
13025 #: ../fish/guestfish-actions.pod:3063
13026 msgid "lvm-clear-filter"
13030 #: ../fish/guestfish-actions.pod:3065
13033 " lvm-clear-filter\n"
13038 #: ../fish/guestfish-actions.pod:3067
13040 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
13045 #: ../fish/guestfish-actions.pod:3070 ../fish/guestfish-actions.pod:3098
13046 #: ../src/guestfs-actions.pod:4719 ../src/guestfs-actions.pod:4758
13048 "This command also clears the LVM cache and performs a volume group scan."
13052 #: ../fish/guestfish-actions.pod:3073
13053 msgid "lvm-remove-all"
13057 #: ../fish/guestfish-actions.pod:3075
13060 " lvm-remove-all\n"
13065 #: ../fish/guestfish-actions.pod:3077 ../src/guestfs-actions.pod:4731
13067 "This command removes all LVM logical volumes, volume groups and physical "
13072 #: ../fish/guestfish-actions.pod:3080
13073 msgid "lvm-set-filter"
13077 #: ../fish/guestfish-actions.pod:3082
13080 " lvm-set-filter 'devices ...'\n"
13085 #: ../fish/guestfish-actions.pod:3084 ../src/guestfs-actions.pod:4744
13087 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
13088 "block devices in the list C<devices>, and will ignore all other attached "
13093 #: ../fish/guestfish-actions.pod:3088 ../src/guestfs-actions.pod:4748
13095 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
13096 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
13097 "there are two types of duplication possible: either cloned PVs/VGs which "
13098 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
13099 "same name. In normal operation you cannot create this situation, but you "
13100 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
13101 "inside the LVM metadata."
13105 #: ../fish/guestfish-actions.pod:3101 ../src/guestfs-actions.pod:4761
13106 msgid "You can filter whole block devices or individual partitions."
13110 #: ../fish/guestfish-actions.pod:3103 ../src/guestfs-actions.pod:4763
13112 "You cannot use this if any VG is currently in use (eg. contains a mounted "
13113 "filesystem), even if you are not filtering out that VG."
13117 #: ../fish/guestfish-actions.pod:3107
13122 #: ../fish/guestfish-actions.pod:3109
13125 " lvremove device\n"
13130 #: ../fish/guestfish-actions.pod:3111 ../src/guestfs-actions.pod:4777
13132 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
13133 "LV, such as C</dev/VG/LV>."
13137 #: ../fish/guestfish-actions.pod:3114 ../src/guestfs-actions.pod:4780
13139 "You can also remove all LVs in a volume group by specifying the VG name, C</"
13144 #: ../fish/guestfish-actions.pod:3117
13149 #: ../fish/guestfish-actions.pod:3119
13152 " lvrename logvol newlogvol\n"
13157 #: ../fish/guestfish-actions.pod:3121 ../src/guestfs-actions.pod:4794
13158 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
13162 #: ../fish/guestfish-actions.pod:3123
13167 #: ../fish/guestfish-actions.pod:3125
13170 " lvresize device mbytes\n"
13175 #: ../fish/guestfish-actions.pod:3127 ../src/guestfs-actions.pod:4807
13177 "This resizes (expands or shrinks) an existing LVM logical volume to "
13178 "C<mbytes>. When reducing, data in the reduced part is lost."
13182 #: ../fish/guestfish-actions.pod:3131
13183 msgid "lvresize-free"
13187 #: ../fish/guestfish-actions.pod:3133
13190 " lvresize-free lv percent\n"
13195 #: ../fish/guestfish-actions.pod:3135 ../src/guestfs-actions.pod:4822
13197 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
13198 "remaining free space in the volume group. Commonly you would call this with "
13199 "pc = 100 which expands the logical volume as much as possible, using all "
13200 "remaining free space in the volume group."
13204 #: ../fish/guestfish-actions.pod:3141
13209 #: ../fish/guestfish-actions.pod:3143
13217 #: ../fish/guestfish-actions.pod:3145 ../src/guestfs-actions.pod:4837
13219 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13224 #: ../fish/guestfish-actions.pod:3148 ../src/guestfs-actions.pod:4840
13226 "This returns a list of the logical volume device names (eg. C</dev/"
13227 "VolGroup00/LogVol00>)."
13231 #: ../fish/guestfish-actions.pod:3151
13232 msgid "See also L</lvs-full>, L</list-filesystems>."
13236 #: ../fish/guestfish-actions.pod:3153
13241 #: ../fish/guestfish-actions.pod:3155
13249 #: ../fish/guestfish-actions.pod:3157 ../src/guestfs-actions.pod:4856
13251 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13252 "(8)> command. The \"full\" version includes all fields."
13256 #: ../fish/guestfish-actions.pod:3160
13261 #: ../fish/guestfish-actions.pod:3162
13269 #: ../fish/guestfish-actions.pod:3164 ../src/guestfs-actions.pod:4871
13270 msgid "This command returns the UUID of the LVM LV C<device>."
13274 #: ../fish/guestfish-actions.pod:3166
13279 #: ../fish/guestfish-actions.pod:3168
13282 " lxattrlist path 'names ...'\n"
13287 #: ../fish/guestfish-actions.pod:3170 ../src/guestfs-actions.pod:4885
13289 "This call allows you to get the extended attributes of multiple files, where "
13290 "all files are in the directory C<path>. C<names> is the list of files from "
13295 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4889
13297 "On return you get a flat list of xattr structs which must be interpreted "
13298 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
13299 "C<attrval> in this struct is zero-length to indicate there was an error "
13300 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
13301 "number (the number of following attributes for this file, which could be C<"
13302 "\"0\">). Then after the first xattr struct are the zero or more attributes "
13303 "for the first named file. This repeats for the second and subsequent files."
13307 #: ../fish/guestfish-actions.pod:3184
13309 "This call is intended for programs that want to efficiently list a directory "
13310 "contents without making many round-trips. See also L</lstatlist> for a "
13311 "similarly efficient call for getting standard stats. Very long directory "
13312 "listings might cause the protocol message size to be exceeded, causing this "
13313 "call to fail. The caller must split up such requests into smaller groups of "
13318 #: ../fish/guestfish-actions.pod:3192
13323 #: ../fish/guestfish-actions.pod:3194
13326 " md-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] [chunk:N] [level:..]\n"
13331 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4932
13333 "Create a Linux md (RAID) device named C<name> on the devices in the list "
13338 #: ../fish/guestfish-actions.pod:3203 ../src/guestfs-actions.pod:4939
13339 msgid "C<missingbitmap>"
13343 #: ../fish/guestfish-actions.pod:3205 ../src/guestfs-actions.pod:4941
13345 "A bitmap of missing devices. If a bit is set it means that a missing device "
13346 "is added to the array. The least significant bit corresponds to the first "
13347 "device in the array."
13351 #: ../fish/guestfish-actions.pod:3209 ../src/guestfs-actions.pod:4945
13352 msgid "As examples:"
13356 #: ../fish/guestfish-actions.pod:3211 ../src/guestfs-actions.pod:4947
13358 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
13359 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
13363 #: ../fish/guestfish-actions.pod:3214 ../src/guestfs-actions.pod:4950
13365 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
13366 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
13370 #: ../fish/guestfish-actions.pod:3217 ../src/guestfs-actions.pod:4953
13371 msgid "This defaults to C<0> (no missing devices)."
13375 #: ../fish/guestfish-actions.pod:3219 ../src/guestfs-actions.pod:4955
13377 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
13378 "equal C<nrdevices> + C<spare>."
13382 #: ../fish/guestfish-actions.pod:3222 ../src/guestfs-actions.pod:4958
13383 msgid "C<nrdevices>"
13387 #: ../fish/guestfish-actions.pod:3224 ../src/guestfs-actions.pod:4960
13388 msgid "The number of active RAID devices."
13392 #: ../fish/guestfish-actions.pod:3226 ../src/guestfs-actions.pod:4962
13394 "If not set, this defaults to the length of C<devices> plus the number of "
13395 "bits set in C<missingbitmap>."
13399 #: ../fish/guestfish-actions.pod:3229 ../src/guestfs-actions.pod:4965
13404 #: ../fish/guestfish-actions.pod:3231 ../src/guestfs-actions.pod:4967
13405 msgid "The number of spare devices."
13409 #: ../fish/guestfish-actions.pod:3233 ../src/guestfs-actions.pod:4969
13410 msgid "If not set, this defaults to C<0>."
13414 #: ../fish/guestfish-actions.pod:3235 ../src/guestfs-actions.pod:4971
13419 #: ../fish/guestfish-actions.pod:3237 ../src/guestfs-actions.pod:4973
13420 msgid "The chunk size in bytes."
13424 #: ../fish/guestfish-actions.pod:3239 ../fish/guestfish-actions.pod:3261
13425 #: ../src/guestfs-actions.pod:4975 ../src/guestfs-actions.pod:5023
13430 #: ../fish/guestfish-actions.pod:3241 ../src/guestfs-actions.pod:4977
13432 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
13433 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
13434 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
13439 #: ../fish/guestfish-actions.pod:3246 ../src/guestfs-actions.pod:4982
13440 msgid "If not set, this defaults to C<raid1>."
13444 #: ../fish/guestfish-actions.pod:3252
13449 #: ../fish/guestfish-actions.pod:3254
13457 #: ../fish/guestfish-actions.pod:3256 ../src/guestfs-actions.pod:5018
13459 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
13460 "are usually present in the returned hash. Other fields may also be present."
13464 #: ../fish/guestfish-actions.pod:3263 ../src/guestfs-actions.pod:5025
13465 msgid "The raid level of the MD device."
13469 #: ../fish/guestfish-actions.pod:3265 ../src/guestfs-actions.pod:5027
13474 #: ../fish/guestfish-actions.pod:3267 ../src/guestfs-actions.pod:5029
13475 msgid "The number of underlying devices in the MD device."
13479 #: ../fish/guestfish-actions.pod:3269 ../src/guestfs-actions.pod:5031
13480 msgid "C<metadata>"
13484 #: ../fish/guestfish-actions.pod:3271 ../src/guestfs-actions.pod:5033
13485 msgid "The metadata version used."
13489 #: ../fish/guestfish-actions.pod:3273 ../src/guestfs-actions.pod:5035
13494 #: ../fish/guestfish-actions.pod:3275 ../src/guestfs-actions.pod:5037
13495 msgid "The UUID of the MD device."
13499 #: ../fish/guestfish-actions.pod:3279 ../src/guestfs-actions.pod:5041
13500 msgid "The name of the MD device."
13504 #: ../fish/guestfish-actions.pod:3283
13509 #: ../fish/guestfish-actions.pod:3285
13517 #: ../fish/guestfish-actions.pod:3287 ../src/guestfs-actions.pod:5057
13519 "This command deactivates the MD array named C<md>. The device is stopped, "
13520 "but it is not destroyed or zeroed."
13524 #: ../fish/guestfish-actions.pod:3290
13529 #: ../fish/guestfish-actions.pod:3292
13537 #: ../fish/guestfish-actions.pod:3294 ../src/guestfs-actions.pod:5068
13538 msgid "Create a directory named C<path>."
13542 #: ../fish/guestfish-actions.pod:3296
13547 #: ../fish/guestfish-actions.pod:3298
13550 " mkdir-mode path mode\n"
13555 #: ../fish/guestfish-actions.pod:3300 ../src/guestfs-actions.pod:5081
13557 "This command creates a directory, setting the initial permissions of the "
13558 "directory to C<mode>."
13562 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5084
13564 "For common Linux filesystems, the actual mode which is set will be C<mode & "
13565 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
13570 #: ../fish/guestfish-actions.pod:3307
13571 msgid "See also L</mkdir>, L</umask>"
13575 #: ../fish/guestfish-actions.pod:3309
13580 #: ../fish/guestfish-actions.pod:3311
13588 #: ../fish/guestfish-actions.pod:3313 ../src/guestfs-actions.pod:5100
13590 "Create a directory named C<path>, creating any parent directories as "
13591 "necessary. This is like the C<mkdir -p> shell command."
13595 #: ../fish/guestfish-actions.pod:3316
13600 #: ../fish/guestfish-actions.pod:3318
13603 " mkdtemp template\n"
13608 #: ../fish/guestfish-actions.pod:3320 ../src/guestfs-actions.pod:5113
13610 "This command creates a temporary directory. The C<template> parameter "
13611 "should be a full pathname for the temporary directory name with the final "
13612 "six characters being \"XXXXXX\"."
13616 #: ../fish/guestfish-actions.pod:3325 ../src/guestfs-actions.pod:5118
13618 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
13619 "being suitable for Windows filesystems."
13623 #: ../fish/guestfish-actions.pod:3328 ../src/guestfs-actions.pod:5121
13624 msgid "The name of the temporary directory that was created is returned."
13628 #: ../fish/guestfish-actions.pod:3331 ../src/guestfs-actions.pod:5124
13629 msgid "The temporary directory is created with mode 0700 and is owned by root."
13633 #: ../fish/guestfish-actions.pod:3334 ../src/guestfs-actions.pod:5127
13635 "The caller is responsible for deleting the temporary directory and its "
13636 "contents after use."
13640 #: ../fish/guestfish-actions.pod:3337 ../src/guestfs-actions.pod:5130
13641 msgid "See also: L<mkdtemp(3)>"
13645 #: ../fish/guestfish-actions.pod:3339
13650 #: ../fish/guestfish-actions.pod:3341
13653 " mke2fs-J fstype blocksize device journal\n"
13658 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5146
13660 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13661 "C<journal>. It is equivalent to the command:"
13665 #: ../fish/guestfish-actions.pod:3347 ../src/guestfs-actions.pod:5150
13668 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13673 #: ../fish/guestfish-actions.pod:3349
13674 msgid "See also L</mke2journal>."
13678 #: ../fish/guestfish-actions.pod:3351
13683 #: ../fish/guestfish-actions.pod:3353
13686 " mke2fs-JL fstype blocksize device label\n"
13691 #: ../fish/guestfish-actions.pod:3355 ../src/guestfs-actions.pod:5167
13693 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13694 "the journal labeled C<label>."
13698 #: ../fish/guestfish-actions.pod:3358
13699 msgid "See also L</mke2journal-L>."
13703 #: ../fish/guestfish-actions.pod:3360
13708 #: ../fish/guestfish-actions.pod:3362
13711 " mke2fs-JU fstype blocksize device uuid\n"
13716 #: ../fish/guestfish-actions.pod:3364 ../src/guestfs-actions.pod:5185
13718 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13719 "the journal with UUID C<uuid>."
13723 #: ../fish/guestfish-actions.pod:3367
13724 msgid "See also L</mke2journal-U>."
13728 #: ../fish/guestfish-actions.pod:3369
13729 msgid "mke2journal"
13733 #: ../fish/guestfish-actions.pod:3371
13736 " mke2journal blocksize device\n"
13741 #: ../fish/guestfish-actions.pod:3373 ../src/guestfs-actions.pod:5201
13743 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13748 #: ../fish/guestfish-actions.pod:3376 ../src/guestfs-actions.pod:5204
13751 " mke2fs -O journal_dev -b blocksize device\n"
13756 #: ../fish/guestfish-actions.pod:3378
13757 msgid "mke2journal-L"
13761 #: ../fish/guestfish-actions.pod:3380
13764 " mke2journal-L blocksize label device\n"
13769 #: ../fish/guestfish-actions.pod:3382 ../src/guestfs-actions.pod:5218
13770 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13774 #: ../fish/guestfish-actions.pod:3384
13775 msgid "mke2journal-U"
13779 #: ../fish/guestfish-actions.pod:3386
13782 " mke2journal-U blocksize uuid device\n"
13787 #: ../fish/guestfish-actions.pod:3388 ../src/guestfs-actions.pod:5232
13788 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13792 #: ../fish/guestfish-actions.pod:3390
13797 #: ../fish/guestfish-actions.pod:3392
13800 " mkfifo mode path\n"
13805 #: ../fish/guestfish-actions.pod:3394
13807 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13808 "is just a convenient wrapper around L</mknod>."
13812 #: ../fish/guestfish-actions.pod:3400
13817 #: ../fish/guestfish-actions.pod:3402
13820 " mkfs fstype device\n"
13825 #: ../fish/guestfish-actions.pod:3404 ../src/guestfs-actions.pod:5262
13827 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13828 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13832 #: ../fish/guestfish-actions.pod:3408
13837 #: ../fish/guestfish-actions.pod:3410
13840 " mkfs-b fstype blocksize device\n"
13845 #: ../fish/guestfish-actions.pod:3412
13847 "This call is similar to L</mkfs>, but it allows you to control the block "
13848 "size of the resulting filesystem. Supported block sizes depend on the "
13849 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13853 #: ../fish/guestfish-actions.pod:3417 ../fish/guestfish-actions.pod:3444
13854 #: ../src/guestfs-actions.pod:5290 ../src/guestfs-actions.pod:5328
13856 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13861 #: ../fish/guestfish-actions.pod:3420
13863 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
13868 #: ../fish/guestfish-actions.pod:3427
13873 #: ../fish/guestfish-actions.pod:3429
13876 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] [sectorsize:N]\n"
13881 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5315
13883 "This function creates a filesystem on C<device>. The filesystem type is "
13884 "C<fstype>, for example C<ext3>."
13888 #: ../fish/guestfish-actions.pod:3438 ../src/guestfs-actions.pod:5322
13889 msgid "C<blocksize>"
13893 #: ../fish/guestfish-actions.pod:3440 ../src/guestfs-actions.pod:5324
13895 "The filesystem block size. Supported block sizes depend on the filesystem "
13896 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13901 #: ../fish/guestfish-actions.pod:3447 ../src/guestfs-actions.pod:5331
13902 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13906 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5333
13907 msgid "C<features>"
13911 #: ../fish/guestfish-actions.pod:3451 ../src/guestfs-actions.pod:5335
13912 msgid "This passes the I<-O> parameter to the external mkfs program."
13916 #: ../fish/guestfish-actions.pod:3453 ../src/guestfs-actions.pod:5337
13918 "For certain filesystem types, this allows extra filesystem features to be "
13919 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13923 #: ../fish/guestfish-actions.pod:3457 ../src/guestfs-actions.pod:5341
13925 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13930 #: ../fish/guestfish-actions.pod:3460 ../src/guestfs-actions.pod:5344
13935 #: ../fish/guestfish-actions.pod:3462 ../src/guestfs-actions.pod:5346
13937 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
13938 "sets the inode size (only for ext2/3/4 filesystems at present)."
13942 #: ../fish/guestfish-actions.pod:3465 ../src/guestfs-actions.pod:5349
13943 msgid "C<sectorsize>"
13947 #: ../fish/guestfish-actions.pod:3467 ../src/guestfs-actions.pod:5351
13949 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
13950 "sets sector size for ufs filesystem."
13954 #: ../fish/guestfish-actions.pod:3474
13955 msgid "mkmountpoint"
13959 #: ../fish/guestfish-actions.pod:3476
13962 " mkmountpoint exemptpath\n"
13967 #: ../fish/guestfish-actions.pod:3478
13969 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
13970 "to create extra mountpoints before mounting the first filesystem."
13974 #: ../fish/guestfish-actions.pod:3482 ../src/guestfs-actions.pod:5394
13976 "These calls are I<only> necessary in some very limited circumstances, mainly "
13977 "the case where you want to mount a mix of unrelated and/or read-only "
13978 "filesystems together."
13982 #: ../fish/guestfish-actions.pod:3486 ../src/guestfs-actions.pod:5398
13984 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13985 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13986 "inside that. You can unpack this as follows in guestfish:"
13990 #: ../fish/guestfish-actions.pod:3491 ../src/guestfs-actions.pod:5403
13993 " add-ro Fedora-11-i686-Live.iso\n"
13995 " mkmountpoint /cd\n"
13996 " mkmountpoint /sqsh\n"
13997 " mkmountpoint /ext3fs\n"
13998 " mount /dev/sda /cd\n"
13999 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
14000 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
14005 #: ../fish/guestfish-actions.pod:3500 ../src/guestfs-actions.pod:5412
14006 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
14010 #: ../fish/guestfish-actions.pod:3502
14012 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
14013 "unexpected errors if you try to mix these calls. It is safest to manually "
14014 "unmount filesystems and remove mountpoints after use."
14018 #: ../fish/guestfish-actions.pod:3506
14020 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
14021 "for this to work for manual mountpoints, you must ensure that the innermost "
14022 "mountpoints have the longest pathnames, as in the example code above."
14026 #: ../fish/guestfish-actions.pod:3511 ../src/guestfs-actions.pod:5423
14028 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
14032 #: ../fish/guestfish-actions.pod:3513
14034 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
14035 "L</umount-all> to be called when the handle is closed which can also trigger "
14040 #: ../fish/guestfish-actions.pod:3517
14045 #: ../fish/guestfish-actions.pod:3519
14048 " mknod mode devmajor devminor path\n"
14053 #: ../fish/guestfish-actions.pod:3521 ../src/guestfs-actions.pod:5442
14055 "This call creates block or character special devices, or named pipes (FIFOs)."
14059 #: ../fish/guestfish-actions.pod:3524 ../src/guestfs-actions.pod:5445
14061 "The C<mode> parameter should be the mode, using the standard constants. "
14062 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
14063 "used when creating block and character special devices."
14067 #: ../fish/guestfish-actions.pod:3529
14069 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
14070 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
14071 "regular file). These constants are available in the standard Linux header "
14072 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
14073 "wrappers around this command which bitwise OR in the appropriate constant "
14078 #: ../fish/guestfish-actions.pod:3539
14083 #: ../fish/guestfish-actions.pod:3541
14086 " mknod-b mode devmajor devminor path\n"
14091 #: ../fish/guestfish-actions.pod:3543
14093 "This call creates a block device node called C<path> with mode C<mode> and "
14094 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14095 "wrapper around L</mknod>."
14099 #: ../fish/guestfish-actions.pod:3549
14104 #: ../fish/guestfish-actions.pod:3551
14107 " mknod-c mode devmajor devminor path\n"
14112 #: ../fish/guestfish-actions.pod:3553
14114 "This call creates a char device node called C<path> with mode C<mode> and "
14115 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14116 "wrapper around L</mknod>."
14120 #: ../fish/guestfish-actions.pod:3559
14125 #: ../fish/guestfish-actions.pod:3561
14133 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5508
14134 msgid "Create a swap partition on C<device>."
14138 #: ../fish/guestfish-actions.pod:3565
14143 #: ../fish/guestfish-actions.pod:3567
14146 " mkswap-L label device\n"
14151 #: ../fish/guestfish-actions.pod:3569 ../src/guestfs-actions.pod:5521
14152 msgid "Create a swap partition on C<device> with label C<label>."
14156 #: ../fish/guestfish-actions.pod:3571 ../src/guestfs-actions.pod:5523
14158 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
14159 "sda>), just to a partition. This appears to be a limitation of the kernel "
14164 #: ../fish/guestfish-actions.pod:3575
14169 #: ../fish/guestfish-actions.pod:3577
14172 " mkswap-U uuid device\n"
14177 #: ../fish/guestfish-actions.pod:3579 ../src/guestfs-actions.pod:5538
14178 msgid "Create a swap partition on C<device> with UUID C<uuid>."
14182 #: ../fish/guestfish-actions.pod:3581
14183 msgid "mkswap-file"
14187 #: ../fish/guestfish-actions.pod:3583
14190 " mkswap-file path\n"
14195 #: ../fish/guestfish-actions.pod:3585 ../src/guestfs-actions.pod:5550
14196 msgid "Create a swap file."
14200 #: ../fish/guestfish-actions.pod:3587
14202 "This command just writes a swap file signature to an existing file. To "
14203 "create the file itself, use something like L</fallocate>."
14207 #: ../fish/guestfish-actions.pod:3590
14212 #: ../fish/guestfish-actions.pod:3592
14215 " modprobe modulename\n"
14220 #: ../fish/guestfish-actions.pod:3594 ../src/guestfs-actions.pod:5565
14221 msgid "This loads a kernel module in the appliance."
14225 #: ../fish/guestfish-actions.pod:3596 ../src/guestfs-actions.pod:5567
14227 "The kernel module must have been whitelisted when libguestfs was built (see "
14228 "C<appliance/kmod.whitelist.in> in the source)."
14232 #: ../fish/guestfish-actions.pod:3599
14237 #: ../fish/guestfish-actions.pod:3601
14240 " mount device mountpoint\n"
14245 #: ../fish/guestfish-actions.pod:3603 ../src/guestfs-actions.pod:5581
14247 "Mount a guest disk at a position in the filesystem. Block devices are named "
14248 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
14249 "those block devices contain partitions, they will have the usual names (eg. "
14250 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
14254 #: ../fish/guestfish-actions.pod:3609 ../src/guestfs-actions.pod:5587
14256 "The rules are the same as for L<mount(2)>: A filesystem must first be "
14257 "mounted on C</> before others can be mounted. Other filesystems can only be "
14258 "mounted on directories which already exist."
14262 #: ../fish/guestfish-actions.pod:3614 ../src/guestfs-actions.pod:5592
14264 "The mounted filesystem is writable, if we have sufficient permissions on the "
14265 "underlying device."
14269 #: ../fish/guestfish-actions.pod:3617
14271 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
14272 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
14273 "problems for users. If your program might need to work with older versions "
14274 "of libguestfs, use L</mount-options> instead (using an empty string for the "
14275 "first parameter if you don't want any options)."
14279 #: ../fish/guestfish-actions.pod:3624
14284 #: ../fish/guestfish-actions.pod:3626
14287 " mount-9p mounttag mountpoint [options:..]\n"
14292 #: ../fish/guestfish-actions.pod:3628 ../src/guestfs-actions.pod:5621
14294 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
14299 #: ../fish/guestfish-actions.pod:3631 ../src/guestfs-actions.pod:5624
14301 "If required, C<trans=virtio> will be automatically added to the options. "
14302 "Any other options required can be passed in the optional C<options> "
14307 #: ../fish/guestfish-actions.pod:3637
14312 #: ../fish/guestfish-actions.pod:3639
14315 " mount-loop file mountpoint\n"
14320 #: ../fish/guestfish-actions.pod:3641 ../src/guestfs-actions.pod:5663
14322 "This command lets you mount C<file> (a filesystem image in a file) on a "
14323 "mount point. It is entirely equivalent to the command C<mount -o loop file "
14328 #: ../fish/guestfish-actions.pod:3645
14329 msgid "mount-options"
14333 #: ../fish/guestfish-actions.pod:3647
14336 " mount-options options device mountpoint\n"
14341 #: ../fish/guestfish-actions.pod:3649
14343 "This is the same as the L</mount> command, but it allows you to set the "
14344 "mount options as for the L<mount(8)> I<-o> flag."
14348 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5683
14350 "If the C<options> parameter is an empty string, then no options are passed "
14351 "(all options default to whatever the filesystem uses)."
14355 #: ../fish/guestfish-actions.pod:3657
14360 #: ../fish/guestfish-actions.pod:3659
14363 " mount-ro device mountpoint\n"
14368 #: ../fish/guestfish-actions.pod:3661
14370 "This is the same as the L</mount> command, but it mounts the filesystem with "
14371 "the read-only (I<-o ro>) flag."
14375 #: ../fish/guestfish-actions.pod:3664
14380 #: ../fish/guestfish-actions.pod:3666
14383 " mount-vfs options vfstype device mountpoint\n"
14388 #: ../fish/guestfish-actions.pod:3668
14390 "This is the same as the L</mount> command, but it allows you to set both the "
14391 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
14395 #: ../fish/guestfish-actions.pod:3672
14396 msgid "mountpoints"
14400 #: ../fish/guestfish-actions.pod:3674
14408 #: ../fish/guestfish-actions.pod:3676
14410 "This call is similar to L</mounts>. That call returns a list of devices. "
14411 "This one returns a hash table (map) of device name to directory where the "
14412 "device is mounted."
14416 #: ../fish/guestfish-actions.pod:3680
14421 #: ../fish/guestfish-actions.pod:3682
14429 #: ../fish/guestfish-actions.pod:3684 ../src/guestfs-actions.pod:5744
14431 "This returns the list of currently mounted filesystems. It returns the list "
14432 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
14436 #: ../fish/guestfish-actions.pod:3687 ../src/guestfs-actions.pod:5747
14437 msgid "Some internal mounts are not shown."
14441 #: ../fish/guestfish-actions.pod:3689
14442 msgid "See also: L</mountpoints>"
14446 #: ../fish/guestfish-actions.pod:3691
14451 #: ../fish/guestfish-actions.pod:3693
14459 #: ../fish/guestfish-actions.pod:3695 ../src/guestfs-actions.pod:5764
14461 "This moves a file from C<src> to C<dest> where C<dest> is either a "
14462 "destination filename or destination directory."
14466 #: ../fish/guestfish-actions.pod:3698
14467 msgid "ntfs-3g-probe"
14471 #: ../fish/guestfish-actions.pod:3700
14474 " ntfs-3g-probe true|false device\n"
14479 #: ../fish/guestfish-actions.pod:3702 ../src/guestfs-actions.pod:5778
14481 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
14482 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
14483 "write, and some cannot be mounted at all)."
14487 #: ../fish/guestfish-actions.pod:3706 ../src/guestfs-actions.pod:5782
14489 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
14490 "can be mounted read-write. Set it to false if you want to test if the "
14491 "volume can be mounted read-only."
14495 #: ../fish/guestfish-actions.pod:3710 ../src/guestfs-actions.pod:5786
14497 "The return value is an integer which C<0> if the operation would succeed, or "
14498 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
14502 #: ../fish/guestfish-actions.pod:3714
14507 #: ../fish/guestfish-actions.pod:3716
14510 " ntfsresize device\n"
14515 #: ../fish/guestfish-actions.pod:3718 ../fish/guestfish-actions.pod:3742
14516 #: ../src/guestfs-actions.pod:5807 ../src/guestfs-actions.pod:5839
14518 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
14519 "size of the underlying device."
14523 #: ../fish/guestfish-actions.pod:3721 ../src/guestfs-actions.pod:5810
14525 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
14526 "consistency check (for safety). You have to boot into Windows to perform "
14527 "this check and clear this condition. Furthermore, ntfsresize refuses to "
14528 "resize filesystems which have been marked in this way. So in effect it is "
14529 "not possible to call ntfsresize multiple times on a single filesystem "
14530 "without booting into Windows between each resize."
14534 #: ../fish/guestfish-actions.pod:3729 ../fish/guestfish-actions.pod:3768
14535 #: ../src/guestfs-actions.pod:5818 ../src/guestfs-actions.pod:5865
14536 msgid "See also L<ntfsresize(8)>."
14540 #: ../fish/guestfish-actions.pod:3731 ../fish/guestfish-actions.pod:3779
14542 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
14547 #: ../fish/guestfish-actions.pod:3738
14548 msgid "ntfsresize-opts"
14552 #: ../fish/guestfish-actions.pod:3740
14555 " ntfsresize-opts device [size:N] [force:true|false]\n"
14560 #: ../fish/guestfish-actions.pod:3751 ../src/guestfs-actions.pod:5848
14562 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
14563 "resized to fit the container (eg. partition)."
14567 #: ../fish/guestfish-actions.pod:3754 ../fish/guestfish-actions.pod:5075
14568 #: ../src/guestfs-actions.pod:5851 ../src/guestfs-actions.pod:7822
14573 #: ../fish/guestfish-actions.pod:3756 ../src/guestfs-actions.pod:5853
14575 "If this option is true, then force the resize of the filesystem even if the "
14576 "filesystem is marked as requiring a consistency check."
14580 #: ../fish/guestfish-actions.pod:3759
14582 "After the resize operation, the filesystem is always marked as requiring a "
14583 "consistency check (for safety). You have to boot into Windows to perform "
14584 "this check and clear this condition. If you I<don't> set the C<force> "
14585 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
14586 "a single filesystem without booting into Windows between each resize."
14590 #: ../fish/guestfish-actions.pod:3772
14591 msgid "ntfsresize-size"
14595 #: ../fish/guestfish-actions.pod:3774
14598 " ntfsresize-size device size\n"
14603 #: ../fish/guestfish-actions.pod:3776
14605 "This command is the same as L</ntfsresize> except that it allows you to "
14606 "specify the new size (in bytes) explicitly."
14610 #: ../fish/guestfish-actions.pod:3786
14615 #: ../fish/guestfish-actions.pod:3788
14618 " part-add device prlogex startsect endsect\n"
14623 #: ../fish/guestfish-actions.pod:3790
14625 "This command adds a partition to C<device>. If there is no partition table "
14626 "on the device, call L</part-init> first."
14630 #: ../fish/guestfish-actions.pod:3793 ../src/guestfs-actions.pod:5926
14632 "The C<prlogex> parameter is the type of partition. Normally you should pass "
14633 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
14634 "C<logical>) and C<e> (or C<extended>) partition types."
14638 #: ../fish/guestfish-actions.pod:3798 ../src/guestfs-actions.pod:5931
14640 "C<startsect> and C<endsect> are the start and end of the partition in "
14641 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
14642 "from the end of the disk (C<-1> is the last sector)."
14646 #: ../fish/guestfish-actions.pod:3802
14648 "Creating a partition which covers the whole disk is not so easy. Use L</"
14649 "part-disk> to do that."
14653 #: ../fish/guestfish-actions.pod:3805
14658 #: ../fish/guestfish-actions.pod:3807
14661 " part-del device partnum\n"
14666 #: ../fish/guestfish-actions.pod:3809 ../src/guestfs-actions.pod:5949
14667 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14671 #: ../fish/guestfish-actions.pod:3811 ../src/guestfs-actions.pod:5951
14673 "Note that in the case of MBR partitioning, deleting an extended partition "
14674 "also deletes any logical partitions it contains."
14678 #: ../fish/guestfish-actions.pod:3815
14683 #: ../fish/guestfish-actions.pod:3817
14686 " part-disk device parttype\n"
14691 #: ../fish/guestfish-actions.pod:3819
14693 "This command is simply a combination of L</part-init> followed by L</part-"
14694 "add> to create a single primary partition covering the whole disk."
14698 #: ../fish/guestfish-actions.pod:3823
14700 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14701 "possible values are described in L</part-init>."
14705 #: ../fish/guestfish-actions.pod:3826
14706 msgid "part-get-bootable"
14710 #: ../fish/guestfish-actions.pod:3828
14713 " part-get-bootable device partnum\n"
14718 #: ../fish/guestfish-actions.pod:3830 ../src/guestfs-actions.pod:5984
14720 "This command returns true if the partition C<partnum> on C<device> has the "
14721 "bootable flag set."
14725 #: ../fish/guestfish-actions.pod:3833
14726 msgid "See also L</part-set-bootable>."
14730 #: ../fish/guestfish-actions.pod:3835
14731 msgid "part-get-mbr-id"
14735 #: ../fish/guestfish-actions.pod:3837
14738 " part-get-mbr-id device partnum\n"
14743 #: ../fish/guestfish-actions.pod:3839 ../src/guestfs-actions.pod:6000
14745 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14746 "partition C<partnum>."
14750 #: ../fish/guestfish-actions.pod:3842 ../fish/guestfish-actions.pod:3986
14752 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14753 "undefined results for other partition table types (see L</part-get-"
14758 #: ../fish/guestfish-actions.pod:3846
14759 msgid "part-get-parttype"
14763 #: ../fish/guestfish-actions.pod:3848
14766 " part-get-parttype device\n"
14771 #: ../fish/guestfish-actions.pod:3850 ../src/guestfs-actions.pod:6017
14773 "This command examines the partition table on C<device> and returns the "
14774 "partition table type (format) being used."
14778 #: ../fish/guestfish-actions.pod:3853
14780 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14781 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14782 "possible, although unusual. See L</part-init> for a full list."
14786 #: ../fish/guestfish-actions.pod:3858
14791 #: ../fish/guestfish-actions.pod:3860
14794 " part-init device parttype\n"
14799 #: ../fish/guestfish-actions.pod:3862 ../src/guestfs-actions.pod:6037
14801 "This creates an empty partition table on C<device> of one of the partition "
14802 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14803 "(for large disks)."
14807 #: ../fish/guestfish-actions.pod:3866
14809 "Initially there are no partitions. Following this, you should call L</part-"
14810 "add> for each partition required."
14814 #: ../fish/guestfish-actions.pod:3869 ../src/guestfs-actions.pod:6044
14815 msgid "Possible values for C<parttype> are:"
14819 #: ../fish/guestfish-actions.pod:3873 ../src/guestfs-actions.pod:6048
14824 #: ../fish/guestfish-actions.pod:3875 ../src/guestfs-actions.pod:6050
14829 #: ../fish/guestfish-actions.pod:3877 ../src/guestfs-actions.pod:6052
14830 msgid "Intel EFI / GPT partition table."
14834 #: ../fish/guestfish-actions.pod:3879 ../src/guestfs-actions.pod:6054
14836 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14837 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14838 "the C<mbr> format."
14842 #: ../fish/guestfish-actions.pod:3883 ../src/guestfs-actions.pod:6058
14847 #: ../fish/guestfish-actions.pod:3885 ../src/guestfs-actions.pod:6060
14852 #: ../fish/guestfish-actions.pod:3887 ../src/guestfs-actions.pod:6062
14854 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14855 "Windows. This partition type will B<only> work for device sizes up to 2 "
14856 "TB. For large disks we recommend using C<gpt>."
14860 #: ../fish/guestfish-actions.pod:3894 ../src/guestfs-actions.pod:6069
14862 "Other partition table types that may work but are not supported include:"
14866 #: ../fish/guestfish-actions.pod:3899 ../src/guestfs-actions.pod:6074
14871 #: ../fish/guestfish-actions.pod:3901 ../src/guestfs-actions.pod:6076
14872 msgid "AIX disk labels."
14876 #: ../fish/guestfish-actions.pod:3903 ../src/guestfs-actions.pod:6078
14881 #: ../fish/guestfish-actions.pod:3905 ../src/guestfs-actions.pod:6080
14886 #: ../fish/guestfish-actions.pod:3907 ../src/guestfs-actions.pod:6082
14887 msgid "Amiga \"Rigid Disk Block\" format."
14891 #: ../fish/guestfish-actions.pod:3909 ../src/guestfs-actions.pod:6084
14896 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6086
14897 msgid "BSD disk labels."
14901 #: ../fish/guestfish-actions.pod:3913 ../src/guestfs-actions.pod:6088
14906 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6090
14907 msgid "DASD, used on IBM mainframes."
14911 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6092
14916 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6094
14917 msgid "MIPS/SGI volumes."
14921 #: ../fish/guestfish-actions.pod:3921 ../src/guestfs-actions.pod:6096
14926 #: ../fish/guestfish-actions.pod:3923 ../src/guestfs-actions.pod:6098
14927 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14931 #: ../fish/guestfish-actions.pod:3925 ../src/guestfs-actions.pod:6100
14936 #: ../fish/guestfish-actions.pod:3927 ../src/guestfs-actions.pod:6102
14937 msgid "NEC PC-98 format, common in Japan apparently."
14941 #: ../fish/guestfish-actions.pod:3929 ../src/guestfs-actions.pod:6104
14946 #: ../fish/guestfish-actions.pod:3931 ../src/guestfs-actions.pod:6106
14947 msgid "Sun disk labels."
14951 #: ../fish/guestfish-actions.pod:3935
14956 #: ../fish/guestfish-actions.pod:3937
14959 " part-list device\n"
14964 #: ../fish/guestfish-actions.pod:3939 ../src/guestfs-actions.pod:6120
14966 "This command parses the partition table on C<device> and returns the list of "
14967 "partitions found."
14971 #: ../fish/guestfish-actions.pod:3942 ../src/guestfs-actions.pod:6123
14972 msgid "The fields in the returned structure are:"
14976 #: ../fish/guestfish-actions.pod:3946 ../src/guestfs-actions.pod:6127
14977 msgid "B<part_num>"
14981 #: ../fish/guestfish-actions.pod:3948 ../src/guestfs-actions.pod:6129
14982 msgid "Partition number, counting from 1."
14986 #: ../fish/guestfish-actions.pod:3950 ../src/guestfs-actions.pod:6131
14987 msgid "B<part_start>"
14991 #: ../fish/guestfish-actions.pod:3952
14993 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14994 "the device's sector size, see L</blockdev-getss>."
14998 #: ../fish/guestfish-actions.pod:3955 ../src/guestfs-actions.pod:6136
14999 msgid "B<part_end>"
15003 #: ../fish/guestfish-actions.pod:3957 ../src/guestfs-actions.pod:6138
15004 msgid "End of the partition in bytes."
15008 #: ../fish/guestfish-actions.pod:3959 ../src/guestfs-actions.pod:6140
15009 msgid "B<part_size>"
15013 #: ../fish/guestfish-actions.pod:3961 ../src/guestfs-actions.pod:6142
15014 msgid "Size of the partition in bytes."
15018 #: ../fish/guestfish-actions.pod:3965
15019 msgid "part-set-bootable"
15023 #: ../fish/guestfish-actions.pod:3967
15026 " part-set-bootable device partnum true|false\n"
15031 #: ../fish/guestfish-actions.pod:3969 ../src/guestfs-actions.pod:6160
15033 "This sets the bootable flag on partition numbered C<partnum> on device "
15034 "C<device>. Note that partitions are numbered from 1."
15038 #: ../fish/guestfish-actions.pod:3972 ../src/guestfs-actions.pod:6163
15040 "The bootable flag is used by some operating systems (notably Windows) to "
15041 "determine which partition to boot from. It is by no means universally "
15046 #: ../fish/guestfish-actions.pod:3976
15047 msgid "part-set-mbr-id"
15051 #: ../fish/guestfish-actions.pod:3978
15054 " part-set-mbr-id device partnum idbyte\n"
15059 #: ../fish/guestfish-actions.pod:3980 ../src/guestfs-actions.pod:6179
15061 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
15062 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
15063 "documentation are in fact hexadecimal numbers, but usually documented "
15064 "without any leading \"0x\" which might be confusing."
15068 #: ../fish/guestfish-actions.pod:3990
15069 msgid "part-set-name"
15073 #: ../fish/guestfish-actions.pod:3992
15076 " part-set-name device partnum name\n"
15081 #: ../fish/guestfish-actions.pod:3994 ../src/guestfs-actions.pod:6201
15083 "This sets the partition name on partition numbered C<partnum> on device "
15084 "C<device>. Note that partitions are numbered from 1."
15088 #: ../fish/guestfish-actions.pod:3997 ../src/guestfs-actions.pod:6204
15090 "The partition name can only be set on certain types of partition table. "
15091 "This works on C<gpt> but not on C<mbr> partitions."
15095 #: ../fish/guestfish-actions.pod:4000
15096 msgid "part-to-dev"
15100 #: ../fish/guestfish-actions.pod:4002
15103 " part-to-dev partition\n"
15108 #: ../fish/guestfish-actions.pod:4004 ../src/guestfs-actions.pod:6217
15110 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
15111 "partition number, returning the device name (eg. \"/dev/sdb\")."
15115 #: ../fish/guestfish-actions.pod:4008 ../fish/guestfish-actions.pod:4020
15117 "The named partition must exist, for example as a string returned from L</"
15118 "list-partitions>."
15122 #: ../fish/guestfish-actions.pod:4011
15123 msgid "See also L</part-to-partnum>."
15127 #: ../fish/guestfish-actions.pod:4013
15128 msgid "part-to-partnum"
15132 #: ../fish/guestfish-actions.pod:4015
15135 " part-to-partnum partition\n"
15140 #: ../fish/guestfish-actions.pod:4017 ../src/guestfs-actions.pod:6237
15142 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
15143 "partition number (eg. C<1>)."
15147 #: ../fish/guestfish-actions.pod:4023
15148 msgid "See also L</part-to-dev>."
15152 #: ../fish/guestfish-actions.pod:4025
15153 msgid "ping-daemon"
15157 #: ../fish/guestfish-actions.pod:4027
15165 #: ../fish/guestfish-actions.pod:4029 ../src/guestfs-actions.pod:6254
15167 "This is a test probe into the guestfs daemon running inside the qemu "
15168 "subprocess. Calling this function checks that the daemon responds to the "
15169 "ping message, without affecting the daemon or attached block device(s) in "
15174 #: ../fish/guestfish-actions.pod:4034
15179 #: ../fish/guestfish-actions.pod:4036
15182 " pread path count offset\n"
15187 #: ../fish/guestfish-actions.pod:4038 ../src/guestfs-actions.pod:6272
15189 "This command lets you read part of a file. It reads C<count> bytes of the "
15190 "file, starting at C<offset>, from file C<path>."
15194 #: ../fish/guestfish-actions.pod:4041 ../fish/guestfish-actions.pod:4056
15195 #: ../src/guestfs-actions.pod:6275 ../src/guestfs-actions.pod:6301
15197 "This may read fewer bytes than requested. For further details see the "
15198 "L<pread(2)> system call."
15202 #: ../fish/guestfish-actions.pod:4044
15203 msgid "See also L</pwrite>, L</pread-device>."
15207 #: ../fish/guestfish-actions.pod:4049
15208 msgid "pread-device"
15212 #: ../fish/guestfish-actions.pod:4051
15215 " pread-device device count offset\n"
15220 #: ../fish/guestfish-actions.pod:4053 ../src/guestfs-actions.pod:6298
15222 "This command lets you read part of a file. It reads C<count> bytes of "
15223 "C<device>, starting at C<offset>."
15227 #: ../fish/guestfish-actions.pod:4059
15228 msgid "See also L</pread>."
15232 #: ../fish/guestfish-actions.pod:4064
15237 #: ../fish/guestfish-actions.pod:4066
15240 " pvcreate device\n"
15245 #: ../fish/guestfish-actions.pod:4068 ../src/guestfs-actions.pod:6321
15247 "This creates an LVM physical volume on the named C<device>, where C<device> "
15248 "should usually be a partition name such as C</dev/sda1>."
15252 #: ../fish/guestfish-actions.pod:4072
15257 #: ../fish/guestfish-actions.pod:4074
15260 " pvremove device\n"
15265 #: ../fish/guestfish-actions.pod:4076 ../src/guestfs-actions.pod:6335
15267 "This wipes a physical volume C<device> so that LVM will no longer recognise "
15272 #: ../fish/guestfish-actions.pod:4079 ../src/guestfs-actions.pod:6338
15274 "The implementation uses the C<pvremove> command which refuses to wipe "
15275 "physical volumes that contain any volume groups, so you have to remove those "
15280 #: ../fish/guestfish-actions.pod:4083
15285 #: ../fish/guestfish-actions.pod:4085
15288 " pvresize device\n"
15293 #: ../fish/guestfish-actions.pod:4087 ../src/guestfs-actions.pod:6352
15295 "This resizes (expands or shrinks) an existing LVM physical volume to match "
15296 "the new size of the underlying device."
15300 #: ../fish/guestfish-actions.pod:4090
15301 msgid "pvresize-size"
15305 #: ../fish/guestfish-actions.pod:4092
15308 " pvresize-size device size\n"
15313 #: ../fish/guestfish-actions.pod:4094
15315 "This command is the same as L</pvresize> except that it allows you to "
15316 "specify the new size (in bytes) explicitly."
15320 #: ../fish/guestfish-actions.pod:4097
15325 #: ../fish/guestfish-actions.pod:4099
15333 #: ../fish/guestfish-actions.pod:4101 ../src/guestfs-actions.pod:6378
15335 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15340 #: ../fish/guestfish-actions.pod:4104 ../src/guestfs-actions.pod:6381
15342 "This returns a list of just the device names that contain PVs (eg. C</dev/"
15347 #: ../fish/guestfish-actions.pod:4107
15348 msgid "See also L</pvs-full>."
15352 #: ../fish/guestfish-actions.pod:4109
15357 #: ../fish/guestfish-actions.pod:4111
15365 #: ../fish/guestfish-actions.pod:4113 ../src/guestfs-actions.pod:6397
15367 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15368 "(8)> command. The \"full\" version includes all fields."
15372 #: ../fish/guestfish-actions.pod:4116
15377 #: ../fish/guestfish-actions.pod:4118
15385 #: ../fish/guestfish-actions.pod:4120 ../src/guestfs-actions.pod:6412
15386 msgid "This command returns the UUID of the LVM PV C<device>."
15390 #: ../fish/guestfish-actions.pod:4122
15395 #: ../fish/guestfish-actions.pod:4124
15398 " pwrite path content offset\n"
15403 #: ../fish/guestfish-actions.pod:4126 ../src/guestfs-actions.pod:6428
15405 "This command writes to part of a file. It writes the data buffer C<content> "
15406 "to the file C<path> starting at offset C<offset>."
15410 #: ../fish/guestfish-actions.pod:4129 ../src/guestfs-actions.pod:6431
15412 "This command implements the L<pwrite(2)> system call, and like that system "
15413 "call it may not write the full data requested. The return value is the "
15414 "number of bytes that were actually written to the file. This could even be "
15415 "0, although short writes are unlikely for regular files in ordinary "
15420 #: ../fish/guestfish-actions.pod:4135
15421 msgid "See also L</pread>, L</pwrite-device>."
15425 #: ../fish/guestfish-actions.pod:4140
15426 msgid "pwrite-device"
15430 #: ../fish/guestfish-actions.pod:4142
15433 " pwrite-device device content offset\n"
15438 #: ../fish/guestfish-actions.pod:4144 ../src/guestfs-actions.pod:6455
15440 "This command writes to part of a device. It writes the data buffer "
15441 "C<content> to C<device> starting at offset C<offset>."
15445 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6458
15447 "This command implements the L<pwrite(2)> system call, and like that system "
15448 "call it may not write the full data requested (although short writes to disk "
15449 "devices and partitions are probably impossible with standard Linux kernels)."
15453 #: ../fish/guestfish-actions.pod:4152
15454 msgid "See also L</pwrite>."
15458 #: ../fish/guestfish-actions.pod:4157
15463 #: ../fish/guestfish-actions.pod:4159
15466 " read-file path\n"
15471 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6479
15472 msgid "This calls returns the contents of the file C<path> as a buffer."
15476 #: ../fish/guestfish-actions.pod:4164
15478 "Unlike L</cat>, this function can correctly handle files that contain "
15479 "embedded ASCII NUL characters. However unlike L</download>, this function "
15480 "is limited in the total size of file that can be handled."
15484 #: ../fish/guestfish-actions.pod:4172
15489 #: ../fish/guestfish-actions.pod:4174
15492 " read-lines path\n"
15497 #: ../fish/guestfish-actions.pod:4178 ../src/guestfs-actions.pod:6504
15499 "The file contents are returned as a list of lines. Trailing C<LF> and "
15500 "C<CRLF> character sequences are I<not> returned."
15504 #: ../fish/guestfish-actions.pod:4181
15506 "Note that this function cannot correctly handle binary files (specifically, "
15507 "files containing C<\\0> character which is treated as end of line). For "
15508 "those you need to use the L</read-file> function which has a more complex "
15513 #: ../fish/guestfish-actions.pod:4186
15518 #: ../fish/guestfish-actions.pod:4188
15526 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6524
15527 msgid "This returns the list of directory entries in directory C<dir>."
15531 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6526
15533 "All entries in the directory are returned, including C<.> and C<..>. The "
15534 "entries are I<not> sorted, but returned in the same order as the underlying "
15539 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6530
15541 "Also this call returns basic file type information about each file. The "
15542 "C<ftyp> field will contain one of the following characters:"
15546 #: ../fish/guestfish-actions.pod:4201 ../src/guestfs-actions.pod:6535
15551 #: ../fish/guestfish-actions.pod:4203 ../src/guestfs-actions.pod:6537
15552 msgid "Block special"
15556 #: ../fish/guestfish-actions.pod:4205 ../src/guestfs-actions.pod:6539
15561 #: ../fish/guestfish-actions.pod:4207 ../src/guestfs-actions.pod:6541
15562 msgid "Char special"
15566 #: ../fish/guestfish-actions.pod:4209 ../src/guestfs-actions.pod:6543
15571 #: ../fish/guestfish-actions.pod:4211 ../src/guestfs-actions.pod:6545
15576 #: ../fish/guestfish-actions.pod:4213 ../src/guestfs-actions.pod:6547
15581 #: ../fish/guestfish-actions.pod:4215 ../src/guestfs-actions.pod:6549
15582 msgid "FIFO (named pipe)"
15586 #: ../fish/guestfish-actions.pod:4217 ../src/guestfs-actions.pod:6551
15591 #: ../fish/guestfish-actions.pod:4219 ../src/guestfs-actions.pod:6553
15592 msgid "Symbolic link"
15596 #: ../fish/guestfish-actions.pod:4221 ../src/guestfs-actions.pod:6555
15601 #: ../fish/guestfish-actions.pod:4223 ../src/guestfs-actions.pod:6557
15602 msgid "Regular file"
15606 #: ../fish/guestfish-actions.pod:4225 ../src/guestfs-actions.pod:6559
15611 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6561
15616 #: ../fish/guestfish-actions.pod:4229 ../src/guestfs-actions.pod:6563
15621 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6565
15622 msgid "Unknown file type"
15626 #: ../fish/guestfish-actions.pod:4233 ../src/guestfs-actions.pod:6567
15631 #: ../fish/guestfish-actions.pod:4235 ../src/guestfs-actions.pod:6569
15633 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
15637 #: ../fish/guestfish-actions.pod:4240
15639 "This function is primarily intended for use by programs. To get a simple "
15640 "list of names, use L</ls>. To get a printable directory for human "
15641 "consumption, use L</ll>."
15645 #: ../fish/guestfish-actions.pod:4244
15650 #: ../fish/guestfish-actions.pod:4246
15658 #: ../fish/guestfish-actions.pod:4248 ../src/guestfs-actions.pod:6590
15659 msgid "This command reads the target of a symbolic link."
15663 #: ../fish/guestfish-actions.pod:4250
15664 msgid "readlinklist"
15668 #: ../fish/guestfish-actions.pod:4252
15671 " readlinklist path 'names ...'\n"
15676 #: ../fish/guestfish-actions.pod:4254 ../src/guestfs-actions.pod:6604
15678 "This call allows you to do a C<readlink> operation on multiple files, where "
15679 "all files are in the directory C<path>. C<names> is the list of files from "
15684 #: ../fish/guestfish-actions.pod:4258 ../src/guestfs-actions.pod:6608
15686 "On return you get a list of strings, with a one-to-one correspondence to the "
15687 "C<names> list. Each string is the value of the symbolic link."
15691 #: ../fish/guestfish-actions.pod:4262 ../src/guestfs-actions.pod:6612
15693 "If the C<readlink(2)> operation fails on any name, then the corresponding "
15694 "result string is the empty string C<\"\">. However the whole operation is "
15695 "completed even if there were C<readlink(2)> errors, and so you can call this "
15696 "function with names where you don't know if they are symbolic links already "
15697 "(albeit slightly less efficient)."
15701 #: ../fish/guestfish-actions.pod:4269 ../src/guestfs-actions.pod:6619
15703 "This call is intended for programs that want to efficiently list a directory "
15704 "contents without making many round-trips. Very long directory listings "
15705 "might cause the protocol message size to be exceeded, causing this call to "
15706 "fail. The caller must split up such requests into smaller groups of names."
15710 #: ../fish/guestfish-actions.pod:4276
15715 #: ../fish/guestfish-actions.pod:4278
15723 #: ../fish/guestfish-actions.pod:4280 ../src/guestfs-actions.pod:6638
15725 "Return the canonicalized absolute pathname of C<path>. The returned path "
15726 "has no C<.>, C<..> or symbolic link path elements."
15730 #: ../fish/guestfish-actions.pod:4283
15731 msgid "removexattr"
15735 #: ../fish/guestfish-actions.pod:4285
15738 " removexattr xattr path\n"
15743 #: ../fish/guestfish-actions.pod:4287 ../src/guestfs-actions.pod:6653
15745 "This call removes the extended attribute named C<xattr> of the file C<path>."
15749 #: ../fish/guestfish-actions.pod:4290
15750 msgid "See also: L</lremovexattr>, L<attr(5)>."
15754 #: ../fish/guestfish-actions.pod:4292
15759 #: ../fish/guestfish-actions.pod:4294
15762 " resize2fs device\n"
15767 #: ../fish/guestfish-actions.pod:4296 ../src/guestfs-actions.pod:6668
15769 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15770 "underlying device."
15774 #: ../fish/guestfish-actions.pod:4299
15776 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
15777 "before calling this command. For unknown reasons C<resize2fs> sometimes "
15778 "gives an error about this and sometimes not. In any case, it is always safe "
15779 "to call L</e2fsck-f> before calling this function."
15783 #: ../fish/guestfish-actions.pod:4305
15784 msgid "resize2fs-M"
15788 #: ../fish/guestfish-actions.pod:4307
15791 " resize2fs-M device\n"
15796 #: ../fish/guestfish-actions.pod:4309
15798 "This command is the same as L</resize2fs>, but the filesystem is resized to "
15799 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
15804 #: ../fish/guestfish-actions.pod:4313
15806 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
15807 "and read the C<Block size> and C<Block count> values. These two numbers, "
15808 "multiplied together, give the resulting size of the minimal filesystem in "
15813 #: ../fish/guestfish-actions.pod:4318
15814 msgid "resize2fs-size"
15818 #: ../fish/guestfish-actions.pod:4320
15821 " resize2fs-size device size\n"
15826 #: ../fish/guestfish-actions.pod:4322
15828 "This command is the same as L</resize2fs> except that it allows you to "
15829 "specify the new size (in bytes) explicitly."
15833 #: ../fish/guestfish-actions.pod:4325
15838 #: ../fish/guestfish-actions.pod:4327
15846 #: ../fish/guestfish-actions.pod:4329 ../src/guestfs-actions.pod:6720
15847 msgid "Remove the single file C<path>."
15851 #: ../fish/guestfish-actions.pod:4331
15856 #: ../fish/guestfish-actions.pod:4333
15864 #: ../fish/guestfish-actions.pod:4335 ../src/guestfs-actions.pod:6732
15866 "Remove the file or directory C<path>, recursively removing the contents if "
15867 "its a directory. This is like the C<rm -rf> shell command."
15871 #: ../fish/guestfish-actions.pod:4339
15876 #: ../fish/guestfish-actions.pod:4341
15884 #: ../fish/guestfish-actions.pod:4343 ../src/guestfs-actions.pod:6746
15885 msgid "Remove the single directory C<path>."
15889 #: ../fish/guestfish-actions.pod:4345
15890 msgid "rmmountpoint"
15894 #: ../fish/guestfish-actions.pod:4347
15897 " rmmountpoint exemptpath\n"
15902 #: ../fish/guestfish-actions.pod:4349
15904 "This calls removes a mountpoint that was previously created with L</"
15905 "mkmountpoint>. See L</mkmountpoint> for full details."
15909 #: ../fish/guestfish-actions.pod:4353
15910 msgid "scrub-device"
15914 #: ../fish/guestfish-actions.pod:4355
15917 " scrub-device device\n"
15922 #: ../fish/guestfish-actions.pod:4357 ../src/guestfs-actions.pod:6772
15924 "This command writes patterns over C<device> to make data retrieval more "
15929 #: ../fish/guestfish-actions.pod:4360 ../fish/guestfish-actions.pod:4372
15930 #: ../fish/guestfish-actions.pod:4385 ../src/guestfs-actions.pod:6775
15931 #: ../src/guestfs-actions.pod:6793 ../src/guestfs-actions.pod:6812
15933 "It is an interface to the L<scrub(1)> program. See that manual page for "
15938 #: ../fish/guestfish-actions.pod:4363
15943 #: ../fish/guestfish-actions.pod:4365
15946 " scrub-file file\n"
15951 #: ../fish/guestfish-actions.pod:4367 ../src/guestfs-actions.pod:6788
15953 "This command writes patterns over a file to make data retrieval more "
15958 #: ../fish/guestfish-actions.pod:4370 ../src/guestfs-actions.pod:6791
15959 msgid "The file is I<removed> after scrubbing."
15963 #: ../fish/guestfish-actions.pod:4375
15964 msgid "scrub-freespace"
15968 #: ../fish/guestfish-actions.pod:4377
15971 " scrub-freespace dir\n"
15976 #: ../fish/guestfish-actions.pod:4379
15978 "This command creates the directory C<dir> and then fills it with files until "
15979 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
15980 "deletes them. The intention is to scrub any free space on the partition "
15981 "containing C<dir>."
15985 #: ../fish/guestfish-actions.pod:4388
15990 #: ../fish/guestfish-actions.pod:4390
15995 #: ../fish/guestfish-actions.pod:4392
15998 " set-append append\n"
16003 #: ../fish/guestfish-actions.pod:4394 ../src/guestfs-actions.pod:6825
16005 "This function is used to add additional options to the guest kernel command "
16010 #: ../fish/guestfish-actions.pod:4397 ../src/guestfs-actions.pod:6828
16012 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
16013 "environment variable."
16017 #: ../fish/guestfish-actions.pod:4400 ../src/guestfs-actions.pod:6831
16019 "Setting C<append> to C<NULL> means I<no> additional options are passed "
16020 "(libguestfs always adds a few of its own)."
16024 #: ../fish/guestfish-actions.pod:4403
16025 msgid "set-attach-method"
16029 #: ../fish/guestfish-actions.pod:4405
16030 msgid "attach-method"
16034 #: ../fish/guestfish-actions.pod:4407
16037 " set-attach-method attachmethod\n"
16042 #: ../fish/guestfish-actions.pod:4409 ../src/guestfs-actions.pod:6844
16044 "Set the method that libguestfs uses to connect to the back end guestfsd "
16045 "daemon. Possible methods are:"
16049 #: ../fish/guestfish-actions.pod:4414 ../src/guestfs-actions.pod:6849
16050 #: ../src/guestfs.pod:2917
16051 msgid "C<appliance>"
16055 #: ../fish/guestfish-actions.pod:4416 ../src/guestfs-actions.pod:6851
16057 "Launch an appliance and connect to it. This is the ordinary method and the "
16062 #: ../fish/guestfish-actions.pod:4419 ../src/guestfs-actions.pod:6854
16063 msgid "C<unix:I<path>>"
16067 #: ../fish/guestfish-actions.pod:4421 ../src/guestfs-actions.pod:6856
16068 msgid "Connect to the Unix domain socket I<path>."
16072 #: ../fish/guestfish-actions.pod:4423 ../src/guestfs-actions.pod:6858
16074 "This method lets you connect to an existing daemon or (using virtio-serial) "
16075 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
16076 "RUNNING DAEMONS>."
16080 #: ../fish/guestfish-actions.pod:4429
16081 msgid "set-autosync"
16085 #: ../fish/guestfish-actions.pod:4431
16090 #: ../fish/guestfish-actions.pod:4433
16093 " set-autosync true|false\n"
16098 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6874
16100 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
16101 "effort attempt to make filesystems consistent and synchronized when the "
16102 "handle is closed (also if the program exits without closing handles)."
16106 #: ../fish/guestfish-actions.pod:4440 ../src/guestfs-actions.pod:6879
16108 "This is enabled by default (since libguestfs 1.5.24, previously it was "
16109 "disabled by default)."
16113 #: ../fish/guestfish-actions.pod:4443
16118 #: ../fish/guestfish-actions.pod:4445
16123 #: ../fish/guestfish-actions.pod:4447
16126 " set-direct true|false\n"
16131 #: ../fish/guestfish-actions.pod:4449 ../src/guestfs-actions.pod:6892
16133 "If the direct appliance mode flag is enabled, then stdin and stdout are "
16134 "passed directly through to the appliance once it is launched."
16138 #: ../fish/guestfish-actions.pod:4453
16140 "One consequence of this is that log messages aren't caught by the library "
16141 "and handled by L</set-log-message-callback>, but go straight to stdout."
16145 #: ../fish/guestfish-actions.pod:4457 ../src/guestfs-actions.pod:6900
16146 msgid "You probably don't want to use this unless you know what you are doing."
16150 #: ../fish/guestfish-actions.pod:4460 ../src/guestfs-actions.pod:6903
16151 msgid "The default is disabled."
16155 #: ../fish/guestfish-actions.pod:4462
16156 msgid "set-e2label"
16160 #: ../fish/guestfish-actions.pod:4464
16163 " set-e2label device label\n"
16168 #: ../fish/guestfish-actions.pod:4466 ../src/guestfs-actions.pod:6916
16170 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
16171 "C<label>. Filesystem labels are limited to 16 characters."
16175 #: ../fish/guestfish-actions.pod:4470
16177 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
16178 "label on a filesystem."
16182 #: ../fish/guestfish-actions.pod:4473
16187 #: ../fish/guestfish-actions.pod:4475
16190 " set-e2uuid device uuid\n"
16195 #: ../fish/guestfish-actions.pod:4477 ../src/guestfs-actions.pod:6934
16197 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
16198 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
16199 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
16203 #: ../fish/guestfish-actions.pod:4482
16205 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
16206 "UUID of a filesystem."
16210 #: ../fish/guestfish-actions.pod:4485
16211 msgid "set-memsize"
16215 #: ../fish/guestfish-actions.pod:4487
16220 #: ../fish/guestfish-actions.pod:4489
16223 " set-memsize memsize\n"
16228 #: ../fish/guestfish-actions.pod:4491
16230 "This sets the memory size in megabytes allocated to the qemu subprocess. "
16231 "This only has any effect if called before L</launch>."
16235 #: ../fish/guestfish-actions.pod:4495 ../src/guestfs-actions.pod:6956
16237 "You can also change this by setting the environment variable "
16238 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
16242 #: ../fish/guestfish-actions.pod:4502
16243 msgid "set-network"
16247 #: ../fish/guestfish-actions.pod:4504
16252 #: ../fish/guestfish-actions.pod:4506
16255 " set-network true|false\n"
16260 #: ../fish/guestfish-actions.pod:4508 ../src/guestfs-actions.pod:6973
16262 "If C<network> is true, then the network is enabled in the libguestfs "
16263 "appliance. The default is false."
16267 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6976
16269 "This affects whether commands are able to access the network (see L<guestfs"
16270 "(3)/RUNNING COMMANDS>)."
16274 #: ../fish/guestfish-actions.pod:4514
16276 "You must call this before calling L</launch>, otherwise it has no effect."
16280 #: ../fish/guestfish-actions.pod:4517
16285 #: ../fish/guestfish-actions.pod:4521
16288 " set-path searchpath\n"
16293 #: ../fish/guestfish-actions.pod:4523 ../src/guestfs-actions.pod:6992
16294 msgid "Set the path that libguestfs searches for kernel and initrd.img."
16298 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6994
16300 "The default is C<$libdir/guestfs> unless overridden by setting "
16301 "C<LIBGUESTFS_PATH> environment variable."
16305 #: ../fish/guestfish-actions.pod:4528 ../src/guestfs-actions.pod:6997
16306 msgid "Setting C<path> to C<NULL> restores the default path."
16310 #: ../fish/guestfish-actions.pod:4530
16315 #: ../fish/guestfish-actions.pod:4532
16320 #: ../fish/guestfish-actions.pod:4534
16323 " set-pgroup true|false\n"
16328 #: ../fish/guestfish-actions.pod:4536 ../src/guestfs-actions.pod:7009
16330 "If C<pgroup> is true, child processes are placed into their own process "
16335 #: ../fish/guestfish-actions.pod:4539 ../src/guestfs-actions.pod:7012
16337 "The practical upshot of this is that signals like C<SIGINT> (from users "
16338 "pressing C<^C>) won't be received by the child process."
16342 #: ../fish/guestfish-actions.pod:4542 ../src/guestfs-actions.pod:7015
16344 "The default for this flag is false, because usually you want C<^C> to kill "
16349 #: ../fish/guestfish-actions.pod:4545
16354 #: ../fish/guestfish-actions.pod:4547
16359 #: ../fish/guestfish-actions.pod:4549
16367 #: ../fish/guestfish-actions.pod:4551 ../src/guestfs-actions.pod:7028
16368 msgid "Set the qemu binary that we will use."
16372 #: ../fish/guestfish-actions.pod:4553 ../src/guestfs-actions.pod:7030
16374 "The default is chosen when the library was compiled by the configure script."
16378 #: ../fish/guestfish-actions.pod:4556 ../src/guestfs-actions.pod:7033
16380 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
16385 #: ../fish/guestfish-actions.pod:4559 ../src/guestfs-actions.pod:7036
16386 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
16390 #: ../fish/guestfish-actions.pod:4561 ../src/guestfs-actions.pod:7038
16392 "Note that you should call this function as early as possible after creating "
16393 "the handle. This is because some pre-launch operations depend on testing "
16394 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
16395 "don't retest features, and so you might see inconsistent results. Using the "
16396 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
16397 "the qemu binary at the same time as the handle is created."
16401 #: ../fish/guestfish-actions.pod:4569
16402 msgid "set-recovery-proc"
16406 #: ../fish/guestfish-actions.pod:4571
16407 msgid "recovery-proc"
16411 #: ../fish/guestfish-actions.pod:4573
16414 " set-recovery-proc true|false\n"
16419 #: ../fish/guestfish-actions.pod:4575
16421 "If this is called with the parameter C<false> then L</launch> does not "
16422 "create a recovery process. The purpose of the recovery process is to stop "
16423 "runaway qemu processes in the case where the main program aborts abruptly."
16427 #: ../fish/guestfish-actions.pod:4580
16429 "This only has any effect if called before L</launch>, and the default is "
16434 #: ../fish/guestfish-actions.pod:4583 ../src/guestfs-actions.pod:7064
16436 "About the only time when you would want to disable this is if the main "
16437 "process will fork itself into the background (\"daemonize\" itself). In "
16438 "this case the recovery process thinks that the main program has disappeared "
16439 "and so kills qemu, which is not very helpful."
16443 #: ../fish/guestfish-actions.pod:4589
16444 msgid "set-selinux"
16448 #: ../fish/guestfish-actions.pod:4591
16453 #: ../fish/guestfish-actions.pod:4593
16456 " set-selinux true|false\n"
16461 #: ../fish/guestfish-actions.pod:4595 ../src/guestfs-actions.pod:7080
16463 "This sets the selinux flag that is passed to the appliance at boot time. "
16464 "The default is C<selinux=0> (disabled)."
16468 #: ../fish/guestfish-actions.pod:4598 ../src/guestfs-actions.pod:7083
16470 "Note that if SELinux is enabled, it is always in Permissive mode "
16471 "(C<enforcing=0>)."
16475 #: ../fish/guestfish-actions.pod:4604
16480 #: ../fish/guestfish-actions.pod:4606
16485 #: ../fish/guestfish-actions.pod:4608
16493 #: ../fish/guestfish-actions.pod:4610 ../src/guestfs-actions.pod:7099
16495 "Change the number of virtual CPUs assigned to the appliance. The default is "
16496 "C<1>. Increasing this may improve performance, though often it has no "
16501 #: ../fish/guestfish-actions.pod:4614
16502 msgid "This function must be called before L</launch>."
16506 #: ../fish/guestfish-actions.pod:4616
16511 #: ../fish/guestfish-actions.pod:4618
16516 #: ../fish/guestfish-actions.pod:4620
16519 " set-trace true|false\n"
16524 #: ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:7115
16526 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
16527 "return values are traced."
16531 #: ../fish/guestfish-actions.pod:4625 ../src/guestfs-actions.pod:7118
16533 "If you want to trace C API calls into libguestfs (and other libraries) then "
16534 "possibly a better way is to use the external ltrace(1) command."
16538 #: ../fish/guestfish-actions.pod:4629 ../src/guestfs-actions.pod:7122
16540 "Command traces are disabled unless the environment variable "
16541 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
16545 #: ../fish/guestfish-actions.pod:4632
16547 "Trace messages are normally sent to C<stderr>, unless you register a "
16548 "callback to send them somewhere else (see L</set-event-callback>)."
16552 #: ../fish/guestfish-actions.pod:4636
16553 msgid "set-verbose"
16557 #: ../fish/guestfish-actions.pod:4638
16562 #: ../fish/guestfish-actions.pod:4640
16565 " set-verbose true|false\n"
16570 #: ../fish/guestfish-actions.pod:4642 ../src/guestfs-actions.pod:7139
16571 msgid "If C<verbose> is true, this turns on verbose messages."
16575 #: ../fish/guestfish-actions.pod:4644 ../src/guestfs-actions.pod:7141
16577 "Verbose messages are disabled unless the environment variable "
16578 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
16582 #: ../fish/guestfish-actions.pod:4647
16584 "Verbose messages are normally sent to C<stderr>, unless you register a "
16585 "callback to send them somewhere else (see L</set-event-callback>)."
16589 #: ../fish/guestfish-actions.pod:4651
16594 #: ../fish/guestfish-actions.pod:4653
16597 " setcon context\n"
16602 #: ../fish/guestfish-actions.pod:4655 ../src/guestfs-actions.pod:7158
16604 "This sets the SELinux security context of the daemon to the string "
16609 #: ../fish/guestfish-actions.pod:4658 ../src/guestfs-actions.pod:7161
16610 msgid "See the documentation about SELINUX in L<guestfs(3)>."
16614 #: ../fish/guestfish-actions.pod:4660
16619 #: ../fish/guestfish-actions.pod:4662
16622 " setxattr xattr val vallen path\n"
16627 #: ../fish/guestfish-actions.pod:4664 ../src/guestfs-actions.pod:7176
16629 "This call sets the extended attribute named C<xattr> of the file C<path> to "
16630 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
16634 #: ../fish/guestfish-actions.pod:4668
16635 msgid "See also: L</lsetxattr>, L<attr(5)>."
16639 #: ../fish/guestfish-actions.pod:4670
16644 #: ../fish/guestfish-actions.pod:4672
16647 " sfdisk device cyls heads sectors 'lines ...'\n"
16652 #: ../fish/guestfish-actions.pod:4674 ../src/guestfs-actions.pod:7203
16654 "This is a direct interface to the L<sfdisk(8)> program for creating "
16655 "partitions on block devices."
16659 #: ../fish/guestfish-actions.pod:4677 ../src/guestfs-actions.pod:7206
16660 msgid "C<device> should be a block device, for example C</dev/sda>."
16664 #: ../fish/guestfish-actions.pod:4679 ../src/guestfs-actions.pod:7208
16666 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
16667 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
16668 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
16669 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
16670 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
16671 "the kernel) cannot work out the right geometry and you will need to tell it."
16675 #: ../fish/guestfish-actions.pod:4687 ../src/guestfs-actions.pod:7216
16677 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
16678 "refer to the L<sfdisk(8)> manpage."
16682 #: ../fish/guestfish-actions.pod:4690 ../src/guestfs-actions.pod:7219
16684 "To create a single partition occupying the whole disk, you would pass "
16685 "C<lines> as a single element list, when the single element being the string "
16690 #: ../fish/guestfish-actions.pod:4694
16691 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
16695 #: ../fish/guestfish-actions.pod:4697 ../fish/guestfish-actions.pod:4717
16696 #: ../fish/guestfish-actions.pod:4736
16698 "I<This function is deprecated.> In new code, use the L</part_add> call "
16703 #: ../fish/guestfish-actions.pod:4704
16708 #: ../fish/guestfish-actions.pod:4706
16711 " sfdiskM device 'lines ...'\n"
16716 #: ../fish/guestfish-actions.pod:4708
16718 "This is a simplified interface to the L</sfdisk> command, where partition "
16719 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
16720 "you don't need to specify the cyls, heads and sectors parameters which were "
16721 "rarely if ever used anyway."
16725 #: ../fish/guestfish-actions.pod:4714
16726 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
16730 #: ../fish/guestfish-actions.pod:4724
16735 #: ../fish/guestfish-actions.pod:4726
16738 " sfdisk-N device partnum cyls heads sectors line\n"
16743 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7275
16745 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
16746 "(note: C<n> counts from 1)."
16750 #: ../fish/guestfish-actions.pod:4731
16752 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
16753 "cyls/heads/sectors parameters."
16757 #: ../fish/guestfish-actions.pod:4734
16758 msgid "See also: L</part-add>"
16762 #: ../fish/guestfish-actions.pod:4743
16763 msgid "sfdisk-disk-geometry"
16767 #: ../fish/guestfish-actions.pod:4745
16770 " sfdisk-disk-geometry device\n"
16775 #: ../fish/guestfish-actions.pod:4747
16777 "This displays the disk geometry of C<device> read from the partition table. "
16778 "Especially in the case where the underlying block device has been resized, "
16779 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
16780 "kernel-geometry>)."
16784 #: ../fish/guestfish-actions.pod:4752 ../fish/guestfish-actions.pod:4761
16785 #: ../src/guestfs-actions.pod:7298 ../src/guestfs-actions.pod:7314
16786 msgid "The result is in human-readable format, and not designed to be parsed."
16790 #: ../fish/guestfish-actions.pod:4755
16791 msgid "sfdisk-kernel-geometry"
16795 #: ../fish/guestfish-actions.pod:4757
16798 " sfdisk-kernel-geometry device\n"
16803 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7312
16804 msgid "This displays the kernel's idea of the geometry of C<device>."
16808 #: ../fish/guestfish-actions.pod:4764
16813 #: ../fish/guestfish-actions.pod:4766
16816 " sfdisk-l device\n"
16821 #: ../fish/guestfish-actions.pod:4768 ../src/guestfs-actions.pod:7335
16823 "This displays the partition table on C<device>, in the human-readable output "
16824 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16828 #: ../fish/guestfish-actions.pod:4772
16829 msgid "See also: L</part-list>"
16833 #: ../fish/guestfish-actions.pod:4774
16835 "I<This function is deprecated.> In new code, use the L</part_list> call "
16840 #: ../fish/guestfish-actions.pod:4781
16845 #: ../fish/guestfish-actions.pod:4783
16853 #: ../fish/guestfish-actions.pod:4785 ../src/guestfs-actions.pod:7352
16855 "This call runs a command from the guest filesystem via the guest's C</bin/"
16860 #: ../fish/guestfish-actions.pod:4788
16861 msgid "This is like L</command>, but passes the command to:"
16865 #: ../fish/guestfish-actions.pod:4790 ../src/guestfs-actions.pod:7357
16868 " /bin/sh -c \"command\"\n"
16873 #: ../fish/guestfish-actions.pod:4792 ../src/guestfs-actions.pod:7359
16875 "Depending on the guest's shell, this usually results in wildcards being "
16876 "expanded, shell expressions being interpolated and so on."
16880 #: ../fish/guestfish-actions.pod:4796
16881 msgid "All the provisos about L</command> apply to this call."
16885 #: ../fish/guestfish-actions.pod:4798
16890 #: ../fish/guestfish-actions.pod:4800
16893 " sh-lines command\n"
16898 #: ../fish/guestfish-actions.pod:4802
16899 msgid "This is the same as L</sh>, but splits the result into a list of lines."
16903 #: ../fish/guestfish-actions.pod:4805
16904 msgid "See also: L</command-lines>"
16908 #: ../fish/guestfish-actions.pod:4807
16913 #: ../fish/guestfish-actions.pod:4809
16921 #: ../fish/guestfish-actions.pod:4811 ../src/guestfs-actions.pod:7393
16922 msgid "Sleep for C<secs> seconds."
16926 #: ../fish/guestfish-actions.pod:4813
16931 #: ../fish/guestfish-actions.pod:4815
16939 #: ../fish/guestfish-actions.pod:4819 ../src/guestfs-actions.pod:7407
16940 msgid "This is the same as the C<stat(2)> system call."
16944 #: ../fish/guestfish-actions.pod:4821
16949 #: ../fish/guestfish-actions.pod:4823
16957 #: ../fish/guestfish-actions.pod:4825 ../src/guestfs-actions.pod:7421
16959 "Returns file system statistics for any mounted file system. C<path> should "
16960 "be a file or directory in the mounted file system (typically it is the mount "
16961 "point itself, but it doesn't need to be)."
16965 #: ../fish/guestfish-actions.pod:4829 ../src/guestfs-actions.pod:7425
16966 msgid "This is the same as the C<statvfs(2)> system call."
16970 #: ../fish/guestfish-actions.pod:4831
16975 #: ../fish/guestfish-actions.pod:4833
16983 #: ../fish/guestfish-actions.pod:4835 ../src/guestfs-actions.pod:7439
16985 "This runs the L<strings(1)> command on a file and returns the list of "
16986 "printable strings found."
16990 #: ../fish/guestfish-actions.pod:4841
16995 #: ../fish/guestfish-actions.pod:4843
16998 " strings-e encoding path\n"
17003 #: ../fish/guestfish-actions.pod:4845
17005 "This is like the L</strings> command, but allows you to specify the encoding "
17006 "of strings that are looked for in the source file C<path>."
17010 #: ../fish/guestfish-actions.pod:4849 ../src/guestfs-actions.pod:7462
17011 msgid "Allowed encodings are:"
17015 #: ../fish/guestfish-actions.pod:4853 ../src/guestfs-actions.pod:7466
17020 #: ../fish/guestfish-actions.pod:4855
17022 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
17023 "ISO-8859-X (this is what L</strings> uses)."
17027 #: ../fish/guestfish-actions.pod:4858 ../src/guestfs-actions.pod:7471
17032 #: ../fish/guestfish-actions.pod:4860 ../src/guestfs-actions.pod:7473
17033 msgid "Single 8-bit-byte characters."
17037 #: ../fish/guestfish-actions.pod:4862 ../src/guestfs-actions.pod:7475
17042 #: ../fish/guestfish-actions.pod:4864 ../src/guestfs-actions.pod:7477
17043 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
17047 #: ../fish/guestfish-actions.pod:4867 ../src/guestfs-actions.pod:7480
17048 msgid "l (lower case letter L)"
17052 #: ../fish/guestfish-actions.pod:4869 ../src/guestfs-actions.pod:7482
17054 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
17055 "examining binaries in Windows guests."
17059 #: ../fish/guestfish-actions.pod:4872 ../src/guestfs-actions.pod:7485
17064 #: ../fish/guestfish-actions.pod:4874 ../src/guestfs-actions.pod:7487
17065 msgid "32-bit big endian such as UCS-4BE."
17069 #: ../fish/guestfish-actions.pod:4876 ../src/guestfs-actions.pod:7489
17074 #: ../fish/guestfish-actions.pod:4878 ../src/guestfs-actions.pod:7491
17075 msgid "32-bit little endian such as UCS-4LE."
17079 #: ../fish/guestfish-actions.pod:4882 ../src/guestfs-actions.pod:7495
17080 msgid "The returned strings are transcoded to UTF-8."
17084 #: ../fish/guestfish-actions.pod:4887
17085 msgid "swapoff-device"
17089 #: ../fish/guestfish-actions.pod:4889
17092 " swapoff-device device\n"
17097 #: ../fish/guestfish-actions.pod:4891
17099 "This command disables the libguestfs appliance swap device or partition "
17100 "named C<device>. See L</swapon-device>."
17104 #: ../fish/guestfish-actions.pod:4895
17105 msgid "swapoff-file"
17109 #: ../fish/guestfish-actions.pod:4897
17112 " swapoff-file file\n"
17117 #: ../fish/guestfish-actions.pod:4899 ../src/guestfs-actions.pod:7526
17118 msgid "This command disables the libguestfs appliance swap on file."
17122 #: ../fish/guestfish-actions.pod:4901
17123 msgid "swapoff-label"
17127 #: ../fish/guestfish-actions.pod:4903
17130 " swapoff-label label\n"
17135 #: ../fish/guestfish-actions.pod:4905 ../src/guestfs-actions.pod:7538
17137 "This command disables the libguestfs appliance swap on labeled swap "
17142 #: ../fish/guestfish-actions.pod:4908
17143 msgid "swapoff-uuid"
17147 #: ../fish/guestfish-actions.pod:4910
17150 " swapoff-uuid uuid\n"
17155 #: ../fish/guestfish-actions.pod:4912 ../src/guestfs-actions.pod:7551
17157 "This command disables the libguestfs appliance swap partition with the given "
17162 #: ../fish/guestfish-actions.pod:4915
17163 msgid "swapon-device"
17167 #: ../fish/guestfish-actions.pod:4917
17170 " swapon-device device\n"
17175 #: ../fish/guestfish-actions.pod:4919
17177 "This command enables the libguestfs appliance to use the swap device or "
17178 "partition named C<device>. The increased memory is made available for all "
17179 "commands, for example those run using L</command> or L</sh>."
17183 #: ../fish/guestfish-actions.pod:4924 ../src/guestfs-actions.pod:7569
17185 "Note that you should not swap to existing guest swap partitions unless you "
17186 "know what you are doing. They may contain hibernation information, or other "
17187 "information that the guest doesn't want you to trash. You also risk leaking "
17188 "information about the host to the guest this way. Instead, attach a new "
17189 "host device to the guest and swap on that."
17193 #: ../fish/guestfish-actions.pod:4931
17194 msgid "swapon-file"
17198 #: ../fish/guestfish-actions.pod:4933
17201 " swapon-file file\n"
17206 #: ../fish/guestfish-actions.pod:4935
17208 "This command enables swap to a file. See L</swapon-device> for other notes."
17212 #: ../fish/guestfish-actions.pod:4938
17213 msgid "swapon-label"
17217 #: ../fish/guestfish-actions.pod:4940
17220 " swapon-label label\n"
17225 #: ../fish/guestfish-actions.pod:4942
17227 "This command enables swap to a labeled swap partition. See L</swapon-"
17228 "device> for other notes."
17232 #: ../fish/guestfish-actions.pod:4945
17233 msgid "swapon-uuid"
17237 #: ../fish/guestfish-actions.pod:4947
17240 " swapon-uuid uuid\n"
17245 #: ../fish/guestfish-actions.pod:4949
17247 "This command enables swap to a swap partition with the given UUID. See L</"
17248 "swapon-device> for other notes."
17252 #: ../fish/guestfish-actions.pod:4952
17257 #: ../fish/guestfish-actions.pod:4954
17265 #: ../fish/guestfish-actions.pod:4956 ../src/guestfs-actions.pod:7624
17267 "This syncs the disk, so that any writes are flushed through to the "
17268 "underlying disk image."
17272 #: ../fish/guestfish-actions.pod:4959 ../src/guestfs-actions.pod:7627
17274 "You should always call this if you have modified a disk image, before "
17275 "closing the handle."
17279 #: ../fish/guestfish-actions.pod:4962
17284 #: ../fish/guestfish-actions.pod:4964
17292 #: ../fish/guestfish-actions.pod:4966 ../src/guestfs-actions.pod:7640
17294 "This command returns up to the last 10 lines of a file as a list of strings."
17298 #: ../fish/guestfish-actions.pod:4972
17303 #: ../fish/guestfish-actions.pod:4974
17306 " tail-n nrlines path\n"
17311 #: ../fish/guestfish-actions.pod:4976 ../src/guestfs-actions.pod:7659
17313 "If the parameter C<nrlines> is a positive number, this returns the last "
17314 "C<nrlines> lines of the file C<path>."
17318 #: ../fish/guestfish-actions.pod:4979 ../src/guestfs-actions.pod:7662
17320 "If the parameter C<nrlines> is a negative number, this returns lines from "
17321 "the file C<path>, starting with the C<-nrlines>th line."
17325 #: ../fish/guestfish-actions.pod:4987
17330 #: ../fish/guestfish-actions.pod:4989
17333 " tar-in (tarfile|-) directory\n"
17338 #: ../fish/guestfish-actions.pod:4991 ../src/guestfs-actions.pod:7683
17340 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
17341 "tar file) into C<directory>."
17345 #: ../fish/guestfish-actions.pod:4994
17346 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
17350 #: ../fish/guestfish-actions.pod:4999
17355 #: ../fish/guestfish-actions.pod:5001
17358 " tar-out directory (tarfile|-)\n"
17363 #: ../fish/guestfish-actions.pod:5003 ../src/guestfs-actions.pod:7700
17365 "This command packs the contents of C<directory> and downloads it to local "
17370 #: ../fish/guestfish-actions.pod:5006
17371 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
17375 #: ../fish/guestfish-actions.pod:5011
17380 #: ../fish/guestfish-actions.pod:5013
17383 " tgz-in (tarball|-) directory\n"
17388 #: ../fish/guestfish-actions.pod:5015 ../src/guestfs-actions.pod:7717
17390 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
17391 "tar file) into C<directory>."
17395 #: ../fish/guestfish-actions.pod:5018
17396 msgid "To upload an uncompressed tarball, use L</tar-in>."
17400 #: ../fish/guestfish-actions.pod:5022
17405 #: ../fish/guestfish-actions.pod:5024
17408 " tgz-out directory (tarball|-)\n"
17413 #: ../fish/guestfish-actions.pod:5026 ../src/guestfs-actions.pod:7733
17415 "This command packs the contents of C<directory> and downloads it to local "
17420 #: ../fish/guestfish-actions.pod:5029
17421 msgid "To download an uncompressed tarball, use L</tar-out>."
17425 #: ../fish/guestfish-actions.pod:5033
17430 #: ../fish/guestfish-actions.pod:5035
17438 #: ../fish/guestfish-actions.pod:5037 ../src/guestfs-actions.pod:7748
17440 "Touch acts like the L<touch(1)> command. It can be used to update the "
17441 "timestamps on a file, or, if the file does not exist, to create a new zero-"
17446 #: ../fish/guestfish-actions.pod:5041 ../src/guestfs-actions.pod:7752
17448 "This command only works on regular files, and will fail on other file types "
17449 "such as directories, symbolic links, block special etc."
17453 #: ../fish/guestfish-actions.pod:5044
17458 #: ../fish/guestfish-actions.pod:5046
17466 #: ../fish/guestfish-actions.pod:5048 ../src/guestfs-actions.pod:7765
17468 "This command truncates C<path> to a zero-length file. The file must exist "
17473 #: ../fish/guestfish-actions.pod:5051
17474 msgid "truncate-size"
17478 #: ../fish/guestfish-actions.pod:5053
17481 " truncate-size path size\n"
17486 #: ../fish/guestfish-actions.pod:5055 ../src/guestfs-actions.pod:7779
17488 "This command truncates C<path> to size C<size> bytes. The file must exist "
17493 #: ../fish/guestfish-actions.pod:5058
17495 "If the current file size is less than C<size> then the file is extended to "
17496 "the required size with zero bytes. This creates a sparse file (ie. disk "
17497 "blocks are not allocated for the file until you write to it). To create a "
17498 "non-sparse file of zeroes, use L</fallocate64> instead."
17502 #: ../fish/guestfish-actions.pod:5064
17507 #: ../fish/guestfish-actions.pod:5066
17510 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] [errorbehavior:..] [group:N] [intervalbetweenchecks:N] [reservedblockspercentage:N] [lastmounteddirectory:..] [reservedblockscount:N] [user:N]\n"
17515 #: ../fish/guestfish-actions.pod:5068 ../src/guestfs-actions.pod:7815
17517 "This call allows you to adjust various filesystem parameters of an ext2/ext3/"
17518 "ext4 filesystem called C<device>."
17522 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7824
17524 "Force tune2fs to complete the operation even in the face of errors. This is "
17525 "the same as the tune2fs C<-f> option."
17529 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7827
17530 msgid "C<maxmountcount>"
17534 #: ../fish/guestfish-actions.pod:5082 ../src/guestfs-actions.pod:7829
17536 "Set the number of mounts after which the filesystem is checked by L<e2fsck(8)"
17537 ">. If this is C<0> then the number of mounts is disregarded. This is the "
17538 "same as the tune2fs C<-c> option."
17542 #: ../fish/guestfish-actions.pod:5086 ../src/guestfs-actions.pod:7833
17543 msgid "C<mountcount>"
17547 #: ../fish/guestfish-actions.pod:5088 ../src/guestfs-actions.pod:7835
17549 "Set the number of times the filesystem has been mounted. This is the same "
17550 "as the tune2fs C<-C> option."
17554 #: ../fish/guestfish-actions.pod:5091 ../src/guestfs-actions.pod:7838
17555 msgid "C<errorbehavior>"
17559 #: ../fish/guestfish-actions.pod:5093 ../src/guestfs-actions.pod:7840
17561 "Change the behavior of the kernel code when errors are detected. Possible "
17562 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
17563 "these options don't really make any difference, particularly for write "
17568 #: ../fish/guestfish-actions.pod:5098 ../src/guestfs-actions.pod:7845
17569 msgid "This is the same as the tune2fs C<-e> option."
17573 #: ../fish/guestfish-actions.pod:5100 ../src/guestfs-actions.pod:7847
17578 #: ../fish/guestfish-actions.pod:5102 ../src/guestfs-actions.pod:7849
17580 "Set the group which can use reserved filesystem blocks. This is the same as "
17581 "the tune2fs C<-g> option except that it can only be specified as a number."
17585 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7853
17586 msgid "C<intervalbetweenchecks>"
17590 #: ../fish/guestfish-actions.pod:5108 ../src/guestfs-actions.pod:7855
17592 "Adjust the maximal time between two filesystem checks (in seconds). If the "
17593 "option is passed as C<0> then time-dependent checking is disabled."
17597 #: ../fish/guestfish-actions.pod:5112 ../src/guestfs-actions.pod:7859
17598 msgid "This is the same as the tune2fs C<-i> option."
17602 #: ../fish/guestfish-actions.pod:5114 ../src/guestfs-actions.pod:7861
17603 msgid "C<reservedblockspercentage>"
17607 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7863
17609 "Set the percentage of the filesystem which may only be allocated by "
17610 "privileged processes. This is the same as the tune2fs C<-m> option."
17614 #: ../fish/guestfish-actions.pod:5120 ../src/guestfs-actions.pod:7867
17615 msgid "C<lastmounteddirectory>"
17619 #: ../fish/guestfish-actions.pod:5122 ../src/guestfs-actions.pod:7869
17621 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
17626 #: ../fish/guestfish-actions.pod:5125 ../src/guestfs-actions.pod:7872
17628 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
17629 "is the same as the tune2fs C<-r> option."
17633 #: ../fish/guestfish-actions.pod:5129 ../src/guestfs-actions.pod:7876
17638 #: ../fish/guestfish-actions.pod:5131 ../src/guestfs-actions.pod:7878
17640 "Set the user who can use the reserved filesystem blocks. This is the same "
17641 "as the tune2fs C<-u> option except that it can only be specified as a number."
17645 #: ../fish/guestfish-actions.pod:5137
17647 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
17648 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
17652 #: ../fish/guestfish-actions.pod:5143
17657 #: ../fish/guestfish-actions.pod:5145
17660 " tune2fs-l device\n"
17665 #: ../fish/guestfish-actions.pod:5147 ../src/guestfs-actions.pod:7920
17667 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
17672 #: ../fish/guestfish-actions.pod:5150 ../src/guestfs-actions.pod:7923
17674 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
17675 "for more details. The list of fields returned isn't clearly defined, and "
17676 "depends on both the version of C<tune2fs> that libguestfs was built against, "
17677 "and the filesystem itself."
17681 #: ../fish/guestfish-actions.pod:5155
17686 #: ../fish/guestfish-actions.pod:5157
17689 " txz-in (tarball|-) directory\n"
17694 #: ../fish/guestfish-actions.pod:5159 ../src/guestfs-actions.pod:7943
17696 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
17697 "tar file) into C<directory>."
17701 #: ../fish/guestfish-actions.pod:5164
17706 #: ../fish/guestfish-actions.pod:5166
17709 " txz-out directory (tarball|-)\n"
17714 #: ../fish/guestfish-actions.pod:5168 ../src/guestfs-actions.pod:7957
17716 "This command packs the contents of C<directory> and downloads it to local "
17717 "file C<tarball> (as an xz compressed tar archive)."
17721 #: ../fish/guestfish-actions.pod:5173
17726 #: ../fish/guestfish-actions.pod:5175
17734 #: ../fish/guestfish-actions.pod:5177 ../src/guestfs-actions.pod:7970
17736 "This function sets the mask used for creating new files and device nodes to "
17741 #: ../fish/guestfish-actions.pod:5180 ../src/guestfs-actions.pod:7973
17743 "Typical umask values would be C<022> which creates new files with "
17744 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
17745 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
17749 #: ../fish/guestfish-actions.pod:5185 ../src/guestfs-actions.pod:7978
17751 "The default umask is C<022>. This is important because it means that "
17752 "directories and device nodes will be created with C<0644> or C<0755> mode "
17753 "even if you specify C<0777>."
17757 #: ../fish/guestfish-actions.pod:5189
17758 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
17762 #: ../fish/guestfish-actions.pod:5192 ../src/guestfs-actions.pod:7985
17763 msgid "This call returns the previous umask."
17767 #: ../fish/guestfish-actions.pod:5194
17772 #: ../fish/guestfish-actions.pod:5196
17777 #: ../fish/guestfish-actions.pod:5198
17780 " umount pathordevice\n"
17785 #: ../fish/guestfish-actions.pod:5200 ../src/guestfs-actions.pod:7997
17787 "This unmounts the given filesystem. The filesystem may be specified either "
17788 "by its mountpoint (path) or the device which contains the filesystem."
17792 #: ../fish/guestfish-actions.pod:5204
17797 #: ../fish/guestfish-actions.pod:5206
17798 msgid "unmount-all"
17802 #: ../fish/guestfish-actions.pod:5208
17810 #: ../fish/guestfish-actions.pod:5210 ../src/guestfs-actions.pod:8010
17811 msgid "This unmounts all mounted filesystems."
17815 #: ../fish/guestfish-actions.pod:5212 ../src/guestfs-actions.pod:8012
17816 msgid "Some internal mounts are not unmounted by this call."
17820 #: ../fish/guestfish-actions.pod:5214
17825 #: ../fish/guestfish-actions.pod:5216
17828 " upload (filename|-) remotefilename\n"
17833 #: ../fish/guestfish-actions.pod:5218 ../fish/guestfish-actions.pod:5231
17834 #: ../src/guestfs-actions.pod:8025 ../src/guestfs-actions.pod:8049
17835 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17839 #: ../fish/guestfish-actions.pod:5223
17840 msgid "See also L</download>."
17844 #: ../fish/guestfish-actions.pod:5227
17845 msgid "upload-offset"
17849 #: ../fish/guestfish-actions.pod:5229
17852 " upload-offset (filename|-) remotefilename offset\n"
17857 #: ../fish/guestfish-actions.pod:5234 ../src/guestfs-actions.pod:8052
17859 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17860 "The intention is to overwrite parts of existing files or devices, although "
17861 "if a non-existant file is specified then it is created with a \"hole\" "
17862 "before C<offset>. The size of the data written is implicit in the size of "
17863 "the source C<filename>."
17867 #: ../fish/guestfish-actions.pod:5241
17869 "Note that there is no limit on the amount of data that can be uploaded with "
17870 "this call, unlike with L</pwrite>, and this call always writes the full "
17871 "amount unless an error occurs."
17875 #: ../fish/guestfish-actions.pod:5246
17876 msgid "See also L</upload>, L</pwrite>."
17880 #: ../fish/guestfish-actions.pod:5250
17885 #: ../fish/guestfish-actions.pod:5252
17888 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
17893 #: ../fish/guestfish-actions.pod:5254 ../src/guestfs-actions.pod:8085
17894 msgid "This command sets the timestamps of a file with nanosecond precision."
17898 #: ../fish/guestfish-actions.pod:5257 ../src/guestfs-actions.pod:8088
17900 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17905 #: ../fish/guestfish-actions.pod:5260 ../src/guestfs-actions.pod:8091
17907 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17908 "nanoseconds from the epoch."
17912 #: ../fish/guestfish-actions.pod:5263 ../src/guestfs-actions.pod:8094
17914 "If the C<*nsecs> field contains the special value C<-1> then the "
17915 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17916 "ignored in this case)."
17920 #: ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:8098
17922 "If the C<*nsecs> field contains the special value C<-2> then the "
17923 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17928 #: ../fish/guestfish-actions.pod:5271
17933 #: ../fish/guestfish-actions.pod:5273
17941 #: ../fish/guestfish-actions.pod:5275 ../src/guestfs-actions.pod:8111
17943 "Return the libguestfs version number that the program is linked against."
17947 #: ../fish/guestfish-actions.pod:5278 ../src/guestfs-actions.pod:8114
17949 "Note that because of dynamic linking this is not necessarily the version of "
17950 "libguestfs that you compiled against. You can compile the program, and then "
17951 "at runtime dynamically link against a completely different C<libguestfs.so> "
17956 #: ../fish/guestfish-actions.pod:5283 ../src/guestfs-actions.pod:8119
17958 "This call was added in version C<1.0.58>. In previous versions of "
17959 "libguestfs there was no way to get the version number. From C code you can "
17960 "use dynamic linker functions to find out if this symbol exists (if it "
17961 "doesn't, then it's an earlier version)."
17965 #: ../fish/guestfish-actions.pod:5289 ../src/guestfs-actions.pod:8125
17967 "The call returns a structure with four elements. The first three (C<major>, "
17968 "C<minor> and C<release>) are numbers and correspond to the usual version "
17969 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17970 "but may be used for distro-specific information."
17974 #: ../fish/guestfish-actions.pod:5295 ../src/guestfs-actions.pod:8131
17976 "To construct the original version string: C<$major.$minor.$release$extra>"
17980 #: ../fish/guestfish-actions.pod:5298 ../src/guestfs-actions.pod:8134
17981 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17985 #: ../fish/guestfish-actions.pod:5300
17987 "I<Note:> Don't use this call to test for availability of features. In "
17988 "enterprise distributions we backport features from later versions into "
17989 "earlier versions, making this an unreliable way to test for features. Use "
17990 "L</available> instead."
17994 #: ../fish/guestfish-actions.pod:5306
17999 #: ../fish/guestfish-actions.pod:5308
18002 " vfs-label device\n"
18007 #: ../fish/guestfish-actions.pod:5310 ../src/guestfs-actions.pod:8154
18008 msgid "This returns the filesystem label of the filesystem on C<device>."
18012 #: ../fish/guestfish-actions.pod:5313 ../src/guestfs-actions.pod:8157
18013 msgid "If the filesystem is unlabeled, this returns the empty string."
18017 #: ../fish/guestfish-actions.pod:5315
18018 msgid "To find a filesystem from the label, use L</findfs-label>."
18022 #: ../fish/guestfish-actions.pod:5317
18027 #: ../fish/guestfish-actions.pod:5319
18030 " vfs-type device\n"
18035 #: ../fish/guestfish-actions.pod:5321 ../src/guestfs-actions.pod:8172
18037 "This command gets the filesystem type corresponding to the filesystem on "
18042 #: ../fish/guestfish-actions.pod:5324 ../src/guestfs-actions.pod:8175
18044 "For most filesystems, the result is the name of the Linux VFS module which "
18045 "would be used to mount this filesystem if you mounted it without specifying "
18046 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
18050 #: ../fish/guestfish-actions.pod:5329
18055 #: ../fish/guestfish-actions.pod:5331
18058 " vfs-uuid device\n"
18063 #: ../fish/guestfish-actions.pod:5333 ../src/guestfs-actions.pod:8191
18064 msgid "This returns the filesystem UUID of the filesystem on C<device>."
18068 #: ../fish/guestfish-actions.pod:5336 ../src/guestfs-actions.pod:8194
18069 msgid "If the filesystem does not have a UUID, this returns the empty string."
18073 #: ../fish/guestfish-actions.pod:5338
18074 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
18078 #: ../fish/guestfish-actions.pod:5340
18079 msgid "vg-activate"
18083 #: ../fish/guestfish-actions.pod:5342
18086 " vg-activate true|false 'volgroups ...'\n"
18091 #: ../fish/guestfish-actions.pod:5344 ../src/guestfs-actions.pod:8210
18093 "This command activates or (if C<activate> is false) deactivates all logical "
18094 "volumes in the listed volume groups C<volgroups>."
18098 #: ../fish/guestfish-actions.pod:5347 ../src/guestfs-actions.pod:8213
18099 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
18103 #: ../fish/guestfish-actions.pod:5349 ../src/guestfs-actions.pod:8215
18105 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
18106 "activated or deactivated."
18110 #: ../fish/guestfish-actions.pod:5352
18111 msgid "vg-activate-all"
18115 #: ../fish/guestfish-actions.pod:5354
18118 " vg-activate-all true|false\n"
18123 #: ../fish/guestfish-actions.pod:5356 ../src/guestfs-actions.pod:8228
18125 "This command activates or (if C<activate> is false) deactivates all logical "
18126 "volumes in all volume groups."
18130 #: ../fish/guestfish-actions.pod:5359 ../src/guestfs-actions.pod:8231
18131 msgid "This command is the same as running C<vgchange -a y|n>"
18135 #: ../fish/guestfish-actions.pod:5361
18140 #: ../fish/guestfish-actions.pod:5363
18143 " vgcreate volgroup 'physvols ...'\n"
18148 #: ../fish/guestfish-actions.pod:5365 ../src/guestfs-actions.pod:8244
18150 "This creates an LVM volume group called C<volgroup> from the non-empty list "
18151 "of physical volumes C<physvols>."
18155 #: ../fish/guestfish-actions.pod:5368
18160 #: ../fish/guestfish-actions.pod:5370
18163 " vglvuuids vgname\n"
18168 #: ../fish/guestfish-actions.pod:5372 ../src/guestfs-actions.pod:8257
18170 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
18171 "volumes created in this volume group."
18175 #: ../fish/guestfish-actions.pod:5375
18177 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
18178 "logical volumes and volume groups."
18182 #: ../fish/guestfish-actions.pod:5378
18183 msgid "See also L</vgpvuuids>."
18187 #: ../fish/guestfish-actions.pod:5380
18192 #: ../fish/guestfish-actions.pod:5382
18195 " vgpvuuids vgname\n"
18200 #: ../fish/guestfish-actions.pod:5384 ../src/guestfs-actions.pod:8277
18202 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
18203 "volumes that this volume group resides on."
18207 #: ../fish/guestfish-actions.pod:5387
18209 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
18210 "physical volumes and volume groups."
18214 #: ../fish/guestfish-actions.pod:5390
18215 msgid "See also L</vglvuuids>."
18219 #: ../fish/guestfish-actions.pod:5392
18224 #: ../fish/guestfish-actions.pod:5394
18227 " vgremove vgname\n"
18232 #: ../fish/guestfish-actions.pod:5396 ../src/guestfs-actions.pod:8297
18233 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
18237 #: ../fish/guestfish-actions.pod:5398 ../src/guestfs-actions.pod:8299
18239 "This also forcibly removes all logical volumes in the volume group (if any)."
18243 #: ../fish/guestfish-actions.pod:5401
18248 #: ../fish/guestfish-actions.pod:5403
18251 " vgrename volgroup newvolgroup\n"
18256 #: ../fish/guestfish-actions.pod:5405 ../src/guestfs-actions.pod:8313
18257 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
18261 #: ../fish/guestfish-actions.pod:5407
18266 #: ../fish/guestfish-actions.pod:5409
18274 #: ../fish/guestfish-actions.pod:5411 ../src/guestfs-actions.pod:8324
18276 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18281 #: ../fish/guestfish-actions.pod:5414 ../src/guestfs-actions.pod:8327
18283 "This returns a list of just the volume group names that were detected (eg. "
18288 #: ../fish/guestfish-actions.pod:5417
18289 msgid "See also L</vgs-full>."
18293 #: ../fish/guestfish-actions.pod:5419
18298 #: ../fish/guestfish-actions.pod:5421
18306 #: ../fish/guestfish-actions.pod:5423 ../src/guestfs-actions.pod:8343
18308 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18309 "> command. The \"full\" version includes all fields."
18313 #: ../fish/guestfish-actions.pod:5426
18318 #: ../fish/guestfish-actions.pod:5428
18326 #: ../fish/guestfish-actions.pod:5430 ../src/guestfs-actions.pod:8357
18328 "This rescans all block devices and rebuilds the list of LVM physical "
18329 "volumes, volume groups and logical volumes."
18333 #: ../fish/guestfish-actions.pod:5433
18338 #: ../fish/guestfish-actions.pod:5435
18346 #: ../fish/guestfish-actions.pod:5437 ../src/guestfs-actions.pod:8370
18347 msgid "This command returns the UUID of the LVM VG named C<vgname>."
18351 #: ../fish/guestfish-actions.pod:5439
18356 #: ../fish/guestfish-actions.pod:5441
18364 #: ../fish/guestfish-actions.pod:5443 ../src/guestfs-actions.pod:8410
18366 "This command counts the characters in a file, using the C<wc -c> external "
18371 #: ../fish/guestfish-actions.pod:5446
18376 #: ../fish/guestfish-actions.pod:5448
18384 #: ../fish/guestfish-actions.pod:5450 ../src/guestfs-actions.pod:8423
18386 "This command counts the lines in a file, using the C<wc -l> external command."
18390 #: ../fish/guestfish-actions.pod:5453
18395 #: ../fish/guestfish-actions.pod:5455
18403 #: ../fish/guestfish-actions.pod:5457 ../src/guestfs-actions.pod:8436
18405 "This command counts the words in a file, using the C<wc -w> external command."
18409 #: ../fish/guestfish-actions.pod:5460
18414 #: ../fish/guestfish-actions.pod:5462
18417 " write path content\n"
18422 #: ../fish/guestfish-actions.pod:5464 ../src/guestfs-actions.pod:8451
18424 "This call creates a file called C<path>. The content of the file is the "
18425 "string C<content> (which can contain any 8 bit data)."
18429 #: ../fish/guestfish-actions.pod:5467
18430 msgid "See also L</write-append>."
18434 #: ../fish/guestfish-actions.pod:5472
18435 msgid "write-append"
18439 #: ../fish/guestfish-actions.pod:5474
18442 " write-append path content\n"
18447 #: ../fish/guestfish-actions.pod:5476 ../src/guestfs-actions.pod:8471
18449 "This call appends C<content> to the end of file C<path>. If C<path> does "
18450 "not exist, then a new file is created."
18454 #: ../fish/guestfish-actions.pod:5479
18455 msgid "See also L</write>."
18459 #: ../fish/guestfish-actions.pod:5484
18464 #: ../fish/guestfish-actions.pod:5486
18467 " write-file path content size\n"
18472 #: ../fish/guestfish-actions.pod:5488 ../src/guestfs-actions.pod:8498
18474 "This call creates a file called C<path>. The contents of the file is the "
18475 "string C<content> (which can contain any 8 bit data), with length C<size>."
18479 #: ../fish/guestfish-actions.pod:5492 ../src/guestfs-actions.pod:8502
18481 "As a special case, if C<size> is C<0> then the length is calculated using "
18482 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
18486 #: ../fish/guestfish-actions.pod:5496 ../src/guestfs-actions.pod:8506
18488 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
18489 "I<not> work, even if the length is specified."
18493 #: ../fish/guestfish-actions.pod:5502
18495 "I<This function is deprecated.> In new code, use the L</write> call instead."
18499 #: ../fish/guestfish-actions.pod:5509
18504 #: ../fish/guestfish-actions.pod:5511
18507 " zegrep regex path\n"
18512 #: ../fish/guestfish-actions.pod:5513 ../src/guestfs-actions.pod:8523
18514 "This calls the external C<zegrep> program and returns the matching lines."
18518 #: ../fish/guestfish-actions.pod:5519
18523 #: ../fish/guestfish-actions.pod:5521
18526 " zegrepi regex path\n"
18531 #: ../fish/guestfish-actions.pod:5523 ../src/guestfs-actions.pod:8542
18533 "This calls the external C<zegrep -i> program and returns the matching lines."
18537 #: ../fish/guestfish-actions.pod:5529
18542 #: ../fish/guestfish-actions.pod:5531
18550 #: ../fish/guestfish-actions.pod:5533 ../src/guestfs-actions.pod:8560
18551 msgid "This command writes zeroes over the first few blocks of C<device>."
18555 #: ../fish/guestfish-actions.pod:5535 ../src/guestfs-actions.pod:8562
18557 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
18558 "securely wipe the device). It should be sufficient to remove any partition "
18559 "tables, filesystem superblocks and so on."
18563 #: ../fish/guestfish-actions.pod:5539 ../fish/guestfish-actions.pod:5554
18564 #: ../src/guestfs-actions.pod:8566 ../src/guestfs-actions.pod:8592
18566 "If blocks are already zero, then this command avoids writing zeroes. This "
18567 "prevents the underlying device from becoming non-sparse or growing "
18572 #: ../fish/guestfish-actions.pod:5543
18573 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
18577 #: ../fish/guestfish-actions.pod:5546
18578 msgid "zero-device"
18582 #: ../fish/guestfish-actions.pod:5548
18585 " zero-device device\n"
18590 #: ../fish/guestfish-actions.pod:5550
18592 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
18593 "which just zeroes the first few blocks of a device."
18597 #: ../fish/guestfish-actions.pod:5558
18602 #: ../fish/guestfish-actions.pod:5560
18605 " zerofree device\n"
18610 #: ../fish/guestfish-actions.pod:5562 ../src/guestfs-actions.pod:8611
18612 "This runs the I<zerofree> program on C<device>. This program claims to zero "
18613 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
18614 "possible to compress the filesystem more effectively."
18618 #: ../fish/guestfish-actions.pod:5567 ../src/guestfs-actions.pod:8616
18619 msgid "You should B<not> run this program if the filesystem is mounted."
18623 #: ../fish/guestfish-actions.pod:5570 ../src/guestfs-actions.pod:8619
18625 "It is possible that using this program can damage the filesystem or data on "
18630 #: ../fish/guestfish-actions.pod:5573
18635 #: ../fish/guestfish-actions.pod:5575
18638 " zfgrep pattern path\n"
18643 #: ../fish/guestfish-actions.pod:5577 ../src/guestfs-actions.pod:8633
18645 "This calls the external C<zfgrep> program and returns the matching lines."
18649 #: ../fish/guestfish-actions.pod:5583
18654 #: ../fish/guestfish-actions.pod:5585
18657 " zfgrepi pattern path\n"
18662 #: ../fish/guestfish-actions.pod:5587 ../src/guestfs-actions.pod:8652
18664 "This calls the external C<zfgrep -i> program and returns the matching lines."
18668 #: ../fish/guestfish-actions.pod:5593
18673 #: ../fish/guestfish-actions.pod:5595
18676 " zfile meth path\n"
18681 #: ../fish/guestfish-actions.pod:5597 ../src/guestfs-actions.pod:8678
18683 "This command runs C<file> after first decompressing C<path> using C<method>."
18687 #: ../fish/guestfish-actions.pod:5600 ../src/guestfs-actions.pod:8681
18688 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
18692 #: ../fish/guestfish-actions.pod:5602
18694 "Since 1.0.63, use L</file> instead which can now process compressed files."
18698 #: ../fish/guestfish-actions.pod:5605
18700 "I<This function is deprecated.> In new code, use the L</file> call instead."
18704 #: ../fish/guestfish-actions.pod:5612
18709 #: ../fish/guestfish-actions.pod:5614
18712 " zgrep regex path\n"
18717 #: ../fish/guestfish-actions.pod:5616 ../src/guestfs-actions.pod:8698
18719 "This calls the external C<zgrep> program and returns the matching lines."
18723 #: ../fish/guestfish-actions.pod:5622
18728 #: ../fish/guestfish-actions.pod:5624
18731 " zgrepi regex path\n"
18736 #: ../fish/guestfish-actions.pod:5626 ../src/guestfs-actions.pod:8717
18738 "This calls the external C<zgrep -i> program and returns the matching lines."
18742 #: ../fish/guestfish-commands.pod:1
18747 #: ../fish/guestfish-commands.pod:3
18752 #: ../fish/guestfish-commands.pod:5
18755 " alloc filename size\n"
18760 #: ../fish/guestfish-commands.pod:7
18762 "This creates an empty (zeroed) file of the given size, and then adds so it "
18763 "can be further examined."
18767 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:243
18768 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
18772 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:245
18773 msgid "Size can be specified using standard suffixes, eg. C<1M>."
18777 #: ../fish/guestfish-commands.pod:14
18779 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
18780 "image, see L</PREPARED DISK IMAGES>."
18784 #: ../fish/guestfish-commands.pod:17
18789 #: ../fish/guestfish-commands.pod:19
18792 " copy-in local [local ...] /remotedir\n"
18797 #: ../fish/guestfish-commands.pod:21
18799 "C<copy-in> copies local files or directories recursively into the disk "
18800 "image, placing them in the directory called C</remotedir> (which must "
18801 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
18802 "other commands as necessary."
18806 #: ../fish/guestfish-commands.pod:26
18808 "Multiple local files and directories can be specified, but the last "
18809 "parameter must always be a remote directory. Wildcards cannot be used."
18813 #: ../fish/guestfish-commands.pod:30
18818 #: ../fish/guestfish-commands.pod:32
18821 " copy-out remote [remote ...] localdir\n"
18826 #: ../fish/guestfish-commands.pod:34
18828 "C<copy-out> copies remote files or directories recursively out of the disk "
18829 "image, placing them on the host disk in a local directory called C<localdir> "
18830 "(which must exist). This guestfish meta-command turns into a sequence of L</"
18831 "download>, L</tar-out> and other commands as necessary."
18835 #: ../fish/guestfish-commands.pod:40
18837 "Multiple remote files and directories can be specified, but the last "
18838 "parameter must always be a local directory. To download to the current "
18839 "directory, use C<.> as in:"
18843 #: ../fish/guestfish-commands.pod:44
18846 " copy-out /home .\n"
18851 #: ../fish/guestfish-commands.pod:46
18853 "Wildcards cannot be used in the ordinary command, but you can use them with "
18854 "the help of L</glob> like this:"
18858 #: ../fish/guestfish-commands.pod:49
18861 " glob copy-out /home/* .\n"
18866 #: ../fish/guestfish-commands.pod:51
18867 msgid "delete-event"
18871 #: ../fish/guestfish-commands.pod:53
18874 " delete-event name\n"
18879 #: ../fish/guestfish-commands.pod:55
18881 "Delete the event handler which was previously registered as C<name>. If "
18882 "multiple event handlers were registered with the same name, they are all "
18887 #: ../fish/guestfish-commands.pod:59
18888 msgid "See also the guestfish commands C<event> and C<list-events>."
18892 #: ../fish/guestfish-commands.pod:61
18897 #: ../fish/guestfish-commands.pod:63
18900 " display filename\n"
18905 #: ../fish/guestfish-commands.pod:65
18907 "Use C<display> (a graphical display program) to display an image file. It "
18908 "downloads the file, and runs C<display> on it."
18912 #: ../fish/guestfish-commands.pod:68
18914 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
18915 "environment variable. For example to use the GNOME display program:"
18919 #: ../fish/guestfish-commands.pod:71
18922 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
18927 #: ../fish/guestfish-commands.pod:73
18928 msgid "See also L<display(1)>."
18932 #: ../fish/guestfish-commands.pod:75
18937 #: ../fish/guestfish-commands.pod:77
18940 " echo [params ...]\n"
18945 #: ../fish/guestfish-commands.pod:79
18946 msgid "This echos the parameters to the terminal."
18950 #: ../fish/guestfish-commands.pod:81
18955 #: ../fish/guestfish-commands.pod:83
18960 #: ../fish/guestfish-commands.pod:85
18965 #: ../fish/guestfish-commands.pod:87
18973 #: ../fish/guestfish-commands.pod:89
18975 "This is used to edit a file. It downloads the file, edits it locally using "
18976 "your editor, then uploads the result."
18980 #: ../fish/guestfish-commands.pod:92
18982 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
18983 "or C<emacs> you will get those corresponding editors."
18987 #: ../fish/guestfish-commands.pod:96
18992 #: ../fish/guestfish-commands.pod:98
18995 " event name eventset \"shell script ...\"\n"
19000 #: ../fish/guestfish-commands.pod:100
19002 "Register a shell script fragment which is executed when an event is raised. "
19003 "See L<guestfs(3)/guestfs_set_event_callback> for a discussion of the event "
19004 "API in libguestfs."
19008 #: ../fish/guestfish-commands.pod:104
19010 "The C<name> parameter is a name that you give to this event handler. It can "
19011 "be any string (even the empty string) and is simply there so you can delete "
19012 "the handler using the guestfish C<delete-event> command."
19016 #: ../fish/guestfish-commands.pod:109
19018 "The C<eventset> parameter is a comma-separated list of one or more events, "
19019 "for example C<close> or C<close,trace>. The special value C<*> means all "
19024 #: ../fish/guestfish-commands.pod:113
19026 "The third and final parameter is the shell script fragment (or any external "
19027 "command) that is executed when any of the events in the eventset occurs. It "
19028 "is executed using C<$SHELL -c>, or if C<$SHELL> is not set then C</bin/sh -"
19033 #: ../fish/guestfish-commands.pod:118
19035 "The shell script fragment receives callback parameters as arguments C<$1>, C<"
19036 "$2> etc. The actual event that was called is available in the environment "
19037 "variable C<$EVENT>."
19041 #: ../fish/guestfish-commands.pod:122
19044 " event \"\" close \"echo closed\"\n"
19045 " event messages appliance,library,trace \"echo $@\"\n"
19046 " event \"\" progress \"echo progress: $3/$4\"\n"
19047 " event \"\" * \"echo $EVENT $@\"\n"
19052 #: ../fish/guestfish-commands.pod:127
19053 msgid "See also the guestfish commands C<delete-event> and C<list-events>."
19057 #: ../fish/guestfish-commands.pod:129
19062 #: ../fish/guestfish-commands.pod:131
19065 " glob command args...\n"
19070 #: ../fish/guestfish-commands.pod:133
19072 "Expand wildcards in any paths in the args list, and run C<command> "
19073 "repeatedly on each matching path."
19077 #: ../fish/guestfish-commands.pod:136
19078 msgid "See L</WILDCARDS AND GLOBBING>."
19082 #: ../fish/guestfish-commands.pod:138
19087 #: ../fish/guestfish-commands.pod:140
19090 " hexedit <filename|device>\n"
19091 " hexedit <filename|device> <max>\n"
19092 " hexedit <filename|device> <start> <max>\n"
19097 #: ../fish/guestfish-commands.pod:144
19099 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
19104 #: ../fish/guestfish-commands.pod:147
19106 "This command works by downloading potentially the whole file or device, "
19107 "editing it locally, then uploading it. If the file or device is large, you "
19108 "have to specify which part you wish to edit by using C<max> and/or C<start> "
19109 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
19110 "usual modifiers allowed such as C<1M> (1 megabyte)."
19114 #: ../fish/guestfish-commands.pod:154
19115 msgid "For example to edit the first few sectors of a disk you might do:"
19119 #: ../fish/guestfish-commands.pod:157
19122 " hexedit /dev/sda 1M\n"
19127 #: ../fish/guestfish-commands.pod:159
19129 "which would allow you to edit anywhere within the first megabyte of the disk."
19133 #: ../fish/guestfish-commands.pod:162
19134 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
19138 #: ../fish/guestfish-commands.pod:164
19141 " hexedit /dev/sda1 0x400 0x400\n"
19146 #: ../fish/guestfish-commands.pod:166
19147 msgid "(assuming the superblock is in the standard location)."
19151 #: ../fish/guestfish-commands.pod:168
19153 "This command requires the external L<hexedit(1)> program. You can specify "
19154 "another program to use by setting the C<HEXEDITOR> environment variable."
19158 #: ../fish/guestfish-commands.pod:172
19159 msgid "See also L</hexdump>."
19163 #: ../fish/guestfish-commands.pod:174
19168 #: ../fish/guestfish-commands.pod:176
19176 #: ../fish/guestfish-commands.pod:178
19178 "Change the local directory, ie. the current directory of guestfish itself."
19182 #: ../fish/guestfish-commands.pod:181
19183 msgid "Note that C<!cd> won't do what you might expect."
19187 #: ../fish/guestfish-commands.pod:183
19188 msgid "list-events"
19192 #: ../fish/guestfish-commands.pod:185
19200 #: ../fish/guestfish-commands.pod:187
19202 "List the event handlers registered using the guestfish C<event> command."
19206 #: ../fish/guestfish-commands.pod:190
19211 #: ../fish/guestfish-commands.pod:192
19216 #: ../fish/guestfish-commands.pod:194
19224 #: ../fish/guestfish-commands.pod:196
19225 msgid "Opens the manual page for guestfish."
19229 #: ../fish/guestfish-commands.pod:198
19234 #: ../fish/guestfish-commands.pod:200
19239 #: ../fish/guestfish-commands.pod:202
19247 #: ../fish/guestfish-commands.pod:204
19255 #: ../fish/guestfish-commands.pod:206
19256 msgid "This is used to view a file."
19260 #: ../fish/guestfish-commands.pod:208
19262 "The default viewer is C<$PAGER>. However if you use the alternate command "
19263 "C<less> you will get the C<less> command specifically."
19267 #: ../fish/guestfish-commands.pod:211
19272 #: ../fish/guestfish-commands.pod:213
19280 #: ../fish/guestfish-commands.pod:215
19282 "Close and reopen the libguestfs handle. It is not necessary to use this "
19283 "normally, because the handle is closed properly when guestfish exits. "
19284 "However this is occasionally useful for testing."
19288 #: ../fish/guestfish-commands.pod:219
19293 #: ../fish/guestfish-commands.pod:221
19296 " setenv VAR value\n"
19301 #: ../fish/guestfish-commands.pod:223
19302 msgid "Set the environment variable C<VAR> to the string C<value>."
19306 #: ../fish/guestfish-commands.pod:225
19308 "To print the value of an environment variable use a shell command such as:"
19312 #: ../fish/guestfish-commands.pod:228
19320 #: ../fish/guestfish-commands.pod:230
19325 #: ../fish/guestfish-commands.pod:232
19328 " sparse filename size\n"
19333 #: ../fish/guestfish-commands.pod:234
19335 "This creates an empty sparse file of the given size, and then adds so it can "
19336 "be further examined."
19340 #: ../fish/guestfish-commands.pod:237
19342 "In all respects it works the same as the L</alloc> command, except that the "
19343 "image file is allocated sparsely, which means that disk blocks are not "
19344 "assigned to the file until they are needed. Sparse disk files only use "
19345 "space when written to, but they are slower and there is a danger you could "
19346 "run out of real disk space during a write operation."
19350 #: ../fish/guestfish-commands.pod:247
19355 #: ../fish/guestfish-commands.pod:249
19363 #: ../fish/guestfish-commands.pod:251
19365 "This command returns a list of the optional groups known to the daemon, and "
19366 "indicates which ones are supported by this build of the libguestfs appliance."
19370 #: ../fish/guestfish-commands.pod:255
19371 msgid "See also L<guestfs(3)/AVAILABILITY>."
19375 #: ../fish/guestfish-commands.pod:257
19380 #: ../fish/guestfish-commands.pod:259
19383 " time command args...\n"
19388 #: ../fish/guestfish-commands.pod:261
19390 "Run the command as usual, but print the elapsed time afterwards. This can "
19391 "be useful for benchmarking operations."
19395 #: ../fish/guestfish-commands.pod:264
19400 #: ../fish/guestfish-commands.pod:266
19408 #: ../fish/guestfish-commands.pod:268
19409 msgid "Remove C<VAR> from the environment."
19413 #: ../fish/guestfish.pod:5
19414 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
19418 #: ../fish/guestfish.pod:9
19421 " guestfish [--options] [commands]\n"
19426 #: ../fish/guestfish.pod:11
19434 #: ../fish/guestfish.pod:13
19437 " guestfish [--ro|--rw] -a disk.img\n"
19442 #: ../fish/guestfish.pod:15
19445 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
19450 #: ../fish/guestfish.pod:17
19453 " guestfish -d libvirt-domain\n"
19458 #: ../fish/guestfish.pod:19
19461 " guestfish [--ro|--rw] -a disk.img -i\n"
19466 #: ../fish/guestfish.pod:21
19469 " guestfish -d libvirt-domain -i\n"
19474 #: ../fish/guestfish.pod:25
19476 "Using guestfish in read/write mode on live virtual machines can be "
19477 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
19478 "option to use guestfish safely if the disk image or virtual machine might be "
19483 #: ../fish/guestfish.pod:32
19485 "Guestfish is a shell and command-line tool for examining and modifying "
19486 "virtual machine filesystems. It uses libguestfs and exposes all of the "
19487 "functionality of the guestfs API, see L<guestfs(3)>."
19491 #: ../fish/guestfish.pod:36
19493 "Guestfish gives you structured access to the libguestfs API, from shell "
19494 "scripts or the command line or interactively. If you want to rescue a "
19495 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
19500 #: ../fish/guestfish.pod:43
19501 msgid "As an interactive shell"
19505 #: ../fish/guestfish.pod:45
19513 #: ../fish/guestfish.pod:47
19516 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
19517 " editing virtual machine filesystems.\n"
19522 #: ../fish/guestfish.pod:50
19525 " Type: 'help' for a list of commands\n"
19526 " 'man' to read the manual\n"
19527 " 'quit' to quit the shell\n"
19532 #: ../fish/guestfish.pod:54
19535 " ><fs> add-ro disk.img\n"
19537 " ><fs> list-filesystems\n"
19538 " /dev/sda1: ext4\n"
19539 " /dev/vg_guest/lv_root: ext4\n"
19540 " /dev/vg_guest/lv_swap: swap\n"
19541 " ><fs> mount /dev/vg_guest/lv_root /\n"
19542 " ><fs> cat /etc/fstab\n"
19544 " # Created by anaconda\n"
19551 #: ../fish/guestfish.pod:67
19552 msgid "From shell scripts"
19556 #: ../fish/guestfish.pod:69
19557 msgid "Create a new C</etc/motd> file in a guest or disk image:"
19561 #: ../fish/guestfish.pod:71
19564 " guestfish <<_EOF_\n"
19567 " mount /dev/vg_guest/lv_root /\n"
19568 " write /etc/motd \"Welcome, new users\"\n"
19574 #: ../fish/guestfish.pod:78
19575 msgid "List the LVM logical volumes in a disk image:"
19579 #: ../fish/guestfish.pod:80
19582 " guestfish -a disk.img --ro <<_EOF_\n"
19590 #: ../fish/guestfish.pod:85
19591 msgid "List all the filesystems in a disk image:"
19595 #: ../fish/guestfish.pod:87
19598 " guestfish -a disk.img --ro <<_EOF_\n"
19600 " list-filesystems\n"
19606 #: ../fish/guestfish.pod:92
19607 msgid "On one command line"
19611 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
19612 msgid "Update C</etc/resolv.conf> in a guest:"
19616 #: ../fish/guestfish.pod:96
19620 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
19621 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
19626 #: ../fish/guestfish.pod:100
19627 msgid "Edit C</boot/grub/grub.conf> interactively:"
19631 #: ../fish/guestfish.pod:102
19634 " guestfish --rw --add disk.img \\\n"
19635 " --mount /dev/vg_guest/lv_root \\\n"
19636 " --mount /dev/sda1:/boot \\\n"
19637 " edit /boot/grub/grub.conf\n"
19642 #: ../fish/guestfish.pod:107
19643 msgid "Mount disks automatically"
19647 #: ../fish/guestfish.pod:109
19649 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
19653 #: ../fish/guestfish.pod:112
19656 " guestfish --ro -a disk.img -i cat /etc/group\n"
19661 #: ../fish/guestfish.pod:114
19664 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
19669 #: ../fish/guestfish.pod:116
19670 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
19674 #: ../fish/guestfish.pod:118
19677 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
19682 #: ../fish/guestfish.pod:120
19683 msgid "As a script interpreter"
19687 #: ../fish/guestfish.pod:122
19688 msgid "Create a 100MB disk containing an ext2-formatted partition:"
19692 #: ../fish/guestfish.pod:124
19695 " #!/usr/bin/guestfish -f\n"
19696 " sparse test1.img 100M\n"
19698 " part-disk /dev/sda mbr\n"
19699 " mkfs ext2 /dev/sda1\n"
19704 #: ../fish/guestfish.pod:130
19705 msgid "Start with a prepared disk"
19709 #: ../fish/guestfish.pod:132
19711 "An alternate way to create a 100MB disk called C<test1.img> containing a "
19712 "single ext2-formatted partition:"
19716 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
19719 " guestfish -N fs\n"
19724 #: ../fish/guestfish.pod:137
19725 msgid "To list what is available do:"
19729 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
19732 " guestfish -N help | less\n"
19737 #: ../fish/guestfish.pod:141
19738 msgid "Remote control"
19742 #: ../fish/guestfish.pod:143
19745 " eval \"`guestfish --listen`\"\n"
19746 " guestfish --remote add-ro disk.img\n"
19747 " guestfish --remote run\n"
19748 " guestfish --remote lvs\n"
19753 #: ../fish/guestfish.pod:154
19754 msgid "Displays general help on options."
19758 #: ../fish/guestfish.pod:158
19759 msgid "B<--cmd-help>"
19763 #: ../fish/guestfish.pod:160
19764 msgid "Lists all available guestfish commands."
19768 #: ../fish/guestfish.pod:162
19773 #: ../fish/guestfish.pod:164
19774 msgid "B<--cmd-help cmd>"
19778 #: ../fish/guestfish.pod:166
19779 msgid "Displays detailed help on a single command C<cmd>."
19783 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
19784 msgid "B<-a image>"
19788 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
19789 msgid "B<--add image>"
19793 #: ../fish/guestfish.pod:172
19794 msgid "Add a block device or virtual machine image to the shell."
19798 #: ../fish/guestfish.pod:177
19800 "Using this flag is mostly equivalent to using the C<add> command, with "
19801 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
19802 "the I<--format=...> flag was given."
19806 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
19808 "When used in conjunction with the I<-d> option, this specifies the libvirt "
19809 "URI to use. The default is to use the default libvirt connection."
19813 #: ../fish/guestfish.pod:189
19818 #: ../fish/guestfish.pod:191
19820 "If using the I<--listen> option and a csh-like shell, use this option. See "
19821 "section L</REMOTE CONTROL AND CSH> below."
19825 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
19826 msgid "B<-d libvirt-domain>"
19830 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
19831 msgid "B<--domain libvirt-domain>"
19835 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
19837 "Add disks from the named libvirt domain. If the I<--ro> option is also "
19838 "used, then any libvirt domain can be used. However in write mode, only "
19839 "libvirt domains which are shut down can be named here."
19843 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
19844 msgid "Domain UUIDs can be used instead of names."
19848 #: ../fish/guestfish.pod:204
19850 "Using this flag is mostly equivalent to using the C<add-domain> command, "
19851 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
19852 "if the I<--format:...> flag was given."
19856 #: ../fish/guestfish.pod:208
19861 #: ../fish/guestfish.pod:210
19862 msgid "B<--no-dest-paths>"
19866 #: ../fish/guestfish.pod:212
19868 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
19869 "to hit the tab key to complete paths on the guest filesystem, but this "
19870 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
19871 "allow this feature to be disabled."
19875 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
19877 "When prompting for keys and passphrases, guestfish normally turns echoing "
19878 "off so you cannot see what you are typing. If you are not worried about "
19879 "Tempest attacks and there is no one else in the room you can specify this "
19880 "flag to see what you are typing."
19884 #: ../fish/guestfish.pod:224
19889 #: ../fish/guestfish.pod:226
19890 msgid "B<--file file>"
19894 #: ../fish/guestfish.pod:228
19895 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19899 #: ../fish/guestfish.pod:231
19902 " #!/usr/bin/guestfish -f\n"
19907 #: ../fish/guestfish.pod:244
19910 " guestfish --format=raw -a disk.img\n"
19915 #: ../fish/guestfish.pod:248
19918 " guestfish --format=raw -a disk.img --format -a another.img\n"
19923 #: ../fish/guestfish.pod:253
19925 "If you have untrusted raw-format guest disk images, you should use this "
19926 "option to specify the disk format. This avoids a possible security problem "
19927 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19931 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
19932 msgid "B<--inspector>"
19936 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
19938 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19939 "system and mount filesystems as they would be mounted on the real virtual "
19944 #: ../fish/guestfish.pod:266
19945 msgid "Typical usage is either:"
19949 #: ../fish/guestfish.pod:268
19952 " guestfish -d myguest -i\n"
19957 #: ../fish/guestfish.pod:270
19958 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19962 #: ../fish/guestfish.pod:272
19965 " guestfish --ro -d myguest -i\n"
19970 #: ../fish/guestfish.pod:274
19971 msgid "(for active domains, readonly), or specify the block device directly:"
19975 #: ../fish/guestfish.pod:276
19978 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19983 #: ../fish/guestfish.pod:278
19985 "Note that the command line syntax changed slightly over older versions of "
19986 "guestfish. You can still use the old syntax:"
19990 #: ../fish/guestfish.pod:281
19993 " guestfish [--ro] -i disk.img\n"
19998 #: ../fish/guestfish.pod:283
20001 " guestfish [--ro] -i libvirt-domain\n"
20006 #: ../fish/guestfish.pod:285
20008 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
20009 "then using other commands to mount the filesystems that were found."
20013 #: ../fish/guestfish.pod:294
20014 msgid "B<--listen>"
20018 #: ../fish/guestfish.pod:296
20020 "Fork into the background and listen for remote commands. See section L</"
20021 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
20025 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
20030 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
20032 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
20033 "ATTACHING TO RUNNING DAEMONS>)."
20037 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
20038 msgid "B<-m dev[:mountpoint[:options]]>"
20042 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
20043 msgid "B<--mount dev[:mountpoint[:options]]>"
20047 #: ../fish/guestfish.pod:308
20048 msgid "Mount the named partition or logical volume on the given mountpoint."
20052 #: ../fish/guestfish.pod:310
20053 msgid "If the mountpoint is omitted, it defaults to C</>."
20057 #: ../fish/guestfish.pod:312
20058 msgid "You have to mount something on C</> before most commands will work."
20062 #: ../fish/guestfish.pod:314
20064 "If any I<-m> or I<--mount> options are given, the guest is automatically "
20069 #: ../fish/guestfish.pod:317
20071 "If you don't know what filesystems a disk image contains, you can either run "
20072 "guestfish without this option, then list the partitions, filesystems and LVs "
20073 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
20074 "commands), or you can use the L<virt-filesystems(1)> program."
20078 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
20080 "The third (and rarely used) part of the mount parameter is the list of mount "
20081 "options used to mount the underlying filesystem. If this is not given, then "
20082 "the mount options are either the empty string or C<ro> (the latter if the "
20083 "I<--ro> flag is used). By specifying the mount options, you override this "
20084 "default choice. Probably the only time you would use this is to enable ACLs "
20085 "and/or extended attributes if the filesystem can support them:"
20089 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
20092 " -m /dev/sda1:/:acl,user_xattr\n"
20097 #: ../fish/guestfish.pod:333
20098 msgid "Using this flag is equivalent to using the C<mount-options> command."
20102 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
20103 #: ../resize/virt-resize.pod:441
20108 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
20109 msgid "B<--no-sync>"
20113 #: ../fish/guestfish.pod:339
20115 "Disable autosync. This is enabled by default. See the discussion of "
20116 "autosync in the L<guestfs(3)> manpage."
20120 #: ../fish/guestfish.pod:342
20125 #: ../fish/guestfish.pod:344
20126 msgid "B<--new type>"
20130 #: ../fish/guestfish.pod:346
20135 #: ../fish/guestfish.pod:348
20137 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
20138 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
20139 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
20144 #: ../fish/guestfish.pod:353
20145 msgid "B<--progress-bars>"
20149 #: ../fish/guestfish.pod:355
20150 msgid "Enable progress bars, even when guestfish is used non-interactively."
20154 #: ../fish/guestfish.pod:357
20156 "Progress bars are enabled by default when guestfish is used as an "
20157 "interactive shell."
20161 #: ../fish/guestfish.pod:360
20162 msgid "B<--no-progress-bars>"
20166 #: ../fish/guestfish.pod:362
20167 msgid "Disable progress bars."
20171 #: ../fish/guestfish.pod:364
20172 msgid "B<--remote[=pid]>"
20176 #: ../fish/guestfish.pod:366
20178 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
20179 "CONTROL GUESTFISH OVER A SOCKET> below."
20183 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
20184 #: ../rescue/virt-rescue.pod:189
20189 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
20190 #: ../rescue/virt-rescue.pod:191
20195 #: ../fish/guestfish.pod:373
20197 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20198 "mounts are done read-only."
20202 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
20204 "The option must always be used if the disk image or virtual machine might be "
20205 "running, and is generally recommended in cases where you don't need write "
20206 "access to the disk."
20210 #: ../fish/guestfish.pod:380
20212 "Note that prepared disk images created with I<-N> are not affected by this "
20213 "option. Also commands like C<add> are not affected - you have to specify "
20214 "the C<readonly:true> option explicitly if you need it."
20218 #: ../fish/guestfish.pod:384
20219 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
20223 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
20224 #: ../rescue/virt-rescue.pod:201
20225 msgid "B<--selinux>"
20229 #: ../fish/guestfish.pod:388
20230 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
20234 #: ../fish/guestfish.pod:394
20236 "Enable very verbose messages. This is particularly useful if you find a bug."
20240 #: ../fish/guestfish.pod:401
20241 msgid "Display the guestfish / libguestfs version number and exit."
20245 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
20246 #: ../rescue/virt-rescue.pod:231
20251 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
20252 #: ../rescue/virt-rescue.pod:233
20257 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
20259 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20260 "mounts are done read-write."
20264 #: ../fish/guestfish.pod:410
20265 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
20269 #: ../fish/guestfish.pod:414
20270 msgid "Echo each command before executing it."
20274 #: ../fish/guestfish.pod:418
20275 msgid "COMMANDS ON COMMAND LINE"
20279 #: ../fish/guestfish.pod:420
20281 "Any additional (non-option) arguments are treated as commands to execute."
20285 #: ../fish/guestfish.pod:423
20287 "Commands to execute should be separated by a colon (C<:>), where the colon "
20288 "is a separate parameter. Thus:"
20292 #: ../fish/guestfish.pod:426
20295 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
20300 #: ../fish/guestfish.pod:428
20302 "If there are no additional arguments, then we enter a shell, either an "
20303 "interactive shell with a prompt (if the input is a terminal) or a non-"
20304 "interactive shell."
20308 #: ../fish/guestfish.pod:432
20310 "In either command line mode or non-interactive shell, the first command that "
20311 "gives an error causes the whole shell to exit. In interactive mode (with a "
20312 "prompt) if a command fails, you can continue to enter commands."
20316 #: ../fish/guestfish.pod:437
20317 msgid "USING launch (OR run)"
20321 #: ../fish/guestfish.pod:439
20323 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
20324 "then launch it, then mount any disks you need, and finally issue actions/"
20325 "commands. So the general order of the day is:"
20329 #: ../fish/guestfish.pod:447
20330 msgid "add or -a/--add"
20334 #: ../fish/guestfish.pod:451
20335 msgid "launch (aka run)"
20339 #: ../fish/guestfish.pod:455
20340 msgid "mount or -m/--mount"
20344 #: ../fish/guestfish.pod:459
20345 msgid "any other commands"
20349 #: ../fish/guestfish.pod:463
20351 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
20352 "guest before mounting or performing any other commands."
20356 #: ../fish/guestfish.pod:466
20358 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
20359 "I<--new> options were given then C<run> is done automatically, simply "
20360 "because guestfish can't perform the action you asked for without doing this."
20364 #: ../fish/guestfish.pod:471
20365 msgid "OPENING DISKS FOR READ AND WRITE"
20369 #: ../fish/guestfish.pod:473
20371 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
20372 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
20373 "I<-i> and I<-m> open disk images read-only or for writing."
20377 #: ../fish/guestfish.pod:478
20379 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
20380 "opening disk images supplied on the command line for write. To open a disk "
20381 "image read-only you have to do I<-a image --ro>."
20385 #: ../fish/guestfish.pod:482
20387 "This matters: If you accidentally open a live VM disk image writable then "
20388 "you will cause irreversible disk corruption."
20392 #: ../fish/guestfish.pod:485
20394 "In a future libguestfs we intend to change the default the other way. Disk "
20395 "images will be opened read-only. You will have to either specify "
20396 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
20397 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
20398 "access for disk images specified by those other command line options."
20402 #: ../fish/guestfish.pod:492
20404 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
20405 "which does nothing (it is already the default). However it is highly "
20406 "recommended that you use this option to indicate that you need write access, "
20407 "and prepare your scripts for the day when this option will be required for "
20412 #: ../fish/guestfish.pod:498
20414 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
20415 "other libguestfs program apart from guestfish and guestmount."
20419 #: ../fish/guestfish.pod:501
20424 #: ../fish/guestfish.pod:503
20426 "You can quote ordinary parameters using either single or double quotes. For "
20431 #: ../fish/guestfish.pod:506
20434 " add \"file with a space.img\"\n"
20439 #: ../fish/guestfish.pod:508
20442 " rm '/file name'\n"
20447 #: ../fish/guestfish.pod:510
20455 #: ../fish/guestfish.pod:512
20457 "A few commands require a list of strings to be passed. For these, use a "
20458 "whitespace-separated list, enclosed in quotes. Strings containing "
20459 "whitespace to be passed through must be enclosed in single quotes. A "
20460 "literal single quote must be escaped with a backslash."
20464 #: ../fish/guestfish.pod:517
20467 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
20468 " command \"/bin/echo 'foo bar'\"\n"
20469 " command \"/bin/echo \\'foo\\'\"\n"
20474 #: ../fish/guestfish.pod:521
20475 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
20479 #: ../fish/guestfish.pod:523
20481 "In double-quoted arguments (only) use backslash to insert special characters:"
20485 #: ../fish/guestfish.pod:528
20490 #: ../fish/guestfish.pod:530
20491 msgid "Alert (bell) character."
20495 #: ../fish/guestfish.pod:532
20500 #: ../fish/guestfish.pod:534
20501 msgid "Backspace character."
20505 #: ../fish/guestfish.pod:536
20510 #: ../fish/guestfish.pod:538
20511 msgid "Form feed character."
20515 #: ../fish/guestfish.pod:540
20520 #: ../fish/guestfish.pod:542
20521 msgid "Newline character."
20525 #: ../fish/guestfish.pod:544
20530 #: ../fish/guestfish.pod:546
20531 msgid "Carriage return character."
20535 #: ../fish/guestfish.pod:548
20540 #: ../fish/guestfish.pod:550
20541 msgid "Horizontal tab character."
20545 #: ../fish/guestfish.pod:552
20550 #: ../fish/guestfish.pod:554
20551 msgid "Vertical tab character."
20555 #: ../fish/guestfish.pod:556
20560 #: ../fish/guestfish.pod:558
20561 msgid "A literal double quote character."
20565 #: ../fish/guestfish.pod:560
20570 #: ../fish/guestfish.pod:562
20572 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
20577 #: ../fish/guestfish.pod:565
20582 #: ../fish/guestfish.pod:567
20584 "A character with hex value I<hh>. There must be precisely 2 hex digits."
20588 #: ../fish/guestfish.pod:570
20590 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
20595 #: ../fish/guestfish.pod:573
20600 #: ../fish/guestfish.pod:575
20601 msgid "A literal backslash character."
20605 #: ../fish/guestfish.pod:579
20606 msgid "OPTIONAL ARGUMENTS"
20610 #: ../fish/guestfish.pod:581
20612 "Some commands take optional arguments. These arguments appear in this "
20613 "documentation as C<[argname:..]>. You can use them as in these examples:"
20617 #: ../fish/guestfish.pod:585
20620 " add-drive-opts filename\n"
20625 #: ../fish/guestfish.pod:587
20628 " add-drive-opts filename readonly:true\n"
20633 #: ../fish/guestfish.pod:589
20636 " add-drive-opts filename format:qcow2 readonly:false\n"
20641 #: ../fish/guestfish.pod:591
20643 "Each optional argument can appear at most once. All optional arguments must "
20644 "appear after the required ones."
20648 #: ../fish/guestfish.pod:594
20653 #: ../fish/guestfish.pod:596
20655 "This section applies to all commands which can take integers as parameters."
20659 #: ../fish/guestfish.pod:599
20660 msgid "SIZE SUFFIX"
20664 #: ../fish/guestfish.pod:601
20666 "When the command takes a parameter measured in bytes, you can use one of the "
20667 "following suffixes to specify kilobytes, megabytes and larger sizes:"
20671 #: ../fish/guestfish.pod:607
20672 msgid "B<k> or B<K> or B<KiB>"
20676 #: ../fish/guestfish.pod:609
20677 msgid "The size in kilobytes (multiplied by 1024)."
20681 #: ../fish/guestfish.pod:611
20686 #: ../fish/guestfish.pod:613
20687 msgid "The size in SI 1000 byte units."
20691 #: ../fish/guestfish.pod:615
20692 msgid "B<M> or B<MiB>"
20696 #: ../fish/guestfish.pod:617
20697 msgid "The size in megabytes (multiplied by 1048576)."
20701 #: ../fish/guestfish.pod:619
20706 #: ../fish/guestfish.pod:621
20707 msgid "The size in SI 1000000 byte units."
20711 #: ../fish/guestfish.pod:623
20712 msgid "B<G> or B<GiB>"
20716 #: ../fish/guestfish.pod:625
20717 msgid "The size in gigabytes (multiplied by 2**30)."
20721 #: ../fish/guestfish.pod:627
20726 #: ../fish/guestfish.pod:629
20727 msgid "The size in SI 10**9 byte units."
20731 #: ../fish/guestfish.pod:631
20732 msgid "B<T> or B<TiB>"
20736 #: ../fish/guestfish.pod:633
20737 msgid "The size in terabytes (multiplied by 2**40)."
20741 #: ../fish/guestfish.pod:635
20746 #: ../fish/guestfish.pod:637
20747 msgid "The size in SI 10**12 byte units."
20751 #: ../fish/guestfish.pod:639
20752 msgid "B<P> or B<PiB>"
20756 #: ../fish/guestfish.pod:641
20757 msgid "The size in petabytes (multiplied by 2**50)."
20761 #: ../fish/guestfish.pod:643
20766 #: ../fish/guestfish.pod:645
20767 msgid "The size in SI 10**15 byte units."
20771 #: ../fish/guestfish.pod:647
20772 msgid "B<E> or B<EiB>"
20776 #: ../fish/guestfish.pod:649
20777 msgid "The size in exabytes (multiplied by 2**60)."
20781 #: ../fish/guestfish.pod:651
20786 #: ../fish/guestfish.pod:653
20787 msgid "The size in SI 10**18 byte units."
20791 #: ../fish/guestfish.pod:655
20792 msgid "B<Z> or B<ZiB>"
20796 #: ../fish/guestfish.pod:657
20797 msgid "The size in zettabytes (multiplied by 2**70)."
20801 #: ../fish/guestfish.pod:659
20806 #: ../fish/guestfish.pod:661
20807 msgid "The size in SI 10**21 byte units."
20811 #: ../fish/guestfish.pod:663
20812 msgid "B<Y> or B<YiB>"
20816 #: ../fish/guestfish.pod:665
20817 msgid "The size in yottabytes (multiplied by 2**80)."
20821 #: ../fish/guestfish.pod:667
20826 #: ../fish/guestfish.pod:669
20827 msgid "The size in SI 10**24 byte units."
20831 #: ../fish/guestfish.pod:675
20834 " truncate-size /file 1G\n"
20839 #: ../fish/guestfish.pod:677
20840 msgid "would truncate the file to 1 gigabyte."
20844 #: ../fish/guestfish.pod:679
20846 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
20847 "the parameter to L</memsize> is specified in megabytes already). Adding a "
20848 "suffix will probably not do what you expect."
20852 #: ../fish/guestfish.pod:683
20853 msgid "OCTAL AND HEXADECIMAL NUMBERS"
20857 #: ../fish/guestfish.pod:685
20859 "For specifying the radix (base) use the C convention: C<0> to prefix an "
20860 "octal number or C<0x> to prefix a hexadecimal number. For example:"
20864 #: ../fish/guestfish.pod:688
20867 " 1234 decimal number 1234\n"
20868 " 02322 octal number, equivalent to decimal 1234\n"
20869 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
20874 #: ../fish/guestfish.pod:692
20876 "When using the C<chmod> command, you almost always want to specify an octal "
20877 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
20878 "L<chmod(1)> program):"
20882 #: ../fish/guestfish.pod:696
20885 " chmod 0777 /public # OK\n"
20886 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20891 #: ../fish/guestfish.pod:699
20893 "Commands that return numbers usually print them in decimal, but some "
20894 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20895 "octal, preceeded by C<0>)."
20899 #: ../fish/guestfish.pod:703
20900 msgid "WILDCARDS AND GLOBBING"
20904 #: ../fish/guestfish.pod:705
20906 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20907 "(globbing) by default. So for example the following will not do what you "
20912 #: ../fish/guestfish.pod:709
20920 #: ../fish/guestfish.pod:711
20922 "Assuming you don't have a directory called literally C</home/*> then the "
20923 "above command will return an error."
20927 #: ../fish/guestfish.pod:714
20928 msgid "To perform wildcard expansion, use the C<glob> command."
20932 #: ../fish/guestfish.pod:716
20935 " glob rm-rf /home/*\n"
20940 #: ../fish/guestfish.pod:718
20942 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20943 "many times), equivalent to:"
20947 #: ../fish/guestfish.pod:721
20950 " rm-rf /home/jim\n"
20951 " rm-rf /home/joe\n"
20952 " rm-rf /home/mary\n"
20957 #: ../fish/guestfish.pod:725
20958 msgid "C<glob> only works on simple guest paths and not on device names."
20962 #: ../fish/guestfish.pod:727
20964 "If you have several parameters, each containing a wildcard, then glob will "
20965 "perform a Cartesian product."
20969 #: ../fish/guestfish.pod:730
20974 #: ../fish/guestfish.pod:732
20976 "Any line which starts with a I<#> character is treated as a comment and "
20977 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20978 "a command. For example:"
20982 #: ../fish/guestfish.pod:736
20985 " # this is a comment\n"
20986 " # this is a comment\n"
20987 " foo # NOT a comment\n"
20992 #: ../fish/guestfish.pod:740
20993 msgid "Blank lines are also ignored."
20997 #: ../fish/guestfish.pod:742
20998 msgid "RUNNING COMMANDS LOCALLY"
21002 #: ../fish/guestfish.pod:744
21004 "Any line which starts with a I<!> character is treated as a command sent to "
21005 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
21009 #: ../fish/guestfish.pod:748
21013 " tgz-out /remote local/remote-data.tar.gz\n"
21018 #: ../fish/guestfish.pod:751
21020 "will create a directory C<local> on the host, and then export the contents "
21021 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
21022 "(See C<tgz-out>)."
21026 #: ../fish/guestfish.pod:755
21028 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
21029 "effect, due to the way that subprocesses work in Unix."
21033 #: ../fish/guestfish.pod:758
21034 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
21038 #: ../fish/guestfish.pod:760
21040 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
21041 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
21042 "and executed as guestfish commands."
21046 #: ../fish/guestfish.pod:764
21048 "Thus you can use shell script to construct arbitrary guestfish commands "
21049 "which are then parsed by guestfish."
21053 #: ../fish/guestfish.pod:767
21055 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
21056 "through C</foo.100>) using guestfish commands alone. However this is simple "
21057 "if we use a shell script to create the guestfish commands for us:"
21061 #: ../fish/guestfish.pod:772
21064 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
21069 #: ../fish/guestfish.pod:774
21070 msgid "or with names like C</foo.001>:"
21074 #: ../fish/guestfish.pod:776
21077 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
21082 #: ../fish/guestfish.pod:778
21084 "When using guestfish interactively it can be helpful to just run the shell "
21085 "script first (ie. remove the initial C<E<lt>> character so it is just an "
21086 "ordinary I<!> local command), see what guestfish commands it would run, and "
21087 "when you are happy with those prepend the C<E<lt>> character to run the "
21088 "guestfish commands for real."
21092 #: ../fish/guestfish.pod:784
21097 #: ../fish/guestfish.pod:786
21099 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
21100 "command (a guestfish command) to the second command (any host command). For "
21105 #: ../fish/guestfish.pod:790
21108 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
21113 #: ../fish/guestfish.pod:792
21115 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
21116 "program). The above command would list all accounts in the guest filesystem "
21117 "which have UID 0, ie. root accounts including backdoors. Other examples:"
21121 #: ../fish/guestfish.pod:797
21124 " hexdump /bin/ls | head\n"
21125 " list-devices | tail -1\n"
21126 " tgz-out / - | tar ztf -\n"
21131 #: ../fish/guestfish.pod:801
21133 "The space before the pipe symbol is required, any space after the pipe "
21134 "symbol is optional. Everything after the pipe symbol is just passed "
21135 "straight to the host shell, so it can contain redirections, globs and "
21136 "anything else that makes sense on the host side."
21140 #: ../fish/guestfish.pod:806
21142 "To use a literal argument which begins with a pipe symbol, you have to quote "
21147 #: ../fish/guestfish.pod:809
21155 #: ../fish/guestfish.pod:811
21156 msgid "HOME DIRECTORIES"
21160 #: ../fish/guestfish.pod:813
21162 "If a parameter starts with the character C<~> then the tilde may be expanded "
21163 "as a home directory path (either C<~> for the current user's home directory, "
21164 "or C<~user> for another user)."
21168 #: ../fish/guestfish.pod:817
21170 "Note that home directory expansion happens for users known I<on the host>, "
21171 "not in the guest filesystem."
21175 #: ../fish/guestfish.pod:820
21177 "To use a literal argument which begins with a tilde, you have to quote it, "
21182 #: ../fish/guestfish.pod:823
21190 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
21191 msgid "ENCRYPTED DISKS"
21195 #: ../fish/guestfish.pod:827
21197 "Libguestfs has some support for Linux guests encrypted according to the "
21198 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
21199 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
21200 "LUKS is supported."
21204 #: ../fish/guestfish.pod:832
21205 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
21209 #: ../fish/guestfish.pod:834
21212 " ><fs> vfs-type /dev/sda2\n"
21218 #: ../fish/guestfish.pod:837
21220 "Then open those devices using L</luks-open>. This creates a device-mapper "
21221 "device called C</dev/mapper/luksdev>."
21225 #: ../fish/guestfish.pod:840
21228 " ><fs> luks-open /dev/sda2 luksdev\n"
21229 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
21234 #: ../fish/guestfish.pod:843
21236 "Finally you have to tell LVM to scan for volume groups on the newly created "
21241 #: ../fish/guestfish.pod:846
21245 " vg-activate-all true\n"
21250 #: ../fish/guestfish.pod:849
21251 msgid "The logical volume(s) can now be mounted in the usual way."
21255 #: ../fish/guestfish.pod:851
21257 "Before closing a LUKS device you must unmount any logical volumes on it and "
21258 "deactivate the volume groups by calling C<vg-activate false VG> on each "
21259 "one. Then you can close the mapper device:"
21263 #: ../fish/guestfish.pod:855
21266 " vg-activate false /dev/VG\n"
21267 " luks-close /dev/mapper/luksdev\n"
21272 #: ../fish/guestfish.pod:860
21274 "If a path is prefixed with C<win:> then you can use Windows-style drive "
21275 "letters and paths (with some limitations). The following commands are "
21280 #: ../fish/guestfish.pod:864
21283 " file /WINDOWS/system32/config/system.LOG\n"
21288 #: ../fish/guestfish.pod:866
21291 " file win:\\windows\\system32\\config\\system.log\n"
21296 #: ../fish/guestfish.pod:868
21299 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
21304 #: ../fish/guestfish.pod:870
21306 "The parameter is rewritten \"behind the scenes\" by looking up the position "
21307 "where the drive is mounted, prepending that to the path, changing all "
21308 "backslash characters to forward slash, then resolving the result using L</"
21309 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
21310 "the parameter might be rewritten like this:"
21314 #: ../fish/guestfish.pod:876
21317 " win:e:\\foo\\bar => /e/FOO/bar\n"
21322 #: ../fish/guestfish.pod:878
21323 msgid "This only works in argument positions that expect a path."
21327 #: ../fish/guestfish.pod:880
21328 msgid "UPLOADING AND DOWNLOADING FILES"
21332 #: ../fish/guestfish.pod:882
21334 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
21335 "others which upload from or download to a local file, you can use the "
21336 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
21340 #: ../fish/guestfish.pod:886
21348 #: ../fish/guestfish.pod:888
21350 "reads stdin and creates from that a file C</foo> in the disk image, and:"
21354 #: ../fish/guestfish.pod:891
21357 " tar-out /etc - | tar tf -\n"
21362 #: ../fish/guestfish.pod:893
21364 "writes the tarball to stdout and then pipes that into the external \"tar\" "
21365 "command (see L</PIPES>)."
21369 #: ../fish/guestfish.pod:896
21371 "When using C<-> to read from stdin, the input is read up to the end of "
21372 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
21373 "some arbitrary end marker:"
21377 #: ../fish/guestfish.pod:900
21380 " upload -<<END /foo\n"
21389 #: ../fish/guestfish.pod:906
21391 "Any string of characters can be used instead of C<END>. The end marker must "
21392 "appear on a line of its own, without any preceeding or following characters "
21393 "(not even spaces)."
21397 #: ../fish/guestfish.pod:910
21399 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
21400 "upload local files (so-called \"FileIn\" parameters in the generator)."
21404 #: ../fish/guestfish.pod:913
21405 msgid "EXIT ON ERROR BEHAVIOUR"
21409 #: ../fish/guestfish.pod:915
21411 "By default, guestfish will ignore any errors when in interactive mode (ie. "
21412 "taking commands from a human over a tty), and will exit on the first error "
21413 "in non-interactive mode (scripts, commands given on the command line)."
21417 #: ../fish/guestfish.pod:920
21419 "If you prefix a command with a I<-> character, then that command will not "
21420 "cause guestfish to exit, even if that (one) command returns an error."
21424 #: ../fish/guestfish.pod:924
21425 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
21429 #: ../fish/guestfish.pod:926
21431 "Guestfish can be remote-controlled over a socket. This is useful "
21432 "particularly in shell scripts where you want to make several different "
21433 "changes to a filesystem, but you don't want the overhead of starting up a "
21434 "guestfish process each time."
21438 #: ../fish/guestfish.pod:931
21439 msgid "Start a guestfish server process using:"
21443 #: ../fish/guestfish.pod:933
21446 " eval \"`guestfish --listen`\"\n"
21451 #: ../fish/guestfish.pod:935
21452 msgid "and then send it commands by doing:"
21456 #: ../fish/guestfish.pod:937
21459 " guestfish --remote cmd [...]\n"
21464 #: ../fish/guestfish.pod:939
21465 msgid "To cause the server to exit, send it the exit command:"
21469 #: ../fish/guestfish.pod:943
21471 "Note that the server will normally exit if there is an error in a command. "
21472 "You can change this in the usual way. See section L</EXIT ON ERROR "
21477 #: ../fish/guestfish.pod:947
21478 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
21482 #: ../fish/guestfish.pod:949
21484 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
21485 "is how the I<--remote> option knows where to send the commands. You can "
21486 "have several guestfish listener processes running using:"
21490 #: ../fish/guestfish.pod:953
21493 " eval \"`guestfish --listen`\"\n"
21494 " pid1=$GUESTFISH_PID\n"
21495 " eval \"`guestfish --listen`\"\n"
21496 " pid2=$GUESTFISH_PID\n"
21498 " guestfish --remote=$pid1 cmd\n"
21499 " guestfish --remote=$pid2 cmd\n"
21504 #: ../fish/guestfish.pod:961
21505 msgid "REMOTE CONTROL AND CSH"
21509 #: ../fish/guestfish.pod:963
21511 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
21516 #: ../fish/guestfish.pod:966
21519 " eval \"`guestfish --listen --csh`\"\n"
21524 #: ../fish/guestfish.pod:968
21525 msgid "REMOTE CONTROL DETAILS"
21529 #: ../fish/guestfish.pod:970
21531 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
21532 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
21533 "and C<$PID> is the process ID of the server."
21537 #: ../fish/guestfish.pod:974
21538 msgid "Guestfish client and server versions must match exactly."
21542 #: ../fish/guestfish.pod:976
21543 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
21547 #: ../fish/guestfish.pod:978
21549 "From Bash, you can use the following code which creates a guestfish "
21550 "instance, correctly quotes the command line, handles failure to start, and "
21551 "cleans up guestfish when the script exits:"
21555 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
21563 #: ../fish/guestfish.pod:986
21566 " guestfish[0]=\"guestfish\"\n"
21567 " guestfish[1]=\"--listen\"\n"
21568 " guestfish[2]=\"--ro\"\n"
21569 " guestfish[3]=\"-a\"\n"
21570 " guestfish[4]=\"disk.img\"\n"
21575 #: ../fish/guestfish.pod:992
21578 " GUESTFISH_PID=\n"
21579 " eval $(\"${guestfish[@]}\")\n"
21580 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
21581 " echo \"error: guestfish didn't start up, see error messages above\"\n"
21588 #: ../fish/guestfish.pod:999
21591 " cleanup_guestfish ()\n"
21593 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
21595 " trap cleanup_guestfish EXIT ERR\n"
21600 #: ../fish/guestfish.pod:1005
21603 " guestfish --remote -- run\n"
21608 #: ../fish/guestfish.pod:1007
21616 #: ../fish/guestfish.pod:1009
21617 msgid "REMOTE CONTROL RUN COMMAND HANGING"
21621 #: ../fish/guestfish.pod:1011
21623 "Using the C<run> (or C<launch>) command remotely in a command substitution "
21624 "context hangs, ie. don't do (note the backquotes):"
21628 #: ../fish/guestfish.pod:1014
21631 " a=`guestfish --remote run`\n"
21636 #: ../fish/guestfish.pod:1016
21638 "Since the C<run> command produces no output on stdout, this is not useful "
21639 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
21644 #: ../fish/guestfish.pod:1020
21645 msgid "PREPARED DISK IMAGES"
21649 #: ../fish/guestfish.pod:1022
21651 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
21652 "preformatted disk images that guestfish can make for you to save typing. "
21653 "This is particularly useful for testing purposes. This option is used "
21654 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
21655 "can be mixed with I<-a>)."
21659 #: ../fish/guestfish.pod:1028
21661 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
21662 "the second and so on. Existing files in the current directory are "
21667 #: ../fish/guestfish.pod:1032
21669 "The type briefly describes how the disk should be sized, partitioned, how "
21670 "filesystem(s) should be created, and how content should be added. "
21671 "Optionally the type can be followed by extra parameters, separated by C<:> "
21672 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
21673 "allocated disk, containing a single partition, with the partition formatted "
21674 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
21679 #: ../fish/guestfish.pod:1040
21680 msgid "To list the available types and any extra parameters they take, run:"
21684 #: ../fish/guestfish.pod:1044
21686 "Note that the prepared filesystem is not mounted. You would usually have to "
21687 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
21691 #: ../fish/guestfish.pod:1048
21693 "If any I<-N> or I<--new> options are given, the guest is automatically "
21698 #: ../fish/guestfish.pod:1053
21699 msgid "Create a 100MB disk with an ext4-formatted partition:"
21703 #: ../fish/guestfish.pod:1055
21706 " guestfish -N fs:ext4\n"
21711 #: ../fish/guestfish.pod:1057
21712 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
21716 #: ../fish/guestfish.pod:1059
21719 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
21724 #: ../fish/guestfish.pod:1061
21725 msgid "Create a blank 200MB disk:"
21729 #: ../fish/guestfish.pod:1063
21732 " guestfish -N disk:200M\n"
21737 #: ../fish/guestfish.pod:1065
21738 msgid "PROGRESS BARS"
21742 #: ../fish/guestfish.pod:1067
21744 "Some (not all) long-running commands send progress notification messages as "
21745 "they are running. Guestfish turns these messages into progress bars."
21749 #: ../fish/guestfish.pod:1071
21751 "When a command that supports progress bars takes longer than two seconds to "
21752 "run, and if progress bars are enabled, then you will see one appearing below "
21757 #: ../fish/guestfish.pod:1075
21760 " ><fs> copy-size /large-file /another-file 2048M\n"
21761 " / 10% [#####-----------------------------------------] 00:30\n"
21766 #: ../fish/guestfish.pod:1078
21768 "The spinner on the left hand side moves round once for every progress "
21769 "notification received from the backend. This is a (reasonably) golden "
21770 "assurance that the command is \"doing something\" even if the progress bar "
21771 "is not moving, because the command is able to send the progress "
21772 "notifications. When the bar reaches 100% and the command finishes, the "
21773 "spinner disappears."
21777 #: ../fish/guestfish.pod:1085
21779 "Progress bars are enabled by default when guestfish is used interactively. "
21780 "You can enable them even for non-interactive modes using I<--progress-bars>, "
21781 "and you can disable them completely using I<--no-progress-bars>."
21785 #: ../fish/guestfish.pod:1090
21786 msgid "GUESTFISH COMMANDS"
21790 #: ../fish/guestfish.pod:1092
21792 "The commands in this section are guestfish convenience commands, in other "
21793 "words, they are not part of the L<guestfs(3)> API."
21797 #: ../fish/guestfish.pod:1095
21802 #: ../fish/guestfish.pod:1097
21811 #: ../fish/guestfish.pod:1100
21812 msgid "Without any parameter, this provides general help."
21816 #: ../fish/guestfish.pod:1102
21817 msgid "With a C<cmd> parameter, this displays detailed help for that command."
21821 #: ../fish/guestfish.pod:1104
21822 msgid "quit | exit"
21826 #: ../fish/guestfish.pod:1106
21827 msgid "This exits guestfish. You can also use C<^D> key."
21831 #: ../fish/guestfish.pod:1108
21832 msgid "@FISH_COMMANDS@"
21836 #: ../fish/guestfish.pod:1110
21841 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
21846 #: ../fish/guestfish.pod:1116
21848 "guestfish returns 0 if the commands completed without error, or 1 if there "
21853 #: ../fish/guestfish.pod:1123
21858 #: ../fish/guestfish.pod:1125
21860 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
21865 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3199
21866 msgid "FEBOOTSTRAP_KERNEL"
21870 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3201
21871 msgid "FEBOOTSTRAP_MODULES"
21875 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3203
21877 "These two environment variables allow the kernel that libguestfs uses in the "
21878 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
21879 "most recent host kernel is chosen. For more information about kernel "
21880 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
21881 "available in febootstrap E<ge> 3.8."
21885 #: ../fish/guestfish.pod:1138
21886 msgid "GUESTFISH_DISPLAY_IMAGE"
21890 #: ../fish/guestfish.pod:1140
21892 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
21893 "If not set, it uses L<display(1)>."
21897 #: ../fish/guestfish.pod:1143
21898 msgid "GUESTFISH_PID"
21902 #: ../fish/guestfish.pod:1145
21904 "Used with the I<--remote> option to specify the remote guestfish process to "
21905 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21909 #: ../fish/guestfish.pod:1149
21914 #: ../fish/guestfish.pod:1151
21916 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21917 "not specified, the external L<hexedit(1)> program is used."
21921 #: ../fish/guestfish.pod:1155
21926 #: ../fish/guestfish.pod:1157
21928 "If compiled with GNU readline support, various files in the home directory "
21929 "can be used. See L</FILES>."
21933 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3209
21934 msgid "LIBGUESTFS_APPEND"
21938 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3211
21939 msgid "Pass additional options to the guest kernel."
21943 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3213
21944 msgid "LIBGUESTFS_DEBUG"
21948 #: ../fish/guestfish.pod:1166
21950 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21951 "effect as using the B<-v> option."
21955 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3218
21956 msgid "LIBGUESTFS_MEMSIZE"
21960 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3220
21962 "Set the memory allocated to the qemu process, in megabytes. For example:"
21966 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3223
21969 " LIBGUESTFS_MEMSIZE=700\n"
21974 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3225
21975 msgid "LIBGUESTFS_PATH"
21979 #: ../fish/guestfish.pod:1178
21981 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21982 "the discussion of paths in L<guestfs(3)>."
21986 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3230
21987 msgid "LIBGUESTFS_QEMU"
21991 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3232
21993 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
21994 "which was found at compile time by the configure script is used."
21998 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3238
21999 msgid "LIBGUESTFS_TRACE"
22003 #: ../fish/guestfish.pod:1189
22004 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
22008 #: ../fish/guestfish.pod:1191
22013 #: ../fish/guestfish.pod:1193
22015 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
22020 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:260
22021 #: ../src/guestfs.pod:3243
22026 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3245
22028 "Location of temporary directory, defaults to C</tmp> except for the cached "
22029 "supermin appliance which defaults to C</var/tmp>."
22033 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3248
22035 "If libguestfs was compiled to use the supermin appliance then the real "
22036 "appliance is cached in this directory, shared between all handles belonging "
22037 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
22038 "use in case C</var/tmp> is not large enough."
22042 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
22043 #: ../rescue/virt-rescue.pod:310
22048 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
22049 #: ../rescue/virt-rescue.pod:314
22050 msgid "$HOME/.libguestfs-tools.rc"
22054 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
22055 #: ../rescue/virt-rescue.pod:316
22056 msgid "/etc/libguestfs-tools.conf"
22060 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
22061 #: ../rescue/virt-rescue.pod:318
22063 "This configuration file controls the default read-only or read-write mode "
22064 "(I<--ro> or I<--rw>)."
22068 #: ../fish/guestfish.pod:1220
22069 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
22073 #: ../fish/guestfish.pod:1222
22074 msgid "$HOME/.guestfish"
22078 #: ../fish/guestfish.pod:1224
22080 "If compiled with GNU readline support, then the command history is saved in "
22085 #: ../fish/guestfish.pod:1227
22086 msgid "$HOME/.inputrc"
22090 #: ../fish/guestfish.pod:1229
22091 msgid "/etc/inputrc"
22095 #: ../fish/guestfish.pod:1231
22097 "If compiled with GNU readline support, then these files can be used to "
22098 "configure readline. For further information, please see L<readline(3)/"
22099 "INITIALIZATION FILE>."
22103 #: ../fish/guestfish.pod:1235
22104 msgid "To write rules which only apply to guestfish, use:"
22108 #: ../fish/guestfish.pod:1237
22118 #: ../fish/guestfish.pod:1241
22120 "Variables that you can set in inputrc that change the behaviour of guestfish "
22121 "in useful ways include:"
22125 #: ../fish/guestfish.pod:1246
22126 msgid "completion-ignore-case (default: on)"
22130 #: ../fish/guestfish.pod:1248
22132 "By default, guestfish will ignore case when tab-completing paths on the "
22137 #: ../fish/guestfish.pod:1251
22140 " set completion-ignore-case off\n"
22145 #: ../fish/guestfish.pod:1253
22146 msgid "to make guestfish case sensitive."
22150 #: ../fish/guestfish.pod:1257
22155 #: ../fish/guestfish.pod:1259
22156 msgid "test2.img (etc)"
22160 #: ../fish/guestfish.pod:1261
22162 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
22163 "will be created in the file C<test1.img> in the current directory. The "
22164 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
22165 "the same name will be overwritten."
22169 #: ../fish/guestfish.pod:1270
22171 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
22172 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit"
22173 "(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems"
22174 "(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-"
22175 "rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, "
22176 "L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, "
22177 "L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
22181 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3341
22182 #: ../test-tool/libguestfs-test-tool.pod:112
22183 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
22187 #: ../fish/virt-copy-in.pod:5
22189 "virt-copy-in - Copy files and directories into a virtual machine disk image."
22193 #: ../fish/virt-copy-in.pod:9
22196 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
22201 #: ../fish/virt-copy-in.pod:11
22204 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
22209 #: ../fish/virt-copy-in.pod:15
22211 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
22212 "causing disk corruption. The virtual machine must be shut down before you "
22213 "use this command."
22217 #: ../fish/virt-copy-in.pod:21
22219 "C<virt-copy-in> copies files and directories from the local disk into a "
22220 "virtual machine disk image or named libvirt domain."
22224 #: ../fish/virt-copy-in.pod:24
22226 "You can give one of more filenames and directories on the command line. "
22227 "Directories are copied in recursively. The final parameter must be the "
22228 "destination directory in the disk image which must be an absolute path "
22229 "starting with a C</> character."
22233 #: ../fish/virt-copy-in.pod:33
22236 " virt-copy-in -d MyGuest resolv.conf /etc\n"
22241 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
22242 msgid "Upload a home directory to a guest:"
22246 #: ../fish/virt-copy-in.pod:37
22249 " virt-copy-in -d MyGuest skel /home\n"
22254 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
22255 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
22256 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
22260 #: ../fish/virt-copy-in.pod:41
22262 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22263 "> C<copy-in> command. For anything more complex than a trivial copy, you "
22264 "are probably better off using guestfish directly."
22268 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
22269 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
22271 "Since the shell script just passes options straight to guestfish, read "
22272 "L<guestfish(1)> to see the full list of options."
22276 #: ../fish/virt-copy-in.pod:52
22278 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
22279 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
22283 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
22284 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
22285 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
22289 #: ../fish/virt-copy-out.pod:5
22291 "virt-copy-out - Copy files and directories out of a virtual machine disk "
22296 #: ../fish/virt-copy-out.pod:9
22299 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
22304 #: ../fish/virt-copy-out.pod:11
22307 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
22312 #: ../fish/virt-copy-out.pod:15
22314 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
22315 "image or named libvirt domain."
22319 #: ../fish/virt-copy-out.pod:18
22321 "You can give one of more filenames and directories on the command line. "
22322 "Directories are copied out recursively."
22326 #: ../fish/virt-copy-out.pod:23
22327 msgid "Download the home directories from a virtual machine:"
22331 #: ../fish/virt-copy-out.pod:25
22335 " virt-copy-out -d MyGuest /home homes\n"
22340 #: ../fish/virt-copy-out.pod:30
22342 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22343 "> C<copy-out> command. For anything more complex than a trivial copy, you "
22344 "are probably better off using guestfish directly."
22348 #: ../fish/virt-copy-out.pod:41
22350 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
22351 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
22355 #: ../fish/virt-tar-in.pod:5
22356 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
22360 #: ../fish/virt-tar-in.pod:9
22363 " virt-tar-in -a disk.img data.tar /destination\n"
22368 #: ../fish/virt-tar-in.pod:11
22371 " virt-tar-in -d domain data.tar /destination\n"
22376 #: ../fish/virt-tar-in.pod:13
22379 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
22384 #: ../fish/virt-tar-in.pod:17
22386 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
22387 "causing disk corruption. The virtual machine must be shut down before you "
22388 "use this command."
22392 #: ../fish/virt-tar-in.pod:23
22394 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
22395 "image or named libvirt domain."
22399 #: ../fish/virt-tar-in.pod:26
22401 "The first parameter is the tar file. Use C<-> to read the tar file from "
22402 "standard input. The second parameter is the absolute target directory to "
22407 #: ../fish/virt-tar-in.pod:34
22410 " virt-tar-in -d MyGuest homes.tar /home\n"
22415 #: ../fish/virt-tar-in.pod:38
22417 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22418 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
22419 "probably better off using guestfish directly."
22423 #: ../fish/virt-tar-in.pod:49
22425 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
22426 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
22431 #: ../fish/virt-tar-out.pod:5
22433 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
22437 #: ../fish/virt-tar-out.pod:9
22440 " virt-tar-out -a disk.img /dir files.tar\n"
22445 #: ../fish/virt-tar-out.pod:11
22448 " virt-tar-out -d domain /dir files.tar\n"
22453 #: ../fish/virt-tar-out.pod:13
22456 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
22461 #: ../fish/virt-tar-out.pod:17
22463 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
22467 #: ../fish/virt-tar-out.pod:20
22469 "The first parameter is the absolute path of the virtual machine directory. "
22470 "The second parameter is the tar file to write. Use C<-> to write to "
22475 #: ../fish/virt-tar-out.pod:26
22476 msgid "Download the home directories from a guest:"
22480 #: ../fish/virt-tar-out.pod:28
22483 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
22488 #: ../fish/virt-tar-out.pod:32
22490 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22491 "> C<tar-out> command. For anything more complex than a trivial copy, you "
22492 "are probably better off using guestfish directly."
22496 #: ../fish/virt-tar-out.pod:43
22498 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
22499 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
22503 #: ../fuse/guestmount.pod:5
22505 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
22509 #: ../fuse/guestmount.pod:9
22512 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
22517 #: ../fuse/guestmount.pod:11
22520 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
22525 #: ../fuse/guestmount.pod:13
22528 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
22533 #: ../fuse/guestmount.pod:17
22535 "You must I<not> use C<guestmount> in read-write mode on live virtual "
22536 "machines. If you do this, you risk disk corruption in the VM."
22540 #: ../fuse/guestmount.pod:22
22542 "The guestmount program can be used to mount virtual machine filesystems and "
22543 "other disk images on the host. It uses libguestfs for access to the guest "
22544 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
22545 "a mountable device."
22549 #: ../fuse/guestmount.pod:27
22551 "Along with other options, you have to give at least one device (I<-a> "
22552 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
22553 "option) or use the I<-i> inspection option or the I<--live> option. How "
22554 "this works is better explained in the L<guestfish(1)> manual page, or by "
22555 "looking at the examples below."
22559 #: ../fuse/guestmount.pod:33
22561 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
22562 "by you, and the filesystem will not be visible to any other users unless you "
22563 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
22564 "the filesystem, use the C<fusermount -u> command."
22568 #: ../fuse/guestmount.pod:41
22570 "For a typical Windows guest which has its main filesystem on the first "
22575 #: ../fuse/guestmount.pod:44
22578 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
22583 #: ../fuse/guestmount.pod:46
22585 "For a typical Linux guest which has a /boot filesystem on the first "
22586 "partition, and the root filesystem on a logical volume:"
22590 #: ../fuse/guestmount.pod:49
22593 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
22598 #: ../fuse/guestmount.pod:51
22599 msgid "To get libguestfs to detect guest mountpoints for you:"
22603 #: ../fuse/guestmount.pod:53
22606 " guestmount -a guest.img -i --ro /mnt\n"
22611 #: ../fuse/guestmount.pod:55
22612 msgid "For a libvirt guest called \"Guest\" you could do:"
22616 #: ../fuse/guestmount.pod:57
22619 " guestmount -d Guest -i --ro /mnt\n"
22624 #: ../fuse/guestmount.pod:59
22626 "If you don't know what filesystems are contained in a guest or disk image, "
22627 "use L<virt-filesystems(1)> first:"
22631 #: ../fuse/guestmount.pod:62
22634 " virt-filesystems MyGuest\n"
22639 #: ../fuse/guestmount.pod:64
22641 "If you want to trace the libguestfs calls but without excessive debugging "
22642 "information, we recommend:"
22646 #: ../fuse/guestmount.pod:67
22649 " guestmount [...] --trace /mnt\n"
22654 #: ../fuse/guestmount.pod:69
22655 msgid "If you want to debug the program, we recommend:"
22659 #: ../fuse/guestmount.pod:71
22662 " guestmount [...] --trace --verbose /mnt\n"
22667 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96
22668 #: ../resize/virt-resize.pod:627
22673 #: ../fuse/guestmount.pod:75
22674 msgid "Other users cannot see the filesystem by default"
22678 #: ../fuse/guestmount.pod:77
22680 "If you mount a filesystem as one user (eg. root), then other users will not "
22681 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
22682 "option when mounting:"
22686 #: ../fuse/guestmount.pod:81
22689 " sudo guestmount [...] -o allow_other /mnt\n"
22694 #: ../fuse/guestmount.pod:83
22695 msgid "Enabling FUSE"
22699 #: ../fuse/guestmount.pod:85
22701 "On some distros, you may need to add yourself to a special group (eg. "
22702 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
22703 "Debian and derivatives."
22707 #: ../fuse/guestmount.pod:89
22709 "On other distros, no special group is required. It is not necessary on "
22710 "Fedora or Red Hat Enterprise Linux."
22714 #: ../fuse/guestmount.pod:100
22715 msgid "Add a block device or virtual machine image."
22719 #: ../fuse/guestmount.pod:123
22720 msgid "B<--dir-cache-timeout N>"
22724 #: ../fuse/guestmount.pod:125
22726 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
22727 "seconds. The readdir cache [actually, there are several semi-independent "
22728 "caches] is populated after a readdir(2) call with the stat and extended "
22729 "attributes of the files in the directory, in anticipation that they will be "
22730 "requested soon after."
22734 #: ../fuse/guestmount.pod:131
22736 "There is also a different attribute cache implemented by FUSE (see the FUSE "
22737 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
22738 "requests, only cache existing ones."
22742 #: ../fuse/guestmount.pod:151
22744 "If you have untrusted raw-format guest disk images, you should use this "
22745 "option to specify the disk format. This avoids a possible security problem "
22746 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
22747 "guestfs_add_drive_opts>."
22751 #: ../fuse/guestmount.pod:156
22752 msgid "B<--fuse-help>"
22756 #: ../fuse/guestmount.pod:158
22757 msgid "Display help on special FUSE options (see I<-o> below)."
22761 #: ../fuse/guestmount.pod:162
22762 msgid "Display brief help and exit."
22766 #: ../fuse/guestmount.pod:186
22768 "Mount the named partition or logical volume on the given mountpoint B<in the "
22769 "guest> (this has nothing to do with mountpoints in the host)."
22773 #: ../fuse/guestmount.pod:189
22775 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
22776 "something on C</>."
22780 #: ../fuse/guestmount.pod:206
22782 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
22783 "unmounted. If you specify this option, then we don't attempt to sync the "
22784 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
22788 #: ../fuse/guestmount.pod:211
22789 msgid "B<-o option>"
22793 #: ../fuse/guestmount.pod:213
22794 msgid "B<--option option>"
22798 #: ../fuse/guestmount.pod:215
22799 msgid "Pass extra options to FUSE."
22803 #: ../fuse/guestmount.pod:217
22805 "To get a list of all the extra options supported by FUSE, use the command "
22806 "below. Note that only the FUSE I<-o> options can be passed, and only some "
22807 "of them are a good idea."
22811 #: ../fuse/guestmount.pod:221
22814 " guestmount --fuse-help\n"
22819 #: ../fuse/guestmount.pod:223
22820 msgid "Some potentially useful FUSE options:"
22824 #: ../fuse/guestmount.pod:227
22825 msgid "B<-o allow_other>"
22829 #: ../fuse/guestmount.pod:229
22830 msgid "Allow other users to see the filesystem."
22834 #: ../fuse/guestmount.pod:231
22835 msgid "B<-o attr_timeout=N>"
22839 #: ../fuse/guestmount.pod:233
22840 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22844 #: ../fuse/guestmount.pod:235
22845 msgid "B<-o kernel_cache>"
22849 #: ../fuse/guestmount.pod:237
22851 "Allow the kernel to cache files (reduces the number of reads that have to go "
22852 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22853 "afford the extra memory usage."
22857 #: ../fuse/guestmount.pod:241
22858 msgid "B<-o uid=N> B<-o gid=N>"
22862 #: ../fuse/guestmount.pod:243
22864 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22865 "the chosen values."
22869 #: ../fuse/guestmount.pod:252
22871 "Add devices and mount everything read-only. Also disallow writes and make "
22872 "the disk appear read-only to FUSE."
22876 #: ../fuse/guestmount.pod:255
22878 "This is highly recommended if you are not going to edit the guest disk. If "
22879 "the guest is running and this option is I<not> supplied, then there is a "
22880 "strong risk of disk corruption in the guest. We try to prevent this from "
22881 "happening, but it is not always possible."
22885 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
22886 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22890 #: ../fuse/guestmount.pod:264
22891 msgid "Enable SELinux support for the guest."
22895 #: ../fuse/guestmount.pod:270
22896 msgid "Enable verbose messages from underlying libguestfs."
22900 #: ../fuse/guestmount.pod:276
22901 msgid "Display the program version and exit."
22905 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
22906 #: ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
22907 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22911 #: ../fuse/guestmount.pod:289
22916 #: ../fuse/guestmount.pod:291
22917 msgid "Trace libguestfs calls and entry into each FUSE function."
22921 #: ../fuse/guestmount.pod:293
22922 msgid "This also stops the daemon from forking into the background."
22926 #: ../fuse/guestmount.pod:319
22928 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22929 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
22934 #: ../fuse/guestmount.pod:334
22935 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
22939 #: ../inspector/virt-inspector.pod:5
22941 "virt-inspector - Display operating system version and other information "
22942 "about a virtual machine"
22946 #: ../inspector/virt-inspector.pod:9
22949 " virt-inspector [--options] -d domname\n"
22954 #: ../inspector/virt-inspector.pod:11
22957 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
22962 #: ../inspector/virt-inspector.pod:15
22965 " virt-inspector domname\n"
22970 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
22973 " virt-inspector disk.img [disk.img ...]\n"
22978 #: ../inspector/virt-inspector.pod:21
22980 "B<virt-inspector> examines a virtual machine or disk image and tries to "
22981 "determine the version of the operating system and other information about "
22982 "the virtual machine."
22986 #: ../inspector/virt-inspector.pod:25
22987 msgid "Virt-inspector produces XML output for feeding into other programs."
22991 #: ../inspector/virt-inspector.pod:27
22993 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
22994 "the libvirt domain (see: C<virsh list --all>)."
22998 #: ../inspector/virt-inspector.pod:30
23000 "You can also run virt-inspector directly on disk images from a single "
23001 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
23002 "has several block devices, in which case you should list several I<-a> "
23003 "options one after another, with the first corresponding to the guest's C</"
23004 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
23008 #: ../inspector/virt-inspector.pod:37
23010 "You can also run virt-inspector on install disks, live CDs, bootable USB "
23011 "keys and similar."
23015 #: ../inspector/virt-inspector.pod:40
23017 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
23018 "inspect several virtual machines, you have to run virt-inspector several "
23019 "times (for example, from a shell script for-loop)."
23023 #: ../inspector/virt-inspector.pod:45
23025 "Because virt-inspector needs direct access to guest images, it won't "
23026 "normally work over remote libvirt connections."
23030 #: ../inspector/virt-inspector.pod:48
23032 "All of the information available from virt-inspector is also available "
23033 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
23034 "The same information can also be fetched using guestfish or via libguestfs "
23035 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
23036 "WITH OTHER PROGRAMMING LANGUAGES>)."
23040 #: ../inspector/virt-inspector.pod:81
23042 "Libvirt is only used if you specify a C<domname> on the command line. If "
23043 "you specify guest block devices directly (I<-a>), then libvirt is not used "
23048 #: ../inspector/virt-inspector.pod:94
23050 "When prompting for keys and passphrases, virt-inspector normally turns "
23051 "echoing off so you cannot see what you are typing. If you are not worried "
23052 "about Tempest attacks and there is no one else in the room you can specify "
23053 "this flag to see what you are typing."
23057 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
23058 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
23059 #: ../tools/virt-win-reg.pl:144
23061 "Specify the format of disk images given on the command line. If this is "
23062 "omitted then the format is autodetected from the content of the disk image."
23066 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
23067 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
23068 #: ../tools/virt-win-reg.pl:148
23070 "If disk images are requested from libvirt, then this program asks libvirt "
23071 "for this information. In this case, the value of the format parameter is "
23076 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:397
23077 #: ../resize/virt-resize.pod:489 ../sparsify/virt-sparsify.pod:144
23078 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
23079 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
23081 "If working with untrusted raw-format guest disk images, you should ensure "
23082 "the format is always specified."
23086 #: ../inspector/virt-inspector.pod:135
23087 msgid "B<--xpath> query"
23091 #: ../inspector/virt-inspector.pod:137
23093 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
23094 "In this mode virt-inspector simply runs an XPath query; all other inspection "
23095 "functions are disabled. See L</XPATH QUERIES> below for some examples."
23099 #: ../inspector/virt-inspector.pod:146
23100 msgid "Previous versions of virt-inspector allowed you to write either:"
23104 #: ../inspector/virt-inspector.pod:152
23107 " virt-inspector guestname\n"
23112 #: ../inspector/virt-inspector.pod:160
23117 #: ../inspector/virt-inspector.pod:162
23119 "The virt-inspector XML is described precisely in a RELAX NG schema file "
23120 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
23121 "just an overview."
23125 #: ../inspector/virt-inspector.pod:166
23127 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
23128 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
23129 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
23130 "which is vanishingly rare in real world VMs."
23134 #: ../inspector/virt-inspector.pod:171
23135 msgid "E<lt>operatingsystemE<gt>"
23139 #: ../inspector/virt-inspector.pod:173
23141 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
23142 "describe the operating system, its architecture, the descriptive \"product "
23143 "name\" string, the type of OS and so on, as in this example:"
23147 #: ../inspector/virt-inspector.pod:177
23150 " <operatingsystems>\n"
23151 " <operatingsystem>\n"
23152 " <root>/dev/sda2</root>\n"
23153 " <name>windows</name>\n"
23154 " <arch>i386</arch>\n"
23155 " <distro>windows</distro>\n"
23156 " <product_name>Windows 7 Enterprise</product_name>\n"
23157 " <product_variant>Client</product_variant>\n"
23158 " <major_version>6</major_version>\n"
23159 " <minor_version>1</minor_version>\n"
23160 " <windows_systemroot>/Windows</windows_systemroot>\n"
23161 " <format>installed</format>\n"
23166 #: ../inspector/virt-inspector.pod:190
23168 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
23169 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
23170 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
23171 "architecture. The other fields are fairly self-explanatory, but because "
23172 "these fields are taken directly from the libguestfs inspection API you can "
23173 "find precise information from L<guestfs(3)/INSPECTION>."
23177 #: ../inspector/virt-inspector.pod:198
23179 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
23180 "of view of libguestfs (block devices may have completely different names "
23181 "inside the VM itself)."
23185 #: ../inspector/virt-inspector.pod:202
23186 msgid "E<lt>mountpointsE<gt>"
23190 #: ../inspector/virt-inspector.pod:204
23192 "Un*x-like guests typically have multiple filesystems which are mounted at "
23193 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
23194 "element which looks like this:"
23198 #: ../inspector/virt-inspector.pod:208
23201 " <operatingsystems>\n"
23202 " <operatingsystem>\n"
23205 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
23206 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
23207 " </mountpoints>\n"
23212 #: ../inspector/virt-inspector.pod:216
23214 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
23215 "and may have completely different names inside the guest. Only mountable "
23216 "filesystems appear in this list, not things like swap devices."
23220 #: ../inspector/virt-inspector.pod:221
23221 msgid "E<lt>filesystemsE<gt>"
23225 #: ../inspector/virt-inspector.pod:223
23227 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
23228 "filesystems belonging to the guest, including swap and empty partitions. "
23229 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
23230 "this OS or shared with this OS and other OSes)."
23234 #: ../inspector/virt-inspector.pod:229
23235 msgid "You might see something like this:"
23239 #: ../inspector/virt-inspector.pod:231
23242 " <operatingsystems>\n"
23243 " <operatingsystem>\n"
23246 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
23247 " <type>ext4</type>\n"
23248 " <label>Fedora-13-x86_64</label>\n"
23249 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
23255 #: ../inspector/virt-inspector.pod:241
23257 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
23258 "the label, and the UUID."
23262 #: ../inspector/virt-inspector.pod:244
23263 msgid "E<lt>applicationsE<gt>"
23267 #: ../inspector/virt-inspector.pod:246
23269 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
23270 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
23275 #: ../inspector/virt-inspector.pod:250
23277 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
23278 "Typical values would be C<rpm> and C<deb>."
23282 #: ../inspector/virt-inspector.pod:253
23284 "E<lt>package_managementE<gt>, if present, describes the package manager. "
23285 "Typical values include C<yum>, C<up2date> and C<apt>"
23289 #: ../inspector/virt-inspector.pod:256
23290 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
23294 #: ../inspector/virt-inspector.pod:259
23297 " <operatingsystems>\n"
23298 " <operatingsystem>\n"
23300 " <applications>\n"
23302 " <name>coreutils</name>\n"
23303 " <version>8.5</version>\n"
23304 " <release>1</release>\n"
23305 " </application>\n"
23310 #: ../inspector/virt-inspector.pod:269
23312 "The version and release fields may not be available for some types guests. "
23313 "Other fields are possible, see L<guestfs(3)/"
23314 "guestfs_inspect_list_applications>."
23318 #: ../inspector/virt-inspector.pod:273
23319 msgid "E<lt>drive_mappingsE<gt>"
23323 #: ../inspector/virt-inspector.pod:275
23325 "For operating systems like Windows which use drive letters, virt-inspector "
23326 "is able to find out how drive letters map to filesystems."
23330 #: ../inspector/virt-inspector.pod:279
23333 " <operatingsystems>\n"
23334 " <operatingsystem>\n"
23336 " <drive_mappings>\n"
23337 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
23338 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
23339 " </drive_mappings>\n"
23344 #: ../inspector/virt-inspector.pod:287
23346 "In the example above, drive C maps to the filesystem on the second partition "
23347 "on the first disk, and drive E maps to the filesystem on the first partition "
23348 "on the second disk."
23352 #: ../inspector/virt-inspector.pod:291
23354 "Note that this only covers permanent local filesystem mappings, not things "
23355 "like network shares. Furthermore NTFS volume mount points may not be listed "
23360 #: ../inspector/virt-inspector.pod:295
23361 msgid "E<lt>iconE<gt>"
23365 #: ../inspector/virt-inspector.pod:297
23367 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
23368 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
23369 "very large and high quality."
23373 #: ../inspector/virt-inspector.pod:301
23376 " <operatingsystems>\n"
23377 " <operatingsystem>\n"
23380 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
23381 " [... many lines of base64 data ...]\n"
23387 #: ../inspector/virt-inspector.pod:309
23389 "To display the icon, you have to extract it and convert the base64 data back "
23390 "to a binary file. Use an XPath query or simply an editor to extract the "
23391 "data, then use the coreutils L<base64(1)> program to do the conversion back "
23396 #: ../inspector/virt-inspector.pod:314
23399 " base64 -i -d < icon.data > icon.png\n"
23404 #: ../inspector/virt-inspector.pod:316
23405 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
23409 #: ../inspector/virt-inspector.pod:318
23411 "Virt-inspector can detect some operating system installers on install disks, "
23412 "live CDs, bootable USB keys and more."
23416 #: ../inspector/virt-inspector.pod:321
23418 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
23419 "fields may be present to indicate a live CD, network installer, or one part "
23420 "of a multipart CD. For example:"
23424 #: ../inspector/virt-inspector.pod:325
23427 " <operatingsystems>\n"
23428 " <operatingsystem>\n"
23429 " <root>/dev/sda</root>\n"
23430 " <name>linux</name>\n"
23431 " <arch>i386</arch>\n"
23432 " <distro>ubuntu</distro>\n"
23433 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
23434 " <major_version>10</major_version>\n"
23435 " <minor_version>10</minor_version>\n"
23436 " <format>installer</format>\n"
23442 #: ../inspector/virt-inspector.pod:337
23443 msgid "XPATH QUERIES"
23447 #: ../inspector/virt-inspector.pod:339
23449 "Virt-inspector includes built in support for running XPath queries. The "
23450 "reason for including XPath support directly in virt-inspector is simply that "
23451 "there are no good and widely available command line programs that can do "
23452 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
23453 "available on Red Hat Enterprise Linux."
23457 #: ../inspector/virt-inspector.pod:346
23459 "To perform an XPath query, use the I<--xpath> option. Note that in this "
23460 "mode, virt-inspector simply reads XML from stdin and outputs the query "
23461 "result on stdout. All other inspection features are disabled in this mode."
23465 #: ../inspector/virt-inspector.pod:353
23468 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
23470 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
23471 " <type>ext4</type>\n"
23477 #: ../inspector/virt-inspector.pod:359
23480 " $ virt-inspector -d Guest | \\\n"
23481 " virt-inspector --xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
23487 #: ../inspector/virt-inspector.pod:363
23490 " $ virt-inspector -d Guest | \\\n"
23491 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
23492 " [displays the guest icon, if there is one]\n"
23497 #: ../inspector/virt-inspector.pod:374
23498 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
23502 #: ../inspector/virt-inspector.pod:376
23504 "Early versions of libguestfs shipped with a different virt-inspector program "
23505 "written in Perl (the current version is written in C). The XML output of "
23506 "the Perl virt-inspector was different and it could also output in other "
23507 "formats like text."
23511 #: ../inspector/virt-inspector.pod:381
23513 "The old virt-inspector is no longer supported or shipped with libguestfs."
23517 #: ../inspector/virt-inspector.pod:384
23519 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
23520 "versions of virt-inspector with different names:"
23524 #: ../inspector/virt-inspector.pod:387
23527 " virt-inspector Old Perl version.\n"
23528 " virt-inspector2 New C version.\n"
23533 #: ../inspector/virt-inspector.pod:397
23535 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
23536 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
23540 #: ../inspector/virt-inspector.pod:414
23541 msgid "Matthew Booth L<mbooth@redhat.com>"
23545 #: ../java/examples/guestfs-java.pod:5
23546 msgid "guestfs-java - How to use libguestfs from Java"
23550 #: ../java/examples/guestfs-java.pod:9
23553 " import com.redhat.et.libguestfs.*;\n"
23558 #: ../java/examples/guestfs-java.pod:11
23561 " GuestFS g = new GuestFS ();\n"
23562 " g.add_drive_opts (\"disk.img\", null);\n"
23568 #: ../java/examples/guestfs-java.pod:17
23570 "This manual page documents how to call libguestfs from the Java programming "
23571 "language. This page just documents the differences from the C API and gives "
23572 "some examples. If you are not familiar with using libguestfs, you also need "
23573 "to read L<guestfs(3)>."
23577 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
23578 msgid "CLOSING THE HANDLE"
23582 #: ../java/examples/guestfs-java.pod:24
23584 "The handle is closed when it is reaped by the garbage collector. Because "
23585 "libguestfs handles include a lot of state, it is also possible to close (and "
23586 "hence free) them explicitly by calling the C<close> method."
23590 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
23591 #: ../python/examples/guestfs-python.pod:21
23592 #: ../ruby/examples/guestfs-ruby.pod:22
23597 #: ../java/examples/guestfs-java.pod:31
23599 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
23600 "exception. This has a single parameter which is the error message (a "
23605 #: ../java/examples/guestfs-java.pod:35
23606 msgid "Calling any method on a closed handle raises the same exception."
23610 #: ../java/examples/guestfs-java.pod:47
23612 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
23613 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
23614 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
23618 #: ../ocaml/examples/guestfs-ocaml.pod:5
23619 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
23623 #: ../ocaml/examples/guestfs-ocaml.pod:9
23624 msgid "Module style:"
23628 #: ../ocaml/examples/guestfs-ocaml.pod:11
23631 " let g = Guestfs.create () in\n"
23632 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
23633 " Guestfs.launch g;\n"
23638 #: ../ocaml/examples/guestfs-ocaml.pod:15
23639 msgid "Object-oriented style:"
23643 #: ../ocaml/examples/guestfs-ocaml.pod:17
23646 " let g = new Guestfs.guestfs () in\n"
23647 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
23653 #: ../ocaml/examples/guestfs-ocaml.pod:21
23656 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
23658 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
23663 #: ../ocaml/examples/guestfs-ocaml.pod:27
23665 "This manual page documents how to call libguestfs from the OCaml programming "
23666 "language. This page just documents the differences from the C API and gives "
23667 "some examples. If you are not familiar with using libguestfs, you also need "
23668 "to read L<guestfs(3)>."
23672 #: ../ocaml/examples/guestfs-ocaml.pod:32
23673 msgid "PROGRAMMING STYLES"
23677 #: ../ocaml/examples/guestfs-ocaml.pod:34
23679 "There are two different programming styles supported by the OCaml bindings. "
23680 "You can use a module style, with each C function mapped to an OCaml function:"
23684 #: ../ocaml/examples/guestfs-ocaml.pod:38
23687 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
23692 #: ../ocaml/examples/guestfs-ocaml.pod:40
23697 #: ../ocaml/examples/guestfs-ocaml.pod:42
23700 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
23705 #: ../ocaml/examples/guestfs-ocaml.pod:44
23707 "Alternately you can use an object-oriented style, calling methods on the "
23708 "class C<Guestfs.guestfs>:"
23712 #: ../ocaml/examples/guestfs-ocaml.pod:47
23715 " method set_verbose : bool -> unit\n"
23720 #: ../ocaml/examples/guestfs-ocaml.pod:49
23722 "The object-oriented style is usually briefer, and the minor performance "
23723 "penalty isn't noticable in the general overhead of performing libguestfs "
23728 #: ../ocaml/examples/guestfs-ocaml.pod:55
23730 "The handle is closed when it is reaped by the garbage collector. Because "
23731 "libguestfs handles include a lot of state, it is also possible to close (and "
23732 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
23737 #: ../ocaml/examples/guestfs-ocaml.pod:62
23739 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
23740 "exception. This has a single parameter which is the error message (a "
23745 #: ../ocaml/examples/guestfs-ocaml.pod:66
23747 "Calling any function/method on a closed handle raises C<Guestfs."
23748 "Handle_closed>. The single parameter is the name of the function that you "
23753 #: ../ocaml/examples/guestfs-ocaml.pod:80
23755 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
23756 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
23757 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
23761 #: ../perl/examples/guestfs-perl.pod:5
23762 msgid "guestfs-perl - How to use libguestfs from Perl"
23766 #: ../perl/examples/guestfs-perl.pod:9
23769 " use Sys::Guestfs;\n"
23774 #: ../perl/examples/guestfs-perl.pod:11
23777 " my $h = Sys::Guestfs->new ();\n"
23778 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
23779 " $h->launch ();\n"
23780 " $h->mount_options ('', '/dev/sda1', '/');\n"
23781 " $h->touch ('/hello');\n"
23787 #: ../perl/examples/guestfs-perl.pod:20
23789 "This manual page documents how to call libguestfs from the Perl programming "
23790 "language. This page just documents the differences from the C API and gives "
23791 "some examples. If you are not familiar with using libguestfs, you also need "
23792 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
23796 #: ../perl/examples/guestfs-perl.pod:26
23801 #: ../perl/examples/guestfs-perl.pod:28
23803 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
23808 #: ../perl/examples/guestfs-perl.pod:41
23810 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
23811 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
23812 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
23816 #: ../python/examples/guestfs-python.pod:5
23817 msgid "guestfs-python - How to use libguestfs from Python"
23821 #: ../python/examples/guestfs-python.pod:9
23824 " import guestfs\n"
23825 " g = guestfs.GuestFS ()\n"
23826 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
23832 #: ../python/examples/guestfs-python.pod:16
23834 "This manual page documents how to call libguestfs from the Python "
23835 "programming language. This page just documents the differences from the C "
23836 "API and gives some examples. If you are not familiar with using libguestfs, "
23837 "you also need to read L<guestfs(3)>."
23841 #: ../python/examples/guestfs-python.pod:23
23843 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
23844 "single string argument which is the error message."
23848 #: ../python/examples/guestfs-python.pod:26
23849 msgid "MORE DOCUMENTATION"
23853 #: ../python/examples/guestfs-python.pod:28
23858 #: ../python/examples/guestfs-python.pod:30
23862 " >>> import guestfs\n"
23863 " >>> help (guestfs)\n"
23868 #: ../python/examples/guestfs-python.pod:44
23870 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
23871 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
23872 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
23876 #: ../rescue/virt-rescue.pod:5
23877 msgid "virt-rescue - Run a rescue shell on a virtual machine"
23881 #: ../rescue/virt-rescue.pod:9
23884 " virt-rescue [--options] -d domname\n"
23889 #: ../rescue/virt-rescue.pod:11
23892 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
23897 #: ../rescue/virt-rescue.pod:13
23900 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
23905 #: ../rescue/virt-rescue.pod:17
23908 " virt-rescue [--options] domname\n"
23913 #: ../rescue/virt-rescue.pod:19
23916 " virt-rescue [--options] disk.img [disk.img ...]\n"
23921 #: ../rescue/virt-rescue.pod:23
23923 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23924 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23925 "you from doing this, but doesn't catch all cases."
23929 #: ../rescue/virt-rescue.pod:27
23931 "However if you use the I<--ro> (read only) option, then you can attach a "
23932 "shell to a live virtual machine. The results might be strange or "
23933 "inconsistent at times but you won't get disk corruption."
23937 #: ../rescue/virt-rescue.pod:33
23939 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23940 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23941 "recovery tools which you can use to examine or rescue a virtual machine or "
23946 #: ../rescue/virt-rescue.pod:38
23948 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23949 "on disk image(s):"
23953 #: ../rescue/virt-rescue.pod:41
23956 " virt-rescue -d GuestName\n"
23961 #: ../rescue/virt-rescue.pod:43
23964 " virt-rescue --ro -a /path/to/disk.img\n"
23969 #: ../rescue/virt-rescue.pod:45
23972 " virt-rescue -a /dev/sdc\n"
23977 #: ../rescue/virt-rescue.pod:47
23978 msgid "For live VMs you I<must> use the --ro option."
23982 #: ../rescue/virt-rescue.pod:49
23984 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23985 "in an interactive bash shell where you can use many ordinary Linux "
23986 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23987 "appliance. You must mount the virtual machine's filesystems by hand. There "
23988 "is an empty directory called C</sysroot> where you can mount filesystems."
23992 #: ../rescue/virt-rescue.pod:56
23994 "You can get virt-rescue to suggest mount commands for you by using the I<--"
23995 "suggest> option (in another terminal):"
23999 #: ../rescue/virt-rescue.pod:59
24002 " $ virt-rescue --suggest -d Fedora15\n"
24003 " Inspecting the virtual machine or disk image ...\n"
24008 #: ../rescue/virt-rescue.pod:62
24011 " This disk contains one or more operating systems. You can use these\n"
24012 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
24018 #: ../rescue/virt-rescue.pod:66
24021 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
24022 " # type: linux, distro: fedora, version: 15.0\n"
24023 " # Fedora release 15 (Lovelock)\n"
24028 #: ../rescue/virt-rescue.pod:70
24031 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
24032 " mount /dev/vda1 /sysroot/boot\n"
24033 " mount --bind /dev /sysroot/dev\n"
24034 " mount --bind /dev/pts /sysroot/dev/pts\n"
24035 " mount --bind /proc /sysroot/proc\n"
24036 " mount --bind /sys /sysroot/sys\n"
24041 #: ../rescue/virt-rescue.pod:77
24043 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
24044 "(with L<parted(8)>) and mount them by hand:"
24048 #: ../rescue/virt-rescue.pod:80
24052 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
24053 " lv_root vg_f15x32 -wi-a- 8.83G\n"
24054 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
24055 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
24056 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
24057 " ><rescue> ls /sysroot\n"
24062 #: ../rescue/virt-rescue.pod:88
24064 "Another command to list available filesystems is L<virt-filesystems(1)>."
24068 #: ../rescue/virt-rescue.pod:91
24070 "To run commands in a Linux guest (for example, grub), you should chroot into "
24071 "the /sysroot directory first:"
24075 #: ../rescue/virt-rescue.pod:94
24078 " ><rescue> chroot /sysroot\n"
24083 #: ../rescue/virt-rescue.pod:98
24085 "Virt-rescue can be used on I<any> disk image file or device, not just a "
24086 "virtual machine. For example you can use it on a blank file if you want to "
24087 "partition that file (although we would recommend using L<guestfish(1)> "
24088 "instead as it is more suitable for this purpose). You can even use virt-"
24089 "rescue on things like SD cards."
24093 #: ../rescue/virt-rescue.pod:104
24095 "Virt-rescue does not require root. You only need to run it as root if you "
24096 "need root to open the disk image."
24100 #: ../rescue/virt-rescue.pod:107
24102 "This tool is just designed for quick interactive hacking on a virtual "
24103 "machine. For more structured access to a virtual machine disk image, you "
24104 "should use L<guestfs(3)>. To get a structured shell that you can use to "
24105 "make scripted changes to guests, use L<guestfish(1)>."
24109 #: ../rescue/virt-rescue.pod:131
24110 msgid "B<--append kernelopts>"
24114 #: ../rescue/virt-rescue.pod:133
24115 msgid "Pass additional options to the rescue kernel."
24119 #: ../rescue/virt-rescue.pod:163
24122 " virt-rescue --format=raw -a disk.img\n"
24127 #: ../rescue/virt-rescue.pod:167
24130 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
24135 #: ../rescue/virt-rescue.pod:176
24140 #: ../rescue/virt-rescue.pod:178
24141 msgid "B<--memsize MB>"
24145 #: ../rescue/virt-rescue.pod:180
24147 "Change the amount of memory allocated to the rescue system. The default is "
24148 "set by libguestfs and is small but adequate for running system tools. The "
24149 "occasional program might need more memory. The parameter is specified in "
24154 #: ../rescue/virt-rescue.pod:185
24155 msgid "B<--network>"
24159 #: ../rescue/virt-rescue.pod:187
24160 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
24164 #: ../rescue/virt-rescue.pod:193
24165 msgid "Open the image read-only."
24169 #: ../rescue/virt-rescue.pod:203
24171 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
24172 "SELINUX> before using this option."
24176 #: ../rescue/virt-rescue.pod:206
24181 #: ../rescue/virt-rescue.pod:208
24182 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
24186 #: ../rescue/virt-rescue.pod:210
24187 msgid "B<--suggest>"
24191 #: ../rescue/virt-rescue.pod:212
24193 "Inspect the disk image and suggest what mount commands should be used to "
24194 "mount the disks. You should use the I<--suggest> option in a second "
24195 "terminal, then paste the commands into another virt-rescue."
24199 #: ../rescue/virt-rescue.pod:216
24201 "This option implies I<--ro> and is safe to use even if the guest is up or if "
24202 "another virt-rescue is running."
24206 #: ../rescue/virt-rescue.pod:235
24208 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
24209 "are done read-write."
24213 #: ../rescue/virt-rescue.pod:248
24214 msgid "Previous versions of virt-rescue allowed you to write either:"
24218 #: ../rescue/virt-rescue.pod:250
24221 " virt-rescue disk.img [disk.img ...]\n"
24226 #: ../rescue/virt-rescue.pod:254
24229 " virt-rescue guestname\n"
24234 #: ../rescue/virt-rescue.pod:262
24239 #: ../rescue/virt-rescue.pod:264
24241 "Adding the I<--network> option enables QEMU user networking in the rescue "
24242 "appliance. There are some differences between user networking and ordinary "
24247 #: ../rescue/virt-rescue.pod:270
24248 msgid "ping does not work"
24252 #: ../rescue/virt-rescue.pod:272
24254 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
24255 "send the ping packets, and because virt-rescue must be able to run as non-"
24256 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
24257 "The ping command will appear to resolve addresses but will not be able to "
24258 "send or receive any packets. This does not mean that the network is not "
24263 #: ../rescue/virt-rescue.pod:279
24264 msgid "cannot receive connections"
24268 #: ../rescue/virt-rescue.pod:281
24269 msgid "QEMU user networking cannot receive incoming connections."
24273 #: ../rescue/virt-rescue.pod:283
24274 msgid "making TCP connections"
24278 #: ../rescue/virt-rescue.pod:285
24280 "The virt-rescue appliance needs to be small and so does not include many "
24281 "network tools. In particular there is no L<telnet(1)> command. You can "
24282 "make TCP connections from the shell using the magical C</dev/tcp/"
24283 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
24287 #: ../rescue/virt-rescue.pod:290
24290 " exec 3<>/dev/tcp/redhat.com/80\n"
24291 " echo \"GET /\" >&3\n"
24297 #: ../rescue/virt-rescue.pod:294
24298 msgid "See L<bash(1)> for more details."
24302 #: ../rescue/virt-rescue.pod:300
24304 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
24305 "ENVIRONMENT VARIABLES> for the complete list."
24309 #: ../rescue/virt-rescue.pod:327
24311 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-"
24312 "filesystems(1)>, L<http://libguestfs.org/>."
24316 #: ../resize/virt-resize.pod:5
24317 msgid "virt-resize - Resize a virtual machine disk"
24321 #: ../resize/virt-resize.pod:9
24324 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24325 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24326 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24331 #: ../resize/virt-resize.pod:15
24333 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24334 "larger or smaller overall, and resizing or deleting any partitions contained "
24339 #: ../resize/virt-resize.pod:19
24341 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24342 "not> be used on live virtual machines - for consistent results, shut the "
24343 "virtual machine down before resizing it."
24347 #: ../resize/virt-resize.pod:23
24349 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
24350 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
24354 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:603
24355 #: ../sparsify/virt-sparsify.pod:227 ../src/guestfs.pod:484
24356 #: ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
24361 #: ../resize/virt-resize.pod:33
24363 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24364 "fill the extra 5GB of space."
24368 #: ../resize/virt-resize.pod:36
24371 " virt-filesystems --long -h --all -a olddisk\n"
24376 #: ../resize/virt-resize.pod:38
24379 " truncate -r olddisk newdisk\n"
24380 " truncate -s +5G newdisk\n"
24385 #: ../resize/virt-resize.pod:41
24388 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24389 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24394 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:610
24395 #: ../sparsify/virt-sparsify.pod:234 ../src/guestfs.pod:490
24396 #: ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
24401 #: ../resize/virt-resize.pod:46
24403 "As above, but make the /boot partition 200MB bigger, while giving the "
24404 "remaining space to /dev/sda2:"
24408 #: ../resize/virt-resize.pod:49
24411 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24412 " olddisk newdisk\n"
24417 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:616
24418 #: ../sparsify/virt-sparsify.pod:240 ../src/guestfs.pod:501
24419 #: ../src/guestfs.pod:1451
24424 #: ../resize/virt-resize.pod:54
24426 "As in the first example, but expand a logical volume as the final step. "
24427 "This is what you would typically use for Linux guests that use LVM:"
24431 #: ../resize/virt-resize.pod:58
24434 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
24435 " olddisk newdisk\n"
24440 #: ../resize/virt-resize.pod:61
24445 #: ../resize/virt-resize.pod:63
24447 "As in the first example, but the output format will be qcow2 instead of a "
24452 #: ../resize/virt-resize.pod:66
24455 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
24456 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
24461 #: ../resize/virt-resize.pod:71
24462 msgid "DETAILED USAGE"
24466 #: ../resize/virt-resize.pod:73
24467 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24471 #: ../resize/virt-resize.pod:77
24472 msgid "1. Shut down the virtual machine"
24476 #: ../resize/virt-resize.pod:79
24477 msgid "2. Locate input disk image"
24481 #: ../resize/virt-resize.pod:81
24483 "Locate the input disk image (ie. the file or device on the host containing "
24484 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24485 "dumpxml> like this to find the disk image name:"
24489 #: ../resize/virt-resize.pod:85
24492 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24493 " Found 1 nodes:\n"
24495 " <source dev=\"/dev/vg/lv_guest\" />\n"
24500 #: ../resize/virt-resize.pod:90
24501 msgid "3. Look at current sizing"
24505 #: ../resize/virt-resize.pod:92
24506 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
24510 #: ../resize/virt-resize.pod:95
24513 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
24514 " Name Type Size Parent\n"
24515 " /dev/sda1 partition 101M /dev/sda\n"
24516 " /dev/sda2 partition 7.9G /dev/sda\n"
24517 " /dev/sda device 8.0G -\n"
24522 #: ../resize/virt-resize.pod:101
24524 "(This example is a virtual machine with an 8 GB disk which we would like to "
24525 "expand up to 10 GB)."
24529 #: ../resize/virt-resize.pod:104
24530 msgid "4. Create output disk"
24534 #: ../resize/virt-resize.pod:106
24536 "Virt-resize cannot do in-place disk modifications. You have to have space "
24537 "to store the resized output disk."
24541 #: ../resize/virt-resize.pod:109
24543 "To store the resized disk image in a file, create a file of a suitable size:"
24547 #: ../resize/virt-resize.pod:112
24550 " # rm -f outdisk\n"
24551 " # truncate -s 10G outdisk\n"
24556 #: ../resize/virt-resize.pod:115
24557 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24561 #: ../resize/virt-resize.pod:117
24564 " # lvcreate -L 10G -n lv_name vg_name\n"
24569 #: ../resize/virt-resize.pod:119
24570 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24574 #: ../resize/virt-resize.pod:121
24577 " # virsh pool-list\n"
24578 " # virsh vol-create-as poolname newvol 10G\n"
24583 #: ../resize/virt-resize.pod:124
24588 #: ../resize/virt-resize.pod:126
24590 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24591 "file) and the output disk. The output disk is the one created in the "
24596 #: ../resize/virt-resize.pod:130
24599 " # virt-resize indisk outdisk\n"
24604 #: ../resize/virt-resize.pod:132
24606 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24607 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24608 "larger, then an extra, empty partition is created at the end of the disk "
24609 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24614 #: ../resize/virt-resize.pod:138
24616 "More realistically you'd want to expand existing partitions in the disk "
24617 "image by passing extra options (for the full list see the L</OPTIONS> "
24622 #: ../resize/virt-resize.pod:142
24624 "L</--expand> is the most useful option. It expands the named partition "
24625 "within the disk to fill any extra space:"
24629 #: ../resize/virt-resize.pod:145
24632 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24637 #: ../resize/virt-resize.pod:147
24639 "(In this case, an extra partition is I<not> created at the end of the disk, "
24640 "because there will be no unused space)."
24644 #: ../resize/virt-resize.pod:150
24646 "L</--resize> is the other commonly used option. The following would "
24647 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24648 "rest of the available space:"
24652 #: ../resize/virt-resize.pod:154
24655 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24656 " indisk outdisk\n"
24661 #: ../resize/virt-resize.pod:157
24663 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24664 "if virt-resize knows how, it will resize the contents, the equivalent of "
24665 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
24666 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
24667 "filesystems, so you would have to online resize them after booting the guest."
24671 #: ../resize/virt-resize.pod:164
24672 msgid "Other options are covered below."
24676 #: ../resize/virt-resize.pod:166
24681 #: ../resize/virt-resize.pod:168
24682 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24686 #: ../resize/virt-resize.pod:170
24687 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24691 #: ../resize/virt-resize.pod:172
24694 " # virsh edit guestname\n"
24699 #: ../resize/virt-resize.pod:174
24701 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
24702 "html#elementsDisks>"
24706 #: ../resize/virt-resize.pod:177
24707 msgid "Then start up the domain with the new, resized disk:"
24711 #: ../resize/virt-resize.pod:179
24714 " # virsh start guestname\n"
24719 #: ../resize/virt-resize.pod:181
24721 "and check that it still works. See also the L</NOTES> section below for "
24722 "additional information."
24726 #: ../resize/virt-resize.pod:184
24727 msgid "7. Resize LVs etc inside the guest"
24731 #: ../resize/virt-resize.pod:186
24732 msgid "(This can also be done offline using L<guestfish(1)>)"
24736 #: ../resize/virt-resize.pod:188
24738 "Once the guest has booted you should see the new space available, at least "
24739 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24740 "may need to resize LVs inside PVs, and also resize filesystem types that "
24741 "virt-resize does not know how to expand."
24745 #: ../resize/virt-resize.pod:195
24746 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24750 #: ../resize/virt-resize.pod:197
24752 "Shrinking is somewhat more complex than expanding, and only an overview is "
24757 #: ../resize/virt-resize.pod:200
24759 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24760 "filesystems). The user has to shrink content before passing the disk image "
24761 "to virt-resize, and virt-resize will check that the content has been shrunk "
24766 #: ../resize/virt-resize.pod:205
24767 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24771 #: ../resize/virt-resize.pod:207
24773 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24774 "steps 3 and 4 above to allocate a new disk image."
24778 #: ../resize/virt-resize.pod:210
24780 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
24784 #: ../resize/virt-resize.pod:213
24785 msgid "IGNORING OR DELETING PARTITIONS"
24789 #: ../resize/virt-resize.pod:215
24791 "virt-resize also gives a convenient way to ignore or delete partitions when "
24792 "copying from the input disk to the output disk. Ignoring a partition speeds "
24793 "up the copy where you don't care about the existing contents of a "
24794 "partition. Deleting a partition removes it completely, but note that it "
24795 "also renumbers any partitions after the one which is deleted, which can "
24796 "leave some guests unbootable."
24800 #: ../resize/virt-resize.pod:222
24801 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
24805 #: ../resize/virt-resize.pod:224
24807 "If the input disk is in qcow2 format, then you may prefer that the output is "
24808 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
24809 "the fly. The output format is simply determined by the format of the empty "
24810 "output container that you provide. Thus to create qcow2 output, use:"
24814 #: ../resize/virt-resize.pod:230
24817 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
24822 #: ../resize/virt-resize.pod:232
24823 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
24827 #: ../resize/virt-resize.pod:234
24828 msgid "Similarly, to get non-sparse raw output use:"
24832 #: ../resize/virt-resize.pod:236
24835 " fallocate -l size outdisk\n"
24840 #: ../resize/virt-resize.pod:238
24842 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
24843 "dev/zero of=outdisk bs=1M count=..>)"
24847 #: ../resize/virt-resize.pod:241
24848 msgid "LOGICAL PARTITIONS"
24852 #: ../resize/virt-resize.pod:243
24854 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
24855 "tables) cannot be resized."
24859 #: ../resize/virt-resize.pod:246
24861 "To understand what is going on, firstly one of the four partitions C</dev/"
24862 "sda1-4> will have MBR partition type C<05> or C<0f>. This is called the "
24863 "B<extended partition>. Use L<virt-filesystems(1)> to see the MBR partition "
24868 #: ../resize/virt-resize.pod:251
24869 msgid "Logical partitions live inside the extended partition."
24873 #: ../resize/virt-resize.pod:253
24875 "The extended partition can be expanded, but not shrunk (unless you force it, "
24876 "which is not advisable). When the extended partition is copied across, all "
24877 "the logical partitions contained inside are copied over implicitly. Virt-"
24878 "resize does not look inside the extended partition, so it copies the logical "
24879 "partitions blindly."
24883 #: ../resize/virt-resize.pod:259
24885 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
24886 "line. Doing so will give an error."
24890 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
24891 msgid "Display help."
24895 #: ../resize/virt-resize.pod:270
24896 msgid "B<--align-first auto>"
24900 #: ../resize/virt-resize.pod:272
24901 msgid "B<--align-first never>"
24905 #: ../resize/virt-resize.pod:274
24906 msgid "B<--align-first always>"
24910 #: ../resize/virt-resize.pod:276
24912 "Align the first partition for improved performance (see also the I<--"
24913 "alignment> option)."
24917 #: ../resize/virt-resize.pod:279
24919 "The default is I<--align-first auto> which only aligns the first partition "
24920 "if it is safe to do so. That is, only when we know how to fix the "
24921 "bootloader automatically, and at the moment that can only be done for "
24926 #: ../resize/virt-resize.pod:284
24928 "I<--align-first never> means we never move the first partition. This is the "
24929 "safest option. Try this if the guest does not boot after resizing."
24933 #: ../resize/virt-resize.pod:288
24935 "I<--align-first always> means we always align the first partition (if it "
24936 "needs to be aligned). For some guests this will break the bootloader, "
24937 "making the guest unbootable."
24941 #: ../resize/virt-resize.pod:292
24942 msgid "B<--alignment N>"
24946 #: ../resize/virt-resize.pod:294
24948 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
24949 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
24953 #: ../resize/virt-resize.pod:298
24955 "Assuming 512 byte sector size inside the guest, here are some suitable "
24960 #: ../resize/virt-resize.pod:303
24961 msgid "I<--alignment 1> (512 bytes)"
24965 #: ../resize/virt-resize.pod:305
24967 "The partitions would be packed together as closely as possible, but would be "
24968 "completely unaligned. In some cases this can cause very poor performance. "
24969 "See L<virt-alignment-scan(1)> for further details."
24973 #: ../resize/virt-resize.pod:309
24974 msgid "I<--alignment 8> (4K)"
24978 #: ../resize/virt-resize.pod:311
24980 "This would be the minimum acceptable alignment for reasonable performance on "
24985 #: ../resize/virt-resize.pod:314
24986 msgid "I<--alignment 128> (64K)"
24990 #: ../resize/virt-resize.pod:316
24992 "This alignment provides good performance when the host is using high end "
24997 #: ../resize/virt-resize.pod:319
24998 msgid "I<--alignment 2048> (1M)"
25002 #: ../resize/virt-resize.pod:321
25004 "This is the standard alignment used by all newly installed guests since "
25009 #: ../resize/virt-resize.pod:326
25014 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177
25015 #: ../tools/virt-win-reg.pl:120
25020 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
25021 msgid "Enable debugging messages."
25025 #: ../resize/virt-resize.pod:332 ../sparsify/virt-sparsify.pod:131
25026 msgid "B<--debug-gc>"
25030 #: ../resize/virt-resize.pod:334
25032 "Debug garbage collection and memory allocation. This is only useful when "
25033 "debugging memory problems in virt-resize or the OCaml libguestfs bindings."
25037 #: ../resize/virt-resize.pod:338
25038 msgid "B<--delete part>"
25042 #: ../resize/virt-resize.pod:340
25044 "Delete the named partition. It would be more accurate to describe this as "
25045 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
25046 "the original disk image is left intact."
25050 #: ../resize/virt-resize.pod:344
25052 "Note that when you delete a partition, then anything contained in the "
25053 "partition is also deleted. Furthermore, this causes any partitions that "
25054 "come after to be I<renumbered>, which can easily make your guest unbootable."
25058 #: ../resize/virt-resize.pod:349 ../resize/virt-resize.pod:410
25059 #: ../resize/virt-resize.pod:537 ../sparsify/virt-sparsify.pod:157
25060 msgid "You can give this option multiple times."
25064 #: ../resize/virt-resize.pod:351
25065 msgid "B<--expand part>"
25069 #: ../resize/virt-resize.pod:353
25071 "Expand the named partition so it uses up all extra space (space left over "
25072 "after any other resize changes that you request have been done)."
25076 #: ../resize/virt-resize.pod:356
25078 "If virt-resize knows how, it will expand the direct content of the "
25079 "partition. For example, if the partition is an LVM PV, it will expand the "
25080 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
25081 "content it doesn't know about alone."
25085 #: ../resize/virt-resize.pod:361
25086 msgid "Currently virt-resize can resize:"
25090 #: ../resize/virt-resize.pod:367
25091 msgid "ext2, ext3 and ext4 filesystems."
25095 #: ../resize/virt-resize.pod:371
25096 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
25100 #: ../resize/virt-resize.pod:373
25102 "The filesystem must have been shut down consistently last time it was used. "
25103 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
25104 "consistency check, so at the first boot after resizing Windows will check "
25109 #: ../resize/virt-resize.pod:380
25111 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
25112 "inside the PV, but see the I<--LV-expand> option. The user could also "
25113 "resize LVs as desired after boot."
25117 #: ../resize/virt-resize.pod:386
25118 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
25122 #: ../resize/virt-resize.pod:390 ../resize/virt-resize.pod:565
25123 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
25127 #: ../resize/virt-resize.pod:392 ../sparsify/virt-sparsify.pod:137
25128 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
25129 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
25130 msgid "B<--format> raw"
25134 #: ../resize/virt-resize.pod:394 ../sparsify/virt-sparsify.pod:141
25136 "Specify the format of the input disk image. If this flag is not given then "
25137 "it is auto-detected from the image itself."
25141 #: ../resize/virt-resize.pod:400
25143 "Note that this option I<does not> affect the output format. See L</QCOW2 "
25144 "AND NON-SPARSE RAW FORMATS>."
25148 #: ../resize/virt-resize.pod:403
25149 msgid "B<--ignore part>"
25153 #: ../resize/virt-resize.pod:405
25155 "Ignore the named partition. Effectively this means the partition is "
25156 "allocated on the destination disk, but the content is not copied across from "
25157 "the source disk. The content of the partition will be blank (all zero "
25162 #: ../resize/virt-resize.pod:412
25163 msgid "B<--LV-expand logvol>"
25167 #: ../resize/virt-resize.pod:414
25169 "This takes the logical volume and, as a final step, expands it to fill all "
25170 "the space available in its volume group. A typical usage, assuming a Linux "
25171 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
25172 "lv_root> would be:"
25176 #: ../resize/virt-resize.pod:419
25179 " virt-resize indisk outdisk \\\n"
25180 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
25185 #: ../resize/virt-resize.pod:422
25187 "This would first expand the partition (and PV), and then expand the root "
25188 "device to fill the extra space in the PV."
25192 #: ../resize/virt-resize.pod:425
25194 "The contents of the LV are also resized if virt-resize knows how to do "
25195 "that. You can stop virt-resize from trying to expand the content by using "
25196 "the option I<--no-expand-content>."
25200 #: ../resize/virt-resize.pod:429
25201 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
25205 #: ../resize/virt-resize.pod:431
25207 "You can give this option multiple times, I<but> it doesn't make sense to do "
25208 "this unless the logical volumes you specify are all in different volume "
25213 #: ../resize/virt-resize.pod:435 ../sparsify/virt-sparsify.pod:159
25214 msgid "B<--machine-readable>"
25218 #: ../resize/virt-resize.pod:437 ../sparsify/virt-sparsify.pod:161
25220 "This option is used to make the output more machine friendly when being "
25221 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
25225 #: ../resize/virt-resize.pod:443
25226 msgid "B<--dryrun>"
25230 #: ../resize/virt-resize.pod:445
25231 msgid "Print a summary of what would be done, but don't do anything."
25235 #: ../resize/virt-resize.pod:447
25236 msgid "B<--no-copy-boot-loader>"
25240 #: ../resize/virt-resize.pod:449
25242 "By default, virt-resize copies over some sectors at the start of the disk "
25243 "(up to the beginning of the first partition). Commonly these sectors "
25244 "contain the Master Boot Record (MBR) and the boot loader, and are required "
25245 "in order for the guest to boot correctly."
25249 #: ../resize/virt-resize.pod:454
25251 "If you specify this flag, then this initial copy is not done. You may need "
25252 "to reinstall the boot loader in this case."
25256 #: ../resize/virt-resize.pod:457
25257 msgid "B<--no-extra-partition>"
25261 #: ../resize/virt-resize.pod:459
25263 "By default, virt-resize creates an extra partition if there is any extra, "
25264 "unused space after all resizing has happened. Use this option to prevent "
25265 "the extra partition from being created. If you do this then the extra space "
25266 "will be inaccessible until you run fdisk, parted, or some other partitioning "
25267 "tool in the guest."
25271 #: ../resize/virt-resize.pod:465
25273 "Note that if the surplus space is smaller than 10 MB, no extra partition "
25278 #: ../resize/virt-resize.pod:468
25279 msgid "B<--no-expand-content>"
25283 #: ../resize/virt-resize.pod:470
25285 "By default, virt-resize will try to expand the direct contents of "
25286 "partitions, if it knows how (see I<--expand> option above)."
25290 #: ../resize/virt-resize.pod:473
25292 "If you give the I<--no-expand-content> option then virt-resize will not "
25297 #: ../resize/virt-resize.pod:476
25298 msgid "B<--ntfsresize-force>"
25302 #: ../resize/virt-resize.pod:478
25304 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
25305 "the NTFS disk is marked as needing a consistency check. You have to use "
25306 "this option if you want to resize a Windows guest multiple times without "
25307 "booting into Windows between each resize."
25311 #: ../resize/virt-resize.pod:484
25312 msgid "B<--output-format> raw"
25316 #: ../resize/virt-resize.pod:486
25318 "Specify the format of the output disk image. If this flag is not given then "
25319 "it is auto-detected from the image itself."
25323 #: ../resize/virt-resize.pod:492
25325 "Note that this option I<does not create> the output format. This option "
25326 "just tells libguestfs what it is so it doesn't try to guess it. You still "
25327 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
25328 "SPARSE RAW FORMATS>."
25332 #: ../resize/virt-resize.pod:501
25333 msgid "Don't print the summary."
25337 #: ../resize/virt-resize.pod:503
25338 msgid "B<--resize part=size>"
25342 #: ../resize/virt-resize.pod:505
25344 "Resize the named partition (expanding or shrinking it) so that it has the "
25349 #: ../resize/virt-resize.pod:508
25351 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
25352 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
25353 "size; or as a relative number or percentage. For example:"
25357 #: ../resize/virt-resize.pod:514
25360 " --resize /dev/sda2=10G\n"
25365 #: ../resize/virt-resize.pod:516
25368 " --resize /dev/sda4=90%\n"
25373 #: ../resize/virt-resize.pod:518
25376 " --resize /dev/sda2=+1G\n"
25381 #: ../resize/virt-resize.pod:520
25384 " --resize /dev/sda2=-200M\n"
25389 #: ../resize/virt-resize.pod:522
25392 " --resize /dev/sda1=+128K\n"
25397 #: ../resize/virt-resize.pod:524
25400 " --resize /dev/sda1=+10%\n"
25405 #: ../resize/virt-resize.pod:526
25408 " --resize /dev/sda1=-10%\n"
25413 #: ../resize/virt-resize.pod:528
25415 "You can increase the size of any partition. Virt-resize will expand the "
25416 "direct content of the partition if it knows how (see I<--expand> below)."
25420 #: ../resize/virt-resize.pod:532
25422 "You can only I<decrease> the size of partitions that contain filesystems or "
25423 "PVs which have already been shrunk. Virt-resize will check this has been "
25424 "done before proceeding, or else will print an error (see also I<--resize-"
25429 #: ../resize/virt-resize.pod:539
25430 msgid "B<--resize-force part=size>"
25434 #: ../resize/virt-resize.pod:541
25436 "This is the same as I<--resize> except that it will let you decrease the "
25437 "size of any partition. Generally this means you will lose any data which "
25438 "was at the end of the partition you shrink, but you may not care about that "
25439 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
25440 "as a swap partition)."
25444 #: ../resize/virt-resize.pod:547
25445 msgid "See also the I<--ignore> option."
25449 #: ../resize/virt-resize.pod:549
25450 msgid "B<--shrink part>"
25454 #: ../resize/virt-resize.pod:551
25456 "Shrink the named partition until the overall disk image fits in the "
25457 "destination. The named partition B<must> contain a filesystem or PV which "
25458 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
25459 "online tools). Virt-resize will check this and give an error if it has not "
25464 #: ../resize/virt-resize.pod:557
25466 "The amount by which the overall disk must be shrunk (after carrying out all "
25467 "other operations requested by the user) is called the \"deficit\". For "
25468 "example, a straight copy (assume no other operations) from a 5GB disk image "
25469 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
25470 "would give an error unless the user specified a partition to shrink and that "
25471 "partition had more than a gigabyte of free space."
25475 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:201
25476 msgid "MACHINE READABLE OUTPUT"
25480 #: ../resize/virt-resize.pod:577
25482 "The I<--machine-readable> option can be used to make the output more machine "
25483 "friendly, which is useful when calling virt-resize from other programs, GUIs "
25488 #: ../resize/virt-resize.pod:581 ../sparsify/virt-sparsify.pod:207
25489 msgid "There are two ways to use this option."
25493 #: ../resize/virt-resize.pod:583
25495 "Firstly use the option on its own to query the capabilities of the virt-"
25496 "resize binary. Typical output looks like this:"
25500 #: ../resize/virt-resize.pod:586
25503 " $ virt-resize --machine-readable\n"
25505 " ntfsresize-force\n"
25513 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:217
25515 "A list of features is printed, one per line, and the program exits with "
25520 #: ../resize/virt-resize.pod:596 ../sparsify/virt-sparsify.pod:220
25522 "Secondly use the option in conjunction with other options to make the "
25523 "regular program output more machine friendly."
25527 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:223
25528 msgid "At the moment this means:"
25532 #: ../resize/virt-resize.pod:605 ../sparsify/virt-sparsify.pod:229
25534 "Progress bar messages can be parsed from stdout by looking for this regular "
25539 #: ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:232
25542 " ^[0-9]+/[0-9]+$\n"
25547 #: ../resize/virt-resize.pod:612 ../sparsify/virt-sparsify.pod:236
25549 "The calling program should treat messages sent to stdout (except for "
25550 "progress bar messages) as status messages. They can be logged and/or "
25551 "displayed to the user."
25555 #: ../resize/virt-resize.pod:618
25557 "The calling program should treat messages sent to stderr as error messages. "
25558 "In addition, virt-resize exits with a non-zero status code if there was a "
25563 #: ../resize/virt-resize.pod:624
25565 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
25566 "readable> option and will return an error."
25570 #: ../resize/virt-resize.pod:629
25571 msgid "\"Partition 1 does not end on cylinder boundary.\""
25575 #: ../resize/virt-resize.pod:631
25577 "Virt-resize aligns partitions to multiples of 128 sectors (see the I<--"
25578 "alignment> parameter). Usually this means the partitions will not be "
25579 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
25580 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
25581 "drives. Alignment of partitions to cylinders is not required by any modern "
25582 "operating system."
25586 #: ../resize/virt-resize.pod:638
25587 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
25591 #: ../resize/virt-resize.pod:640
25593 "In Windows Vista and later versions, Microsoft switched to using a separate "
25594 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
25595 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
25596 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
25597 "the second partition (ie. C: drive) should work."
25601 #: ../resize/virt-resize.pod:647
25603 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
25604 "NTFS partitions have been expanded. This is just a safety check and (unless "
25605 "it find errors) is nothing to worry about."
25609 #: ../resize/virt-resize.pod:651
25610 msgid "GUEST BOOT STUCK AT \"GRUB\""
25614 #: ../resize/virt-resize.pod:653
25616 "If a Linux guest does not boot after resizing, and the boot is stuck after "
25617 "printing C<GRUB> on the console, try reinstalling grub."
25621 #: ../resize/virt-resize.pod:656
25624 " guestfish -i -a newdisk\n"
25625 " ><fs> cat /boot/grub/device.map\n"
25626 " # check the contents of this file are sensible or\n"
25627 " # edit the file if necessary\n"
25628 " ><fs> grub-install / /dev/vda\n"
25634 #: ../resize/virt-resize.pod:663
25636 "For more flexible guest reconfiguration, including if you need to specify "
25637 "other parameters to grub-install, use L<virt-rescue(1)>."
25641 #: ../resize/virt-resize.pod:666
25642 msgid "ALTERNATIVE TOOLS"
25646 #: ../resize/virt-resize.pod:668
25648 "There are several proprietary tools for resizing partitions. We won't "
25649 "mention any here."
25653 #: ../resize/virt-resize.pod:671
25655 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
25656 "operations on disk images. They can resize and move partitions, but I don't "
25657 "think they can do anything with the contents, and they certainly don't "
25662 #: ../resize/virt-resize.pod:676
25664 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
25665 "but at a much lower level. You will probably end up hand-calculating sector "
25666 "offsets, which is something that virt-resize was designed to avoid. If you "
25667 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
25672 #: ../resize/virt-resize.pod:696
25674 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
25675 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
25676 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
25677 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-sparsify(1)>, "
25678 "L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
25682 #: ../ruby/examples/guestfs-ruby.pod:5
25683 msgid "guestfs-ruby - How to use libguestfs from Ruby"
25687 #: ../ruby/examples/guestfs-ruby.pod:9
25690 " require 'guestfs'\n"
25691 " g = Guestfs::Guestfs.new()\n"
25692 " g.add_drive_opts(\"disk.img\",\n"
25693 " :readonly => 1, :format => \"raw\")\n"
25699 #: ../ruby/examples/guestfs-ruby.pod:17
25701 "This manual page documents how to call libguestfs from the Ruby programming "
25702 "language. This page just documents the differences from the C API and gives "
25703 "some examples. If you are not familiar with using libguestfs, you also need "
25704 "to read L<guestfs(3)>."
25708 #: ../ruby/examples/guestfs-ruby.pod:24
25710 "Errors from libguestfs functions are mapped into the C<Error> exception. "
25711 "This has a single parameter which is the error message (a string)."
25715 #: ../ruby/examples/guestfs-ruby.pod:38
25717 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
25718 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
25719 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
25723 #: ../sparsify/virt-sparsify.pod:5
25724 msgid "virt-sparsify - Make a virtual machine disk sparse"
25728 #: ../sparsify/virt-sparsify.pod:9
25731 " virt-sparsify [--options] indisk outdisk\n"
25736 #: ../sparsify/virt-sparsify.pod:13
25738 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
25739 "image) sparse a.k.a. thin-provisioned. This means that free space within "
25740 "the disk image can be converted back to free space on the host."
25744 #: ../sparsify/virt-sparsify.pod:18
25746 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
25747 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
25751 #: ../sparsify/virt-sparsify.pod:21
25753 "Virt-sparsify can also convert between some disk formats, for example "
25754 "converting a raw disk image to a thin-provisioned qcow2 image."
25758 #: ../sparsify/virt-sparsify.pod:24
25760 "Virt-sparsify can operate on any disk image, not just ones from virtual "
25761 "machines. If a virtual machine has more than one attached disk, you must "
25762 "sparsify each one separately."
25766 #: ../sparsify/virt-sparsify.pod:28
25767 msgid "IMPORTANT LIMITATIONS"
25771 #: ../sparsify/virt-sparsify.pod:34
25773 "Virt-sparsify does not do in-place modifications. It copies from a source "
25774 "image to a destination image, leaving the source unchanged. I<Check that "
25775 "the sparsification was successful before deleting the source image>."
25779 #: ../sparsify/virt-sparsify.pod:41
25780 msgid "The virtual machine I<must be shut down> before using this tool."
25784 #: ../sparsify/virt-sparsify.pod:45
25786 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
25787 "(1 temporary copy + 1 destination image). This is in the worst case and "
25788 "usually much less space is required."
25792 #: ../sparsify/virt-sparsify.pod:51
25794 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
25798 #: ../sparsify/virt-sparsify.pod:56
25799 msgid "Virt-sparsify cannot handle encrypted disks."
25803 #: ../sparsify/virt-sparsify.pod:60
25805 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
25806 "this space is often used for critical items like bootloaders so it's not "
25811 #: ../sparsify/virt-sparsify.pod:66
25813 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
25814 "to do this unless we can be sure there is no hibernation data, so at the "
25815 "moment swap partitions are ignored."
25819 #: ../sparsify/virt-sparsify.pod:72
25821 "You may also want to read the manual pages for the associated tools L<virt-"
25822 "filesystems(1)> and L<virt-df(1)> before starting."
25826 #: ../sparsify/virt-sparsify.pod:77
25827 msgid "Typical usage is:"
25831 #: ../sparsify/virt-sparsify.pod:79
25834 " virt-sparsify indisk outdisk\n"
25839 #: ../sparsify/virt-sparsify.pod:81
25841 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
25842 "is created, or overwritten if it already exists. The format of the input "
25843 "disk is detected (eg. qcow2) and the same format is used for the output disk."
25847 #: ../sparsify/virt-sparsify.pod:86
25848 msgid "To convert between formats, use the I<--convert> option:"
25852 #: ../sparsify/virt-sparsify.pod:88
25855 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
25860 #: ../sparsify/virt-sparsify.pod:90
25862 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
25863 "can find within the source disk image. You can get it to ignore (don't zero "
25864 "free space on) certain filesystems by doing:"
25868 #: ../sparsify/virt-sparsify.pod:94
25871 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
25876 #: ../sparsify/virt-sparsify.pod:96
25878 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
25882 #: ../sparsify/virt-sparsify.pod:107
25883 msgid "B<--compress>"
25887 #: ../sparsify/virt-sparsify.pod:109
25889 "Compress the output file. This I<only> works if the output format is "
25894 #: ../sparsify/virt-sparsify.pod:112
25895 msgid "B<--convert> raw"
25899 #: ../sparsify/virt-sparsify.pod:114
25900 msgid "B<--convert> qcow2"
25904 #: ../sparsify/virt-sparsify.pod:116
25905 msgid "B<--convert> [other formats]"
25909 #: ../sparsify/virt-sparsify.pod:118
25911 "Use C<output-format> as the format for the destination image. If this is "
25912 "not specified, then the input format is used."
25916 #: ../sparsify/virt-sparsify.pod:121
25918 "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
25922 #: ../sparsify/virt-sparsify.pod:123
25924 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
25925 "C<vmdk>, but support for other formats is reliant on qemu."
25929 #: ../sparsify/virt-sparsify.pod:126
25931 "Specifying the I<--convert> option is usually a good idea, because then virt-"
25932 "sparsify doesn't need to try to guess the input format."
25936 #: ../sparsify/virt-sparsify.pod:129
25937 msgid "For fine-tuning the output format, see: I<--compress>, I<-o>."
25941 #: ../sparsify/virt-sparsify.pod:133
25943 "Debug garbage collection and memory allocation. This is only useful when "
25944 "debugging memory problems in virt-sparsify or the OCaml libguestfs bindings."
25948 #: ../sparsify/virt-sparsify.pod:139
25949 msgid "B<--format> qcow2"
25953 #: ../sparsify/virt-sparsify.pod:147
25954 msgid "B<--ignore> filesystem"
25958 #: ../sparsify/virt-sparsify.pod:149
25959 msgid "B<--ignore> volgroup"
25963 #: ../sparsify/virt-sparsify.pod:151
25965 "Ignore the named filesystem. Free space on the filesystem will not be "
25966 "zeroed, but existing blocks of zeroes will still be sparsified."
25970 #: ../sparsify/virt-sparsify.pod:154
25972 "In the second form, this ignores the named volume group. Use the volume "
25973 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
25977 #: ../sparsify/virt-sparsify.pod:165
25978 msgid "B<-o> option[,option,...]"
25982 #: ../sparsify/virt-sparsify.pod:167
25984 "Pass I<-o> option(s) to the L<qemu-img(1)> command to fine-tune the output "
25985 "format. Options available depend on the output format (see I<--convert>) "
25986 "and the installed version of the qemu-img program."
25990 #: ../sparsify/virt-sparsify.pod:171
25992 "You should use I<-o> at most once. To pass multiple options, separate them "
25997 #: ../sparsify/virt-sparsify.pod:174
26000 " virt-sparsify --convert qcow2 \\\n"
26001 " -o cluster_size=512,preallocation=metadata ...\n"
26006 #: ../sparsify/virt-sparsify.pod:181
26007 msgid "This disables progress bars and other unnecessary output."
26011 #: ../sparsify/virt-sparsify.pod:203
26013 "The I<--machine-readable> option can be used to make the output more machine "
26014 "friendly, which is useful when calling virt-sparsify from other programs, "
26019 #: ../sparsify/virt-sparsify.pod:209
26021 "Firstly use the option on its own to query the capabilities of the virt-"
26022 "sparsify binary. Typical output looks like this:"
26026 #: ../sparsify/virt-sparsify.pod:212
26029 " $ virt-sparsify --machine-readable\n"
26037 #: ../sparsify/virt-sparsify.pod:242
26039 "The calling program should treat messages sent to stderr as error messages. "
26040 "In addition, virt-sparsify exits with a non-zero status code if there was a "
26045 #: ../sparsify/virt-sparsify.pod:248
26047 "All versions of virt-sparsify have supported the I<--machine-readable> "
26052 #: ../sparsify/virt-sparsify.pod:262
26054 "Location of the temporary directory used for the potentially large temporary "
26059 #: ../sparsify/virt-sparsify.pod:265
26061 "You should ensure there is enough free space in the worst case for a full "
26062 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
26063 "to another directory that has enough space."
26067 #: ../sparsify/virt-sparsify.pod:269
26068 msgid "This defaults to C</tmp>."
26072 #: ../sparsify/virt-sparsify.pod:273
26074 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
26078 #: ../sparsify/virt-sparsify.pod:277
26080 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
26081 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-img"
26082 "(1)>, L<http://libguestfs.org/>."
26086 #: ../src/guestfs-actions.pod:1
26087 msgid "guestfs_add_cdrom"
26091 #: ../src/guestfs-actions.pod:3
26095 " guestfs_add_cdrom (guestfs_h *g,\n"
26096 " const char *filename);\n"
26101 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302
26102 #: ../src/guestfs-actions.pod:323
26104 "I<This function is deprecated.> In new code, use the L</"
26105 "guestfs_add_drive_opts> call instead."
26109 #: ../src/guestfs-actions.pod:24
26111 "This call checks for the existence of C<filename>. This stops you from "
26112 "specifying other types of drive which are supported by qemu such as C<nbd:> "
26113 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
26118 #: ../src/guestfs-actions.pod:31
26120 "If you just want to add an ISO file (often you use this as an efficient way "
26121 "to transfer large files into the guest), then you should probably use "
26122 "C<guestfs_add_drive_ro> instead."
26126 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187
26127 #: ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291
26128 #: ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333
26129 #: ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360
26130 #: ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500
26131 #: ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559
26132 #: ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605
26133 #: ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705
26134 #: ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:773
26135 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:890
26136 #: ../src/guestfs-actions.pod:904 ../src/guestfs-actions.pod:918
26137 #: ../src/guestfs-actions.pod:955 ../src/guestfs-actions.pod:1138
26138 #: ../src/guestfs-actions.pod:1158 ../src/guestfs-actions.pod:1176
26139 #: ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1325
26140 #: ../src/guestfs-actions.pod:1371 ../src/guestfs-actions.pod:1411
26141 #: ../src/guestfs-actions.pod:1464 ../src/guestfs-actions.pod:1517
26142 #: ../src/guestfs-actions.pod:1575 ../src/guestfs-actions.pod:1629
26143 #: ../src/guestfs-actions.pod:1648 ../src/guestfs-actions.pod:1662
26144 #: ../src/guestfs-actions.pod:1690 ../src/guestfs-actions.pod:1760
26145 #: ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1816
26146 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1971
26147 #: ../src/guestfs-actions.pod:1998 ../src/guestfs-actions.pod:2213
26148 #: ../src/guestfs-actions.pod:2235 ../src/guestfs-actions.pod:2322
26149 #: ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2974
26150 #: ../src/guestfs-actions.pod:3035 ../src/guestfs-actions.pod:3070
26151 #: ../src/guestfs-actions.pod:4131 ../src/guestfs-actions.pod:4146
26152 #: ../src/guestfs-actions.pod:4171 ../src/guestfs-actions.pod:4373
26153 #: ../src/guestfs-actions.pod:4387 ../src/guestfs-actions.pod:4400
26154 #: ../src/guestfs-actions.pod:4414 ../src/guestfs-actions.pod:4429
26155 #: ../src/guestfs-actions.pod:4465 ../src/guestfs-actions.pod:4537
26156 #: ../src/guestfs-actions.pod:4557 ../src/guestfs-actions.pod:4574
26157 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4614
26158 #: ../src/guestfs-actions.pod:4649 ../src/guestfs-actions.pod:4668
26159 #: ../src/guestfs-actions.pod:4687 ../src/guestfs-actions.pod:4722
26160 #: ../src/guestfs-actions.pod:4734 ../src/guestfs-actions.pod:4767
26161 #: ../src/guestfs-actions.pod:4783 ../src/guestfs-actions.pod:4796
26162 #: ../src/guestfs-actions.pod:4811 ../src/guestfs-actions.pod:4828
26163 #: ../src/guestfs-actions.pod:4986 ../src/guestfs-actions.pod:5060
26164 #: ../src/guestfs-actions.pod:5070 ../src/guestfs-actions.pod:5090
26165 #: ../src/guestfs-actions.pod:5103 ../src/guestfs-actions.pod:5154
26166 #: ../src/guestfs-actions.pod:5172 ../src/guestfs-actions.pod:5190
26167 #: ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5220
26168 #: ../src/guestfs-actions.pod:5234 ../src/guestfs-actions.pod:5251
26169 #: ../src/guestfs-actions.pod:5266 ../src/guestfs-actions.pod:5293
26170 #: ../src/guestfs-actions.pod:5356 ../src/guestfs-actions.pod:5429
26171 #: ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5479
26172 #: ../src/guestfs-actions.pod:5498 ../src/guestfs-actions.pod:5510
26173 #: ../src/guestfs-actions.pod:5527 ../src/guestfs-actions.pod:5540
26174 #: ../src/guestfs-actions.pod:5555 ../src/guestfs-actions.pod:5570
26175 #: ../src/guestfs-actions.pod:5602 ../src/guestfs-actions.pod:5628
26176 #: ../src/guestfs-actions.pod:5667 ../src/guestfs-actions.pod:5687
26177 #: ../src/guestfs-actions.pod:5701 ../src/guestfs-actions.pod:5718
26178 #: ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5820
26179 #: ../src/guestfs-actions.pod:5867 ../src/guestfs-actions.pod:5910
26180 #: ../src/guestfs-actions.pod:5938 ../src/guestfs-actions.pod:5955
26181 #: ../src/guestfs-actions.pod:5973 ../src/guestfs-actions.pod:6110
26182 #: ../src/guestfs-actions.pod:6167 ../src/guestfs-actions.pod:6189
26183 #: ../src/guestfs-actions.pod:6207 ../src/guestfs-actions.pod:6259
26184 #: ../src/guestfs-actions.pod:6325 ../src/guestfs-actions.pod:6342
26185 #: ../src/guestfs-actions.pod:6355 ../src/guestfs-actions.pod:6369
26186 #: ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6677
26187 #: ../src/guestfs-actions.pod:6696 ../src/guestfs-actions.pod:6710
26188 #: ../src/guestfs-actions.pod:6722 ../src/guestfs-actions.pod:6736
26189 #: ../src/guestfs-actions.pod:6748 ../src/guestfs-actions.pod:6762
26190 #: ../src/guestfs-actions.pod:6778 ../src/guestfs-actions.pod:6796
26191 #: ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:6834
26192 #: ../src/guestfs-actions.pod:6864 ../src/guestfs-actions.pod:6882
26193 #: ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6923
26194 #: ../src/guestfs-actions.pod:6942 ../src/guestfs-actions.pod:6963
26195 #: ../src/guestfs-actions.pod:6982 ../src/guestfs-actions.pod:6999
26196 #: ../src/guestfs-actions.pod:7018 ../src/guestfs-actions.pod:7046
26197 #: ../src/guestfs-actions.pod:7070 ../src/guestfs-actions.pod:7089
26198 #: ../src/guestfs-actions.pod:7105 ../src/guestfs-actions.pod:7129
26199 #: ../src/guestfs-actions.pod:7148 ../src/guestfs-actions.pod:7163
26200 #: ../src/guestfs-actions.pod:7182 ../src/guestfs-actions.pod:7226
26201 #: ../src/guestfs-actions.pod:7253 ../src/guestfs-actions.pod:7283
26202 #: ../src/guestfs-actions.pod:7395 ../src/guestfs-actions.pod:7516
26203 #: ../src/guestfs-actions.pod:7528 ../src/guestfs-actions.pod:7541
26204 #: ../src/guestfs-actions.pod:7554 ../src/guestfs-actions.pod:7576
26205 #: ../src/guestfs-actions.pod:7589 ../src/guestfs-actions.pod:7602
26206 #: ../src/guestfs-actions.pod:7615 ../src/guestfs-actions.pod:7630
26207 #: ../src/guestfs-actions.pod:7689 ../src/guestfs-actions.pod:7706
26208 #: ../src/guestfs-actions.pod:7722 ../src/guestfs-actions.pod:7738
26209 #: ../src/guestfs-actions.pod:7755 ../src/guestfs-actions.pod:7768
26210 #: ../src/guestfs-actions.pod:7788 ../src/guestfs-actions.pod:7888
26211 #: ../src/guestfs-actions.pod:7946 ../src/guestfs-actions.pod:7960
26212 #: ../src/guestfs-actions.pod:8001 ../src/guestfs-actions.pod:8014
26213 #: ../src/guestfs-actions.pod:8032 ../src/guestfs-actions.pod:8066
26214 #: ../src/guestfs-actions.pod:8102 ../src/guestfs-actions.pod:8218
26215 #: ../src/guestfs-actions.pod:8233 ../src/guestfs-actions.pod:8247
26216 #: ../src/guestfs-actions.pod:8302 ../src/guestfs-actions.pod:8315
26217 #: ../src/guestfs-actions.pod:8360 ../src/guestfs-actions.pod:8400
26218 #: ../src/guestfs-actions.pod:8456 ../src/guestfs-actions.pod:8476
26219 #: ../src/guestfs-actions.pod:8509 ../src/guestfs-actions.pod:8573
26220 #: ../src/guestfs-actions.pod:8596 ../src/guestfs-actions.pod:8622
26221 msgid "This function returns 0 on success or -1 on error."
26225 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189
26226 #: ../src/guestfs-actions.pod:1373 ../src/guestfs-actions.pod:2436
26227 #: ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2659
26228 #: ../src/guestfs-actions.pod:4133 ../src/guestfs-actions.pod:4153
26229 #: ../src/guestfs-actions.pod:5604 ../src/guestfs-actions.pod:6884
26230 #: ../src/guestfs-actions.pod:7001 ../src/guestfs-actions.pod:7150
26231 #: ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:7757
26232 #: ../src/guestfs-actions.pod:8402
26233 msgid "(Added in 0.3)"
26237 #: ../src/guestfs-actions.pod:41
26238 msgid "guestfs_add_domain"
26242 #: ../src/guestfs-actions.pod:43
26246 " guestfs_add_domain (guestfs_h *g,\n"
26247 " const char *dom,\n"
26253 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198
26254 #: ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:1253
26255 #: ../src/guestfs-actions.pod:1305 ../src/guestfs-actions.pod:1383
26256 #: ../src/guestfs-actions.pod:1452 ../src/guestfs-actions.pod:1505
26257 #: ../src/guestfs-actions.pod:1558 ../src/guestfs-actions.pod:3327
26258 #: ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:5305
26259 #: ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5831
26260 #: ../src/guestfs-actions.pod:7799
26262 "You may supply a list of optional arguments to this call. Use zero or more "
26263 "of the following pairs of parameters, and terminate the list with C<-1> on "
26264 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
26268 #: ../src/guestfs-actions.pod:53
26271 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
26272 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
26273 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
26274 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
26275 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
26276 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
26281 #: ../src/guestfs-actions.pod:60
26283 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
26284 "It works by connecting to libvirt, requesting the domain and domain XML from "
26285 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
26290 #: ../src/guestfs-actions.pod:141
26292 "The other optional parameters are passed directly through to "
26293 "C<guestfs_add_drive_opts>."
26297 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403
26298 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:790
26299 #: ../src/guestfs-actions.pod:821 ../src/guestfs-actions.pod:839
26300 #: ../src/guestfs-actions.pod:858 ../src/guestfs-actions.pod:1836
26301 #: ../src/guestfs-actions.pod:2192 ../src/guestfs-actions.pod:2395
26302 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:2557
26303 #: ../src/guestfs-actions.pod:2609 ../src/guestfs-actions.pod:2623
26304 #: ../src/guestfs-actions.pod:2646 ../src/guestfs-actions.pod:2961
26305 #: ../src/guestfs-actions.pod:3445 ../src/guestfs-actions.pod:3463
26306 #: ../src/guestfs-actions.pod:5790 ../src/guestfs-actions.pod:6007
26307 #: ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6439
26308 #: ../src/guestfs-actions.pod:6465 ../src/guestfs-actions.pod:7987
26309 #: ../src/guestfs-actions.pod:8413 ../src/guestfs-actions.pod:8426
26310 #: ../src/guestfs-actions.pod:8439
26311 msgid "On error this function returns -1."
26315 #: ../src/guestfs-actions.pod:146
26316 msgid "(Added in 1.7.4)"
26320 #: ../src/guestfs-actions.pod:148
26321 msgid "guestfs_add_domain_va"
26325 #: ../src/guestfs-actions.pod:150
26329 " guestfs_add_domain_va (guestfs_h *g,\n"
26330 " const char *dom,\n"
26331 " va_list args);\n"
26336 #: ../src/guestfs-actions.pod:155
26337 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
26341 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168
26342 #: ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278
26343 #: ../src/guestfs-actions.pod:968 ../src/guestfs-actions.pod:979
26344 #: ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:1294
26345 #: ../src/guestfs-actions.pod:1340 ../src/guestfs-actions.pod:1353
26346 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1442
26347 #: ../src/guestfs-actions.pod:1483 ../src/guestfs-actions.pod:1495
26348 #: ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1548
26349 #: ../src/guestfs-actions.pod:1594 ../src/guestfs-actions.pod:1606
26350 #: ../src/guestfs-actions.pod:3411 ../src/guestfs-actions.pod:3423
26351 #: ../src/guestfs-actions.pod:4998 ../src/guestfs-actions.pod:5010
26352 #: ../src/guestfs-actions.pod:5370 ../src/guestfs-actions.pod:5382
26353 #: ../src/guestfs-actions.pod:5642 ../src/guestfs-actions.pod:5654
26354 #: ../src/guestfs-actions.pod:5880 ../src/guestfs-actions.pod:5891
26355 #: ../src/guestfs-actions.pod:7901 ../src/guestfs-actions.pod:7912
26356 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
26360 #: ../src/guestfs-actions.pod:159
26361 msgid "guestfs_add_domain_argv"
26365 #: ../src/guestfs-actions.pod:161
26369 " guestfs_add_domain_argv (guestfs_h *g,\n"
26370 " const char *dom,\n"
26371 " const struct guestfs_add_domain_argv *optargs);\n"
26376 #: ../src/guestfs-actions.pod:166
26377 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
26381 #: ../src/guestfs-actions.pod:170
26382 msgid "guestfs_add_drive"
26386 #: ../src/guestfs-actions.pod:172
26390 " guestfs_add_drive (guestfs_h *g,\n"
26391 " const char *filename);\n"
26396 #: ../src/guestfs-actions.pod:176
26398 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
26399 "optional parameters, so the disk is added writable, with the format being "
26400 "detected automatically."
26404 #: ../src/guestfs-actions.pod:180
26406 "Automatic detection of the format opens you up to a potential security hole "
26407 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
26408 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
26409 "you should think about replacing calls to this function with calls to "
26410 "C<guestfs_add_drive_opts>, and specifying the format."
26414 #: ../src/guestfs-actions.pod:191
26415 msgid "guestfs_add_drive_opts"
26419 #: ../src/guestfs-actions.pod:193
26423 " guestfs_add_drive_opts (guestfs_h *g,\n"
26424 " const char *filename,\n"
26430 #: ../src/guestfs-actions.pod:203
26433 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
26434 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
26435 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
26436 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
26441 #: ../src/guestfs-actions.pod:233
26443 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
26444 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
26445 "Possible formats include C<raw> and C<qcow2>."
26449 #: ../src/guestfs-actions.pod:244
26451 "This rarely-used option lets you emulate the behaviour of the deprecated "
26452 "C<guestfs_add_drive_with_if> call (q.v.)"
26456 #: ../src/guestfs-actions.pod:256
26457 msgid "(Added in 1.5.23)"
26461 #: ../src/guestfs-actions.pod:258
26462 msgid "guestfs_add_drive_opts_va"
26466 #: ../src/guestfs-actions.pod:260
26470 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
26471 " const char *filename,\n"
26472 " va_list args);\n"
26477 #: ../src/guestfs-actions.pod:265
26478 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
26482 #: ../src/guestfs-actions.pod:269
26483 msgid "guestfs_add_drive_opts_argv"
26487 #: ../src/guestfs-actions.pod:271
26491 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
26492 " const char *filename,\n"
26493 " const struct guestfs_add_drive_opts_argv *optargs);\n"
26498 #: ../src/guestfs-actions.pod:276
26499 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
26503 #: ../src/guestfs-actions.pod:280
26504 msgid "guestfs_add_drive_ro"
26508 #: ../src/guestfs-actions.pod:282
26512 " guestfs_add_drive_ro (guestfs_h *g,\n"
26513 " const char *filename);\n"
26518 #: ../src/guestfs-actions.pod:286
26520 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
26521 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
26522 "disk is added read-only, with the format being detected automatically."
26526 #: ../src/guestfs-actions.pod:293
26527 msgid "(Added in 1.0.38)"
26531 #: ../src/guestfs-actions.pod:295
26532 msgid "guestfs_add_drive_ro_with_if"
26536 #: ../src/guestfs-actions.pod:297
26540 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
26541 " const char *filename,\n"
26542 " const char *iface);\n"
26547 #: ../src/guestfs-actions.pod:309
26549 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
26550 "QEMU interface emulation to use at run time."
26554 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335
26555 #: ../src/guestfs-actions.pod:2920
26556 msgid "(Added in 1.0.84)"
26560 #: ../src/guestfs-actions.pod:316
26561 msgid "guestfs_add_drive_with_if"
26565 #: ../src/guestfs-actions.pod:318
26569 " guestfs_add_drive_with_if (guestfs_h *g,\n"
26570 " const char *filename,\n"
26571 " const char *iface);\n"
26576 #: ../src/guestfs-actions.pod:330
26578 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
26579 "QEMU interface emulation to use at run time."
26583 #: ../src/guestfs-actions.pod:337
26584 msgid "guestfs_aug_clear"
26588 #: ../src/guestfs-actions.pod:339
26592 " guestfs_aug_clear (guestfs_h *g,\n"
26593 " const char *augpath);\n"
26598 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2648
26599 msgid "(Added in 1.3.4)"
26603 #: ../src/guestfs-actions.pod:350
26604 msgid "guestfs_aug_close"
26608 #: ../src/guestfs-actions.pod:352
26612 " guestfs_aug_close (guestfs_h *g);\n"
26617 #: ../src/guestfs-actions.pod:355
26619 "Close the current Augeas handle and free up any resources used by it. After "
26620 "calling this, you have to call C<guestfs_aug_init> again before you can use "
26621 "any other Augeas functions."
26625 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387
26626 #: ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419
26627 #: ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502
26628 #: ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547
26629 #: ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575
26630 #: ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607
26631 #: ../src/guestfs-actions.pod:6516
26632 msgid "(Added in 0.7)"
26636 #: ../src/guestfs-actions.pod:364
26637 msgid "guestfs_aug_defnode"
26641 #: ../src/guestfs-actions.pod:366
26644 " struct guestfs_int_bool *\n"
26645 " guestfs_aug_defnode (guestfs_h *g,\n"
26646 " const char *name,\n"
26647 " const char *expr,\n"
26648 " const char *val);\n"
26653 #: ../src/guestfs-actions.pod:375
26655 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
26656 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
26657 "containing that single node."
26661 #: ../src/guestfs-actions.pod:383
26663 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
26664 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
26668 #: ../src/guestfs-actions.pod:389
26669 msgid "guestfs_aug_defvar"
26673 #: ../src/guestfs-actions.pod:391
26677 " guestfs_aug_defvar (guestfs_h *g,\n"
26678 " const char *name,\n"
26679 " const char *expr);\n"
26684 #: ../src/guestfs-actions.pod:407
26685 msgid "guestfs_aug_get"
26689 #: ../src/guestfs-actions.pod:409
26693 " guestfs_aug_get (guestfs_h *g,\n"
26694 " const char *augpath);\n"
26699 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:1019
26700 #: ../src/guestfs-actions.pod:1037 ../src/guestfs-actions.pod:1097
26701 #: ../src/guestfs-actions.pod:1113 ../src/guestfs-actions.pod:1216
26702 #: ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1722
26703 #: ../src/guestfs-actions.pod:1741 ../src/guestfs-actions.pod:1875
26704 #: ../src/guestfs-actions.pod:2063 ../src/guestfs-actions.pod:2175
26705 #: ../src/guestfs-actions.pod:2338 ../src/guestfs-actions.pod:2355
26706 #: ../src/guestfs-actions.pod:2422 ../src/guestfs-actions.pod:2465
26707 #: ../src/guestfs-actions.pod:2486 ../src/guestfs-actions.pod:2671
26708 #: ../src/guestfs-actions.pod:2885 ../src/guestfs-actions.pod:3089
26709 #: ../src/guestfs-actions.pod:3191 ../src/guestfs-actions.pod:3295
26710 #: ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3529
26711 #: ../src/guestfs-actions.pod:3557 ../src/guestfs-actions.pod:3578
26712 #: ../src/guestfs-actions.pod:3612 ../src/guestfs-actions.pod:3679
26713 #: ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3719
26714 #: ../src/guestfs-actions.pod:4359 ../src/guestfs-actions.pod:4706
26715 #: ../src/guestfs-actions.pod:4873 ../src/guestfs-actions.pod:5132
26716 #: ../src/guestfs-actions.pod:6025 ../src/guestfs-actions.pod:6226
26717 #: ../src/guestfs-actions.pod:6414 ../src/guestfs-actions.pod:6592
26718 #: ../src/guestfs-actions.pod:6641 ../src/guestfs-actions.pod:7301
26719 #: ../src/guestfs-actions.pod:7317 ../src/guestfs-actions.pod:7341
26720 #: ../src/guestfs-actions.pod:7365 ../src/guestfs-actions.pod:8161
26721 #: ../src/guestfs-actions.pod:8180 ../src/guestfs-actions.pod:8198
26722 #: ../src/guestfs-actions.pod:8372 ../src/guestfs-actions.pod:8686
26724 "This function returns a string, or NULL on error. I<The caller must free "
26725 "the returned string after use>."
26729 #: ../src/guestfs-actions.pod:421
26730 msgid "guestfs_aug_init"
26734 #: ../src/guestfs-actions.pod:423
26738 " guestfs_aug_init (guestfs_h *g,\n"
26739 " const char *root,\n"
26745 #: ../src/guestfs-actions.pod:432
26746 msgid "You must call this before using any other C<guestfs_aug_*> commands."
26750 #: ../src/guestfs-actions.pod:457
26752 "This option is only useful when debugging Augeas lenses. Use of this option "
26753 "may require additional memory for the libguestfs appliance. You may need to "
26754 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
26755 "C<guestfs_set_memsize>."
26759 #: ../src/guestfs-actions.pod:472
26760 msgid "Do not load the tree in C<guestfs_aug_init>."
26764 #: ../src/guestfs-actions.pod:476
26765 msgid "To close the handle, you can call C<guestfs_aug_close>."
26769 #: ../src/guestfs-actions.pod:484
26770 msgid "guestfs_aug_insert"
26774 #: ../src/guestfs-actions.pod:486
26778 " guestfs_aug_insert (guestfs_h *g,\n"
26779 " const char *augpath,\n"
26780 " const char *label,\n"
26786 #: ../src/guestfs-actions.pod:504
26787 msgid "guestfs_aug_load"
26791 #: ../src/guestfs-actions.pod:506
26795 " guestfs_aug_load (guestfs_h *g);\n"
26800 #: ../src/guestfs-actions.pod:518
26801 msgid "guestfs_aug_ls"
26805 #: ../src/guestfs-actions.pod:520
26809 " guestfs_aug_ls (guestfs_h *g,\n"
26810 " const char *augpath);\n"
26815 #: ../src/guestfs-actions.pod:524
26817 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
26818 "sorting the resulting nodes into alphabetical order."
26822 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543
26823 #: ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1235
26824 #: ../src/guestfs-actions.pod:1890 ../src/guestfs-actions.pod:1909
26825 #: ../src/guestfs-actions.pod:2012 ../src/guestfs-actions.pod:2031
26826 #: ../src/guestfs-actions.pod:2277 ../src/guestfs-actions.pod:2743
26827 #: ../src/guestfs-actions.pod:2759 ../src/guestfs-actions.pod:2778
26828 #: ../src/guestfs-actions.pod:2843 ../src/guestfs-actions.pod:2867
26829 #: ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2987
26830 #: ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3631
26831 #: ../src/guestfs-actions.pod:3915 ../src/guestfs-actions.pod:4229
26832 #: ../src/guestfs-actions.pod:4246 ../src/guestfs-actions.pod:4266
26833 #: ../src/guestfs-actions.pod:4321 ../src/guestfs-actions.pod:4341
26834 #: ../src/guestfs-actions.pod:4446 ../src/guestfs-actions.pod:4845
26835 #: ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:6386
26836 #: ../src/guestfs-actions.pod:6512 ../src/guestfs-actions.pod:6626
26837 #: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:7442
26838 #: ../src/guestfs-actions.pod:7497 ../src/guestfs-actions.pod:7643
26839 #: ../src/guestfs-actions.pod:7667 ../src/guestfs-actions.pod:8265
26840 #: ../src/guestfs-actions.pod:8285 ../src/guestfs-actions.pod:8332
26841 #: ../src/guestfs-actions.pod:8526 ../src/guestfs-actions.pod:8545
26842 #: ../src/guestfs-actions.pod:8636 ../src/guestfs-actions.pod:8655
26843 #: ../src/guestfs-actions.pod:8701 ../src/guestfs-actions.pod:8720
26845 "This function returns a NULL-terminated array of strings (like L<environ(3)"
26846 ">), or NULL if there was an error. I<The caller must free the strings and "
26847 "the array after use>."
26851 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1160
26852 #: ../src/guestfs-actions.pod:1178 ../src/guestfs-actions.pod:1947
26853 #: ../src/guestfs-actions.pod:3993 ../src/guestfs-actions.pod:4024
26854 #: ../src/guestfs-actions.pod:4689 ../src/guestfs-actions.pod:4736
26855 #: ../src/guestfs-actions.pod:5072 ../src/guestfs-actions.pod:5105
26856 #: ../src/guestfs-actions.pod:5268 ../src/guestfs-actions.pod:5755
26857 #: ../src/guestfs-actions.pod:6327 ../src/guestfs-actions.pod:6724
26858 #: ../src/guestfs-actions.pod:6738 ../src/guestfs-actions.pod:6750
26859 #: ../src/guestfs-actions.pod:7228 ../src/guestfs-actions.pod:8003
26860 #: ../src/guestfs-actions.pod:8016 ../src/guestfs-actions.pod:8249
26861 #: ../src/guestfs-actions.pod:8514
26862 msgid "(Added in 0.8)"
26866 #: ../src/guestfs-actions.pod:533
26867 msgid "guestfs_aug_match"
26871 #: ../src/guestfs-actions.pod:535
26875 " guestfs_aug_match (guestfs_h *g,\n"
26876 " const char *augpath);\n"
26881 #: ../src/guestfs-actions.pod:549
26882 msgid "guestfs_aug_mv"
26886 #: ../src/guestfs-actions.pod:551
26890 " guestfs_aug_mv (guestfs_h *g,\n"
26891 " const char *src,\n"
26892 " const char *dest);\n"
26897 #: ../src/guestfs-actions.pod:563
26898 msgid "guestfs_aug_rm"
26902 #: ../src/guestfs-actions.pod:565
26906 " guestfs_aug_rm (guestfs_h *g,\n"
26907 " const char *augpath);\n"
26912 #: ../src/guestfs-actions.pod:577
26913 msgid "guestfs_aug_save"
26917 #: ../src/guestfs-actions.pod:579
26921 " guestfs_aug_save (guestfs_h *g);\n"
26926 #: ../src/guestfs-actions.pod:584
26928 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
26933 #: ../src/guestfs-actions.pod:591
26934 msgid "guestfs_aug_set"
26938 #: ../src/guestfs-actions.pod:593
26942 " guestfs_aug_set (guestfs_h *g,\n"
26943 " const char *augpath,\n"
26944 " const char *val);\n"
26949 #: ../src/guestfs-actions.pod:600
26951 "In the Augeas API, it is possible to clear a node by setting the value to "
26952 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
26953 "this call. Instead you must use the C<guestfs_aug_clear> call."
26957 #: ../src/guestfs-actions.pod:609
26958 msgid "guestfs_available"
26962 #: ../src/guestfs-actions.pod:611
26966 " guestfs_available (guestfs_h *g,\n"
26967 " char *const *groups);\n"
26972 #: ../src/guestfs-actions.pod:619
26974 "The libguestfs groups, and the functions that those groups correspond to, "
26975 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
26976 "runtime by calling C<guestfs_available_all_groups>."
26980 #: ../src/guestfs-actions.pod:643
26981 msgid "You must call C<guestfs_launch> before calling this function."
26985 #: ../src/guestfs-actions.pod:665
26987 "This call was added in version C<1.0.80>. In previous versions of "
26988 "libguestfs all you could do would be to speculatively execute a command to "
26989 "find out if the daemon implemented it. See also C<guestfs_version>."
26993 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1692
26994 msgid "(Added in 1.0.80)"
26998 #: ../src/guestfs-actions.pod:676
26999 msgid "guestfs_available_all_groups"
27003 #: ../src/guestfs-actions.pod:678
27007 " guestfs_available_all_groups (guestfs_h *g);\n"
27012 #: ../src/guestfs-actions.pod:681
27014 "This command returns a list of all optional groups that this daemon knows "
27015 "about. Note this returns both supported and unsupported groups. To find "
27016 "out which ones the daemon can actually support you have to call "
27017 "C<guestfs_available> on each member of the returned list."
27021 #: ../src/guestfs-actions.pod:687
27022 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
27026 #: ../src/guestfs-actions.pod:693
27027 msgid "(Added in 1.3.15)"
27031 #: ../src/guestfs-actions.pod:695
27032 msgid "guestfs_base64_in"
27036 #: ../src/guestfs-actions.pod:697
27040 " guestfs_base64_in (guestfs_h *g,\n"
27041 " const char *base64file,\n"
27042 " const char *filename);\n"
27047 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
27048 msgid "(Added in 1.3.5)"
27052 #: ../src/guestfs-actions.pod:709
27053 msgid "guestfs_base64_out"
27057 #: ../src/guestfs-actions.pod:711
27061 " guestfs_base64_out (guestfs_h *g,\n"
27062 " const char *filename,\n"
27063 " const char *base64file);\n"
27068 #: ../src/guestfs-actions.pod:723
27069 msgid "guestfs_blkid"
27073 #: ../src/guestfs-actions.pod:725
27077 " guestfs_blkid (guestfs_h *g,\n"
27078 " const char *device);\n"
27083 #: ../src/guestfs-actions.pod:756 ../src/guestfs-actions.pod:3231
27084 #: ../src/guestfs-actions.pod:3499 ../src/guestfs-actions.pod:4306
27085 #: ../src/guestfs-actions.pod:5045 ../src/guestfs-actions.pod:5731
27086 #: ../src/guestfs-actions.pod:7928
27088 "This function returns a NULL-terminated array of strings, or NULL if there "
27089 "was an error. The array of strings will always have length C<2n+1>, where "
27090 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
27091 "caller must free the strings and the array after use>."
27095 #: ../src/guestfs-actions.pod:762
27096 msgid "guestfs_blockdev_flushbufs"
27100 #: ../src/guestfs-actions.pod:764
27104 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
27105 " const char *device);\n"
27110 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:792
27111 #: ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:823
27112 #: ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:860
27113 #: ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:892
27114 #: ../src/guestfs-actions.pod:906 ../src/guestfs-actions.pod:920
27115 msgid "(Added in 0.9.3)"
27119 #: ../src/guestfs-actions.pod:777
27120 msgid "guestfs_blockdev_getbsz"
27124 #: ../src/guestfs-actions.pod:779
27128 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
27129 " const char *device);\n"
27134 #: ../src/guestfs-actions.pod:794
27135 msgid "guestfs_blockdev_getro"
27139 #: ../src/guestfs-actions.pod:796
27143 " guestfs_blockdev_getro (guestfs_h *g,\n"
27144 " const char *device);\n"
27149 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:1930
27150 #: ../src/guestfs-actions.pod:1945 ../src/guestfs-actions.pod:2434
27151 #: ../src/guestfs-actions.pod:2445 ../src/guestfs-actions.pod:2517
27152 #: ../src/guestfs-actions.pod:2543 ../src/guestfs-actions.pod:2583
27153 #: ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2634
27154 #: ../src/guestfs-actions.pod:2657 ../src/guestfs-actions.pod:3736
27155 #: ../src/guestfs-actions.pod:3752 ../src/guestfs-actions.pod:3770
27156 #: ../src/guestfs-actions.pod:3932 ../src/guestfs-actions.pod:3946
27157 #: ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:3975
27158 #: ../src/guestfs-actions.pod:3991 ../src/guestfs-actions.pod:4006
27159 #: ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:4036
27160 #: ../src/guestfs-actions.pod:4049 ../src/guestfs-actions.pod:4063
27161 #: ../src/guestfs-actions.pod:4078 ../src/guestfs-actions.pod:4093
27162 #: ../src/guestfs-actions.pod:4106 ../src/guestfs-actions.pod:4120
27163 #: ../src/guestfs-actions.pod:5989
27164 msgid "This function returns a C truth value on success or -1 on error."
27168 #: ../src/guestfs-actions.pod:809
27169 msgid "guestfs_blockdev_getsize64"
27173 #: ../src/guestfs-actions.pod:811
27177 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
27178 " const char *device);\n"
27183 #: ../src/guestfs-actions.pod:817
27184 msgid "See also C<guestfs_blockdev_getsz>."
27188 #: ../src/guestfs-actions.pod:825
27189 msgid "guestfs_blockdev_getss"
27193 #: ../src/guestfs-actions.pod:827
27197 " guestfs_blockdev_getss (guestfs_h *g,\n"
27198 " const char *device);\n"
27203 #: ../src/guestfs-actions.pod:834
27205 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
27210 #: ../src/guestfs-actions.pod:843
27211 msgid "guestfs_blockdev_getsz"
27215 #: ../src/guestfs-actions.pod:845
27219 " guestfs_blockdev_getsz (guestfs_h *g,\n"
27220 " const char *device);\n"
27225 #: ../src/guestfs-actions.pod:852
27227 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
27228 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
27232 #: ../src/guestfs-actions.pod:862
27233 msgid "guestfs_blockdev_rereadpt"
27237 #: ../src/guestfs-actions.pod:864
27241 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
27242 " const char *device);\n"
27247 #: ../src/guestfs-actions.pod:876
27248 msgid "guestfs_blockdev_setbsz"
27252 #: ../src/guestfs-actions.pod:878
27256 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
27257 " const char *device,\n"
27258 " int blocksize);\n"
27263 #: ../src/guestfs-actions.pod:894
27264 msgid "guestfs_blockdev_setro"
27268 #: ../src/guestfs-actions.pod:896
27272 " guestfs_blockdev_setro (guestfs_h *g,\n"
27273 " const char *device);\n"
27278 #: ../src/guestfs-actions.pod:908
27279 msgid "guestfs_blockdev_setrw"
27283 #: ../src/guestfs-actions.pod:910
27287 " guestfs_blockdev_setrw (guestfs_h *g,\n"
27288 " const char *device);\n"
27293 #: ../src/guestfs-actions.pod:922
27294 msgid "guestfs_btrfs_filesystem_resize"
27298 #: ../src/guestfs-actions.pod:924
27302 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
27303 " const char *mountpoint,\n"
27309 #: ../src/guestfs-actions.pod:934
27312 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
27317 #: ../src/guestfs-actions.pod:957
27318 msgid "(Added in 1.11.17)"
27322 #: ../src/guestfs-actions.pod:959
27323 msgid "guestfs_btrfs_filesystem_resize_va"
27327 #: ../src/guestfs-actions.pod:961
27331 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
27332 " const char *mountpoint,\n"
27333 " va_list args);\n"
27338 #: ../src/guestfs-actions.pod:966
27339 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
27343 #: ../src/guestfs-actions.pod:970
27344 msgid "guestfs_btrfs_filesystem_resize_argv"
27348 #: ../src/guestfs-actions.pod:972
27352 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
27353 " const char *mountpoint,\n"
27354 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
27359 #: ../src/guestfs-actions.pod:977
27360 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
27364 #: ../src/guestfs-actions.pod:981
27365 msgid "guestfs_case_sensitive_path"
27369 #: ../src/guestfs-actions.pod:983
27373 " guestfs_case_sensitive_path (guestfs_h *g,\n"
27374 " const char *path);\n"
27379 #: ../src/guestfs-actions.pod:1009
27381 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
27382 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
27383 "how the directories were originally created under Windows)."
27387 #: ../src/guestfs-actions.pod:1017
27388 msgid "See also C<guestfs_realpath>."
27392 #: ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:8183
27393 msgid "(Added in 1.0.75)"
27397 #: ../src/guestfs-actions.pod:1024
27398 msgid "guestfs_cat"
27402 #: ../src/guestfs-actions.pod:1026
27406 " guestfs_cat (guestfs_h *g,\n"
27407 " const char *path);\n"
27412 #: ../src/guestfs-actions.pod:1032
27414 "Note that this function cannot correctly handle binary files (specifically, "
27415 "files containing C<\\0> character which is treated as end of string). For "
27416 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
27417 "functions which have a more complex interface."
27421 #: ../src/guestfs-actions.pod:1043 ../src/guestfs-actions.pod:4250
27422 #: ../src/guestfs-actions.pod:4345 ../src/guestfs-actions.pod:4362
27423 #: ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:4849
27424 #: ../src/guestfs-actions.pod:4863 ../src/guestfs-actions.pod:6390
27425 #: ../src/guestfs-actions.pod:6404 ../src/guestfs-actions.pod:8336
27426 #: ../src/guestfs-actions.pod:8350
27427 msgid "(Added in 0.4)"
27431 #: ../src/guestfs-actions.pod:1045
27432 msgid "guestfs_checksum"
27436 #: ../src/guestfs-actions.pod:1047
27440 " guestfs_checksum (guestfs_h *g,\n"
27441 " const char *csumtype,\n"
27442 " const char *path);\n"
27447 #: ../src/guestfs-actions.pod:1093
27448 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
27452 #: ../src/guestfs-actions.pod:1095
27453 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
27457 #: ../src/guestfs-actions.pod:1100 ../src/guestfs-actions.pod:1767
27458 #: ../src/guestfs-actions.pod:2625 ../src/guestfs-actions.pod:3948
27459 #: ../src/guestfs-actions.pod:3977 ../src/guestfs-actions.pod:4038
27460 #: ../src/guestfs-actions.pod:4065 ../src/guestfs-actions.pod:8039
27461 msgid "(Added in 1.0.2)"
27465 #: ../src/guestfs-actions.pod:1102
27466 msgid "guestfs_checksum_device"
27470 #: ../src/guestfs-actions.pod:1104
27474 " guestfs_checksum_device (guestfs_h *g,\n"
27475 " const char *csumtype,\n"
27476 " const char *device);\n"
27481 #: ../src/guestfs-actions.pod:1109
27483 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
27484 "device named C<device>. For the types of checksums supported see the "
27485 "C<guestfs_checksum> command."
27489 #: ../src/guestfs-actions.pod:1116 ../src/guestfs-actions.pod:5822
27490 #: ../src/guestfs-actions.pod:5957 ../src/guestfs-actions.pod:5991
27491 #: ../src/guestfs-actions.pod:6009 ../src/guestfs-actions.pod:6191
27492 #: ../src/guestfs-actions.pod:7948 ../src/guestfs-actions.pod:7962
27493 #: ../src/guestfs-actions.pod:8362
27494 msgid "(Added in 1.3.2)"
27498 #: ../src/guestfs-actions.pod:1118
27499 msgid "guestfs_checksums_out"
27503 #: ../src/guestfs-actions.pod:1120
27507 " guestfs_checksums_out (guestfs_h *g,\n"
27508 " const char *csumtype,\n"
27509 " const char *directory,\n"
27510 " const char *sumsfile);\n"
27515 #: ../src/guestfs-actions.pod:1140
27516 msgid "(Added in 1.3.7)"
27520 #: ../src/guestfs-actions.pod:1142
27521 msgid "guestfs_chmod"
27525 #: ../src/guestfs-actions.pod:1144
27529 " guestfs_chmod (guestfs_h *g,\n"
27531 " const char *path);\n"
27536 #: ../src/guestfs-actions.pod:1162
27537 msgid "guestfs_chown"
27541 #: ../src/guestfs-actions.pod:1164
27545 " guestfs_chown (guestfs_h *g,\n"
27548 " const char *path);\n"
27553 #: ../src/guestfs-actions.pod:1180
27554 msgid "guestfs_command"
27558 #: ../src/guestfs-actions.pod:1182
27562 " guestfs_command (guestfs_h *g,\n"
27563 " char *const *arguments);\n"
27568 #: ../src/guestfs-actions.pod:1191
27570 "The single parameter is an argv-style list of arguments. The first element "
27571 "is the name of the program to run. Subsequent elements are parameters. The "
27572 "list must be non-empty (ie. must contain a program name). Note that the "
27573 "command runs directly, and is I<not> invoked via the shell (see "
27578 #: ../src/guestfs-actions.pod:1222 ../src/guestfs-actions.pod:1242
27579 #: ../src/guestfs-actions.pod:2066
27580 msgid "(Added in 0.9.1)"
27584 #: ../src/guestfs-actions.pod:1224
27585 msgid "guestfs_command_lines"
27589 #: ../src/guestfs-actions.pod:1226
27593 " guestfs_command_lines (guestfs_h *g,\n"
27594 " char *const *arguments);\n"
27599 #: ../src/guestfs-actions.pod:1230
27601 "This is the same as C<guestfs_command>, but splits the result into a list of "
27606 #: ../src/guestfs-actions.pod:1233
27607 msgid "See also: C<guestfs_sh_lines>"
27611 #: ../src/guestfs-actions.pod:1244
27612 msgid "guestfs_compress_device_out"
27616 #: ../src/guestfs-actions.pod:1246
27620 " guestfs_compress_device_out (guestfs_h *g,\n"
27621 " const char *ctype,\n"
27622 " const char *device,\n"
27623 " const char *zdevice,\n"
27629 #: ../src/guestfs-actions.pod:1258
27632 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
27637 #: ../src/guestfs-actions.pod:1263
27639 "The C<ctype> and optional C<level> parameters have the same meaning as in "
27640 "C<guestfs_compress_out>."
27644 #: ../src/guestfs-actions.pod:1268 ../src/guestfs-actions.pod:1327
27645 #: ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:7107
27646 msgid "(Added in 1.13.15)"
27650 #: ../src/guestfs-actions.pod:1270
27651 msgid "guestfs_compress_device_out_va"
27655 #: ../src/guestfs-actions.pod:1272
27659 " guestfs_compress_device_out_va (guestfs_h *g,\n"
27660 " const char *ctype,\n"
27661 " const char *device,\n"
27662 " const char *zdevice,\n"
27663 " va_list args);\n"
27668 #: ../src/guestfs-actions.pod:1279
27669 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
27673 #: ../src/guestfs-actions.pod:1283
27674 msgid "guestfs_compress_device_out_argv"
27678 #: ../src/guestfs-actions.pod:1285
27682 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
27683 " const char *ctype,\n"
27684 " const char *device,\n"
27685 " const char *zdevice,\n"
27686 " const struct guestfs_compress_device_out_argv *optargs);\n"
27691 #: ../src/guestfs-actions.pod:1292
27692 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
27696 #: ../src/guestfs-actions.pod:1296
27697 msgid "guestfs_compress_out"
27701 #: ../src/guestfs-actions.pod:1298
27705 " guestfs_compress_out (guestfs_h *g,\n"
27706 " const char *ctype,\n"
27707 " const char *file,\n"
27708 " const char *zfile,\n"
27714 #: ../src/guestfs-actions.pod:1310
27717 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
27722 #: ../src/guestfs-actions.pod:1329
27723 msgid "guestfs_compress_out_va"
27727 #: ../src/guestfs-actions.pod:1331
27731 " guestfs_compress_out_va (guestfs_h *g,\n"
27732 " const char *ctype,\n"
27733 " const char *file,\n"
27734 " const char *zfile,\n"
27735 " va_list args);\n"
27740 #: ../src/guestfs-actions.pod:1338
27741 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
27745 #: ../src/guestfs-actions.pod:1342
27746 msgid "guestfs_compress_out_argv"
27750 #: ../src/guestfs-actions.pod:1344
27754 " guestfs_compress_out_argv (guestfs_h *g,\n"
27755 " const char *ctype,\n"
27756 " const char *file,\n"
27757 " const char *zfile,\n"
27758 " const struct guestfs_compress_out_argv *optargs);\n"
27763 #: ../src/guestfs-actions.pod:1351
27764 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
27768 #: ../src/guestfs-actions.pod:1355
27769 msgid "guestfs_config"
27773 #: ../src/guestfs-actions.pod:1357
27777 " guestfs_config (guestfs_h *g,\n"
27778 " const char *qemuparam,\n"
27779 " const char *qemuvalue);\n"
27784 #: ../src/guestfs-actions.pod:1375
27785 msgid "guestfs_copy_device_to_device"
27789 #: ../src/guestfs-actions.pod:1377
27793 " guestfs_copy_device_to_device (guestfs_h *g,\n"
27794 " const char *src,\n"
27795 " const char *dest,\n"
27801 #: ../src/guestfs-actions.pod:1388
27804 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
27805 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
27806 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
27811 #: ../src/guestfs-actions.pod:1392
27813 "The four calls C<guestfs_copy_device_to_device>, "
27814 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
27815 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
27816 "destination (device|file)."
27820 #: ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466
27821 #: ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:1577
27822 #: ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1762
27823 #: ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:1838
27824 #: ../src/guestfs-actions.pod:2215 ../src/guestfs-actions.pod:2237
27825 #: ../src/guestfs-actions.pod:4148 ../src/guestfs-actions.pod:8034
27826 #: ../src/guestfs-actions.pod:8068 ../src/guestfs-actions.pod:8575
27827 #: ../src/guestfs-actions.pod:8598
27829 "This long-running command can generate progress notification messages so "
27830 "that the caller can display a progress bar or indicator. To receive these "
27831 "messages, the caller must register a progress event callback. See L<guestfs"
27832 "(3)/GUESTFS_EVENT_PROGRESS>."
27836 #: ../src/guestfs-actions.pod:1418 ../src/guestfs-actions.pod:1471
27837 #: ../src/guestfs-actions.pod:1524 ../src/guestfs-actions.pod:1582
27838 #: ../src/guestfs-actions.pod:6247
27839 msgid "(Added in 1.13.25)"
27843 #: ../src/guestfs-actions.pod:1420
27844 msgid "guestfs_copy_device_to_device_va"
27848 #: ../src/guestfs-actions.pod:1422
27852 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
27853 " const char *src,\n"
27854 " const char *dest,\n"
27855 " va_list args);\n"
27860 #: ../src/guestfs-actions.pod:1428
27861 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
27865 #: ../src/guestfs-actions.pod:1432
27866 msgid "guestfs_copy_device_to_device_argv"
27870 #: ../src/guestfs-actions.pod:1434
27874 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
27875 " const char *src,\n"
27876 " const char *dest,\n"
27877 " const struct guestfs_copy_device_to_device_argv *optargs);\n"
27882 #: ../src/guestfs-actions.pod:1440
27883 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
27887 #: ../src/guestfs-actions.pod:1444
27888 msgid "guestfs_copy_device_to_file"
27892 #: ../src/guestfs-actions.pod:1446
27896 " guestfs_copy_device_to_file (guestfs_h *g,\n"
27897 " const char *src,\n"
27898 " const char *dest,\n"
27904 #: ../src/guestfs-actions.pod:1457
27907 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
27908 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
27909 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
27914 #: ../src/guestfs-actions.pod:1461 ../src/guestfs-actions.pod:1514
27915 #: ../src/guestfs-actions.pod:1567
27917 "See C<guestfs_copy_device_to_device> for a general overview of this call."
27921 #: ../src/guestfs-actions.pod:1473
27922 msgid "guestfs_copy_device_to_file_va"
27926 #: ../src/guestfs-actions.pod:1475
27930 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
27931 " const char *src,\n"
27932 " const char *dest,\n"
27933 " va_list args);\n"
27938 #: ../src/guestfs-actions.pod:1481
27939 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
27943 #: ../src/guestfs-actions.pod:1485
27944 msgid "guestfs_copy_device_to_file_argv"
27948 #: ../src/guestfs-actions.pod:1487
27952 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
27953 " const char *src,\n"
27954 " const char *dest,\n"
27955 " const struct guestfs_copy_device_to_file_argv *optargs);\n"
27960 #: ../src/guestfs-actions.pod:1493
27961 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
27965 #: ../src/guestfs-actions.pod:1497
27966 msgid "guestfs_copy_file_to_device"
27970 #: ../src/guestfs-actions.pod:1499
27974 " guestfs_copy_file_to_device (guestfs_h *g,\n"
27975 " const char *src,\n"
27976 " const char *dest,\n"
27982 #: ../src/guestfs-actions.pod:1510
27985 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
27986 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
27987 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
27992 #: ../src/guestfs-actions.pod:1526
27993 msgid "guestfs_copy_file_to_device_va"
27997 #: ../src/guestfs-actions.pod:1528
28001 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
28002 " const char *src,\n"
28003 " const char *dest,\n"
28004 " va_list args);\n"
28009 #: ../src/guestfs-actions.pod:1534
28010 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
28014 #: ../src/guestfs-actions.pod:1538
28015 msgid "guestfs_copy_file_to_device_argv"
28019 #: ../src/guestfs-actions.pod:1540
28023 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
28024 " const char *src,\n"
28025 " const char *dest,\n"
28026 " const struct guestfs_copy_file_to_device_argv *optargs);\n"
28031 #: ../src/guestfs-actions.pod:1546
28032 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
28036 #: ../src/guestfs-actions.pod:1550
28037 msgid "guestfs_copy_file_to_file"
28041 #: ../src/guestfs-actions.pod:1552
28045 " guestfs_copy_file_to_file (guestfs_h *g,\n"
28046 " const char *src,\n"
28047 " const char *dest,\n"
28053 #: ../src/guestfs-actions.pod:1563
28056 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
28057 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
28058 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
28063 #: ../src/guestfs-actions.pod:1570
28065 "This is B<not> the function you want for copying files. This is for copying "
28066 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
28067 "C<guestfs_mv> for general file copying and moving functions."
28071 #: ../src/guestfs-actions.pod:1584
28072 msgid "guestfs_copy_file_to_file_va"
28076 #: ../src/guestfs-actions.pod:1586
28080 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
28081 " const char *src,\n"
28082 " const char *dest,\n"
28083 " va_list args);\n"
28088 #: ../src/guestfs-actions.pod:1592
28089 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
28093 #: ../src/guestfs-actions.pod:1596
28094 msgid "guestfs_copy_file_to_file_argv"
28098 #: ../src/guestfs-actions.pod:1598
28102 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
28103 " const char *src,\n"
28104 " const char *dest,\n"
28105 " const struct guestfs_copy_file_to_file_argv *optargs);\n"
28110 #: ../src/guestfs-actions.pod:1604
28111 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
28115 #: ../src/guestfs-actions.pod:1608
28116 msgid "guestfs_copy_size"
28120 #: ../src/guestfs-actions.pod:1610
28124 " guestfs_copy_size (guestfs_h *g,\n"
28125 " const char *src,\n"
28126 " const char *dest,\n"
28127 " int64_t size);\n"
28132 #: ../src/guestfs-actions.pod:1616 ../src/guestfs-actions.pod:1673
28134 "I<This function is deprecated.> In new code, use the L</"
28135 "guestfs_copy_device_to_device> call instead."
28139 #: ../src/guestfs-actions.pod:1636 ../src/guestfs-actions.pod:4876
28140 #: ../src/guestfs-actions.pod:6417 ../src/guestfs-actions.pod:8269
28141 #: ../src/guestfs-actions.pod:8289 ../src/guestfs-actions.pod:8375
28142 msgid "(Added in 1.0.87)"
28146 #: ../src/guestfs-actions.pod:1638
28151 #: ../src/guestfs-actions.pod:1640
28155 " guestfs_cp (guestfs_h *g,\n"
28156 " const char *src,\n"
28157 " const char *dest);\n"
28162 #: ../src/guestfs-actions.pod:1650 ../src/guestfs-actions.pod:1664
28163 #: ../src/guestfs-actions.pod:1744 ../src/guestfs-actions.pod:1818
28164 #: ../src/guestfs-actions.pod:1932 ../src/guestfs-actions.pod:5769
28165 #: ../src/guestfs-actions.pod:6261
28166 msgid "(Added in 1.0.18)"
28170 #: ../src/guestfs-actions.pod:1652
28171 msgid "guestfs_cp_a"
28175 #: ../src/guestfs-actions.pod:1654
28179 " guestfs_cp_a (guestfs_h *g,\n"
28180 " const char *src,\n"
28181 " const char *dest);\n"
28186 #: ../src/guestfs-actions.pod:1666
28191 #: ../src/guestfs-actions.pod:1668
28195 " guestfs_dd (guestfs_h *g,\n"
28196 " const char *src,\n"
28197 " const char *dest);\n"
28202 #: ../src/guestfs-actions.pod:1685
28204 "If the destination is a device, it must be as large or larger than the "
28205 "source file or device, otherwise the copy will fail. This command cannot do "
28206 "partial copies (see C<guestfs_copy_device_to_device>)."
28210 #: ../src/guestfs-actions.pod:1694
28215 #: ../src/guestfs-actions.pod:1696
28219 " guestfs_df (guestfs_h *g);\n"
28224 #: ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1718
28226 "This command is mostly useful for interactive sessions. It is I<not> "
28227 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
28232 #: ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:1725
28233 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:2850
28234 #: ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:2942
28235 #: ../src/guestfs-actions.pod:5135 ../src/guestfs-actions.pod:5669
28236 #: ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7674
28237 #: ../src/guestfs-actions.pod:8415 ../src/guestfs-actions.pod:8428
28238 #: ../src/guestfs-actions.pod:8441
28239 msgid "(Added in 1.0.54)"
28243 #: ../src/guestfs-actions.pod:1710
28244 msgid "guestfs_df_h"
28248 #: ../src/guestfs-actions.pod:1712
28252 " guestfs_df_h (guestfs_h *g);\n"
28257 #: ../src/guestfs-actions.pod:1727
28258 msgid "guestfs_dmesg"
28262 #: ../src/guestfs-actions.pod:1729
28266 " guestfs_dmesg (guestfs_h *g);\n"
28271 #: ../src/guestfs-actions.pod:1736
28273 "Another way to get the same information is to enable verbose messages with "
28274 "C<guestfs_set_verbose> or by setting the environment variable "
28275 "C<LIBGUESTFS_DEBUG=1> before running the program."
28279 #: ../src/guestfs-actions.pod:1746
28280 msgid "guestfs_download"
28284 #: ../src/guestfs-actions.pod:1748
28288 " guestfs_download (guestfs_h *g,\n"
28289 " const char *remotefilename,\n"
28290 " const char *filename);\n"
28295 #: ../src/guestfs-actions.pod:1758
28296 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
28300 #: ../src/guestfs-actions.pod:1769
28301 msgid "guestfs_download_offset"
28305 #: ../src/guestfs-actions.pod:1771
28309 " guestfs_download_offset (guestfs_h *g,\n"
28310 " const char *remotefilename,\n"
28311 " const char *filename,\n"
28312 " int64_t offset,\n"
28313 " int64_t size);\n"
28318 #: ../src/guestfs-actions.pod:1784
28320 "Note that there is no limit on the amount of data that can be downloaded "
28321 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
28322 "full amount unless an error occurs."
28326 #: ../src/guestfs-actions.pod:1789
28327 msgid "See also C<guestfs_download>, C<guestfs_pread>."
28331 #: ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:8073
28332 msgid "(Added in 1.5.17)"
28336 #: ../src/guestfs-actions.pod:1800
28337 msgid "guestfs_drop_caches"
28341 #: ../src/guestfs-actions.pod:1802
28345 " guestfs_drop_caches (guestfs_h *g,\n"
28346 " int whattodrop);\n"
28351 #: ../src/guestfs-actions.pod:1820
28356 #: ../src/guestfs-actions.pod:1822
28360 " guestfs_du (guestfs_h *g,\n"
28361 " const char *path);\n"
28366 #: ../src/guestfs-actions.pod:1845
28367 msgid "guestfs_e2fsck_f"
28371 #: ../src/guestfs-actions.pod:1847
28375 " guestfs_e2fsck_f (guestfs_h *g,\n"
28376 " const char *device);\n"
28381 #: ../src/guestfs-actions.pod:1855
28383 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
28384 "Normally you should use C<guestfs_fsck>."
28388 #: ../src/guestfs-actions.pod:1860
28389 msgid "(Added in 1.0.29)"
28393 #: ../src/guestfs-actions.pod:1862
28394 msgid "guestfs_echo_daemon"
28398 #: ../src/guestfs-actions.pod:1864
28402 " guestfs_echo_daemon (guestfs_h *g,\n"
28403 " char *const *words);\n"
28408 #: ../src/guestfs-actions.pod:1873
28409 msgid "See also C<guestfs_ping_daemon>."
28413 #: ../src/guestfs-actions.pod:1878 ../src/guestfs-actions.pod:2636
28414 #: ../src/guestfs-actions.pod:7131
28415 msgid "(Added in 1.0.69)"
28419 #: ../src/guestfs-actions.pod:1880
28420 msgid "guestfs_egrep"
28424 #: ../src/guestfs-actions.pod:1882
28428 " guestfs_egrep (guestfs_h *g,\n"
28429 " const char *regex,\n"
28430 " const char *path);\n"
28435 #: ../src/guestfs-actions.pod:1897 ../src/guestfs-actions.pod:1916
28436 #: ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:2019
28437 #: ../src/guestfs-actions.pod:2038 ../src/guestfs-actions.pod:2766
28438 #: ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2963
28439 #: ../src/guestfs-actions.pod:2976 ../src/guestfs-actions.pod:2991
28440 #: ../src/guestfs-actions.pod:3037 ../src/guestfs-actions.pod:3059
28441 #: ../src/guestfs-actions.pod:3072 ../src/guestfs-actions.pod:4375
28442 #: ../src/guestfs-actions.pod:4389 ../src/guestfs-actions.pod:4402
28443 #: ../src/guestfs-actions.pod:4416 ../src/guestfs-actions.pod:5557
28444 #: ../src/guestfs-actions.pod:6595 ../src/guestfs-actions.pod:6644
28445 #: ../src/guestfs-actions.pod:7518 ../src/guestfs-actions.pod:7530
28446 #: ../src/guestfs-actions.pod:7543 ../src/guestfs-actions.pod:7556
28447 #: ../src/guestfs-actions.pod:7578 ../src/guestfs-actions.pod:7591
28448 #: ../src/guestfs-actions.pod:7604 ../src/guestfs-actions.pod:7617
28449 #: ../src/guestfs-actions.pod:8533 ../src/guestfs-actions.pod:8552
28450 #: ../src/guestfs-actions.pod:8643 ../src/guestfs-actions.pod:8662
28451 #: ../src/guestfs-actions.pod:8708 ../src/guestfs-actions.pod:8727
28452 msgid "(Added in 1.0.66)"
28456 #: ../src/guestfs-actions.pod:1899
28457 msgid "guestfs_egrepi"
28461 #: ../src/guestfs-actions.pod:1901
28465 " guestfs_egrepi (guestfs_h *g,\n"
28466 " const char *regex,\n"
28467 " const char *path);\n"
28472 #: ../src/guestfs-actions.pod:1918
28473 msgid "guestfs_equal"
28477 #: ../src/guestfs-actions.pod:1920
28481 " guestfs_equal (guestfs_h *g,\n"
28482 " const char *file1,\n"
28483 " const char *file2);\n"
28488 #: ../src/guestfs-actions.pod:1934
28489 msgid "guestfs_exists"
28493 #: ../src/guestfs-actions.pod:1936
28497 " guestfs_exists (guestfs_h *g,\n"
28498 " const char *path);\n"
28503 #: ../src/guestfs-actions.pod:1943
28504 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
28508 #: ../src/guestfs-actions.pod:1949
28509 msgid "guestfs_fallocate"
28513 #: ../src/guestfs-actions.pod:1951
28517 " guestfs_fallocate (guestfs_h *g,\n"
28518 " const char *path,\n"
28524 #: ../src/guestfs-actions.pod:1956
28526 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
28531 #: ../src/guestfs-actions.pod:1975
28532 msgid "guestfs_fallocate64"
28536 #: ../src/guestfs-actions.pod:1977
28540 " guestfs_fallocate64 (guestfs_h *g,\n"
28541 " const char *path,\n"
28547 #: ../src/guestfs-actions.pod:1986
28549 "Note that this call allocates disk blocks for the file. To create a sparse "
28550 "file use C<guestfs_truncate_size> instead."
28554 #: ../src/guestfs-actions.pod:1989
28556 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
28557 "oversight it only allowed 30 bit lengths to be specified, effectively "
28558 "limiting the maximum size of files created through that call to 1GB."
28562 #: ../src/guestfs-actions.pod:2000
28563 msgid "(Added in 1.3.17)"
28567 #: ../src/guestfs-actions.pod:2002
28568 msgid "guestfs_fgrep"
28572 #: ../src/guestfs-actions.pod:2004
28576 " guestfs_fgrep (guestfs_h *g,\n"
28577 " const char *pattern,\n"
28578 " const char *path);\n"
28583 #: ../src/guestfs-actions.pod:2021
28584 msgid "guestfs_fgrepi"
28588 #: ../src/guestfs-actions.pod:2023
28592 " guestfs_fgrepi (guestfs_h *g,\n"
28593 " const char *pattern,\n"
28594 " const char *path);\n"
28599 #: ../src/guestfs-actions.pod:2040
28600 msgid "guestfs_file"
28604 #: ../src/guestfs-actions.pod:2042
28608 " guestfs_file (guestfs_h *g,\n"
28609 " const char *path);\n"
28614 #: ../src/guestfs-actions.pod:2060
28616 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
28617 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
28621 #: ../src/guestfs-actions.pod:2068
28622 msgid "guestfs_file_architecture"
28626 #: ../src/guestfs-actions.pod:2070
28630 " guestfs_file_architecture (guestfs_h *g,\n"
28631 " const char *filename);\n"
28636 #: ../src/guestfs-actions.pod:2178 ../src/guestfs-actions.pod:2341
28637 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:3092
28638 #: ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3260
28639 #: ../src/guestfs-actions.pod:3447 ../src/guestfs-actions.pod:3465
28640 #: ../src/guestfs-actions.pod:3505 ../src/guestfs-actions.pod:3581
28641 #: ../src/guestfs-actions.pod:3682 ../src/guestfs-actions.pod:3919
28642 #: ../src/guestfs-actions.pod:4051
28643 msgid "(Added in 1.5.3)"
28647 #: ../src/guestfs-actions.pod:2180
28648 msgid "guestfs_filesize"
28652 #: ../src/guestfs-actions.pod:2182
28656 " guestfs_filesize (guestfs_h *g,\n"
28657 " const char *file);\n"
28662 #: ../src/guestfs-actions.pod:2188
28664 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
28665 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
28666 "devices, use C<guestfs_blockdev_getsize64>."
28670 #: ../src/guestfs-actions.pod:2194
28671 msgid "(Added in 1.0.82)"
28675 #: ../src/guestfs-actions.pod:2196
28676 msgid "guestfs_fill"
28680 #: ../src/guestfs-actions.pod:2198
28684 " guestfs_fill (guestfs_h *g,\n"
28687 " const char *path);\n"
28692 #: ../src/guestfs-actions.pod:2208
28694 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
28695 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
28696 "bytes use C<guestfs_fill_pattern>."
28700 #: ../src/guestfs-actions.pod:2220
28701 msgid "(Added in 1.0.79)"
28705 #: ../src/guestfs-actions.pod:2222
28706 msgid "guestfs_fill_pattern"
28710 #: ../src/guestfs-actions.pod:2224
28714 " guestfs_fill_pattern (guestfs_h *g,\n"
28715 " const char *pattern,\n"
28717 " const char *path);\n"
28722 #: ../src/guestfs-actions.pod:2230
28724 "This function is like C<guestfs_fill> except that it creates a new file of "
28725 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
28726 "pattern is truncated if necessary to ensure the length of the file is "
28727 "exactly C<len> bytes."
28731 #: ../src/guestfs-actions.pod:2242
28732 msgid "(Added in 1.3.12)"
28736 #: ../src/guestfs-actions.pod:2244
28737 msgid "guestfs_find"
28741 #: ../src/guestfs-actions.pod:2246
28745 " guestfs_find (guestfs_h *g,\n"
28746 " const char *directory);\n"
28751 #: ../src/guestfs-actions.pod:2262
28753 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
28757 #: ../src/guestfs-actions.pod:2275
28758 msgid "See also C<guestfs_find0>."
28762 #: ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:4813
28763 #: ../src/guestfs-actions.pod:6679
28764 msgid "(Added in 1.0.27)"
28768 #: ../src/guestfs-actions.pod:2286
28769 msgid "guestfs_find0"
28773 #: ../src/guestfs-actions.pod:2288
28777 " guestfs_find0 (guestfs_h *g,\n"
28778 " const char *directory,\n"
28779 " const char *files);\n"
28784 #: ../src/guestfs-actions.pod:2297
28786 "This command works the same way as C<guestfs_find> with the following "
28791 #: ../src/guestfs-actions.pod:2324
28792 msgid "(Added in 1.0.74)"
28796 #: ../src/guestfs-actions.pod:2326
28797 msgid "guestfs_findfs_label"
28801 #: ../src/guestfs-actions.pod:2328
28805 " guestfs_findfs_label (guestfs_h *g,\n"
28806 " const char *label);\n"
28811 #: ../src/guestfs-actions.pod:2336
28812 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
28816 #: ../src/guestfs-actions.pod:2343
28817 msgid "guestfs_findfs_uuid"
28821 #: ../src/guestfs-actions.pod:2345
28825 " guestfs_findfs_uuid (guestfs_h *g,\n"
28826 " const char *uuid);\n"
28831 #: ../src/guestfs-actions.pod:2353
28832 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
28836 #: ../src/guestfs-actions.pod:2360
28837 msgid "guestfs_fsck"
28841 #: ../src/guestfs-actions.pod:2362
28845 " guestfs_fsck (guestfs_h *g,\n"
28846 " const char *fstype,\n"
28847 " const char *device);\n"
28852 #: ../src/guestfs-actions.pod:2397 ../src/guestfs-actions.pod:8580
28853 msgid "(Added in 1.0.16)"
28857 #: ../src/guestfs-actions.pod:2399
28858 msgid "guestfs_get_append"
28862 #: ../src/guestfs-actions.pod:2401
28866 " guestfs_get_append (guestfs_h *g);\n"
28871 #: ../src/guestfs-actions.pod:2409
28873 "This function returns a string which may be NULL. There is no way to return "
28874 "an error from this function. The string is owned by the guest handle and "
28875 "must I<not> be freed."
28879 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:6357
28880 #: ../src/guestfs-actions.pod:6836 ../src/guestfs-actions.pod:7285
28881 #: ../src/guestfs-actions.pod:7304 ../src/guestfs-actions.pod:7320
28882 #: ../src/guestfs-actions.pod:7344 ../src/guestfs-actions.pod:8220
28883 #: ../src/guestfs-actions.pod:8235 ../src/guestfs-actions.pod:8624
28884 msgid "(Added in 1.0.26)"
28888 #: ../src/guestfs-actions.pod:2415
28889 msgid "guestfs_get_attach_method"
28893 #: ../src/guestfs-actions.pod:2417
28897 " guestfs_get_attach_method (guestfs_h *g);\n"
28902 #: ../src/guestfs-actions.pod:2420
28903 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
28907 #: ../src/guestfs-actions.pod:2425 ../src/guestfs-actions.pod:6866
28908 msgid "(Added in 1.9.8)"
28912 #: ../src/guestfs-actions.pod:2427
28913 msgid "guestfs_get_autosync"
28917 #: ../src/guestfs-actions.pod:2429
28921 " guestfs_get_autosync (guestfs_h *g);\n"
28926 #: ../src/guestfs-actions.pod:2438
28927 msgid "guestfs_get_direct"
28931 #: ../src/guestfs-actions.pod:2440
28935 " guestfs_get_direct (guestfs_h *g);\n"
28940 #: ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:6907
28941 msgid "(Added in 1.0.72)"
28945 #: ../src/guestfs-actions.pod:2449
28946 msgid "guestfs_get_e2label"
28950 #: ../src/guestfs-actions.pod:2451
28954 " guestfs_get_e2label (guestfs_h *g,\n"
28955 " const char *device);\n"
28960 #: ../src/guestfs-actions.pod:2455
28962 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
28967 #: ../src/guestfs-actions.pod:2468 ../src/guestfs-actions.pod:2489
28968 #: ../src/guestfs-actions.pod:6925 ../src/guestfs-actions.pod:6944
28969 msgid "(Added in 1.0.15)"
28973 #: ../src/guestfs-actions.pod:2470
28974 msgid "guestfs_get_e2uuid"
28978 #: ../src/guestfs-actions.pod:2472
28982 " guestfs_get_e2uuid (guestfs_h *g,\n"
28983 " const char *device);\n"
28988 #: ../src/guestfs-actions.pod:2476
28990 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
28995 #: ../src/guestfs-actions.pod:2491
28996 msgid "guestfs_get_memsize"
29000 #: ../src/guestfs-actions.pod:2493
29004 " guestfs_get_memsize (guestfs_h *g);\n"
29009 #: ../src/guestfs-actions.pod:2499
29011 "If C<guestfs_set_memsize> was not called on this handle, and if "
29012 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
29013 "value for memsize."
29017 #: ../src/guestfs-actions.pod:2508 ../src/guestfs-actions.pod:5253
29018 #: ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:5481
29019 #: ../src/guestfs-actions.pod:5500 ../src/guestfs-actions.pod:5512
29020 #: ../src/guestfs-actions.pod:5529 ../src/guestfs-actions.pod:5542
29021 #: ../src/guestfs-actions.pod:6582 ../src/guestfs-actions.pod:6965
29022 #: ../src/guestfs-actions.pod:7255 ../src/guestfs-actions.pod:7989
29023 msgid "(Added in 1.0.55)"
29027 #: ../src/guestfs-actions.pod:2510
29028 msgid "guestfs_get_network"
29032 #: ../src/guestfs-actions.pod:2512
29036 " guestfs_get_network (guestfs_h *g);\n"
29041 #: ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:6984
29042 msgid "(Added in 1.5.4)"
29046 #: ../src/guestfs-actions.pod:2521
29047 msgid "guestfs_get_path"
29051 #: ../src/guestfs-actions.pod:2523
29055 " guestfs_get_path (guestfs_h *g);\n"
29060 #: ../src/guestfs-actions.pod:2531 ../src/guestfs-actions.pod:2571
29062 "This function returns a string, or NULL on error. The string is owned by "
29063 "the guest handle and must I<not> be freed."
29067 #: ../src/guestfs-actions.pod:2536
29068 msgid "guestfs_get_pgroup"
29072 #: ../src/guestfs-actions.pod:2538
29076 " guestfs_get_pgroup (guestfs_h *g);\n"
29081 #: ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:7020
29082 #: ../src/guestfs-actions.pod:8481
29083 msgid "(Added in 1.11.18)"
29087 #: ../src/guestfs-actions.pod:2547
29088 msgid "guestfs_get_pid"
29092 #: ../src/guestfs-actions.pod:2549
29096 " guestfs_get_pid (guestfs_h *g);\n"
29101 #: ../src/guestfs-actions.pod:2559
29102 msgid "(Added in 1.0.56)"
29106 #: ../src/guestfs-actions.pod:2561
29107 msgid "guestfs_get_qemu"
29111 #: ../src/guestfs-actions.pod:2563
29115 " guestfs_get_qemu (guestfs_h *g);\n"
29120 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:7048
29121 msgid "(Added in 1.0.6)"
29125 #: ../src/guestfs-actions.pod:2576
29126 msgid "guestfs_get_recovery_proc"
29130 #: ../src/guestfs-actions.pod:2578
29134 " guestfs_get_recovery_proc (guestfs_h *g);\n"
29139 #: ../src/guestfs-actions.pod:2585 ../src/guestfs-actions.pod:4173
29140 #: ../src/guestfs-actions.pod:4517 ../src/guestfs-actions.pod:4911
29141 #: ../src/guestfs-actions.pod:5092 ../src/guestfs-actions.pod:6287
29142 #: ../src/guestfs-actions.pod:6630 ../src/guestfs-actions.pod:7072
29143 #: ../src/guestfs-actions.pod:7770 ../src/guestfs-actions.pod:7790
29144 #: ../src/guestfs-actions.pod:8104
29145 msgid "(Added in 1.0.77)"
29149 #: ../src/guestfs-actions.pod:2587
29150 msgid "guestfs_get_selinux"
29154 #: ../src/guestfs-actions.pod:2589
29158 " guestfs_get_selinux (guestfs_h *g);\n"
29163 #: ../src/guestfs-actions.pod:2592
29165 "This returns the current setting of the selinux flag which is passed to the "
29166 "appliance at boot time. See C<guestfs_set_selinux>."
29170 #: ../src/guestfs-actions.pod:2600 ../src/guestfs-actions.pod:2674
29171 #: ../src/guestfs-actions.pod:7091 ../src/guestfs-actions.pod:7165
29172 msgid "(Added in 1.0.67)"
29176 #: ../src/guestfs-actions.pod:2602
29177 msgid "guestfs_get_smp"
29181 #: ../src/guestfs-actions.pod:2604
29185 " guestfs_get_smp (guestfs_h *g);\n"
29190 #: ../src/guestfs-actions.pod:2613
29191 msgid "guestfs_get_state"
29195 #: ../src/guestfs-actions.pod:2615
29199 " guestfs_get_state (guestfs_h *g);\n"
29204 #: ../src/guestfs-actions.pod:2627
29205 msgid "guestfs_get_trace"
29209 #: ../src/guestfs-actions.pod:2629
29213 " guestfs_get_trace (guestfs_h *g);\n"
29218 #: ../src/guestfs-actions.pod:2638
29219 msgid "guestfs_get_umask"
29223 #: ../src/guestfs-actions.pod:2640
29227 " guestfs_get_umask (guestfs_h *g);\n"
29232 #: ../src/guestfs-actions.pod:2643
29234 "Return the current umask. By default the umask is C<022> unless it has been "
29235 "set by calling C<guestfs_umask>."
29239 #: ../src/guestfs-actions.pod:2650
29240 msgid "guestfs_get_verbose"
29244 #: ../src/guestfs-actions.pod:2652
29248 " guestfs_get_verbose (guestfs_h *g);\n"
29253 #: ../src/guestfs-actions.pod:2661
29254 msgid "guestfs_getcon"
29258 #: ../src/guestfs-actions.pod:2663
29262 " guestfs_getcon (guestfs_h *g);\n"
29267 #: ../src/guestfs-actions.pod:2668
29269 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
29273 #: ../src/guestfs-actions.pod:2676
29274 msgid "guestfs_getxattr"
29278 #: ../src/guestfs-actions.pod:2678
29282 " guestfs_getxattr (guestfs_h *g,\n"
29283 " const char *path,\n"
29284 " const char *name,\n"
29285 " size_t *size_r);\n"
29290 #: ../src/guestfs-actions.pod:2684
29292 "Get a single extended attribute from file C<path> named C<name>. This call "
29293 "follows symlinks. If you want to lookup an extended attribute for the "
29294 "symlink itself, use C<guestfs_lgetxattr>."
29298 #: ../src/guestfs-actions.pod:2688 ../src/guestfs-actions.pod:4187
29300 "Normally it is better to get all extended attributes from a file in one go "
29301 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
29302 "implementations are buggy and do not provide a way to list out attributes. "
29303 "For these filesystems (notably ntfs-3g) you have to know the names of the "
29304 "extended attributes you want in advance and call this function."
29308 #: ../src/guestfs-actions.pod:2698
29309 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
29313 #: ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:2913
29314 #: ../src/guestfs-actions.pod:3395 ../src/guestfs-actions.pod:4199
29315 #: ../src/guestfs-actions.pod:6280 ../src/guestfs-actions.pod:6306
29316 #: ../src/guestfs-actions.pod:6487
29318 "This function returns a buffer, or NULL on error. The size of the returned "
29319 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
29324 #: ../src/guestfs-actions.pod:2704 ../src/guestfs-actions.pod:4203
29325 msgid "(Added in 1.7.24)"
29329 #: ../src/guestfs-actions.pod:2706
29330 msgid "guestfs_getxattrs"
29334 #: ../src/guestfs-actions.pod:2708
29337 " struct guestfs_xattr_list *\n"
29338 " guestfs_getxattrs (guestfs_h *g,\n"
29339 " const char *path);\n"
29344 #: ../src/guestfs-actions.pod:2718
29345 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
29349 #: ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:4215
29350 #: ../src/guestfs-actions.pod:4907
29352 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
29353 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
29357 #: ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:4219
29358 #: ../src/guestfs-actions.pod:4431 ../src/guestfs-actions.pod:4467
29359 #: ../src/guestfs-actions.pod:6660 ../src/guestfs-actions.pod:7184
29360 #: ../src/guestfs-actions.pod:8689
29361 msgid "(Added in 1.0.59)"
29365 #: ../src/guestfs-actions.pod:2726
29366 msgid "guestfs_glob_expand"
29370 #: ../src/guestfs-actions.pod:2728
29374 " guestfs_glob_expand (guestfs_h *g,\n"
29375 " const char *pattern);\n"
29380 #: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:7368
29381 #: ../src/guestfs-actions.pod:7385
29382 msgid "(Added in 1.0.50)"
29386 #: ../src/guestfs-actions.pod:2749
29387 msgid "guestfs_grep"
29391 #: ../src/guestfs-actions.pod:2751
29395 " guestfs_grep (guestfs_h *g,\n"
29396 " const char *regex,\n"
29397 " const char *path);\n"
29402 #: ../src/guestfs-actions.pod:2768
29403 msgid "guestfs_grepi"
29407 #: ../src/guestfs-actions.pod:2770
29411 " guestfs_grepi (guestfs_h *g,\n"
29412 " const char *regex,\n"
29413 " const char *path);\n"
29418 #: ../src/guestfs-actions.pod:2787
29419 msgid "guestfs_grub_install"
29423 #: ../src/guestfs-actions.pod:2789
29427 " guestfs_grub_install (guestfs_h *g,\n"
29428 " const char *root,\n"
29429 " const char *device);\n"
29434 #: ../src/guestfs-actions.pod:2832
29435 msgid "(Added in 1.0.17)"
29439 #: ../src/guestfs-actions.pod:2834
29440 msgid "guestfs_head"
29444 #: ../src/guestfs-actions.pod:2836
29448 " guestfs_head (guestfs_h *g,\n"
29449 " const char *path);\n"
29454 #: ../src/guestfs-actions.pod:2852
29455 msgid "guestfs_head_n"
29459 #: ../src/guestfs-actions.pod:2854
29463 " guestfs_head_n (guestfs_h *g,\n"
29465 " const char *path);\n"
29470 #: ../src/guestfs-actions.pod:2876
29471 msgid "guestfs_hexdump"
29475 #: ../src/guestfs-actions.pod:2878
29479 " guestfs_hexdump (guestfs_h *g,\n"
29480 " const char *path);\n"
29485 #: ../src/guestfs-actions.pod:2891 ../src/guestfs-actions.pod:7449
29486 #: ../src/guestfs-actions.pod:7504
29487 msgid "(Added in 1.0.22)"
29491 #: ../src/guestfs-actions.pod:2893
29492 msgid "guestfs_initrd_cat"
29496 #: ../src/guestfs-actions.pod:2895
29500 " guestfs_initrd_cat (guestfs_h *g,\n"
29501 " const char *initrdpath,\n"
29502 " const char *filename,\n"
29503 " size_t *size_r);\n"
29508 #: ../src/guestfs-actions.pod:2911
29509 msgid "See also C<guestfs_initrd_list>."
29513 #: ../src/guestfs-actions.pod:2922
29514 msgid "guestfs_initrd_list"
29518 #: ../src/guestfs-actions.pod:2924
29522 " guestfs_initrd_list (guestfs_h *g,\n"
29523 " const char *path);\n"
29528 #: ../src/guestfs-actions.pod:2944
29529 msgid "guestfs_inotify_add_watch"
29533 #: ../src/guestfs-actions.pod:2946
29537 " guestfs_inotify_add_watch (guestfs_h *g,\n"
29538 " const char *path,\n"
29544 #: ../src/guestfs-actions.pod:2965
29545 msgid "guestfs_inotify_close"
29549 #: ../src/guestfs-actions.pod:2967
29553 " guestfs_inotify_close (guestfs_h *g);\n"
29558 #: ../src/guestfs-actions.pod:2978
29559 msgid "guestfs_inotify_files"
29563 #: ../src/guestfs-actions.pod:2980
29567 " guestfs_inotify_files (guestfs_h *g);\n"
29572 #: ../src/guestfs-actions.pod:2983
29574 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
29575 "returns a list of pathnames of objects that were touched. The returned "
29576 "pathnames are sorted and deduplicated."
29580 #: ../src/guestfs-actions.pod:2993
29581 msgid "guestfs_inotify_init"
29585 #: ../src/guestfs-actions.pod:2995
29589 " guestfs_inotify_init (guestfs_h *g,\n"
29590 " int maxevents);\n"
29595 #: ../src/guestfs-actions.pod:3003
29597 "C<maxevents> is the maximum number of events which will be queued up between "
29598 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
29599 "passed as C<0>, then the kernel (or previously set) default is used. For "
29600 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
29601 "throws away events, but records the fact that it threw them away by setting "
29602 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
29603 "C<guestfs_inotify_read>)."
29607 #: ../src/guestfs-actions.pod:3013
29609 "Before any events are generated, you have to add some watches to the "
29610 "internal watch list. See: C<guestfs_inotify_add_watch>, "
29611 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
29615 #: ../src/guestfs-actions.pod:3019
29617 "Queued up events should be read periodically by calling "
29618 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
29619 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
29620 "often enough then you risk the internal queue overflowing."
29624 #: ../src/guestfs-actions.pod:3026
29626 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
29627 "This also removes any watches automatically."
29631 #: ../src/guestfs-actions.pod:3039
29632 msgid "guestfs_inotify_read"
29636 #: ../src/guestfs-actions.pod:3041
29639 " struct guestfs_inotify_event_list *\n"
29640 " guestfs_inotify_read (guestfs_h *g);\n"
29645 #: ../src/guestfs-actions.pod:3055
29647 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
29648 "there was an error. I<The caller must call "
29649 "C<guestfs_free_inotify_event_list> after use>."
29653 #: ../src/guestfs-actions.pod:3061
29654 msgid "guestfs_inotify_rm_watch"
29658 #: ../src/guestfs-actions.pod:3063
29662 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
29668 #: ../src/guestfs-actions.pod:3067
29670 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
29674 #: ../src/guestfs-actions.pod:3074
29675 msgid "guestfs_inspect_get_arch"
29679 #: ../src/guestfs-actions.pod:3076
29683 " guestfs_inspect_get_arch (guestfs_h *g,\n"
29684 " const char *root);\n"
29689 #: ../src/guestfs-actions.pod:3080
29691 "This returns the architecture of the inspected operating system. The "
29692 "possible return values are listed under C<guestfs_file_architecture>."
29696 #: ../src/guestfs-actions.pod:3094
29697 msgid "guestfs_inspect_get_distro"
29701 #: ../src/guestfs-actions.pod:3096
29705 " guestfs_inspect_get_distro (guestfs_h *g,\n"
29706 " const char *root);\n"
29711 #: ../src/guestfs-actions.pod:3196
29712 msgid "guestfs_inspect_get_drive_mappings"
29716 #: ../src/guestfs-actions.pod:3198
29720 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
29721 " const char *root);\n"
29726 #: ../src/guestfs-actions.pod:3227
29728 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29729 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
29733 #: ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3702
29734 msgid "(Added in 1.9.17)"
29738 #: ../src/guestfs-actions.pod:3239
29739 msgid "guestfs_inspect_get_filesystems"
29743 #: ../src/guestfs-actions.pod:3241
29747 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
29748 " const char *root);\n"
29753 #: ../src/guestfs-actions.pod:3253
29755 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29756 "C<guestfs_inspect_get_mountpoints>."
29760 #: ../src/guestfs-actions.pod:3262
29761 msgid "guestfs_inspect_get_format"
29765 #: ../src/guestfs-actions.pod:3264
29769 " guestfs_inspect_get_format (guestfs_h *g,\n"
29770 " const char *root);\n"
29775 #: ../src/guestfs-actions.pod:3298 ../src/guestfs-actions.pod:3738
29776 #: ../src/guestfs-actions.pod:3754 ../src/guestfs-actions.pod:3772
29777 #: ../src/guestfs-actions.pod:6698
29778 msgid "(Added in 1.9.4)"
29782 #: ../src/guestfs-actions.pod:3300
29783 msgid "guestfs_inspect_get_hostname"
29787 #: ../src/guestfs-actions.pod:3302
29791 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
29792 " const char *root);\n"
29797 #: ../src/guestfs-actions.pod:3317
29798 msgid "(Added in 1.7.9)"
29802 #: ../src/guestfs-actions.pod:3319
29803 msgid "guestfs_inspect_get_icon"
29807 #: ../src/guestfs-actions.pod:3321
29811 " guestfs_inspect_get_icon (guestfs_h *g,\n"
29812 " const char *root,\n"
29813 " size_t *size_r,\n"
29819 #: ../src/guestfs-actions.pod:3332
29822 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
29823 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
29828 #: ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:4233
29829 #: ../src/guestfs-actions.pod:5630
29830 msgid "(Added in 1.11.12)"
29834 #: ../src/guestfs-actions.pod:3401
29835 msgid "guestfs_inspect_get_icon_va"
29839 #: ../src/guestfs-actions.pod:3403
29843 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
29844 " const char *root,\n"
29845 " size_t *size_r,\n"
29846 " va_list args);\n"
29851 #: ../src/guestfs-actions.pod:3409
29852 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
29856 #: ../src/guestfs-actions.pod:3413
29857 msgid "guestfs_inspect_get_icon_argv"
29861 #: ../src/guestfs-actions.pod:3415
29865 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
29866 " const char *root,\n"
29867 " size_t *size_r,\n"
29868 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
29873 #: ../src/guestfs-actions.pod:3421
29874 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
29878 #: ../src/guestfs-actions.pod:3425
29879 msgid "guestfs_inspect_get_major_version"
29883 #: ../src/guestfs-actions.pod:3427
29887 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
29888 " const char *root);\n"
29893 #: ../src/guestfs-actions.pod:3449
29894 msgid "guestfs_inspect_get_minor_version"
29898 #: ../src/guestfs-actions.pod:3451
29902 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
29903 " const char *root);\n"
29908 #: ../src/guestfs-actions.pod:3460
29910 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29911 "C<guestfs_inspect_get_major_version>."
29915 #: ../src/guestfs-actions.pod:3467
29916 msgid "guestfs_inspect_get_mountpoints"
29920 #: ../src/guestfs-actions.pod:3469
29924 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
29925 " const char *root);\n"
29930 #: ../src/guestfs-actions.pod:3490
29932 "For operating systems like Windows which still use drive letters, this call "
29933 "will only return an entry for the first drive \"mounted on\" C</>. For "
29934 "information about the mapping of drive letters to partitions, see "
29935 "C<guestfs_inspect_get_drive_mappings>."
29939 #: ../src/guestfs-actions.pod:3496
29941 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29942 "C<guestfs_inspect_get_filesystems>."
29946 #: ../src/guestfs-actions.pod:3507
29947 msgid "guestfs_inspect_get_package_format"
29951 #: ../src/guestfs-actions.pod:3509
29955 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
29956 " const char *root);\n"
29961 #: ../src/guestfs-actions.pod:3513
29963 "This function and C<guestfs_inspect_get_package_management> return the "
29964 "package format and package management tool used by the inspected operating "
29965 "system. For example for Fedora these functions would return C<rpm> (package "
29966 "format) and C<yum> (package management)."
29970 #: ../src/guestfs-actions.pod:3532 ../src/guestfs-actions.pod:3560
29971 msgid "(Added in 1.7.5)"
29975 #: ../src/guestfs-actions.pod:3534
29976 msgid "guestfs_inspect_get_package_management"
29980 #: ../src/guestfs-actions.pod:3536
29984 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
29985 " const char *root);\n"
29990 #: ../src/guestfs-actions.pod:3540
29992 "C<guestfs_inspect_get_package_format> and this function return the package "
29993 "format and package management tool used by the inspected operating system. "
29994 "For example for Fedora these functions would return C<rpm> (package format) "
29995 "and C<yum> (package management)."
29999 #: ../src/guestfs-actions.pod:3562
30000 msgid "guestfs_inspect_get_product_name"
30004 #: ../src/guestfs-actions.pod:3564
30008 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
30009 " const char *root);\n"
30014 #: ../src/guestfs-actions.pod:3583
30015 msgid "guestfs_inspect_get_product_variant"
30019 #: ../src/guestfs-actions.pod:3585
30023 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
30024 " const char *root);\n"
30029 #: ../src/guestfs-actions.pod:3608
30031 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
30032 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
30036 #: ../src/guestfs-actions.pod:3615
30037 msgid "(Added in 1.9.13)"
30041 #: ../src/guestfs-actions.pod:3617
30042 msgid "guestfs_inspect_get_roots"
30046 #: ../src/guestfs-actions.pod:3619
30050 " guestfs_inspect_get_roots (guestfs_h *g);\n"
30055 #: ../src/guestfs-actions.pod:3622
30057 "This function is a convenient way to get the list of root devices, as "
30058 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
30059 "the whole inspection process."
30063 #: ../src/guestfs-actions.pod:3626
30065 "This returns an empty list if either no root devices were found or the "
30066 "caller has not called C<guestfs_inspect_os>."
30070 #: ../src/guestfs-actions.pod:3635
30071 msgid "(Added in 1.7.3)"
30075 #: ../src/guestfs-actions.pod:3637
30076 msgid "guestfs_inspect_get_type"
30080 #: ../src/guestfs-actions.pod:3639
30084 " guestfs_inspect_get_type (guestfs_h *g,\n"
30085 " const char *root);\n"
30090 #: ../src/guestfs-actions.pod:3684
30091 msgid "guestfs_inspect_get_windows_current_control_set"
30095 #: ../src/guestfs-actions.pod:3686
30099 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
30100 " const char *root);\n"
30105 #: ../src/guestfs-actions.pod:3704
30106 msgid "guestfs_inspect_get_windows_systemroot"
30110 #: ../src/guestfs-actions.pod:3706
30114 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
30115 " const char *root);\n"
30120 #: ../src/guestfs-actions.pod:3722
30121 msgid "(Added in 1.5.25)"
30125 #: ../src/guestfs-actions.pod:3724
30126 msgid "guestfs_inspect_is_live"
30130 #: ../src/guestfs-actions.pod:3726
30134 " guestfs_inspect_is_live (guestfs_h *g,\n"
30135 " const char *root);\n"
30140 #: ../src/guestfs-actions.pod:3730
30142 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
30143 "disk), then this returns true if a live image was detected on the disk."
30147 #: ../src/guestfs-actions.pod:3740
30148 msgid "guestfs_inspect_is_multipart"
30152 #: ../src/guestfs-actions.pod:3742
30156 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
30157 " const char *root);\n"
30162 #: ../src/guestfs-actions.pod:3746
30164 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
30165 "disk), then this returns true if the disk is part of a set."
30169 #: ../src/guestfs-actions.pod:3756
30170 msgid "guestfs_inspect_is_netinst"
30174 #: ../src/guestfs-actions.pod:3758
30178 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
30179 " const char *root);\n"
30184 #: ../src/guestfs-actions.pod:3762
30186 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
30187 "disk), then this returns true if the disk is a network installer, ie. not a "
30188 "self-contained install CD but one which is likely to require network access "
30189 "to complete the install."
30193 #: ../src/guestfs-actions.pod:3774
30194 msgid "guestfs_inspect_list_applications"
30198 #: ../src/guestfs-actions.pod:3776
30201 " struct guestfs_application_list *\n"
30202 " guestfs_inspect_list_applications (guestfs_h *g,\n"
30203 " const char *root);\n"
30208 #: ../src/guestfs-actions.pod:3782
30210 "I<Note:> This call works differently from other parts of the inspection "
30211 "API. You have to call C<guestfs_inspect_os>, then "
30212 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
30213 "this. Listing applications is a significantly more difficult operation "
30214 "which requires access to the full filesystem. Also note that unlike the "
30215 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
30216 "the libguestfs handle, this call actually reads parts of the mounted "
30217 "filesystems during the call."
30221 #: ../src/guestfs-actions.pod:3872
30223 "This function returns a C<struct guestfs_application_list *>, or NULL if "
30224 "there was an error. I<The caller must call C<guestfs_free_application_list> "
30229 #: ../src/guestfs-actions.pod:3876
30230 msgid "(Added in 1.7.8)"
30234 #: ../src/guestfs-actions.pod:3878
30235 msgid "guestfs_inspect_os"
30239 #: ../src/guestfs-actions.pod:3880
30243 " guestfs_inspect_os (guestfs_h *g);\n"
30248 #: ../src/guestfs-actions.pod:3896
30250 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
30251 "functions in order to query further information about each operating system, "
30252 "such as the name and version."
30256 #: ../src/guestfs-actions.pod:3901
30258 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
30259 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
30260 "the contents. This should be called with no disks currently mounted. The "
30261 "function may also use Augeas, so any existing Augeas handle will be closed."
30265 #: ../src/guestfs-actions.pod:3913 ../src/guestfs-actions.pod:4244
30266 #: ../src/guestfs-actions.pod:4339
30267 msgid "See also C<guestfs_list_filesystems>."
30271 #: ../src/guestfs-actions.pod:3921
30272 msgid "guestfs_is_blockdev"
30276 #: ../src/guestfs-actions.pod:3923
30280 " guestfs_is_blockdev (guestfs_h *g,\n"
30281 " const char *path);\n"
30286 #: ../src/guestfs-actions.pod:3930 ../src/guestfs-actions.pod:3959
30287 #: ../src/guestfs-actions.pod:3989 ../src/guestfs-actions.pod:4004
30288 #: ../src/guestfs-actions.pod:4020 ../src/guestfs-actions.pod:4076
30289 #: ../src/guestfs-actions.pod:4091
30290 msgid "See also C<guestfs_stat>."
30294 #: ../src/guestfs-actions.pod:3934 ../src/guestfs-actions.pod:3963
30295 #: ../src/guestfs-actions.pod:4008 ../src/guestfs-actions.pod:4080
30296 #: ../src/guestfs-actions.pod:4095
30297 msgid "(Added in 1.5.10)"
30301 #: ../src/guestfs-actions.pod:3936
30302 msgid "guestfs_is_busy"
30306 #: ../src/guestfs-actions.pod:3938
30310 " guestfs_is_busy (guestfs_h *g);\n"
30315 #: ../src/guestfs-actions.pod:3950
30316 msgid "guestfs_is_chardev"
30320 #: ../src/guestfs-actions.pod:3952
30324 " guestfs_is_chardev (guestfs_h *g,\n"
30325 " const char *path);\n"
30330 #: ../src/guestfs-actions.pod:3965
30331 msgid "guestfs_is_config"
30335 #: ../src/guestfs-actions.pod:3967
30339 " guestfs_is_config (guestfs_h *g);\n"
30344 #: ../src/guestfs-actions.pod:3979
30345 msgid "guestfs_is_dir"
30349 #: ../src/guestfs-actions.pod:3981
30353 " guestfs_is_dir (guestfs_h *g,\n"
30354 " const char *path);\n"
30359 #: ../src/guestfs-actions.pod:3995
30360 msgid "guestfs_is_fifo"
30364 #: ../src/guestfs-actions.pod:3997
30368 " guestfs_is_fifo (guestfs_h *g,\n"
30369 " const char *path);\n"
30374 #: ../src/guestfs-actions.pod:4010
30375 msgid "guestfs_is_file"
30379 #: ../src/guestfs-actions.pod:4012
30383 " guestfs_is_file (guestfs_h *g,\n"
30384 " const char *path);\n"
30389 #: ../src/guestfs-actions.pod:4026
30390 msgid "guestfs_is_launching"
30394 #: ../src/guestfs-actions.pod:4028
30398 " guestfs_is_launching (guestfs_h *g);\n"
30403 #: ../src/guestfs-actions.pod:4040
30404 msgid "guestfs_is_lv"
30408 #: ../src/guestfs-actions.pod:4042
30412 " guestfs_is_lv (guestfs_h *g,\n"
30413 " const char *device);\n"
30418 #: ../src/guestfs-actions.pod:4053
30419 msgid "guestfs_is_ready"
30423 #: ../src/guestfs-actions.pod:4055
30427 " guestfs_is_ready (guestfs_h *g);\n"
30432 #: ../src/guestfs-actions.pod:4067
30433 msgid "guestfs_is_socket"
30437 #: ../src/guestfs-actions.pod:4069
30441 " guestfs_is_socket (guestfs_h *g,\n"
30442 " const char *path);\n"
30447 #: ../src/guestfs-actions.pod:4082
30448 msgid "guestfs_is_symlink"
30452 #: ../src/guestfs-actions.pod:4084
30456 " guestfs_is_symlink (guestfs_h *g,\n"
30457 " const char *path);\n"
30462 #: ../src/guestfs-actions.pod:4097
30463 msgid "guestfs_is_zero"
30467 #: ../src/guestfs-actions.pod:4099
30471 " guestfs_is_zero (guestfs_h *g,\n"
30472 " const char *path);\n"
30477 #: ../src/guestfs-actions.pod:4108 ../src/guestfs-actions.pod:4122
30478 msgid "(Added in 1.11.8)"
30482 #: ../src/guestfs-actions.pod:4110
30483 msgid "guestfs_is_zero_device"
30487 #: ../src/guestfs-actions.pod:4112
30491 " guestfs_is_zero_device (guestfs_h *g,\n"
30492 " const char *device);\n"
30497 #: ../src/guestfs-actions.pod:4124
30498 msgid "guestfs_kill_subprocess"
30502 #: ../src/guestfs-actions.pod:4126
30506 " guestfs_kill_subprocess (guestfs_h *g);\n"
30511 #: ../src/guestfs-actions.pod:4135
30512 msgid "guestfs_launch"
30516 #: ../src/guestfs-actions.pod:4137
30520 " guestfs_launch (guestfs_h *g);\n"
30525 #: ../src/guestfs-actions.pod:4155
30526 msgid "guestfs_lchown"
30530 #: ../src/guestfs-actions.pod:4157
30534 " guestfs_lchown (guestfs_h *g,\n"
30537 " const char *path);\n"
30542 #: ../src/guestfs-actions.pod:4163
30544 "Change the file owner to C<owner> and group to C<group>. This is like "
30545 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
30546 "changed, not the target."
30550 #: ../src/guestfs-actions.pod:4175
30551 msgid "guestfs_lgetxattr"
30555 #: ../src/guestfs-actions.pod:4177
30559 " guestfs_lgetxattr (guestfs_h *g,\n"
30560 " const char *path,\n"
30561 " const char *name,\n"
30562 " size_t *size_r);\n"
30567 #: ../src/guestfs-actions.pod:4197
30568 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
30572 #: ../src/guestfs-actions.pod:4205
30573 msgid "guestfs_lgetxattrs"
30577 #: ../src/guestfs-actions.pod:4207
30580 " struct guestfs_xattr_list *\n"
30581 " guestfs_lgetxattrs (guestfs_h *g,\n"
30582 " const char *path);\n"
30587 #: ../src/guestfs-actions.pod:4211
30589 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
30590 "then it returns the extended attributes of the link itself."
30594 #: ../src/guestfs-actions.pod:4221
30595 msgid "guestfs_list_9p"
30599 #: ../src/guestfs-actions.pod:4223
30603 " guestfs_list_9p (guestfs_h *g);\n"
30608 #: ../src/guestfs-actions.pod:4235
30609 msgid "guestfs_list_devices"
30613 #: ../src/guestfs-actions.pod:4237
30617 " guestfs_list_devices (guestfs_h *g);\n"
30622 #: ../src/guestfs-actions.pod:4252
30623 msgid "guestfs_list_dm_devices"
30627 #: ../src/guestfs-actions.pod:4254
30631 " guestfs_list_dm_devices (guestfs_h *g);\n"
30636 #: ../src/guestfs-actions.pod:4259
30638 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
30639 "previous call to C<guestfs_luks_open>."
30643 #: ../src/guestfs-actions.pod:4262
30645 "Device mapper devices which correspond to logical volumes are I<not> "
30646 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
30651 #: ../src/guestfs-actions.pod:4270 ../src/guestfs-actions.pod:5869
30652 msgid "(Added in 1.11.15)"
30656 #: ../src/guestfs-actions.pod:4272
30657 msgid "guestfs_list_filesystems"
30661 #: ../src/guestfs-actions.pod:4274
30665 " guestfs_list_filesystems (guestfs_h *g);\n"
30670 #: ../src/guestfs-actions.pod:4294
30672 "This command runs other libguestfs commands, which might include "
30673 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
30674 "soon after launch and only when nothing is mounted."
30678 #: ../src/guestfs-actions.pod:4298
30680 "Not all of the filesystems returned will be mountable. In particular, swap "
30681 "partitions are returned in the list. Also this command does not check that "
30682 "each filesystem found is valid and mountable, and some filesystems might be "
30683 "mountable but require special options. Filesystems may not all belong to a "
30684 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
30688 #: ../src/guestfs-actions.pod:4312 ../src/guestfs-actions.pod:6229
30689 msgid "(Added in 1.5.15)"
30693 #: ../src/guestfs-actions.pod:4314
30694 msgid "guestfs_list_md_devices"
30698 #: ../src/guestfs-actions.pod:4316
30702 " guestfs_list_md_devices (guestfs_h *g);\n"
30707 #: ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:7890
30708 msgid "(Added in 1.15.4)"
30712 #: ../src/guestfs-actions.pod:4327
30713 msgid "guestfs_list_partitions"
30717 #: ../src/guestfs-actions.pod:4329
30721 " guestfs_list_partitions (guestfs_h *g);\n"
30726 #: ../src/guestfs-actions.pod:4336
30728 "This does not return logical volumes. For that you will need to call "
30733 #: ../src/guestfs-actions.pod:4347
30738 #: ../src/guestfs-actions.pod:4349
30742 " guestfs_ll (guestfs_h *g,\n"
30743 " const char *directory);\n"
30748 #: ../src/guestfs-actions.pod:4364
30753 #: ../src/guestfs-actions.pod:4366
30757 " guestfs_ln (guestfs_h *g,\n"
30758 " const char *target,\n"
30759 " const char *linkname);\n"
30764 #: ../src/guestfs-actions.pod:4377
30765 msgid "guestfs_ln_f"
30769 #: ../src/guestfs-actions.pod:4379
30773 " guestfs_ln_f (guestfs_h *g,\n"
30774 " const char *target,\n"
30775 " const char *linkname);\n"
30780 #: ../src/guestfs-actions.pod:4391
30781 msgid "guestfs_ln_s"
30785 #: ../src/guestfs-actions.pod:4393
30789 " guestfs_ln_s (guestfs_h *g,\n"
30790 " const char *target,\n"
30791 " const char *linkname);\n"
30796 #: ../src/guestfs-actions.pod:4404
30797 msgid "guestfs_ln_sf"
30801 #: ../src/guestfs-actions.pod:4406
30805 " guestfs_ln_sf (guestfs_h *g,\n"
30806 " const char *target,\n"
30807 " const char *linkname);\n"
30812 #: ../src/guestfs-actions.pod:4418
30813 msgid "guestfs_lremovexattr"
30817 #: ../src/guestfs-actions.pod:4420
30821 " guestfs_lremovexattr (guestfs_h *g,\n"
30822 " const char *xattr,\n"
30823 " const char *path);\n"
30828 #: ../src/guestfs-actions.pod:4425
30830 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
30831 "link, then it removes an extended attribute of the link itself."
30835 #: ../src/guestfs-actions.pod:4433
30840 #: ../src/guestfs-actions.pod:4435
30844 " guestfs_ls (guestfs_h *g,\n"
30845 " const char *directory);\n"
30850 #: ../src/guestfs-actions.pod:4443
30852 "This command is mostly useful for interactive sessions. Programs should "
30853 "probably use C<guestfs_readdir> instead."
30857 #: ../src/guestfs-actions.pod:4452
30858 msgid "guestfs_lsetxattr"
30862 #: ../src/guestfs-actions.pod:4454
30866 " guestfs_lsetxattr (guestfs_h *g,\n"
30867 " const char *xattr,\n"
30868 " const char *val,\n"
30870 " const char *path);\n"
30875 #: ../src/guestfs-actions.pod:4461
30877 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
30878 "then it sets an extended attribute of the link itself."
30882 #: ../src/guestfs-actions.pod:4469
30883 msgid "guestfs_lstat"
30887 #: ../src/guestfs-actions.pod:4471
30890 " struct guestfs_stat *\n"
30891 " guestfs_lstat (guestfs_h *g,\n"
30892 " const char *path);\n"
30897 #: ../src/guestfs-actions.pod:4477
30899 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
30900 "link, then the link is stat-ed, not the file it refers to."
30904 #: ../src/guestfs-actions.pod:4483 ../src/guestfs-actions.pod:7409
30906 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
30907 "error. I<The caller must call C<guestfs_free_stat> after use>."
30911 #: ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:7413
30912 #: ../src/guestfs-actions.pod:7431 ../src/guestfs-actions.pod:7934
30913 msgid "(Added in 0.9.2)"
30917 #: ../src/guestfs-actions.pod:4489
30918 msgid "guestfs_lstatlist"
30922 #: ../src/guestfs-actions.pod:4491
30925 " struct guestfs_stat_list *\n"
30926 " guestfs_lstatlist (guestfs_h *g,\n"
30927 " const char *path,\n"
30928 " char *const *names);\n"
30933 #: ../src/guestfs-actions.pod:4496
30935 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
30936 "files, where all files are in the directory C<path>. C<names> is the list "
30937 "of files from this directory."
30941 #: ../src/guestfs-actions.pod:4505
30943 "This call is intended for programs that want to efficiently list a directory "
30944 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
30945 "for a similarly efficient call for getting extended attributes. Very long "
30946 "directory listings might cause the protocol message size to be exceeded, "
30947 "causing this call to fail. The caller must split up such requests into "
30948 "smaller groups of names."
30952 #: ../src/guestfs-actions.pod:4513
30954 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
30955 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
30959 #: ../src/guestfs-actions.pod:4519
30960 msgid "guestfs_luks_add_key"
30964 #: ../src/guestfs-actions.pod:4521
30968 " guestfs_luks_add_key (guestfs_h *g,\n"
30969 " const char *device,\n"
30970 " const char *key,\n"
30971 " const char *newkey,\n"
30977 #: ../src/guestfs-actions.pod:4533
30979 "Note that if C<keyslot> already contains a key, then this command will "
30980 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
30984 #: ../src/guestfs-actions.pod:4539 ../src/guestfs-actions.pod:4576
30985 #: ../src/guestfs-actions.pod:4596 ../src/guestfs-actions.pod:4616
30986 #: ../src/guestfs-actions.pod:4651 ../src/guestfs-actions.pod:4670
30988 "This function takes a key or passphrase parameter which could contain "
30989 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
30994 #: ../src/guestfs-actions.pod:4543 ../src/guestfs-actions.pod:4580
30995 #: ../src/guestfs-actions.pod:4600 ../src/guestfs-actions.pod:4620
30996 msgid "(Added in 1.5.2)"
31000 #: ../src/guestfs-actions.pod:4545
31001 msgid "guestfs_luks_close"
31005 #: ../src/guestfs-actions.pod:4547
31009 " guestfs_luks_close (guestfs_h *g,\n"
31010 " const char *device);\n"
31015 #: ../src/guestfs-actions.pod:4551
31017 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
31018 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
31019 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
31020 "underlying block device."
31024 #: ../src/guestfs-actions.pod:4559 ../src/guestfs-actions.pod:4655
31025 #: ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4724
31026 #: ../src/guestfs-actions.pod:4769
31027 msgid "(Added in 1.5.1)"
31031 #: ../src/guestfs-actions.pod:4561
31032 msgid "guestfs_luks_format"
31036 #: ../src/guestfs-actions.pod:4563
31040 " guestfs_luks_format (guestfs_h *g,\n"
31041 " const char *device,\n"
31042 " const char *key,\n"
31048 #: ../src/guestfs-actions.pod:4582
31049 msgid "guestfs_luks_format_cipher"
31053 #: ../src/guestfs-actions.pod:4584
31057 " guestfs_luks_format_cipher (guestfs_h *g,\n"
31058 " const char *device,\n"
31059 " const char *key,\n"
31061 " const char *cipher);\n"
31066 #: ../src/guestfs-actions.pod:4591
31068 "This command is the same as C<guestfs_luks_format> but it also allows you to "
31069 "set the C<cipher> used."
31073 #: ../src/guestfs-actions.pod:4602
31074 msgid "guestfs_luks_kill_slot"
31078 #: ../src/guestfs-actions.pod:4604
31082 " guestfs_luks_kill_slot (guestfs_h *g,\n"
31083 " const char *device,\n"
31084 " const char *key,\n"
31090 #: ../src/guestfs-actions.pod:4622
31091 msgid "guestfs_luks_open"
31095 #: ../src/guestfs-actions.pod:4624
31099 " guestfs_luks_open (guestfs_h *g,\n"
31100 " const char *device,\n"
31101 " const char *key,\n"
31102 " const char *mapname);\n"
31107 #: ../src/guestfs-actions.pod:4642
31109 "If this block device contains LVM volume groups, then calling "
31110 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
31115 #: ../src/guestfs-actions.pod:4646
31116 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
31120 #: ../src/guestfs-actions.pod:4657
31121 msgid "guestfs_luks_open_ro"
31125 #: ../src/guestfs-actions.pod:4659
31129 " guestfs_luks_open_ro (guestfs_h *g,\n"
31130 " const char *device,\n"
31131 " const char *key,\n"
31132 " const char *mapname);\n"
31137 #: ../src/guestfs-actions.pod:4665
31139 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
31144 #: ../src/guestfs-actions.pod:4676
31145 msgid "guestfs_lvcreate"
31149 #: ../src/guestfs-actions.pod:4678
31153 " guestfs_lvcreate (guestfs_h *g,\n"
31154 " const char *logvol,\n"
31155 " const char *volgroup,\n"
31161 #: ../src/guestfs-actions.pod:4691
31162 msgid "guestfs_lvm_canonical_lv_name"
31166 #: ../src/guestfs-actions.pod:4693
31170 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
31171 " const char *lvname);\n"
31176 #: ../src/guestfs-actions.pod:4704
31177 msgid "See also C<guestfs_is_lv>."
31181 #: ../src/guestfs-actions.pod:4709
31182 msgid "(Added in 1.5.24)"
31186 #: ../src/guestfs-actions.pod:4711
31187 msgid "guestfs_lvm_clear_filter"
31191 #: ../src/guestfs-actions.pod:4713
31195 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
31200 #: ../src/guestfs-actions.pod:4716
31202 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
31203 "see every block device."
31207 #: ../src/guestfs-actions.pod:4726
31208 msgid "guestfs_lvm_remove_all"
31212 #: ../src/guestfs-actions.pod:4728
31216 " guestfs_lvm_remove_all (guestfs_h *g);\n"
31221 #: ../src/guestfs-actions.pod:4738
31222 msgid "guestfs_lvm_set_filter"
31226 #: ../src/guestfs-actions.pod:4740
31230 " guestfs_lvm_set_filter (guestfs_h *g,\n"
31231 " char *const *devices);\n"
31236 #: ../src/guestfs-actions.pod:4771
31237 msgid "guestfs_lvremove"
31241 #: ../src/guestfs-actions.pod:4773
31245 " guestfs_lvremove (guestfs_h *g,\n"
31246 " const char *device);\n"
31251 #: ../src/guestfs-actions.pod:4785 ../src/guestfs-actions.pod:6344
31252 #: ../src/guestfs-actions.pod:8304
31253 msgid "(Added in 1.0.13)"
31257 #: ../src/guestfs-actions.pod:4787
31258 msgid "guestfs_lvrename"
31262 #: ../src/guestfs-actions.pod:4789
31266 " guestfs_lvrename (guestfs_h *g,\n"
31267 " const char *logvol,\n"
31268 " const char *newlogvol);\n"
31273 #: ../src/guestfs-actions.pod:4798 ../src/guestfs-actions.pod:8317
31274 msgid "(Added in 1.0.83)"
31278 #: ../src/guestfs-actions.pod:4800
31279 msgid "guestfs_lvresize"
31283 #: ../src/guestfs-actions.pod:4802
31287 " guestfs_lvresize (guestfs_h *g,\n"
31288 " const char *device,\n"
31294 #: ../src/guestfs-actions.pod:4815
31295 msgid "guestfs_lvresize_free"
31299 #: ../src/guestfs-actions.pod:4817
31303 " guestfs_lvresize_free (guestfs_h *g,\n"
31304 " const char *lv,\n"
31310 #: ../src/guestfs-actions.pod:4830
31311 msgid "(Added in 1.3.3)"
31315 #: ../src/guestfs-actions.pod:4832
31316 msgid "guestfs_lvs"
31320 #: ../src/guestfs-actions.pod:4834
31324 " guestfs_lvs (guestfs_h *g);\n"
31329 #: ../src/guestfs-actions.pod:4843
31330 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
31334 #: ../src/guestfs-actions.pod:4851
31335 msgid "guestfs_lvs_full"
31339 #: ../src/guestfs-actions.pod:4853
31342 " struct guestfs_lvm_lv_list *\n"
31343 " guestfs_lvs_full (guestfs_h *g);\n"
31348 #: ../src/guestfs-actions.pod:4859
31350 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
31351 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
31355 #: ../src/guestfs-actions.pod:4865
31356 msgid "guestfs_lvuuid"
31360 #: ../src/guestfs-actions.pod:4867
31364 " guestfs_lvuuid (guestfs_h *g,\n"
31365 " const char *device);\n"
31370 #: ../src/guestfs-actions.pod:4878
31371 msgid "guestfs_lxattrlist"
31375 #: ../src/guestfs-actions.pod:4880
31378 " struct guestfs_xattr_list *\n"
31379 " guestfs_lxattrlist (guestfs_h *g,\n"
31380 " const char *path,\n"
31381 " char *const *names);\n"
31386 #: ../src/guestfs-actions.pod:4899
31388 "This call is intended for programs that want to efficiently list a directory "
31389 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
31390 "a similarly efficient call for getting standard stats. Very long directory "
31391 "listings might cause the protocol message size to be exceeded, causing this "
31392 "call to fail. The caller must split up such requests into smaller groups of "
31397 #: ../src/guestfs-actions.pod:4913
31398 msgid "guestfs_md_create"
31402 #: ../src/guestfs-actions.pod:4915
31406 " guestfs_md_create (guestfs_h *g,\n"
31407 " const char *name,\n"
31408 " char *const *devices,\n"
31414 #: ../src/guestfs-actions.pod:4926
31417 " GUESTFS_MD_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
31418 " GUESTFS_MD_CREATE_NRDEVICES, int nrdevices,\n"
31419 " GUESTFS_MD_CREATE_SPARE, int spare,\n"
31420 " GUESTFS_MD_CREATE_CHUNK, int64_t chunk,\n"
31421 " GUESTFS_MD_CREATE_LEVEL, const char *level,\n"
31426 #: ../src/guestfs-actions.pod:4988
31427 msgid "guestfs_md_create_va"
31431 #: ../src/guestfs-actions.pod:4990
31435 " guestfs_md_create_va (guestfs_h *g,\n"
31436 " const char *name,\n"
31437 " char *const *devices,\n"
31438 " va_list args);\n"
31443 #: ../src/guestfs-actions.pod:4996
31444 msgid "This is the \"va_list variant\" of L</guestfs_md_create>."
31448 #: ../src/guestfs-actions.pod:5000
31449 msgid "guestfs_md_create_argv"
31453 #: ../src/guestfs-actions.pod:5002
31457 " guestfs_md_create_argv (guestfs_h *g,\n"
31458 " const char *name,\n"
31459 " char *const *devices,\n"
31460 " const struct guestfs_md_create_argv *optargs);\n"
31465 #: ../src/guestfs-actions.pod:5008
31466 msgid "This is the \"argv variant\" of L</guestfs_md_create>."
31470 #: ../src/guestfs-actions.pod:5012
31471 msgid "guestfs_md_detail"
31475 #: ../src/guestfs-actions.pod:5014
31479 " guestfs_md_detail (guestfs_h *g,\n"
31480 " const char *md);\n"
31485 #: ../src/guestfs-actions.pod:5051
31486 msgid "guestfs_md_stop"
31490 #: ../src/guestfs-actions.pod:5053
31494 " guestfs_md_stop (guestfs_h *g,\n"
31495 " const char *md);\n"
31500 #: ../src/guestfs-actions.pod:5062
31501 msgid "guestfs_mkdir"
31505 #: ../src/guestfs-actions.pod:5064
31509 " guestfs_mkdir (guestfs_h *g,\n"
31510 " const char *path);\n"
31515 #: ../src/guestfs-actions.pod:5074
31516 msgid "guestfs_mkdir_mode"
31520 #: ../src/guestfs-actions.pod:5076
31524 " guestfs_mkdir_mode (guestfs_h *g,\n"
31525 " const char *path,\n"
31531 #: ../src/guestfs-actions.pod:5088
31532 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
31536 #: ../src/guestfs-actions.pod:5094
31537 msgid "guestfs_mkdir_p"
31541 #: ../src/guestfs-actions.pod:5096
31545 " guestfs_mkdir_p (guestfs_h *g,\n"
31546 " const char *path);\n"
31551 #: ../src/guestfs-actions.pod:5107
31552 msgid "guestfs_mkdtemp"
31556 #: ../src/guestfs-actions.pod:5109
31560 " guestfs_mkdtemp (guestfs_h *g,\n"
31561 " const char *template);\n"
31566 #: ../src/guestfs-actions.pod:5137
31567 msgid "guestfs_mke2fs_J"
31571 #: ../src/guestfs-actions.pod:5139
31575 " guestfs_mke2fs_J (guestfs_h *g,\n"
31576 " const char *fstype,\n"
31577 " int blocksize,\n"
31578 " const char *device,\n"
31579 " const char *journal);\n"
31584 #: ../src/guestfs-actions.pod:5152
31585 msgid "See also C<guestfs_mke2journal>."
31589 #: ../src/guestfs-actions.pod:5156 ../src/guestfs-actions.pod:5174
31590 #: ../src/guestfs-actions.pod:5192 ../src/guestfs-actions.pod:5208
31591 #: ../src/guestfs-actions.pod:5222 ../src/guestfs-actions.pod:5236
31592 #: ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:5572
31593 msgid "(Added in 1.0.68)"
31597 #: ../src/guestfs-actions.pod:5158
31598 msgid "guestfs_mke2fs_JL"
31602 #: ../src/guestfs-actions.pod:5160
31606 " guestfs_mke2fs_JL (guestfs_h *g,\n"
31607 " const char *fstype,\n"
31608 " int blocksize,\n"
31609 " const char *device,\n"
31610 " const char *label);\n"
31615 #: ../src/guestfs-actions.pod:5170
31616 msgid "See also C<guestfs_mke2journal_L>."
31620 #: ../src/guestfs-actions.pod:5176
31621 msgid "guestfs_mke2fs_JU"
31625 #: ../src/guestfs-actions.pod:5178
31629 " guestfs_mke2fs_JU (guestfs_h *g,\n"
31630 " const char *fstype,\n"
31631 " int blocksize,\n"
31632 " const char *device,\n"
31633 " const char *uuid);\n"
31638 #: ../src/guestfs-actions.pod:5188
31639 msgid "See also C<guestfs_mke2journal_U>."
31643 #: ../src/guestfs-actions.pod:5194
31644 msgid "guestfs_mke2journal"
31648 #: ../src/guestfs-actions.pod:5196
31652 " guestfs_mke2journal (guestfs_h *g,\n"
31653 " int blocksize,\n"
31654 " const char *device);\n"
31659 #: ../src/guestfs-actions.pod:5210
31660 msgid "guestfs_mke2journal_L"
31664 #: ../src/guestfs-actions.pod:5212
31668 " guestfs_mke2journal_L (guestfs_h *g,\n"
31669 " int blocksize,\n"
31670 " const char *label,\n"
31671 " const char *device);\n"
31676 #: ../src/guestfs-actions.pod:5224
31677 msgid "guestfs_mke2journal_U"
31681 #: ../src/guestfs-actions.pod:5226
31685 " guestfs_mke2journal_U (guestfs_h *g,\n"
31686 " int blocksize,\n"
31687 " const char *uuid,\n"
31688 " const char *device);\n"
31693 #: ../src/guestfs-actions.pod:5238
31694 msgid "guestfs_mkfifo"
31698 #: ../src/guestfs-actions.pod:5240
31702 " guestfs_mkfifo (guestfs_h *g,\n"
31704 " const char *path);\n"
31709 #: ../src/guestfs-actions.pod:5245
31711 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
31712 "is just a convenient wrapper around C<guestfs_mknod>."
31716 #: ../src/guestfs-actions.pod:5255
31717 msgid "guestfs_mkfs"
31721 #: ../src/guestfs-actions.pod:5257
31725 " guestfs_mkfs (guestfs_h *g,\n"
31726 " const char *fstype,\n"
31727 " const char *device);\n"
31732 #: ../src/guestfs-actions.pod:5270
31733 msgid "guestfs_mkfs_b"
31737 #: ../src/guestfs-actions.pod:5272
31741 " guestfs_mkfs_b (guestfs_h *g,\n"
31742 " const char *fstype,\n"
31743 " int blocksize,\n"
31744 " const char *device);\n"
31749 #: ../src/guestfs-actions.pod:5278
31751 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
31756 #: ../src/guestfs-actions.pod:5285
31758 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
31759 "block size of the resulting filesystem. Supported block sizes depend on the "
31760 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
31764 #: ../src/guestfs-actions.pod:5297
31765 msgid "guestfs_mkfs_opts"
31769 #: ../src/guestfs-actions.pod:5299
31773 " guestfs_mkfs_opts (guestfs_h *g,\n"
31774 " const char *fstype,\n"
31775 " const char *device,\n"
31781 #: ../src/guestfs-actions.pod:5310
31784 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
31785 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
31786 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
31787 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
31792 #: ../src/guestfs-actions.pod:5358
31793 msgid "(Added in 1.7.19)"
31797 #: ../src/guestfs-actions.pod:5360
31798 msgid "guestfs_mkfs_opts_va"
31802 #: ../src/guestfs-actions.pod:5362
31806 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
31807 " const char *fstype,\n"
31808 " const char *device,\n"
31809 " va_list args);\n"
31814 #: ../src/guestfs-actions.pod:5368
31815 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
31819 #: ../src/guestfs-actions.pod:5372
31820 msgid "guestfs_mkfs_opts_argv"
31824 #: ../src/guestfs-actions.pod:5374
31828 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
31829 " const char *fstype,\n"
31830 " const char *device,\n"
31831 " const struct guestfs_mkfs_opts_argv *optargs);\n"
31836 #: ../src/guestfs-actions.pod:5380
31837 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
31841 #: ../src/guestfs-actions.pod:5384
31842 msgid "guestfs_mkmountpoint"
31846 #: ../src/guestfs-actions.pod:5386
31850 " guestfs_mkmountpoint (guestfs_h *g,\n"
31851 " const char *exemptpath);\n"
31856 #: ../src/guestfs-actions.pod:5390
31858 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
31859 "that can be used to create extra mountpoints before mounting the first "
31864 #: ../src/guestfs-actions.pod:5414
31866 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
31867 "may get unexpected errors if you try to mix these calls. It is safest to "
31868 "manually unmount filesystems and remove mountpoints after use."
31872 #: ../src/guestfs-actions.pod:5418
31874 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
31875 "first, so for this to work for manual mountpoints, you must ensure that the "
31876 "innermost mountpoints have the longest pathnames, as in the example code "
31881 #: ../src/guestfs-actions.pod:5425
31883 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
31884 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
31885 "can also trigger these issues."
31889 #: ../src/guestfs-actions.pod:5431 ../src/guestfs-actions.pod:5737
31890 #: ../src/guestfs-actions.pod:6764
31891 msgid "(Added in 1.0.62)"
31895 #: ../src/guestfs-actions.pod:5433
31896 msgid "guestfs_mknod"
31900 #: ../src/guestfs-actions.pod:5435
31904 " guestfs_mknod (guestfs_h *g,\n"
31908 " const char *path);\n"
31913 #: ../src/guestfs-actions.pod:5450
31915 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
31916 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
31917 "regular file). These constants are available in the standard Linux header "
31918 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
31919 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
31920 "the appropriate constant for you."
31924 #: ../src/guestfs-actions.pod:5464
31925 msgid "guestfs_mknod_b"
31929 #: ../src/guestfs-actions.pod:5466
31933 " guestfs_mknod_b (guestfs_h *g,\n"
31937 " const char *path);\n"
31942 #: ../src/guestfs-actions.pod:5473
31944 "This call creates a block device node called C<path> with mode C<mode> and "
31945 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
31946 "wrapper around C<guestfs_mknod>."
31950 #: ../src/guestfs-actions.pod:5483
31951 msgid "guestfs_mknod_c"
31955 #: ../src/guestfs-actions.pod:5485
31959 " guestfs_mknod_c (guestfs_h *g,\n"
31963 " const char *path);\n"
31968 #: ../src/guestfs-actions.pod:5492
31970 "This call creates a char device node called C<path> with mode C<mode> and "
31971 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
31972 "wrapper around C<guestfs_mknod>."
31976 #: ../src/guestfs-actions.pod:5502
31977 msgid "guestfs_mkswap"
31981 #: ../src/guestfs-actions.pod:5504
31985 " guestfs_mkswap (guestfs_h *g,\n"
31986 " const char *device);\n"
31991 #: ../src/guestfs-actions.pod:5514
31992 msgid "guestfs_mkswap_L"
31996 #: ../src/guestfs-actions.pod:5516
32000 " guestfs_mkswap_L (guestfs_h *g,\n"
32001 " const char *label,\n"
32002 " const char *device);\n"
32007 #: ../src/guestfs-actions.pod:5531
32008 msgid "guestfs_mkswap_U"
32012 #: ../src/guestfs-actions.pod:5533
32016 " guestfs_mkswap_U (guestfs_h *g,\n"
32017 " const char *uuid,\n"
32018 " const char *device);\n"
32023 #: ../src/guestfs-actions.pod:5544
32024 msgid "guestfs_mkswap_file"
32028 #: ../src/guestfs-actions.pod:5546
32032 " guestfs_mkswap_file (guestfs_h *g,\n"
32033 " const char *path);\n"
32038 #: ../src/guestfs-actions.pod:5552
32040 "This command just writes a swap file signature to an existing file. To "
32041 "create the file itself, use something like C<guestfs_fallocate>."
32045 #: ../src/guestfs-actions.pod:5559
32046 msgid "guestfs_modprobe"
32050 #: ../src/guestfs-actions.pod:5561
32054 " guestfs_modprobe (guestfs_h *g,\n"
32055 " const char *modulename);\n"
32060 #: ../src/guestfs-actions.pod:5574
32061 msgid "guestfs_mount"
32065 #: ../src/guestfs-actions.pod:5576
32069 " guestfs_mount (guestfs_h *g,\n"
32070 " const char *device,\n"
32071 " const char *mountpoint);\n"
32076 #: ../src/guestfs-actions.pod:5595
32078 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
32079 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
32080 "problems for users. If your program might need to work with older versions "
32081 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
32082 "for the first parameter if you don't want any options)."
32086 #: ../src/guestfs-actions.pod:5606
32087 msgid "guestfs_mount_9p"
32091 #: ../src/guestfs-actions.pod:5608
32095 " guestfs_mount_9p (guestfs_h *g,\n"
32096 " const char *mounttag,\n"
32097 " const char *mountpoint,\n"
32103 #: ../src/guestfs-actions.pod:5619
32106 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
32111 #: ../src/guestfs-actions.pod:5632
32112 msgid "guestfs_mount_9p_va"
32116 #: ../src/guestfs-actions.pod:5634
32120 " guestfs_mount_9p_va (guestfs_h *g,\n"
32121 " const char *mounttag,\n"
32122 " const char *mountpoint,\n"
32123 " va_list args);\n"
32128 #: ../src/guestfs-actions.pod:5640
32129 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
32133 #: ../src/guestfs-actions.pod:5644
32134 msgid "guestfs_mount_9p_argv"
32138 #: ../src/guestfs-actions.pod:5646
32142 " guestfs_mount_9p_argv (guestfs_h *g,\n"
32143 " const char *mounttag,\n"
32144 " const char *mountpoint,\n"
32145 " const struct guestfs_mount_9p_argv *optargs);\n"
32150 #: ../src/guestfs-actions.pod:5652
32151 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
32155 #: ../src/guestfs-actions.pod:5656
32156 msgid "guestfs_mount_loop"
32160 #: ../src/guestfs-actions.pod:5658
32164 " guestfs_mount_loop (guestfs_h *g,\n"
32165 " const char *file,\n"
32166 " const char *mountpoint);\n"
32171 #: ../src/guestfs-actions.pod:5671
32172 msgid "guestfs_mount_options"
32176 #: ../src/guestfs-actions.pod:5673
32180 " guestfs_mount_options (guestfs_h *g,\n"
32181 " const char *options,\n"
32182 " const char *device,\n"
32183 " const char *mountpoint);\n"
32188 #: ../src/guestfs-actions.pod:5679
32190 "This is the same as the C<guestfs_mount> command, but it allows you to set "
32191 "the mount options as for the L<mount(8)> I<-o> flag."
32195 #: ../src/guestfs-actions.pod:5689 ../src/guestfs-actions.pod:5703
32196 #: ../src/guestfs-actions.pod:5720
32197 msgid "(Added in 1.0.10)"
32201 #: ../src/guestfs-actions.pod:5691
32202 msgid "guestfs_mount_ro"
32206 #: ../src/guestfs-actions.pod:5693
32210 " guestfs_mount_ro (guestfs_h *g,\n"
32211 " const char *device,\n"
32212 " const char *mountpoint);\n"
32217 #: ../src/guestfs-actions.pod:5698
32219 "This is the same as the C<guestfs_mount> command, but it mounts the "
32220 "filesystem with the read-only (I<-o ro>) flag."
32224 #: ../src/guestfs-actions.pod:5705
32225 msgid "guestfs_mount_vfs"
32229 #: ../src/guestfs-actions.pod:5707
32233 " guestfs_mount_vfs (guestfs_h *g,\n"
32234 " const char *options,\n"
32235 " const char *vfstype,\n"
32236 " const char *device,\n"
32237 " const char *mountpoint);\n"
32242 #: ../src/guestfs-actions.pod:5714
32244 "This is the same as the C<guestfs_mount> command, but it allows you to set "
32245 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
32250 #: ../src/guestfs-actions.pod:5722
32251 msgid "guestfs_mountpoints"
32255 #: ../src/guestfs-actions.pod:5724
32259 " guestfs_mountpoints (guestfs_h *g);\n"
32264 #: ../src/guestfs-actions.pod:5727
32266 "This call is similar to C<guestfs_mounts>. That call returns a list of "
32267 "devices. This one returns a hash table (map) of device name to directory "
32268 "where the device is mounted."
32272 #: ../src/guestfs-actions.pod:5739
32273 msgid "guestfs_mounts"
32277 #: ../src/guestfs-actions.pod:5741
32281 " guestfs_mounts (guestfs_h *g);\n"
32286 #: ../src/guestfs-actions.pod:5749
32287 msgid "See also: C<guestfs_mountpoints>"
32291 #: ../src/guestfs-actions.pod:5757
32296 #: ../src/guestfs-actions.pod:5759
32300 " guestfs_mv (guestfs_h *g,\n"
32301 " const char *src,\n"
32302 " const char *dest);\n"
32307 #: ../src/guestfs-actions.pod:5771
32308 msgid "guestfs_ntfs_3g_probe"
32312 #: ../src/guestfs-actions.pod:5773
32316 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
32318 " const char *device);\n"
32323 #: ../src/guestfs-actions.pod:5792
32324 msgid "(Added in 1.0.43)"
32328 #: ../src/guestfs-actions.pod:5794
32329 msgid "guestfs_ntfsresize"
32333 #: ../src/guestfs-actions.pod:5796
32337 " guestfs_ntfsresize (guestfs_h *g,\n"
32338 " const char *device);\n"
32343 #: ../src/guestfs-actions.pod:5800 ../src/guestfs-actions.pod:5900
32345 "I<This function is deprecated.> In new code, use the L</"
32346 "guestfs_ntfsresize_opts> call instead."
32350 #: ../src/guestfs-actions.pod:5824
32351 msgid "guestfs_ntfsresize_opts"
32355 #: ../src/guestfs-actions.pod:5826
32359 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
32360 " const char *device,\n"
32366 #: ../src/guestfs-actions.pod:5836
32369 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
32370 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
32375 #: ../src/guestfs-actions.pod:5856
32377 "After the resize operation, the filesystem is always marked as requiring a "
32378 "consistency check (for safety). You have to boot into Windows to perform "
32379 "this check and clear this condition. If you I<don't> set the C<force> "
32380 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
32381 "times on a single filesystem without booting into Windows between each "
32386 #: ../src/guestfs-actions.pod:5871
32387 msgid "guestfs_ntfsresize_opts_va"
32391 #: ../src/guestfs-actions.pod:5873
32395 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
32396 " const char *device,\n"
32397 " va_list args);\n"
32402 #: ../src/guestfs-actions.pod:5878
32403 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
32407 #: ../src/guestfs-actions.pod:5882
32408 msgid "guestfs_ntfsresize_opts_argv"
32412 #: ../src/guestfs-actions.pod:5884
32416 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
32417 " const char *device,\n"
32418 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
32423 #: ../src/guestfs-actions.pod:5889
32424 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
32428 #: ../src/guestfs-actions.pod:5893
32429 msgid "guestfs_ntfsresize_size"
32433 #: ../src/guestfs-actions.pod:5895
32437 " guestfs_ntfsresize_size (guestfs_h *g,\n"
32438 " const char *device,\n"
32439 " int64_t size);\n"
32444 #: ../src/guestfs-actions.pod:5907
32446 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
32447 "to specify the new size (in bytes) explicitly."
32451 #: ../src/guestfs-actions.pod:5912 ../src/guestfs-actions.pod:6371
32452 #: ../src/guestfs-actions.pod:6444 ../src/guestfs-actions.pod:6712
32453 #: ../src/guestfs-actions.pod:8461
32454 msgid "(Added in 1.3.14)"
32458 #: ../src/guestfs-actions.pod:5914
32459 msgid "guestfs_part_add"
32463 #: ../src/guestfs-actions.pod:5916
32467 " guestfs_part_add (guestfs_h *g,\n"
32468 " const char *device,\n"
32469 " const char *prlogex,\n"
32470 " int64_t startsect,\n"
32471 " int64_t endsect);\n"
32476 #: ../src/guestfs-actions.pod:5923
32478 "This command adds a partition to C<device>. If there is no partition table "
32479 "on the device, call C<guestfs_part_init> first."
32483 #: ../src/guestfs-actions.pod:5935
32485 "Creating a partition which covers the whole disk is not so easy. Use "
32486 "C<guestfs_part_disk> to do that."
32490 #: ../src/guestfs-actions.pod:5940 ../src/guestfs-actions.pod:5975
32491 #: ../src/guestfs-actions.pod:6028 ../src/guestfs-actions.pod:6112
32492 #: ../src/guestfs-actions.pod:6150 ../src/guestfs-actions.pod:6169
32493 #: ../src/guestfs-actions.pod:6209
32494 msgid "(Added in 1.0.78)"
32498 #: ../src/guestfs-actions.pod:5942
32499 msgid "guestfs_part_del"
32503 #: ../src/guestfs-actions.pod:5944
32507 " guestfs_part_del (guestfs_h *g,\n"
32508 " const char *device,\n"
32514 #: ../src/guestfs-actions.pod:5959
32515 msgid "guestfs_part_disk"
32519 #: ../src/guestfs-actions.pod:5961
32523 " guestfs_part_disk (guestfs_h *g,\n"
32524 " const char *device,\n"
32525 " const char *parttype);\n"
32530 #: ../src/guestfs-actions.pod:5966
32532 "This command is simply a combination of C<guestfs_part_init> followed by "
32533 "C<guestfs_part_add> to create a single primary partition covering the whole "
32538 #: ../src/guestfs-actions.pod:5970
32540 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
32541 "possible values are described in C<guestfs_part_init>."
32545 #: ../src/guestfs-actions.pod:5977
32546 msgid "guestfs_part_get_bootable"
32550 #: ../src/guestfs-actions.pod:5979
32554 " guestfs_part_get_bootable (guestfs_h *g,\n"
32555 " const char *device,\n"
32561 #: ../src/guestfs-actions.pod:5987
32562 msgid "See also C<guestfs_part_set_bootable>."
32566 #: ../src/guestfs-actions.pod:5993
32567 msgid "guestfs_part_get_mbr_id"
32571 #: ../src/guestfs-actions.pod:5995
32575 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
32576 " const char *device,\n"
32582 #: ../src/guestfs-actions.pod:6003 ../src/guestfs-actions.pod:6185
32584 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
32585 "undefined results for other partition table types (see "
32586 "C<guestfs_part_get_parttype>)."
32590 #: ../src/guestfs-actions.pod:6011
32591 msgid "guestfs_part_get_parttype"
32595 #: ../src/guestfs-actions.pod:6013
32599 " guestfs_part_get_parttype (guestfs_h *g,\n"
32600 " const char *device);\n"
32605 #: ../src/guestfs-actions.pod:6020
32607 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
32608 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
32609 "possible, although unusual. See C<guestfs_part_init> for a full list."
32613 #: ../src/guestfs-actions.pod:6030
32614 msgid "guestfs_part_init"
32618 #: ../src/guestfs-actions.pod:6032
32622 " guestfs_part_init (guestfs_h *g,\n"
32623 " const char *device,\n"
32624 " const char *parttype);\n"
32629 #: ../src/guestfs-actions.pod:6041
32631 "Initially there are no partitions. Following this, you should call "
32632 "C<guestfs_part_add> for each partition required."
32636 #: ../src/guestfs-actions.pod:6114
32637 msgid "guestfs_part_list"
32641 #: ../src/guestfs-actions.pod:6116
32644 " struct guestfs_partition_list *\n"
32645 " guestfs_part_list (guestfs_h *g,\n"
32646 " const char *device);\n"
32651 #: ../src/guestfs-actions.pod:6133
32653 "Start of the partition I<in bytes>. To get sectors you have to divide by "
32654 "the device's sector size, see C<guestfs_blockdev_getss>."
32658 #: ../src/guestfs-actions.pod:6146
32660 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
32661 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
32666 #: ../src/guestfs-actions.pod:6152
32667 msgid "guestfs_part_set_bootable"
32671 #: ../src/guestfs-actions.pod:6154
32675 " guestfs_part_set_bootable (guestfs_h *g,\n"
32676 " const char *device,\n"
32678 " int bootable);\n"
32683 #: ../src/guestfs-actions.pod:6171
32684 msgid "guestfs_part_set_mbr_id"
32688 #: ../src/guestfs-actions.pod:6173
32692 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
32693 " const char *device,\n"
32700 #: ../src/guestfs-actions.pod:6193
32701 msgid "guestfs_part_set_name"
32705 #: ../src/guestfs-actions.pod:6195
32709 " guestfs_part_set_name (guestfs_h *g,\n"
32710 " const char *device,\n"
32712 " const char *name);\n"
32717 #: ../src/guestfs-actions.pod:6211
32718 msgid "guestfs_part_to_dev"
32722 #: ../src/guestfs-actions.pod:6213
32726 " guestfs_part_to_dev (guestfs_h *g,\n"
32727 " const char *partition);\n"
32732 #: ../src/guestfs-actions.pod:6221 ../src/guestfs-actions.pod:6240
32734 "The named partition must exist, for example as a string returned from "
32735 "C<guestfs_list_partitions>."
32739 #: ../src/guestfs-actions.pod:6224
32740 msgid "See also C<guestfs_part_to_partnum>."
32744 #: ../src/guestfs-actions.pod:6231
32745 msgid "guestfs_part_to_partnum"
32749 #: ../src/guestfs-actions.pod:6233
32753 " guestfs_part_to_partnum (guestfs_h *g,\n"
32754 " const char *partition);\n"
32759 #: ../src/guestfs-actions.pod:6243
32760 msgid "See also C<guestfs_part_to_dev>."
32764 #: ../src/guestfs-actions.pod:6249
32765 msgid "guestfs_ping_daemon"
32769 #: ../src/guestfs-actions.pod:6251
32773 " guestfs_ping_daemon (guestfs_h *g);\n"
32778 #: ../src/guestfs-actions.pod:6263
32779 msgid "guestfs_pread"
32783 #: ../src/guestfs-actions.pod:6265
32787 " guestfs_pread (guestfs_h *g,\n"
32788 " const char *path,\n"
32790 " int64_t offset,\n"
32791 " size_t *size_r);\n"
32796 #: ../src/guestfs-actions.pod:6278
32797 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
32801 #: ../src/guestfs-actions.pod:6289
32802 msgid "guestfs_pread_device"
32806 #: ../src/guestfs-actions.pod:6291
32810 " guestfs_pread_device (guestfs_h *g,\n"
32811 " const char *device,\n"
32813 " int64_t offset,\n"
32814 " size_t *size_r);\n"
32819 #: ../src/guestfs-actions.pod:6304
32820 msgid "See also C<guestfs_pread>."
32824 #: ../src/guestfs-actions.pod:6313
32825 msgid "(Added in 1.5.21)"
32829 #: ../src/guestfs-actions.pod:6315
32830 msgid "guestfs_pvcreate"
32834 #: ../src/guestfs-actions.pod:6317
32838 " guestfs_pvcreate (guestfs_h *g,\n"
32839 " const char *device);\n"
32844 #: ../src/guestfs-actions.pod:6329
32845 msgid "guestfs_pvremove"
32849 #: ../src/guestfs-actions.pod:6331
32853 " guestfs_pvremove (guestfs_h *g,\n"
32854 " const char *device);\n"
32859 #: ../src/guestfs-actions.pod:6346
32860 msgid "guestfs_pvresize"
32864 #: ../src/guestfs-actions.pod:6348
32868 " guestfs_pvresize (guestfs_h *g,\n"
32869 " const char *device);\n"
32874 #: ../src/guestfs-actions.pod:6359
32875 msgid "guestfs_pvresize_size"
32879 #: ../src/guestfs-actions.pod:6361
32883 " guestfs_pvresize_size (guestfs_h *g,\n"
32884 " const char *device,\n"
32885 " int64_t size);\n"
32890 #: ../src/guestfs-actions.pod:6366
32892 "This command is the same as C<guestfs_pvresize> except that it allows you to "
32893 "specify the new size (in bytes) explicitly."
32897 #: ../src/guestfs-actions.pod:6373
32898 msgid "guestfs_pvs"
32902 #: ../src/guestfs-actions.pod:6375
32906 " guestfs_pvs (guestfs_h *g);\n"
32911 #: ../src/guestfs-actions.pod:6384
32912 msgid "See also C<guestfs_pvs_full>."
32916 #: ../src/guestfs-actions.pod:6392
32917 msgid "guestfs_pvs_full"
32921 #: ../src/guestfs-actions.pod:6394
32924 " struct guestfs_lvm_pv_list *\n"
32925 " guestfs_pvs_full (guestfs_h *g);\n"
32930 #: ../src/guestfs-actions.pod:6400
32932 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
32933 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
32937 #: ../src/guestfs-actions.pod:6406
32938 msgid "guestfs_pvuuid"
32942 #: ../src/guestfs-actions.pod:6408
32946 " guestfs_pvuuid (guestfs_h *g,\n"
32947 " const char *device);\n"
32952 #: ../src/guestfs-actions.pod:6419
32953 msgid "guestfs_pwrite"
32957 #: ../src/guestfs-actions.pod:6421
32961 " guestfs_pwrite (guestfs_h *g,\n"
32962 " const char *path,\n"
32963 " const char *content,\n"
32964 " size_t content_size,\n"
32965 " int64_t offset);\n"
32970 #: ../src/guestfs-actions.pod:6437
32971 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
32975 #: ../src/guestfs-actions.pod:6446
32976 msgid "guestfs_pwrite_device"
32980 #: ../src/guestfs-actions.pod:6448
32984 " guestfs_pwrite_device (guestfs_h *g,\n"
32985 " const char *device,\n"
32986 " const char *content,\n"
32987 " size_t content_size,\n"
32988 " int64_t offset);\n"
32993 #: ../src/guestfs-actions.pod:6463
32994 msgid "See also C<guestfs_pwrite>."
32998 #: ../src/guestfs-actions.pod:6470
32999 msgid "(Added in 1.5.20)"
33003 #: ../src/guestfs-actions.pod:6472
33004 msgid "guestfs_read_file"
33008 #: ../src/guestfs-actions.pod:6474
33012 " guestfs_read_file (guestfs_h *g,\n"
33013 " const char *path,\n"
33014 " size_t *size_r);\n"
33019 #: ../src/guestfs-actions.pod:6482
33021 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
33022 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
33023 "function is limited in the total size of file that can be handled."
33027 #: ../src/guestfs-actions.pod:6494
33028 msgid "(Added in 1.0.63)"
33032 #: ../src/guestfs-actions.pod:6496
33033 msgid "guestfs_read_lines"
33037 #: ../src/guestfs-actions.pod:6498
33041 " guestfs_read_lines (guestfs_h *g,\n"
33042 " const char *path);\n"
33047 #: ../src/guestfs-actions.pod:6507
33049 "Note that this function cannot correctly handle binary files (specifically, "
33050 "files containing C<\\0> character which is treated as end of line). For "
33051 "those you need to use the C<guestfs_read_file> function which has a more "
33052 "complex interface."
33056 #: ../src/guestfs-actions.pod:6518
33057 msgid "guestfs_readdir"
33061 #: ../src/guestfs-actions.pod:6520
33064 " struct guestfs_dirent_list *\n"
33065 " guestfs_readdir (guestfs_h *g,\n"
33066 " const char *dir);\n"
33071 #: ../src/guestfs-actions.pod:6574
33073 "This function is primarily intended for use by programs. To get a simple "
33074 "list of names, use C<guestfs_ls>. To get a printable directory for human "
33075 "consumption, use C<guestfs_ll>."
33079 #: ../src/guestfs-actions.pod:6578
33081 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
33082 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
33086 #: ../src/guestfs-actions.pod:6584
33087 msgid "guestfs_readlink"
33091 #: ../src/guestfs-actions.pod:6586
33095 " guestfs_readlink (guestfs_h *g,\n"
33096 " const char *path);\n"
33101 #: ../src/guestfs-actions.pod:6597
33102 msgid "guestfs_readlinklist"
33106 #: ../src/guestfs-actions.pod:6599
33110 " guestfs_readlinklist (guestfs_h *g,\n"
33111 " const char *path,\n"
33112 " char *const *names);\n"
33117 #: ../src/guestfs-actions.pod:6632
33118 msgid "guestfs_realpath"
33122 #: ../src/guestfs-actions.pod:6634
33126 " guestfs_realpath (guestfs_h *g,\n"
33127 " const char *path);\n"
33132 #: ../src/guestfs-actions.pod:6646
33133 msgid "guestfs_removexattr"
33137 #: ../src/guestfs-actions.pod:6648
33141 " guestfs_removexattr (guestfs_h *g,\n"
33142 " const char *xattr,\n"
33143 " const char *path);\n"
33148 #: ../src/guestfs-actions.pod:6656
33149 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
33153 #: ../src/guestfs-actions.pod:6662
33154 msgid "guestfs_resize2fs"
33158 #: ../src/guestfs-actions.pod:6664
33162 " guestfs_resize2fs (guestfs_h *g,\n"
33163 " const char *device);\n"
33168 #: ../src/guestfs-actions.pod:6671
33170 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
33171 "C<device> before calling this command. For unknown reasons C<resize2fs> "
33172 "sometimes gives an error about this and sometimes not. In any case, it is "
33173 "always safe to call C<guestfs_e2fsck_f> before calling this function."
33177 #: ../src/guestfs-actions.pod:6681
33178 msgid "guestfs_resize2fs_M"
33182 #: ../src/guestfs-actions.pod:6683
33186 " guestfs_resize2fs_M (guestfs_h *g,\n"
33187 " const char *device);\n"
33192 #: ../src/guestfs-actions.pod:6687
33194 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
33195 "resized to its minimum size. This works like the I<-M> option to the "
33196 "C<resize2fs> command."
33200 #: ../src/guestfs-actions.pod:6691
33202 "To get the resulting size of the filesystem you should call "
33203 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
33204 "These two numbers, multiplied together, give the resulting size of the "
33205 "minimal filesystem in bytes."
33209 #: ../src/guestfs-actions.pod:6700
33210 msgid "guestfs_resize2fs_size"
33214 #: ../src/guestfs-actions.pod:6702
33218 " guestfs_resize2fs_size (guestfs_h *g,\n"
33219 " const char *device,\n"
33220 " int64_t size);\n"
33225 #: ../src/guestfs-actions.pod:6707
33227 "This command is the same as C<guestfs_resize2fs> except that it allows you "
33228 "to specify the new size (in bytes) explicitly."
33232 #: ../src/guestfs-actions.pod:6714
33237 #: ../src/guestfs-actions.pod:6716
33241 " guestfs_rm (guestfs_h *g,\n"
33242 " const char *path);\n"
33247 #: ../src/guestfs-actions.pod:6726
33248 msgid "guestfs_rm_rf"
33252 #: ../src/guestfs-actions.pod:6728
33256 " guestfs_rm_rf (guestfs_h *g,\n"
33257 " const char *path);\n"
33262 #: ../src/guestfs-actions.pod:6740
33263 msgid "guestfs_rmdir"
33267 #: ../src/guestfs-actions.pod:6742
33271 " guestfs_rmdir (guestfs_h *g,\n"
33272 " const char *path);\n"
33277 #: ../src/guestfs-actions.pod:6752
33278 msgid "guestfs_rmmountpoint"
33282 #: ../src/guestfs-actions.pod:6754
33286 " guestfs_rmmountpoint (guestfs_h *g,\n"
33287 " const char *exemptpath);\n"
33292 #: ../src/guestfs-actions.pod:6758
33294 "This calls removes a mountpoint that was previously created with "
33295 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
33299 #: ../src/guestfs-actions.pod:6766
33300 msgid "guestfs_scrub_device"
33304 #: ../src/guestfs-actions.pod:6768
33308 " guestfs_scrub_device (guestfs_h *g,\n"
33309 " const char *device);\n"
33314 #: ../src/guestfs-actions.pod:6780 ../src/guestfs-actions.pod:6798
33315 #: ../src/guestfs-actions.pod:6817
33316 msgid "(Added in 1.0.52)"
33320 #: ../src/guestfs-actions.pod:6782
33321 msgid "guestfs_scrub_file"
33325 #: ../src/guestfs-actions.pod:6784
33329 " guestfs_scrub_file (guestfs_h *g,\n"
33330 " const char *file);\n"
33335 #: ../src/guestfs-actions.pod:6800
33336 msgid "guestfs_scrub_freespace"
33340 #: ../src/guestfs-actions.pod:6802
33344 " guestfs_scrub_freespace (guestfs_h *g,\n"
33345 " const char *dir);\n"
33350 #: ../src/guestfs-actions.pod:6806
33352 "This command creates the directory C<dir> and then fills it with files until "
33353 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
33354 "and deletes them. The intention is to scrub any free space on the partition "
33355 "containing C<dir>."
33359 #: ../src/guestfs-actions.pod:6819
33360 msgid "guestfs_set_append"
33364 #: ../src/guestfs-actions.pod:6821
33368 " guestfs_set_append (guestfs_h *g,\n"
33369 " const char *append);\n"
33374 #: ../src/guestfs-actions.pod:6838
33375 msgid "guestfs_set_attach_method"
33379 #: ../src/guestfs-actions.pod:6840
33383 " guestfs_set_attach_method (guestfs_h *g,\n"
33384 " const char *attachmethod);\n"
33389 #: ../src/guestfs-actions.pod:6868
33390 msgid "guestfs_set_autosync"
33394 #: ../src/guestfs-actions.pod:6870
33398 " guestfs_set_autosync (guestfs_h *g,\n"
33399 " int autosync);\n"
33404 #: ../src/guestfs-actions.pod:6886
33405 msgid "guestfs_set_direct"
33409 #: ../src/guestfs-actions.pod:6888
33413 " guestfs_set_direct (guestfs_h *g,\n"
33419 #: ../src/guestfs-actions.pod:6896
33421 "One consequence of this is that log messages aren't caught by the library "
33422 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
33427 #: ../src/guestfs-actions.pod:6909
33428 msgid "guestfs_set_e2label"
33432 #: ../src/guestfs-actions.pod:6911
33436 " guestfs_set_e2label (guestfs_h *g,\n"
33437 " const char *device,\n"
33438 " const char *label);\n"
33443 #: ../src/guestfs-actions.pod:6920
33445 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
33446 "the existing label on a filesystem."
33450 #: ../src/guestfs-actions.pod:6927
33451 msgid "guestfs_set_e2uuid"
33455 #: ../src/guestfs-actions.pod:6929
33459 " guestfs_set_e2uuid (guestfs_h *g,\n"
33460 " const char *device,\n"
33461 " const char *uuid);\n"
33466 #: ../src/guestfs-actions.pod:6939
33468 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
33469 "the existing UUID of a filesystem."
33473 #: ../src/guestfs-actions.pod:6946
33474 msgid "guestfs_set_memsize"
33478 #: ../src/guestfs-actions.pod:6948
33482 " guestfs_set_memsize (guestfs_h *g,\n"
33488 #: ../src/guestfs-actions.pod:6952
33490 "This sets the memory size in megabytes allocated to the qemu subprocess. "
33491 "This only has any effect if called before C<guestfs_launch>."
33495 #: ../src/guestfs-actions.pod:6967
33496 msgid "guestfs_set_network"
33500 #: ../src/guestfs-actions.pod:6969
33504 " guestfs_set_network (guestfs_h *g,\n"
33510 #: ../src/guestfs-actions.pod:6979
33512 "You must call this before calling C<guestfs_launch>, otherwise it has no "
33517 #: ../src/guestfs-actions.pod:6986
33518 msgid "guestfs_set_path"
33522 #: ../src/guestfs-actions.pod:6988
33526 " guestfs_set_path (guestfs_h *g,\n"
33527 " const char *searchpath);\n"
33532 #: ../src/guestfs-actions.pod:7003
33533 msgid "guestfs_set_pgroup"
33537 #: ../src/guestfs-actions.pod:7005
33541 " guestfs_set_pgroup (guestfs_h *g,\n"
33547 #: ../src/guestfs-actions.pod:7022
33548 msgid "guestfs_set_qemu"
33552 #: ../src/guestfs-actions.pod:7024
33556 " guestfs_set_qemu (guestfs_h *g,\n"
33557 " const char *qemu);\n"
33562 #: ../src/guestfs-actions.pod:7050
33563 msgid "guestfs_set_recovery_proc"
33567 #: ../src/guestfs-actions.pod:7052
33571 " guestfs_set_recovery_proc (guestfs_h *g,\n"
33572 " int recoveryproc);\n"
33577 #: ../src/guestfs-actions.pod:7056
33579 "If this is called with the parameter C<false> then C<guestfs_launch> does "
33580 "not create a recovery process. The purpose of the recovery process is to "
33581 "stop runaway qemu processes in the case where the main program aborts "
33586 #: ../src/guestfs-actions.pod:7061
33588 "This only has any effect if called before C<guestfs_launch>, and the default "
33593 #: ../src/guestfs-actions.pod:7074
33594 msgid "guestfs_set_selinux"
33598 #: ../src/guestfs-actions.pod:7076
33602 " guestfs_set_selinux (guestfs_h *g,\n"
33608 #: ../src/guestfs-actions.pod:7093
33609 msgid "guestfs_set_smp"
33613 #: ../src/guestfs-actions.pod:7095
33617 " guestfs_set_smp (guestfs_h *g,\n"
33623 #: ../src/guestfs-actions.pod:7103
33624 msgid "This function must be called before C<guestfs_launch>."
33628 #: ../src/guestfs-actions.pod:7109
33629 msgid "guestfs_set_trace"
33633 #: ../src/guestfs-actions.pod:7111
33637 " guestfs_set_trace (guestfs_h *g,\n"
33643 #: ../src/guestfs-actions.pod:7125
33645 "Trace messages are normally sent to C<stderr>, unless you register a "
33646 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
33650 #: ../src/guestfs-actions.pod:7133
33651 msgid "guestfs_set_verbose"
33655 #: ../src/guestfs-actions.pod:7135
33659 " guestfs_set_verbose (guestfs_h *g,\n"
33665 #: ../src/guestfs-actions.pod:7144
33667 "Verbose messages are normally sent to C<stderr>, unless you register a "
33668 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
33672 #: ../src/guestfs-actions.pod:7152
33673 msgid "guestfs_setcon"
33677 #: ../src/guestfs-actions.pod:7154
33681 " guestfs_setcon (guestfs_h *g,\n"
33682 " const char *context);\n"
33687 #: ../src/guestfs-actions.pod:7167
33688 msgid "guestfs_setxattr"
33692 #: ../src/guestfs-actions.pod:7169
33696 " guestfs_setxattr (guestfs_h *g,\n"
33697 " const char *xattr,\n"
33698 " const char *val,\n"
33700 " const char *path);\n"
33705 #: ../src/guestfs-actions.pod:7180
33706 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
33710 #: ../src/guestfs-actions.pod:7186
33711 msgid "guestfs_sfdisk"
33715 #: ../src/guestfs-actions.pod:7188
33719 " guestfs_sfdisk (guestfs_h *g,\n"
33720 " const char *device,\n"
33724 " char *const *lines);\n"
33729 #: ../src/guestfs-actions.pod:7196 ../src/guestfs-actions.pod:7237
33730 #: ../src/guestfs-actions.pod:7268
33732 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
33737 #: ../src/guestfs-actions.pod:7223
33739 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
33743 #: ../src/guestfs-actions.pod:7230
33744 msgid "guestfs_sfdiskM"
33748 #: ../src/guestfs-actions.pod:7232
33752 " guestfs_sfdiskM (guestfs_h *g,\n"
33753 " const char *device,\n"
33754 " char *const *lines);\n"
33759 #: ../src/guestfs-actions.pod:7244
33761 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
33762 "partition sizes are specified in megabytes only (rounded to the nearest "
33763 "cylinder) and you don't need to specify the cyls, heads and sectors "
33764 "parameters which were rarely if ever used anyway."
33768 #: ../src/guestfs-actions.pod:7250
33770 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
33771 "C<guestfs_part_disk>"
33775 #: ../src/guestfs-actions.pod:7257
33776 msgid "guestfs_sfdisk_N"
33780 #: ../src/guestfs-actions.pod:7259
33784 " guestfs_sfdisk_N (guestfs_h *g,\n"
33785 " const char *device,\n"
33790 " const char *line);\n"
33795 #: ../src/guestfs-actions.pod:7278
33797 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
33798 "for the cyls/heads/sectors parameters."
33802 #: ../src/guestfs-actions.pod:7281
33803 msgid "See also: C<guestfs_part_add>"
33807 #: ../src/guestfs-actions.pod:7287
33808 msgid "guestfs_sfdisk_disk_geometry"
33812 #: ../src/guestfs-actions.pod:7289
33816 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
33817 " const char *device);\n"
33822 #: ../src/guestfs-actions.pod:7293
33824 "This displays the disk geometry of C<device> read from the partition table. "
33825 "Especially in the case where the underlying block device has been resized, "
33826 "this can be different from the kernel's idea of the geometry (see "
33827 "C<guestfs_sfdisk_kernel_geometry>)."
33831 #: ../src/guestfs-actions.pod:7306
33832 msgid "guestfs_sfdisk_kernel_geometry"
33836 #: ../src/guestfs-actions.pod:7308
33840 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
33841 " const char *device);\n"
33846 #: ../src/guestfs-actions.pod:7322
33847 msgid "guestfs_sfdisk_l"
33851 #: ../src/guestfs-actions.pod:7324
33855 " guestfs_sfdisk_l (guestfs_h *g,\n"
33856 " const char *device);\n"
33861 #: ../src/guestfs-actions.pod:7328
33863 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
33868 #: ../src/guestfs-actions.pod:7339
33869 msgid "See also: C<guestfs_part_list>"
33873 #: ../src/guestfs-actions.pod:7346
33878 #: ../src/guestfs-actions.pod:7348
33882 " guestfs_sh (guestfs_h *g,\n"
33883 " const char *command);\n"
33888 #: ../src/guestfs-actions.pod:7355
33889 msgid "This is like C<guestfs_command>, but passes the command to:"
33893 #: ../src/guestfs-actions.pod:7363
33894 msgid "All the provisos about C<guestfs_command> apply to this call."
33898 #: ../src/guestfs-actions.pod:7370
33899 msgid "guestfs_sh_lines"
33903 #: ../src/guestfs-actions.pod:7372
33907 " guestfs_sh_lines (guestfs_h *g,\n"
33908 " const char *command);\n"
33913 #: ../src/guestfs-actions.pod:7376
33915 "This is the same as C<guestfs_sh>, but splits the result into a list of "
33920 #: ../src/guestfs-actions.pod:7379
33921 msgid "See also: C<guestfs_command_lines>"
33925 #: ../src/guestfs-actions.pod:7387
33926 msgid "guestfs_sleep"
33930 #: ../src/guestfs-actions.pod:7389
33934 " guestfs_sleep (guestfs_h *g,\n"
33940 #: ../src/guestfs-actions.pod:7397
33941 msgid "(Added in 1.0.41)"
33945 #: ../src/guestfs-actions.pod:7399 ../src/guestfs-structs.pod:109
33946 msgid "guestfs_stat"
33950 #: ../src/guestfs-actions.pod:7401
33953 " struct guestfs_stat *\n"
33954 " guestfs_stat (guestfs_h *g,\n"
33955 " const char *path);\n"
33960 #: ../src/guestfs-actions.pod:7415 ../src/guestfs-structs.pod:135
33961 msgid "guestfs_statvfs"
33965 #: ../src/guestfs-actions.pod:7417
33968 " struct guestfs_statvfs *\n"
33969 " guestfs_statvfs (guestfs_h *g,\n"
33970 " const char *path);\n"
33975 #: ../src/guestfs-actions.pod:7427
33977 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
33978 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
33982 #: ../src/guestfs-actions.pod:7433
33983 msgid "guestfs_strings"
33987 #: ../src/guestfs-actions.pod:7435
33991 " guestfs_strings (guestfs_h *g,\n"
33992 " const char *path);\n"
33997 #: ../src/guestfs-actions.pod:7451
33998 msgid "guestfs_strings_e"
34002 #: ../src/guestfs-actions.pod:7453
34006 " guestfs_strings_e (guestfs_h *g,\n"
34007 " const char *encoding,\n"
34008 " const char *path);\n"
34013 #: ../src/guestfs-actions.pod:7458
34015 "This is like the C<guestfs_strings> command, but allows you to specify the "
34016 "encoding of strings that are looked for in the source file C<path>."
34020 #: ../src/guestfs-actions.pod:7468
34022 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
34023 "ISO-8859-X (this is what C<guestfs_strings> uses)."
34027 #: ../src/guestfs-actions.pod:7506
34028 msgid "guestfs_swapoff_device"
34032 #: ../src/guestfs-actions.pod:7508
34036 " guestfs_swapoff_device (guestfs_h *g,\n"
34037 " const char *device);\n"
34042 #: ../src/guestfs-actions.pod:7512
34044 "This command disables the libguestfs appliance swap device or partition "
34045 "named C<device>. See C<guestfs_swapon_device>."
34049 #: ../src/guestfs-actions.pod:7520
34050 msgid "guestfs_swapoff_file"
34054 #: ../src/guestfs-actions.pod:7522
34058 " guestfs_swapoff_file (guestfs_h *g,\n"
34059 " const char *file);\n"
34064 #: ../src/guestfs-actions.pod:7532
34065 msgid "guestfs_swapoff_label"
34069 #: ../src/guestfs-actions.pod:7534
34073 " guestfs_swapoff_label (guestfs_h *g,\n"
34074 " const char *label);\n"
34079 #: ../src/guestfs-actions.pod:7545
34080 msgid "guestfs_swapoff_uuid"
34084 #: ../src/guestfs-actions.pod:7547
34088 " guestfs_swapoff_uuid (guestfs_h *g,\n"
34089 " const char *uuid);\n"
34094 #: ../src/guestfs-actions.pod:7558
34095 msgid "guestfs_swapon_device"
34099 #: ../src/guestfs-actions.pod:7560
34103 " guestfs_swapon_device (guestfs_h *g,\n"
34104 " const char *device);\n"
34109 #: ../src/guestfs-actions.pod:7564
34111 "This command enables the libguestfs appliance to use the swap device or "
34112 "partition named C<device>. The increased memory is made available for all "
34113 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
34117 #: ../src/guestfs-actions.pod:7580
34118 msgid "guestfs_swapon_file"
34122 #: ../src/guestfs-actions.pod:7582
34126 " guestfs_swapon_file (guestfs_h *g,\n"
34127 " const char *file);\n"
34132 #: ../src/guestfs-actions.pod:7586
34134 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
34139 #: ../src/guestfs-actions.pod:7593
34140 msgid "guestfs_swapon_label"
34144 #: ../src/guestfs-actions.pod:7595
34148 " guestfs_swapon_label (guestfs_h *g,\n"
34149 " const char *label);\n"
34154 #: ../src/guestfs-actions.pod:7599
34156 "This command enables swap to a labeled swap partition. See "
34157 "C<guestfs_swapon_device> for other notes."
34161 #: ../src/guestfs-actions.pod:7606
34162 msgid "guestfs_swapon_uuid"
34166 #: ../src/guestfs-actions.pod:7608
34170 " guestfs_swapon_uuid (guestfs_h *g,\n"
34171 " const char *uuid);\n"
34176 #: ../src/guestfs-actions.pod:7612
34178 "This command enables swap to a swap partition with the given UUID. See "
34179 "C<guestfs_swapon_device> for other notes."
34183 #: ../src/guestfs-actions.pod:7619
34184 msgid "guestfs_sync"
34188 #: ../src/guestfs-actions.pod:7621
34192 " guestfs_sync (guestfs_h *g);\n"
34197 #: ../src/guestfs-actions.pod:7634
34198 msgid "guestfs_tail"
34202 #: ../src/guestfs-actions.pod:7636
34206 " guestfs_tail (guestfs_h *g,\n"
34207 " const char *path);\n"
34212 #: ../src/guestfs-actions.pod:7652
34213 msgid "guestfs_tail_n"
34217 #: ../src/guestfs-actions.pod:7654
34221 " guestfs_tail_n (guestfs_h *g,\n"
34223 " const char *path);\n"
34228 #: ../src/guestfs-actions.pod:7676
34229 msgid "guestfs_tar_in"
34233 #: ../src/guestfs-actions.pod:7678
34237 " guestfs_tar_in (guestfs_h *g,\n"
34238 " const char *tarfile,\n"
34239 " const char *directory);\n"
34244 #: ../src/guestfs-actions.pod:7686
34246 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
34250 #: ../src/guestfs-actions.pod:7691 ../src/guestfs-actions.pod:7708
34251 #: ../src/guestfs-actions.pod:7724 ../src/guestfs-actions.pod:7740
34252 msgid "(Added in 1.0.3)"
34256 #: ../src/guestfs-actions.pod:7693
34257 msgid "guestfs_tar_out"
34261 #: ../src/guestfs-actions.pod:7695
34265 " guestfs_tar_out (guestfs_h *g,\n"
34266 " const char *directory,\n"
34267 " const char *tarfile);\n"
34272 #: ../src/guestfs-actions.pod:7703
34274 "To download a compressed tarball, use C<guestfs_tgz_out> or "
34275 "C<guestfs_txz_out>."
34279 #: ../src/guestfs-actions.pod:7710
34280 msgid "guestfs_tgz_in"
34284 #: ../src/guestfs-actions.pod:7712
34288 " guestfs_tgz_in (guestfs_h *g,\n"
34289 " const char *tarball,\n"
34290 " const char *directory);\n"
34295 #: ../src/guestfs-actions.pod:7720
34296 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
34300 #: ../src/guestfs-actions.pod:7726
34301 msgid "guestfs_tgz_out"
34305 #: ../src/guestfs-actions.pod:7728
34309 " guestfs_tgz_out (guestfs_h *g,\n"
34310 " const char *directory,\n"
34311 " const char *tarball);\n"
34316 #: ../src/guestfs-actions.pod:7736
34317 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
34321 #: ../src/guestfs-actions.pod:7742
34322 msgid "guestfs_touch"
34326 #: ../src/guestfs-actions.pod:7744
34330 " guestfs_touch (guestfs_h *g,\n"
34331 " const char *path);\n"
34336 #: ../src/guestfs-actions.pod:7759
34337 msgid "guestfs_truncate"
34341 #: ../src/guestfs-actions.pod:7761
34345 " guestfs_truncate (guestfs_h *g,\n"
34346 " const char *path);\n"
34351 #: ../src/guestfs-actions.pod:7772
34352 msgid "guestfs_truncate_size"
34356 #: ../src/guestfs-actions.pod:7774
34360 " guestfs_truncate_size (guestfs_h *g,\n"
34361 " const char *path,\n"
34362 " int64_t size);\n"
34367 #: ../src/guestfs-actions.pod:7782
34369 "If the current file size is less than C<size> then the file is extended to "
34370 "the required size with zero bytes. This creates a sparse file (ie. disk "
34371 "blocks are not allocated for the file until you write to it). To create a "
34372 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
34376 #: ../src/guestfs-actions.pod:7792
34377 msgid "guestfs_tune2fs"
34381 #: ../src/guestfs-actions.pod:7794
34385 " guestfs_tune2fs (guestfs_h *g,\n"
34386 " const char *device,\n"
34392 #: ../src/guestfs-actions.pod:7804
34395 " GUESTFS_TUNE2FS_FORCE, int force,\n"
34396 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
34397 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
34398 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
34399 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
34400 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
34401 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
34402 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
34403 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
34404 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
34409 #: ../src/guestfs-actions.pod:7884
34411 "To get the current values of filesystem parameters, see "
34412 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
34413 "L<tune2fs(8)> man page."
34417 #: ../src/guestfs-actions.pod:7892
34418 msgid "guestfs_tune2fs_va"
34422 #: ../src/guestfs-actions.pod:7894
34426 " guestfs_tune2fs_va (guestfs_h *g,\n"
34427 " const char *device,\n"
34428 " va_list args);\n"
34433 #: ../src/guestfs-actions.pod:7899
34434 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
34438 #: ../src/guestfs-actions.pod:7903
34439 msgid "guestfs_tune2fs_argv"
34443 #: ../src/guestfs-actions.pod:7905
34447 " guestfs_tune2fs_argv (guestfs_h *g,\n"
34448 " const char *device,\n"
34449 " const struct guestfs_tune2fs_argv *optargs);\n"
34454 #: ../src/guestfs-actions.pod:7910
34455 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
34459 #: ../src/guestfs-actions.pod:7914
34460 msgid "guestfs_tune2fs_l"
34464 #: ../src/guestfs-actions.pod:7916
34468 " guestfs_tune2fs_l (guestfs_h *g,\n"
34469 " const char *device);\n"
34474 #: ../src/guestfs-actions.pod:7936
34475 msgid "guestfs_txz_in"
34479 #: ../src/guestfs-actions.pod:7938
34483 " guestfs_txz_in (guestfs_h *g,\n"
34484 " const char *tarball,\n"
34485 " const char *directory);\n"
34490 #: ../src/guestfs-actions.pod:7950
34491 msgid "guestfs_txz_out"
34495 #: ../src/guestfs-actions.pod:7952
34499 " guestfs_txz_out (guestfs_h *g,\n"
34500 " const char *directory,\n"
34501 " const char *tarball);\n"
34506 #: ../src/guestfs-actions.pod:7964
34507 msgid "guestfs_umask"
34511 #: ../src/guestfs-actions.pod:7966
34515 " guestfs_umask (guestfs_h *g,\n"
34521 #: ../src/guestfs-actions.pod:7982
34523 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
34524 "C<guestfs_mkdir>."
34528 #: ../src/guestfs-actions.pod:7991
34529 msgid "guestfs_umount"
34533 #: ../src/guestfs-actions.pod:7993
34537 " guestfs_umount (guestfs_h *g,\n"
34538 " const char *pathordevice);\n"
34543 #: ../src/guestfs-actions.pod:8005
34544 msgid "guestfs_umount_all"
34548 #: ../src/guestfs-actions.pod:8007
34552 " guestfs_umount_all (guestfs_h *g);\n"
34557 #: ../src/guestfs-actions.pod:8018
34558 msgid "guestfs_upload"
34562 #: ../src/guestfs-actions.pod:8020
34566 " guestfs_upload (guestfs_h *g,\n"
34567 " const char *filename,\n"
34568 " const char *remotefilename);\n"
34573 #: ../src/guestfs-actions.pod:8030
34574 msgid "See also C<guestfs_download>."
34578 #: ../src/guestfs-actions.pod:8041
34579 msgid "guestfs_upload_offset"
34583 #: ../src/guestfs-actions.pod:8043
34587 " guestfs_upload_offset (guestfs_h *g,\n"
34588 " const char *filename,\n"
34589 " const char *remotefilename,\n"
34590 " int64_t offset);\n"
34595 #: ../src/guestfs-actions.pod:8059
34597 "Note that there is no limit on the amount of data that can be uploaded with "
34598 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
34599 "full amount unless an error occurs."
34603 #: ../src/guestfs-actions.pod:8064
34604 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
34608 #: ../src/guestfs-actions.pod:8075
34609 msgid "guestfs_utimens"
34613 #: ../src/guestfs-actions.pod:8077
34617 " guestfs_utimens (guestfs_h *g,\n"
34618 " const char *path,\n"
34619 " int64_t atsecs,\n"
34620 " int64_t atnsecs,\n"
34621 " int64_t mtsecs,\n"
34622 " int64_t mtnsecs);\n"
34627 #: ../src/guestfs-actions.pod:8106 ../src/guestfs-structs.pod:175
34628 msgid "guestfs_version"
34632 #: ../src/guestfs-actions.pod:8108
34635 " struct guestfs_version *\n"
34636 " guestfs_version (guestfs_h *g);\n"
34641 #: ../src/guestfs-actions.pod:8136
34643 "I<Note:> Don't use this call to test for availability of features. In "
34644 "enterprise distributions we backport features from later versions into "
34645 "earlier versions, making this an unreliable way to test for features. Use "
34646 "C<guestfs_available> instead."
34650 #: ../src/guestfs-actions.pod:8142
34652 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
34653 "error. I<The caller must call C<guestfs_free_version> after use>."
34657 #: ../src/guestfs-actions.pod:8146
34658 msgid "(Added in 1.0.58)"
34662 #: ../src/guestfs-actions.pod:8148
34663 msgid "guestfs_vfs_label"
34667 #: ../src/guestfs-actions.pod:8150
34671 " guestfs_vfs_label (guestfs_h *g,\n"
34672 " const char *device);\n"
34677 #: ../src/guestfs-actions.pod:8159
34678 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
34682 #: ../src/guestfs-actions.pod:8164 ../src/guestfs-actions.pod:8201
34683 msgid "(Added in 1.3.18)"
34687 #: ../src/guestfs-actions.pod:8166
34688 msgid "guestfs_vfs_type"
34692 #: ../src/guestfs-actions.pod:8168
34696 " guestfs_vfs_type (guestfs_h *g,\n"
34697 " const char *device);\n"
34702 #: ../src/guestfs-actions.pod:8185
34703 msgid "guestfs_vfs_uuid"
34707 #: ../src/guestfs-actions.pod:8187
34711 " guestfs_vfs_uuid (guestfs_h *g,\n"
34712 " const char *device);\n"
34717 #: ../src/guestfs-actions.pod:8196
34718 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
34722 #: ../src/guestfs-actions.pod:8203
34723 msgid "guestfs_vg_activate"
34727 #: ../src/guestfs-actions.pod:8205
34731 " guestfs_vg_activate (guestfs_h *g,\n"
34733 " char *const *volgroups);\n"
34738 #: ../src/guestfs-actions.pod:8222
34739 msgid "guestfs_vg_activate_all"
34743 #: ../src/guestfs-actions.pod:8224
34747 " guestfs_vg_activate_all (guestfs_h *g,\n"
34748 " int activate);\n"
34753 #: ../src/guestfs-actions.pod:8237
34754 msgid "guestfs_vgcreate"
34758 #: ../src/guestfs-actions.pod:8239
34762 " guestfs_vgcreate (guestfs_h *g,\n"
34763 " const char *volgroup,\n"
34764 " char *const *physvols);\n"
34769 #: ../src/guestfs-actions.pod:8251
34770 msgid "guestfs_vglvuuids"
34774 #: ../src/guestfs-actions.pod:8253
34778 " guestfs_vglvuuids (guestfs_h *g,\n"
34779 " const char *vgname);\n"
34784 #: ../src/guestfs-actions.pod:8260
34786 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
34787 "associate logical volumes and volume groups."
34791 #: ../src/guestfs-actions.pod:8263
34792 msgid "See also C<guestfs_vgpvuuids>."
34796 #: ../src/guestfs-actions.pod:8271
34797 msgid "guestfs_vgpvuuids"
34801 #: ../src/guestfs-actions.pod:8273
34805 " guestfs_vgpvuuids (guestfs_h *g,\n"
34806 " const char *vgname);\n"
34811 #: ../src/guestfs-actions.pod:8280
34813 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
34814 "associate physical volumes and volume groups."
34818 #: ../src/guestfs-actions.pod:8283
34819 msgid "See also C<guestfs_vglvuuids>."
34823 #: ../src/guestfs-actions.pod:8291
34824 msgid "guestfs_vgremove"
34828 #: ../src/guestfs-actions.pod:8293
34832 " guestfs_vgremove (guestfs_h *g,\n"
34833 " const char *vgname);\n"
34838 #: ../src/guestfs-actions.pod:8306
34839 msgid "guestfs_vgrename"
34843 #: ../src/guestfs-actions.pod:8308
34847 " guestfs_vgrename (guestfs_h *g,\n"
34848 " const char *volgroup,\n"
34849 " const char *newvolgroup);\n"
34854 #: ../src/guestfs-actions.pod:8319
34855 msgid "guestfs_vgs"
34859 #: ../src/guestfs-actions.pod:8321
34863 " guestfs_vgs (guestfs_h *g);\n"
34868 #: ../src/guestfs-actions.pod:8330
34869 msgid "See also C<guestfs_vgs_full>."
34873 #: ../src/guestfs-actions.pod:8338
34874 msgid "guestfs_vgs_full"
34878 #: ../src/guestfs-actions.pod:8340
34881 " struct guestfs_lvm_vg_list *\n"
34882 " guestfs_vgs_full (guestfs_h *g);\n"
34887 #: ../src/guestfs-actions.pod:8346
34889 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
34890 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
34894 #: ../src/guestfs-actions.pod:8352
34895 msgid "guestfs_vgscan"
34899 #: ../src/guestfs-actions.pod:8354
34903 " guestfs_vgscan (guestfs_h *g);\n"
34908 #: ../src/guestfs-actions.pod:8364
34909 msgid "guestfs_vguuid"
34913 #: ../src/guestfs-actions.pod:8366
34917 " guestfs_vguuid (guestfs_h *g,\n"
34918 " const char *vgname);\n"
34923 #: ../src/guestfs-actions.pod:8377
34924 msgid "guestfs_wait_ready"
34928 #: ../src/guestfs-actions.pod:8379
34932 " guestfs_wait_ready (guestfs_h *g);\n"
34937 #: ../src/guestfs-actions.pod:8382
34939 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
34944 #: ../src/guestfs-actions.pod:8389
34945 msgid "This function is a no op."
34949 #: ../src/guestfs-actions.pod:8391
34951 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
34952 "calling C<guestfs_launch> to wait for the launch to complete. However this "
34953 "is no longer necessary because C<guestfs_launch> now does the waiting."
34957 #: ../src/guestfs-actions.pod:8396
34959 "If you see any calls to this function in code then you can just remove them, "
34960 "unless you want to retain compatibility with older versions of the API."
34964 #: ../src/guestfs-actions.pod:8404
34965 msgid "guestfs_wc_c"
34969 #: ../src/guestfs-actions.pod:8406
34973 " guestfs_wc_c (guestfs_h *g,\n"
34974 " const char *path);\n"
34979 #: ../src/guestfs-actions.pod:8417
34980 msgid "guestfs_wc_l"
34984 #: ../src/guestfs-actions.pod:8419
34988 " guestfs_wc_l (guestfs_h *g,\n"
34989 " const char *path);\n"
34994 #: ../src/guestfs-actions.pod:8430
34995 msgid "guestfs_wc_w"
34999 #: ../src/guestfs-actions.pod:8432
35003 " guestfs_wc_w (guestfs_h *g,\n"
35004 " const char *path);\n"
35009 #: ../src/guestfs-actions.pod:8443
35010 msgid "guestfs_write"
35014 #: ../src/guestfs-actions.pod:8445
35018 " guestfs_write (guestfs_h *g,\n"
35019 " const char *path,\n"
35020 " const char *content,\n"
35021 " size_t content_size);\n"
35026 #: ../src/guestfs-actions.pod:8454
35027 msgid "See also C<guestfs_write_append>."
35031 #: ../src/guestfs-actions.pod:8463
35032 msgid "guestfs_write_append"
35036 #: ../src/guestfs-actions.pod:8465
35040 " guestfs_write_append (guestfs_h *g,\n"
35041 " const char *path,\n"
35042 " const char *content,\n"
35043 " size_t content_size);\n"
35048 #: ../src/guestfs-actions.pod:8474
35049 msgid "See also C<guestfs_write>."
35053 #: ../src/guestfs-actions.pod:8483
35054 msgid "guestfs_write_file"
35058 #: ../src/guestfs-actions.pod:8485
35062 " guestfs_write_file (guestfs_h *g,\n"
35063 " const char *path,\n"
35064 " const char *content,\n"
35070 #: ../src/guestfs-actions.pod:8491
35072 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
35077 #: ../src/guestfs-actions.pod:8516
35078 msgid "guestfs_zegrep"
35082 #: ../src/guestfs-actions.pod:8518
35086 " guestfs_zegrep (guestfs_h *g,\n"
35087 " const char *regex,\n"
35088 " const char *path);\n"
35093 #: ../src/guestfs-actions.pod:8535
35094 msgid "guestfs_zegrepi"
35098 #: ../src/guestfs-actions.pod:8537
35102 " guestfs_zegrepi (guestfs_h *g,\n"
35103 " const char *regex,\n"
35104 " const char *path);\n"
35109 #: ../src/guestfs-actions.pod:8554
35110 msgid "guestfs_zero"
35114 #: ../src/guestfs-actions.pod:8556
35118 " guestfs_zero (guestfs_h *g,\n"
35119 " const char *device);\n"
35124 #: ../src/guestfs-actions.pod:8570
35126 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
35127 "C<guestfs_is_zero_device>"
35131 #: ../src/guestfs-actions.pod:8582
35132 msgid "guestfs_zero_device"
35136 #: ../src/guestfs-actions.pod:8584
35140 " guestfs_zero_device (guestfs_h *g,\n"
35141 " const char *device);\n"
35146 #: ../src/guestfs-actions.pod:8588
35148 "This command writes zeroes over the entire C<device>. Compare with "
35149 "C<guestfs_zero> which just zeroes the first few blocks of a device."
35153 #: ../src/guestfs-actions.pod:8603
35154 msgid "(Added in 1.3.1)"
35158 #: ../src/guestfs-actions.pod:8605
35159 msgid "guestfs_zerofree"
35163 #: ../src/guestfs-actions.pod:8607
35167 " guestfs_zerofree (guestfs_h *g,\n"
35168 " const char *device);\n"
35173 #: ../src/guestfs-actions.pod:8626
35174 msgid "guestfs_zfgrep"
35178 #: ../src/guestfs-actions.pod:8628
35182 " guestfs_zfgrep (guestfs_h *g,\n"
35183 " const char *pattern,\n"
35184 " const char *path);\n"
35189 #: ../src/guestfs-actions.pod:8645
35190 msgid "guestfs_zfgrepi"
35194 #: ../src/guestfs-actions.pod:8647
35198 " guestfs_zfgrepi (guestfs_h *g,\n"
35199 " const char *pattern,\n"
35200 " const char *path);\n"
35205 #: ../src/guestfs-actions.pod:8664
35206 msgid "guestfs_zfile"
35210 #: ../src/guestfs-actions.pod:8666
35214 " guestfs_zfile (guestfs_h *g,\n"
35215 " const char *meth,\n"
35216 " const char *path);\n"
35221 #: ../src/guestfs-actions.pod:8671
35223 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
35228 #: ../src/guestfs-actions.pod:8683
35230 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
35235 #: ../src/guestfs-actions.pod:8691
35236 msgid "guestfs_zgrep"
35240 #: ../src/guestfs-actions.pod:8693
35244 " guestfs_zgrep (guestfs_h *g,\n"
35245 " const char *regex,\n"
35246 " const char *path);\n"
35251 #: ../src/guestfs-actions.pod:8710
35252 msgid "guestfs_zgrepi"
35256 #: ../src/guestfs-actions.pod:8712
35260 " guestfs_zgrepi (guestfs_h *g,\n"
35261 " const char *regex,\n"
35262 " const char *path);\n"
35267 #: ../src/guestfs-availability.pod:3
35272 #: ../src/guestfs-availability.pod:5
35274 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
35275 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
35276 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
35277 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
35278 "L</guestfs_aug_save> L</guestfs_aug_set>"
35282 #: ../src/guestfs-availability.pod:21
35287 #: ../src/guestfs-availability.pod:23
35288 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
35292 #: ../src/guestfs-availability.pod:26
35297 #: ../src/guestfs-availability.pod:28
35298 msgid "The following functions: L</guestfs_grub_install>"
35302 #: ../src/guestfs-availability.pod:31
35307 #: ../src/guestfs-availability.pod:33
35309 "The following functions: L</guestfs_inotify_add_watch> L</"
35310 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
35311 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
35315 #: ../src/guestfs-availability.pod:41
35316 msgid "B<linuxfsuuid>"
35320 #: ../src/guestfs-availability.pod:43
35322 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
35323 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
35327 #: ../src/guestfs-availability.pod:50
35328 msgid "B<linuxmodules>"
35332 #: ../src/guestfs-availability.pod:52
35333 msgid "The following functions: L</guestfs_modprobe>"
35337 #: ../src/guestfs-availability.pod:55
35338 msgid "B<linuxxattrs>"
35342 #: ../src/guestfs-availability.pod:57
35344 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
35345 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
35346 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
35347 "guestfs_setxattr>"
35351 #: ../src/guestfs-availability.pod:68
35356 #: ../src/guestfs-availability.pod:70
35358 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
35359 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
35360 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
35364 #: ../src/guestfs-availability.pod:79
35369 #: ../src/guestfs-availability.pod:81
35371 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
35372 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
35373 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
35374 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
35375 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
35376 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
35377 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
35381 #: ../src/guestfs-availability.pod:104
35386 #: ../src/guestfs-availability.pod:106
35388 "The following functions: L</guestfs_md_create> L</guestfs_md_detail> L</"
35393 #: ../src/guestfs-availability.pod:111
35398 #: ../src/guestfs-availability.pod:113
35400 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
35401 "guestfs_mknod_b> L</guestfs_mknod_c>"
35405 #: ../src/guestfs-availability.pod:119
35410 #: ../src/guestfs-availability.pod:121
35411 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
35415 #: ../src/guestfs-availability.pod:124
35416 msgid "B<ntfsprogs>"
35420 #: ../src/guestfs-availability.pod:126
35422 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
35423 "L</guestfs_ntfsresize_size>"
35427 #: ../src/guestfs-availability.pod:131
35428 msgid "B<realpath>"
35432 #: ../src/guestfs-availability.pod:133
35433 msgid "The following functions: L</guestfs_realpath>"
35437 #: ../src/guestfs-availability.pod:136
35442 #: ../src/guestfs-availability.pod:138
35444 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
35445 "guestfs_scrub_freespace>"
35449 #: ../src/guestfs-availability.pod:143
35454 #: ../src/guestfs-availability.pod:145
35455 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
35459 #: ../src/guestfs-availability.pod:149
35464 #: ../src/guestfs-availability.pod:151
35465 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
35469 #: ../src/guestfs-availability.pod:155
35470 msgid "B<zerofree>"
35474 #: ../src/guestfs-availability.pod:157
35475 msgid "The following functions: L</guestfs_zerofree>"
35479 #: ../src/guestfs-structs.pod:1
35480 msgid "guestfs_int_bool"
35484 #: ../src/guestfs-structs.pod:3
35487 " struct guestfs_int_bool {\n"
35495 #: ../src/guestfs-structs.pod:8
35498 " struct guestfs_int_bool_list {\n"
35499 " uint32_t len; /* Number of elements in list. */\n"
35500 " struct guestfs_int_bool *val; /* Elements. */\n"
35506 #: ../src/guestfs-structs.pod:13
35509 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
35510 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
35515 #: ../src/guestfs-structs.pod:16
35516 msgid "guestfs_lvm_pv"
35520 #: ../src/guestfs-structs.pod:18
35523 " struct guestfs_lvm_pv {\n"
35524 " char *pv_name;\n"
35525 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
35526 " char pv_uuid[32];\n"
35528 " uint64_t pv_size;\n"
35529 " uint64_t dev_size;\n"
35530 " uint64_t pv_free;\n"
35531 " uint64_t pv_used;\n"
35532 " char *pv_attr;\n"
35533 " int64_t pv_pe_count;\n"
35534 " int64_t pv_pe_alloc_count;\n"
35535 " char *pv_tags;\n"
35536 " uint64_t pe_start;\n"
35537 " int64_t pv_mda_count;\n"
35538 " uint64_t pv_mda_free;\n"
35544 #: ../src/guestfs-structs.pod:36
35547 " struct guestfs_lvm_pv_list {\n"
35548 " uint32_t len; /* Number of elements in list. */\n"
35549 " struct guestfs_lvm_pv *val; /* Elements. */\n"
35555 #: ../src/guestfs-structs.pod:41
35558 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
35559 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
35564 #: ../src/guestfs-structs.pod:44
35565 msgid "guestfs_lvm_vg"
35569 #: ../src/guestfs-structs.pod:46
35572 " struct guestfs_lvm_vg {\n"
35573 " char *vg_name;\n"
35574 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
35575 " char vg_uuid[32];\n"
35577 " char *vg_attr;\n"
35578 " uint64_t vg_size;\n"
35579 " uint64_t vg_free;\n"
35580 " char *vg_sysid;\n"
35581 " uint64_t vg_extent_size;\n"
35582 " int64_t vg_extent_count;\n"
35583 " int64_t vg_free_count;\n"
35584 " int64_t max_lv;\n"
35585 " int64_t max_pv;\n"
35586 " int64_t pv_count;\n"
35587 " int64_t lv_count;\n"
35588 " int64_t snap_count;\n"
35589 " int64_t vg_seqno;\n"
35590 " char *vg_tags;\n"
35591 " int64_t vg_mda_count;\n"
35592 " uint64_t vg_mda_free;\n"
35598 #: ../src/guestfs-structs.pod:69
35601 " struct guestfs_lvm_vg_list {\n"
35602 " uint32_t len; /* Number of elements in list. */\n"
35603 " struct guestfs_lvm_vg *val; /* Elements. */\n"
35609 #: ../src/guestfs-structs.pod:74
35612 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
35613 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
35618 #: ../src/guestfs-structs.pod:77
35619 msgid "guestfs_lvm_lv"
35623 #: ../src/guestfs-structs.pod:79
35626 " struct guestfs_lvm_lv {\n"
35627 " char *lv_name;\n"
35628 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
35629 " char lv_uuid[32];\n"
35630 " char *lv_attr;\n"
35631 " int64_t lv_major;\n"
35632 " int64_t lv_minor;\n"
35633 " int64_t lv_kernel_major;\n"
35634 " int64_t lv_kernel_minor;\n"
35635 " uint64_t lv_size;\n"
35636 " int64_t seg_count;\n"
35638 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
35639 " float snap_percent;\n"
35640 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
35641 " float copy_percent;\n"
35642 " char *move_pv;\n"
35643 " char *lv_tags;\n"
35644 " char *mirror_log;\n"
35645 " char *modules;\n"
35651 #: ../src/guestfs-structs.pod:101
35654 " struct guestfs_lvm_lv_list {\n"
35655 " uint32_t len; /* Number of elements in list. */\n"
35656 " struct guestfs_lvm_lv *val; /* Elements. */\n"
35662 #: ../src/guestfs-structs.pod:106
35665 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
35666 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
35671 #: ../src/guestfs-structs.pod:111
35674 " struct guestfs_stat {\n"
35678 " int64_t nlink;\n"
35683 " int64_t blksize;\n"
35684 " int64_t blocks;\n"
35685 " int64_t atime;\n"
35686 " int64_t mtime;\n"
35687 " int64_t ctime;\n"
35693 #: ../src/guestfs-structs.pod:127
35696 " struct guestfs_stat_list {\n"
35697 " uint32_t len; /* Number of elements in list. */\n"
35698 " struct guestfs_stat *val; /* Elements. */\n"
35704 #: ../src/guestfs-structs.pod:132
35707 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
35708 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
35713 #: ../src/guestfs-structs.pod:137
35716 " struct guestfs_statvfs {\n"
35717 " int64_t bsize;\n"
35718 " int64_t frsize;\n"
35719 " int64_t blocks;\n"
35720 " int64_t bfree;\n"
35721 " int64_t bavail;\n"
35722 " int64_t files;\n"
35723 " int64_t ffree;\n"
35724 " int64_t favail;\n"
35727 " int64_t namemax;\n"
35733 #: ../src/guestfs-structs.pod:151
35736 " struct guestfs_statvfs_list {\n"
35737 " uint32_t len; /* Number of elements in list. */\n"
35738 " struct guestfs_statvfs *val; /* Elements. */\n"
35744 #: ../src/guestfs-structs.pod:156
35747 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
35748 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
35753 #: ../src/guestfs-structs.pod:159
35754 msgid "guestfs_dirent"
35758 #: ../src/guestfs-structs.pod:161
35761 " struct guestfs_dirent {\n"
35770 #: ../src/guestfs-structs.pod:167
35773 " struct guestfs_dirent_list {\n"
35774 " uint32_t len; /* Number of elements in list. */\n"
35775 " struct guestfs_dirent *val; /* Elements. */\n"
35781 #: ../src/guestfs-structs.pod:172
35784 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
35785 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
35790 #: ../src/guestfs-structs.pod:177
35793 " struct guestfs_version {\n"
35794 " int64_t major;\n"
35795 " int64_t minor;\n"
35796 " int64_t release;\n"
35803 #: ../src/guestfs-structs.pod:184
35806 " struct guestfs_version_list {\n"
35807 " uint32_t len; /* Number of elements in list. */\n"
35808 " struct guestfs_version *val; /* Elements. */\n"
35814 #: ../src/guestfs-structs.pod:189
35817 " void guestfs_free_version (struct guestfs_free_version *);\n"
35818 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
35823 #: ../src/guestfs-structs.pod:192
35824 msgid "guestfs_xattr"
35828 #: ../src/guestfs-structs.pod:194
35831 " struct guestfs_xattr {\n"
35832 " char *attrname;\n"
35833 " /* The next two fields describe a byte array. */\n"
35834 " uint32_t attrval_len;\n"
35835 " char *attrval;\n"
35841 #: ../src/guestfs-structs.pod:201
35844 " struct guestfs_xattr_list {\n"
35845 " uint32_t len; /* Number of elements in list. */\n"
35846 " struct guestfs_xattr *val; /* Elements. */\n"
35852 #: ../src/guestfs-structs.pod:206
35855 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
35856 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
35861 #: ../src/guestfs-structs.pod:209
35862 msgid "guestfs_inotify_event"
35866 #: ../src/guestfs-structs.pod:211
35869 " struct guestfs_inotify_event {\n"
35870 " int64_t in_wd;\n"
35871 " uint32_t in_mask;\n"
35872 " uint32_t in_cookie;\n"
35873 " char *in_name;\n"
35879 #: ../src/guestfs-structs.pod:218
35882 " struct guestfs_inotify_event_list {\n"
35883 " uint32_t len; /* Number of elements in list. */\n"
35884 " struct guestfs_inotify_event *val; /* Elements. */\n"
35890 #: ../src/guestfs-structs.pod:223
35893 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
35894 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
35899 #: ../src/guestfs-structs.pod:226
35900 msgid "guestfs_partition"
35904 #: ../src/guestfs-structs.pod:228
35907 " struct guestfs_partition {\n"
35908 " int32_t part_num;\n"
35909 " uint64_t part_start;\n"
35910 " uint64_t part_end;\n"
35911 " uint64_t part_size;\n"
35917 #: ../src/guestfs-structs.pod:235
35920 " struct guestfs_partition_list {\n"
35921 " uint32_t len; /* Number of elements in list. */\n"
35922 " struct guestfs_partition *val; /* Elements. */\n"
35928 #: ../src/guestfs-structs.pod:240
35931 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
35932 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
35937 #: ../src/guestfs-structs.pod:243
35938 msgid "guestfs_application"
35942 #: ../src/guestfs-structs.pod:245
35945 " struct guestfs_application {\n"
35946 " char *app_name;\n"
35947 " char *app_display_name;\n"
35948 " int32_t app_epoch;\n"
35949 " char *app_version;\n"
35950 " char *app_release;\n"
35951 " char *app_install_path;\n"
35952 " char *app_trans_path;\n"
35953 " char *app_publisher;\n"
35954 " char *app_url;\n"
35955 " char *app_source_package;\n"
35956 " char *app_summary;\n"
35957 " char *app_description;\n"
35963 #: ../src/guestfs-structs.pod:260
35966 " struct guestfs_application_list {\n"
35967 " uint32_t len; /* Number of elements in list. */\n"
35968 " struct guestfs_application *val; /* Elements. */\n"
35974 #: ../src/guestfs-structs.pod:265
35977 " void guestfs_free_application (struct guestfs_free_application *);\n"
35978 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
35983 #: ../src/guestfs.pod:5
35984 msgid "guestfs - Library for accessing and modifying virtual machine images"
35988 #: ../src/guestfs.pod:11
35991 " guestfs_h *g = guestfs_create ();\n"
35992 " guestfs_add_drive (g, \"guest.img\");\n"
35993 " guestfs_launch (g);\n"
35994 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
35995 " guestfs_touch (g, \"/hello\");\n"
35996 " guestfs_umount (g, \"/\");\n"
35997 " guestfs_close (g);\n"
36000 " guestfs_h *g = guestfs_create ();\n"
36001 " guestfs_add_drive (g, \"guest.img\");\n"
36002 " guestfs_launch (g);\n"
36003 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
36004 " guestfs_touch (g, \"/hello\");\n"
36005 " guestfs_umount (g, \"/\");\n"
36006 " guestfs_close (g);\n"
36010 #: ../src/guestfs.pod:25
36012 "Libguestfs is a library for accessing and modifying guest disk images. "
36013 "Amongst the things this is good for: making batch configuration changes to "
36014 "guests, getting disk used/free statistics (see also: virt-df), migrating "
36015 "between virtualization systems (see also: virt-p2v), performing partial "
36016 "backups, performing partial guest clones, cloning guests and changing "
36017 "registry/UUID/hostname info, and much else besides."
36021 #: ../src/guestfs.pod:33
36023 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
36024 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
36025 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
36030 #: ../src/guestfs.pod:38
36032 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
36033 "what filesystem is in each LV, etc.). It can also run commands in the "
36034 "context of the guest. Also you can access filesystems over FUSE."
36038 #: ../src/guestfs.pod:43
36040 "Libguestfs is a library that can be linked with C and C++ management "
36041 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
36042 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
36047 #: ../src/guestfs.pod:48
36049 "You don't need to be root to use libguestfs, although obviously you do need "
36050 "enough permissions to access the disk images."
36054 #: ../src/guestfs.pod:51
36056 "Libguestfs is a large API because it can do many things. For a gentle "
36057 "introduction, please read the L</API OVERVIEW> section next."
36061 #: ../src/guestfs.pod:54
36063 "There are also some example programs in the L<guestfs-examples(3)> manual "
36068 #: ../src/guestfs.pod:57
36069 msgid "API OVERVIEW"
36073 #: ../src/guestfs.pod:59
36075 "This section provides a gentler overview of the libguestfs API. We also try "
36076 "to group API calls together, where that may not be obvious from reading "
36077 "about the individual calls in the main section of this manual."
36081 #: ../src/guestfs.pod:64
36086 #: ../src/guestfs.pod:66
36088 "Before you can use libguestfs calls, you have to create a handle. Then you "
36089 "must add at least one disk image to the handle, followed by launching the "
36090 "handle, then performing whatever operations you want, and finally closing "
36091 "the handle. By convention we use the single letter C<g> for the name of the "
36092 "handle variable, although of course you can use any name you want."
36096 #: ../src/guestfs.pod:73
36097 msgid "The general structure of all libguestfs-using programs looks like this:"
36101 #: ../src/guestfs.pod:76
36104 " guestfs_h *g = guestfs_create ();\n"
36109 #: ../src/guestfs.pod:78
36112 " /* Call guestfs_add_drive additional times if there are\n"
36113 " * multiple disk images.\n"
36115 " guestfs_add_drive (g, \"guest.img\");\n"
36120 #: ../src/guestfs.pod:83
36123 " /* Most manipulation calls won't work until you've launched\n"
36124 " * the handle 'g'. You have to do this _after_ adding drives\n"
36125 " * and _before_ other commands.\n"
36127 " guestfs_launch (g);\n"
36132 #: ../src/guestfs.pod:89
36135 " /* Now you can examine what partitions, LVs etc are available.\n"
36137 " char **partitions = guestfs_list_partitions (g);\n"
36138 " char **logvols = guestfs_lvs (g);\n"
36143 #: ../src/guestfs.pod:94
36146 " /* To access a filesystem in the image, you must mount it.\n"
36148 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
36153 #: ../src/guestfs.pod:98
36156 " /* Now you can perform filesystem actions on the guest\n"
36159 " guestfs_touch (g, \"/hello\");\n"
36164 #: ../src/guestfs.pod:103
36167 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
36168 " * it is done automatically when you close the handle. See\n"
36169 " * discussion of autosync in this page.\n"
36171 " guestfs_sync (g);\n"
36176 #: ../src/guestfs.pod:109
36179 " /* Close the handle 'g'. */\n"
36180 " guestfs_close (g);\n"
36185 #: ../src/guestfs.pod:112
36187 "The code above doesn't include any error checking. In real code you should "
36188 "check return values carefully for errors. In general all functions that "
36189 "return integers return C<-1> on error, and all functions that return "
36190 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
36191 "how to handle errors, and consult the documentation for each function call "
36192 "below to see precisely how they return error indications. See L<guestfs-"
36193 "examples(3)> for fully worked examples."
36197 #: ../src/guestfs.pod:121
36198 msgid "DISK IMAGES"
36202 #: ../src/guestfs.pod:123
36204 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
36205 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
36206 "actual block device, or simply an empty file of zeroes that you have created "
36207 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
36212 #: ../src/guestfs.pod:129
36214 "The call you should use in modern code for adding drives is L</"
36215 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
36216 "specifying that the format is raw, do:"
36220 #: ../src/guestfs.pod:133
36223 " guestfs_add_drive_opts (g, filename,\n"
36224 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
36230 #: ../src/guestfs.pod:137
36231 msgid "You can add a disk read-only using:"
36235 #: ../src/guestfs.pod:139
36238 " guestfs_add_drive_opts (g, filename,\n"
36239 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
36240 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
36246 #: ../src/guestfs.pod:144
36248 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
36249 "libguestfs won't modify the file."
36253 #: ../src/guestfs.pod:147
36255 "Be extremely cautious if the disk image is in use, eg. if it is being used "
36256 "by a virtual machine. Adding it read-write will almost certainly cause disk "
36257 "corruption, but adding it read-only is safe."
36261 #: ../src/guestfs.pod:151
36263 "You must add at least one disk image, and you may add multiple disk images. "
36264 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
36265 "first one you added), C</dev/sdb> (for the second one you added), etc."
36269 #: ../src/guestfs.pod:156
36271 "Once L</guestfs_launch> has been called you cannot add any more images. You "
36272 "can call L</guestfs_list_devices> to get a list of the device names, in the "
36273 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
36277 #: ../src/guestfs.pod:161
36282 #: ../src/guestfs.pod:163
36284 "Before you can read or write files, create directories and so on in a disk "
36285 "image that contains filesystems, you have to mount those filesystems using "
36286 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
36287 "a disk image contains (for example) one partition with a filesystem on that "
36288 "partition, then you can mount it directly:"
36292 #: ../src/guestfs.pod:170
36295 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
36300 #: ../src/guestfs.pod:172
36302 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
36303 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
36304 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
36305 "that these are libguestfs virtual devices, and are nothing to do with host "
36310 #: ../src/guestfs.pod:178
36312 "If you are given a disk image and you don't know what it contains then you "
36313 "have to find out. Libguestfs can do that too: use L</"
36314 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
36315 "LVs, and either try mounting each to see what is mountable, or else examine "
36316 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
36317 "filesystems, use L</guestfs_list_filesystems>."
36321 #: ../src/guestfs.pod:186
36323 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
36324 "L</INSPECTION> below). But you might find it easier to look at higher level "
36325 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
36329 #: ../src/guestfs.pod:191
36331 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
36332 "several other variations of the C<guestfs_mount_*> call."
36336 #: ../src/guestfs.pod:194
36337 msgid "FILESYSTEM ACCESS AND MODIFICATION"
36341 #: ../src/guestfs.pod:196
36343 "The majority of the libguestfs API consists of fairly low-level calls for "
36344 "accessing and modifying the files, directories, symlinks etc on mounted "
36345 "filesystems. There are over a hundred such calls which you can find listed "
36346 "in detail below in this man page, and we don't even pretend to cover them "
36347 "all in this overview."
36351 #: ../src/guestfs.pod:202
36353 "Specify filenames as full paths, starting with C<\"/\"> and including the "
36358 #: ../src/guestfs.pod:205
36360 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
36361 "the file called C<\"etc/passwd\"> then you could do:"
36365 #: ../src/guestfs.pod:208
36368 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
36373 #: ../src/guestfs.pod:210
36375 "This would return C<data> as a newly allocated buffer containing the full "
36376 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
36377 "or C<NULL> if there was an error."
36381 #: ../src/guestfs.pod:214
36383 "As another example, to create a top-level directory on that filesystem "
36384 "called C<\"var\"> you would do:"
36388 #: ../src/guestfs.pod:217
36391 " guestfs_mkdir (g, \"/var\");\n"
36396 #: ../src/guestfs.pod:219
36397 msgid "To create a symlink you could do:"
36401 #: ../src/guestfs.pod:221
36404 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
36405 " \"/etc/rc3.d/S30portmap\");\n"
36410 #: ../src/guestfs.pod:224
36412 "Libguestfs will reject attempts to use relative paths and there is no "
36413 "concept of a current working directory."
36417 #: ../src/guestfs.pod:227
36419 "Libguestfs can return errors in many situations: for example if the "
36420 "filesystem isn't writable, or if a file or directory that you requested "
36421 "doesn't exist. If you are using the C API (documented here) you have to "
36422 "check for those error conditions after each call. (Other language bindings "
36423 "turn these errors into exceptions)."
36427 #: ../src/guestfs.pod:233
36429 "File writes are affected by the per-handle umask, set by calling L</"
36430 "guestfs_umask> and defaulting to 022. See L</UMASK>."
36434 #: ../src/guestfs.pod:236
36435 msgid "PARTITIONING"
36439 #: ../src/guestfs.pod:238
36441 "Libguestfs contains API calls to read, create and modify partition tables on "
36446 #: ../src/guestfs.pod:241
36448 "In the common case where you want to create a single partition covering the "
36449 "whole disk, you should use the L</guestfs_part_disk> call:"
36453 #: ../src/guestfs.pod:245
36456 " const char *parttype = \"mbr\";\n"
36457 " if (disk_is_larger_than_2TB)\n"
36458 " parttype = \"gpt\";\n"
36459 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
36464 #: ../src/guestfs.pod:250
36466 "Obviously this effectively wipes anything that was on that disk image before."
36470 #: ../src/guestfs.pod:253
36475 #: ../src/guestfs.pod:255
36477 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
36478 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
36479 "you familiarize yourself with the concepts of physical volumes, volume "
36480 "groups and logical volumes."
36484 #: ../src/guestfs.pod:260
36486 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
36487 "tldp.org/HOWTO/LVM-HOWTO/>."
36491 #: ../src/guestfs.pod:263
36492 msgid "DOWNLOADING"
36496 #: ../src/guestfs.pod:265
36498 "Use L</guestfs_cat> to download small, text only files. This call is "
36499 "limited to files which are less than 2 MB and which cannot contain any ASCII "
36500 "NUL (C<\\0>) characters. However the API is very simple to use."
36504 #: ../src/guestfs.pod:269
36506 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
36507 "bit data, since it returns a (pointer, size) pair. However it is still "
36508 "limited to \"small\" files, less than 2 MB."
36512 #: ../src/guestfs.pod:273
36514 "L</guestfs_download> can be used to download any file, with no limits on "
36515 "content or size (even files larger than 4 GB)."
36519 #: ../src/guestfs.pod:276
36521 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
36525 #: ../src/guestfs.pod:279
36530 #: ../src/guestfs.pod:281
36532 "It's often the case that you want to write a file or files to the disk image."
36536 #: ../src/guestfs.pod:284
36538 "To write a small file with fixed content, use L</guestfs_write>. To create "
36539 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
36540 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
36541 "of other functions for creating test files, for example L</guestfs_fill> and "
36542 "L</guestfs_fill_pattern>."
36546 #: ../src/guestfs.pod:290
36548 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
36549 "file content or size (even files larger than 4 GB)."
36553 #: ../src/guestfs.pod:293
36555 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
36559 #: ../src/guestfs.pod:295
36561 "However the fastest way to upload I<large numbers of arbitrary files> is to "
36562 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
36563 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
36564 "in a predictable way (eg. adding it last after all other drives) then you "
36565 "can get the device name from L</guestfs_list_devices> and mount it directly "
36566 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
36567 "portable between kernel versions, and they don't support labels or UUIDs. "
36568 "If you want to pre-build an image or you need to mount it using a label or "
36569 "UUID, use an ISO image instead."
36573 #: ../src/guestfs.pod:306
36578 #: ../src/guestfs.pod:308
36580 "There are various different commands for copying between files and devices "
36581 "and in and out of the guest filesystem. These are summarised in the table "
36586 #: ../src/guestfs.pod:314
36587 msgid "B<file> to B<file>"
36591 #: ../src/guestfs.pod:316
36593 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
36594 "directories recursively."
36598 #: ../src/guestfs.pod:319
36600 "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
36604 #: ../src/guestfs.pod:322
36605 msgid "B<file> to B<device>"
36609 #: ../src/guestfs.pod:324
36610 msgid "B<device> to B<file>"
36614 #: ../src/guestfs.pod:326
36615 msgid "B<device> to B<device>"
36619 #: ../src/guestfs.pod:328
36621 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or L</"
36622 "guestfs_copy_device_to_device>."
36626 #: ../src/guestfs.pod:331
36627 msgid "Example: duplicate the contents of an LV:"
36631 #: ../src/guestfs.pod:333
36634 " guestfs_copy_device_to_device (g,\n"
36635 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
36636 " /* -1 marks the end of the list of optional parameters */\n"
36642 #: ../src/guestfs.pod:338
36644 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
36645 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
36646 "optional C<size> parameter:"
36650 #: ../src/guestfs.pod:342
36653 " guestfs_copy_device_to_device (g,\n"
36654 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
36655 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
36661 #: ../src/guestfs.pod:347
36662 msgid "B<file on the host> to B<file or device>"
36666 #: ../src/guestfs.pod:349
36667 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
36671 #: ../src/guestfs.pod:351
36672 msgid "B<file or device> to B<file on the host>"
36676 #: ../src/guestfs.pod:353
36677 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
36681 #: ../src/guestfs.pod:357
36682 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
36686 #: ../src/guestfs.pod:359
36688 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
36689 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
36690 "appears you can only upload and download to files. However many Un*x-like "
36691 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
36692 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
36693 "and arbitrary file descriptor N."
36697 #: ../src/guestfs.pod:367
36698 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
36702 #: ../src/guestfs.pod:370
36705 " guestfs_download (g, filename, \"/dev/stdout\");\n"
36710 #: ../src/guestfs.pod:372
36711 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
36715 #: ../src/guestfs.pod:374
36718 " char devfd[64];\n"
36719 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
36720 " guestfs_tar_out (g, \"/\", devfd);\n"
36725 #: ../src/guestfs.pod:378
36726 msgid "LISTING FILES"
36730 #: ../src/guestfs.pod:380
36732 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
36733 "L<guestfish(1)>-equivalent command C<ll>)."
36737 #: ../src/guestfs.pod:383
36739 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
36740 "programs, as a flat list of strings."
36744 #: ../src/guestfs.pod:386
36746 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
36747 "directory, plus additional information about each one. It is more "
36748 "equivalent to using the L<readdir(3)> call on a local filesystem."
36752 #: ../src/guestfs.pod:390
36754 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
36758 #: ../src/guestfs.pod:393
36759 msgid "RUNNING COMMANDS"
36763 #: ../src/guestfs.pod:395
36765 "Although libguestfs is primarily an API for manipulating files inside guest "
36766 "images, we also provide some limited facilities for running commands inside "
36771 #: ../src/guestfs.pod:399
36772 msgid "There are many limitations to this:"
36776 #: ../src/guestfs.pod:405
36778 "The kernel version that the command runs under will be different from what "
36783 #: ../src/guestfs.pod:410
36785 "If the command needs to communicate with daemons, then most likely they "
36786 "won't be running."
36790 #: ../src/guestfs.pod:415
36791 msgid "The command will be running in limited memory."
36795 #: ../src/guestfs.pod:419
36797 "The network may not be available unless you enable it (see L</"
36798 "guestfs_set_network>)."
36802 #: ../src/guestfs.pod:424
36803 msgid "Only supports Linux guests (not Windows, BSD, etc)."
36807 #: ../src/guestfs.pod:428
36809 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
36813 #: ../src/guestfs.pod:433
36815 "For SELinux guests, you may need to enable SELinux and load policy first. "
36816 "See L</SELINUX> in this manpage."
36820 #: ../src/guestfs.pod:438
36822 "I<Security:> It is not safe to run commands from untrusted, possibly "
36823 "malicious guests. These commands may attempt to exploit your program by "
36824 "sending unexpected output. They could also try to exploit the Linux kernel "
36825 "or qemu provided by the libguestfs appliance. They could use the network "
36826 "provided by the libguestfs appliance to bypass ordinary network partitions "
36827 "and firewalls. They could use the elevated privileges or different SELinux "
36828 "context of your program to their advantage."
36832 #: ../src/guestfs.pod:447
36834 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
36835 "(a script which runs when the guest next boots normally), and to have this "
36836 "script run the commands you want in the normal context of the running guest, "
36837 "network security and so on. For information about other security issues, "
36838 "see L</SECURITY>."
36842 #: ../src/guestfs.pod:455
36844 "The two main API calls to run commands are L</guestfs_command> and L</"
36845 "guestfs_sh> (there are also variations)."
36849 #: ../src/guestfs.pod:458
36851 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
36852 "shell globs, redirections, etc will work."
36856 #: ../src/guestfs.pod:461
36857 msgid "CONFIGURATION FILES"
36861 #: ../src/guestfs.pod:463
36863 "To read and write configuration files in Linux guest filesystems, we "
36864 "strongly recommend using Augeas. For example, Augeas understands how to "
36865 "read and write, say, a Linux shadow password file or X.org configuration "
36866 "file, and so avoids you having to write that code."
36870 #: ../src/guestfs.pod:468
36872 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
36873 "document Augeas itself here because there is excellent documentation on the "
36874 "L<http://augeas.net/> website."
36878 #: ../src/guestfs.pod:472
36880 "If you don't want to use Augeas (you fool!) then try calling L</"
36881 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
36886 #: ../src/guestfs.pod:476
36891 #: ../src/guestfs.pod:478
36893 "We support SELinux guests. To ensure that labeling happens correctly in "
36894 "SELinux guests, you need to enable SELinux and load the guest's policy:"
36898 #: ../src/guestfs.pod:486
36899 msgid "Before launching, do:"
36903 #: ../src/guestfs.pod:488
36906 " guestfs_set_selinux (g, 1);\n"
36911 #: ../src/guestfs.pod:492
36913 "After mounting the guest's filesystem(s), load the policy. This is best "
36914 "done by running the L<load_policy(8)> command in the guest itself:"
36918 #: ../src/guestfs.pod:496
36921 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
36926 #: ../src/guestfs.pod:498
36928 "(Older versions of C<load_policy> require you to specify the name of the "
36933 #: ../src/guestfs.pod:503
36935 "Optionally, set the security context for the API. The correct security "
36936 "context to use can only be known by inspecting the guest. As an example:"
36940 #: ../src/guestfs.pod:507
36943 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
36948 #: ../src/guestfs.pod:511
36949 msgid "This will work for running commands and editing existing files."
36953 #: ../src/guestfs.pod:513
36955 "When new files are created, you may need to label them explicitly, for "
36956 "example by running the external command C<restorecon pathname>."
36960 #: ../src/guestfs.pod:517
36965 #: ../src/guestfs.pod:519
36967 "Certain calls are affected by the current file mode creation mask (the "
36968 "\"umask\"). In particular ones which create files or directories, such as "
36969 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
36970 "either the default mode that the file is created with or modifies the mode "
36975 #: ../src/guestfs.pod:525
36977 "The default umask is C<022>, so files are created with modes such as C<0644> "
36978 "and directories with C<0755>."
36982 #: ../src/guestfs.pod:528
36984 "There are two ways to avoid being affected by umask. Either set umask to 0 "
36985 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
36986 "guestfs_chmod> after creating each file or directory."
36990 #: ../src/guestfs.pod:532
36991 msgid "For more information about umask, see L<umask(2)>."
36995 #: ../src/guestfs.pod:536
36997 "Libguestfs allows you to access Linux guests which have been encrypted using "
36998 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
36999 "standard. This includes nearly all whole disk encryption systems used by "
37000 "modern Linux guests."
37004 #: ../src/guestfs.pod:542
37006 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
37007 "returns the string C<crypto_LUKS>)."
37011 #: ../src/guestfs.pod:545
37013 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
37014 "will require the passphrase!"
37018 #: ../src/guestfs.pod:548
37020 "Opening a LUKS device creates a new device mapper device called C</dev/"
37021 "mapper/mapname> (where C<mapname> is the string you supply to L</"
37022 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
37023 "from and encrypted to the underlying block device respectively."
37027 #: ../src/guestfs.pod:554
37029 "LVM volume groups on the device can be made visible by calling L</"
37030 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
37031 "(s) can now be mounted in the usual way."
37035 #: ../src/guestfs.pod:558
37037 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
37038 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
37039 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
37040 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
37041 "underlying encrypted block device)."
37045 #: ../src/guestfs.pod:565
37050 #: ../src/guestfs.pod:567
37052 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
37053 "contains operating systems, an install CD or a live CD. (These APIs used to "
37054 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
37055 "version 1.5.3 the most frequently used part of this library has been "
37056 "rewritten in C and moved into the core code)."
37060 #: ../src/guestfs.pod:574
37062 "Add all disks belonging to the unknown virtual machine and call L</"
37063 "guestfs_launch> in the usual way."
37067 #: ../src/guestfs.pod:577
37069 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
37070 "and certain heuristics, and returns a list of operating systems that were "
37071 "found. An empty list means none were found. A single element is the root "
37072 "filesystem of the operating system. For dual- or multi-boot guests, "
37073 "multiple roots can be returned, each one corresponding to a separate "
37074 "operating system. (Multi-boot virtual machines are extremely rare in the "
37075 "world of virtualization, but since this scenario can happen, we have built "
37076 "libguestfs to deal with it.)"
37080 #: ../src/guestfs.pod:586
37082 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
37083 "to get additional details about that operating system. For example, call L</"
37084 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
37085 "Windows and Linux-based operating systems respectively."
37089 #: ../src/guestfs.pod:592
37091 "Un*x-like and Linux-based operating systems usually consist of several "
37092 "filesystems which are mounted at boot time (for example, a separate boot "
37093 "partition mounted on C</boot>). The inspection rules are able to detect how "
37094 "filesystems correspond to mount points. Call "
37095 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
37096 "hash table like this example:"
37100 #: ../src/guestfs.pod:599
37103 " /boot => /dev/sda1\n"
37104 " / => /dev/vg_guest/lv_root\n"
37105 " /usr => /dev/vg_guest/lv_usr\n"
37110 #: ../src/guestfs.pod:603
37112 "The caller can then make calls to L</guestfs_mount_options> to mount the "
37113 "filesystems as suggested."
37117 #: ../src/guestfs.pod:606
37119 "Be careful to mount filesystems in the right order (eg. C</> before C</"
37120 "usr>). Sorting the keys of the hash by length, shortest first, should work."
37124 #: ../src/guestfs.pod:610
37126 "Inspection currently only works for some common operating systems. "
37127 "Contributors are welcome to send patches for other operating systems that we "
37128 "currently cannot detect."
37132 #: ../src/guestfs.pod:614
37134 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
37135 "for more details. The L</guestfs_inspect_os> function just ignores any "
37136 "encrypted devices."
37140 #: ../src/guestfs.pod:618
37142 "A note on the implementation: The call L</guestfs_inspect_os> performs "
37143 "inspection and caches the results in the guest handle. Subsequent calls to "
37144 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
37145 "read the disks. If you change the content of the guest disks, you can redo "
37146 "inspection by calling L</guestfs_inspect_os> again. (L</"
37147 "guestfs_inspect_list_applications> works a little differently from the other "
37148 "calls and does read the disks. See documentation for that function for "
37153 #: ../src/guestfs.pod:627
37154 msgid "INSPECTING INSTALL DISKS"
37158 #: ../src/guestfs.pod:629
37160 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
37165 #: ../src/guestfs.pod:632
37167 "Call L</guestfs_inspect_get_format> to return the format of the operating "
37168 "system, which currently can be C<installed> (a regular operating system) or "
37169 "C<installer> (some sort of install disk)."
37173 #: ../src/guestfs.pod:636
37175 "Further information is available about the operating system that can be "
37176 "installed using the regular inspection APIs like L</"
37177 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
37181 #: ../src/guestfs.pod:641
37183 "Some additional information specific to installer disks is also available "
37184 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
37185 "guestfs_inspect_is_multipart> calls."
37189 #: ../src/guestfs.pod:646
37190 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
37194 #: ../src/guestfs.pod:648
37196 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
37197 "ntfs-3g.org/> driver."
37201 #: ../src/guestfs.pod:651
37202 msgid "DRIVE LETTERS AND PATHS"
37206 #: ../src/guestfs.pod:653
37208 "DOS and Windows still use drive letters, and the filesystems are always "
37209 "treated as case insensitive by Windows itself, and therefore you might find "
37210 "a Windows configuration file referring to a path like C<c:\\windows"
37211 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
37212 "might be referred to as C</WINDOWS/System32>."
37216 #: ../src/guestfs.pod:659
37218 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
37219 "L</guestfs_inspect_get_drive_mappings>)"
37223 #: ../src/guestfs.pod:662
37225 "Dealing with separator characters (backslash vs forward slash) is outside "
37226 "the scope of libguestfs, but usually a simple character replacement will "
37231 #: ../src/guestfs.pod:666
37233 "To resolve the case insensitivity of paths, call L</"
37234 "guestfs_case_sensitive_path>."
37238 #: ../src/guestfs.pod:669
37239 msgid "ACCESSING THE WINDOWS REGISTRY"
37243 #: ../src/guestfs.pod:671
37245 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
37246 "files, through the library C<hivex> which is part of the libguestfs project "
37247 "although ships as a separate tarball. You have to locate and download the "
37248 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
37249 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
37250 "reg(1)> for more help on this issue."
37254 #: ../src/guestfs.pod:679
37255 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
37259 #: ../src/guestfs.pod:681
37261 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
37262 "provide something which looks like a Linux symlink. The way it tries to do "
37263 "the rewriting is described here:"
37267 #: ../src/guestfs.pod:685
37269 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
37274 #: ../src/guestfs.pod:687
37276 "The essential problem is that ntfs-3g simply does not have enough "
37277 "information to do a correct job. NTFS links can contain drive letters and "
37278 "references to external device GUIDs that ntfs-3g has no way of resolving. "
37279 "It is almost certainly the case that libguestfs callers should ignore what "
37280 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
37284 #: ../src/guestfs.pod:694
37286 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
37287 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
37288 "attribute, and read the raw reparse data from that (you can find the format "
37289 "documented in various places around the web)."
37293 #: ../src/guestfs.pod:699
37294 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
37298 #: ../src/guestfs.pod:701
37300 "There are other useful extended attributes that can be read from ntfs-3g "
37301 "filesystems (using L</guestfs_getxattr>). See:"
37305 #: ../src/guestfs.pod:704
37307 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
37311 #: ../src/guestfs.pod:706
37312 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
37316 #: ../src/guestfs.pod:708
37318 "Although we don't want to discourage you from using the C API, we will "
37319 "mention here that the same API is also available in other languages."
37323 #: ../src/guestfs.pod:711
37325 "The API is broadly identical in all supported languages. This means that "
37326 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
37327 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
37328 "OCaml. In other words, a straightforward, predictable isomorphism between "
37333 #: ../src/guestfs.pod:717
37335 "Error messages are automatically transformed into exceptions if the language "
37340 #: ../src/guestfs.pod:720
37342 "We don't try to \"object orientify\" parts of the API in OO languages, "
37343 "although contributors are welcome to write higher level APIs above what we "
37344 "provide in their favourite languages if they wish."
37348 #: ../src/guestfs.pod:726
37353 #: ../src/guestfs.pod:728
37355 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
37356 "identical to the C API. C++ classes and exceptions are not used."
37360 #: ../src/guestfs.pod:732
37365 #: ../src/guestfs.pod:734
37367 "The C# bindings are highly experimental. Please read the warnings at the "
37368 "top of C<csharp/Libguestfs.cs>."
37372 #: ../src/guestfs.pod:737
37377 #: ../src/guestfs.pod:739
37378 msgid "See L<guestfs-erlang(3)>."
37382 #: ../src/guestfs.pod:741
37387 #: ../src/guestfs.pod:743
37389 "This is the only language binding that is working but incomplete. Only "
37390 "calls which return simple integers have been bound in Haskell, and we are "
37391 "looking for help to complete this binding."
37395 #: ../src/guestfs.pod:747
37400 #: ../src/guestfs.pod:749
37402 "Full documentation is contained in the Javadoc which is distributed with "
37403 "libguestfs. For examples, see L<guestfs-java(3)>."
37407 #: ../src/guestfs.pod:752
37412 #: ../src/guestfs.pod:754
37413 msgid "See L<guestfs-ocaml(3)>."
37417 #: ../src/guestfs.pod:756
37422 #: ../src/guestfs.pod:758
37423 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
37427 #: ../src/guestfs.pod:760
37432 #: ../src/guestfs.pod:762
37434 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
37435 "the php-libguestfs package for your distribution."
37439 #: ../src/guestfs.pod:765
37440 msgid "The PHP binding only works correctly on 64 bit machines."
37444 #: ../src/guestfs.pod:767
37449 #: ../src/guestfs.pod:769
37450 msgid "See L<guestfs-python(3)>."
37454 #: ../src/guestfs.pod:771
37459 #: ../src/guestfs.pod:773
37460 msgid "See L<guestfs-ruby(3)>."
37464 #: ../src/guestfs.pod:775
37465 msgid "B<shell scripts>"
37469 #: ../src/guestfs.pod:777
37470 msgid "See L<guestfish(1)>."
37474 #: ../src/guestfs.pod:781
37475 msgid "LIBGUESTFS GOTCHAS"
37479 #: ../src/guestfs.pod:783
37481 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
37482 "system [...] that works in the way it is documented but is counterintuitive "
37483 "and almost invites mistakes.\""
37487 #: ../src/guestfs.pod:787
37489 "Since we developed libguestfs and the associated tools, there are several "
37490 "things we would have designed differently, but are now stuck with for "
37491 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
37492 "release, you can expect these to change. Beware of them."
37496 #: ../src/guestfs.pod:795
37497 msgid "Autosync / forgetting to sync."
37501 #: ../src/guestfs.pod:797
37503 "I<Update:> Autosync is enabled by default for all API users starting from "
37504 "libguestfs 1.5.24. This section only applies to older versions."
37508 #: ../src/guestfs.pod:800
37510 "When modifying a filesystem from C or another language, you B<must> unmount "
37511 "all filesystems and call L</guestfs_sync> explicitly before you close the "
37512 "libguestfs handle. You can also call:"
37516 #: ../src/guestfs.pod:804
37519 " guestfs_set_autosync (g, 1);\n"
37524 #: ../src/guestfs.pod:806
37526 "to have the unmount/sync done automatically for you when the handle 'g' is "
37527 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
37531 #: ../src/guestfs.pod:810
37533 "If you forget to do this, then it is entirely possible that your changes "
37534 "won't be written out, or will be partially written, or (very rarely) that "
37535 "you'll get disk corruption."
37539 #: ../src/guestfs.pod:814
37541 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
37542 "guestfish scripts that forget to sync will work just fine, which can make "
37543 "this very puzzling if you are trying to debug a problem."
37547 #: ../src/guestfs.pod:818
37548 msgid "Mount option C<-o sync> should not be the default."
37552 #: ../src/guestfs.pod:820
37554 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
37555 "libguestfs 1.13.16. This section only applies to older versions."
37559 #: ../src/guestfs.pod:823
37561 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
37562 "However C<-o sync> does not add any reliability benefit, but does have a "
37563 "very large performance impact."
37567 #: ../src/guestfs.pod:827
37569 "The work around is to use L</guestfs_mount_options> and set the mount "
37570 "options that you actually want to use."
37574 #: ../src/guestfs.pod:830
37575 msgid "Read-only should be the default."
37579 #: ../src/guestfs.pod:832
37581 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
37582 "specify I<--rw> if you want to make changes to the image."
37586 #: ../src/guestfs.pod:835
37587 msgid "This would reduce the potential to corrupt live VM images."
37591 #: ../src/guestfs.pod:837
37593 "Note that many filesystems change the disk when you just mount and unmount, "
37594 "even if you didn't perform any writes. You need to use L</"
37595 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
37599 #: ../src/guestfs.pod:841
37600 msgid "guestfish command line is hard to use."
37604 #: ../src/guestfs.pod:843
37606 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
37607 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
37608 "exist, so it fails. In earlier versions of guestfish the error message was "
37609 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
37610 "we should have used C<guestfish -c command> to run commands."
37614 #: ../src/guestfs.pod:850
37615 msgid "guestfish megabyte modifiers don't work right on all commands"
37619 #: ../src/guestfs.pod:852
37621 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
37622 "other modifiers). What guestfish actually does is to multiply the number "
37623 "part by the modifier part and pass the result to the C API. However this "
37624 "doesn't work for a few APIs which aren't expecting bytes, but are already "
37625 "expecting some other unit (eg. megabytes)."
37629 #: ../src/guestfs.pod:859
37630 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
37634 #: ../src/guestfs.pod:861
37637 " lvcreate LV VG 100M\n"
37642 #: ../src/guestfs.pod:863
37644 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
37645 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
37646 "megabytes * megabytes) logical volume. The error message you get from this "
37647 "is also a little obscure."
37651 #: ../src/guestfs.pod:868
37653 "This could be fixed in the generator by specially marking parameters and "
37654 "return values which take bytes or other units."
37658 #: ../src/guestfs.pod:871
37659 msgid "Ambiguity between devices and paths"
37663 #: ../src/guestfs.pod:873
37665 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
37666 "sdb2>) and a similar pathname. A file might just happen to be called "
37667 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
37671 #: ../src/guestfs.pod:878
37673 "In the current API we usually resolve this ambiguity by having two separate "
37674 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
37675 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
37676 "detecting if the path supplied begins with C</dev/>."
37680 #: ../src/guestfs.pod:884
37682 "To avoid both the ambiguity and the need to duplicate some calls, we could "
37683 "make paths/devices into structured names. One way to do this would be to "
37684 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
37685 "aspect of grub. Another way would be to use a structured type, equivalent "
37686 "to this OCaml type:"
37690 #: ../src/guestfs.pod:890
37693 " type path = Path of string | Device of int | Partition of int * int\n"
37698 #: ../src/guestfs.pod:892
37699 msgid "which would allow you to pass arguments like:"
37703 #: ../src/guestfs.pod:894
37706 " Path \"/foo/bar\"\n"
37707 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
37708 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
37709 " Path \"/dev/sdb2\" (* not a device *)\n"
37714 #: ../src/guestfs.pod:899
37716 "As you can see there are still problems to resolve even with this "
37717 "representation. Also consider how it might work in guestfish."
37721 #: ../src/guestfs.pod:904
37722 msgid "KEYS AND PASSPHRASES"
37726 #: ../src/guestfs.pod:906
37728 "Certain libguestfs calls take a parameter that contains sensitive key "
37729 "material, passed in as a C string."
37733 #: ../src/guestfs.pod:909
37735 "In the future we would hope to change the libguestfs implementation so that "
37736 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
37737 "swap. However this is I<not> done at the moment, because of the complexity "
37738 "of such an implementation."
37742 #: ../src/guestfs.pod:914
37744 "Therefore you should be aware that any key parameter you pass to libguestfs "
37745 "might end up being written out to the swap partition. If this is a concern, "
37746 "scrub the swap partition or don't use libguestfs on encrypted devices."
37750 #: ../src/guestfs.pod:919
37751 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
37755 #: ../src/guestfs.pod:921
37757 "All high-level libguestfs actions are synchronous. If you want to use "
37758 "libguestfs asynchronously then you must create a thread."
37762 #: ../src/guestfs.pod:924
37764 "Only use the handle from a single thread. Either use the handle exclusively "
37765 "from one thread, or provide your own mutex so that two threads cannot issue "
37766 "calls on the same handle at the same time."
37770 #: ../src/guestfs.pod:928
37772 "See the graphical program guestfs-browser for one possible architecture for "
37773 "multithreaded programs using libvirt and libguestfs."
37777 #: ../src/guestfs.pod:931
37782 #: ../src/guestfs.pod:933
37784 "Libguestfs needs a supermin appliance, which it finds by looking along an "
37789 #: ../src/guestfs.pod:936
37791 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
37792 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
37796 #: ../src/guestfs.pod:939
37798 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
37799 "to change the directories that libguestfs will search in. The value is a "
37800 "colon-separated list of paths. The current directory is I<not> searched "
37801 "unless the path contains an empty element or C<.>. For example "
37802 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
37803 "then C</usr/lib/guestfs>."
37807 #: ../src/guestfs.pod:946
37808 msgid "QEMU WRAPPERS"
37812 #: ../src/guestfs.pod:948
37814 "If you want to compile your own qemu, run qemu from a non-standard location, "
37815 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
37820 #: ../src/guestfs.pod:952
37822 "There is one important rule to remember: you I<must C<exec qemu>> as the "
37823 "last command in the shell script (so that qemu replaces the shell and "
37824 "becomes the direct child of the libguestfs-using program). If you don't do "
37825 "this, then the qemu process won't be cleaned up correctly."
37829 #: ../src/guestfs.pod:957
37831 "Here is an example of a wrapper, where I have built my own copy of qemu from "
37836 #: ../src/guestfs.pod:960
37840 " qemudir=/home/rjones/d/qemu\n"
37841 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
37846 #: ../src/guestfs.pod:964
37848 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
37849 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
37854 #: ../src/guestfs.pod:968
37857 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
37862 #: ../src/guestfs.pod:970
37864 "Note that libguestfs also calls qemu with the -help and -version options in "
37865 "order to determine features."
37869 #: ../src/guestfs.pod:973
37871 "Wrappers can also be used to edit the options passed to qemu. In the "
37872 "following example, the C<-machine ...> option (C<-machine> and the following "
37873 "argument) are removed from the command line and replaced with C<-machine pc,"
37874 "accel=tcg>. The while loop iterates over the options until it finds the "
37875 "right one to remove, putting the remaining options into the C<args> array."
37879 #: ../src/guestfs.pod:982
37883 " while [ $# -gt 0 ]; do\n"
37884 " case \"$1\" in\n"
37888 " args[i]=\"$1\"\n"
37897 #: ../src/guestfs.pod:994
37900 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
37905 #: ../src/guestfs.pod:996
37906 msgid "ATTACHING TO RUNNING DAEMONS"
37910 #: ../src/guestfs.pod:998
37912 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
37913 "babies. Use with caution."
37917 #: ../src/guestfs.pod:1001
37919 "I<Note (2):> This section explains how to attach to a running daemon from a "
37920 "low level perspective. For most users, simply using virt tools such as "
37921 "L<guestfish(1)> with the I<--live> option will \"just work\"."
37925 #: ../src/guestfs.pod:1005
37926 msgid "Using guestfs_set_attach_method"
37930 #: ../src/guestfs.pod:1007
37932 "By calling L</guestfs_set_attach_method> you can change how the library "
37933 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
37934 "ARCHITECTURE> for some background)."
37938 #: ../src/guestfs.pod:1011
37940 "The normal attach method is C<appliance>, where a small appliance is created "
37941 "containing the daemon, and then the library connects to this."
37945 #: ../src/guestfs.pod:1014
37947 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
37948 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
37949 "daemon over the Unix domain socket."
37953 #: ../src/guestfs.pod:1018
37955 "The normal use for this is to connect to a running virtual machine that "
37956 "contains a C<guestfsd> daemon, and send commands so you can read and write "
37957 "files inside the live virtual machine."
37961 #: ../src/guestfs.pod:1022
37962 msgid "Using guestfs_add_domain with live flag"
37966 #: ../src/guestfs.pod:1024
37968 "L</guestfs_add_domain> provides some help for getting the correct attach "
37969 "method. If you pass the C<live> option to this function, then (if the "
37970 "virtual machine is running) it will examine the libvirt XML looking for a "
37971 "virtio-serial channel to connect to:"
37975 #: ../src/guestfs.pod:1030
37982 " <channel type='unix'>\n"
37983 " <source mode='bind' path='/path/to/socket'/>\n"
37984 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
37993 #: ../src/guestfs.pod:1042
37995 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
37996 "method to C<unix:/path/to/socket>."
38000 #: ../src/guestfs.pod:1045
38002 "Some of the libguestfs tools (including guestfish) support a I<--live> "
38003 "option which is passed through to L</guestfs_add_domain> thus allowing you "
38004 "to attach to and modify live virtual machines."
38008 #: ../src/guestfs.pod:1049
38010 "The virtual machine needs to have been set up beforehand so that it has the "
38011 "virtio-serial channel and so that guestfsd is running inside it."
38015 #: ../src/guestfs.pod:1053
38016 msgid "ABI GUARANTEE"
38020 #: ../src/guestfs.pod:1055
38022 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
38023 "actions as outlined in this section. Although we will deprecate some "
38024 "actions, for example if they get replaced by newer calls, we will keep the "
38025 "old actions forever. This allows you the developer to program in confidence "
38026 "against the libguestfs API."
38030 #: ../src/guestfs.pod:1061
38031 msgid "BLOCK DEVICE NAMING"
38035 #: ../src/guestfs.pod:1063
38037 "In the kernel there is now quite a profusion of schemata for naming block "
38038 "devices (in this context, by I<block device> I mean a physical or virtual "
38039 "hard drive). The original Linux IDE driver used names starting with C</dev/"
38040 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
38041 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
38042 "for the old IDE driver (particularly for SATA devices) those devices also "
38043 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
38044 "paravirtualized drivers. This has created several different naming systems, "
38045 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
38049 #: ../src/guestfs.pod:1075
38051 "As discussed above, libguestfs uses a qemu appliance running an embedded "
38052 "Linux kernel to access block devices. We can run a variety of appliances "
38053 "based on a variety of Linux kernels."
38057 #: ../src/guestfs.pod:1079
38059 "This causes a problem for libguestfs because many API calls use device or "
38060 "partition names. Working scripts and the recipe (example) scripts that we "
38061 "make available over the internet could fail if the naming scheme changes."
38065 #: ../src/guestfs.pod:1084
38067 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
38068 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
38069 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
38070 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
38074 #: ../src/guestfs.pod:1090
38076 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
38077 "L</guestfs_list_partitions> and similar calls return the true names of the "
38078 "devices and partitions as known to the appliance."
38082 #: ../src/guestfs.pod:1095
38083 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
38087 #: ../src/guestfs.pod:1097
38089 "Usually this translation is transparent. However in some (very rare) cases "
38090 "you may need to know the exact algorithm. Such cases include where you use "
38091 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
38092 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
38096 #: ../src/guestfs.pod:1103
38098 "The algorithm is applied only to I<parameters> which are known to be either "
38099 "device or partition names. Return values from functions such as L</"
38100 "guestfs_list_devices> are never changed."
38104 #: ../src/guestfs.pod:1111
38105 msgid "Is the string a parameter which is a device or partition name?"
38109 #: ../src/guestfs.pod:1115
38110 msgid "Does the string begin with C</dev/sd>?"
38114 #: ../src/guestfs.pod:1119
38116 "Does the named device exist? If so, we use that device. However if I<not> "
38117 "then we continue with this algorithm."
38121 #: ../src/guestfs.pod:1124
38122 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
38126 #: ../src/guestfs.pod:1126
38127 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
38131 #: ../src/guestfs.pod:1128
38132 msgid "If that named device exists, use it. If not, continue."
38136 #: ../src/guestfs.pod:1132
38137 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
38141 #: ../src/guestfs.pod:1134
38142 msgid "If that named device exists, use it. If not, return an error."
38146 #: ../src/guestfs.pod:1138
38147 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
38151 #: ../src/guestfs.pod:1140
38153 "Although the standard naming scheme and automatic translation is useful for "
38154 "simple programs and guestfish scripts, for larger programs it is best not to "
38155 "rely on this mechanism."
38159 #: ../src/guestfs.pod:1144
38161 "Where possible for maximum future portability programs using libguestfs "
38162 "should use these future-proof techniques:"
38166 #: ../src/guestfs.pod:1151
38168 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
38169 "device names, and then use those names directly."
38173 #: ../src/guestfs.pod:1154
38175 "Since those device names exist by definition, they will never be translated."
38179 #: ../src/guestfs.pod:1159
38181 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
38182 "filesystem labels."
38186 #: ../src/guestfs.pod:1166
38188 "This section discusses security implications of using libguestfs, "
38189 "particularly with untrusted or malicious guests or disk images."
38193 #: ../src/guestfs.pod:1169
38194 msgid "GENERAL SECURITY CONSIDERATIONS"
38198 #: ../src/guestfs.pod:1171
38200 "Be careful with any files or data that you download from a guest (by "
38201 "\"download\" we mean not just the L</guestfs_download> command but any "
38202 "command that reads files, filenames, directories or anything else from a "
38203 "disk image). An attacker could manipulate the data to fool your program "
38204 "into doing the wrong thing. Consider cases such as:"
38208 #: ../src/guestfs.pod:1181
38209 msgid "the data (file etc) not being present"
38213 #: ../src/guestfs.pod:1185
38214 msgid "being present but empty"
38218 #: ../src/guestfs.pod:1189
38219 msgid "being much larger than normal"
38223 #: ../src/guestfs.pod:1193
38224 msgid "containing arbitrary 8 bit data"
38228 #: ../src/guestfs.pod:1197
38229 msgid "being in an unexpected character encoding"
38233 #: ../src/guestfs.pod:1201
38234 msgid "containing homoglyphs."
38238 #: ../src/guestfs.pod:1205
38239 msgid "SECURITY OF MOUNTING FILESYSTEMS"
38243 #: ../src/guestfs.pod:1207
38245 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
38246 "(VFS) module can sometimes be escalated into exploits by deliberately "
38247 "creating a malicious, malformed filesystem. These exploits are very severe "
38248 "for two reasons. Firstly there are very many filesystem drivers in the "
38249 "kernel, and many of them are infrequently used and not much developer "
38250 "attention has been paid to the code. Linux userspace helps potential "
38251 "crackers by detecting the filesystem type and automatically choosing the "
38252 "right VFS driver, even if that filesystem type is obscure or unexpected for "
38253 "the administrator. Secondly, a kernel-level exploit is like a local root "
38254 "exploit (worse in some ways), giving immediate and total access to the "
38255 "system right down to the hardware level."
38259 #: ../src/guestfs.pod:1220
38261 "That explains why you should never mount a filesystem from an untrusted "
38262 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
38263 "inside a qemu virtual machine, usually running as a non-root user. The "
38264 "attacker would need to write a filesystem which first exploited the kernel, "
38265 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
38266 "the libguestfs protocol, and finally to be as serious as the host kernel "
38267 "exploit it would need to escalate its privileges to root. This multi-step "
38268 "escalation, performed by a static piece of data, is thought to be extremely "
38269 "hard to do, although we never say 'never' about security issues."
38273 #: ../src/guestfs.pod:1231
38275 "In any case callers can reduce the attack surface by forcing the filesystem "
38276 "type when mounting (use L</guestfs_mount_vfs>)."
38280 #: ../src/guestfs.pod:1234
38281 msgid "PROTOCOL SECURITY"
38285 #: ../src/guestfs.pod:1236
38287 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
38288 "defined upper message size. However a program that uses libguestfs must "
38289 "also take care - for example you can write a program that downloads a binary "
38290 "from a disk image and executes it locally, and no amount of protocol "
38291 "security will save you from the consequences."
38295 #: ../src/guestfs.pod:1242
38296 msgid "INSPECTION SECURITY"
38300 #: ../src/guestfs.pod:1244
38302 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
38303 "directly from the guest, and these could contain any 8 bit data. Callers "
38304 "should be careful to escape these before printing them to a structured file "
38305 "(for example, use HTML escaping if creating a web page)."
38309 #: ../src/guestfs.pod:1250
38311 "Guest configuration may be altered in unusual ways by the administrator of "
38312 "the virtual machine, and may not reflect reality (particularly for untrusted "
38313 "or actively malicious guests). For example we parse the hostname from "
38314 "configuration files like C</etc/sysconfig/network> that we find in the "
38315 "guest, but the guest administrator can easily manipulate these files to "
38316 "provide the wrong hostname."
38320 #: ../src/guestfs.pod:1258
38322 "The inspection API parses guest configuration using two external libraries: "
38323 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
38324 "designed to be robust in the face of malicious data, although denial of "
38325 "service attacks are still possible, for example with oversized configuration "
38330 #: ../src/guestfs.pod:1264
38331 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
38335 #: ../src/guestfs.pod:1266
38337 "Be very cautious about running commands from the guest. By running a "
38338 "command in the guest, you are giving CPU time to a binary that you do not "
38339 "control, under the same user account as the library, albeit wrapped in qemu "
38340 "virtualization. More information and alternatives can be found in the "
38341 "section L</RUNNING COMMANDS>."
38345 #: ../src/guestfs.pod:1272
38346 msgid "CVE-2010-3851"
38350 #: ../src/guestfs.pod:1274
38351 msgid "https://bugzilla.redhat.com/642934"
38355 #: ../src/guestfs.pod:1276
38357 "This security bug concerns the automatic disk format detection that qemu "
38358 "does on disk images."
38362 #: ../src/guestfs.pod:1279
38364 "A raw disk image is just the raw bytes, there is no header. Other disk "
38365 "images like qcow2 contain a special header. Qemu deals with this by looking "
38366 "for one of the known headers, and if none is found then assuming the disk "
38367 "image must be raw."
38371 #: ../src/guestfs.pod:1284
38373 "This allows a guest which has been given a raw disk image to write some "
38374 "other header. At next boot (or when the disk image is accessed by "
38375 "libguestfs) qemu would do autodetection and think the disk image format was, "
38376 "say, qcow2 based on the header written by the guest."
38380 #: ../src/guestfs.pod:1289
38382 "This in itself would not be a problem, but qcow2 offers many features, one "
38383 "of which is to allow a disk image to refer to another image (called the "
38384 "\"backing disk\"). It does this by placing the path to the backing disk "
38385 "into the qcow2 header. This path is not validated and could point to any "
38386 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
38387 "\"holes\" in the qcow2 disk image, which of course is completely under the "
38388 "control of the attacker."
38392 #: ../src/guestfs.pod:1297
38394 "In libguestfs this is rather hard to exploit except under two circumstances:"
38398 #: ../src/guestfs.pod:1304
38399 msgid "You have enabled the network or have opened the disk in write mode."
38403 #: ../src/guestfs.pod:1308
38405 "You are also running untrusted code from the guest (see L</RUNNING "
38410 #: ../src/guestfs.pod:1313
38412 "The way to avoid this is to specify the expected disk format when adding "
38413 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
38414 "should always do this if the disk is raw format, and it's a good idea for "
38419 #: ../src/guestfs.pod:1318
38421 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
38422 "format is fetched from libvirt and passed through."
38426 #: ../src/guestfs.pod:1321
38428 "For libguestfs tools, use the I<--format> command line parameter as "
38433 #: ../src/guestfs.pod:1324
38434 msgid "CONNECTION MANAGEMENT"
38438 #: ../src/guestfs.pod:1326
38439 msgid "guestfs_h *"
38443 #: ../src/guestfs.pod:1328
38445 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
38446 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
38447 "handle and release all resources used."
38451 #: ../src/guestfs.pod:1332
38453 "For information on using multiple handles and threads, see the section L</"
38454 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
38458 #: ../src/guestfs.pod:1335
38459 msgid "guestfs_create"
38463 #: ../src/guestfs.pod:1337
38466 " guestfs_h *guestfs_create (void);\n"
38471 #: ../src/guestfs.pod:1339
38472 msgid "Create a connection handle."
38476 #: ../src/guestfs.pod:1341
38478 "On success this returns a non-NULL pointer to a handle. On error it returns "
38483 #: ../src/guestfs.pod:1344
38485 "You have to \"configure\" the handle after creating it. This includes "
38486 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
38487 "handle at least once."
38491 #: ../src/guestfs.pod:1348
38492 msgid "After configuring the handle, you have to call L</guestfs_launch>."
38496 #: ../src/guestfs.pod:1350
38498 "You may also want to configure error handling for the handle. See the L</"
38499 "ERROR HANDLING> section below."
38503 #: ../src/guestfs.pod:1353
38504 msgid "guestfs_close"
38508 #: ../src/guestfs.pod:1355
38511 " void guestfs_close (guestfs_h *g);\n"
38516 #: ../src/guestfs.pod:1357
38517 msgid "This closes the connection handle and frees up all resources used."
38521 #: ../src/guestfs.pod:1359
38523 "If autosync was set on the handle and the handle was launched, then this "
38524 "implicitly calls various functions to unmount filesystems and sync the "
38525 "disk. See L</guestfs_set_autosync> for more details."
38529 #: ../src/guestfs.pod:1363
38530 msgid "If a close callback was set on the handle, then it is called."
38534 #: ../src/guestfs.pod:1365
38535 msgid "ERROR HANDLING"
38539 #: ../src/guestfs.pod:1367
38541 "API functions can return errors. For example, almost all functions that "
38542 "return C<int> will return C<-1> to indicate an error."
38546 #: ../src/guestfs.pod:1370
38548 "Additional information is available for errors: an error message string and "
38549 "optionally an error number (errno) if the thing that failed was a system "
38554 #: ../src/guestfs.pod:1374
38556 "You can get at the additional information about the last error on the handle "
38557 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
38558 "up an error handler with L</guestfs_set_error_handler>."
38562 #: ../src/guestfs.pod:1379
38564 "When the handle is created, a default error handler is installed which "
38565 "prints the error message string to C<stderr>. For small short-running "
38566 "command line programs it is sufficient to do:"
38570 #: ../src/guestfs.pod:1383
38573 " if (guestfs_launch (g) == -1)\n"
38574 " exit (EXIT_FAILURE);\n"
38579 #: ../src/guestfs.pod:1386
38581 "since the default error handler will ensure that an error message has been "
38582 "printed to C<stderr> before the program exits."
38586 #: ../src/guestfs.pod:1389
38588 "For other programs the caller will almost certainly want to install an "
38589 "alternate error handler or do error handling in-line like this:"
38593 #: ../src/guestfs.pod:1392
38596 " /* This disables the default behaviour of printing errors\n"
38598 " guestfs_set_error_handler (g, NULL, NULL);\n"
38603 #: ../src/guestfs.pod:1396
38606 " if (guestfs_launch (g) == -1) {\n"
38607 " /* Examine the error message and print it etc. */\n"
38608 " char *msg = guestfs_last_error (g);\n"
38609 " int errnum = guestfs_last_errno (g);\n"
38610 " fprintf (stderr, \"%s\", msg);\n"
38611 " if (errnum != 0)\n"
38612 " fprintf (stderr, \": %s\", strerror (errnum));\n"
38613 " fprintf (stderr, \"\\n\");\n"
38620 #: ../src/guestfs.pod:1407
38622 "Out of memory errors are handled differently. The default action is to call "
38623 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
38624 "guestfs_set_out_of_memory_handler>."
38628 #: ../src/guestfs.pod:1411
38630 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
38631 "because there is no handle if this happens there is no way to get additional "
38632 "error information. However L</guestfs_create> is supposed to be a "
38633 "lightweight operation which can only fail because of insufficient memory (it "
38634 "returns NULL in this case)."
38638 #: ../src/guestfs.pod:1417
38639 msgid "guestfs_last_error"
38643 #: ../src/guestfs.pod:1419
38646 " const char *guestfs_last_error (guestfs_h *g);\n"
38651 #: ../src/guestfs.pod:1421
38653 "This returns the last error message that happened on C<g>. If there has not "
38654 "been an error since the handle was created, then this returns C<NULL>."
38658 #: ../src/guestfs.pod:1425
38660 "The lifetime of the returned string is until the next error occurs, or L</"
38661 "guestfs_close> is called."
38665 #: ../src/guestfs.pod:1428
38666 msgid "guestfs_last_errno"
38670 #: ../src/guestfs.pod:1430
38673 " int guestfs_last_errno (guestfs_h *g);\n"
38678 #: ../src/guestfs.pod:1432
38679 msgid "This returns the last error number (errno) that happened on C<g>."
38683 #: ../src/guestfs.pod:1434
38684 msgid "If successful, an errno integer not equal to zero is returned."
38688 #: ../src/guestfs.pod:1436
38690 "If no error, this returns 0. This call can return 0 in three situations:"
38694 #: ../src/guestfs.pod:1443
38695 msgid "There has not been any error on the handle."
38699 #: ../src/guestfs.pod:1447
38701 "There has been an error but the errno was meaningless. This corresponds to "
38702 "the case where the error did not come from a failed system call, but for "
38703 "some other reason."
38707 #: ../src/guestfs.pod:1453
38709 "There was an error from a failed system call, but for some reason the errno "
38710 "was not captured and returned. This usually indicates a bug in libguestfs."
38714 #: ../src/guestfs.pod:1459
38716 "Libguestfs tries to convert the errno from inside the applicance into a "
38717 "corresponding errno for the caller (not entirely trivial: the appliance "
38718 "might be running a completely different operating system from the library "
38719 "and error numbers are not standardized across Un*xen). If this could not be "
38720 "done, then the error is translated to C<EINVAL>. In practice this should "
38721 "only happen in very rare circumstances."
38725 #: ../src/guestfs.pod:1467
38726 msgid "guestfs_set_error_handler"
38730 #: ../src/guestfs.pod:1469
38733 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
38735 " const char *msg);\n"
38736 " void guestfs_set_error_handler (guestfs_h *g,\n"
38737 " guestfs_error_handler_cb cb,\n"
38738 " void *opaque);\n"
38743 #: ../src/guestfs.pod:1476
38745 "The callback C<cb> will be called if there is an error. The parameters "
38746 "passed to the callback are an opaque data pointer and the error message "
38751 #: ../src/guestfs.pod:1480
38753 "C<errno> is not passed to the callback. To get that the callback must call "
38754 "L</guestfs_last_errno>."
38758 #: ../src/guestfs.pod:1483
38760 "Note that the message string C<msg> is freed as soon as the callback "
38761 "function returns, so if you want to stash it somewhere you must make your "
38766 #: ../src/guestfs.pod:1487
38767 msgid "The default handler prints messages on C<stderr>."
38771 #: ../src/guestfs.pod:1489
38772 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
38776 #: ../src/guestfs.pod:1491
38777 msgid "guestfs_get_error_handler"
38781 #: ../src/guestfs.pod:1493
38784 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
38785 " void **opaque_rtn);\n"
38790 #: ../src/guestfs.pod:1496
38791 msgid "Returns the current error handler callback."
38795 #: ../src/guestfs.pod:1498
38796 msgid "guestfs_set_out_of_memory_handler"
38800 #: ../src/guestfs.pod:1500
38803 " typedef void (*guestfs_abort_cb) (void);\n"
38804 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
38805 " guestfs_abort_cb);\n"
38810 #: ../src/guestfs.pod:1504
38812 "The callback C<cb> will be called if there is an out of memory situation. "
38813 "I<Note this callback must not return>."
38817 #: ../src/guestfs.pod:1507
38818 msgid "The default is to call L<abort(3)>."
38822 #: ../src/guestfs.pod:1509
38824 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
38828 #: ../src/guestfs.pod:1512
38829 msgid "guestfs_get_out_of_memory_handler"
38833 #: ../src/guestfs.pod:1514
38836 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
38841 #: ../src/guestfs.pod:1516
38842 msgid "This returns the current out of memory handler."
38846 #: ../src/guestfs.pod:1518
38851 #: ../src/guestfs.pod:1522
38856 #: ../src/guestfs.pod:1524
38861 #: ../src/guestfs.pod:1526
38862 msgid "AVAILABILITY"
38866 #: ../src/guestfs.pod:1528
38867 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
38871 #: ../src/guestfs.pod:1530
38873 "Using L</guestfs_available> you can test availability of the following "
38874 "groups of functions. This test queries the appliance to see if the "
38875 "appliance you are currently using supports the functionality."
38879 #: ../src/guestfs.pod:1535
38880 msgid "@AVAILABILITY@"
38884 #: ../src/guestfs.pod:1537
38885 msgid "GUESTFISH supported COMMAND"
38889 #: ../src/guestfs.pod:1539
38891 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
38892 "prints out the available groups and whether they are supported by this build "
38893 "of libguestfs. Note however that you have to do C<run> first."
38897 #: ../src/guestfs.pod:1544
38898 msgid "SINGLE CALLS AT COMPILE TIME"
38902 #: ../src/guestfs.pod:1546
38904 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
38905 "function, such as:"
38909 #: ../src/guestfs.pod:1549
38912 " #define LIBGUESTFS_HAVE_DD 1\n"
38917 #: ../src/guestfs.pod:1551
38918 msgid "if L</guestfs_dd> is available."
38922 #: ../src/guestfs.pod:1553
38924 "Before version 1.5.8, if you needed to test whether a single libguestfs "
38925 "function is available at compile time, we recommended using build tools such "
38926 "as autoconf or cmake. For example in autotools you could use:"
38930 #: ../src/guestfs.pod:1558
38933 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
38934 " AC_CHECK_FUNCS([guestfs_dd])\n"
38939 #: ../src/guestfs.pod:1561
38941 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
38946 #: ../src/guestfs.pod:1564
38947 msgid "SINGLE CALLS AT RUN TIME"
38951 #: ../src/guestfs.pod:1566
38953 "Testing at compile time doesn't guarantee that a function really exists in "
38954 "the library. The reason is that you might be dynamically linked against a "
38955 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
38956 "This situation unfortunately results in a segmentation fault, which is a "
38957 "shortcoming of the C dynamic linking system itself."
38961 #: ../src/guestfs.pod:1573
38963 "You can use L<dlopen(3)> to test if a function is available at run time, as "
38964 "in this example program (note that you still need the compile time check as "
38969 #: ../src/guestfs.pod:1577
38972 " #include <stdio.h>\n"
38973 " #include <stdlib.h>\n"
38974 " #include <unistd.h>\n"
38975 " #include <dlfcn.h>\n"
38976 " #include <guestfs.h>\n"
38981 #: ../src/guestfs.pod:1583
38986 " #ifdef LIBGUESTFS_HAVE_DD\n"
38988 " int has_function;\n"
38993 #: ../src/guestfs.pod:1589
38996 " /* Test if the function guestfs_dd is really available. */\n"
38997 " dl = dlopen (NULL, RTLD_LAZY);\n"
38999 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
39000 " exit (EXIT_FAILURE);\n"
39002 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
39008 #: ../src/guestfs.pod:1598
39011 " if (!has_function)\n"
39012 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
39014 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
39015 " /* Now it's safe to call\n"
39016 " guestfs_dd (g, \"foo\", \"bar\");\n"
39020 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
39027 #: ../src/guestfs.pod:1611
39029 "You may think the above is an awful lot of hassle, and it is. There are "
39030 "other ways outside of the C linking system to ensure that this kind of "
39031 "incompatibility never arises, such as using package versioning:"
39035 #: ../src/guestfs.pod:1616
39038 " Requires: libguestfs >= 1.0.80\n"
39043 #: ../src/guestfs.pod:1618
39044 msgid "CALLS WITH OPTIONAL ARGUMENTS"
39048 #: ../src/guestfs.pod:1620
39050 "A recent feature of the API is the introduction of calls which take optional "
39051 "arguments. In C these are declared 3 ways. The main way is as a call which "
39052 "takes variable arguments (ie. C<...>), as in this example:"
39056 #: ../src/guestfs.pod:1625
39059 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
39064 #: ../src/guestfs.pod:1627
39066 "Call this with a list of optional arguments, terminated by C<-1>. So to "
39067 "call with no optional arguments specified:"
39071 #: ../src/guestfs.pod:1630
39074 " guestfs_add_drive_opts (g, filename, -1);\n"
39079 #: ../src/guestfs.pod:1632
39080 msgid "With a single optional argument:"
39084 #: ../src/guestfs.pod:1634
39087 " guestfs_add_drive_opts (g, filename,\n"
39088 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
39094 #: ../src/guestfs.pod:1638
39099 #: ../src/guestfs.pod:1640
39102 " guestfs_add_drive_opts (g, filename,\n"
39103 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
39104 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
39110 #: ../src/guestfs.pod:1645
39112 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
39117 #: ../src/guestfs.pod:1648
39118 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
39122 #: ../src/guestfs.pod:1650
39124 "The second variant has the same name with the suffix C<_va>, which works the "
39125 "same way but takes a C<va_list>. See the C manual for details. For the "
39126 "example function, this is declared:"
39130 #: ../src/guestfs.pod:1654
39133 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
39134 " va_list args);\n"
39139 #: ../src/guestfs.pod:1657
39140 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
39144 #: ../src/guestfs.pod:1659
39146 "The third variant is useful where you need to construct these calls. You "
39147 "pass in a structure where you fill in the optional fields. The structure "
39148 "has a bitmask as the first element which you must set to indicate which "
39149 "fields you have filled in. For our example function the structure and call "
39154 #: ../src/guestfs.pod:1665
39157 " struct guestfs_add_drive_opts_argv {\n"
39158 " uint64_t bitmask;\n"
39160 " const char *format;\n"
39163 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
39164 " const struct guestfs_add_drive_opts_argv *optargs);\n"
39169 #: ../src/guestfs.pod:1674
39170 msgid "You could call it like this:"
39174 #: ../src/guestfs.pod:1676
39177 " struct guestfs_add_drive_opts_argv optargs = {\n"
39178 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
39179 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
39180 " .readonly = 1,\n"
39181 " .format = \"qcow2\"\n"
39187 #: ../src/guestfs.pod:1683
39190 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
39195 #: ../src/guestfs.pod:1691
39196 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
39200 #: ../src/guestfs.pod:1696
39201 msgid "You do not need to fill in all fields of the structure."
39205 #: ../src/guestfs.pod:1700
39207 "There must be a one-to-one correspondence between fields of the structure "
39208 "that are filled in, and bits set in the bitmask."
39212 #: ../src/guestfs.pod:1705
39213 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
39217 #: ../src/guestfs.pod:1707
39219 "In other languages, optional arguments are expressed in the way that is "
39220 "natural for that language. We refer you to the language-specific "
39221 "documentation for more details on that."
39225 #: ../src/guestfs.pod:1711
39226 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
39230 #: ../src/guestfs.pod:1713
39231 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
39235 #: ../src/guestfs.pod:1715
39237 "B<Note:> This section documents the generic event mechanism introduced in "
39238 "libguestfs 1.10, which you should use in new code if possible. The old "
39239 "functions C<guestfs_set_log_message_callback>, "
39240 "C<guestfs_set_subprocess_quit_callback>, "
39241 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
39242 "C<guestfs_set_progress_callback> are no longer documented in this manual "
39243 "page. Because of the ABI guarantee, the old functions continue to work."
39247 #: ../src/guestfs.pod:1724
39249 "Handles generate events when certain things happen, such as log messages "
39250 "being generated, progress messages during long-running operations, or the "
39251 "handle being closed. The API calls described below let you register a "
39252 "callback to be called when events happen. You can register multiple "
39253 "callbacks (for the same, different or overlapping sets of events), and "
39254 "individually remove callbacks. If callbacks are not removed, then they "
39255 "remain in force until the handle is closed."
39259 #: ../src/guestfs.pod:1732
39261 "In the current implementation, events are only generated synchronously: that "
39262 "means that events (and hence callbacks) can only happen while you are in the "
39263 "middle of making another libguestfs call. The callback is called in the "
39268 #: ../src/guestfs.pod:1737
39270 "Events may contain a payload, usually nothing (void), an array of 64 bit "
39271 "unsigned integers, or a message buffer. Payloads are discussed later on."
39275 #: ../src/guestfs.pod:1741
39276 msgid "CLASSES OF EVENTS"
39280 #: ../src/guestfs.pod:1745
39281 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
39285 #: ../src/guestfs.pod:1748
39287 "The callback function will be called while the handle is being closed "
39288 "(synchronously from L</guestfs_close>)."
39292 #: ../src/guestfs.pod:1751
39294 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
39295 "handles that are open when the program exits. This means that this callback "
39296 "might be called indirectly from L<exit(3)>, which can cause unexpected "
39297 "problems in higher-level languages (eg. if your HLL interpreter has already "
39298 "been cleaned up by the time this is called, and if your callback then jumps "
39299 "into some HLL function)."
39303 #: ../src/guestfs.pod:1758
39305 "If no callback is registered: the handle is closed without any callback "
39310 #: ../src/guestfs.pod:1761
39311 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
39315 #: ../src/guestfs.pod:1764
39317 "The callback function will be called when the child process quits, either "
39318 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
39319 "corresponds to a transition from any state to the CONFIG state)."
39323 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
39324 msgid "If no callback is registered: the event is ignored."
39328 #: ../src/guestfs.pod:1770
39329 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
39333 #: ../src/guestfs.pod:1773
39335 "The callback function will be called when the child process becomes ready "
39336 "first time after it has been launched. (This corresponds to a transition "
39337 "from LAUNCHING to the READY state)."
39341 #: ../src/guestfs.pod:1779
39342 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
39346 #: ../src/guestfs.pod:1782
39348 "Some long-running operations can generate progress messages. If this "
39349 "callback is registered, then it will be called each time a progress message "
39350 "is generated (usually two seconds after the operation started, and three "
39351 "times per second thereafter until it completes, although the frequency may "
39352 "change in future versions)."
39356 #: ../src/guestfs.pod:1788
39358 "The callback receives in the payload four unsigned 64 bit numbers which are "
39359 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
39363 #: ../src/guestfs.pod:1791
39365 "The units of C<total> are not defined, although for some operations C<total> "
39366 "may relate in some way to the amount of data to be transferred (eg. in bytes "
39367 "or megabytes), and C<position> may be the portion which has been transferred."
39371 #: ../src/guestfs.pod:1796
39372 msgid "The only defined and stable parts of the API are:"
39376 #: ../src/guestfs.pod:1802
39378 "The callback can display to the user some type of progress bar or indicator "
39379 "which shows the ratio of C<position>:C<total>."
39383 #: ../src/guestfs.pod:1807
39384 msgid "0 E<lt>= C<position> E<lt>= C<total>"
39388 #: ../src/guestfs.pod:1811
39390 "If any progress notification is sent during a call, then a final progress "
39391 "notification is always sent when C<position> = C<total> (I<unless> the call "
39392 "fails with an error)."
39396 #: ../src/guestfs.pod:1815
39398 "This is to simplify caller code, so callers can easily set the progress "
39399 "indicator to \"100%\" at the end of the operation, without requiring special "
39400 "code to detect this case."
39404 #: ../src/guestfs.pod:1821
39406 "For some calls we are unable to estimate the progress of the call, but we "
39407 "can still generate progress messages to indicate activity. This is known as "
39408 "\"pulse mode\", and is directly supported by certain progress bar "
39409 "implementations (eg. GtkProgressBar)."
39413 #: ../src/guestfs.pod:1826
39415 "For these calls, zero or more progress messages are generated with "
39416 "C<position = 0> and C<total = 1>, followed by a final message with "
39417 "C<position = total = 1>."
39421 #: ../src/guestfs.pod:1830
39423 "As noted above, if the call fails with an error then the final message may "
39424 "not be generated."
39428 #: ../src/guestfs.pod:1835
39430 "The callback also receives the procedure number (C<proc_nr>) and serial "
39431 "number (C<serial>) of the call. These are only useful for debugging "
39432 "protocol issues, and the callback can normally ignore them. The callback "
39433 "may want to print these numbers in error messages or debugging messages."
39437 #: ../src/guestfs.pod:1841
39438 msgid "If no callback is registered: progress messages are discarded."
39442 #: ../src/guestfs.pod:1843
39443 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
39447 #: ../src/guestfs.pod:1846
39449 "The callback function is called whenever a log message is generated by qemu, "
39450 "the appliance kernel, guestfsd (daemon), or utility programs."
39454 #: ../src/guestfs.pod:1849
39456 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
39457 "guestfs_launch>) then additional debug messages are generated."
39461 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
39463 "If no callback is registered: the messages are discarded unless the verbose "
39464 "flag is set in which case they are sent to stderr. You can override the "
39465 "printing of verbose messages to stderr by setting up a callback."
39469 #: ../src/guestfs.pod:1857
39470 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
39474 #: ../src/guestfs.pod:1860
39476 "The callback function is called whenever a log message is generated by the "
39477 "library part of libguestfs."
39481 #: ../src/guestfs.pod:1863
39483 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
39484 "messages are generated."
39488 #: ../src/guestfs.pod:1871
39489 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
39493 #: ../src/guestfs.pod:1874
39495 "The callback function is called whenever a trace message is generated. This "
39496 "only applies if the trace flag (L</guestfs_set_trace>) is set."
39500 #: ../src/guestfs.pod:1877
39502 "If no callback is registered: the messages are sent to stderr. You can "
39503 "override the printing of trace messages to stderr by setting up a callback."
39507 #: ../src/guestfs.pod:1881
39508 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
39512 #: ../src/guestfs.pod:1884
39514 "The callback function is called whenever a libguestfs function is entered."
39518 #: ../src/guestfs.pod:1887
39520 "The payload is a string which contains the name of the function that we are "
39521 "entering (not including C<guestfs_> prefix)."
39525 #: ../src/guestfs.pod:1890
39527 "Note that libguestfs functions can call themselves, so you may see many "
39528 "events from a single call. A few libguestfs functions do not generate this "
39533 #: ../src/guestfs.pod:1898
39534 msgid "guestfs_set_event_callback"
39538 #: ../src/guestfs.pod:1900
39541 " int guestfs_set_event_callback (guestfs_h *g,\n"
39542 " guestfs_event_callback cb,\n"
39543 " uint64_t event_bitmask,\n"
39545 " void *opaque);\n"
39550 #: ../src/guestfs.pod:1906
39552 "This function registers a callback (C<cb>) for all event classes in the "
39553 "C<event_bitmask>."
39557 #: ../src/guestfs.pod:1909
39559 "For example, to register for all log message events, you could call this "
39560 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
39561 "To register a single callback for all possible classes of events, use "
39562 "C<GUESTFS_EVENT_ALL>."
39566 #: ../src/guestfs.pod:1915
39567 msgid "C<flags> should always be passed as 0."
39571 #: ../src/guestfs.pod:1917
39573 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
39574 "it for any purpose."
39578 #: ../src/guestfs.pod:1920
39580 "The return value is the event handle (an integer) which you can use to "
39581 "delete the callback (see below)."
39585 #: ../src/guestfs.pod:1923
39587 "If there is an error, this function returns C<-1>, and sets the error in the "
39588 "handle in the usual way (see L</guestfs_last_error> etc.)"
39592 #: ../src/guestfs.pod:1926
39594 "Callbacks remain in effect until they are deleted, or until the handle is "
39599 #: ../src/guestfs.pod:1929
39601 "In the case where multiple callbacks are registered for a particular event "
39602 "class, all of the callbacks are called. The order in which multiple "
39603 "callbacks are called is not defined."
39607 #: ../src/guestfs.pod:1933
39608 msgid "guestfs_delete_event_callback"
39612 #: ../src/guestfs.pod:1935
39615 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
39620 #: ../src/guestfs.pod:1937
39622 "Delete a callback that was previously registered. C<event_handle> should be "
39623 "the integer that was returned by a previous call to "
39624 "C<guestfs_set_event_callback> on the same handle."
39628 #: ../src/guestfs.pod:1941
39629 msgid "guestfs_event_callback"
39633 #: ../src/guestfs.pod:1943
39636 " typedef void (*guestfs_event_callback) (\n"
39639 " uint64_t event,\n"
39640 " int event_handle,\n"
39642 " const char *buf, size_t buf_len,\n"
39643 " const uint64_t *array, size_t array_len);\n"
39648 #: ../src/guestfs.pod:1952
39650 "This is the type of the event callback function that you have to provide."
39654 #: ../src/guestfs.pod:1955
39656 "The basic parameters are: the handle (C<g>), the opaque user pointer "
39657 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
39658 "handle, and C<flags> which in the current API you should ignore."
39662 #: ../src/guestfs.pod:1959
39664 "The remaining parameters contain the event payload (if any). Each event may "
39665 "contain a payload, which usually relates to the event class, but for future "
39666 "proofing your code should be written to handle any payload for any event "
39671 #: ../src/guestfs.pod:1964
39673 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
39674 "there is no message buffer). Note that this message buffer can contain "
39675 "arbitrary 8 bit data, including NUL bytes."
39679 #: ../src/guestfs.pod:1968
39681 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
39682 "moment this is only used for progress messages."
39686 #: ../src/guestfs.pod:1971
39687 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
39691 #: ../src/guestfs.pod:1973
39693 "One motivation for the generic event API was to allow GUI programs to "
39694 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
39695 "unconditionally to C<stderr>."
39699 #: ../src/guestfs.pod:1977
39701 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
39702 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
39703 "messages are not events; you must capture error messages separately)."
39707 #: ../src/guestfs.pod:1982
39709 "Programs have to set up a callback to capture the classes of events of "
39714 #: ../src/guestfs.pod:1985
39718 " guestfs_set_event_callback\n"
39719 " (g, message_callback,\n"
39720 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
39721 " GUESTFS_EVENT_TRACE,\n"
39722 " 0, NULL) == -1)\n"
39723 " if (eh == -1) {\n"
39724 " // handle error in the usual way\n"
39730 #: ../src/guestfs.pod:1995
39732 "The callback can then direct messages to the appropriate place. In this "
39733 "example, messages are directed to syslog:"
39737 #: ../src/guestfs.pod:1998
39741 " message_callback (\n"
39744 " uint64_t event,\n"
39745 " int event_handle,\n"
39747 " const char *buf, size_t buf_len,\n"
39748 " const uint64_t *array, size_t array_len)\n"
39750 " const int priority = LOG_USER|LOG_INFO;\n"
39751 " if (buf_len > 0)\n"
39752 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
39758 #: ../src/guestfs.pod:2013
39759 msgid "CANCELLING LONG TRANSFERS"
39763 #: ../src/guestfs.pod:2015
39765 "Some operations can be cancelled by the caller while they are in progress. "
39766 "Currently only operations that involve uploading or downloading data can be "
39767 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
39768 "parameters in the generator)."
39772 #: ../src/guestfs.pod:2020
39773 msgid "guestfs_user_cancel"
39777 #: ../src/guestfs.pod:2022
39780 " void guestfs_user_cancel (guestfs_h *g);\n"
39785 #: ../src/guestfs.pod:2024
39787 "C<guestfs_user_cancel> cancels the current upload or download operation."
39791 #: ../src/guestfs.pod:2027
39793 "Unlike most other libguestfs calls, this function is signal safe and thread "
39794 "safe. You can call it from a signal handler or from another thread, without "
39795 "needing to do any locking."
39799 #: ../src/guestfs.pod:2031
39801 "The transfer that was in progress (if there is one) will stop shortly "
39802 "afterwards, and will return an error. The errno (see L</"
39803 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
39804 "out if the operation was cancelled or failed because of another error."
39808 #: ../src/guestfs.pod:2037
39810 "No cleanup is performed: for example, if a file was being uploaded then "
39811 "after cancellation there may be a partially uploaded file. It is the "
39812 "caller's responsibility to clean up if necessary."
39816 #: ../src/guestfs.pod:2041
39817 msgid "There are two common places that you might call C<guestfs_user_cancel>."
39821 #: ../src/guestfs.pod:2043
39823 "In an interactive text-based program, you might call it from a C<SIGINT> "
39824 "signal handler so that pressing C<^C> cancels the current operation. (You "
39825 "also need to call L</guestfs_set_pgroup> so that child processes don't "
39826 "receive the C<^C> signal)."
39830 #: ../src/guestfs.pod:2048
39832 "In a graphical program, when the main thread is displaying a progress bar "
39833 "with a cancel button, wire up the cancel button to call this function."
39837 #: ../src/guestfs.pod:2052
39838 msgid "PRIVATE DATA AREA"
39842 #: ../src/guestfs.pod:2054
39844 "You can attach named pieces of private data to the libguestfs handle, fetch "
39845 "them by name, and walk over them, for the lifetime of the handle. This is "
39846 "called the private data area and is only available from the C API."
39850 #: ../src/guestfs.pod:2059
39851 msgid "To attach a named piece of data, use the following call:"
39855 #: ../src/guestfs.pod:2061
39858 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
39863 #: ../src/guestfs.pod:2063
39865 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
39866 "pointer (which can be C<NULL>). Any previous item with the same key is "
39871 #: ../src/guestfs.pod:2067
39873 "You can use any C<key> you want, but your key should I<not> start with an "
39874 "underscore character. Keys beginning with an underscore character are "
39875 "reserved for internal libguestfs purposes (eg. for implementing language "
39876 "bindings). It is recommended that you prefix the key with some unique "
39877 "string to avoid collisions with other users."
39881 #: ../src/guestfs.pod:2073
39882 msgid "To retrieve the pointer, use:"
39886 #: ../src/guestfs.pod:2075
39889 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
39894 #: ../src/guestfs.pod:2077
39896 "This function returns C<NULL> if either no data is found associated with "
39897 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
39902 #: ../src/guestfs.pod:2081
39904 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
39905 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
39906 "all. In particular, libguestfs does I<not> try to free the data when the "
39907 "handle is closed. If the data must be freed, then the caller must either "
39908 "free it before calling L</guestfs_close> or must set up a close callback to "
39909 "do it (see L</GUESTFS_EVENT_CLOSE>)."
39913 #: ../src/guestfs.pod:2088
39914 msgid "To walk over all entries, use these two functions:"
39918 #: ../src/guestfs.pod:2090
39921 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
39926 #: ../src/guestfs.pod:2092
39929 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
39934 #: ../src/guestfs.pod:2094
39936 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
39937 "not have any particular meaning -- keys are not returned in any defined "
39938 "order). A pointer to the key is returned in C<*key_rtn> and the "
39939 "corresponding data pointer is returned from the function. C<NULL> is "
39940 "returned if there are no keys stored in the handle."
39944 #: ../src/guestfs.pod:2100
39946 "C<guestfs_next_private> returns the next key, pointer pair. The return "
39947 "value of this function is also C<NULL> is there are no further entries to "
39952 #: ../src/guestfs.pod:2104
39953 msgid "Notes about walking over entries:"
39957 #: ../src/guestfs.pod:2110
39959 "You must not call C<guestfs_set_private> while walking over the entries."
39963 #: ../src/guestfs.pod:2115
39965 "The handle maintains an internal iterator which is reset when you call "
39966 "C<guestfs_first_private>. This internal iterator is invalidated when you "
39967 "call C<guestfs_set_private>."
39971 #: ../src/guestfs.pod:2121
39972 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
39976 #: ../src/guestfs.pod:2123
39979 " guestfs_set_private (g, key, NULL);\n"
39984 #: ../src/guestfs.pod:2125
39985 msgid "then that C<key> is not returned when walking."
39989 #: ../src/guestfs.pod:2129
39991 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
39992 "C<guestfs_next_private> or C<guestfs_set_private>."
39996 #: ../src/guestfs.pod:2135
39998 "The following example code shows how to print all keys and data pointers "
39999 "that are associated with the handle C<g>:"
40003 #: ../src/guestfs.pod:2138
40006 " const char *key;\n"
40007 " void *data = guestfs_first_private (g, &key);\n"
40008 " while (data != NULL)\n"
40010 " printf (\"key = %s, data = %p\\n\", key, data);\n"
40011 " data = guestfs_next_private (g, &key);\n"
40017 #: ../src/guestfs.pod:2146
40019 "More commonly you are only interested in keys that begin with an application-"
40020 "specific prefix C<foo_>. Modify the loop like so:"
40024 #: ../src/guestfs.pod:2149
40027 " const char *key;\n"
40028 " void *data = guestfs_first_private (g, &key);\n"
40029 " while (data != NULL)\n"
40031 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
40032 " printf (\"key = %s, data = %p\\n\", key, data);\n"
40033 " data = guestfs_next_private (g, &key);\n"
40039 #: ../src/guestfs.pod:2158
40041 "If you need to modify keys while walking, then you have to jump back to the "
40042 "beginning of the loop. For example, to delete all keys prefixed with "
40047 #: ../src/guestfs.pod:2162
40050 " const char *key;\n"
40053 " data = guestfs_first_private (g, &key);\n"
40054 " while (data != NULL)\n"
40056 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
40058 " guestfs_set_private (g, key, NULL);\n"
40059 " /* note that 'key' pointer is now invalid, and so is\n"
40060 " the internal iterator */\n"
40063 " data = guestfs_next_private (g, &key);\n"
40069 #: ../src/guestfs.pod:2178
40071 "Note that the above loop is guaranteed to terminate because the keys are "
40072 "being deleted, but other manipulations of keys within the loop might not "
40073 "terminate unless you also maintain an indication of which keys have been "
40078 #: ../src/guestfs.pod:2183
40083 #: ../src/guestfs.pod:2185
40085 "The libguestfs C library can be probed using systemtap or DTrace. This is "
40086 "true of any library, not just libguestfs. However libguestfs also contains "
40087 "static markers to help in probing internal operations."
40091 #: ../src/guestfs.pod:2189
40092 msgid "You can list all the static markers by doing:"
40096 #: ../src/guestfs.pod:2191
40099 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
40100 " .provider(\"guestfs\").mark(\"*\")'\n"
40105 #: ../src/guestfs.pod:2194
40107 "B<Note:> These static markers are I<not> part of the stable API and may "
40108 "change in future versions."
40112 #: ../src/guestfs.pod:2197
40113 msgid "SYSTEMTAP SCRIPT EXAMPLE"
40117 #: ../src/guestfs.pod:2199
40119 "This script contains examples of displaying both the static markers and some "
40120 "ordinary C entry points:"
40124 #: ../src/guestfs.pod:2202
40132 #: ../src/guestfs.pod:2204
40135 " function display_time () {\n"
40136 " now = gettimeofday_us ();\n"
40139 " delta = now - last;\n"
40145 #: ../src/guestfs.pod:2211
40148 " printf (\"%d (+%d):\", now, delta);\n"
40154 #: ../src/guestfs.pod:2214
40159 " printf (\"ready\\n\");\n"
40165 #: ../src/guestfs.pod:2219
40168 " /* Display all calls to static markers. */\n"
40169 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
40170 " .provider(\"guestfs\").mark(\"*\") ? {\n"
40171 " display_time();\n"
40172 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
40178 #: ../src/guestfs.pod:2226
40181 " /* Display all calls to guestfs_mkfs* functions. */\n"
40182 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
40183 " .function(\"guestfs_mkfs*\") ? {\n"
40184 " display_time();\n"
40185 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
40191 #: ../src/guestfs.pod:2233
40193 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
40194 "program. Note that you either have to be root, or you have to add yourself "
40195 "to several special stap groups. Consult the systemtap documentation for "
40196 "more information."
40200 #: ../src/guestfs.pod:2238
40203 " # stap /tmp/test.stap\n"
40209 #: ../src/guestfs.pod:2241
40210 msgid "In another terminal, run a guestfish command such as this:"
40214 #: ../src/guestfs.pod:2245
40215 msgid "In the first terminal, stap trace output similar to this is shown:"
40219 #: ../src/guestfs.pod:2247
40222 " 1318248056692655 (+0):\tlaunch_start\n"
40223 " 1318248056692850 (+195): launch_build_appliance_start\n"
40224 " 1318248056818285 (+125435): launch_build_appliance_end\n"
40225 " 1318248056838059 (+19774): launch_run_qemu\n"
40226 " 1318248061071167 (+4233108): launch_end\n"
40227 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
40232 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
40237 #: ../src/guestfs.pod:2256
40239 "<!-- old anchor for the next section --> <a name="
40240 "\"state_machine_and_low_level_event_api\"/>"
40244 #: ../src/guestfs.pod:2261
40245 msgid "ARCHITECTURE"
40249 #: ../src/guestfs.pod:2263
40251 "Internally, libguestfs is implemented by running an appliance (a special "
40252 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
40253 "process of the main program."
40257 #: ../src/guestfs.pod:2267
40260 " ___________________\n"
40262 " | main program |\n"
40264 " | | child process / appliance\n"
40265 " | | __________________________\n"
40267 " +-------------------+ RPC | +-----------------+ |\n"
40268 " | libguestfs <--------------------> guestfsd | |\n"
40269 " | | | +-----------------+ |\n"
40270 " \\___________________/ | | Linux kernel | |\n"
40271 " | +--^--------------+ |\n"
40272 " \\_________|________________/\n"
40274 " _______v______\n"
40277 " | disk image |\n"
40278 " \\______________/\n"
40283 #: ../src/guestfs.pod:2287
40285 "The library, linked to the main program, creates the child process and hence "
40286 "the appliance in the L</guestfs_launch> function."
40290 #: ../src/guestfs.pod:2290
40292 "Inside the appliance is a Linux kernel and a complete stack of userspace "
40293 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
40294 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
40295 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
40296 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
40297 "attached to the qemu process which translates device access by the "
40298 "appliance's Linux kernel into accesses to the image."
40302 #: ../src/guestfs.pod:2299
40304 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
40305 "Although the disk image you are attached to might also be used by some "
40306 "virtual machine, libguestfs doesn't know or care about this. (But you will "
40307 "care if both libguestfs's qemu process and your virtual machine are trying "
40308 "to update the disk image at the same time, since these usually results in "
40309 "massive disk corruption)."
40313 #: ../src/guestfs.pod:2306
40314 msgid "STATE MACHINE"
40318 #: ../src/guestfs.pod:2308
40319 msgid "libguestfs uses a state machine to model the child process:"
40323 #: ../src/guestfs.pod:2310
40327 " guestfs_create\n"
40335 " / | \\ \\ guestfs_launch\n"
40336 " / | _\\__V______\n"
40338 " / | | LAUNCHING |\n"
40339 " / | \\___________/\n"
40341 " / | guestfs_launch\n"
40343 " ______ / __|____V\n"
40344 " / \\ ------> / \\\n"
40345 " | BUSY | | READY |\n"
40346 " \\______/ <------ \\________/\n"
40351 #: ../src/guestfs.pod:2332
40353 "The normal transitions are (1) CONFIG (when the handle is created, but there "
40354 "is no child process), (2) LAUNCHING (when the child process is booting up), "
40355 "(3) alternating between READY and BUSY as commands are issued to, and "
40356 "carried out by, the child process."
40360 #: ../src/guestfs.pod:2337
40362 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
40363 "asynchronously at any time (eg. due to some internal error), and that causes "
40364 "the state to transition back to CONFIG."
40368 #: ../src/guestfs.pod:2341
40370 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
40371 "issued when in the CONFIG state."
40375 #: ../src/guestfs.pod:2344
40377 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
40378 "L</guestfs_launch> blocks until the child process is READY to accept "
40379 "commands (or until some failure or timeout). L</guestfs_launch> internally "
40380 "moves the state from CONFIG to LAUNCHING while it is running."
40384 #: ../src/guestfs.pod:2350
40386 "API actions such as L</guestfs_mount> can only be issued when in the READY "
40387 "state. These API calls block waiting for the command to be carried out (ie. "
40388 "the state to transition to BUSY and then back to READY). There are no non-"
40389 "blocking versions, and no way to issue more than one command per handle at "
40394 #: ../src/guestfs.pod:2356
40396 "Finally, the child process sends asynchronous messages back to the main "
40397 "program, such as kernel log messages. You can register a callback to "
40398 "receive these messages."
40402 #: ../src/guestfs.pod:2360
40407 #: ../src/guestfs.pod:2362
40408 msgid "APPLIANCE BOOT PROCESS"
40412 #: ../src/guestfs.pod:2364
40414 "This process has evolved and continues to evolve. The description here "
40415 "corresponds only to the current version of libguestfs and is provided for "
40416 "information only."
40420 #: ../src/guestfs.pod:2368
40422 "In order to follow the stages involved below, enable libguestfs debugging "
40423 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
40427 #: ../src/guestfs.pod:2373
40428 msgid "Create the appliance"
40432 #: ../src/guestfs.pod:2375
40434 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
40435 "initrd and the appliance."
40439 #: ../src/guestfs.pod:2378
40441 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
40442 "directory if C<TMPDIR> is set)."
40446 #: ../src/guestfs.pod:2381
40448 "For a complete description of how the appliance is created and cached, read "
40449 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
40453 #: ../src/guestfs.pod:2385
40454 msgid "Start qemu and boot the kernel"
40458 #: ../src/guestfs.pod:2387
40459 msgid "qemu is invoked to boot the kernel."
40463 #: ../src/guestfs.pod:2389
40464 msgid "Run the initrd"
40468 #: ../src/guestfs.pod:2391
40470 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
40471 "appliance. The purpose of the initrd is to load enough kernel modules in "
40472 "order that the appliance itself can be mounted and started."
40476 #: ../src/guestfs.pod:2395
40478 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
40483 #: ../src/guestfs.pod:2398
40485 "When the initrd has started you will see messages showing that kernel "
40486 "modules are being loaded, similar to this:"
40490 #: ../src/guestfs.pod:2401
40493 " febootstrap: ext2 mini initrd starting up\n"
40494 " febootstrap: mounting /sys\n"
40495 " febootstrap: internal insmod libcrc32c.ko\n"
40496 " febootstrap: internal insmod crc32c-intel.ko\n"
40501 #: ../src/guestfs.pod:2406
40502 msgid "Find and mount the appliance device"
40506 #: ../src/guestfs.pod:2408
40508 "The appliance is a sparse file containing an ext2 filesystem which contains "
40509 "a familiar (although reduced in size) Linux operating system. It would "
40510 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
40514 #: ../src/guestfs.pod:2412
40516 "The regular disks being inspected by libguestfs are the first devices "
40517 "exposed by qemu (eg. as C</dev/vda>)."
40521 #: ../src/guestfs.pod:2415
40523 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
40524 "there was only one regular disk)."
40528 #: ../src/guestfs.pod:2418
40530 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
40531 "and switch root into the appliance, and run C</init> from the appliance."
40535 #: ../src/guestfs.pod:2422
40536 msgid "If this works successfully you will see messages such as:"
40540 #: ../src/guestfs.pod:2424
40543 " febootstrap: picked /sys/block/vdb/dev as root device\n"
40544 " febootstrap: creating /dev/root as block special 252:16\n"
40545 " febootstrap: mounting new root on /root\n"
40546 " febootstrap: chroot\n"
40547 " Starting /init script ...\n"
40552 #: ../src/guestfs.pod:2430
40554 "Note that C<Starting /init script ...> indicates that the appliance's init "
40555 "script is now running."
40559 #: ../src/guestfs.pod:2433
40560 msgid "Initialize the appliance"
40564 #: ../src/guestfs.pod:2435
40566 "The appliance itself now initializes itself. This involves starting certain "
40567 "processes like C<udev>, possibly printing some debug information, and "
40568 "finally running the daemon (C<guestfsd>)."
40572 #: ../src/guestfs.pod:2439
40577 #: ../src/guestfs.pod:2441
40579 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
40584 #: ../src/guestfs.pod:2444
40587 " verbose daemon enabled\n"
40592 #: ../src/guestfs.pod:2446
40594 "The daemon expects to see a named virtio-serial port exposed by qemu and "
40595 "connected on the other end to the library."
40599 #: ../src/guestfs.pod:2449
40601 "The daemon connects to this port (and hence to the library) and sends a four "
40602 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
40603 "protocol (see below)."
40607 #: ../src/guestfs.pod:2455
40608 msgid "COMMUNICATION PROTOCOL"
40612 #: ../src/guestfs.pod:2457
40614 "Don't rely on using this protocol directly. This section documents how it "
40615 "currently works, but it may change at any time."
40619 #: ../src/guestfs.pod:2460
40621 "The protocol used to talk between the library and the daemon running inside "
40622 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
40623 "1014, RFC 1832, RFC 4506)."
40627 #: ../src/guestfs.pod:2464
40629 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
40630 "this file is automatically generated)."
40634 #: ../src/guestfs.pod:2467
40636 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
40637 "and C<FileOut> parameters, which are handled with very simple request/reply "
40638 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
40639 "parameters, which use the same request and reply messages, but they may also "
40640 "be followed by files sent using a chunked encoding."
40644 #: ../src/guestfs.pod:2474
40645 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
40649 #: ../src/guestfs.pod:2476
40650 msgid "For ordinary functions, the request message is:"
40654 #: ../src/guestfs.pod:2478
40657 " total length (header + arguments,\n"
40658 " but not including the length word itself)\n"
40659 " struct guestfs_message_header (encoded as XDR)\n"
40660 " struct guestfs_<foo>_args (encoded as XDR)\n"
40665 #: ../src/guestfs.pod:2483
40667 "The total length field allows the daemon to allocate a fixed size buffer "
40668 "into which it slurps the rest of the message. As a result, the total length "
40669 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
40670 "effective size of any request is limited to somewhere under this size."
40674 #: ../src/guestfs.pod:2489
40676 "Note also that many functions don't take any arguments, in which case the "
40677 "C<guestfs_I<foo>_args> is completely omitted."
40681 #: ../src/guestfs.pod:2492
40683 "The header contains the procedure number (C<guestfs_proc>) which is how the "
40684 "receiver knows what type of args structure to expect, or none at all."
40688 #: ../src/guestfs.pod:2496
40690 "For functions that take optional arguments, the optional arguments are "
40691 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
40692 "arguments. A bitmask in the header indicates which optional arguments are "
40693 "meaningful. The bitmask is also checked to see if it contains bits set "
40694 "which the daemon does not know about (eg. if more optional arguments were "
40695 "added in a later version of the library), and this causes the call to be "
40700 #: ../src/guestfs.pod:2504
40701 msgid "The reply message for ordinary functions is:"
40705 #: ../src/guestfs.pod:2506
40708 " total length (header + ret,\n"
40709 " but not including the length word itself)\n"
40710 " struct guestfs_message_header (encoded as XDR)\n"
40711 " struct guestfs_<foo>_ret (encoded as XDR)\n"
40716 #: ../src/guestfs.pod:2511
40718 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
40719 "functions that return no formal return values."
40723 #: ../src/guestfs.pod:2514
40725 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
40729 #: ../src/guestfs.pod:2517
40731 "In the case of an error, a flag is set in the header, and the reply message "
40732 "is slightly changed:"
40736 #: ../src/guestfs.pod:2520
40739 " total length (header + error,\n"
40740 " but not including the length word itself)\n"
40741 " struct guestfs_message_header (encoded as XDR)\n"
40742 " struct guestfs_message_error (encoded as XDR)\n"
40747 #: ../src/guestfs.pod:2525
40749 "The C<guestfs_message_error> structure contains the error message as a "
40754 #: ../src/guestfs.pod:2528
40755 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
40759 #: ../src/guestfs.pod:2530
40761 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
40762 "The normal request message is sent (see above). However this is followed by "
40763 "a sequence of file chunks."
40767 #: ../src/guestfs.pod:2534
40770 " total length (header + arguments,\n"
40771 " but not including the length word itself,\n"
40772 " and not including the chunks)\n"
40773 " struct guestfs_message_header (encoded as XDR)\n"
40774 " struct guestfs_<foo>_args (encoded as XDR)\n"
40775 " sequence of chunks for FileIn param #0\n"
40776 " sequence of chunks for FileIn param #1 etc.\n"
40781 #: ../src/guestfs.pod:2542
40782 msgid "The \"sequence of chunks\" is:"
40786 #: ../src/guestfs.pod:2544
40789 " length of chunk (not including length word itself)\n"
40790 " struct guestfs_chunk (encoded as XDR)\n"
40791 " length of chunk\n"
40792 " struct guestfs_chunk (encoded as XDR)\n"
40794 " length of chunk\n"
40795 " struct guestfs_chunk (with data.data_len == 0)\n"
40800 #: ../src/guestfs.pod:2552
40802 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
40803 "is set in the final chunk to indicate either successful completion or early "
40808 #: ../src/guestfs.pod:2556
40810 "At time of writing there are no functions that have more than one FileIn "
40811 "parameter. However this is (theoretically) supported, by sending the "
40812 "sequence of chunks for each FileIn parameter one after another (from left to "
40817 #: ../src/guestfs.pod:2561
40819 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
40820 "transfer. The library does this by sending a chunk with a special flag set "
40821 "to indicate cancellation. When the daemon sees this, it cancels the whole "
40822 "RPC, does I<not> send any reply, and goes back to reading the next request."
40826 #: ../src/guestfs.pod:2567
40828 "The daemon may also cancel. It does this by writing a special word "
40829 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
40830 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
40831 "cancel chunk). The special word is chosen so that even if cancellation "
40832 "happens right at the end of the transfer (after the library has finished "
40833 "writing and has started listening for the reply), the \"spurious\" cancel "
40834 "flag will not be confused with the reply message."
40838 #: ../src/guestfs.pod:2576
40840 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
40841 "limit), and also files where the size is not known in advance (eg. from "
40842 "pipes or sockets). However the chunks are rather small "
40843 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
40844 "to keep much in memory."
40848 #: ../src/guestfs.pod:2582
40849 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
40853 #: ../src/guestfs.pod:2584
40855 "The protocol for FileOut parameters is exactly the same as for FileIn "
40856 "parameters, but with the roles of daemon and library reversed."
40860 #: ../src/guestfs.pod:2587
40863 " total length (header + ret,\n"
40864 " but not including the length word itself,\n"
40865 " and not including the chunks)\n"
40866 " struct guestfs_message_header (encoded as XDR)\n"
40867 " struct guestfs_<foo>_ret (encoded as XDR)\n"
40868 " sequence of chunks for FileOut param #0\n"
40869 " sequence of chunks for FileOut param #1 etc.\n"
40874 #: ../src/guestfs.pod:2595
40875 msgid "INITIAL MESSAGE"
40879 #: ../src/guestfs.pod:2597
40881 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
40882 "which indicates that the guest and daemon is alive. This is what L</"
40883 "guestfs_launch> waits for."
40887 #: ../src/guestfs.pod:2601
40888 msgid "PROGRESS NOTIFICATION MESSAGES"
40892 #: ../src/guestfs.pod:2603
40894 "The daemon may send progress notification messages at any time. These are "
40895 "distinguished by the normal length word being replaced by "
40896 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
40900 #: ../src/guestfs.pod:2607
40902 "The library turns them into progress callbacks (see L</"
40903 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
40908 #: ../src/guestfs.pod:2611
40910 "The daemon self-limits the frequency of progress messages it sends (see "
40911 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
40916 #: ../src/guestfs.pod:2615
40917 msgid "LIBGUESTFS VERSION NUMBERS"
40921 #: ../src/guestfs.pod:2617
40923 "Since April 2010, libguestfs has started to make separate development and "
40924 "stable releases, along with corresponding branches in our git repository. "
40925 "These separate releases can be identified by version number:"
40929 #: ../src/guestfs.pod:2622
40932 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
40933 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
40939 " | `-------- sub-version\n"
40941 " `------ always '1' because we don't change the ABI\n"
40946 #: ../src/guestfs.pod:2633
40947 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
40951 #: ../src/guestfs.pod:2635
40953 "As time passes we cherry pick fixes from the development branch and backport "
40954 "those into the stable branch, the effect being that the stable branch should "
40955 "get more stable and less buggy over time. So the stable releases are ideal "
40956 "for people who don't need new features but would just like the software to "
40961 #: ../src/guestfs.pod:2641
40962 msgid "Our criteria for backporting changes are:"
40966 #: ../src/guestfs.pod:2647
40968 "Documentation changes which don't affect any code are backported unless the "
40969 "documentation refers to a future feature which is not in stable."
40973 #: ../src/guestfs.pod:2653
40975 "Bug fixes which are not controversial, fix obvious problems, and have been "
40976 "well tested are backported."
40980 #: ../src/guestfs.pod:2658
40982 "Simple rearrangements of code which shouldn't affect how it works get "
40983 "backported. This is so that the code in the two branches doesn't get too "
40984 "far out of step, allowing us to backport future fixes more easily."
40988 #: ../src/guestfs.pod:2664
40990 "We I<don't> backport new features, new APIs, new tools etc, except in one "
40991 "exceptional case: the new feature is required in order to implement an "
40992 "important bug fix."
40996 #: ../src/guestfs.pod:2670
40998 "A new stable branch starts when we think the new features in development are "
40999 "substantial and compelling enough over the current stable branch to warrant "
41000 "it. When that happens we create new stable and development versions 1.N.0 "
41001 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
41002 "stable at this point, but by backporting fixes from development, that branch "
41003 "will stabilize over time."
41007 #: ../src/guestfs.pod:2678
41008 msgid "EXTENDING LIBGUESTFS"
41012 #: ../src/guestfs.pod:2680
41013 msgid "ADDING A NEW API ACTION"
41017 #: ../src/guestfs.pod:2682
41019 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
41020 "documentation) are generated, and this makes it easy to extend the "
41025 #: ../src/guestfs.pod:2686
41026 msgid "To add a new API action there are two changes:"
41030 #: ../src/guestfs.pod:2692
41032 "You need to add a description of the call (name, parameters, return type, "
41033 "tests, documentation) to C<generator/generator_actions.ml>."
41037 #: ../src/guestfs.pod:2695
41039 "There are two sorts of API action, depending on whether the call goes "
41040 "through to the daemon in the appliance, or is serviced entirely by the "
41041 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
41042 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
41043 "an example of the latter, since a trace flag is maintained in the handle and "
41044 "all tracing is done on the library side."
41048 #: ../src/guestfs.pod:2703
41050 "Most new actions are of the first type, and get added to the "
41051 "C<daemon_functions> list. Each function has a unique procedure number used "
41052 "in the RPC protocol which is assigned to that action when we publish "
41053 "libguestfs and cannot be reused. Take the latest procedure number and "
41058 #: ../src/guestfs.pod:2709
41060 "For library-only actions of the second type, add to the "
41061 "C<non_daemon_functions> list. Since these functions are serviced by the "
41062 "library and do not travel over the RPC mechanism to the daemon, these "
41063 "functions do not need a procedure number, and so the procedure number is set "
41068 #: ../src/guestfs.pod:2717
41069 msgid "Implement the action (in C):"
41073 #: ../src/guestfs.pod:2719
41075 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
41076 "C<daemon/> directory."
41080 #: ../src/guestfs.pod:2722
41082 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
41083 "(note: double underscore) in the C<src/> directory."
41087 #: ../src/guestfs.pod:2725
41088 msgid "In either case, use another function as an example of what to do."
41092 #: ../src/guestfs.pod:2729
41093 msgid "After making these changes, use C<make> to compile."
41097 #: ../src/guestfs.pod:2731
41099 "Note that you don't need to implement the RPC, language bindings, manual "
41100 "pages or anything else. It's all automatically generated from the OCaml "
41105 #: ../src/guestfs.pod:2735
41106 msgid "ADDING TESTS FOR AN API ACTION"
41110 #: ../src/guestfs.pod:2737
41112 "You can supply zero or as many tests as you want per API call. The tests "
41113 "can either be added as part of the API description (C<generator/"
41114 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
41115 "into C<tests/*/>. Note that adding a script to C<tests/*/> is slower, so if "
41116 "possible use the first method."
41120 #: ../src/guestfs.pod:2744
41122 "The following describes the test environment used when you add an API test "
41123 "in C<generator_actions.ml>."
41127 #: ../src/guestfs.pod:2747
41128 msgid "The test environment has 4 block devices:"
41132 #: ../src/guestfs.pod:2751
41133 msgid "C</dev/sda> 500MB"
41137 #: ../src/guestfs.pod:2753
41138 msgid "General block device for testing."
41142 #: ../src/guestfs.pod:2755
41143 msgid "C</dev/sdb> 50MB"
41147 #: ../src/guestfs.pod:2757
41149 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
41154 #: ../src/guestfs.pod:2760
41155 msgid "C</dev/sdc> 10MB"
41159 #: ../src/guestfs.pod:2762
41160 msgid "Used in a few tests where two block devices are needed."
41164 #: ../src/guestfs.pod:2764
41165 msgid "C</dev/sdd>"
41169 #: ../src/guestfs.pod:2766
41170 msgid "ISO with fixed content (see C<images/test.iso>)."
41174 #: ../src/guestfs.pod:2770
41176 "To be able to run the tests in a reasonable amount of time, the libguestfs "
41177 "appliance and block devices are reused between tests. So don't try testing "
41178 "L</guestfs_kill_subprocess> :-x"
41182 #: ../src/guestfs.pod:2774
41184 "Each test starts with an initial scenario, selected using one of the "
41185 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
41186 "initialize the disks mentioned above in a particular way as documented in "
41187 "C<generator_types.ml>. You should not assume anything about the previous "
41188 "contents of other disks that are not initialized."
41192 #: ../src/guestfs.pod:2780
41194 "You can add a prerequisite clause to any individual test. This is a run-"
41195 "time check, which, if it fails, causes the test to be skipped. Useful if "
41196 "testing a command which might not work on all variations of libguestfs "
41197 "builds. A test that has prerequisite of C<Always> means to run "
41202 #: ../src/guestfs.pod:2786
41204 "In addition, packagers can skip individual tests by setting environment "
41205 "variables before running C<make check>."
41209 #: ../src/guestfs.pod:2789
41212 " SKIP_TEST_<CMD>_<NUM>=1\n"
41217 #: ../src/guestfs.pod:2791
41218 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
41222 #: ../src/guestfs.pod:2795
41225 " SKIP_TEST_<CMD>=1\n"
41230 #: ../src/guestfs.pod:2797
41231 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
41235 #: ../src/guestfs.pod:2799
41236 msgid "Packagers can run only certain tests by setting for example:"
41240 #: ../src/guestfs.pod:2801
41243 " TEST_ONLY=\"vfs_type zerofree\"\n"
41248 #: ../src/guestfs.pod:2803
41250 "See C<tests/c-api/tests.c> for more details of how these environment "
41255 #: ../src/guestfs.pod:2806
41256 msgid "DEBUGGING NEW API ACTIONS"
41260 #: ../src/guestfs.pod:2808
41261 msgid "Test new actions work before submitting them."
41265 #: ../src/guestfs.pod:2810
41266 msgid "You can use guestfish to try out new commands."
41270 #: ../src/guestfs.pod:2812
41272 "Debugging the daemon is a problem because it runs inside a minimal "
41273 "environment. However you can fprintf messages in the daemon to stderr, and "
41274 "they will show up if you use C<guestfish -v>."
41278 #: ../src/guestfs.pod:2816
41279 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
41283 #: ../src/guestfs.pod:2818
41285 "Our C source code generally adheres to some basic code-formatting "
41286 "conventions. The existing code base is not totally consistent on this "
41287 "front, but we do prefer that contributed code be formatted similarly. In "
41288 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
41289 "indentation level, and other than that, follow the K&R style."
41293 #: ../src/guestfs.pod:2824
41295 "If you use Emacs, add the following to one of one of your start-up files (e."
41296 "g., ~/.emacs), to help ensure that you get indentation right:"
41300 #: ../src/guestfs.pod:2827
41303 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
41304 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
41305 " (add-hook 'find-file-hook\n"
41306 " '(lambda () (if (and buffer-file-name\n"
41307 " (string-match \"/libguestfs\\\\>\"\n"
41308 " (buffer-file-name))\n"
41309 " (not (string-equal mode-name \"Change Log\"))\n"
41310 " (not (string-equal mode-name \"Makefile\")))\n"
41311 " (setq indent-tabs-mode nil))))\n"
41316 #: ../src/guestfs.pod:2837
41319 " ;;; When editing C sources in libguestfs, use this style.\n"
41320 " (defun libguestfs-c-mode ()\n"
41321 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
41323 " (c-set-style \"K&R\")\n"
41324 " (setq c-indent-level 2)\n"
41325 " (setq c-basic-offset 2))\n"
41326 " (add-hook 'c-mode-hook\n"
41327 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
41328 " (buffer-file-name))\n"
41329 " (libguestfs-c-mode))))\n"
41334 #: ../src/guestfs.pod:2849
41335 msgid "Enable warnings when compiling (and fix any problems this finds):"
41339 #: ../src/guestfs.pod:2852
41342 " ./configure --enable-gcc-warnings\n"
41347 #: ../src/guestfs.pod:2854
41348 msgid "Useful targets are:"
41352 #: ../src/guestfs.pod:2856
41355 " make syntax-check # checks the syntax of the C code\n"
41356 " make check # runs the test suite\n"
41361 #: ../src/guestfs.pod:2859
41362 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
41366 #: ../src/guestfs.pod:2861
41368 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
41369 "which are used to do shell quoting."
41373 #: ../src/guestfs.pod:2866
41378 #: ../src/guestfs.pod:2868
41380 "Simple shell quoted string. Any spaces or other shell characters are "
41385 #: ../src/guestfs.pod:2871
41390 #: ../src/guestfs.pod:2873
41392 "Same as C<%Q> except the string is treated as a path which is prefixed by "
41397 #: ../src/guestfs.pod:2880
41400 " asprintf (&cmd, \"cat %R\", path);\n"
41405 #: ../src/guestfs.pod:2882
41406 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
41410 #: ../src/guestfs.pod:2884
41412 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
41413 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
41414 "they are not passed via the shell (instead, straight to exec). You probably "
41415 "want to use the C<sysroot_path()> function however."
41419 #: ../src/guestfs.pod:2890
41420 msgid "SUBMITTING YOUR NEW API ACTIONS"
41424 #: ../src/guestfs.pod:2892
41426 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
41427 "libguestfs> and CC to L<rjones@redhat.com>."
41431 #: ../src/guestfs.pod:2896
41432 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
41436 #: ../src/guestfs.pod:2898
41437 msgid "We support i18n (gettext anyhow) in the library."
41441 #: ../src/guestfs.pod:2900
41443 "However many messages come from the daemon, and we don't translate those at "
41444 "the moment. One reason is that the appliance generally has all locale files "
41445 "removed from it, because they take up a lot of space. So we'd have to readd "
41446 "some of those, as well as copying our PO files into the appliance."
41450 #: ../src/guestfs.pod:2906
41452 "Debugging messages are never translated, since they are intended for the "
41457 #: ../src/guestfs.pod:2909
41458 msgid "SOURCE CODE SUBDIRECTORIES"
41462 #: ../src/guestfs.pod:2913
41467 #: ../src/guestfs.pod:2915
41468 msgid "L<virt-alignment-scan(1)> command and documentation."
41472 #: ../src/guestfs.pod:2919
41473 msgid "The libguestfs appliance, build scripts and so on."
41477 #: ../src/guestfs.pod:2921
41482 #: ../src/guestfs.pod:2923
41484 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
41489 #: ../src/guestfs.pod:2926
41494 #: ../src/guestfs.pod:2928
41496 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
41497 "command and documentation."
41501 #: ../src/guestfs.pod:2931
41506 #: ../src/guestfs.pod:2933
41507 msgid "Outside contributions, experimental parts."
41511 #: ../src/guestfs.pod:2935
41516 #: ../src/guestfs.pod:2937
41518 "The daemon that runs inside the libguestfs appliance and carries out actions."
41522 #: ../src/guestfs.pod:2940
41527 #: ../src/guestfs.pod:2942
41528 msgid "L<virt-df(1)> command and documentation."
41532 #: ../src/guestfs.pod:2944
41537 #: ../src/guestfs.pod:2946
41538 msgid "L<virt-edit(1)> command and documentation."
41542 #: ../src/guestfs.pod:2948
41543 msgid "C<examples>"
41547 #: ../src/guestfs.pod:2950
41548 msgid "C API example code."
41552 #: ../src/guestfs.pod:2952
41557 #: ../src/guestfs.pod:2954
41559 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
41560 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41561 "L<virt-tar-out(1)>."
41565 #: ../src/guestfs.pod:2958
41570 #: ../src/guestfs.pod:2960
41572 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
41576 #: ../src/guestfs.pod:2962
41577 msgid "C<generator>"
41581 #: ../src/guestfs.pod:2964
41583 "The crucially important generator, used to automatically generate large "
41584 "amounts of boilerplate C code for things like RPC and bindings."
41588 #: ../src/guestfs.pod:2967
41589 msgid "C<inspector>"
41593 #: ../src/guestfs.pod:2969
41594 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
41598 #: ../src/guestfs.pod:2971
41603 #: ../src/guestfs.pod:2973
41604 msgid "Logo used on the website. The fish is called Arthur by the way."
41608 #: ../src/guestfs.pod:2975
41613 #: ../src/guestfs.pod:2977
41614 msgid "M4 macros used by autoconf."
41618 #: ../src/guestfs.pod:2979
41623 #: ../src/guestfs.pod:2981
41624 msgid "Translations of simple gettext strings."
41628 #: ../src/guestfs.pod:2983
41633 #: ../src/guestfs.pod:2985
41635 "The build infrastructure and PO files for translations of manpages and POD "
41636 "files. Eventually this will be combined with the C<po> directory, but that "
41637 "is rather complicated."
41641 #: ../src/guestfs.pod:2989
41646 #: ../src/guestfs.pod:2991
41647 msgid "L<virt-rescue(1)> command and documentation."
41651 #: ../src/guestfs.pod:2993
41656 #: ../src/guestfs.pod:2995
41657 msgid "L<virt-resize(1)> command and documentation."
41661 #: ../src/guestfs.pod:2997
41662 msgid "C<sparsify>"
41666 #: ../src/guestfs.pod:2999
41667 msgid "L<virt-sparsify(1)> command and documentation."
41671 #: ../src/guestfs.pod:3001
41676 #: ../src/guestfs.pod:3003
41677 msgid "Source code to the C library."
41681 #: ../src/guestfs.pod:3005
41682 msgid "C<test-tool>"
41686 #: ../src/guestfs.pod:3007
41688 "Test tool for end users to test if their qemu/kernel combination will work "
41693 #: ../src/guestfs.pod:3010
41698 #: ../src/guestfs.pod:3012
41703 #: ../src/guestfs.pod:3014
41708 #: ../src/guestfs.pod:3016
41710 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
41714 #: ../src/guestfs.pod:3018
41719 #: ../src/guestfs.pod:3020
41724 #: ../src/guestfs.pod:3022
41729 #: ../src/guestfs.pod:3024
41734 #: ../src/guestfs.pod:3026
41739 #: ../src/guestfs.pod:3028
41744 #: ../src/guestfs.pod:3030
41749 #: ../src/guestfs.pod:3032
41754 #: ../src/guestfs.pod:3034
41759 #: ../src/guestfs.pod:3036
41760 msgid "Language bindings."
41764 #: ../src/guestfs.pod:3040
41765 msgid "MAKING A STABLE RELEASE"
41769 #: ../src/guestfs.pod:3042
41771 "When we make a stable release, there are several steps documented here. See "
41772 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
41777 #: ../src/guestfs.pod:3050
41779 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
41783 #: ../src/guestfs.pod:3055
41784 msgid "Finalize RELEASE-NOTES."
41788 #: ../src/guestfs.pod:3059
41789 msgid "Update ROADMAP."
41793 #: ../src/guestfs.pod:3063
41794 msgid "Run C<src/api-support/update-from-tarballs.sh>."
41798 #: ../src/guestfs.pod:3067
41799 msgid "Push and pull from Transifex."
41803 #: ../src/guestfs.pod:3071
41811 #: ../src/guestfs.pod:3073
41812 msgid "to push the latest POT files to Transifex. Then run:"
41816 #: ../src/guestfs.pod:3075
41824 #: ../src/guestfs.pod:3077
41825 msgid "which is a wrapper to pull the latest translated C<*.po> files."
41829 #: ../src/guestfs.pod:3081
41831 "Create new stable and development directories under L<http://libguestfs.org/"
41836 #: ../src/guestfs.pod:3086
41837 msgid "Create the branch in git:"
41841 #: ../src/guestfs.pod:3088
41844 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
41845 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
41846 " git branch stable-1.XX\n"
41847 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
41852 #: ../src/guestfs.pod:3095
41857 #: ../src/guestfs.pod:3097
41858 msgid "PROTOCOL LIMITS"
41862 #: ../src/guestfs.pod:3099
41864 "Internally libguestfs uses a message-based protocol to pass API calls and "
41865 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
41866 "plenty more detail about this). The maximum message size used by the "
41867 "protocol is slightly less than 4 MB. For some API calls you may need to be "
41868 "aware of this limit. The API calls which may be affected are individually "
41869 "documented, with a link back to this section of the documentation."
41873 #: ../src/guestfs.pod:3107
41875 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
41876 "a simple string. Because this string is at some point internally encoded as "
41877 "a message, the maximum size that it can return is slightly under 4 MB. If "
41878 "the requested file is larger than this then you will get an error."
41882 #: ../src/guestfs.pod:3113
41884 "In order to transfer large files into and out of the guest filesystem, you "
41885 "need to use particular calls that support this. The sections L</UPLOADING> "
41886 "and L</DOWNLOADING> document how to do this."
41890 #: ../src/guestfs.pod:3117
41892 "You might also consider mounting the disk image using our FUSE filesystem "
41893 "support (L<guestmount(1)>)."
41897 #: ../src/guestfs.pod:3120
41898 msgid "MAXIMUM NUMBER OF DISKS"
41902 #: ../src/guestfs.pod:3122
41903 msgid "When using virtio disks (the default) the current limit is B<25> disks."
41907 #: ../src/guestfs.pod:3125
41909 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
41910 "slots. However febootstrap only understands disks with names C</dev/vda> "
41911 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
41916 #: ../src/guestfs.pod:3130
41918 "We are working to substantially raise this limit in future versions but it "
41919 "requires complex changes to qemu."
41923 #: ../src/guestfs.pod:3133
41925 "In future versions of libguestfs it should also be possible to \"hot plug\" "
41926 "disks (add and remove disks after calling L</guestfs_launch>). This also "
41927 "requires changes to qemu."
41931 #: ../src/guestfs.pod:3137
41932 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
41936 #: ../src/guestfs.pod:3139
41937 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
41941 #: ../src/guestfs.pod:3141
41943 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
41944 "vda>, and C</dev/vda1> through C</dev/vda15>)."
41948 #: ../src/guestfs.pod:3144
41950 "If you attach a disk with more than 15 partitions, the extra partitions are "
41951 "ignored by libguestfs."
41955 #: ../src/guestfs.pod:3147
41956 msgid "MAXIMUM SIZE OF A DISK"
41960 #: ../src/guestfs.pod:3149
41961 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
41965 #: ../src/guestfs.pod:3151
41967 "We have tested block devices up to 1 exabyte (2**60 or "
41968 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
41973 #: ../src/guestfs.pod:3155
41975 "Although libguestfs probably does not impose any limit, the underlying host "
41976 "storage will. If you store disk images on a host ext4 filesystem, then the "
41977 "maximum size will be limited by the maximum ext4 file size (currently 16 "
41978 "TB). If you store disk images as host logical volumes then you are limited "
41979 "by the maximum size of an LV."
41983 #: ../src/guestfs.pod:3161
41985 "For the hugest disk image files, we recommend using XFS on the host for "
41990 #: ../src/guestfs.pod:3164
41991 msgid "MAXIMUM SIZE OF A PARTITION"
41995 #: ../src/guestfs.pod:3166
41997 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
41998 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
41999 "address a partition located beyond 2 TB on the disk."
42003 #: ../src/guestfs.pod:3170
42005 "It is recommended that you use GPT partitions on disks which are larger than "
42006 "this size. GPT uses 64 bit sector numbers and so can address partitions "
42007 "which are theoretically larger than the largest disk we could support."
42011 #: ../src/guestfs.pod:3175
42012 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
42016 #: ../src/guestfs.pod:3177
42018 "This depends on the filesystem type. libguestfs itself does not impose any "
42019 "known limit. Consult Wikipedia or the filesystem documentation to find out "
42020 "what these limits are."
42024 #: ../src/guestfs.pod:3181
42025 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
42029 #: ../src/guestfs.pod:3183
42031 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
42032 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
42033 "uploads and downloads."
42037 #: ../src/guestfs.pod:3187
42038 msgid "INSPECTION LIMITS"
42042 #: ../src/guestfs.pod:3189
42044 "The inspection code has several arbitrary limits on things like the size of "
42045 "Windows Registry hive it will read, and the length of product name. These "
42046 "are intended to stop a malicious guest from consuming arbitrary amounts of "
42047 "memory and disk space on the host, and should not be reached in practice. "
42048 "See the source code for more information."
42052 #: ../src/guestfs.pod:3215
42054 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
42055 "effect as calling C<guestfs_set_verbose (g, 1)>."
42059 #: ../src/guestfs.pod:3227
42061 "Set the path that libguestfs uses to search for a supermin appliance. See "
42062 "the discussion of paths in section L</PATH> above."
42066 #: ../src/guestfs.pod:3236
42067 msgid "See also L</QEMU WRAPPERS> above."
42071 #: ../src/guestfs.pod:3240
42073 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
42074 "effect as calling C<guestfs_set_trace (g, 1)>."
42078 #: ../src/guestfs.pod:3258
42080 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
42081 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
42082 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-cat(1)"
42083 ">, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
42084 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
42085 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue"
42086 "(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar"
42087 "(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<guestfs-"
42088 "testing(1)>, L<qemu(1)>, L<febootstrap(1)>, L<febootstrap-supermin-helper(8)"
42089 ">, L<hivex(3)>, L<stap(1)>, L<http://libguestfs.org/>."
42093 #: ../src/guestfs.pod:3295
42095 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
42096 "(8)>, L<disktype(1)>."
42100 #: ../src/guestfs.pod:3302 ../tools/virt-make-fs.pl:571
42101 #: ../tools/virt-win-reg.pl:772
42106 #: ../src/guestfs.pod:3304
42107 msgid "To get a list of bugs against libguestfs use this link:"
42111 #: ../src/guestfs.pod:3306
42113 "L<https://bugzilla.redhat.com/buglist.cgi?"
42114 "component=libguestfs&product=Virtualization+Tools>"
42118 #: ../src/guestfs.pod:3308
42119 msgid "To report a new bug against libguestfs use this link:"
42123 #: ../src/guestfs.pod:3310
42125 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
42126 "component=libguestfs&product=Virtualization+Tools>"
42130 #: ../src/guestfs.pod:3312
42131 msgid "When reporting a bug, please check:"
42135 #: ../src/guestfs.pod:3318
42136 msgid "That the bug hasn't been reported already."
42140 #: ../src/guestfs.pod:3322
42141 msgid "That you are testing a recent version."
42145 #: ../src/guestfs.pod:3326
42146 msgid "Describe the bug accurately, and give a way to reproduce it."
42150 #: ../src/guestfs.pod:3330
42152 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
42157 #: ../test-tool/libguestfs-test-tool.pod:5
42158 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
42162 #: ../test-tool/libguestfs-test-tool.pod:9
42165 " libguestfs-test-tool [--options]\n"
42170 #: ../test-tool/libguestfs-test-tool.pod:13
42172 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
42173 "to check basic libguestfs functionality is working. This is needed because "
42174 "libguestfs occasionally breaks for reasons beyond our control: usually "
42175 "because of changes in the underlying qemu or kernel packages, or the host "
42180 #: ../test-tool/libguestfs-test-tool.pod:19
42181 msgid "If you suspect a problem in libguestfs, then just run:"
42185 #: ../test-tool/libguestfs-test-tool.pod:21
42188 " libguestfs-test-tool\n"
42193 #: ../test-tool/libguestfs-test-tool.pod:23
42194 msgid "It will print lots of diagnostic messages."
42198 #: ../test-tool/libguestfs-test-tool.pod:25
42199 msgid "If it runs to completion successfully, you will see this near the end:"
42203 #: ../test-tool/libguestfs-test-tool.pod:27
42206 " ===== TEST FINISHED OK =====\n"
42211 #: ../test-tool/libguestfs-test-tool.pod:29
42212 msgid "and the test tool will exit with code 0."
42216 #: ../test-tool/libguestfs-test-tool.pod:31
42218 "If it fails (and/or exits with non-zero error code), please paste the "
42219 "I<complete, unedited> output of the test tool into a bug report. More "
42220 "information about reporting bugs can be found on the L<http://libguestfs.org/"
42225 #: ../test-tool/libguestfs-test-tool.pod:42
42226 msgid "Display short usage information and exit."
42230 #: ../test-tool/libguestfs-test-tool.pod:44
42231 msgid "B<--qemu qemu_binary>"
42235 #: ../test-tool/libguestfs-test-tool.pod:46
42237 "If you have downloaded another qemu binary, point this option at the full "
42238 "path of the binary to try it."
42242 #: ../test-tool/libguestfs-test-tool.pod:49
42243 msgid "B<--qemudir qemu_source_dir>"
42247 #: ../test-tool/libguestfs-test-tool.pod:51
42249 "If you have compiled qemu from source, point this option at the source "
42250 "directory to try it."
42254 #: ../test-tool/libguestfs-test-tool.pod:54
42259 #: ../test-tool/libguestfs-test-tool.pod:56
42260 msgid "B<--timeout N>"
42264 #: ../test-tool/libguestfs-test-tool.pod:58
42266 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
42267 "minutes) which does not usually need to be adjusted."
42271 #: ../test-tool/libguestfs-test-tool.pod:63
42272 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
42276 #: ../test-tool/libguestfs-test-tool.pod:65
42278 "If you have compiled another version of qemu from source and would like to "
42279 "try that, then you can use the I<--qemudir> option to point to the qemu "
42280 "source directory."
42284 #: ../test-tool/libguestfs-test-tool.pod:69
42286 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
42287 "option to point to the binary."
42291 #: ../test-tool/libguestfs-test-tool.pod:72
42293 "Note when using these options, you can ignore the business of qemu wrapper "
42294 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
42295 "wrapper script for you if one is needed."
42299 #: ../test-tool/libguestfs-test-tool.pod:76
42300 msgid "TRYING OUT A DIFFERENT KERNEL"
42304 #: ../test-tool/libguestfs-test-tool.pod:78
42306 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
42307 "libguestfs tries. You do this by setting the environment variables "
42308 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
42312 #: ../test-tool/libguestfs-test-tool.pod:82
42314 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
42319 #: ../test-tool/libguestfs-test-tool.pod:85
42320 msgid "SELF-DIAGNOSIS"
42324 #: ../test-tool/libguestfs-test-tool.pod:87
42326 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
42327 "produced by libguestfs-test-tool and/or possible errors."
42331 #: ../test-tool/libguestfs-test-tool.pod:92
42333 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
42334 "I<1> if there was an error."
42338 #: ../test-tool/libguestfs-test-tool.pod:97
42340 "For the full list of environment variables which may affect libguestfs, "
42341 "please see the L<guestfs(3)> manual page."
42345 #: ../test-tool/libguestfs-test-tool.pod:102
42346 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
42350 #: ../tools/virt-list-filesystems.pl:32
42352 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
42356 #: ../tools/virt-list-filesystems.pl:36
42359 " virt-list-filesystems [--options] domname\n"
42364 #: ../tools/virt-list-filesystems.pl:38
42367 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
42372 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
42374 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
42379 #: ../tools/virt-list-filesystems.pl:45
42381 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
42382 "are contained in a virtual machine or disk image."
42386 #: ../tools/virt-list-filesystems.pl:49
42388 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
42389 "functionality. For more complex cases you should look at the L<guestfish(1)"
42394 #: ../tools/virt-list-filesystems.pl:112
42396 "With this option, C<virt-list-filesystems> displays the type of each "
42397 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
42401 #: ../tools/virt-list-filesystems.pl:119
42406 #: ../tools/virt-list-filesystems.pl:123
42408 "Normally we only show mountable filesystems. If this option is given then "
42409 "swap devices are shown too."
42413 #: ../tools/virt-list-filesystems.pl:197
42415 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
42416 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
42417 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42421 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
42422 msgid "Copyright (C) 2009 Red Hat Inc."
42426 #: ../tools/virt-list-partitions.pl:32
42428 "virt-list-partitions - List partitions in a virtual machine or disk image"
42432 #: ../tools/virt-list-partitions.pl:36
42435 " virt-list-partitions [--options] domname\n"
42440 #: ../tools/virt-list-partitions.pl:38
42443 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
42448 #: ../tools/virt-list-partitions.pl:45
42450 "C<virt-list-partitions> is a command line tool to list the partitions that "
42451 "are contained in a virtual machine or disk image. It is mainly useful as a "
42452 "first step to using L<virt-resize(1)>."
42456 #: ../tools/virt-list-partitions.pl:50
42458 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
42459 "functionality. For more complex cases you should look at the L<guestfish(1)"
42464 #: ../tools/virt-list-partitions.pl:113
42465 msgid "Show sizes in human-readable form (eg. \"1G\")."
42469 #: ../tools/virt-list-partitions.pl:123
42471 "With this option, C<virt-list-partitions> displays the type and size of each "
42472 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
42476 #: ../tools/virt-list-partitions.pl:130
42481 #: ../tools/virt-list-partitions.pl:132
42486 #: ../tools/virt-list-partitions.pl:134
42488 "Display the total size of each block device (as a separate row or rows)."
42492 #: ../tools/virt-list-partitions.pl:267
42494 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
42495 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
42496 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42500 #: ../tools/virt-list-partitions.pl:283
42501 msgid "Copyright (C) 2009-2010 Red Hat Inc."
42505 #: ../tools/virt-make-fs.pl:37
42506 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
42510 #: ../tools/virt-make-fs.pl:41
42513 " virt-make-fs [--options] input.tar output.img\n"
42518 #: ../tools/virt-make-fs.pl:43
42521 " virt-make-fs [--options] input.tar.gz output.img\n"
42526 #: ../tools/virt-make-fs.pl:45
42529 " virt-make-fs [--options] directory output.img\n"
42534 #: ../tools/virt-make-fs.pl:49
42536 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
42537 "archive or some files in a directory. It is similar to tools like L<mkisofs"
42538 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
42539 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
42540 "you want to attach these filesystems to existing virtual machines (eg. to "
42541 "import large amounts of read-only data to a VM)."
42545 #: ../tools/virt-make-fs.pl:57
42546 msgid "Basic usage is:"
42550 #: ../tools/virt-make-fs.pl:59
42553 " virt-make-fs input output.img\n"
42558 #: ../tools/virt-make-fs.pl:61
42560 "where C<input> is either a directory containing files that you want to add, "
42561 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
42562 "C<output.img> is a disk image. The input type is detected automatically. "
42563 "The output disk image defaults to a raw ext2 sparse image unless you specify "
42564 "extra flags (see L</OPTIONS> below)."
42568 #: ../tools/virt-make-fs.pl:67
42569 msgid "FILESYSTEM TYPE"
42573 #: ../tools/virt-make-fs.pl:69
42575 "The default filesystem type is C<ext2>. Just about any filesystem type that "
42576 "libguestfs supports can be used (but I<not> read-only formats like "
42577 "ISO9660). Here are some of the more common choices:"
42581 #: ../tools/virt-make-fs.pl:75
42586 #: ../tools/virt-make-fs.pl:77
42588 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
42589 "you are not going to use the filesystem in a way that requires the journal, "
42590 "then this is just wasted overhead."
42594 #: ../tools/virt-make-fs.pl:81
42595 msgid "I<ntfs> or I<vfat>"
42599 #: ../tools/virt-make-fs.pl:83
42600 msgid "Useful if exporting data to a Windows guest."
42604 #: ../tools/virt-make-fs.pl:85
42606 "I<Note for vfat>: The tar archive or local directory must only contain files "
42607 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
42608 "program running within libguestfs is unable to change the ownership of non-"
42609 "root files, since vfat itself does not support this."
42613 #: ../tools/virt-make-fs.pl:90
42618 #: ../tools/virt-make-fs.pl:92
42620 "Lower overhead than C<ext2>, but certain limitations on filename length and "
42621 "total filesystem size."
42625 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116
42626 #: ../tools/virt-make-fs.pl:149
42631 #: ../tools/virt-make-fs.pl:99
42634 " virt-make-fs --type=minix input minixfs.img\n"
42639 #: ../tools/virt-make-fs.pl:101
42640 msgid "TO PARTITION OR NOT TO PARTITION"
42644 #: ../tools/virt-make-fs.pl:103
42645 msgid "Optionally virt-make-fs can add a partition table to the output disk."
42649 #: ../tools/virt-make-fs.pl:105
42651 "Adding a partition can make the disk image more compatible with certain "
42652 "virtualized operating systems which don't expect to see a filesystem "
42653 "directly located on a block device (Linux doesn't care and will happily "
42654 "handle both types)."
42658 #: ../tools/virt-make-fs.pl:110
42660 "On the other hand, if you have a partition table then the output image is no "
42661 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
42662 "directly on a partitioned disk image. (However libguestfs tools such as "
42663 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
42667 #: ../tools/virt-make-fs.pl:118
42668 msgid "Add an MBR partition:"
42672 #: ../tools/virt-make-fs.pl:120
42675 " virt-make-fs --partition -- input disk.img\n"
42680 #: ../tools/virt-make-fs.pl:122
42682 "If the output disk image could be terabyte-sized or larger, it's better to "
42683 "use an EFI/GPT-compatible partition table:"
42687 #: ../tools/virt-make-fs.pl:125
42690 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
42695 #: ../tools/virt-make-fs.pl:127
42696 msgid "EXTRA SPACE"
42700 #: ../tools/virt-make-fs.pl:129
42702 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
42703 "the files that it contains, but might have extra space. Depending on how "
42704 "you are going to use the output, you might think this extra space is wasted "
42705 "and want to minimize it, or you might want to leave space so that more files "
42706 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
42707 "but you can use the I<--size> flag to leave space in the filesystem if you "
42712 #: ../tools/virt-make-fs.pl:137
42714 "An alternative way to leave extra space but not make the output image any "
42715 "bigger is to use an alternative disk image format (instead of the default "
42716 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
42717 "image format (check your hypervisor supports this before using it). This "
42718 "allows you to choose a large I<--size> but the extra space won't actually be "
42719 "allocated in the image until you try to store something in it."
42723 #: ../tools/virt-make-fs.pl:145
42725 "Don't forget that you can also use local commands including L<resize2fs(8)> "
42726 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
42727 "to build another image from scratch."
42731 #: ../tools/virt-make-fs.pl:151
42734 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
42739 #: ../tools/virt-make-fs.pl:179
42740 msgid "Enable debugging information."
42744 #: ../tools/virt-make-fs.pl:185
42745 msgid "B<--size=E<lt>NE<gt>>"
42749 #: ../tools/virt-make-fs.pl:187
42750 msgid "B<--size=+E<lt>NE<gt>>"
42754 #: ../tools/virt-make-fs.pl:189
42755 msgid "B<-s E<lt>NE<gt>>"
42759 #: ../tools/virt-make-fs.pl:191
42760 msgid "B<-s +E<lt>NE<gt>>"
42764 #: ../tools/virt-make-fs.pl:193
42766 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
42770 #: ../tools/virt-make-fs.pl:196
42772 "If this option is I<not> given, then the output image will be just large "
42773 "enough to contain all the files, with not much wasted space."
42777 #: ../tools/virt-make-fs.pl:199
42779 "To choose a fixed size output disk, specify an absolute number followed by b/"
42780 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
42781 "Petabytes or Exabytes. This must be large enough to contain all the input "
42782 "files, else you will get an error."
42786 #: ../tools/virt-make-fs.pl:204
42788 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
42789 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
42790 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
42791 "the input files, and (approximately) an extra 200 MB free space."
42795 #: ../tools/virt-make-fs.pl:210
42797 "Note that virt-make-fs estimates free space, and therefore will not produce "
42798 "filesystems containing precisely the free space requested. (It is much more "
42799 "expensive and time-consuming to produce a filesystem which has precisely the "
42800 "desired free space)."
42804 #: ../tools/virt-make-fs.pl:219
42805 msgid "B<--format=E<lt>fmtE<gt>>"
42809 #: ../tools/virt-make-fs.pl:221
42810 msgid "B<-F E<lt>fmtE<gt>>"
42814 #: ../tools/virt-make-fs.pl:223
42815 msgid "Choose the output disk image format."
42819 #: ../tools/virt-make-fs.pl:225
42820 msgid "The default is C<raw> (raw sparse disk image)."
42824 #: ../tools/virt-make-fs.pl:227
42826 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
42827 "that would really make sense here is C<qcow2>."
42831 #: ../tools/virt-make-fs.pl:234
42832 msgid "B<--type=E<lt>fsE<gt>>"
42836 #: ../tools/virt-make-fs.pl:236
42837 msgid "B<-t E<lt>fsE<gt>>"
42841 #: ../tools/virt-make-fs.pl:238
42842 msgid "Choose the output filesystem type."
42846 #: ../tools/virt-make-fs.pl:240
42847 msgid "The default is C<ext2>."
42851 #: ../tools/virt-make-fs.pl:242
42853 "Any filesystem which is supported read-write by libguestfs can be used here."
42857 #: ../tools/virt-make-fs.pl:249
42858 msgid "B<--partition>"
42862 #: ../tools/virt-make-fs.pl:251
42863 msgid "B<--partition=E<lt>parttypeE<gt>>"
42867 #: ../tools/virt-make-fs.pl:253
42869 "If specified, this flag adds an MBR partition table to the output disk image."
42873 #: ../tools/virt-make-fs.pl:256
42875 "You can change the partition table type, eg. I<--partition=gpt> for large "
42880 #: ../tools/virt-make-fs.pl:259
42882 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
42883 "might consider the next parameter to be the partition type. For example:"
42887 #: ../tools/virt-make-fs.pl:263
42890 " virt-make-fs --partition input.tar output.img\n"
42895 #: ../tools/virt-make-fs.pl:265
42897 "would cause virt-make-fs to think you wanted to use a partition type of "
42898 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
42899 "dash) between options and the input and output arguments:"
42903 #: ../tools/virt-make-fs.pl:269
42906 " virt-make-fs --partition -- input.tar output.img\n"
42911 #: ../tools/virt-make-fs.pl:271
42912 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
42916 #: ../tools/virt-make-fs.pl:559
42918 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
42919 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
42920 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
42924 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
42926 "When reporting bugs, please enable debugging and capture the I<complete> "
42931 #: ../tools/virt-make-fs.pl:576
42934 " export LIBGUESTFS_DEBUG=1\n"
42935 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
42940 #: ../tools/virt-make-fs.pl:579
42942 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
42947 #: ../tools/virt-tar.pl:33
42948 msgid "virt-tar - Extract or upload files to a virtual machine"
42952 #: ../tools/virt-tar.pl:37
42955 " virt-tar [--options] -x domname directory tarball\n"
42960 #: ../tools/virt-tar.pl:39
42963 " virt-tar [--options] -u domname tarball directory\n"
42968 #: ../tools/virt-tar.pl:41
42971 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
42976 #: ../tools/virt-tar.pl:43
42979 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
42984 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
42989 #: ../tools/virt-tar.pl:47
42991 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
42992 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
42996 #: ../tools/virt-tar.pl:52
42997 msgid "Download C</home> from the VM into a local tarball:"
43001 #: ../tools/virt-tar.pl:54
43004 " virt-tar -x domname /home home.tar\n"
43009 #: ../tools/virt-tar.pl:56
43012 " virt-tar -zx domname /home home.tar.gz\n"
43017 #: ../tools/virt-tar.pl:58
43018 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
43022 #: ../tools/virt-tar.pl:60
43025 " virt-tar -u domname uploadstuff.tar /tmp\n"
43030 #: ../tools/virt-tar.pl:62
43033 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
43038 #: ../tools/virt-tar.pl:66
43040 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
43041 "virtual machines. If you do this, you risk disk corruption in the VM. "
43042 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
43046 #: ../tools/virt-tar.pl:71
43048 "You can use I<-x> (extract) on live virtual machines, but you might get "
43049 "inconsistent results or errors if there is filesystem activity inside the "
43050 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
43051 "work, but the only way to guarantee consistent results is if the virtual "
43052 "machine is shut down."
43056 #: ../tools/virt-tar.pl:79
43058 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
43059 "parts of a guest filesystem. There are many possibilities: making backups, "
43060 "uploading data files, snooping on guest activity, fixing or customizing "
43065 #: ../tools/virt-tar.pl:84
43067 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
43068 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
43069 "should look at the L<guestfish(1)> tool."
43073 #: ../tools/virt-tar.pl:88
43075 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
43076 "its contents (recursively) from the virtual machine into a local tarball. "
43077 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
43078 "virtual machine. You cannot use these two options together."
43082 #: ../tools/virt-tar.pl:94
43084 "In addition, you may need to use the I<-z> (gZip) option to enable "
43085 "compression. When uploading, you have to specify I<-z> if the upload file "
43086 "is compressed because virt-tar won't detect this on its own."
43090 #: ../tools/virt-tar.pl:98
43092 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
43093 "example it cannot do PKZip files or bzip2 compression. If you want that "
43094 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
43095 "the L<libguestfs(3)> API)."
43099 #: ../tools/virt-tar.pl:160
43100 msgid "B<--extract>"
43104 #: ../tools/virt-tar.pl:162
43105 msgid "B<--download>"
43109 #: ../tools/virt-tar.pl:164
43114 #: ../tools/virt-tar.pl:166
43115 msgid "B<--upload>"
43119 #: ../tools/virt-tar.pl:168
43121 "Use I<-x> to extract (download) a directory from a virtual machine to a "
43126 #: ../tools/virt-tar.pl:171
43128 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
43129 "Please read the L</WARNING> section above before using this option."
43133 #: ../tools/virt-tar.pl:175
43134 msgid "You must specify exactly one of these options."
43138 #: ../tools/virt-tar.pl:181
43143 #: ../tools/virt-tar.pl:183
43148 #: ../tools/virt-tar.pl:185
43149 msgid "Specify that the input or output tarball is gzip-compressed."
43153 #: ../tools/virt-tar.pl:298
43155 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
43156 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
43157 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
43162 #: ../tools/virt-win-reg.pl:37
43164 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
43168 #: ../tools/virt-win-reg.pl:41
43171 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
43176 #: ../tools/virt-win-reg.pl:43
43179 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
43184 #: ../tools/virt-win-reg.pl:45
43187 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
43192 #: ../tools/virt-win-reg.pl:47
43195 " virt-win-reg --merge domname [input.reg ...]\n"
43200 #: ../tools/virt-win-reg.pl:49
43203 " virt-win-reg [--options] disk.img ... # instead of domname\n"
43208 #: ../tools/virt-win-reg.pl:53
43210 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
43211 "virtual machines. If you do this, you I<will> get irreversible disk "
43212 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
43213 "but doesn't catch all cases."
43217 #: ../tools/virt-win-reg.pl:58
43219 "Modifying the Windows Registry is an inherently risky operation. The format "
43220 "is deliberately obscure and undocumented, and Registry changes can leave the "
43221 "system unbootable. Therefore when using the I<--merge> option, make sure "
43222 "you have a reliable backup first."
43226 #: ../tools/virt-win-reg.pl:65
43228 "This program can export and merge Windows Registry entries from a Windows "
43233 #: ../tools/virt-win-reg.pl:68
43235 "The first parameter is the libvirt guest name or the raw disk image of a "
43240 #: ../tools/virt-win-reg.pl:71
43242 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
43243 "exported (recursively). For example:"
43247 #: ../tools/virt-win-reg.pl:74
43250 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
43255 #: ../tools/virt-win-reg.pl:76
43257 "You can also display single values from within registry keys, for example:"
43261 #: ../tools/virt-win-reg.pl:79
43264 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
43265 " $ virt-win-reg Windows7 $cvkey ProductName\n"
43266 " Windows 7 Enterprise\n"
43271 #: ../tools/virt-win-reg.pl:83
43273 "With I<--merge>, you can merge a textual regedit file into the Windows "
43278 #: ../tools/virt-win-reg.pl:86
43281 " $ virt-win-reg --merge Windows7 changes.reg\n"
43286 #: ../tools/virt-win-reg.pl:90
43288 "This program is only meant for simple access to the registry. If you want "
43289 "to do complicated things with the registry, we suggest you download the "
43290 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
43291 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
43292 "L<hivexregedit(1)>."
43296 #: ../tools/virt-win-reg.pl:159
43301 #: ../tools/virt-win-reg.pl:161
43303 "In merge mode, this merges a textual regedit file into the Windows Registry "
43304 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
43305 "displays or exports Registry entries instead."
43309 #: ../tools/virt-win-reg.pl:165
43311 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
43312 "result in disk corruption. However exporting (without this flag) is always "
43317 #: ../tools/virt-win-reg.pl:173
43318 msgid "B<--encoding> UTF-16LE|ASCII"
43322 #: ../tools/virt-win-reg.pl:175
43324 "When merging (only), you may need to specify the encoding for strings to be "
43325 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
43326 "(3)/ENCODING STRINGS>."
43330 #: ../tools/virt-win-reg.pl:179
43332 "The default is to use UTF-16LE, which should work with recent versions of "
43337 #: ../tools/virt-win-reg.pl:186
43338 msgid "B<--unsafe-printable-strings>"
43342 #: ../tools/virt-win-reg.pl:188
43344 "When exporting (only), assume strings are UTF-16LE and print them as strings "
43345 "instead of hex sequences. Remove the final zero codepoint from strings if "
43350 #: ../tools/virt-win-reg.pl:192
43352 "This is unsafe and does not preserve the fidelity of strings in the original "
43353 "Registry for various reasons:"
43357 #: ../tools/virt-win-reg.pl:199
43359 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
43360 "other encodings will be corrupted by this transformation."
43364 #: ../tools/virt-win-reg.pl:204
43366 "Assumes that everything which has type 1 or 2 is really a string and that "
43367 "everything else is not a string, but the type field in real Registries is "
43372 #: ../tools/virt-win-reg.pl:210
43374 "Loses information about whether a zero codepoint followed the string in the "
43379 #: ../tools/virt-win-reg.pl:215
43381 "This all happens because the Registry itself contains no information about "
43382 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
43386 #: ../tools/virt-win-reg.pl:219
43388 "You should only use this option for quick hacking and debugging of the "
43389 "Registry contents, and I<never> use it if the output is going to be passed "
43390 "into another program or stored in another Registry."
43394 #: ../tools/virt-win-reg.pl:556
43395 msgid "SUPPORTED SYSTEMS"
43399 #: ../tools/virt-win-reg.pl:558
43401 "The program currently supports Windows NT-derived guests starting with "
43402 "Windows XP through to at least Windows 7."
43406 #: ../tools/virt-win-reg.pl:561
43407 msgid "The following Registry keys are supported:"
43411 #: ../tools/virt-win-reg.pl:565
43412 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
43416 #: ../tools/virt-win-reg.pl:567
43417 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
43421 #: ../tools/virt-win-reg.pl:569
43422 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
43426 #: ../tools/virt-win-reg.pl:571
43427 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
43431 #: ../tools/virt-win-reg.pl:573
43432 msgid "C<HKEY_USERS\\.DEFAULT>"
43436 #: ../tools/virt-win-reg.pl:575
43437 msgid "C<HKEY_USERS\\I<SID>>"
43441 #: ../tools/virt-win-reg.pl:577
43442 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
43446 #: ../tools/virt-win-reg.pl:579
43447 msgid "C<HKEY_USERS\\I<username>>"
43451 #: ../tools/virt-win-reg.pl:581
43453 "where I<username> is a local user name (this is a libguestfs extension)."
43457 #: ../tools/virt-win-reg.pl:585
43459 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
43464 #: ../tools/virt-win-reg.pl:588
43466 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
43467 "supported (there is no \"current user\")."
43471 #: ../tools/virt-win-reg.pl:591
43476 #: ../tools/virt-win-reg.pl:593
43478 "C<virt-win-reg> expects that regedit files have already been reencoded in "
43479 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
43480 "style line endings. Since Windows regedit files are often in UTF-16LE with "
43481 "Windows-style line endings, you may need to reencode the whole file before "
43482 "or after processing."
43486 #: ../tools/virt-win-reg.pl:599
43488 "To reencode a file from Windows format to Linux (before processing it with "
43489 "the I<--merge> option), you would do something like this:"
43493 #: ../tools/virt-win-reg.pl:602
43496 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
43501 #: ../tools/virt-win-reg.pl:604
43503 "To go in the opposite direction, after exporting and before sending the file "
43504 "to a Windows user, do something like this:"
43508 #: ../tools/virt-win-reg.pl:607
43511 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
43516 #: ../tools/virt-win-reg.pl:609
43517 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
43521 #: ../tools/virt-win-reg.pl:611
43523 "If you are unsure about the current encoding, use the L<file(1)> command. "
43524 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
43525 "style (CRLF) line endings, like this:"
43529 #: ../tools/virt-win-reg.pl:615
43532 " $ file software.reg\n"
43533 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
43534 " with CRLF line terminators\n"
43539 #: ../tools/virt-win-reg.pl:619
43540 msgid "This file would need conversion before you could I<--merge> it."
43544 #: ../tools/virt-win-reg.pl:621
43545 msgid "CurrentControlSet etc."
43549 #: ../tools/virt-win-reg.pl:623
43551 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
43552 "Registry at the level of the hive file, and therefore you cannot modify "
43557 #: ../tools/virt-win-reg.pl:627
43559 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
43560 "circumstances it might refer to another control set. The way to find out is "
43561 "to look at the C<HKLM\\SYSTEM\\Select> key:"
43565 #: ../tools/virt-win-reg.pl:631
43568 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
43569 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
43570 " \"Current\"=dword:00000001\n"
43571 " \"Default\"=dword:00000001\n"
43572 " \"Failed\"=dword:00000000\n"
43573 " \"LastKnownGood\"=dword:00000002\n"
43578 #: ../tools/virt-win-reg.pl:638
43579 msgid "\"Current\" is the one which Windows will choose when it boots."
43583 #: ../tools/virt-win-reg.pl:640
43585 "Similarly, other C<Current...> keys in the path may need to be replaced."
43589 #: ../tools/virt-win-reg.pl:643
43590 msgid "DELETING REGISTRY KEYS AND VALUES"
43594 #: ../tools/virt-win-reg.pl:645
43595 msgid "To delete a whole registry key, use the syntax:"
43599 #: ../tools/virt-win-reg.pl:647
43602 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
43607 #: ../tools/virt-win-reg.pl:649
43608 msgid "To delete a single value within a key, use the syntax:"
43612 #: ../tools/virt-win-reg.pl:651
43615 " [HKEY_LOCAL_MACHINE\\Foo]\n"
43621 #: ../tools/virt-win-reg.pl:654
43622 msgid "WINDOWS TIPS"
43626 #: ../tools/virt-win-reg.pl:656
43628 "Note that some of these tips modify the guest disk image. The guest I<must> "
43629 "be shut off, else you will get disk corruption."
43633 #: ../tools/virt-win-reg.pl:659
43634 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
43638 #: ../tools/virt-win-reg.pl:661
43640 "Prepare a DOS batch script, VBScript or executable. Upload this using "
43641 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
43642 "is uploaded into C<C:\\>:"
43646 #: ../tools/virt-win-reg.pl:665
43649 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
43654 #: ../tools/virt-win-reg.pl:667
43655 msgid "Prepare a regedit file containing the registry change:"
43659 #: ../tools/virt-win-reg.pl:669
43662 " cat > test.reg <<'EOF'\n"
43663 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
43664 " \"Test\"=\"c:\\\\test.bat\"\n"
43670 #: ../tools/virt-win-reg.pl:674
43672 "In this example we use the key C<RunOnce> which means that the script will "
43673 "run precisely once when the first user logs in. If you want it to run every "
43674 "time a user logs in, replace C<RunOnce> with C<Run>."
43678 #: ../tools/virt-win-reg.pl:678
43679 msgid "Now update the registry:"
43683 #: ../tools/virt-win-reg.pl:680
43686 " virt-win-reg --merge WindowsGuest test.reg\n"
43691 #: ../tools/virt-win-reg.pl:682
43692 msgid "INSTALLING A SERVICE"
43696 #: ../tools/virt-win-reg.pl:684
43698 "This section assumes you are familiar with Windows services, and you either "
43699 "have a program which handles the Windows Service Control Protocol directly "
43700 "or you want to run any program using a service wrapper like SrvAny or the "
43705 #: ../tools/virt-win-reg.pl:689
43707 "First upload the program and optionally the service wrapper. In this case "
43708 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
43712 #: ../tools/virt-win-reg.pl:693
43715 " guestfish -i -d WindowsGuest <<EOF\n"
43716 " upload rhsrvany.exe /rhsrvany.exe\n"
43717 " upload test.exe /test.exe\n"
43723 #: ../tools/virt-win-reg.pl:698
43725 "Prepare a regedit file containing the registry changes. In this example, "
43726 "the first registry change is needed for the service itself or the service "
43727 "wrapper (if used). The second registry change is only needed because I am "
43728 "using the RHSrvAny service wrapper."
43732 #: ../tools/virt-win-reg.pl:703
43735 " cat > service.reg <<'EOF'\n"
43736 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
43737 " \"Type\"=dword:00000010\n"
43738 " \"Start\"=dword:00000002\n"
43739 " \"ErrorControl\"=dword:00000001\n"
43740 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
43741 " \"DisplayName\"=\"RHSrvAny\"\n"
43742 " \"ObjectName\"=\"NetworkService\"\n"
43747 #: ../tools/virt-win-reg.pl:712
43750 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
43751 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
43752 " \"PWD\"=\"c:\\\\Temp\"\n"
43758 #: ../tools/virt-win-reg.pl:723
43760 "For use of C<ControlSet001> see the section above in this manual page. You "
43761 "may need to adjust this according to the control set that is in use by the "
43766 #: ../tools/virt-win-reg.pl:729
43768 "C<\"ObjectName\"> controls the privileges that the service will have. An "
43769 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
43770 "privileged account."
43774 #: ../tools/virt-win-reg.pl:735
43776 "For the meaning of the magic numbers, see this Microsoft KB article: "
43777 "L<http://support.microsoft.com/kb/103000>."
43781 #: ../tools/virt-win-reg.pl:740
43782 msgid "Update the registry:"
43786 #: ../tools/virt-win-reg.pl:742
43789 " virt-win-reg --merge WindowsGuest service.reg\n"
43794 #: ../tools/virt-win-reg.pl:746
43796 "Be careful when passing parameters containing C<\\> (backslash) in the "
43797 "shell. Usually you will have to use 'single quotes' or double backslashes "
43798 "(but not both) to protect them from the shell."
43802 #: ../tools/virt-win-reg.pl:750
43803 msgid "Paths and value names are case-insensitive."
43807 #: ../tools/virt-win-reg.pl:759
43809 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
43810 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
43811 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
43815 #: ../tools/virt-win-reg.pl:777
43818 " export LIBGUESTFS_DEBUG=1\n"
43819 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
43824 #: ../tools/virt-win-reg.pl:780
43826 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."