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-11-29 14:22+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:2877
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:491
492 #: ../sparsify/virt-sparsify.pod:171
497 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:493
498 #: ../sparsify/virt-sparsify.pod:173
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:177
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:179
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:181
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:561
545 #: ../sparsify/virt-sparsify.pod:183
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:563
556 #: ../sparsify/virt-sparsify.pod:185 ../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:565
568 #: ../sparsify/virt-sparsify.pod:187 ../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:189
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:191
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:676
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:678
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:683 ../sparsify/virt-sparsify.pod:245
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:1262
929 #: ../fish/guestfish-actions.pod:1266 ../fish/guestfish-actions.pod:1270
930 #: ../fish/guestfish-actions.pod:1274 ../fish/guestfish-actions.pod:1282
931 #: ../fish/guestfish-actions.pod:1286 ../fish/guestfish-actions.pod:1290
932 #: ../fish/guestfish-actions.pod:1300 ../fish/guestfish-actions.pod:1304
933 #: ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1398
934 #: ../fish/guestfish-actions.pod:1402 ../fish/guestfish-actions.pod:1407
935 #: ../fish/guestfish-actions.pod:1412 ../fish/guestfish-actions.pod:1454
936 #: ../fish/guestfish-actions.pod:1458 ../fish/guestfish-actions.pod:1463
937 #: ../fish/guestfish-actions.pod:1719 ../fish/guestfish-actions.pod:1726
938 #: ../fish/guestfish-actions.pod:1733 ../fish/guestfish-actions.pod:2136
939 #: ../fish/guestfish-actions.pod:2142 ../fish/guestfish-actions.pod:2150
940 #: ../fish/guestfish-actions.pod:2157 ../fish/guestfish-actions.pod:2164
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:359 ../resize/virt-resize.pod:363
945 #: ../resize/virt-resize.pod:372 ../resize/virt-resize.pod:378
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:2079
953 #: ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2087
954 #: ../src/guestfs-actions.pod:2091 ../src/guestfs-actions.pod:2099
955 #: ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:2107
956 #: ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2121
957 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:2263
958 #: ../src/guestfs-actions.pod:2267 ../src/guestfs-actions.pod:2272
959 #: ../src/guestfs-actions.pod:2277 ../src/guestfs-actions.pod:2338
960 #: ../src/guestfs-actions.pod:2342 ../src/guestfs-actions.pod:2347
961 #: ../src/guestfs-actions.pod:2762 ../src/guestfs-actions.pod:2769
962 #: ../src/guestfs-actions.pod:2776 ../src/guestfs-actions.pod:3321
963 #: ../src/guestfs-actions.pod:3327 ../src/guestfs-actions.pod:3335
964 #: ../src/guestfs-actions.pod:3342 ../src/guestfs-actions.pod:3349
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:3067 ../src/guestfs.pod:3072 ../src/guestfs.pod:3076
978 #: ../src/guestfs.pod:3080 ../src/guestfs.pod:3084 ../src/guestfs.pod:3098
979 #: ../src/guestfs.pod:3103 ../src/guestfs.pod:3335 ../src/guestfs.pod:3339
980 #: ../src/guestfs.pod:3343 ../src/guestfs.pod:3347
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:688 ../ruby/examples/guestfs-ruby.pod:36
1046 #: ../sparsify/virt-sparsify.pod:269 ../src/guestfs.pod:3275
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:711 ../sparsify/virt-sparsify.pod:282
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:713
1079 #: ../sparsify/virt-sparsify.pod:284 ../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:715 ../ruby/examples/guestfs-ruby.pod:52
1099 #: ../sparsify/virt-sparsify.pod:286 ../src/guestfs.pod:3358
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:288
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:719
1122 #: ../sparsify/virt-sparsify.pod:290 ../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:724
1142 #: ../sparsify/virt-sparsify.pod:295 ../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:729
1162 #: ../sparsify/virt-sparsify.pod:300 ../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:685 ../sparsify/virt-sparsify.pod:247
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:717 ../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:4488
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:250
4574 #: ../src/guestfs.pod:3214 ../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:3354
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:3356
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:3363
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:3368
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:3373
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:1450 ../fish/guestfish-actions.pod:1715
5266 #: ../fish/guestfish-actions.pod:2132 ../src/guestfs-actions.pod:18
5267 #: ../src/guestfs-actions.pod:2334 ../src/guestfs-actions.pod:2758
5268 #: ../src/guestfs-actions.pod:3317 ../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:2792
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:3088
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:941
6577 #: ../fish/guestfish-actions.pod:976 ../fish/guestfish-actions.pod:1149
6578 #: ../fish/guestfish-actions.pod:1509 ../fish/guestfish-actions.pod:1523
6579 #: ../fish/guestfish-actions.pod:3392 ../fish/guestfish-actions.pod:3703
6580 #: ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:4669
6581 #: ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4708
6582 #: ../fish/guestfish-actions.pod:4746 ../fish/guestfish-actions.pod:5474
6583 #: ../fish/guestfish-actions.pod:5577 ../src/guestfs-actions.pod:10
6584 #: ../src/guestfs-actions.pod:305 ../src/guestfs-actions.pod:326
6585 #: ../src/guestfs-actions.pod:1580 ../src/guestfs-actions.pod:1637
6586 #: ../src/guestfs-actions.pod:1920 ../src/guestfs-actions.pod:2419
6587 #: ../src/guestfs-actions.pod:2440 ../src/guestfs-actions.pod:5242
6588 #: ../src/guestfs-actions.pod:5764 ../src/guestfs-actions.pod:5864
6589 #: ../src/guestfs-actions.pod:7160 ../src/guestfs-actions.pod:7201
6590 #: ../src/guestfs-actions.pod:7232 ../src/guestfs-actions.pod:7292
6591 #: ../src/guestfs-actions.pod:8346 ../src/guestfs-actions.pod:8455
6592 #: ../src/guestfs-actions.pod:8635
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:624 ../fish/guestfish-actions.pod:835
6763 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:894
6764 #: ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:912
6765 #: ../fish/guestfish-actions.pod:926 ../fish/guestfish-actions.pod:2171
6766 #: ../fish/guestfish-actions.pod:3219 ../fish/guestfish-actions.pod:3441
6767 #: ../fish/guestfish-actions.pod:3604 ../fish/guestfish-actions.pod:3739
6768 #: ../fish/guestfish-actions.pod:5110
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:3403
6846 #: ../src/guestfs-actions.pod:221 ../src/guestfs-actions.pod:5279
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:3246
6898 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:5000
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:749 ../fish/guestfish-actions.pod:833
7547 #: ../fish/guestfish-actions.pod:854 ../fish/guestfish-actions.pod:1025
7548 #: ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1418
7549 #: ../fish/guestfish-actions.pod:4966 ../fish/guestfish-actions.pod:4978
7550 #: ../fish/guestfish-actions.pod:4989 ../fish/guestfish-actions.pod:5000
7551 #: ../fish/guestfish-actions.pod:5131 ../fish/guestfish-actions.pod:5140
7552 #: ../fish/guestfish-actions.pod:5194 ../fish/guestfish-actions.pod:5217
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
7578 msgid "blockdev-flushbufs"
7582 #: ../fish/guestfish-actions.pod:504
7585 " blockdev-flushbufs device\n"
7590 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:729
7592 "This tells the kernel to flush internal buffers associated with C<device>."
7596 #: ../fish/guestfish-actions.pod:509 ../fish/guestfish-actions.pod:520
7597 #: ../fish/guestfish-actions.pod:529 ../fish/guestfish-actions.pod:539
7598 #: ../fish/guestfish-actions.pod:551 ../fish/guestfish-actions.pod:564
7599 #: ../fish/guestfish-actions.pod:572 ../fish/guestfish-actions.pod:583
7600 #: ../fish/guestfish-actions.pod:591 ../fish/guestfish-actions.pod:599
7601 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:749
7602 #: ../src/guestfs-actions.pod:764 ../src/guestfs-actions.pod:780
7603 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:817
7604 #: ../src/guestfs-actions.pod:831 ../src/guestfs-actions.pod:849
7605 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:877
7606 msgid "This uses the L<blockdev(8)> command."
7610 #: ../fish/guestfish-actions.pod:511
7611 msgid "blockdev-getbsz"
7615 #: ../fish/guestfish-actions.pod:513
7618 " blockdev-getbsz device\n"
7623 #: ../fish/guestfish-actions.pod:515 ../src/guestfs-actions.pod:744
7624 msgid "This returns the block size of a device."
7628 #: ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:580
7629 #: ../src/guestfs-actions.pod:746 ../src/guestfs-actions.pod:846
7631 "(Note this is different from both I<size in blocks> and I<filesystem block "
7636 #: ../fish/guestfish-actions.pod:522
7637 msgid "blockdev-getro"
7641 #: ../fish/guestfish-actions.pod:524
7644 " blockdev-getro device\n"
7649 #: ../fish/guestfish-actions.pod:526 ../src/guestfs-actions.pod:761
7651 "Returns a boolean indicating if the block device is read-only (true if read-"
7652 "only, false if not)."
7656 #: ../fish/guestfish-actions.pod:531
7657 msgid "blockdev-getsize64"
7661 #: ../fish/guestfish-actions.pod:533
7664 " blockdev-getsize64 device\n"
7669 #: ../fish/guestfish-actions.pod:535 ../src/guestfs-actions.pod:776
7670 msgid "This returns the size of the device in bytes."
7674 #: ../fish/guestfish-actions.pod:537
7675 msgid "See also L</blockdev-getsz>."
7679 #: ../fish/guestfish-actions.pod:541
7680 msgid "blockdev-getss"
7684 #: ../fish/guestfish-actions.pod:543
7687 " blockdev-getss device\n"
7692 #: ../fish/guestfish-actions.pod:545 ../src/guestfs-actions.pod:792
7694 "This returns the size of sectors on a block device. Usually 512, but can be "
7695 "larger for modern devices."
7699 #: ../fish/guestfish-actions.pod:548
7701 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
7705 #: ../fish/guestfish-actions.pod:553
7706 msgid "blockdev-getsz"
7710 #: ../fish/guestfish-actions.pod:555
7713 " blockdev-getsz device\n"
7718 #: ../fish/guestfish-actions.pod:557 ../src/guestfs-actions.pod:810
7720 "This returns the size of the device in units of 512-byte sectors (even if "
7721 "the sectorsize isn't 512 bytes ... weird)."
7725 #: ../fish/guestfish-actions.pod:560
7727 "See also L</blockdev-getss> for the real sector size of the device, and L</"
7728 "blockdev-getsize64> for the more useful I<size in bytes>."
7732 #: ../fish/guestfish-actions.pod:566
7733 msgid "blockdev-rereadpt"
7737 #: ../fish/guestfish-actions.pod:568
7740 " blockdev-rereadpt device\n"
7745 #: ../fish/guestfish-actions.pod:570 ../src/guestfs-actions.pod:829
7746 msgid "Reread the partition table on C<device>."
7750 #: ../fish/guestfish-actions.pod:574
7751 msgid "blockdev-setbsz"
7755 #: ../fish/guestfish-actions.pod:576
7758 " blockdev-setbsz device blocksize\n"
7763 #: ../fish/guestfish-actions.pod:578 ../src/guestfs-actions.pod:844
7764 msgid "This sets the block size of a device."
7768 #: ../fish/guestfish-actions.pod:585
7769 msgid "blockdev-setro"
7773 #: ../fish/guestfish-actions.pod:587
7776 " blockdev-setro device\n"
7781 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:861
7782 msgid "Sets the block device named C<device> to read-only."
7786 #: ../fish/guestfish-actions.pod:593
7787 msgid "blockdev-setrw"
7791 #: ../fish/guestfish-actions.pod:595
7794 " blockdev-setrw device\n"
7799 #: ../fish/guestfish-actions.pod:597 ../src/guestfs-actions.pod:875
7800 msgid "Sets the block device named C<device> to read-write."
7804 #: ../fish/guestfish-actions.pod:601
7805 msgid "btrfs-filesystem-resize"
7809 #: ../fish/guestfish-actions.pod:603
7812 " btrfs-filesystem-resize mountpoint [size:N]\n"
7817 #: ../fish/guestfish-actions.pod:605 ../src/guestfs-actions.pod:897
7818 msgid "This command resizes a btrfs filesystem."
7822 #: ../fish/guestfish-actions.pod:607 ../src/guestfs-actions.pod:899
7824 "Note that unlike other resize calls, the filesystem has to be mounted and "
7825 "the parameter is the mountpoint not the device (this is a requirement of "
7830 #: ../fish/guestfish-actions.pod:611 ../fish/guestfish-actions.pod:3168
7831 #: ../fish/guestfish-actions.pod:3714 ../fish/guestfish-actions.pod:5040
7832 #: ../src/guestfs-actions.pod:903 ../src/guestfs-actions.pod:4896
7833 #: ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:7779
7834 msgid "The optional parameters are:"
7838 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3718
7839 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:5807
7844 #: ../fish/guestfish-actions.pod:617 ../src/guestfs-actions.pod:909
7846 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
7847 "resized to the maximum size."
7851 #: ../fish/guestfish-actions.pod:622 ../src/guestfs-actions.pod:914
7852 msgid "See also L<btrfs(8)>."
7856 #: ../fish/guestfish-actions.pod:626
7857 msgid "case-sensitive-path"
7861 #: ../fish/guestfish-actions.pod:628
7864 " case-sensitive-path path\n"
7869 #: ../fish/guestfish-actions.pod:630 ../src/guestfs-actions.pod:948
7871 "This can be used to resolve case insensitive paths on a filesystem which is "
7872 "case sensitive. The use case is to resolve paths which you have read from "
7873 "Windows configuration files or the Windows Registry, to the true path."
7877 #: ../fish/guestfish-actions.pod:635 ../src/guestfs-actions.pod:953
7879 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7880 "(and probably others), which is that although the underlying filesystem is "
7881 "case-insensitive, the driver exports the filesystem to Linux as case-"
7886 #: ../fish/guestfish-actions.pod:640 ../src/guestfs-actions.pod:958
7888 "One consequence of this is that special directories such as C<c:\\windows> "
7889 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7890 "precise details of how they were created. In Windows itself this would not "
7895 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:964
7897 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7902 #: ../fish/guestfish-actions.pod:649 ../src/guestfs-actions.pod:967
7904 "This function resolves the true case of each element in the path and returns "
7905 "the case-sensitive path."
7909 #: ../fish/guestfish-actions.pod:652
7911 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
7912 "WINDOWS/system32\"> (the exact return value would depend on details of how "
7913 "the directories were originally created under Windows)."
7917 #: ../fish/guestfish-actions.pod:657 ../src/guestfs-actions.pod:975
7918 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7922 #: ../fish/guestfish-actions.pod:660
7923 msgid "See also L</realpath>."
7927 #: ../fish/guestfish-actions.pod:662
7932 #: ../fish/guestfish-actions.pod:664
7940 #: ../fish/guestfish-actions.pod:666 ../fish/guestfish-actions.pod:4145
7941 #: ../src/guestfs-actions.pod:991 ../src/guestfs-actions.pod:6463
7942 msgid "Return the contents of the file named C<path>."
7946 #: ../fish/guestfish-actions.pod:668
7948 "Note that this function cannot correctly handle binary files (specifically, "
7949 "files containing C<\\0> character which is treated as end of string). For "
7950 "those you need to use the L</read-file> or L</download> functions which have "
7951 "a more complex interface."
7955 #: ../fish/guestfish-actions.pod:673 ../fish/guestfish-actions.pod:808
7956 #: ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:1103
7957 #: ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1180
7958 #: ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1382
7959 #: ../fish/guestfish-actions.pod:1695 ../fish/guestfish-actions.pod:1705
7960 #: ../fish/guestfish-actions.pod:1755 ../fish/guestfish-actions.pod:1770
7961 #: ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1799
7962 #: ../fish/guestfish-actions.pod:4015 ../fish/guestfish-actions.pod:4030
7963 #: ../fish/guestfish-actions.pod:4106 ../fish/guestfish-actions.pod:4123
7964 #: ../fish/guestfish-actions.pod:4138 ../fish/guestfish-actions.pod:4807
7965 #: ../fish/guestfish-actions.pod:4853 ../fish/guestfish-actions.pod:4938
7966 #: ../fish/guestfish-actions.pod:4953 ../fish/guestfish-actions.pod:5438
7967 #: ../fish/guestfish-actions.pod:5450 ../fish/guestfish-actions.pod:5468
7968 #: ../fish/guestfish-actions.pod:5485 ../fish/guestfish-actions.pod:5495
7969 #: ../fish/guestfish-actions.pod:5549 ../fish/guestfish-actions.pod:5559
7970 #: ../fish/guestfish-actions.pod:5588 ../fish/guestfish-actions.pod:5598
7971 #: ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1180
7972 #: ../src/guestfs-actions.pod:1200 ../src/guestfs-actions.pod:1855
7973 #: ../src/guestfs-actions.pod:1874 ../src/guestfs-actions.pod:1977
7974 #: ../src/guestfs-actions.pod:1996 ../src/guestfs-actions.pod:2242
7975 #: ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:2743
7976 #: ../src/guestfs-actions.pod:2808 ../src/guestfs-actions.pod:2832
7977 #: ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2878
7978 #: ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6271
7979 #: ../src/guestfs-actions.pod:6402 ../src/guestfs-actions.pod:6428
7980 #: ../src/guestfs-actions.pod:6452 ../src/guestfs-actions.pod:7407
7981 #: ../src/guestfs-actions.pod:7462 ../src/guestfs-actions.pod:7608
7982 #: ../src/guestfs-actions.pod:7632 ../src/guestfs-actions.pod:8419
7983 #: ../src/guestfs-actions.pod:8439 ../src/guestfs-actions.pod:8472
7984 #: ../src/guestfs-actions.pod:8491 ../src/guestfs-actions.pod:8510
7985 #: ../src/guestfs-actions.pod:8601 ../src/guestfs-actions.pod:8620
7986 #: ../src/guestfs-actions.pod:8666 ../src/guestfs-actions.pod:8685
7988 "Because of the message protocol, there is a transfer limit of somewhere "
7989 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7993 #: ../fish/guestfish-actions.pod:676
7998 #: ../fish/guestfish-actions.pod:678
8001 " checksum csumtype path\n"
8006 #: ../fish/guestfish-actions.pod:680 ../src/guestfs-actions.pod:1013
8008 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
8012 #: ../fish/guestfish-actions.pod:683 ../src/guestfs-actions.pod:1016
8014 "The type of checksum to compute is given by the C<csumtype> parameter which "
8015 "must have one of the following values:"
8019 #: ../fish/guestfish-actions.pod:688 ../src/guestfs-actions.pod:1021
8024 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1023
8026 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
8031 #: ../fish/guestfish-actions.pod:693 ../src/guestfs-actions.pod:1026
8036 #: ../fish/guestfish-actions.pod:695 ../src/guestfs-actions.pod:1028
8037 msgid "Compute the MD5 hash (using the C<md5sum> program)."
8041 #: ../fish/guestfish-actions.pod:697 ../src/guestfs-actions.pod:1030
8046 #: ../fish/guestfish-actions.pod:699 ../src/guestfs-actions.pod:1032
8047 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
8051 #: ../fish/guestfish-actions.pod:701 ../src/guestfs-actions.pod:1034
8056 #: ../fish/guestfish-actions.pod:703 ../src/guestfs-actions.pod:1036
8057 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
8061 #: ../fish/guestfish-actions.pod:705 ../src/guestfs-actions.pod:1038
8066 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1040
8067 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
8071 #: ../fish/guestfish-actions.pod:709 ../src/guestfs-actions.pod:1042
8076 #: ../fish/guestfish-actions.pod:711 ../src/guestfs-actions.pod:1044
8077 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
8081 #: ../fish/guestfish-actions.pod:713 ../src/guestfs-actions.pod:1046
8086 #: ../fish/guestfish-actions.pod:715 ../src/guestfs-actions.pod:1048
8087 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
8091 #: ../fish/guestfish-actions.pod:719 ../src/guestfs-actions.pod:1052
8092 msgid "The checksum is returned as a printable string."
8096 #: ../fish/guestfish-actions.pod:721
8097 msgid "To get the checksum for a device, use L</checksum-device>."
8101 #: ../fish/guestfish-actions.pod:723
8102 msgid "To get the checksums for many files, use L</checksums-out>."
8106 #: ../fish/guestfish-actions.pod:725
8107 msgid "checksum-device"
8111 #: ../fish/guestfish-actions.pod:727
8114 " checksum-device csumtype device\n"
8119 #: ../fish/guestfish-actions.pod:729
8121 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
8122 "device named C<device>. For the types of checksums supported see the L</"
8123 "checksum> command."
8127 #: ../fish/guestfish-actions.pod:733
8128 msgid "checksums-out"
8132 #: ../fish/guestfish-actions.pod:735
8135 " checksums-out csumtype directory (sumsfile|-)\n"
8140 #: ../fish/guestfish-actions.pod:737 ../src/guestfs-actions.pod:1087
8142 "This command computes the checksums of all regular files in C<directory> and "
8143 "then emits a list of those checksums to the local output file C<sumsfile>."
8147 #: ../fish/guestfish-actions.pod:741 ../src/guestfs-actions.pod:1091
8149 "This can be used for verifying the integrity of a virtual machine. However "
8150 "to be properly secure you should pay attention to the output of the checksum "
8151 "command (it uses the ones from GNU coreutils). In particular when the "
8152 "filename is not printable, coreutils uses a special backslash syntax. For "
8153 "more information, see the GNU coreutils info file."
8157 #: ../fish/guestfish-actions.pod:751
8162 #: ../fish/guestfish-actions.pod:753
8165 " chmod mode path\n"
8170 #: ../fish/guestfish-actions.pod:755 ../src/guestfs-actions.pod:1110
8172 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
8177 #: ../fish/guestfish-actions.pod:758 ../src/guestfs-actions.pod:1113
8179 "I<Note>: When using this command from guestfish, C<mode> by default would be "
8180 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
8185 #: ../fish/guestfish-actions.pod:762 ../fish/guestfish-actions.pod:3367
8186 #: ../fish/guestfish-actions.pod:3506 ../fish/guestfish-actions.pod:3516
8187 #: ../fish/guestfish-actions.pod:3526 ../src/guestfs-actions.pod:1117
8188 #: ../src/guestfs-actions.pod:5210 ../src/guestfs-actions.pod:5419
8189 #: ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5457
8190 msgid "The mode actually set is affected by the umask."
8194 #: ../fish/guestfish-actions.pod:764
8199 #: ../fish/guestfish-actions.pod:766
8202 " chown owner group path\n"
8207 #: ../fish/guestfish-actions.pod:768 ../src/guestfs-actions.pod:1131
8208 msgid "Change the file owner to C<owner> and group to C<group>."
8212 #: ../fish/guestfish-actions.pod:770 ../fish/guestfish-actions.pod:2707
8213 #: ../src/guestfs-actions.pod:1133 ../src/guestfs-actions.pod:4128
8215 "Only numeric uid and gid are supported. If you want to use names, you will "
8216 "need to locate and parse the password file yourself (Augeas support makes "
8217 "this relatively easy)."
8221 #: ../fish/guestfish-actions.pod:774
8226 #: ../fish/guestfish-actions.pod:776
8229 " command 'arguments ...'\n"
8234 #: ../fish/guestfish-actions.pod:778 ../src/guestfs-actions.pod:1147
8236 "This call runs a command from the guest filesystem. The filesystem must be "
8237 "mounted, and must contain a compatible operating system (ie. something "
8238 "Linux, with the same or compatible processor architecture)."
8242 #: ../fish/guestfish-actions.pod:783
8244 "The single parameter is an argv-style list of arguments. The first element "
8245 "is the name of the program to run. Subsequent elements are parameters. The "
8246 "list must be non-empty (ie. must contain a program name). Note that the "
8247 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
8251 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1159
8252 msgid "The return value is anything printed to I<stdout> by the command."
8256 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1162
8258 "If the command returns a non-zero exit status, then this function returns an "
8259 "error message. The error message string is the content of I<stderr> from "
8264 #: ../fish/guestfish-actions.pod:797 ../src/guestfs-actions.pod:1166
8266 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
8267 "bin>. If you require a program from another location, you should provide "
8268 "the full path in the first parameter."
8272 #: ../fish/guestfish-actions.pod:802 ../src/guestfs-actions.pod:1171
8274 "Shared libraries and data files required by the program must be available on "
8275 "filesystems which are mounted in the correct places. It is the caller's "
8276 "responsibility to ensure all filesystems that are needed are mounted at the "
8281 #: ../fish/guestfish-actions.pod:811
8282 msgid "command-lines"
8286 #: ../fish/guestfish-actions.pod:813
8289 " command-lines 'arguments ...'\n"
8294 #: ../fish/guestfish-actions.pod:815
8296 "This is the same as L</command>, but splits the result into a list of lines."
8300 #: ../fish/guestfish-actions.pod:818
8301 msgid "See also: L</sh-lines>"
8305 #: ../fish/guestfish-actions.pod:823
8306 msgid "compress-device-out"
8310 #: ../fish/guestfish-actions.pod:825
8313 " compress-device-out ctype device (zdevice|-) [level:N]\n"
8318 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1221
8320 "This command compresses C<device> and writes it out to the local file "
8325 #: ../fish/guestfish-actions.pod:830
8327 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
8332 #: ../fish/guestfish-actions.pod:837
8333 msgid "compress-out"
8337 #: ../fish/guestfish-actions.pod:839
8340 " compress-out ctype file (zfile|-) [level:N]\n"
8345 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1273
8347 "This command compresses C<file> and writes it out to the local file C<zfile>."
8351 #: ../fish/guestfish-actions.pod:844 ../src/guestfs-actions.pod:1276
8353 "The compression program used is controlled by the C<ctype> parameter. "
8354 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
8355 "Some compression types may not be supported by particular builds of "
8356 "libguestfs, in which case you will get an error containing the substring "
8357 "\"not supported\"."
8361 #: ../fish/guestfish-actions.pod:850 ../src/guestfs-actions.pod:1282
8363 "The optional C<level> parameter controls compression level. The meaning and "
8364 "default for this parameter depends on the compression program being used."
8368 #: ../fish/guestfish-actions.pod:858
8373 #: ../fish/guestfish-actions.pod:860
8376 " config qemuparam qemuvalue\n"
8381 #: ../fish/guestfish-actions.pod:862 ../src/guestfs-actions.pod:1323
8383 "This can be used to add arbitrary qemu command line parameters of the form "
8384 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8385 "setting some parameters which would interfere with parameters that we use."
8389 #: ../fish/guestfish-actions.pod:867 ../src/guestfs-actions.pod:1328
8390 msgid "The first character of C<param> string must be a C<-> (dash)."
8394 #: ../fish/guestfish-actions.pod:869 ../src/guestfs-actions.pod:1330
8395 msgid "C<value> can be NULL."
8399 #: ../fish/guestfish-actions.pod:871
8400 msgid "copy-device-to-device"
8404 #: ../fish/guestfish-actions.pod:873
8407 " copy-device-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8412 #: ../fish/guestfish-actions.pod:875
8414 "The four calls L</copy-device-to-device>, L</copy-device-to-file>, L</copy-"
8415 "file-to-device>, and L</copy-file-to-file> let you copy from a source "
8416 "(device|file) to a destination (device|file)."
8420 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1360
8422 "Partial copies can be made since you can specify optionally the source "
8423 "offset, destination offset and size to copy. These values are all specified "
8424 "in bytes. If not given, the offsets both default to zero, and the size "
8425 "defaults to copying as much as possible until we hit the end of the source."
8429 #: ../fish/guestfish-actions.pod:888 ../src/guestfs-actions.pod:1366
8431 "The source and destination may be the same object. However overlapping "
8432 "regions may not be copied correctly."
8436 #: ../fish/guestfish-actions.pod:891 ../src/guestfs-actions.pod:1369
8438 "If the destination is a file, it is created if required. If the destination "
8439 "file is not large enough, it is extended."
8443 #: ../fish/guestfish-actions.pod:896
8444 msgid "copy-device-to-file"
8448 #: ../fish/guestfish-actions.pod:898
8451 " copy-device-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8456 #: ../fish/guestfish-actions.pod:900 ../fish/guestfish-actions.pod:909
8457 #: ../fish/guestfish-actions.pod:918
8458 msgid "See L</copy-device-to-device> for a general overview of this call."
8462 #: ../fish/guestfish-actions.pod:905
8463 msgid "copy-file-to-device"
8467 #: ../fish/guestfish-actions.pod:907
8470 " copy-file-to-device src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8475 #: ../fish/guestfish-actions.pod:914
8476 msgid "copy-file-to-file"
8480 #: ../fish/guestfish-actions.pod:916
8483 " copy-file-to-file src dest [srcoffset:N] [destoffset:N] [size:N]\n"
8488 #: ../fish/guestfish-actions.pod:921
8490 "This is B<not> the function you want for copying files. This is for copying "
8491 "blocks within existing files. See L</cp>, L</cp-a> and L</mv> for general "
8492 "file copying and moving functions."
8496 #: ../fish/guestfish-actions.pod:928
8501 #: ../fish/guestfish-actions.pod:930
8504 " copy-size src dest size\n"
8509 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1584
8511 "This command copies exactly C<size> bytes from one source device or file "
8512 "C<src> to another destination device or file C<dest>."
8516 #: ../fish/guestfish-actions.pod:935 ../src/guestfs-actions.pod:1587
8518 "Note this will fail if the source is too short or if the destination is not "
8523 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:973
8525 "I<This function is deprecated.> In new code, use the L</"
8526 "copy_device_to_device> call instead."
8530 #: ../fish/guestfish-actions.pod:945
8535 #: ../fish/guestfish-actions.pod:947
8543 #: ../fish/guestfish-actions.pod:949 ../src/guestfs-actions.pod:1606
8545 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8546 "destination filename or destination directory."
8550 #: ../fish/guestfish-actions.pod:952
8555 #: ../fish/guestfish-actions.pod:954
8563 #: ../fish/guestfish-actions.pod:956 ../src/guestfs-actions.pod:1620
8565 "This copies a file or directory from C<src> to C<dest> recursively using the "
8570 #: ../fish/guestfish-actions.pod:959
8575 #: ../fish/guestfish-actions.pod:961
8583 #: ../fish/guestfish-actions.pod:963 ../src/guestfs-actions.pod:1641
8585 "This command copies from one source device or file C<src> to another "
8586 "destination device or file C<dest>. Normally you would use this to copy to "
8587 "or from a device or partition, for example to duplicate a filesystem."
8591 #: ../fish/guestfish-actions.pod:968
8593 "If the destination is a device, it must be as large or larger than the "
8594 "source file or device, otherwise the copy will fail. This command cannot do "
8595 "partial copies (see L</copy-device-to-device>)."
8599 #: ../fish/guestfish-actions.pod:980
8604 #: ../fish/guestfish-actions.pod:982
8612 #: ../fish/guestfish-actions.pod:984 ../src/guestfs-actions.pod:1660
8613 msgid "This command runs the C<df> command to report disk space used."
8617 #: ../fish/guestfish-actions.pod:986 ../fish/guestfish-actions.pod:997
8619 "This command is mostly useful for interactive sessions. It is I<not> "
8620 "intended that you try to parse the output string. Use L</statvfs> from "
8625 #: ../fish/guestfish-actions.pod:990
8630 #: ../fish/guestfish-actions.pod:992
8638 #: ../fish/guestfish-actions.pod:994 ../src/guestfs-actions.pod:1676
8640 "This command runs the C<df -h> command to report disk space used in human-"
8645 #: ../fish/guestfish-actions.pod:1001
8650 #: ../fish/guestfish-actions.pod:1003
8658 #: ../fish/guestfish-actions.pod:1005 ../src/guestfs-actions.pod:1693
8660 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8661 "This is sometimes useful for extended debugging of problems."
8665 #: ../fish/guestfish-actions.pod:1009
8667 "Another way to get the same information is to enable verbose messages with "
8668 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
8669 "before running the program."
8673 #: ../fish/guestfish-actions.pod:1014
8678 #: ../fish/guestfish-actions.pod:1016
8681 " download remotefilename (filename|-)\n"
8686 #: ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1031
8687 #: ../src/guestfs-actions.pod:1714 ../src/guestfs-actions.pod:1739
8689 "Download file C<remotefilename> and save it as C<filename> on the local "
8694 #: ../fish/guestfish-actions.pod:1021 ../fish/guestfish-actions.pod:5190
8695 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:7989
8696 msgid "C<filename> can also be a named pipe."
8700 #: ../fish/guestfish-actions.pod:1023
8701 msgid "See also L</upload>, L</cat>."
8705 #: ../fish/guestfish-actions.pod:1027
8706 msgid "download-offset"
8710 #: ../fish/guestfish-actions.pod:1029
8713 " download-offset remotefilename (filename|-) offset size\n"
8718 #: ../fish/guestfish-actions.pod:1034 ../src/guestfs-actions.pod:1742
8720 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8721 "region must be within the file or device)."
8725 #: ../fish/guestfish-actions.pod:1037
8727 "Note that there is no limit on the amount of data that can be downloaded "
8728 "with this call, unlike with L</pread>, and this call always reads the full "
8729 "amount unless an error occurs."
8733 #: ../fish/guestfish-actions.pod:1042
8734 msgid "See also L</download>, L</pread>."
8738 #: ../fish/guestfish-actions.pod:1046
8743 #: ../fish/guestfish-actions.pod:1048
8746 " drop-caches whattodrop\n"
8751 #: ../fish/guestfish-actions.pod:1050 ../src/guestfs-actions.pod:1767
8753 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8754 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8755 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8759 #: ../fish/guestfish-actions.pod:1055 ../src/guestfs-actions.pod:1772
8760 msgid "Setting C<whattodrop> to 3 should drop everything."
8764 #: ../fish/guestfish-actions.pod:1057 ../src/guestfs-actions.pod:1774
8766 "This automatically calls L<sync(2)> before the operation, so that the "
8767 "maximum guest memory is freed."
8771 #: ../fish/guestfish-actions.pod:1060
8776 #: ../fish/guestfish-actions.pod:1062
8784 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1787
8786 "This command runs the C<du -s> command to estimate file space usage for "
8791 #: ../fish/guestfish-actions.pod:1067 ../src/guestfs-actions.pod:1790
8793 "C<path> can be a file or a directory. If C<path> is a directory then the "
8794 "estimate includes the contents of the directory and all subdirectories "
8799 #: ../fish/guestfish-actions.pod:1071 ../src/guestfs-actions.pod:1794
8801 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8805 #: ../fish/guestfish-actions.pod:1074
8810 #: ../fish/guestfish-actions.pod:1076
8813 " e2fsck-f device\n"
8818 #: ../fish/guestfish-actions.pod:1078 ../src/guestfs-actions.pod:1812
8820 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8821 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8826 #: ../fish/guestfish-actions.pod:1082
8828 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
8829 "should use L</fsck>."
8833 #: ../fish/guestfish-actions.pod:1085
8838 #: ../fish/guestfish-actions.pod:1087
8841 " echo-daemon 'words ...'\n"
8846 #: ../fish/guestfish-actions.pod:1089 ../src/guestfs-actions.pod:1829
8848 "This command concatenates the list of C<words> passed with single spaces "
8849 "between them and returns the resulting string."
8853 #: ../fish/guestfish-actions.pod:1092 ../src/guestfs-actions.pod:1832
8854 msgid "You can use this command to test the connection through to the daemon."
8858 #: ../fish/guestfish-actions.pod:1094
8859 msgid "See also L</ping-daemon>."
8863 #: ../fish/guestfish-actions.pod:1096
8868 #: ../fish/guestfish-actions.pod:1098
8871 " egrep regex path\n"
8876 #: ../fish/guestfish-actions.pod:1100 ../src/guestfs-actions.pod:1848
8878 "This calls the external C<egrep> program and returns the matching lines."
8882 #: ../fish/guestfish-actions.pod:1106
8887 #: ../fish/guestfish-actions.pod:1108
8890 " egrepi regex path\n"
8895 #: ../fish/guestfish-actions.pod:1110 ../src/guestfs-actions.pod:1867
8897 "This calls the external C<egrep -i> program and returns the matching lines."
8901 #: ../fish/guestfish-actions.pod:1116
8906 #: ../fish/guestfish-actions.pod:1118
8909 " equal file1 file2\n"
8914 #: ../fish/guestfish-actions.pod:1120 ../src/guestfs-actions.pod:1886
8916 "This compares the two files C<file1> and C<file2> and returns true if their "
8917 "content is exactly equal, or false otherwise."
8921 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1889
8922 msgid "The external L<cmp(1)> program is used for the comparison."
8926 #: ../fish/guestfish-actions.pod:1125
8931 #: ../fish/guestfish-actions.pod:1127
8939 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1901
8941 "This returns C<true> if and only if there is a file, directory (or anything) "
8942 "with the given C<path> name."
8946 #: ../fish/guestfish-actions.pod:1132
8947 msgid "See also L</is-file>, L</is-dir>, L</stat>."
8951 #: ../fish/guestfish-actions.pod:1134
8956 #: ../fish/guestfish-actions.pod:1136
8959 " fallocate path len\n"
8964 #: ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1157
8965 #: ../src/guestfs-actions.pod:1924 ../src/guestfs-actions.pod:1943
8967 "This command preallocates a file (containing zero bytes) named C<path> of "
8968 "size C<len> bytes. If the file exists already, it is overwritten."
8972 #: ../fish/guestfish-actions.pod:1142 ../src/guestfs-actions.pod:1928
8974 "Do not confuse this with the guestfish-specific C<alloc> command which "
8975 "allocates a file in the host and attaches it as a device."
8979 #: ../fish/guestfish-actions.pod:1146
8981 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
8986 #: ../fish/guestfish-actions.pod:1153
8991 #: ../fish/guestfish-actions.pod:1155
8994 " fallocate64 path len\n"
8999 #: ../fish/guestfish-actions.pod:1161
9001 "Note that this call allocates disk blocks for the file. To create a sparse "
9002 "file use L</truncate-size> instead."
9006 #: ../fish/guestfish-actions.pod:1164
9008 "The deprecated call L</fallocate> does the same, but owing to an oversight "
9009 "it only allowed 30 bit lengths to be specified, effectively limiting the "
9010 "maximum size of files created through that call to 1GB."
9014 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1955
9016 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
9017 "commands which create a file in the host and attach it as a device."
9021 #: ../fish/guestfish-actions.pod:1173
9026 #: ../fish/guestfish-actions.pod:1175
9029 " fgrep pattern path\n"
9034 #: ../fish/guestfish-actions.pod:1177 ../src/guestfs-actions.pod:1970
9036 "This calls the external C<fgrep> program and returns the matching lines."
9040 #: ../fish/guestfish-actions.pod:1183
9045 #: ../fish/guestfish-actions.pod:1185
9048 " fgrepi pattern path\n"
9053 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1989
9055 "This calls the external C<fgrep -i> program and returns the matching lines."
9059 #: ../fish/guestfish-actions.pod:1193
9064 #: ../fish/guestfish-actions.pod:1195
9072 #: ../fish/guestfish-actions.pod:1197 ../src/guestfs-actions.pod:2007
9074 "This call uses the standard L<file(1)> command to determine the type or "
9075 "contents of the file."
9079 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:2010
9081 "This call will also transparently look inside various types of compressed "
9086 #: ../fish/guestfish-actions.pod:1203 ../src/guestfs-actions.pod:2013
9088 "The exact command which runs is C<file -zb path>. Note in particular that "
9089 "the filename is not prepended to the output (the I<-b> option)."
9093 #: ../fish/guestfish-actions.pod:1207 ../src/guestfs-actions.pod:2017
9095 "The output depends on the output of the underlying L<file(1)> command and it "
9096 "can change in future in ways beyond our control. In other words, the output "
9097 "is not guaranteed by the ABI."
9101 #: ../fish/guestfish-actions.pod:1211
9103 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
9104 "(etc), L</is-zero>."
9108 #: ../fish/guestfish-actions.pod:1214
9109 msgid "file-architecture"
9113 #: ../fish/guestfish-actions.pod:1216
9116 " file-architecture filename\n"
9121 #: ../fish/guestfish-actions.pod:1218 ../src/guestfs-actions.pod:2035
9123 "This detects the architecture of the binary C<filename>, and returns it if "
9128 #: ../fish/guestfish-actions.pod:1221 ../src/guestfs-actions.pod:2038
9129 msgid "Currently defined architectures are:"
9133 #: ../fish/guestfish-actions.pod:1225 ../src/guestfs-actions.pod:2042
9138 #: ../fish/guestfish-actions.pod:1227 ../src/guestfs-actions.pod:2044
9140 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
9141 "irrespective of the precise processor requirements of the binary."
9145 #: ../fish/guestfish-actions.pod:1230 ../src/guestfs-actions.pod:2047
9150 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:2049
9151 msgid "64 bit x86-64."
9155 #: ../fish/guestfish-actions.pod:1234 ../src/guestfs-actions.pod:2051
9160 #: ../fish/guestfish-actions.pod:1236 ../src/guestfs-actions.pod:2053
9161 msgid "32 bit SPARC."
9165 #: ../fish/guestfish-actions.pod:1238 ../src/guestfs-actions.pod:2055
9170 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:2057
9171 msgid "64 bit SPARC V9 and above."
9175 #: ../fish/guestfish-actions.pod:1242 ../src/guestfs-actions.pod:2059
9180 #: ../fish/guestfish-actions.pod:1244 ../src/guestfs-actions.pod:2061
9181 msgid "Intel Itanium."
9185 #: ../fish/guestfish-actions.pod:1246 ../src/guestfs-actions.pod:2063
9190 #: ../fish/guestfish-actions.pod:1248 ../src/guestfs-actions.pod:2065
9191 msgid "32 bit Power PC."
9195 #: ../fish/guestfish-actions.pod:1250 ../src/guestfs-actions.pod:2067
9200 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:2069
9201 msgid "64 bit Power PC."
9205 #: ../fish/guestfish-actions.pod:1256 ../src/guestfs-actions.pod:2073
9206 msgid "Libguestfs may return other architecture strings in future."
9210 #: ../fish/guestfish-actions.pod:1258 ../src/guestfs-actions.pod:2075
9211 msgid "The function works on at least the following types of files:"
9215 #: ../fish/guestfish-actions.pod:1264 ../src/guestfs-actions.pod:2081
9216 msgid "many types of Un*x and Linux binary"
9220 #: ../fish/guestfish-actions.pod:1268 ../src/guestfs-actions.pod:2085
9221 msgid "many types of Un*x and Linux shared library"
9225 #: ../fish/guestfish-actions.pod:1272 ../src/guestfs-actions.pod:2089
9226 msgid "Windows Win32 and Win64 binaries"
9230 #: ../fish/guestfish-actions.pod:1276 ../src/guestfs-actions.pod:2093
9231 msgid "Windows Win32 and Win64 DLLs"
9235 #: ../fish/guestfish-actions.pod:1278 ../src/guestfs-actions.pod:2095
9236 msgid "Win32 binaries and DLLs return C<i386>."
9240 #: ../fish/guestfish-actions.pod:1280 ../src/guestfs-actions.pod:2097
9241 msgid "Win64 binaries and DLLs return C<x86_64>."
9245 #: ../fish/guestfish-actions.pod:1284 ../src/guestfs-actions.pod:2101
9246 msgid "Linux kernel modules"
9250 #: ../fish/guestfish-actions.pod:1288 ../src/guestfs-actions.pod:2105
9251 msgid "Linux new-style initrd images"
9255 #: ../fish/guestfish-actions.pod:1292 ../src/guestfs-actions.pod:2109
9256 msgid "some non-x86 Linux vmlinuz kernels"
9260 #: ../fish/guestfish-actions.pod:1296 ../src/guestfs-actions.pod:2113
9261 msgid "What it can't do currently:"
9265 #: ../fish/guestfish-actions.pod:1302 ../src/guestfs-actions.pod:2119
9266 msgid "static libraries (libfoo.a)"
9270 #: ../fish/guestfish-actions.pod:1306 ../src/guestfs-actions.pod:2123
9271 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9275 #: ../fish/guestfish-actions.pod:1310 ../src/guestfs-actions.pod:2127
9276 msgid "x86 Linux vmlinuz kernels"
9280 #: ../fish/guestfish-actions.pod:1312 ../src/guestfs-actions.pod:2129
9282 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9283 "compressed code, and are horribly hard to unpack. If you want to find the "
9284 "architecture of a kernel, use the architecture of the associated initrd or "
9285 "kernel module(s) instead."
9289 #: ../fish/guestfish-actions.pod:1319
9294 #: ../fish/guestfish-actions.pod:1321
9302 #: ../fish/guestfish-actions.pod:1323 ../src/guestfs-actions.pod:2147
9303 msgid "This command returns the size of C<file> in bytes."
9307 #: ../fish/guestfish-actions.pod:1325
9309 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
9310 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
9314 #: ../fish/guestfish-actions.pod:1329
9319 #: ../fish/guestfish-actions.pod:1331
9322 " fill c len path\n"
9327 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2165
9329 "This command creates a new file called C<path>. The initial content of the "
9330 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9335 #: ../fish/guestfish-actions.pod:1337
9337 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9338 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
9343 #: ../fish/guestfish-actions.pod:1342
9344 msgid "fill-pattern"
9348 #: ../fish/guestfish-actions.pod:1344
9351 " fill-pattern pattern len path\n"
9356 #: ../fish/guestfish-actions.pod:1346
9358 "This function is like L</fill> except that it creates a new file of length "
9359 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
9360 "is truncated if necessary to ensure the length of the file is exactly C<len> "
9365 #: ../fish/guestfish-actions.pod:1351
9370 #: ../fish/guestfish-actions.pod:1353
9378 #: ../fish/guestfish-actions.pod:1355 ../src/guestfs-actions.pod:2211
9380 "This command lists out all files and directories, recursively, starting at "
9381 "C<directory>. It is essentially equivalent to running the shell command "
9382 "C<find directory -print> but some post-processing happens on the output, "
9387 #: ../fish/guestfish-actions.pod:1360 ../src/guestfs-actions.pod:2216
9389 "This returns a list of strings I<without any prefix>. Thus if the directory "
9394 #: ../fish/guestfish-actions.pod:1363 ../src/guestfs-actions.pod:2219
9404 #: ../fish/guestfish-actions.pod:1367
9405 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
9409 #: ../fish/guestfish-actions.pod:1370 ../src/guestfs-actions.pod:2226
9420 #: ../fish/guestfish-actions.pod:1375 ../src/guestfs-actions.pod:2231
9421 msgid "If C<directory> is not a directory, then this command returns an error."
9425 #: ../fish/guestfish-actions.pod:1378 ../src/guestfs-actions.pod:2234
9426 msgid "The returned list is sorted."
9430 #: ../fish/guestfish-actions.pod:1380
9431 msgid "See also L</find0>."
9435 #: ../fish/guestfish-actions.pod:1385
9440 #: ../fish/guestfish-actions.pod:1387
9443 " find0 directory (files|-)\n"
9448 #: ../fish/guestfish-actions.pod:1389 ../src/guestfs-actions.pod:2254
9450 "This command lists out all files and directories, recursively, starting at "
9451 "C<directory>, placing the resulting list in the external file called "
9456 #: ../fish/guestfish-actions.pod:1393
9458 "This command works the same way as L</find> with the following exceptions:"
9462 #: ../fish/guestfish-actions.pod:1400 ../src/guestfs-actions.pod:2265
9463 msgid "The resulting list is written to an external file."
9467 #: ../fish/guestfish-actions.pod:1404 ../src/guestfs-actions.pod:2269
9469 "Items (filenames) in the result are separated by C<\\0> characters. See "
9470 "L<find(1)> option I<-print0>."
9474 #: ../fish/guestfish-actions.pod:1409 ../src/guestfs-actions.pod:2274
9475 msgid "This command is not limited in the number of names that it can return."
9479 #: ../fish/guestfish-actions.pod:1414 ../src/guestfs-actions.pod:2279
9480 msgid "The result list is not sorted."
9484 #: ../fish/guestfish-actions.pod:1420
9485 msgid "findfs-label"
9489 #: ../fish/guestfish-actions.pod:1422
9492 " findfs-label label\n"
9497 #: ../fish/guestfish-actions.pod:1424 ../src/guestfs-actions.pod:2293
9499 "This command searches the filesystems and returns the one which has the "
9500 "given label. An error is returned if no such filesystem can be found."
9504 #: ../fish/guestfish-actions.pod:1428
9505 msgid "To find the label of a filesystem, use L</vfs-label>."
9509 #: ../fish/guestfish-actions.pod:1430
9514 #: ../fish/guestfish-actions.pod:1432
9517 " findfs-uuid uuid\n"
9522 #: ../fish/guestfish-actions.pod:1434 ../src/guestfs-actions.pod:2310
9524 "This command searches the filesystems and returns the one which has the "
9525 "given UUID. An error is returned if no such filesystem can be found."
9529 #: ../fish/guestfish-actions.pod:1438
9530 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
9534 #: ../fish/guestfish-actions.pod:1440
9539 #: ../fish/guestfish-actions.pod:1442
9542 " fsck fstype device\n"
9547 #: ../fish/guestfish-actions.pod:1444 ../src/guestfs-actions.pod:2328
9549 "This runs the filesystem checker (fsck) on C<device> which should have "
9550 "filesystem type C<fstype>."
9554 #: ../fish/guestfish-actions.pod:1447 ../src/guestfs-actions.pod:2331
9556 "The returned integer is the status. See L<fsck(8)> for the list of status "
9557 "codes from C<fsck>."
9561 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2340
9562 msgid "Multiple status codes can be summed together."
9566 #: ../fish/guestfish-actions.pod:1460 ../src/guestfs-actions.pod:2344
9568 "A non-zero return code can mean \"success\", for example if errors have been "
9569 "corrected on the filesystem."
9573 #: ../fish/guestfish-actions.pod:1465 ../src/guestfs-actions.pod:2349
9574 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9578 #: ../fish/guestfish-actions.pod:1470 ../src/guestfs-actions.pod:2354
9580 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9584 #: ../fish/guestfish-actions.pod:1472
9589 #: ../fish/guestfish-actions.pod:1474
9597 #: ../fish/guestfish-actions.pod:1476 ../src/guestfs-actions.pod:2365
9599 "Return the additional kernel options which are added to the guest kernel "
9604 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2368
9605 msgid "If C<NULL> then no options are added."
9609 #: ../fish/guestfish-actions.pod:1481
9610 msgid "get-attach-method"
9614 #: ../fish/guestfish-actions.pod:1483
9617 " get-attach-method\n"
9622 #: ../fish/guestfish-actions.pod:1485
9623 msgid "Return the current attach method. See L</set-attach-method>."
9627 #: ../fish/guestfish-actions.pod:1487
9628 msgid "get-autosync"
9632 #: ../fish/guestfish-actions.pod:1489
9640 #: ../fish/guestfish-actions.pod:1491 ../src/guestfs-actions.pod:2393
9641 msgid "Get the autosync flag."
9645 #: ../fish/guestfish-actions.pod:1493
9650 #: ../fish/guestfish-actions.pod:1495
9658 #: ../fish/guestfish-actions.pod:1497 ../src/guestfs-actions.pod:2404
9659 msgid "Return the direct appliance mode flag."
9663 #: ../fish/guestfish-actions.pod:1499
9668 #: ../fish/guestfish-actions.pod:1501
9671 " get-e2label device\n"
9676 #: ../fish/guestfish-actions.pod:1503 ../src/guestfs-actions.pod:2423
9678 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9682 #: ../fish/guestfish-actions.pod:1506
9684 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
9689 #: ../fish/guestfish-actions.pod:1513
9694 #: ../fish/guestfish-actions.pod:1515
9697 " get-e2uuid device\n"
9702 #: ../fish/guestfish-actions.pod:1517 ../src/guestfs-actions.pod:2444
9704 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9708 #: ../fish/guestfish-actions.pod:1520
9710 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
9715 #: ../fish/guestfish-actions.pod:1527
9720 #: ../fish/guestfish-actions.pod:1529
9728 #: ../fish/guestfish-actions.pod:1531 ../src/guestfs-actions.pod:2457
9730 "This gets the memory size in megabytes allocated to the qemu subprocess."
9734 #: ../fish/guestfish-actions.pod:1534
9736 "If L</set-memsize> was not called on this handle, and if "
9737 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9738 "value for memsize."
9742 #: ../fish/guestfish-actions.pod:1538 ../fish/guestfish-actions.pod:1595
9743 #: ../fish/guestfish-actions.pod:4468 ../fish/guestfish-actions.pod:4570
9744 #: ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2556
9745 #: ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:7047
9747 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9751 #: ../fish/guestfish-actions.pod:1541
9756 #: ../fish/guestfish-actions.pod:1543
9764 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2476
9765 msgid "This returns the enable network flag."
9769 #: ../fish/guestfish-actions.pod:1547
9774 #: ../fish/guestfish-actions.pod:1549
9782 #: ../fish/guestfish-actions.pod:1551 ../src/guestfs-actions.pod:2487
9783 msgid "Return the current search path."
9787 #: ../fish/guestfish-actions.pod:1553 ../src/guestfs-actions.pod:2489
9789 "This is always non-NULL. If it wasn't set already, then this will return "
9794 #: ../fish/guestfish-actions.pod:1556
9799 #: ../fish/guestfish-actions.pod:1558
9807 #: ../fish/guestfish-actions.pod:1560 ../src/guestfs-actions.pod:2502
9808 msgid "This returns the process group flag."
9812 #: ../fish/guestfish-actions.pod:1562
9817 #: ../fish/guestfish-actions.pod:1564
9822 #: ../fish/guestfish-actions.pod:1566
9830 #: ../fish/guestfish-actions.pod:1568 ../src/guestfs-actions.pod:2513
9832 "Return the process ID of the qemu subprocess. If there is no qemu "
9833 "subprocess, then this will return an error."
9837 #: ../fish/guestfish-actions.pod:1571 ../src/guestfs-actions.pod:2516
9838 msgid "This is an internal call used for debugging and testing."
9842 #: ../fish/guestfish-actions.pod:1573
9847 #: ../fish/guestfish-actions.pod:1575
9855 #: ../fish/guestfish-actions.pod:1577 ../src/guestfs-actions.pod:2527
9856 msgid "Return the current qemu binary."
9860 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2529
9862 "This is always non-NULL. If it wasn't set already, then this will return "
9863 "the default qemu binary name."
9867 #: ../fish/guestfish-actions.pod:1582
9868 msgid "get-recovery-proc"
9872 #: ../fish/guestfish-actions.pod:1584
9875 " get-recovery-proc\n"
9880 #: ../fish/guestfish-actions.pod:1586 ../src/guestfs-actions.pod:2542
9881 msgid "Return the recovery process enabled flag."
9885 #: ../fish/guestfish-actions.pod:1588
9890 #: ../fish/guestfish-actions.pod:1590
9898 #: ../fish/guestfish-actions.pod:1592
9900 "This returns the current setting of the selinux flag which is passed to the "
9901 "appliance at boot time. See L</set-selinux>."
9905 #: ../fish/guestfish-actions.pod:1598
9910 #: ../fish/guestfish-actions.pod:1600
9918 #: ../fish/guestfish-actions.pod:1602 ../src/guestfs-actions.pod:2568
9919 msgid "This returns the number of virtual CPUs assigned to the appliance."
9923 #: ../fish/guestfish-actions.pod:1604
9928 #: ../fish/guestfish-actions.pod:1606
9936 #: ../fish/guestfish-actions.pod:1608 ../src/guestfs-actions.pod:2579
9938 "This returns the current state as an opaque integer. This is only useful "
9939 "for printing debug and internal error messages."
9943 #: ../fish/guestfish-actions.pod:1611 ../fish/guestfish-actions.pod:2574
9944 #: ../fish/guestfish-actions.pod:2592 ../fish/guestfish-actions.pod:2630
9945 #: ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:2582
9946 #: ../src/guestfs-actions.pod:3905 ../src/guestfs-actions.pod:3934
9947 #: ../src/guestfs-actions.pod:3995 ../src/guestfs-actions.pod:4022
9948 msgid "For more information on states, see L<guestfs(3)>."
9952 #: ../fish/guestfish-actions.pod:1613
9957 #: ../fish/guestfish-actions.pod:1615
9965 #: ../fish/guestfish-actions.pod:1617 ../src/guestfs-actions.pod:2593
9966 msgid "Return the command trace flag."
9970 #: ../fish/guestfish-actions.pod:1619
9975 #: ../fish/guestfish-actions.pod:1621
9983 #: ../fish/guestfish-actions.pod:1623
9985 "Return the current umask. By default the umask is C<022> unless it has been "
9986 "set by calling L</umask>."
9990 #: ../fish/guestfish-actions.pod:1626
9995 #: ../fish/guestfish-actions.pod:1628
10003 #: ../fish/guestfish-actions.pod:1630 ../src/guestfs-actions.pod:2616
10004 msgid "This returns the verbose messages flag."
10008 #: ../fish/guestfish-actions.pod:1632
10013 #: ../fish/guestfish-actions.pod:1634
10021 #: ../fish/guestfish-actions.pod:1636 ../src/guestfs-actions.pod:2627
10022 msgid "This gets the SELinux security context of the daemon."
10026 #: ../fish/guestfish-actions.pod:1638
10027 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
10031 #: ../fish/guestfish-actions.pod:1641
10036 #: ../fish/guestfish-actions.pod:1643
10039 " getxattr path name\n"
10044 #: ../fish/guestfish-actions.pod:1645
10046 "Get a single extended attribute from file C<path> named C<name>. This call "
10047 "follows symlinks. If you want to lookup an extended attribute for the "
10048 "symlink itself, use L</lgetxattr>."
10052 #: ../fish/guestfish-actions.pod:1649 ../fish/guestfish-actions.pod:2719
10054 "Normally it is better to get all extended attributes from a file in one go "
10055 "by calling L</getxattrs>. However some Linux filesystem implementations are "
10056 "buggy and do not provide a way to list out attributes. For these "
10057 "filesystems (notably ntfs-3g) you have to know the names of the extended "
10058 "attributes you want in advance and call this function."
10062 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:2726
10063 #: ../src/guestfs-actions.pod:2656 ../src/guestfs-actions.pod:4155
10065 "Extended attribute values are blobs of binary data. If there is no extended "
10066 "attribute named C<name>, this returns an error."
10070 #: ../fish/guestfish-actions.pod:1659
10071 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
10075 #: ../fish/guestfish-actions.pod:1661
10080 #: ../fish/guestfish-actions.pod:1663
10083 " getxattrs path\n"
10088 #: ../fish/guestfish-actions.pod:1665 ../src/guestfs-actions.pod:2673
10090 "This call lists the extended attributes of the file or directory C<path>."
10094 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2676
10096 "At the system call level, this is a combination of the L<listxattr(2)> and "
10097 "L<getxattr(2)> calls."
10101 #: ../fish/guestfish-actions.pod:1671
10102 msgid "See also: L</lgetxattrs>, L<attr(5)>."
10106 #: ../fish/guestfish-actions.pod:1673
10107 msgid "glob-expand"
10111 #: ../fish/guestfish-actions.pod:1675
10114 " glob-expand pattern\n"
10119 #: ../fish/guestfish-actions.pod:1677 ../src/guestfs-actions.pod:2693
10121 "This command searches for all the pathnames matching C<pattern> according to "
10122 "the wildcard expansion rules used by the shell."
10126 #: ../fish/guestfish-actions.pod:1681 ../src/guestfs-actions.pod:2697
10128 "If no paths match, then this returns an empty list (note: not an error)."
10132 #: ../fish/guestfish-actions.pod:1684 ../src/guestfs-actions.pod:2700
10134 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
10135 "GLOB_BRACE>. See that manual page for more details."
10139 #: ../fish/guestfish-actions.pod:1688
10144 #: ../fish/guestfish-actions.pod:1690
10147 " grep regex path\n"
10152 #: ../fish/guestfish-actions.pod:1692 ../src/guestfs-actions.pod:2717
10153 msgid "This calls the external C<grep> program and returns the matching lines."
10157 #: ../fish/guestfish-actions.pod:1698
10162 #: ../fish/guestfish-actions.pod:1700
10165 " grepi regex path\n"
10170 #: ../fish/guestfish-actions.pod:1702 ../src/guestfs-actions.pod:2736
10172 "This calls the external C<grep -i> program and returns the matching lines."
10176 #: ../fish/guestfish-actions.pod:1708
10177 msgid "grub-install"
10181 #: ../fish/guestfish-actions.pod:1710
10184 " grub-install root device\n"
10189 #: ../fish/guestfish-actions.pod:1712 ../src/guestfs-actions.pod:2755
10191 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
10192 "with the root directory being C<root>."
10196 #: ../fish/guestfish-actions.pod:1721 ../src/guestfs-actions.pod:2764
10198 "There is currently no way in the API to install grub2, which is used by most "
10199 "modern Linux guests. It is possible to run the grub2 command from the "
10200 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
10204 #: ../fish/guestfish-actions.pod:1728 ../src/guestfs-actions.pod:2771
10206 "This uses C<grub-install> from the host. Unfortunately grub is not always "
10207 "compatible with itself, so this only works in rather narrow circumstances. "
10208 "Careful testing with each guest version is advisable."
10212 #: ../fish/guestfish-actions.pod:1735 ../src/guestfs-actions.pod:2778
10214 "If grub-install reports the error \"No suitable drive was found in the "
10215 "generated device map.\" it may be that you need to create a C</boot/grub/"
10216 "device.map> file first that contains the mapping between grub device names "
10217 "and Linux device names. It is usually sufficient to create a file "
10222 #: ../fish/guestfish-actions.pod:1742 ../src/guestfs-actions.pod:2785
10225 " (hd0) /dev/vda\n"
10230 #: ../fish/guestfish-actions.pod:1744 ../src/guestfs-actions.pod:2787
10231 msgid "replacing C</dev/vda> with the name of the installation device."
10235 #: ../fish/guestfish-actions.pod:1748
10240 #: ../fish/guestfish-actions.pod:1750
10248 #: ../fish/guestfish-actions.pod:1752 ../src/guestfs-actions.pod:2801
10250 "This command returns up to the first 10 lines of a file as a list of strings."
10254 #: ../fish/guestfish-actions.pod:1758
10259 #: ../fish/guestfish-actions.pod:1760
10262 " head-n nrlines path\n"
10267 #: ../fish/guestfish-actions.pod:1762 ../src/guestfs-actions.pod:2820
10269 "If the parameter C<nrlines> is a positive number, this returns the first "
10270 "C<nrlines> lines of the file C<path>."
10274 #: ../fish/guestfish-actions.pod:1765 ../src/guestfs-actions.pod:2823
10276 "If the parameter C<nrlines> is a negative number, this returns lines from "
10277 "the file C<path>, excluding the last C<nrlines> lines."
10281 #: ../fish/guestfish-actions.pod:1768 ../fish/guestfish-actions.pod:4951
10282 #: ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:7626
10283 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
10287 #: ../fish/guestfish-actions.pod:1773
10292 #: ../fish/guestfish-actions.pod:1775
10300 #: ../fish/guestfish-actions.pod:1777 ../src/guestfs-actions.pod:2843
10302 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
10303 "readable, canonical hex dump of the file."
10307 #: ../fish/guestfish-actions.pod:1783
10312 #: ../fish/guestfish-actions.pod:1785
10315 " initrd-cat initrdpath filename\n"
10320 #: ../fish/guestfish-actions.pod:1787 ../src/guestfs-actions.pod:2862
10322 "This command unpacks the file C<filename> from the initrd file called "
10323 "C<initrdpath>. The filename must be given I<without> the initial C</> "
10328 #: ../fish/guestfish-actions.pod:1791 ../src/guestfs-actions.pod:2866
10330 "For example, in guestfish you could use the following command to examine the "
10331 "boot script (usually called C</init>) contained in a Linux initrd or "
10336 #: ../fish/guestfish-actions.pod:1795 ../src/guestfs-actions.pod:2870
10339 " initrd-cat /boot/initrd-<version>.img init\n"
10344 #: ../fish/guestfish-actions.pod:1797
10345 msgid "See also L</initrd-list>."
10349 #: ../fish/guestfish-actions.pod:1802
10350 msgid "initrd-list"
10354 #: ../fish/guestfish-actions.pod:1804
10357 " initrd-list path\n"
10362 #: ../fish/guestfish-actions.pod:1806 ../src/guestfs-actions.pod:2889
10363 msgid "This command lists out files contained in an initrd."
10367 #: ../fish/guestfish-actions.pod:1808 ../src/guestfs-actions.pod:2891
10369 "The files are listed without any initial C</> character. The files are "
10370 "listed in the order they appear (not necessarily alphabetical). Directory "
10371 "names are listed as separate items."
10375 #: ../fish/guestfish-actions.pod:1812 ../src/guestfs-actions.pod:2895
10377 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
10378 "initrd. We I<only> support the newer initramfs format (compressed cpio "
10383 #: ../fish/guestfish-actions.pod:1816
10384 msgid "inotify-add-watch"
10388 #: ../fish/guestfish-actions.pod:1818
10391 " inotify-add-watch path mask\n"
10396 #: ../fish/guestfish-actions.pod:1820 ../src/guestfs-actions.pod:2912
10397 msgid "Watch C<path> for the events listed in C<mask>."
10401 #: ../fish/guestfish-actions.pod:1822 ../src/guestfs-actions.pod:2914
10403 "Note that if C<path> is a directory then events within that directory are "
10404 "watched, but this does I<not> happen recursively (in subdirectories)."
10408 #: ../fish/guestfish-actions.pod:1826 ../src/guestfs-actions.pod:2918
10410 "Note for non-C or non-Linux callers: the inotify events are defined by the "
10411 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
10415 #: ../fish/guestfish-actions.pod:1830
10416 msgid "inotify-close"
10420 #: ../fish/guestfish-actions.pod:1832
10428 #: ../fish/guestfish-actions.pod:1834 ../src/guestfs-actions.pod:2931
10430 "This closes the inotify handle which was previously opened by inotify_init. "
10431 "It removes all watches, throws away any pending events, and deallocates all "
10436 #: ../fish/guestfish-actions.pod:1838
10437 msgid "inotify-files"
10441 #: ../fish/guestfish-actions.pod:1840
10449 #: ../fish/guestfish-actions.pod:1842
10451 "This function is a helpful wrapper around L</inotify-read> which just "
10452 "returns a list of pathnames of objects that were touched. The returned "
10453 "pathnames are sorted and deduplicated."
10457 #: ../fish/guestfish-actions.pod:1846
10458 msgid "inotify-init"
10462 #: ../fish/guestfish-actions.pod:1848
10465 " inotify-init maxevents\n"
10470 #: ../fish/guestfish-actions.pod:1850 ../src/guestfs-actions.pod:2960
10472 "This command creates a new inotify handle. The inotify subsystem can be "
10473 "used to notify events which happen to objects in the guest filesystem."
10477 #: ../fish/guestfish-actions.pod:1854
10479 "C<maxevents> is the maximum number of events which will be queued up between "
10480 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
10481 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
10482 "default was 16384 events. Beyond this limit, the kernel throws away events, "
10483 "but records the fact that it threw them away by setting a flag "
10484 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
10488 #: ../fish/guestfish-actions.pod:1864
10490 "Before any events are generated, you have to add some watches to the "
10491 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
10492 "L</inotify-watch-all>."
10496 #: ../fish/guestfish-actions.pod:1870
10498 "Queued up events should be read periodically by calling L</inotify-read> (or "
10499 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
10500 "If you don't read the events out often enough then you risk the internal "
10501 "queue overflowing."
10505 #: ../fish/guestfish-actions.pod:1877
10507 "The handle should be closed after use by calling L</inotify-close>. This "
10508 "also removes any watches automatically."
10512 #: ../fish/guestfish-actions.pod:1881 ../src/guestfs-actions.pod:2991
10514 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
10515 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
10516 "that there is one global inotify handle per libguestfs instance."
10520 #: ../fish/guestfish-actions.pod:1886
10521 msgid "inotify-read"
10525 #: ../fish/guestfish-actions.pod:1888
10533 #: ../fish/guestfish-actions.pod:1890 ../src/guestfs-actions.pod:3005
10535 "Return the complete queue of events that have happened since the previous "
10540 #: ../fish/guestfish-actions.pod:1893 ../src/guestfs-actions.pod:3008
10541 msgid "If no events have happened, this returns an empty list."
10545 #: ../fish/guestfish-actions.pod:1895 ../src/guestfs-actions.pod:3010
10547 "I<Note>: In order to make sure that all events have been read, you must call "
10548 "this function repeatedly until it returns an empty list. The reason is that "
10549 "the call will read events up to the maximum appliance-to-host message size "
10550 "and leave remaining events in the queue."
10554 #: ../fish/guestfish-actions.pod:1901
10555 msgid "inotify-rm-watch"
10559 #: ../fish/guestfish-actions.pod:1903
10562 " inotify-rm-watch wd\n"
10567 #: ../fish/guestfish-actions.pod:1905
10568 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
10572 #: ../fish/guestfish-actions.pod:1908
10573 msgid "inspect-get-arch"
10577 #: ../fish/guestfish-actions.pod:1910
10580 " inspect-get-arch root\n"
10585 #: ../fish/guestfish-actions.pod:1912
10587 "This returns the architecture of the inspected operating system. The "
10588 "possible return values are listed under L</file-architecture>."
10592 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:3045
10594 "If the architecture could not be determined, then the string C<unknown> is "
10599 #: ../fish/guestfish-actions.pod:1919 ../fish/guestfish-actions.pod:2014
10600 #: ../fish/guestfish-actions.pod:2093 ../fish/guestfish-actions.pod:2105
10601 #: ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2251
10602 #: ../fish/guestfish-actions.pod:2272 ../fish/guestfish-actions.pod:2286
10603 #: ../fish/guestfish-actions.pod:2326 ../fish/guestfish-actions.pod:2366
10604 #: ../fish/guestfish-actions.pod:2379 ../fish/guestfish-actions.pod:2392
10605 #: ../fish/guestfish-actions.pod:2402 ../fish/guestfish-actions.pod:2412
10606 #: ../fish/guestfish-actions.pod:2424 ../fish/guestfish-actions.pod:2520
10607 #: ../fish/guestfish-actions.pod:2554 ../src/guestfs-actions.pod:3048
10608 #: ../src/guestfs-actions.pod:3150 ../src/guestfs-actions.pod:3254
10609 #: ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3404
10610 #: ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3516
10611 #: ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3590
10612 #: ../src/guestfs-actions.pod:3638 ../src/guestfs-actions.pod:3658
10613 #: ../src/guestfs-actions.pod:3678 ../src/guestfs-actions.pod:3695
10614 #: ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3729
10615 #: ../src/guestfs-actions.pod:3831 ../src/guestfs-actions.pod:3872
10616 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10620 #: ../fish/guestfish-actions.pod:1921
10621 msgid "inspect-get-distro"
10625 #: ../fish/guestfish-actions.pod:1923
10628 " inspect-get-distro root\n"
10633 #: ../fish/guestfish-actions.pod:1925 ../src/guestfs-actions.pod:3061
10635 "This returns the distro (distribution) of the inspected operating system."
10639 #: ../fish/guestfish-actions.pod:1928 ../src/guestfs-actions.pod:3064
10640 msgid "Currently defined distros are:"
10644 #: ../fish/guestfish-actions.pod:1932 ../src/guestfs-actions.pod:3068
10645 msgid "\"archlinux\""
10649 #: ../fish/guestfish-actions.pod:1934 ../src/guestfs-actions.pod:3070
10650 msgid "Arch Linux."
10654 #: ../fish/guestfish-actions.pod:1936 ../src/guestfs-actions.pod:3072
10659 #: ../fish/guestfish-actions.pod:1938 ../src/guestfs-actions.pod:3074
10664 #: ../fish/guestfish-actions.pod:1940 ../src/guestfs-actions.pod:3076
10669 #: ../fish/guestfish-actions.pod:1942 ../src/guestfs-actions.pod:3078
10674 #: ../fish/guestfish-actions.pod:1944 ../src/guestfs-actions.pod:3080
10679 #: ../fish/guestfish-actions.pod:1946 ../src/guestfs-actions.pod:3082
10684 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:3084
10689 #: ../fish/guestfish-actions.pod:1950 ../src/guestfs-actions.pod:3086
10694 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:3088
10695 msgid "\"linuxmint\""
10699 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:3090
10700 msgid "Linux Mint."
10704 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:3092
10709 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:3094
10714 #: ../fish/guestfish-actions.pod:1960 ../src/guestfs-actions.pod:3096
10715 msgid "\"mandriva\""
10719 #: ../fish/guestfish-actions.pod:1962 ../src/guestfs-actions.pod:3098
10724 #: ../fish/guestfish-actions.pod:1964 ../src/guestfs-actions.pod:3100
10729 #: ../fish/guestfish-actions.pod:1966 ../src/guestfs-actions.pod:3102
10734 #: ../fish/guestfish-actions.pod:1968 ../src/guestfs-actions.pod:3104
10735 msgid "\"opensuse\""
10739 #: ../fish/guestfish-actions.pod:1970 ../src/guestfs-actions.pod:3106
10744 #: ../fish/guestfish-actions.pod:1972 ../src/guestfs-actions.pod:3108
10749 #: ../fish/guestfish-actions.pod:1974 ../src/guestfs-actions.pod:3110
10754 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:3112
10755 msgid "\"redhat-based\""
10759 #: ../fish/guestfish-actions.pod:1978 ../src/guestfs-actions.pod:3114
10760 msgid "Some Red Hat-derived distro."
10764 #: ../fish/guestfish-actions.pod:1980 ../src/guestfs-actions.pod:3116
10769 #: ../fish/guestfish-actions.pod:1982 ../src/guestfs-actions.pod:3118
10770 msgid "Red Hat Enterprise Linux."
10774 #: ../fish/guestfish-actions.pod:1984 ../src/guestfs-actions.pod:3120
10775 msgid "\"scientificlinux\""
10779 #: ../fish/guestfish-actions.pod:1986 ../src/guestfs-actions.pod:3122
10780 msgid "Scientific Linux."
10784 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:3124
10785 msgid "\"slackware\""
10789 #: ../fish/guestfish-actions.pod:1990 ../src/guestfs-actions.pod:3126
10794 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:3128
10795 msgid "\"ttylinux\""
10799 #: ../fish/guestfish-actions.pod:1994 ../src/guestfs-actions.pod:3130
10804 #: ../fish/guestfish-actions.pod:1996 ../src/guestfs-actions.pod:3132
10809 #: ../fish/guestfish-actions.pod:1998 ../src/guestfs-actions.pod:3134
10814 #: ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2084
10815 #: ../fish/guestfish-actions.pod:2357 ../src/guestfs-actions.pod:3136
10816 #: ../src/guestfs-actions.pod:3245 ../src/guestfs-actions.pod:3629
10817 msgid "\"unknown\""
10821 #: ../fish/guestfish-actions.pod:2002 ../src/guestfs-actions.pod:3138
10822 msgid "The distro could not be determined."
10826 #: ../fish/guestfish-actions.pod:2004 ../fish/guestfish-actions.pod:2341
10827 #: ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3613
10828 msgid "\"windows\""
10832 #: ../fish/guestfish-actions.pod:2006 ../src/guestfs-actions.pod:3142
10834 "Windows does not have distributions. This string is returned if the OS type "
10839 #: ../fish/guestfish-actions.pod:2011 ../fish/guestfish-actions.pod:2090
10840 #: ../fish/guestfish-actions.pod:2363 ../src/guestfs-actions.pod:3147
10841 #: ../src/guestfs-actions.pod:3251 ../src/guestfs-actions.pod:3635
10843 "Future versions of libguestfs may return other strings here. The caller "
10844 "should be prepared to handle any string."
10848 #: ../fish/guestfish-actions.pod:2016
10849 msgid "inspect-get-drive-mappings"
10853 #: ../fish/guestfish-actions.pod:2018
10856 " inspect-get-drive-mappings root\n"
10861 #: ../fish/guestfish-actions.pod:2020 ../src/guestfs-actions.pod:3163
10863 "This call is useful for Windows which uses a primitive system of assigning "
10864 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10865 "Windows Registry to find out how disks/partitions are mapped to drive "
10866 "letters, and returns a hash table as in the example below:"
10870 #: ../fish/guestfish-actions.pod:2026 ../src/guestfs-actions.pod:3169
10873 " C => /dev/vda2\n"
10874 " E => /dev/vdb1\n"
10875 " F => /dev/vdc1\n"
10880 #: ../fish/guestfish-actions.pod:2030 ../src/guestfs-actions.pod:3173
10882 "Note that keys are drive letters. For Windows, the key is case insensitive "
10883 "and just contains the drive letter, without the customary colon separator "
10888 #: ../fish/guestfish-actions.pod:2034 ../src/guestfs-actions.pod:3177
10890 "In future we may support other operating systems that also used drive "
10891 "letters, but the keys for those might not be case insensitive and might be "
10892 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10897 #: ../fish/guestfish-actions.pod:2039 ../src/guestfs-actions.pod:3182
10899 "For Windows guests, currently only hard drive mappings are returned. "
10900 "Removable disks (eg. DVD-ROMs) are ignored."
10904 #: ../fish/guestfish-actions.pod:2042 ../src/guestfs-actions.pod:3185
10906 "For guests that do not use drive mappings, or if the drive mappings could "
10907 "not be determined, this returns an empty hash table."
10911 #: ../fish/guestfish-actions.pod:2045
10913 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10914 "get-mountpoints>, L</inspect-get-filesystems>."
10918 #: ../fish/guestfish-actions.pod:2049
10919 msgid "inspect-get-filesystems"
10923 #: ../fish/guestfish-actions.pod:2051
10926 " inspect-get-filesystems root\n"
10931 #: ../fish/guestfish-actions.pod:2053 ../src/guestfs-actions.pod:3206
10933 "This returns a list of all the filesystems that we think are associated with "
10934 "this operating system. This includes the root filesystem, other ordinary "
10935 "filesystems, and non-mounted devices like swap partitions."
10939 #: ../fish/guestfish-actions.pod:2058 ../src/guestfs-actions.pod:3211
10941 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10942 "to be shared between operating systems."
10946 #: ../fish/guestfish-actions.pod:2061
10948 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10949 "get-mountpoints>."
10953 #: ../fish/guestfish-actions.pod:2064
10954 msgid "inspect-get-format"
10958 #: ../fish/guestfish-actions.pod:2066
10961 " inspect-get-format root\n"
10966 #: ../fish/guestfish-actions.pod:2068 ../src/guestfs-actions.pod:3229
10968 "This returns the format of the inspected operating system. You can use it "
10969 "to detect install images, live CDs and similar."
10973 #: ../fish/guestfish-actions.pod:2071 ../src/guestfs-actions.pod:3232
10974 msgid "Currently defined formats are:"
10978 #: ../fish/guestfish-actions.pod:2075 ../src/guestfs-actions.pod:3236
10979 msgid "\"installed\""
10983 #: ../fish/guestfish-actions.pod:2077 ../src/guestfs-actions.pod:3238
10984 msgid "This is an installed operating system."
10988 #: ../fish/guestfish-actions.pod:2079 ../src/guestfs-actions.pod:3240
10989 msgid "\"installer\""
10993 #: ../fish/guestfish-actions.pod:2081 ../src/guestfs-actions.pod:3242
10995 "The disk image being inspected is not an installed operating system, but a "
10996 "I<bootable> install disk, live CD, or similar."
11000 #: ../fish/guestfish-actions.pod:2086 ../src/guestfs-actions.pod:3247
11001 msgid "The format of this disk image is not known."
11005 #: ../fish/guestfish-actions.pod:2095
11006 msgid "inspect-get-hostname"
11010 #: ../fish/guestfish-actions.pod:2097
11013 " inspect-get-hostname root\n"
11018 #: ../fish/guestfish-actions.pod:2099 ../src/guestfs-actions.pod:3267
11020 "This function returns the hostname of the operating system as found by "
11021 "inspection of the guest's configuration files."
11025 #: ../fish/guestfish-actions.pod:2102 ../src/guestfs-actions.pod:3270
11027 "If the hostname could not be determined, then the string C<unknown> is "
11032 #: ../fish/guestfish-actions.pod:2107
11033 msgid "inspect-get-icon"
11037 #: ../fish/guestfish-actions.pod:2109
11040 " inspect-get-icon root [favicon:true|false] [highquality:true|false]\n"
11045 #: ../fish/guestfish-actions.pod:2111 ../src/guestfs-actions.pod:3296
11047 "This function returns an icon corresponding to the inspected operating "
11048 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
11049 "to PNG if necessary)."
11053 #: ../fish/guestfish-actions.pod:2115 ../src/guestfs-actions.pod:3300
11055 "If it was not possible to get an icon this function returns a zero-length "
11056 "(non-NULL) buffer. I<Callers must check for this case>."
11060 #: ../fish/guestfish-actions.pod:2118 ../src/guestfs-actions.pod:3303
11062 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
11063 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
11064 "this file will be returned. You can disable favicons by passing the "
11065 "optional C<favicon> boolean as false (default is true)."
11069 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3309
11071 "If finding the favicon fails, then we look in other places in the guest for "
11076 #: ../fish/guestfish-actions.pod:2127 ../src/guestfs-actions.pod:3312
11078 "If the optional C<highquality> boolean is true then only high quality icons "
11079 "are returned, which means only icons of high resolution with an alpha "
11080 "channel. The default (false) is to return any icon we can, even if it is of "
11081 "substandard quality."
11085 #: ../fish/guestfish-actions.pod:2138 ../src/guestfs-actions.pod:3323
11087 "Unlike most other inspection API calls, the guest's disks must be mounted up "
11088 "before you call this, since it needs to read information from the guest "
11089 "filesystem during the call."
11093 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3329
11095 "B<Security:> The icon data comes from the untrusted guest, and should be "
11096 "treated with caution. PNG files have been known to contain exploits. "
11097 "Ensure that libpng (or other relevant libraries) are fully up to date before "
11098 "trying to process or display the icon."
11102 #: ../fish/guestfish-actions.pod:2152 ../src/guestfs-actions.pod:3337
11104 "The PNG image returned can be any size. It might not be square. Libguestfs "
11105 "tries to return the largest, highest quality icon available. The "
11106 "application must scale the icon to the required size."
11110 #: ../fish/guestfish-actions.pod:2159 ../src/guestfs-actions.pod:3344
11112 "Extracting icons from Windows guests requires the external C<wrestool> "
11113 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
11114 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
11115 "installed separately."
11119 #: ../fish/guestfish-actions.pod:2166 ../src/guestfs-actions.pod:3351
11121 "Operating system icons are usually trademarks. Seek legal advice before "
11122 "using trademarks in applications."
11126 #: ../fish/guestfish-actions.pod:2173
11127 msgid "inspect-get-major-version"
11131 #: ../fish/guestfish-actions.pod:2175
11134 " inspect-get-major-version root\n"
11139 #: ../fish/guestfish-actions.pod:2177 ../src/guestfs-actions.pod:3392
11141 "This returns the major version number of the inspected operating system."
11145 #: ../fish/guestfish-actions.pod:2180 ../src/guestfs-actions.pod:3395
11147 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
11148 "popular public names used by the operating system. Notably the operating "
11149 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
11150 "1). You can find out the real versions corresponding to releases of Windows "
11151 "by consulting Wikipedia or MSDN."
11155 #: ../fish/guestfish-actions.pod:2187 ../fish/guestfish-actions.pod:2198
11156 #: ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3419
11157 msgid "If the version could not be determined, then C<0> is returned."
11161 #: ../fish/guestfish-actions.pod:2191
11162 msgid "inspect-get-minor-version"
11166 #: ../fish/guestfish-actions.pod:2193
11169 " inspect-get-minor-version root\n"
11174 #: ../fish/guestfish-actions.pod:2195 ../src/guestfs-actions.pod:3416
11176 "This returns the minor version number of the inspected operating system."
11180 #: ../fish/guestfish-actions.pod:2200
11182 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11183 "get-major-version>."
11187 #: ../fish/guestfish-actions.pod:2203
11188 msgid "inspect-get-mountpoints"
11192 #: ../fish/guestfish-actions.pod:2205
11195 " inspect-get-mountpoints root\n"
11200 #: ../fish/guestfish-actions.pod:2207 ../src/guestfs-actions.pod:3434
11202 "This returns a hash of where we think the filesystems associated with this "
11203 "operating system should be mounted. Callers should note that this is at "
11204 "best an educated guess made by reading configuration files such as C</etc/"
11205 "fstab>. I<In particular note> that this may return filesystems which are "
11206 "non-existent or not mountable and callers should be prepared to handle or "
11207 "ignore failures if they try to mount them."
11211 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3443
11213 "Each element in the returned hashtable has a key which is the path of the "
11214 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
11215 "mounted there (eg. C</dev/sda1>)."
11219 #: ../fish/guestfish-actions.pod:2221 ../src/guestfs-actions.pod:3448
11221 "Non-mounted devices such as swap devices are I<not> returned in this list."
11225 #: ../fish/guestfish-actions.pod:2224
11227 "For operating systems like Windows which still use drive letters, this call "
11228 "will only return an entry for the first drive \"mounted on\" C</>. For "
11229 "information about the mapping of drive letters to partitions, see L</inspect-"
11230 "get-drive-mappings>."
11234 #: ../fish/guestfish-actions.pod:2230
11236 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11237 "get-filesystems>."
11241 #: ../fish/guestfish-actions.pod:2233
11242 msgid "inspect-get-package-format"
11246 #: ../fish/guestfish-actions.pod:2235
11249 " inspect-get-package-format root\n"
11254 #: ../fish/guestfish-actions.pod:2237
11256 "This function and L</inspect-get-package-management> return the package "
11257 "format and package management tool used by the inspected operating system. "
11258 "For example for Fedora these functions would return C<rpm> (package format) "
11259 "and C<yum> (package management)."
11263 #: ../fish/guestfish-actions.pod:2243 ../src/guestfs-actions.pod:3480
11265 "This returns the string C<unknown> if we could not determine the package "
11266 "format I<or> if the operating system does not have a real packaging system "
11271 #: ../fish/guestfish-actions.pod:2247 ../src/guestfs-actions.pod:3484
11273 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
11274 "C<pkgsrc>. Future versions of libguestfs may return other strings."
11278 #: ../fish/guestfish-actions.pod:2253
11279 msgid "inspect-get-package-management"
11283 #: ../fish/guestfish-actions.pod:2255
11286 " inspect-get-package-management root\n"
11291 #: ../fish/guestfish-actions.pod:2257
11293 "L</inspect-get-package-format> and this function return the package format "
11294 "and package management tool used by the inspected operating system. For "
11295 "example for Fedora these functions would return C<rpm> (package format) and "
11296 "C<yum> (package management)."
11300 #: ../fish/guestfish-actions.pod:2263 ../src/guestfs-actions.pod:3507
11302 "This returns the string C<unknown> if we could not determine the package "
11303 "management tool I<or> if the operating system does not have a real packaging "
11304 "system (eg. Windows)."
11308 #: ../fish/guestfish-actions.pod:2267 ../src/guestfs-actions.pod:3511
11310 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
11311 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
11312 "versions of libguestfs may return other strings."
11316 #: ../fish/guestfish-actions.pod:2274
11317 msgid "inspect-get-product-name"
11321 #: ../fish/guestfish-actions.pod:2276
11324 " inspect-get-product-name root\n"
11329 #: ../fish/guestfish-actions.pod:2278 ../src/guestfs-actions.pod:3529
11331 "This returns the product name of the inspected operating system. The "
11332 "product name is generally some freeform string which can be displayed to the "
11333 "user, but should not be parsed by programs."
11337 #: ../fish/guestfish-actions.pod:2283 ../src/guestfs-actions.pod:3534
11339 "If the product name could not be determined, then the string C<unknown> is "
11344 #: ../fish/guestfish-actions.pod:2288
11345 msgid "inspect-get-product-variant"
11349 #: ../fish/guestfish-actions.pod:2290
11352 " inspect-get-product-variant root\n"
11357 #: ../fish/guestfish-actions.pod:2292 ../src/guestfs-actions.pod:3550
11358 msgid "This returns the product variant of the inspected operating system."
11362 #: ../fish/guestfish-actions.pod:2295 ../src/guestfs-actions.pod:3553
11364 "For Windows guests, this returns the contents of the Registry key C<HKLM"
11365 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
11366 "is usually a string such as C<Client> or C<Server> (other values are "
11367 "possible). This can be used to distinguish consumer and enterprise versions "
11368 "of Windows that have the same version number (for example, Windows 7 and "
11369 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
11370 "the latter is C<Server>)."
11374 #: ../fish/guestfish-actions.pod:2304 ../src/guestfs-actions.pod:3562
11376 "For enterprise Linux guests, in future we intend this to return the product "
11377 "variant such as C<Desktop>, C<Server> and so on. But this is not "
11378 "implemented at present."
11382 #: ../fish/guestfish-actions.pod:2308 ../src/guestfs-actions.pod:3566
11384 "If the product variant could not be determined, then the string C<unknown> "
11389 #: ../fish/guestfish-actions.pod:2311
11391 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
11392 "get-product-name>, L</inspect-get-major-version>."
11396 #: ../fish/guestfish-actions.pod:2315
11397 msgid "inspect-get-roots"
11401 #: ../fish/guestfish-actions.pod:2317
11404 " inspect-get-roots\n"
11409 #: ../fish/guestfish-actions.pod:2319
11411 "This function is a convenient way to get the list of root devices, as "
11412 "returned from a previous call to L</inspect-os>, but without redoing the "
11413 "whole inspection process."
11417 #: ../fish/guestfish-actions.pod:2323
11419 "This returns an empty list if either no root devices were found or the "
11420 "caller has not called L</inspect-os>."
11424 #: ../fish/guestfish-actions.pod:2328
11425 msgid "inspect-get-type"
11429 #: ../fish/guestfish-actions.pod:2330
11432 " inspect-get-type root\n"
11437 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3604
11439 "This returns the type of the inspected operating system. Currently defined "
11444 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3609
11449 #: ../fish/guestfish-actions.pod:2339 ../src/guestfs-actions.pod:3611
11450 msgid "Any Linux-based operating system."
11454 #: ../fish/guestfish-actions.pod:2343 ../src/guestfs-actions.pod:3615
11455 msgid "Any Microsoft Windows operating system."
11459 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3617
11460 msgid "\"freebsd\""
11464 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3619
11469 #: ../fish/guestfish-actions.pod:2349 ../src/guestfs-actions.pod:3621
11474 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3623
11479 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3625
11484 #: ../fish/guestfish-actions.pod:2355 ../src/guestfs-actions.pod:3627
11489 #: ../fish/guestfish-actions.pod:2359 ../src/guestfs-actions.pod:3631
11490 msgid "The operating system type could not be determined."
11494 #: ../fish/guestfish-actions.pod:2368
11495 msgid "inspect-get-windows-current-control-set"
11499 #: ../fish/guestfish-actions.pod:2370
11502 " inspect-get-windows-current-control-set root\n"
11507 #: ../fish/guestfish-actions.pod:2372 ../src/guestfs-actions.pod:3651
11509 "This returns the Windows CurrentControlSet of the inspected guest. The "
11510 "CurrentControlSet is a registry key name such as C<ControlSet001>."
11514 #: ../fish/guestfish-actions.pod:2375 ../src/guestfs-actions.pod:3654
11516 "This call assumes that the guest is Windows and that the Registry could be "
11517 "examined by inspection. If this is not the case then an error is returned."
11521 #: ../fish/guestfish-actions.pod:2381
11522 msgid "inspect-get-windows-systemroot"
11526 #: ../fish/guestfish-actions.pod:2383
11529 " inspect-get-windows-systemroot root\n"
11534 #: ../fish/guestfish-actions.pod:2385 ../src/guestfs-actions.pod:3671
11536 "This returns the Windows systemroot of the inspected guest. The systemroot "
11537 "is a directory path such as C</WINDOWS>."
11541 #: ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3674
11543 "This call assumes that the guest is Windows and that the systemroot could be "
11544 "determined by inspection. If this is not the case then an error is returned."
11548 #: ../fish/guestfish-actions.pod:2394
11549 msgid "inspect-is-live"
11553 #: ../fish/guestfish-actions.pod:2396
11556 " inspect-is-live root\n"
11561 #: ../fish/guestfish-actions.pod:2398
11563 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11564 "then this returns true if a live image was detected on the disk."
11568 #: ../fish/guestfish-actions.pod:2404
11569 msgid "inspect-is-multipart"
11573 #: ../fish/guestfish-actions.pod:2406
11576 " inspect-is-multipart root\n"
11581 #: ../fish/guestfish-actions.pod:2408
11583 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11584 "then this returns true if the disk is part of a set."
11588 #: ../fish/guestfish-actions.pod:2414
11589 msgid "inspect-is-netinst"
11593 #: ../fish/guestfish-actions.pod:2416
11596 " inspect-is-netinst root\n"
11601 #: ../fish/guestfish-actions.pod:2418
11603 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
11604 "then this returns true if the disk is a network installer, ie. not a self-"
11605 "contained install CD but one which is likely to require network access to "
11606 "complete the install."
11610 #: ../fish/guestfish-actions.pod:2426
11611 msgid "inspect-list-applications"
11615 #: ../fish/guestfish-actions.pod:2428
11618 " inspect-list-applications root\n"
11623 #: ../fish/guestfish-actions.pod:2430 ../src/guestfs-actions.pod:3741
11624 msgid "Return the list of applications installed in the operating system."
11628 #: ../fish/guestfish-actions.pod:2432
11630 "I<Note:> This call works differently from other parts of the inspection "
11631 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
11632 "then mount up the disks, before calling this. Listing applications is a "
11633 "significantly more difficult operation which requires access to the full "
11634 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
11635 "are just returning data cached in the libguestfs handle, this call actually "
11636 "reads parts of the mounted filesystems during the call."
11640 #: ../fish/guestfish-actions.pod:2442 ../src/guestfs-actions.pod:3753
11642 "This returns an empty list if the inspection code was not able to determine "
11643 "the list of applications."
11647 #: ../fish/guestfish-actions.pod:2445 ../src/guestfs-actions.pod:3756
11648 msgid "The application structure contains the following fields:"
11652 #: ../fish/guestfish-actions.pod:2449 ../src/guestfs-actions.pod:3760
11653 msgid "C<app_name>"
11657 #: ../fish/guestfish-actions.pod:2451 ../src/guestfs-actions.pod:3762
11659 "The name of the application. For Red Hat-derived and Debian-derived Linux "
11660 "guests, this is the package name."
11664 #: ../fish/guestfish-actions.pod:2454 ../src/guestfs-actions.pod:3765
11665 msgid "C<app_display_name>"
11669 #: ../fish/guestfish-actions.pod:2456 ../src/guestfs-actions.pod:3767
11671 "The display name of the application, sometimes localized to the install "
11672 "language of the guest operating system."
11676 #: ../fish/guestfish-actions.pod:2459 ../src/guestfs-actions.pod:3770
11678 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11679 "to display something can use C<app_name> instead."
11683 #: ../fish/guestfish-actions.pod:2462 ../src/guestfs-actions.pod:3773
11684 msgid "C<app_epoch>"
11688 #: ../fish/guestfish-actions.pod:2464 ../src/guestfs-actions.pod:3775
11690 "For package managers which use epochs, this contains the epoch of the "
11691 "package (an integer). If unavailable, this is returned as C<0>."
11695 #: ../fish/guestfish-actions.pod:2467 ../src/guestfs-actions.pod:3778
11696 msgid "C<app_version>"
11700 #: ../fish/guestfish-actions.pod:2469 ../src/guestfs-actions.pod:3780
11702 "The version string of the application or package. If unavailable this is "
11703 "returned as an empty string C<\"\">."
11707 #: ../fish/guestfish-actions.pod:2472 ../src/guestfs-actions.pod:3783
11708 msgid "C<app_release>"
11712 #: ../fish/guestfish-actions.pod:2474 ../src/guestfs-actions.pod:3785
11714 "The release string of the application or package, for package managers that "
11715 "use this. If unavailable this is returned as an empty string C<\"\">."
11719 #: ../fish/guestfish-actions.pod:2478 ../src/guestfs-actions.pod:3789
11720 msgid "C<app_install_path>"
11724 #: ../fish/guestfish-actions.pod:2480 ../src/guestfs-actions.pod:3791
11726 "The installation path of the application (on operating systems such as "
11727 "Windows which use installation paths). This path is in the format used by "
11728 "the guest operating system, it is not a libguestfs path."
11732 #: ../fish/guestfish-actions.pod:2485 ../src/guestfs-actions.pod:3796
11733 msgid "If unavailable this is returned as an empty string C<\"\">."
11737 #: ../fish/guestfish-actions.pod:2487 ../src/guestfs-actions.pod:3798
11738 msgid "C<app_trans_path>"
11742 #: ../fish/guestfish-actions.pod:2489 ../src/guestfs-actions.pod:3800
11744 "The install path translated into a libguestfs path. If unavailable this is "
11745 "returned as an empty string C<\"\">."
11749 #: ../fish/guestfish-actions.pod:2492 ../src/guestfs-actions.pod:3803
11750 msgid "C<app_publisher>"
11754 #: ../fish/guestfish-actions.pod:2494 ../src/guestfs-actions.pod:3805
11756 "The name of the publisher of the application, for package managers that use "
11757 "this. If unavailable this is returned as an empty string C<\"\">."
11761 #: ../fish/guestfish-actions.pod:2498 ../src/guestfs-actions.pod:3809
11766 #: ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:3811
11768 "The URL (eg. upstream URL) of the application. If unavailable this is "
11769 "returned as an empty string C<\"\">."
11773 #: ../fish/guestfish-actions.pod:2503 ../src/guestfs-actions.pod:3814
11774 msgid "C<app_source_package>"
11778 #: ../fish/guestfish-actions.pod:2505 ../src/guestfs-actions.pod:3816
11780 "For packaging systems which support this, the name of the source package. "
11781 "If unavailable this is returned as an empty string C<\"\">."
11785 #: ../fish/guestfish-actions.pod:2508 ../src/guestfs-actions.pod:3819
11786 msgid "C<app_summary>"
11790 #: ../fish/guestfish-actions.pod:2510 ../src/guestfs-actions.pod:3821
11792 "A short (usually one line) description of the application or package. If "
11793 "unavailable this is returned as an empty string C<\"\">."
11797 #: ../fish/guestfish-actions.pod:2513 ../src/guestfs-actions.pod:3824
11798 msgid "C<app_description>"
11802 #: ../fish/guestfish-actions.pod:2515 ../src/guestfs-actions.pod:3826
11804 "A longer description of the application or package. If unavailable this is "
11805 "returned as an empty string C<\"\">."
11809 #: ../fish/guestfish-actions.pod:2522
11814 #: ../fish/guestfish-actions.pod:2524
11822 #: ../fish/guestfish-actions.pod:2526 ../src/guestfs-actions.pod:3844
11824 "This function uses other libguestfs functions and certain heuristics to "
11825 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11826 "for operating systems."
11830 #: ../fish/guestfish-actions.pod:2530 ../src/guestfs-actions.pod:3848
11831 msgid "The list returned is empty if no operating systems were found."
11835 #: ../fish/guestfish-actions.pod:2532 ../src/guestfs-actions.pod:3850
11837 "If one operating system was found, then this returns a list with a single "
11838 "element, which is the name of the root filesystem of this operating system. "
11839 "It is also possible for this function to return a list containing more than "
11840 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11841 "element being the root filesystem of one of the operating systems."
11845 #: ../fish/guestfish-actions.pod:2539
11847 "You can pass the root string(s) returned to other L</inspect-get-*> "
11848 "functions in order to query further information about each operating system, "
11849 "such as the name and version."
11853 #: ../fish/guestfish-actions.pod:2544
11855 "This function uses other libguestfs features such as L</mount-ro> and L</"
11856 "umount-all> in order to mount and unmount filesystems and look at the "
11857 "contents. This should be called with no disks currently mounted. The "
11858 "function may also use Augeas, so any existing Augeas handle will be closed."
11862 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3868
11864 "This function cannot decrypt encrypted disks. The caller must do that first "
11865 "(supplying the necessary keys) if the disk is encrypted."
11869 #: ../fish/guestfish-actions.pod:2556 ../fish/guestfish-actions.pod:2754
11870 #: ../fish/guestfish-actions.pod:2819
11871 msgid "See also L</list-filesystems>."
11875 #: ../fish/guestfish-actions.pod:2558
11876 msgid "is-blockdev"
11880 #: ../fish/guestfish-actions.pod:2560
11883 " is-blockdev path\n"
11888 #: ../fish/guestfish-actions.pod:2562 ../src/guestfs-actions.pod:3888
11890 "This returns C<true> if and only if there is a block device with the given "
11895 #: ../fish/guestfish-actions.pod:2565 ../fish/guestfish-actions.pod:2583
11896 #: ../fish/guestfish-actions.pod:2602 ../fish/guestfish-actions.pod:2611
11897 #: ../fish/guestfish-actions.pod:2621 ../fish/guestfish-actions.pod:2655
11898 #: ../fish/guestfish-actions.pod:2664
11899 msgid "See also L</stat>."
11903 #: ../fish/guestfish-actions.pod:2567
11908 #: ../fish/guestfish-actions.pod:2569
11916 #: ../fish/guestfish-actions.pod:2571 ../src/guestfs-actions.pod:3902
11918 "This returns true iff this handle is busy processing a command (in the "
11923 #: ../fish/guestfish-actions.pod:2576
11928 #: ../fish/guestfish-actions.pod:2578
11931 " is-chardev path\n"
11936 #: ../fish/guestfish-actions.pod:2580 ../src/guestfs-actions.pod:3917
11938 "This returns C<true> if and only if there is a character device with the "
11939 "given C<path> name."
11943 #: ../fish/guestfish-actions.pod:2585
11948 #: ../fish/guestfish-actions.pod:2587
11956 #: ../fish/guestfish-actions.pod:2589 ../src/guestfs-actions.pod:3931
11958 "This returns true iff this handle is being configured (in the C<CONFIG> "
11963 #: ../fish/guestfish-actions.pod:2594
11968 #: ../fish/guestfish-actions.pod:2596
11976 #: ../fish/guestfish-actions.pod:2598 ../src/guestfs-actions.pod:3946
11978 "This returns C<true> if and only if there is a directory with the given "
11979 "C<path> name. Note that it returns false for other objects like files."
11983 #: ../fish/guestfish-actions.pod:2604
11988 #: ../fish/guestfish-actions.pod:2606
11996 #: ../fish/guestfish-actions.pod:2608 ../src/guestfs-actions.pod:3962
11998 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11999 "given C<path> name."
12003 #: ../fish/guestfish-actions.pod:2613
12008 #: ../fish/guestfish-actions.pod:2615
12016 #: ../fish/guestfish-actions.pod:2617 ../src/guestfs-actions.pod:3977
12018 "This returns C<true> if and only if there is a regular file with the given "
12019 "C<path> name. Note that it returns false for other objects like directories."
12023 #: ../fish/guestfish-actions.pod:2623
12024 msgid "is-launching"
12028 #: ../fish/guestfish-actions.pod:2625
12036 #: ../fish/guestfish-actions.pod:2627 ../src/guestfs-actions.pod:3992
12038 "This returns true iff this handle is launching the subprocess (in the "
12039 "C<LAUNCHING> state)."
12043 #: ../fish/guestfish-actions.pod:2632
12048 #: ../fish/guestfish-actions.pod:2634
12056 #: ../fish/guestfish-actions.pod:2636 ../src/guestfs-actions.pod:4007
12058 "This command tests whether C<device> is a logical volume, and returns true "
12059 "iff this is the case."
12063 #: ../fish/guestfish-actions.pod:2639
12068 #: ../fish/guestfish-actions.pod:2641
12076 #: ../fish/guestfish-actions.pod:2643 ../src/guestfs-actions.pod:4019
12078 "This returns true iff this handle is ready to accept commands (in the "
12083 #: ../fish/guestfish-actions.pod:2648
12088 #: ../fish/guestfish-actions.pod:2650
12091 " is-socket path\n"
12096 #: ../fish/guestfish-actions.pod:2652 ../src/guestfs-actions.pod:4034
12098 "This returns C<true> if and only if there is a Unix domain socket with the "
12099 "given C<path> name."
12103 #: ../fish/guestfish-actions.pod:2657
12108 #: ../fish/guestfish-actions.pod:2659
12111 " is-symlink path\n"
12116 #: ../fish/guestfish-actions.pod:2661 ../src/guestfs-actions.pod:4049
12118 "This returns C<true> if and only if there is a symbolic link with the given "
12123 #: ../fish/guestfish-actions.pod:2666
12128 #: ../fish/guestfish-actions.pod:2668
12136 #: ../fish/guestfish-actions.pod:2670 ../src/guestfs-actions.pod:4064
12138 "This returns true iff the file exists and the file is empty or it contains "
12143 #: ../fish/guestfish-actions.pod:2673
12144 msgid "is-zero-device"
12148 #: ../fish/guestfish-actions.pod:2675
12151 " is-zero-device device\n"
12156 #: ../fish/guestfish-actions.pod:2677 ../src/guestfs-actions.pod:4077
12157 msgid "This returns true iff the device exists and contains all zero bytes."
12161 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:4079
12162 msgid "Note that for large devices this can take a long time to run."
12166 #: ../fish/guestfish-actions.pod:2681
12167 msgid "kill-subprocess"
12171 #: ../fish/guestfish-actions.pod:2683
12174 " kill-subprocess\n"
12179 #: ../fish/guestfish-actions.pod:2685 ../src/guestfs-actions.pod:4090
12180 msgid "This kills the qemu subprocess. You should never need to call this."
12184 #: ../fish/guestfish-actions.pod:2687
12189 #: ../fish/guestfish-actions.pod:2689
12194 #: ../fish/guestfish-actions.pod:2691
12202 #: ../fish/guestfish-actions.pod:2693 ../src/guestfs-actions.pod:4101
12204 "Internally libguestfs is implemented by running a virtual machine using "
12209 #: ../fish/guestfish-actions.pod:2696 ../src/guestfs-actions.pod:4104
12211 "You should call this after configuring the handle (eg. adding drives) but "
12212 "before performing any actions."
12216 #: ../fish/guestfish-actions.pod:2699
12221 #: ../fish/guestfish-actions.pod:2701
12224 " lchown owner group path\n"
12229 #: ../fish/guestfish-actions.pod:2703
12231 "Change the file owner to C<owner> and group to C<group>. This is like L</"
12232 "chown> but if C<path> is a symlink then the link itself is changed, not the "
12237 #: ../fish/guestfish-actions.pod:2711
12242 #: ../fish/guestfish-actions.pod:2713
12245 " lgetxattr path name\n"
12250 #: ../fish/guestfish-actions.pod:2715 ../src/guestfs-actions.pod:4144
12252 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
12253 "is a symlink, then this call returns an extended attribute from the symlink."
12257 #: ../fish/guestfish-actions.pod:2729
12258 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
12262 #: ../fish/guestfish-actions.pod:2731
12267 #: ../fish/guestfish-actions.pod:2733
12270 " lgetxattrs path\n"
12275 #: ../fish/guestfish-actions.pod:2735
12277 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
12278 "it returns the extended attributes of the link itself."
12282 #: ../fish/guestfish-actions.pod:2739
12287 #: ../fish/guestfish-actions.pod:2741
12295 #: ../fish/guestfish-actions.pod:2743 ../src/guestfs-actions.pod:4187
12297 "List all 9p filesystems attached to the guest. A list of mount tags is "
12302 #: ../fish/guestfish-actions.pod:2746
12303 msgid "list-devices"
12307 #: ../fish/guestfish-actions.pod:2748
12315 #: ../fish/guestfish-actions.pod:2750 ../src/guestfs-actions.pod:4201
12316 msgid "List all the block devices."
12320 #: ../fish/guestfish-actions.pod:2752 ../src/guestfs-actions.pod:4203
12321 msgid "The full block device names are returned, eg. C</dev/sda>."
12325 #: ../fish/guestfish-actions.pod:2756
12326 msgid "list-dm-devices"
12330 #: ../fish/guestfish-actions.pod:2758
12333 " list-dm-devices\n"
12338 #: ../fish/guestfish-actions.pod:2760 ../src/guestfs-actions.pod:4218
12339 msgid "List all device mapper devices."
12343 #: ../fish/guestfish-actions.pod:2762
12345 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
12346 "previous call to L</luks-open>."
12350 #: ../fish/guestfish-actions.pod:2765
12352 "Device mapper devices which correspond to logical volumes are I<not> "
12353 "returned in this list. Call L</lvs> if you want to list logical volumes."
12357 #: ../fish/guestfish-actions.pod:2769
12358 msgid "list-filesystems"
12362 #: ../fish/guestfish-actions.pod:2771
12365 " list-filesystems\n"
12370 #: ../fish/guestfish-actions.pod:2773 ../src/guestfs-actions.pod:4238
12372 "This inspection command looks for filesystems on partitions, block devices "
12373 "and logical volumes, returning a list of devices containing filesystems and "
12378 #: ../fish/guestfish-actions.pod:2777 ../src/guestfs-actions.pod:4242
12380 "The return value is a hash, where the keys are the devices containing "
12381 "filesystems, and the values are the filesystem types. For example:"
12385 #: ../fish/guestfish-actions.pod:2781 ../src/guestfs-actions.pod:4246
12388 " \"/dev/sda1\" => \"ntfs\"\n"
12389 " \"/dev/sda2\" => \"ext2\"\n"
12390 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
12391 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
12396 #: ../fish/guestfish-actions.pod:2786 ../src/guestfs-actions.pod:4251
12398 "The value can have the special value \"unknown\", meaning the content of the "
12399 "device is undetermined or empty. \"swap\" means a Linux swap partition."
12403 #: ../fish/guestfish-actions.pod:2790
12405 "This command runs other libguestfs commands, which might include L</mount> "
12406 "and L</umount>, and therefore you should use this soon after launch and only "
12407 "when nothing is mounted."
12411 #: ../fish/guestfish-actions.pod:2794
12413 "Not all of the filesystems returned will be mountable. In particular, swap "
12414 "partitions are returned in the list. Also this command does not check that "
12415 "each filesystem found is valid and mountable, and some filesystems might be "
12416 "mountable but require special options. Filesystems may not all belong to a "
12417 "single logical operating system (use L</inspect-os> to look for OSes)."
12421 #: ../fish/guestfish-actions.pod:2802
12422 msgid "list-md-devices"
12426 #: ../fish/guestfish-actions.pod:2804
12429 " list-md-devices\n"
12434 #: ../fish/guestfish-actions.pod:2806 ../src/guestfs-actions.pod:4280
12435 msgid "List all Linux md devices."
12439 #: ../fish/guestfish-actions.pod:2808
12440 msgid "list-partitions"
12444 #: ../fish/guestfish-actions.pod:2810
12447 " list-partitions\n"
12452 #: ../fish/guestfish-actions.pod:2812 ../src/guestfs-actions.pod:4293
12453 msgid "List all the partitions detected on all block devices."
12457 #: ../fish/guestfish-actions.pod:2814 ../src/guestfs-actions.pod:4295
12458 msgid "The full partition device names are returned, eg. C</dev/sda1>"
12462 #: ../fish/guestfish-actions.pod:2816
12464 "This does not return logical volumes. For that you will need to call L</"
12469 #: ../fish/guestfish-actions.pod:2821
12474 #: ../fish/guestfish-actions.pod:2823
12482 #: ../fish/guestfish-actions.pod:2825 ../src/guestfs-actions.pod:4314
12484 "List the files in C<directory> (relative to the root directory, there is no "
12485 "cwd) in the format of 'ls -la'."
12489 #: ../fish/guestfish-actions.pod:2828 ../src/guestfs-actions.pod:4317
12491 "This command is mostly useful for interactive sessions. It is I<not> "
12492 "intended that you try to parse the output string."
12496 #: ../fish/guestfish-actions.pod:2831
12501 #: ../fish/guestfish-actions.pod:2833
12504 " ln target linkname\n"
12509 #: ../fish/guestfish-actions.pod:2835 ../src/guestfs-actions.pod:4332
12510 msgid "This command creates a hard link using the C<ln> command."
12514 #: ../fish/guestfish-actions.pod:2837
12519 #: ../fish/guestfish-actions.pod:2839
12522 " ln-f target linkname\n"
12527 #: ../fish/guestfish-actions.pod:2841 ../src/guestfs-actions.pod:4345
12529 "This command creates a hard link using the C<ln -f> command. The I<-f> "
12530 "option removes the link (C<linkname>) if it exists already."
12534 #: ../fish/guestfish-actions.pod:2844
12539 #: ../fish/guestfish-actions.pod:2846
12542 " ln-s target linkname\n"
12547 #: ../fish/guestfish-actions.pod:2848 ../src/guestfs-actions.pod:4359
12548 msgid "This command creates a symbolic link using the C<ln -s> command."
12552 #: ../fish/guestfish-actions.pod:2850
12557 #: ../fish/guestfish-actions.pod:2852
12560 " ln-sf target linkname\n"
12565 #: ../fish/guestfish-actions.pod:2854 ../src/guestfs-actions.pod:4372
12567 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
12568 "option removes the link (C<linkname>) if it exists already."
12572 #: ../fish/guestfish-actions.pod:2857
12573 msgid "lremovexattr"
12577 #: ../fish/guestfish-actions.pod:2859
12580 " lremovexattr xattr path\n"
12585 #: ../fish/guestfish-actions.pod:2861
12587 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
12588 "it removes an extended attribute of the link itself."
12592 #: ../fish/guestfish-actions.pod:2865
12597 #: ../fish/guestfish-actions.pod:2867
12605 #: ../fish/guestfish-actions.pod:2869 ../src/guestfs-actions.pod:4400
12607 "List the files in C<directory> (relative to the root directory, there is no "
12608 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
12612 #: ../fish/guestfish-actions.pod:2873
12614 "This command is mostly useful for interactive sessions. Programs should "
12615 "probably use L</readdir> instead."
12619 #: ../fish/guestfish-actions.pod:2876
12624 #: ../fish/guestfish-actions.pod:2878
12627 " lsetxattr xattr val vallen path\n"
12632 #: ../fish/guestfish-actions.pod:2880
12634 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
12635 "sets an extended attribute of the link itself."
12639 #: ../fish/guestfish-actions.pod:2884
12644 #: ../fish/guestfish-actions.pod:2886
12652 #: ../fish/guestfish-actions.pod:2888 ../fish/guestfish-actions.pod:4786
12653 #: ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:7366
12654 msgid "Returns file information for the given C<path>."
12658 #: ../fish/guestfish-actions.pod:2890
12660 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
12661 "the link is stat-ed, not the file it refers to."
12665 #: ../fish/guestfish-actions.pod:2894 ../src/guestfs-actions.pod:4442
12666 msgid "This is the same as the C<lstat(2)> system call."
12670 #: ../fish/guestfish-actions.pod:2896
12675 #: ../fish/guestfish-actions.pod:2898
12678 " lstatlist path 'names ...'\n"
12683 #: ../fish/guestfish-actions.pod:2900
12685 "This call allows you to perform the L</lstat> operation on multiple files, "
12686 "where all files are in the directory C<path>. C<names> is the list of files "
12687 "from this directory."
12691 #: ../fish/guestfish-actions.pod:2904 ../src/guestfs-actions.pod:4461
12693 "On return you get a list of stat structs, with a one-to-one correspondence "
12694 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12695 "then the C<ino> field of that structure is set to C<-1>."
12699 #: ../fish/guestfish-actions.pod:2909
12701 "This call is intended for programs that want to efficiently list a directory "
12702 "contents without making many round-trips. See also L</lxattrlist> for a "
12703 "similarly efficient call for getting extended attributes. Very long "
12704 "directory listings might cause the protocol message size to be exceeded, "
12705 "causing this call to fail. The caller must split up such requests into "
12706 "smaller groups of names."
12710 #: ../fish/guestfish-actions.pod:2917
12711 msgid "luks-add-key"
12715 #: ../fish/guestfish-actions.pod:2919
12718 " luks-add-key device keyslot\n"
12723 #: ../fish/guestfish-actions.pod:2921 ../src/guestfs-actions.pod:4489
12725 "This command adds a new key on LUKS device C<device>. C<key> is any "
12726 "existing key, and is used to access the device. C<newkey> is the new key to "
12727 "add. C<keyslot> is the key slot that will be replaced."
12731 #: ../fish/guestfish-actions.pod:2926
12733 "Note that if C<keyslot> already contains a key, then this command will "
12734 "fail. You have to use L</luks-kill-slot> first to remove that key."
12738 #: ../fish/guestfish-actions.pod:2930 ../fish/guestfish-actions.pod:2952
12739 #: ../fish/guestfish-actions.pod:2962 ../fish/guestfish-actions.pod:2973
12740 #: ../fish/guestfish-actions.pod:2999 ../fish/guestfish-actions.pod:3009
12742 "This command has one or more key or passphrase parameters. Guestfish will "
12743 "prompt for these separately."
12747 #: ../fish/guestfish-actions.pod:2933
12752 #: ../fish/guestfish-actions.pod:2935
12755 " luks-close device\n"
12760 #: ../fish/guestfish-actions.pod:2937
12762 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
12763 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
12764 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
12769 #: ../fish/guestfish-actions.pod:2943
12770 msgid "luks-format"
12774 #: ../fish/guestfish-actions.pod:2945
12777 " luks-format device keyslot\n"
12782 #: ../fish/guestfish-actions.pod:2947 ../src/guestfs-actions.pod:4530
12784 "This command erases existing data on C<device> and formats the device as a "
12785 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12786 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12790 #: ../fish/guestfish-actions.pod:2955
12791 msgid "luks-format-cipher"
12795 #: ../fish/guestfish-actions.pod:2957
12798 " luks-format-cipher device keyslot cipher\n"
12803 #: ../fish/guestfish-actions.pod:2959
12805 "This command is the same as L</luks-format> but it also allows you to set "
12806 "the C<cipher> used."
12810 #: ../fish/guestfish-actions.pod:2965
12811 msgid "luks-kill-slot"
12815 #: ../fish/guestfish-actions.pod:2967
12818 " luks-kill-slot device keyslot\n"
12823 #: ../fish/guestfish-actions.pod:2969 ../src/guestfs-actions.pod:4571
12825 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12826 "device C<device>. C<key> must be one of the I<other> keys."
12830 #: ../fish/guestfish-actions.pod:2976
12835 #: ../fish/guestfish-actions.pod:2978
12838 " luks-open device mapname\n"
12843 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4591
12845 "This command opens a block device which has been encrypted according to the "
12846 "Linux Unified Key Setup (LUKS) standard."
12850 #: ../fish/guestfish-actions.pod:2983 ../src/guestfs-actions.pod:4594
12851 msgid "C<device> is the encrypted block device or partition."
12855 #: ../fish/guestfish-actions.pod:2985 ../src/guestfs-actions.pod:4596
12857 "The caller must supply one of the keys associated with the LUKS block "
12858 "device, in the C<key> parameter."
12862 #: ../fish/guestfish-actions.pod:2988 ../src/guestfs-actions.pod:4599
12864 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12865 "writes to this block device are decrypted from and encrypted to the "
12866 "underlying C<device> respectively."
12870 #: ../fish/guestfish-actions.pod:2992
12872 "If this block device contains LVM volume groups, then calling L</vgscan> "
12873 "followed by L</vg-activate-all> will make them visible."
12877 #: ../fish/guestfish-actions.pod:2996
12878 msgid "Use L</list-dm-devices> to list all device mapper devices."
12882 #: ../fish/guestfish-actions.pod:3002
12883 msgid "luks-open-ro"
12887 #: ../fish/guestfish-actions.pod:3004
12890 " luks-open-ro device mapname\n"
12895 #: ../fish/guestfish-actions.pod:3006
12897 "This is the same as L</luks-open> except that a read-only mapping is created."
12901 #: ../fish/guestfish-actions.pod:3012
12906 #: ../fish/guestfish-actions.pod:3014
12909 " lvcreate logvol volgroup mbytes\n"
12914 #: ../fish/guestfish-actions.pod:3016 ../src/guestfs-actions.pod:4645
12916 "This creates an LVM logical volume called C<logvol> on the volume group "
12917 "C<volgroup>, with C<size> megabytes."
12921 #: ../fish/guestfish-actions.pod:3019
12922 msgid "lvm-canonical-lv-name"
12926 #: ../fish/guestfish-actions.pod:3021
12929 " lvm-canonical-lv-name lvname\n"
12934 #: ../fish/guestfish-actions.pod:3023 ../src/guestfs-actions.pod:4658
12936 "This converts alternative naming schemes for LVs that you might find to the "
12937 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
12942 #: ../fish/guestfish-actions.pod:3027 ../src/guestfs-actions.pod:4662
12944 "This command returns an error if the C<lvname> parameter does not refer to a "
12949 #: ../fish/guestfish-actions.pod:3030
12950 msgid "See also L</is-lv>."
12954 #: ../fish/guestfish-actions.pod:3032
12955 msgid "lvm-clear-filter"
12959 #: ../fish/guestfish-actions.pod:3034
12962 " lvm-clear-filter\n"
12967 #: ../fish/guestfish-actions.pod:3036
12969 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
12974 #: ../fish/guestfish-actions.pod:3039 ../fish/guestfish-actions.pod:3067
12975 #: ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4719
12977 "This command also clears the LVM cache and performs a volume group scan."
12981 #: ../fish/guestfish-actions.pod:3042
12982 msgid "lvm-remove-all"
12986 #: ../fish/guestfish-actions.pod:3044
12989 " lvm-remove-all\n"
12994 #: ../fish/guestfish-actions.pod:3046 ../src/guestfs-actions.pod:4692
12996 "This command removes all LVM logical volumes, volume groups and physical "
13001 #: ../fish/guestfish-actions.pod:3049
13002 msgid "lvm-set-filter"
13006 #: ../fish/guestfish-actions.pod:3051
13009 " lvm-set-filter 'devices ...'\n"
13014 #: ../fish/guestfish-actions.pod:3053 ../src/guestfs-actions.pod:4705
13016 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
13017 "block devices in the list C<devices>, and will ignore all other attached "
13022 #: ../fish/guestfish-actions.pod:3057 ../src/guestfs-actions.pod:4709
13024 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
13025 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
13026 "there are two types of duplication possible: either cloned PVs/VGs which "
13027 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
13028 "same name. In normal operation you cannot create this situation, but you "
13029 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
13030 "inside the LVM metadata."
13034 #: ../fish/guestfish-actions.pod:3070 ../src/guestfs-actions.pod:4722
13035 msgid "You can filter whole block devices or individual partitions."
13039 #: ../fish/guestfish-actions.pod:3072 ../src/guestfs-actions.pod:4724
13041 "You cannot use this if any VG is currently in use (eg. contains a mounted "
13042 "filesystem), even if you are not filtering out that VG."
13046 #: ../fish/guestfish-actions.pod:3076
13051 #: ../fish/guestfish-actions.pod:3078
13054 " lvremove device\n"
13059 #: ../fish/guestfish-actions.pod:3080 ../src/guestfs-actions.pod:4738
13061 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
13062 "LV, such as C</dev/VG/LV>."
13066 #: ../fish/guestfish-actions.pod:3083 ../src/guestfs-actions.pod:4741
13068 "You can also remove all LVs in a volume group by specifying the VG name, C</"
13073 #: ../fish/guestfish-actions.pod:3086
13078 #: ../fish/guestfish-actions.pod:3088
13081 " lvrename logvol newlogvol\n"
13086 #: ../fish/guestfish-actions.pod:3090 ../src/guestfs-actions.pod:4755
13087 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
13091 #: ../fish/guestfish-actions.pod:3092
13096 #: ../fish/guestfish-actions.pod:3094
13099 " lvresize device mbytes\n"
13104 #: ../fish/guestfish-actions.pod:3096 ../src/guestfs-actions.pod:4768
13106 "This resizes (expands or shrinks) an existing LVM logical volume to "
13107 "C<mbytes>. When reducing, data in the reduced part is lost."
13111 #: ../fish/guestfish-actions.pod:3100
13112 msgid "lvresize-free"
13116 #: ../fish/guestfish-actions.pod:3102
13119 " lvresize-free lv percent\n"
13124 #: ../fish/guestfish-actions.pod:3104 ../src/guestfs-actions.pod:4783
13126 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
13127 "remaining free space in the volume group. Commonly you would call this with "
13128 "pc = 100 which expands the logical volume as much as possible, using all "
13129 "remaining free space in the volume group."
13133 #: ../fish/guestfish-actions.pod:3110
13138 #: ../fish/guestfish-actions.pod:3112
13146 #: ../fish/guestfish-actions.pod:3114 ../src/guestfs-actions.pod:4798
13148 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13153 #: ../fish/guestfish-actions.pod:3117 ../src/guestfs-actions.pod:4801
13155 "This returns a list of the logical volume device names (eg. C</dev/"
13156 "VolGroup00/LogVol00>)."
13160 #: ../fish/guestfish-actions.pod:3120
13161 msgid "See also L</lvs-full>, L</list-filesystems>."
13165 #: ../fish/guestfish-actions.pod:3122
13170 #: ../fish/guestfish-actions.pod:3124
13178 #: ../fish/guestfish-actions.pod:3126 ../src/guestfs-actions.pod:4817
13180 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13181 "(8)> command. The \"full\" version includes all fields."
13185 #: ../fish/guestfish-actions.pod:3129
13190 #: ../fish/guestfish-actions.pod:3131
13198 #: ../fish/guestfish-actions.pod:3133 ../src/guestfs-actions.pod:4832
13199 msgid "This command returns the UUID of the LVM LV C<device>."
13203 #: ../fish/guestfish-actions.pod:3135
13208 #: ../fish/guestfish-actions.pod:3137
13211 " lxattrlist path 'names ...'\n"
13216 #: ../fish/guestfish-actions.pod:3139 ../src/guestfs-actions.pod:4846
13218 "This call allows you to get the extended attributes of multiple files, where "
13219 "all files are in the directory C<path>. C<names> is the list of files from "
13224 #: ../fish/guestfish-actions.pod:3143 ../src/guestfs-actions.pod:4850
13226 "On return you get a flat list of xattr structs which must be interpreted "
13227 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
13228 "C<attrval> in this struct is zero-length to indicate there was an error "
13229 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
13230 "number (the number of following attributes for this file, which could be C<"
13231 "\"0\">). Then after the first xattr struct are the zero or more attributes "
13232 "for the first named file. This repeats for the second and subsequent files."
13236 #: ../fish/guestfish-actions.pod:3153
13238 "This call is intended for programs that want to efficiently list a directory "
13239 "contents without making many round-trips. See also L</lstatlist> for a "
13240 "similarly efficient call for getting standard stats. Very long directory "
13241 "listings might cause the protocol message size to be exceeded, causing this "
13242 "call to fail. The caller must split up such requests into smaller groups of "
13247 #: ../fish/guestfish-actions.pod:3161
13252 #: ../fish/guestfish-actions.pod:3163
13255 " md-create name 'devices ...' [missingbitmap:N] [nrdevices:N] [spare:N] [chunk:N] [level:..]\n"
13260 #: ../fish/guestfish-actions.pod:3165 ../src/guestfs-actions.pod:4893
13262 "Create a Linux md (RAID) device named C<name> on the devices in the list "
13267 #: ../fish/guestfish-actions.pod:3172 ../src/guestfs-actions.pod:4900
13268 msgid "C<missingbitmap>"
13272 #: ../fish/guestfish-actions.pod:3174 ../src/guestfs-actions.pod:4902
13274 "A bitmap of missing devices. If a bit is set it means that a missing device "
13275 "is added to the array. The least significant bit corresponds to the first "
13276 "device in the array."
13280 #: ../fish/guestfish-actions.pod:3178 ../src/guestfs-actions.pod:4906
13281 msgid "As examples:"
13285 #: ../fish/guestfish-actions.pod:3180 ../src/guestfs-actions.pod:4908
13287 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x1> then the resulting "
13288 "array would be C<[E<lt>missingE<gt>, \"/dev/sda\"]>."
13292 #: ../fish/guestfish-actions.pod:3183 ../src/guestfs-actions.pod:4911
13294 "If C<devices = [\"/dev/sda\"]> and C<missingbitmap = 0x2> then the resulting "
13295 "array would be C<[\"/dev/sda\", E<lt>missingE<gt>]>."
13299 #: ../fish/guestfish-actions.pod:3186 ../src/guestfs-actions.pod:4914
13300 msgid "This defaults to C<0> (no missing devices)."
13304 #: ../fish/guestfish-actions.pod:3188 ../src/guestfs-actions.pod:4916
13306 "The length of C<devices> + the number of bits set in C<missingbitmap> must "
13307 "equal C<nrdevices> + C<spare>."
13311 #: ../fish/guestfish-actions.pod:3191 ../src/guestfs-actions.pod:4919
13312 msgid "C<nrdevices>"
13316 #: ../fish/guestfish-actions.pod:3193 ../src/guestfs-actions.pod:4921
13317 msgid "The number of active RAID devices."
13321 #: ../fish/guestfish-actions.pod:3195 ../src/guestfs-actions.pod:4923
13323 "If not set, this defaults to the length of C<devices> plus the number of "
13324 "bits set in C<missingbitmap>."
13328 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4926
13333 #: ../fish/guestfish-actions.pod:3200 ../src/guestfs-actions.pod:4928
13334 msgid "The number of spare devices."
13338 #: ../fish/guestfish-actions.pod:3202 ../src/guestfs-actions.pod:4930
13339 msgid "If not set, this defaults to C<0>."
13343 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4932
13348 #: ../fish/guestfish-actions.pod:3206 ../src/guestfs-actions.pod:4934
13349 msgid "The chunk size in bytes."
13353 #: ../fish/guestfish-actions.pod:3208 ../fish/guestfish-actions.pod:3230
13354 #: ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:4984
13359 #: ../fish/guestfish-actions.pod:3210 ../src/guestfs-actions.pod:4938
13361 "The RAID level, which can be one of: I<linear>, I<raid0>, I<0>, I<stripe>, "
13362 "I<raid1>, I<1>, I<mirror>, I<raid4>, I<4>, I<raid5>, I<5>, I<raid6>, I<6>, "
13363 "I<raid10>, I<10>. Some of these are synonymous, and more levels may be "
13368 #: ../fish/guestfish-actions.pod:3215 ../src/guestfs-actions.pod:4943
13369 msgid "If not set, this defaults to C<raid1>."
13373 #: ../fish/guestfish-actions.pod:3221
13378 #: ../fish/guestfish-actions.pod:3223
13386 #: ../fish/guestfish-actions.pod:3225 ../src/guestfs-actions.pod:4979
13388 "This command exposes the output of 'mdadm -DY <md>'. The following fields "
13389 "are usually present in the returned hash. Other fields may also be present."
13393 #: ../fish/guestfish-actions.pod:3232 ../src/guestfs-actions.pod:4986
13394 msgid "The raid level of the MD device."
13398 #: ../fish/guestfish-actions.pod:3234 ../src/guestfs-actions.pod:4988
13403 #: ../fish/guestfish-actions.pod:3236 ../src/guestfs-actions.pod:4990
13404 msgid "The number of underlying devices in the MD device."
13408 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4992
13409 msgid "C<metadata>"
13413 #: ../fish/guestfish-actions.pod:3240 ../src/guestfs-actions.pod:4994
13414 msgid "The metadata version used."
13418 #: ../fish/guestfish-actions.pod:3242 ../src/guestfs-actions.pod:4996
13423 #: ../fish/guestfish-actions.pod:3244 ../src/guestfs-actions.pod:4998
13424 msgid "The UUID of the MD device."
13428 #: ../fish/guestfish-actions.pod:3248 ../src/guestfs-actions.pod:5002
13429 msgid "The name of the MD device."
13433 #: ../fish/guestfish-actions.pod:3252
13438 #: ../fish/guestfish-actions.pod:3254
13446 #: ../fish/guestfish-actions.pod:3256 ../src/guestfs-actions.pod:5018
13448 "This command deactivates the MD array named C<md>. The device is stopped, "
13449 "but it is not destroyed or zeroed."
13453 #: ../fish/guestfish-actions.pod:3259
13458 #: ../fish/guestfish-actions.pod:3261
13466 #: ../fish/guestfish-actions.pod:3263 ../src/guestfs-actions.pod:5029
13467 msgid "Create a directory named C<path>."
13471 #: ../fish/guestfish-actions.pod:3265
13476 #: ../fish/guestfish-actions.pod:3267
13479 " mkdir-mode path mode\n"
13484 #: ../fish/guestfish-actions.pod:3269 ../src/guestfs-actions.pod:5042
13486 "This command creates a directory, setting the initial permissions of the "
13487 "directory to C<mode>."
13491 #: ../fish/guestfish-actions.pod:3272 ../src/guestfs-actions.pod:5045
13493 "For common Linux filesystems, the actual mode which is set will be C<mode & "
13494 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
13499 #: ../fish/guestfish-actions.pod:3276
13500 msgid "See also L</mkdir>, L</umask>"
13504 #: ../fish/guestfish-actions.pod:3278
13509 #: ../fish/guestfish-actions.pod:3280
13517 #: ../fish/guestfish-actions.pod:3282 ../src/guestfs-actions.pod:5061
13519 "Create a directory named C<path>, creating any parent directories as "
13520 "necessary. This is like the C<mkdir -p> shell command."
13524 #: ../fish/guestfish-actions.pod:3285
13529 #: ../fish/guestfish-actions.pod:3287
13532 " mkdtemp template\n"
13537 #: ../fish/guestfish-actions.pod:3289 ../src/guestfs-actions.pod:5074
13539 "This command creates a temporary directory. The C<template> parameter "
13540 "should be a full pathname for the temporary directory name with the final "
13541 "six characters being \"XXXXXX\"."
13545 #: ../fish/guestfish-actions.pod:3294 ../src/guestfs-actions.pod:5079
13547 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
13548 "being suitable for Windows filesystems."
13552 #: ../fish/guestfish-actions.pod:3297 ../src/guestfs-actions.pod:5082
13553 msgid "The name of the temporary directory that was created is returned."
13557 #: ../fish/guestfish-actions.pod:3300 ../src/guestfs-actions.pod:5085
13558 msgid "The temporary directory is created with mode 0700 and is owned by root."
13562 #: ../fish/guestfish-actions.pod:3303 ../src/guestfs-actions.pod:5088
13564 "The caller is responsible for deleting the temporary directory and its "
13565 "contents after use."
13569 #: ../fish/guestfish-actions.pod:3306 ../src/guestfs-actions.pod:5091
13570 msgid "See also: L<mkdtemp(3)>"
13574 #: ../fish/guestfish-actions.pod:3308
13579 #: ../fish/guestfish-actions.pod:3310
13582 " mke2fs-J fstype blocksize device journal\n"
13587 #: ../fish/guestfish-actions.pod:3312 ../src/guestfs-actions.pod:5107
13589 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13590 "C<journal>. It is equivalent to the command:"
13594 #: ../fish/guestfish-actions.pod:3316 ../src/guestfs-actions.pod:5111
13597 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13602 #: ../fish/guestfish-actions.pod:3318
13603 msgid "See also L</mke2journal>."
13607 #: ../fish/guestfish-actions.pod:3320
13612 #: ../fish/guestfish-actions.pod:3322
13615 " mke2fs-JL fstype blocksize device label\n"
13620 #: ../fish/guestfish-actions.pod:3324 ../src/guestfs-actions.pod:5128
13622 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13623 "the journal labeled C<label>."
13627 #: ../fish/guestfish-actions.pod:3327
13628 msgid "See also L</mke2journal-L>."
13632 #: ../fish/guestfish-actions.pod:3329
13637 #: ../fish/guestfish-actions.pod:3331
13640 " mke2fs-JU fstype blocksize device uuid\n"
13645 #: ../fish/guestfish-actions.pod:3333 ../src/guestfs-actions.pod:5146
13647 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13648 "the journal with UUID C<uuid>."
13652 #: ../fish/guestfish-actions.pod:3336
13653 msgid "See also L</mke2journal-U>."
13657 #: ../fish/guestfish-actions.pod:3338
13658 msgid "mke2journal"
13662 #: ../fish/guestfish-actions.pod:3340
13665 " mke2journal blocksize device\n"
13670 #: ../fish/guestfish-actions.pod:3342 ../src/guestfs-actions.pod:5162
13672 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13677 #: ../fish/guestfish-actions.pod:3345 ../src/guestfs-actions.pod:5165
13680 " mke2fs -O journal_dev -b blocksize device\n"
13685 #: ../fish/guestfish-actions.pod:3347
13686 msgid "mke2journal-L"
13690 #: ../fish/guestfish-actions.pod:3349
13693 " mke2journal-L blocksize label device\n"
13698 #: ../fish/guestfish-actions.pod:3351 ../src/guestfs-actions.pod:5179
13699 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13703 #: ../fish/guestfish-actions.pod:3353
13704 msgid "mke2journal-U"
13708 #: ../fish/guestfish-actions.pod:3355
13711 " mke2journal-U blocksize uuid device\n"
13716 #: ../fish/guestfish-actions.pod:3357 ../src/guestfs-actions.pod:5193
13717 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13721 #: ../fish/guestfish-actions.pod:3359
13726 #: ../fish/guestfish-actions.pod:3361
13729 " mkfifo mode path\n"
13734 #: ../fish/guestfish-actions.pod:3363
13736 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13737 "is just a convenient wrapper around L</mknod>."
13741 #: ../fish/guestfish-actions.pod:3369
13746 #: ../fish/guestfish-actions.pod:3371
13749 " mkfs fstype device\n"
13754 #: ../fish/guestfish-actions.pod:3373 ../src/guestfs-actions.pod:5223
13756 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13757 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13761 #: ../fish/guestfish-actions.pod:3377
13766 #: ../fish/guestfish-actions.pod:3379
13769 " mkfs-b fstype blocksize device\n"
13774 #: ../fish/guestfish-actions.pod:3381
13776 "This call is similar to L</mkfs>, but it allows you to control the block "
13777 "size of the resulting filesystem. Supported block sizes depend on the "
13778 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13782 #: ../fish/guestfish-actions.pod:3386 ../fish/guestfish-actions.pod:3413
13783 #: ../src/guestfs-actions.pod:5251 ../src/guestfs-actions.pod:5289
13785 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13790 #: ../fish/guestfish-actions.pod:3389
13792 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
13797 #: ../fish/guestfish-actions.pod:3396
13802 #: ../fish/guestfish-actions.pod:3398
13805 " mkfs-opts fstype device [blocksize:N] [features:..] [inode:N] [sectorsize:N]\n"
13810 #: ../fish/guestfish-actions.pod:3400 ../src/guestfs-actions.pod:5276
13812 "This function creates a filesystem on C<device>. The filesystem type is "
13813 "C<fstype>, for example C<ext3>."
13817 #: ../fish/guestfish-actions.pod:3407 ../src/guestfs-actions.pod:5283
13818 msgid "C<blocksize>"
13822 #: ../fish/guestfish-actions.pod:3409 ../src/guestfs-actions.pod:5285
13824 "The filesystem block size. Supported block sizes depend on the filesystem "
13825 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13830 #: ../fish/guestfish-actions.pod:3416 ../src/guestfs-actions.pod:5292
13831 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13835 #: ../fish/guestfish-actions.pod:3418 ../src/guestfs-actions.pod:5294
13836 msgid "C<features>"
13840 #: ../fish/guestfish-actions.pod:3420 ../src/guestfs-actions.pod:5296
13841 msgid "This passes the I<-O> parameter to the external mkfs program."
13845 #: ../fish/guestfish-actions.pod:3422 ../src/guestfs-actions.pod:5298
13847 "For certain filesystem types, this allows extra filesystem features to be "
13848 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13852 #: ../fish/guestfish-actions.pod:3426 ../src/guestfs-actions.pod:5302
13854 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13859 #: ../fish/guestfish-actions.pod:3429 ../src/guestfs-actions.pod:5305
13864 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5307
13866 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
13867 "sets the inode size (only for ext2/3/4 filesystems at present)."
13871 #: ../fish/guestfish-actions.pod:3434 ../src/guestfs-actions.pod:5310
13872 msgid "C<sectorsize>"
13876 #: ../fish/guestfish-actions.pod:3436 ../src/guestfs-actions.pod:5312
13878 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
13879 "sets sector size for ufs filesystem."
13883 #: ../fish/guestfish-actions.pod:3443
13884 msgid "mkmountpoint"
13888 #: ../fish/guestfish-actions.pod:3445
13891 " mkmountpoint exemptpath\n"
13896 #: ../fish/guestfish-actions.pod:3447
13898 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
13899 "to create extra mountpoints before mounting the first filesystem."
13903 #: ../fish/guestfish-actions.pod:3451 ../src/guestfs-actions.pod:5355
13905 "These calls are I<only> necessary in some very limited circumstances, mainly "
13906 "the case where you want to mount a mix of unrelated and/or read-only "
13907 "filesystems together."
13911 #: ../fish/guestfish-actions.pod:3455 ../src/guestfs-actions.pod:5359
13913 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13914 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13915 "inside that. You can unpack this as follows in guestfish:"
13919 #: ../fish/guestfish-actions.pod:3460 ../src/guestfs-actions.pod:5364
13922 " add-ro Fedora-11-i686-Live.iso\n"
13924 " mkmountpoint /cd\n"
13925 " mkmountpoint /sqsh\n"
13926 " mkmountpoint /ext3fs\n"
13927 " mount /dev/sda /cd\n"
13928 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13929 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13934 #: ../fish/guestfish-actions.pod:3469 ../src/guestfs-actions.pod:5373
13935 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13939 #: ../fish/guestfish-actions.pod:3471
13941 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
13942 "unexpected errors if you try to mix these calls. It is safest to manually "
13943 "unmount filesystems and remove mountpoints after use."
13947 #: ../fish/guestfish-actions.pod:3475
13949 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
13950 "for this to work for manual mountpoints, you must ensure that the innermost "
13951 "mountpoints have the longest pathnames, as in the example code above."
13955 #: ../fish/guestfish-actions.pod:3480 ../src/guestfs-actions.pod:5384
13957 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13961 #: ../fish/guestfish-actions.pod:3482
13963 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
13964 "L</umount-all> to be called when the handle is closed which can also trigger "
13969 #: ../fish/guestfish-actions.pod:3486
13974 #: ../fish/guestfish-actions.pod:3488
13977 " mknod mode devmajor devminor path\n"
13982 #: ../fish/guestfish-actions.pod:3490 ../src/guestfs-actions.pod:5403
13984 "This call creates block or character special devices, or named pipes (FIFOs)."
13988 #: ../fish/guestfish-actions.pod:3493 ../src/guestfs-actions.pod:5406
13990 "The C<mode> parameter should be the mode, using the standard constants. "
13991 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13992 "used when creating block and character special devices."
13996 #: ../fish/guestfish-actions.pod:3498
13998 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13999 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
14000 "regular file). These constants are available in the standard Linux header "
14001 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
14002 "wrappers around this command which bitwise OR in the appropriate constant "
14007 #: ../fish/guestfish-actions.pod:3508
14012 #: ../fish/guestfish-actions.pod:3510
14015 " mknod-b mode devmajor devminor path\n"
14020 #: ../fish/guestfish-actions.pod:3512
14022 "This call creates a block device node called C<path> with mode C<mode> and "
14023 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14024 "wrapper around L</mknod>."
14028 #: ../fish/guestfish-actions.pod:3518
14033 #: ../fish/guestfish-actions.pod:3520
14036 " mknod-c mode devmajor devminor path\n"
14041 #: ../fish/guestfish-actions.pod:3522
14043 "This call creates a char device node called C<path> with mode C<mode> and "
14044 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14045 "wrapper around L</mknod>."
14049 #: ../fish/guestfish-actions.pod:3528
14054 #: ../fish/guestfish-actions.pod:3530
14062 #: ../fish/guestfish-actions.pod:3532 ../src/guestfs-actions.pod:5469
14063 msgid "Create a swap partition on C<device>."
14067 #: ../fish/guestfish-actions.pod:3534
14072 #: ../fish/guestfish-actions.pod:3536
14075 " mkswap-L label device\n"
14080 #: ../fish/guestfish-actions.pod:3538 ../src/guestfs-actions.pod:5482
14081 msgid "Create a swap partition on C<device> with label C<label>."
14085 #: ../fish/guestfish-actions.pod:3540 ../src/guestfs-actions.pod:5484
14087 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
14088 "sda>), just to a partition. This appears to be a limitation of the kernel "
14093 #: ../fish/guestfish-actions.pod:3544
14098 #: ../fish/guestfish-actions.pod:3546
14101 " mkswap-U uuid device\n"
14106 #: ../fish/guestfish-actions.pod:3548 ../src/guestfs-actions.pod:5499
14107 msgid "Create a swap partition on C<device> with UUID C<uuid>."
14111 #: ../fish/guestfish-actions.pod:3550
14112 msgid "mkswap-file"
14116 #: ../fish/guestfish-actions.pod:3552
14119 " mkswap-file path\n"
14124 #: ../fish/guestfish-actions.pod:3554 ../src/guestfs-actions.pod:5511
14125 msgid "Create a swap file."
14129 #: ../fish/guestfish-actions.pod:3556
14131 "This command just writes a swap file signature to an existing file. To "
14132 "create the file itself, use something like L</fallocate>."
14136 #: ../fish/guestfish-actions.pod:3559
14141 #: ../fish/guestfish-actions.pod:3561
14144 " modprobe modulename\n"
14149 #: ../fish/guestfish-actions.pod:3563 ../src/guestfs-actions.pod:5526
14150 msgid "This loads a kernel module in the appliance."
14154 #: ../fish/guestfish-actions.pod:3565 ../src/guestfs-actions.pod:5528
14156 "The kernel module must have been whitelisted when libguestfs was built (see "
14157 "C<appliance/kmod.whitelist.in> in the source)."
14161 #: ../fish/guestfish-actions.pod:3568
14166 #: ../fish/guestfish-actions.pod:3570
14169 " mount device mountpoint\n"
14174 #: ../fish/guestfish-actions.pod:3572 ../src/guestfs-actions.pod:5542
14176 "Mount a guest disk at a position in the filesystem. Block devices are named "
14177 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
14178 "those block devices contain partitions, they will have the usual names (eg. "
14179 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
14183 #: ../fish/guestfish-actions.pod:3578 ../src/guestfs-actions.pod:5548
14185 "The rules are the same as for L<mount(2)>: A filesystem must first be "
14186 "mounted on C</> before others can be mounted. Other filesystems can only be "
14187 "mounted on directories which already exist."
14191 #: ../fish/guestfish-actions.pod:3583 ../src/guestfs-actions.pod:5553
14193 "The mounted filesystem is writable, if we have sufficient permissions on the "
14194 "underlying device."
14198 #: ../fish/guestfish-actions.pod:3586
14200 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
14201 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
14202 "problems for users. If your program might need to work with older versions "
14203 "of libguestfs, use L</mount-options> instead (using an empty string for the "
14204 "first parameter if you don't want any options)."
14208 #: ../fish/guestfish-actions.pod:3593
14213 #: ../fish/guestfish-actions.pod:3595
14216 " mount-9p mounttag mountpoint [options:..]\n"
14221 #: ../fish/guestfish-actions.pod:3597 ../src/guestfs-actions.pod:5582
14223 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
14228 #: ../fish/guestfish-actions.pod:3600 ../src/guestfs-actions.pod:5585
14230 "If required, C<trans=virtio> will be automatically added to the options. "
14231 "Any other options required can be passed in the optional C<options> "
14236 #: ../fish/guestfish-actions.pod:3606
14241 #: ../fish/guestfish-actions.pod:3608
14244 " mount-loop file mountpoint\n"
14249 #: ../fish/guestfish-actions.pod:3610 ../src/guestfs-actions.pod:5624
14251 "This command lets you mount C<file> (a filesystem image in a file) on a "
14252 "mount point. It is entirely equivalent to the command C<mount -o loop file "
14257 #: ../fish/guestfish-actions.pod:3614
14258 msgid "mount-options"
14262 #: ../fish/guestfish-actions.pod:3616
14265 " mount-options options device mountpoint\n"
14270 #: ../fish/guestfish-actions.pod:3618
14272 "This is the same as the L</mount> command, but it allows you to set the "
14273 "mount options as for the L<mount(8)> I<-o> flag."
14277 #: ../fish/guestfish-actions.pod:3622 ../src/guestfs-actions.pod:5644
14279 "If the C<options> parameter is an empty string, then no options are passed "
14280 "(all options default to whatever the filesystem uses)."
14284 #: ../fish/guestfish-actions.pod:3626
14289 #: ../fish/guestfish-actions.pod:3628
14292 " mount-ro device mountpoint\n"
14297 #: ../fish/guestfish-actions.pod:3630
14299 "This is the same as the L</mount> command, but it mounts the filesystem with "
14300 "the read-only (I<-o ro>) flag."
14304 #: ../fish/guestfish-actions.pod:3633
14309 #: ../fish/guestfish-actions.pod:3635
14312 " mount-vfs options vfstype device mountpoint\n"
14317 #: ../fish/guestfish-actions.pod:3637
14319 "This is the same as the L</mount> command, but it allows you to set both the "
14320 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
14324 #: ../fish/guestfish-actions.pod:3641
14325 msgid "mountpoints"
14329 #: ../fish/guestfish-actions.pod:3643
14337 #: ../fish/guestfish-actions.pod:3645
14339 "This call is similar to L</mounts>. That call returns a list of devices. "
14340 "This one returns a hash table (map) of device name to directory where the "
14341 "device is mounted."
14345 #: ../fish/guestfish-actions.pod:3649
14350 #: ../fish/guestfish-actions.pod:3651
14358 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5705
14360 "This returns the list of currently mounted filesystems. It returns the list "
14361 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
14365 #: ../fish/guestfish-actions.pod:3656 ../src/guestfs-actions.pod:5708
14366 msgid "Some internal mounts are not shown."
14370 #: ../fish/guestfish-actions.pod:3658
14371 msgid "See also: L</mountpoints>"
14375 #: ../fish/guestfish-actions.pod:3660
14380 #: ../fish/guestfish-actions.pod:3662
14388 #: ../fish/guestfish-actions.pod:3664 ../src/guestfs-actions.pod:5725
14390 "This moves a file from C<src> to C<dest> where C<dest> is either a "
14391 "destination filename or destination directory."
14395 #: ../fish/guestfish-actions.pod:3667
14396 msgid "ntfs-3g-probe"
14400 #: ../fish/guestfish-actions.pod:3669
14403 " ntfs-3g-probe true|false device\n"
14408 #: ../fish/guestfish-actions.pod:3671 ../src/guestfs-actions.pod:5739
14410 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
14411 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
14412 "write, and some cannot be mounted at all)."
14416 #: ../fish/guestfish-actions.pod:3675 ../src/guestfs-actions.pod:5743
14418 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
14419 "can be mounted read-write. Set it to false if you want to test if the "
14420 "volume can be mounted read-only."
14424 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5747
14426 "The return value is an integer which C<0> if the operation would succeed, or "
14427 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
14431 #: ../fish/guestfish-actions.pod:3683
14436 #: ../fish/guestfish-actions.pod:3685
14439 " ntfsresize device\n"
14444 #: ../fish/guestfish-actions.pod:3687 ../fish/guestfish-actions.pod:3711
14445 #: ../src/guestfs-actions.pod:5768 ../src/guestfs-actions.pod:5800
14447 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
14448 "size of the underlying device."
14452 #: ../fish/guestfish-actions.pod:3690 ../src/guestfs-actions.pod:5771
14454 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
14455 "consistency check (for safety). You have to boot into Windows to perform "
14456 "this check and clear this condition. Furthermore, ntfsresize refuses to "
14457 "resize filesystems which have been marked in this way. So in effect it is "
14458 "not possible to call ntfsresize multiple times on a single filesystem "
14459 "without booting into Windows between each resize."
14463 #: ../fish/guestfish-actions.pod:3698 ../fish/guestfish-actions.pod:3737
14464 #: ../src/guestfs-actions.pod:5779 ../src/guestfs-actions.pod:5826
14465 msgid "See also L<ntfsresize(8)>."
14469 #: ../fish/guestfish-actions.pod:3700 ../fish/guestfish-actions.pod:3748
14471 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
14476 #: ../fish/guestfish-actions.pod:3707
14477 msgid "ntfsresize-opts"
14481 #: ../fish/guestfish-actions.pod:3709
14484 " ntfsresize-opts device [size:N] [force:true|false]\n"
14489 #: ../fish/guestfish-actions.pod:3720 ../src/guestfs-actions.pod:5809
14491 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
14492 "resized to fit the container (eg. partition)."
14496 #: ../fish/guestfish-actions.pod:3723 ../fish/guestfish-actions.pod:5044
14497 #: ../src/guestfs-actions.pod:5812 ../src/guestfs-actions.pod:7783
14502 #: ../fish/guestfish-actions.pod:3725 ../src/guestfs-actions.pod:5814
14504 "If this option is true, then force the resize of the filesystem even if the "
14505 "filesystem is marked as requiring a consistency check."
14509 #: ../fish/guestfish-actions.pod:3728
14511 "After the resize operation, the filesystem is always marked as requiring a "
14512 "consistency check (for safety). You have to boot into Windows to perform "
14513 "this check and clear this condition. If you I<don't> set the C<force> "
14514 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
14515 "a single filesystem without booting into Windows between each resize."
14519 #: ../fish/guestfish-actions.pod:3741
14520 msgid "ntfsresize-size"
14524 #: ../fish/guestfish-actions.pod:3743
14527 " ntfsresize-size device size\n"
14532 #: ../fish/guestfish-actions.pod:3745
14534 "This command is the same as L</ntfsresize> except that it allows you to "
14535 "specify the new size (in bytes) explicitly."
14539 #: ../fish/guestfish-actions.pod:3755
14544 #: ../fish/guestfish-actions.pod:3757
14547 " part-add device prlogex startsect endsect\n"
14552 #: ../fish/guestfish-actions.pod:3759
14554 "This command adds a partition to C<device>. If there is no partition table "
14555 "on the device, call L</part-init> first."
14559 #: ../fish/guestfish-actions.pod:3762 ../src/guestfs-actions.pod:5887
14561 "The C<prlogex> parameter is the type of partition. Normally you should pass "
14562 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
14563 "C<logical>) and C<e> (or C<extended>) partition types."
14567 #: ../fish/guestfish-actions.pod:3767 ../src/guestfs-actions.pod:5892
14569 "C<startsect> and C<endsect> are the start and end of the partition in "
14570 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
14571 "from the end of the disk (C<-1> is the last sector)."
14575 #: ../fish/guestfish-actions.pod:3771
14577 "Creating a partition which covers the whole disk is not so easy. Use L</"
14578 "part-disk> to do that."
14582 #: ../fish/guestfish-actions.pod:3774
14587 #: ../fish/guestfish-actions.pod:3776
14590 " part-del device partnum\n"
14595 #: ../fish/guestfish-actions.pod:3778 ../src/guestfs-actions.pod:5910
14596 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14600 #: ../fish/guestfish-actions.pod:3780 ../src/guestfs-actions.pod:5912
14602 "Note that in the case of MBR partitioning, deleting an extended partition "
14603 "also deletes any logical partitions it contains."
14607 #: ../fish/guestfish-actions.pod:3784
14612 #: ../fish/guestfish-actions.pod:3786
14615 " part-disk device parttype\n"
14620 #: ../fish/guestfish-actions.pod:3788
14622 "This command is simply a combination of L</part-init> followed by L</part-"
14623 "add> to create a single primary partition covering the whole disk."
14627 #: ../fish/guestfish-actions.pod:3792
14629 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14630 "possible values are described in L</part-init>."
14634 #: ../fish/guestfish-actions.pod:3795
14635 msgid "part-get-bootable"
14639 #: ../fish/guestfish-actions.pod:3797
14642 " part-get-bootable device partnum\n"
14647 #: ../fish/guestfish-actions.pod:3799 ../src/guestfs-actions.pod:5945
14649 "This command returns true if the partition C<partnum> on C<device> has the "
14650 "bootable flag set."
14654 #: ../fish/guestfish-actions.pod:3802
14655 msgid "See also L</part-set-bootable>."
14659 #: ../fish/guestfish-actions.pod:3804
14660 msgid "part-get-mbr-id"
14664 #: ../fish/guestfish-actions.pod:3806
14667 " part-get-mbr-id device partnum\n"
14672 #: ../fish/guestfish-actions.pod:3808 ../src/guestfs-actions.pod:5961
14674 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14675 "partition C<partnum>."
14679 #: ../fish/guestfish-actions.pod:3811 ../fish/guestfish-actions.pod:3955
14681 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14682 "undefined results for other partition table types (see L</part-get-"
14687 #: ../fish/guestfish-actions.pod:3815
14688 msgid "part-get-parttype"
14692 #: ../fish/guestfish-actions.pod:3817
14695 " part-get-parttype device\n"
14700 #: ../fish/guestfish-actions.pod:3819 ../src/guestfs-actions.pod:5978
14702 "This command examines the partition table on C<device> and returns the "
14703 "partition table type (format) being used."
14707 #: ../fish/guestfish-actions.pod:3822
14709 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14710 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14711 "possible, although unusual. See L</part-init> for a full list."
14715 #: ../fish/guestfish-actions.pod:3827
14720 #: ../fish/guestfish-actions.pod:3829
14723 " part-init device parttype\n"
14728 #: ../fish/guestfish-actions.pod:3831 ../src/guestfs-actions.pod:5998
14730 "This creates an empty partition table on C<device> of one of the partition "
14731 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14732 "(for large disks)."
14736 #: ../fish/guestfish-actions.pod:3835
14738 "Initially there are no partitions. Following this, you should call L</part-"
14739 "add> for each partition required."
14743 #: ../fish/guestfish-actions.pod:3838 ../src/guestfs-actions.pod:6005
14744 msgid "Possible values for C<parttype> are:"
14748 #: ../fish/guestfish-actions.pod:3842 ../src/guestfs-actions.pod:6009
14753 #: ../fish/guestfish-actions.pod:3844 ../src/guestfs-actions.pod:6011
14758 #: ../fish/guestfish-actions.pod:3846 ../src/guestfs-actions.pod:6013
14759 msgid "Intel EFI / GPT partition table."
14763 #: ../fish/guestfish-actions.pod:3848 ../src/guestfs-actions.pod:6015
14765 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14766 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14767 "the C<mbr> format."
14771 #: ../fish/guestfish-actions.pod:3852 ../src/guestfs-actions.pod:6019
14776 #: ../fish/guestfish-actions.pod:3854 ../src/guestfs-actions.pod:6021
14781 #: ../fish/guestfish-actions.pod:3856 ../src/guestfs-actions.pod:6023
14783 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14784 "Windows. This partition type will B<only> work for device sizes up to 2 "
14785 "TB. For large disks we recommend using C<gpt>."
14789 #: ../fish/guestfish-actions.pod:3863 ../src/guestfs-actions.pod:6030
14791 "Other partition table types that may work but are not supported include:"
14795 #: ../fish/guestfish-actions.pod:3868 ../src/guestfs-actions.pod:6035
14800 #: ../fish/guestfish-actions.pod:3870 ../src/guestfs-actions.pod:6037
14801 msgid "AIX disk labels."
14805 #: ../fish/guestfish-actions.pod:3872 ../src/guestfs-actions.pod:6039
14810 #: ../fish/guestfish-actions.pod:3874 ../src/guestfs-actions.pod:6041
14815 #: ../fish/guestfish-actions.pod:3876 ../src/guestfs-actions.pod:6043
14816 msgid "Amiga \"Rigid Disk Block\" format."
14820 #: ../fish/guestfish-actions.pod:3878 ../src/guestfs-actions.pod:6045
14825 #: ../fish/guestfish-actions.pod:3880 ../src/guestfs-actions.pod:6047
14826 msgid "BSD disk labels."
14830 #: ../fish/guestfish-actions.pod:3882 ../src/guestfs-actions.pod:6049
14835 #: ../fish/guestfish-actions.pod:3884 ../src/guestfs-actions.pod:6051
14836 msgid "DASD, used on IBM mainframes."
14840 #: ../fish/guestfish-actions.pod:3886 ../src/guestfs-actions.pod:6053
14845 #: ../fish/guestfish-actions.pod:3888 ../src/guestfs-actions.pod:6055
14846 msgid "MIPS/SGI volumes."
14850 #: ../fish/guestfish-actions.pod:3890 ../src/guestfs-actions.pod:6057
14855 #: ../fish/guestfish-actions.pod:3892 ../src/guestfs-actions.pod:6059
14856 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14860 #: ../fish/guestfish-actions.pod:3894 ../src/guestfs-actions.pod:6061
14865 #: ../fish/guestfish-actions.pod:3896 ../src/guestfs-actions.pod:6063
14866 msgid "NEC PC-98 format, common in Japan apparently."
14870 #: ../fish/guestfish-actions.pod:3898 ../src/guestfs-actions.pod:6065
14875 #: ../fish/guestfish-actions.pod:3900 ../src/guestfs-actions.pod:6067
14876 msgid "Sun disk labels."
14880 #: ../fish/guestfish-actions.pod:3904
14885 #: ../fish/guestfish-actions.pod:3906
14888 " part-list device\n"
14893 #: ../fish/guestfish-actions.pod:3908 ../src/guestfs-actions.pod:6081
14895 "This command parses the partition table on C<device> and returns the list of "
14896 "partitions found."
14900 #: ../fish/guestfish-actions.pod:3911 ../src/guestfs-actions.pod:6084
14901 msgid "The fields in the returned structure are:"
14905 #: ../fish/guestfish-actions.pod:3915 ../src/guestfs-actions.pod:6088
14906 msgid "B<part_num>"
14910 #: ../fish/guestfish-actions.pod:3917 ../src/guestfs-actions.pod:6090
14911 msgid "Partition number, counting from 1."
14915 #: ../fish/guestfish-actions.pod:3919 ../src/guestfs-actions.pod:6092
14916 msgid "B<part_start>"
14920 #: ../fish/guestfish-actions.pod:3921
14922 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14923 "the device's sector size, see L</blockdev-getss>."
14927 #: ../fish/guestfish-actions.pod:3924 ../src/guestfs-actions.pod:6097
14928 msgid "B<part_end>"
14932 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6099
14933 msgid "End of the partition in bytes."
14937 #: ../fish/guestfish-actions.pod:3928 ../src/guestfs-actions.pod:6101
14938 msgid "B<part_size>"
14942 #: ../fish/guestfish-actions.pod:3930 ../src/guestfs-actions.pod:6103
14943 msgid "Size of the partition in bytes."
14947 #: ../fish/guestfish-actions.pod:3934
14948 msgid "part-set-bootable"
14952 #: ../fish/guestfish-actions.pod:3936
14955 " part-set-bootable device partnum true|false\n"
14960 #: ../fish/guestfish-actions.pod:3938 ../src/guestfs-actions.pod:6121
14962 "This sets the bootable flag on partition numbered C<partnum> on device "
14963 "C<device>. Note that partitions are numbered from 1."
14967 #: ../fish/guestfish-actions.pod:3941 ../src/guestfs-actions.pod:6124
14969 "The bootable flag is used by some operating systems (notably Windows) to "
14970 "determine which partition to boot from. It is by no means universally "
14975 #: ../fish/guestfish-actions.pod:3945
14976 msgid "part-set-mbr-id"
14980 #: ../fish/guestfish-actions.pod:3947
14983 " part-set-mbr-id device partnum idbyte\n"
14988 #: ../fish/guestfish-actions.pod:3949 ../src/guestfs-actions.pod:6140
14990 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14991 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14992 "documentation are in fact hexadecimal numbers, but usually documented "
14993 "without any leading \"0x\" which might be confusing."
14997 #: ../fish/guestfish-actions.pod:3959
14998 msgid "part-set-name"
15002 #: ../fish/guestfish-actions.pod:3961
15005 " part-set-name device partnum name\n"
15010 #: ../fish/guestfish-actions.pod:3963 ../src/guestfs-actions.pod:6162
15012 "This sets the partition name on partition numbered C<partnum> on device "
15013 "C<device>. Note that partitions are numbered from 1."
15017 #: ../fish/guestfish-actions.pod:3966 ../src/guestfs-actions.pod:6165
15019 "The partition name can only be set on certain types of partition table. "
15020 "This works on C<gpt> but not on C<mbr> partitions."
15024 #: ../fish/guestfish-actions.pod:3969
15025 msgid "part-to-dev"
15029 #: ../fish/guestfish-actions.pod:3971
15032 " part-to-dev partition\n"
15037 #: ../fish/guestfish-actions.pod:3973 ../src/guestfs-actions.pod:6178
15039 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
15040 "partition number, returning the device name (eg. \"/dev/sdb\")."
15044 #: ../fish/guestfish-actions.pod:3977 ../fish/guestfish-actions.pod:3989
15046 "The named partition must exist, for example as a string returned from L</"
15047 "list-partitions>."
15051 #: ../fish/guestfish-actions.pod:3980
15052 msgid "See also L</part-to-partnum>."
15056 #: ../fish/guestfish-actions.pod:3982
15057 msgid "part-to-partnum"
15061 #: ../fish/guestfish-actions.pod:3984
15064 " part-to-partnum partition\n"
15069 #: ../fish/guestfish-actions.pod:3986 ../src/guestfs-actions.pod:6198
15071 "This function takes a partition name (eg. \"/dev/sdb1\") and returns the "
15072 "partition number (eg. C<1>)."
15076 #: ../fish/guestfish-actions.pod:3992
15077 msgid "See also L</part-to-dev>."
15081 #: ../fish/guestfish-actions.pod:3994
15082 msgid "ping-daemon"
15086 #: ../fish/guestfish-actions.pod:3996
15094 #: ../fish/guestfish-actions.pod:3998 ../src/guestfs-actions.pod:6215
15096 "This is a test probe into the guestfs daemon running inside the qemu "
15097 "subprocess. Calling this function checks that the daemon responds to the "
15098 "ping message, without affecting the daemon or attached block device(s) in "
15103 #: ../fish/guestfish-actions.pod:4003
15108 #: ../fish/guestfish-actions.pod:4005
15111 " pread path count offset\n"
15116 #: ../fish/guestfish-actions.pod:4007 ../src/guestfs-actions.pod:6233
15118 "This command lets you read part of a file. It reads C<count> bytes of the "
15119 "file, starting at C<offset>, from file C<path>."
15123 #: ../fish/guestfish-actions.pod:4010 ../fish/guestfish-actions.pod:4025
15124 #: ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6262
15126 "This may read fewer bytes than requested. For further details see the "
15127 "L<pread(2)> system call."
15131 #: ../fish/guestfish-actions.pod:4013
15132 msgid "See also L</pwrite>, L</pread-device>."
15136 #: ../fish/guestfish-actions.pod:4018
15137 msgid "pread-device"
15141 #: ../fish/guestfish-actions.pod:4020
15144 " pread-device device count offset\n"
15149 #: ../fish/guestfish-actions.pod:4022 ../src/guestfs-actions.pod:6259
15151 "This command lets you read part of a file. It reads C<count> bytes of "
15152 "C<device>, starting at C<offset>."
15156 #: ../fish/guestfish-actions.pod:4028
15157 msgid "See also L</pread>."
15161 #: ../fish/guestfish-actions.pod:4033
15166 #: ../fish/guestfish-actions.pod:4035
15169 " pvcreate device\n"
15174 #: ../fish/guestfish-actions.pod:4037 ../src/guestfs-actions.pod:6282
15176 "This creates an LVM physical volume on the named C<device>, where C<device> "
15177 "should usually be a partition name such as C</dev/sda1>."
15181 #: ../fish/guestfish-actions.pod:4041
15186 #: ../fish/guestfish-actions.pod:4043
15189 " pvremove device\n"
15194 #: ../fish/guestfish-actions.pod:4045 ../src/guestfs-actions.pod:6296
15196 "This wipes a physical volume C<device> so that LVM will no longer recognise "
15201 #: ../fish/guestfish-actions.pod:4048 ../src/guestfs-actions.pod:6299
15203 "The implementation uses the C<pvremove> command which refuses to wipe "
15204 "physical volumes that contain any volume groups, so you have to remove those "
15209 #: ../fish/guestfish-actions.pod:4052
15214 #: ../fish/guestfish-actions.pod:4054
15217 " pvresize device\n"
15222 #: ../fish/guestfish-actions.pod:4056 ../src/guestfs-actions.pod:6313
15224 "This resizes (expands or shrinks) an existing LVM physical volume to match "
15225 "the new size of the underlying device."
15229 #: ../fish/guestfish-actions.pod:4059
15230 msgid "pvresize-size"
15234 #: ../fish/guestfish-actions.pod:4061
15237 " pvresize-size device size\n"
15242 #: ../fish/guestfish-actions.pod:4063
15244 "This command is the same as L</pvresize> except that it allows you to "
15245 "specify the new size (in bytes) explicitly."
15249 #: ../fish/guestfish-actions.pod:4066
15254 #: ../fish/guestfish-actions.pod:4068
15262 #: ../fish/guestfish-actions.pod:4070 ../src/guestfs-actions.pod:6339
15264 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15269 #: ../fish/guestfish-actions.pod:4073 ../src/guestfs-actions.pod:6342
15271 "This returns a list of just the device names that contain PVs (eg. C</dev/"
15276 #: ../fish/guestfish-actions.pod:4076
15277 msgid "See also L</pvs-full>."
15281 #: ../fish/guestfish-actions.pod:4078
15286 #: ../fish/guestfish-actions.pod:4080
15294 #: ../fish/guestfish-actions.pod:4082 ../src/guestfs-actions.pod:6358
15296 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15297 "(8)> command. The \"full\" version includes all fields."
15301 #: ../fish/guestfish-actions.pod:4085
15306 #: ../fish/guestfish-actions.pod:4087
15314 #: ../fish/guestfish-actions.pod:4089 ../src/guestfs-actions.pod:6373
15315 msgid "This command returns the UUID of the LVM PV C<device>."
15319 #: ../fish/guestfish-actions.pod:4091
15324 #: ../fish/guestfish-actions.pod:4093
15327 " pwrite path content offset\n"
15332 #: ../fish/guestfish-actions.pod:4095 ../src/guestfs-actions.pod:6389
15334 "This command writes to part of a file. It writes the data buffer C<content> "
15335 "to the file C<path> starting at offset C<offset>."
15339 #: ../fish/guestfish-actions.pod:4098 ../src/guestfs-actions.pod:6392
15341 "This command implements the L<pwrite(2)> system call, and like that system "
15342 "call it may not write the full data requested. The return value is the "
15343 "number of bytes that were actually written to the file. This could even be "
15344 "0, although short writes are unlikely for regular files in ordinary "
15349 #: ../fish/guestfish-actions.pod:4104
15350 msgid "See also L</pread>, L</pwrite-device>."
15354 #: ../fish/guestfish-actions.pod:4109
15355 msgid "pwrite-device"
15359 #: ../fish/guestfish-actions.pod:4111
15362 " pwrite-device device content offset\n"
15367 #: ../fish/guestfish-actions.pod:4113 ../src/guestfs-actions.pod:6416
15369 "This command writes to part of a device. It writes the data buffer "
15370 "C<content> to C<device> starting at offset C<offset>."
15374 #: ../fish/guestfish-actions.pod:4116 ../src/guestfs-actions.pod:6419
15376 "This command implements the L<pwrite(2)> system call, and like that system "
15377 "call it may not write the full data requested (although short writes to disk "
15378 "devices and partitions are probably impossible with standard Linux kernels)."
15382 #: ../fish/guestfish-actions.pod:4121
15383 msgid "See also L</pwrite>."
15387 #: ../fish/guestfish-actions.pod:4126
15392 #: ../fish/guestfish-actions.pod:4128
15395 " read-file path\n"
15400 #: ../fish/guestfish-actions.pod:4130 ../src/guestfs-actions.pod:6440
15401 msgid "This calls returns the contents of the file C<path> as a buffer."
15405 #: ../fish/guestfish-actions.pod:4133
15407 "Unlike L</cat>, this function can correctly handle files that contain "
15408 "embedded ASCII NUL characters. However unlike L</download>, this function "
15409 "is limited in the total size of file that can be handled."
15413 #: ../fish/guestfish-actions.pod:4141
15418 #: ../fish/guestfish-actions.pod:4143
15421 " read-lines path\n"
15426 #: ../fish/guestfish-actions.pod:4147 ../src/guestfs-actions.pod:6465
15428 "The file contents are returned as a list of lines. Trailing C<LF> and "
15429 "C<CRLF> character sequences are I<not> returned."
15433 #: ../fish/guestfish-actions.pod:4150
15435 "Note that this function cannot correctly handle binary files (specifically, "
15436 "files containing C<\\0> character which is treated as end of line). For "
15437 "those you need to use the L</read-file> function which has a more complex "
15442 #: ../fish/guestfish-actions.pod:4155
15447 #: ../fish/guestfish-actions.pod:4157
15455 #: ../fish/guestfish-actions.pod:4159 ../src/guestfs-actions.pod:6485
15456 msgid "This returns the list of directory entries in directory C<dir>."
15460 #: ../fish/guestfish-actions.pod:4161 ../src/guestfs-actions.pod:6487
15462 "All entries in the directory are returned, including C<.> and C<..>. The "
15463 "entries are I<not> sorted, but returned in the same order as the underlying "
15468 #: ../fish/guestfish-actions.pod:4165 ../src/guestfs-actions.pod:6491
15470 "Also this call returns basic file type information about each file. The "
15471 "C<ftyp> field will contain one of the following characters:"
15475 #: ../fish/guestfish-actions.pod:4170 ../src/guestfs-actions.pod:6496
15480 #: ../fish/guestfish-actions.pod:4172 ../src/guestfs-actions.pod:6498
15481 msgid "Block special"
15485 #: ../fish/guestfish-actions.pod:4174 ../src/guestfs-actions.pod:6500
15490 #: ../fish/guestfish-actions.pod:4176 ../src/guestfs-actions.pod:6502
15491 msgid "Char special"
15495 #: ../fish/guestfish-actions.pod:4178 ../src/guestfs-actions.pod:6504
15500 #: ../fish/guestfish-actions.pod:4180 ../src/guestfs-actions.pod:6506
15505 #: ../fish/guestfish-actions.pod:4182 ../src/guestfs-actions.pod:6508
15510 #: ../fish/guestfish-actions.pod:4184 ../src/guestfs-actions.pod:6510
15511 msgid "FIFO (named pipe)"
15515 #: ../fish/guestfish-actions.pod:4186 ../src/guestfs-actions.pod:6512
15520 #: ../fish/guestfish-actions.pod:4188 ../src/guestfs-actions.pod:6514
15521 msgid "Symbolic link"
15525 #: ../fish/guestfish-actions.pod:4190 ../src/guestfs-actions.pod:6516
15530 #: ../fish/guestfish-actions.pod:4192 ../src/guestfs-actions.pod:6518
15531 msgid "Regular file"
15535 #: ../fish/guestfish-actions.pod:4194 ../src/guestfs-actions.pod:6520
15540 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6522
15545 #: ../fish/guestfish-actions.pod:4198 ../src/guestfs-actions.pod:6524
15550 #: ../fish/guestfish-actions.pod:4200 ../src/guestfs-actions.pod:6526
15551 msgid "Unknown file type"
15555 #: ../fish/guestfish-actions.pod:4202 ../src/guestfs-actions.pod:6528
15560 #: ../fish/guestfish-actions.pod:4204 ../src/guestfs-actions.pod:6530
15562 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
15566 #: ../fish/guestfish-actions.pod:4209
15568 "This function is primarily intended for use by programs. To get a simple "
15569 "list of names, use L</ls>. To get a printable directory for human "
15570 "consumption, use L</ll>."
15574 #: ../fish/guestfish-actions.pod:4213
15579 #: ../fish/guestfish-actions.pod:4215
15587 #: ../fish/guestfish-actions.pod:4217 ../src/guestfs-actions.pod:6551
15588 msgid "This command reads the target of a symbolic link."
15592 #: ../fish/guestfish-actions.pod:4219
15593 msgid "readlinklist"
15597 #: ../fish/guestfish-actions.pod:4221
15600 " readlinklist path 'names ...'\n"
15605 #: ../fish/guestfish-actions.pod:4223 ../src/guestfs-actions.pod:6565
15607 "This call allows you to do a C<readlink> operation on multiple files, where "
15608 "all files are in the directory C<path>. C<names> is the list of files from "
15613 #: ../fish/guestfish-actions.pod:4227 ../src/guestfs-actions.pod:6569
15615 "On return you get a list of strings, with a one-to-one correspondence to the "
15616 "C<names> list. Each string is the value of the symbolic link."
15620 #: ../fish/guestfish-actions.pod:4231 ../src/guestfs-actions.pod:6573
15622 "If the C<readlink(2)> operation fails on any name, then the corresponding "
15623 "result string is the empty string C<\"\">. However the whole operation is "
15624 "completed even if there were C<readlink(2)> errors, and so you can call this "
15625 "function with names where you don't know if they are symbolic links already "
15626 "(albeit slightly less efficient)."
15630 #: ../fish/guestfish-actions.pod:4238 ../src/guestfs-actions.pod:6580
15632 "This call is intended for programs that want to efficiently list a directory "
15633 "contents without making many round-trips. Very long directory listings "
15634 "might cause the protocol message size to be exceeded, causing this call to "
15635 "fail. The caller must split up such requests into smaller groups of names."
15639 #: ../fish/guestfish-actions.pod:4245
15644 #: ../fish/guestfish-actions.pod:4247
15652 #: ../fish/guestfish-actions.pod:4249 ../src/guestfs-actions.pod:6599
15654 "Return the canonicalized absolute pathname of C<path>. The returned path "
15655 "has no C<.>, C<..> or symbolic link path elements."
15659 #: ../fish/guestfish-actions.pod:4252
15660 msgid "removexattr"
15664 #: ../fish/guestfish-actions.pod:4254
15667 " removexattr xattr path\n"
15672 #: ../fish/guestfish-actions.pod:4256 ../src/guestfs-actions.pod:6614
15674 "This call removes the extended attribute named C<xattr> of the file C<path>."
15678 #: ../fish/guestfish-actions.pod:4259
15679 msgid "See also: L</lremovexattr>, L<attr(5)>."
15683 #: ../fish/guestfish-actions.pod:4261
15688 #: ../fish/guestfish-actions.pod:4263
15691 " resize2fs device\n"
15696 #: ../fish/guestfish-actions.pod:4265 ../src/guestfs-actions.pod:6629
15698 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15699 "underlying device."
15703 #: ../fish/guestfish-actions.pod:4268
15705 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
15706 "before calling this command. For unknown reasons C<resize2fs> sometimes "
15707 "gives an error about this and sometimes not. In any case, it is always safe "
15708 "to call L</e2fsck-f> before calling this function."
15712 #: ../fish/guestfish-actions.pod:4274
15713 msgid "resize2fs-M"
15717 #: ../fish/guestfish-actions.pod:4276
15720 " resize2fs-M device\n"
15725 #: ../fish/guestfish-actions.pod:4278
15727 "This command is the same as L</resize2fs>, but the filesystem is resized to "
15728 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
15733 #: ../fish/guestfish-actions.pod:4282
15735 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
15736 "and read the C<Block size> and C<Block count> values. These two numbers, "
15737 "multiplied together, give the resulting size of the minimal filesystem in "
15742 #: ../fish/guestfish-actions.pod:4287
15743 msgid "resize2fs-size"
15747 #: ../fish/guestfish-actions.pod:4289
15750 " resize2fs-size device size\n"
15755 #: ../fish/guestfish-actions.pod:4291
15757 "This command is the same as L</resize2fs> except that it allows you to "
15758 "specify the new size (in bytes) explicitly."
15762 #: ../fish/guestfish-actions.pod:4294
15767 #: ../fish/guestfish-actions.pod:4296
15775 #: ../fish/guestfish-actions.pod:4298 ../src/guestfs-actions.pod:6681
15776 msgid "Remove the single file C<path>."
15780 #: ../fish/guestfish-actions.pod:4300
15785 #: ../fish/guestfish-actions.pod:4302
15793 #: ../fish/guestfish-actions.pod:4304 ../src/guestfs-actions.pod:6693
15795 "Remove the file or directory C<path>, recursively removing the contents if "
15796 "its a directory. This is like the C<rm -rf> shell command."
15800 #: ../fish/guestfish-actions.pod:4308
15805 #: ../fish/guestfish-actions.pod:4310
15813 #: ../fish/guestfish-actions.pod:4312 ../src/guestfs-actions.pod:6707
15814 msgid "Remove the single directory C<path>."
15818 #: ../fish/guestfish-actions.pod:4314
15819 msgid "rmmountpoint"
15823 #: ../fish/guestfish-actions.pod:4316
15826 " rmmountpoint exemptpath\n"
15831 #: ../fish/guestfish-actions.pod:4318
15833 "This calls removes a mountpoint that was previously created with L</"
15834 "mkmountpoint>. See L</mkmountpoint> for full details."
15838 #: ../fish/guestfish-actions.pod:4322
15839 msgid "scrub-device"
15843 #: ../fish/guestfish-actions.pod:4324
15846 " scrub-device device\n"
15851 #: ../fish/guestfish-actions.pod:4326 ../src/guestfs-actions.pod:6733
15853 "This command writes patterns over C<device> to make data retrieval more "
15858 #: ../fish/guestfish-actions.pod:4329 ../fish/guestfish-actions.pod:4341
15859 #: ../fish/guestfish-actions.pod:4354 ../src/guestfs-actions.pod:6736
15860 #: ../src/guestfs-actions.pod:6754 ../src/guestfs-actions.pod:6773
15862 "It is an interface to the L<scrub(1)> program. See that manual page for "
15867 #: ../fish/guestfish-actions.pod:4332
15872 #: ../fish/guestfish-actions.pod:4334
15875 " scrub-file file\n"
15880 #: ../fish/guestfish-actions.pod:4336 ../src/guestfs-actions.pod:6749
15882 "This command writes patterns over a file to make data retrieval more "
15887 #: ../fish/guestfish-actions.pod:4339 ../src/guestfs-actions.pod:6752
15888 msgid "The file is I<removed> after scrubbing."
15892 #: ../fish/guestfish-actions.pod:4344
15893 msgid "scrub-freespace"
15897 #: ../fish/guestfish-actions.pod:4346
15900 " scrub-freespace dir\n"
15905 #: ../fish/guestfish-actions.pod:4348
15907 "This command creates the directory C<dir> and then fills it with files until "
15908 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
15909 "deletes them. The intention is to scrub any free space on the partition "
15910 "containing C<dir>."
15914 #: ../fish/guestfish-actions.pod:4357
15919 #: ../fish/guestfish-actions.pod:4359
15924 #: ../fish/guestfish-actions.pod:4361
15927 " set-append append\n"
15932 #: ../fish/guestfish-actions.pod:4363 ../src/guestfs-actions.pod:6786
15934 "This function is used to add additional options to the guest kernel command "
15939 #: ../fish/guestfish-actions.pod:4366 ../src/guestfs-actions.pod:6789
15941 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15942 "environment variable."
15946 #: ../fish/guestfish-actions.pod:4369 ../src/guestfs-actions.pod:6792
15948 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15949 "(libguestfs always adds a few of its own)."
15953 #: ../fish/guestfish-actions.pod:4372
15954 msgid "set-attach-method"
15958 #: ../fish/guestfish-actions.pod:4374
15959 msgid "attach-method"
15963 #: ../fish/guestfish-actions.pod:4376
15966 " set-attach-method attachmethod\n"
15971 #: ../fish/guestfish-actions.pod:4378 ../src/guestfs-actions.pod:6805
15973 "Set the method that libguestfs uses to connect to the back end guestfsd "
15974 "daemon. Possible methods are:"
15978 #: ../fish/guestfish-actions.pod:4383 ../src/guestfs-actions.pod:6810
15979 #: ../src/guestfs.pod:2916
15980 msgid "C<appliance>"
15984 #: ../fish/guestfish-actions.pod:4385 ../src/guestfs-actions.pod:6812
15986 "Launch an appliance and connect to it. This is the ordinary method and the "
15991 #: ../fish/guestfish-actions.pod:4388 ../src/guestfs-actions.pod:6815
15992 msgid "C<unix:I<path>>"
15996 #: ../fish/guestfish-actions.pod:4390 ../src/guestfs-actions.pod:6817
15997 msgid "Connect to the Unix domain socket I<path>."
16001 #: ../fish/guestfish-actions.pod:4392 ../src/guestfs-actions.pod:6819
16003 "This method lets you connect to an existing daemon or (using virtio-serial) "
16004 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
16005 "RUNNING DAEMONS>."
16009 #: ../fish/guestfish-actions.pod:4398
16010 msgid "set-autosync"
16014 #: ../fish/guestfish-actions.pod:4400
16019 #: ../fish/guestfish-actions.pod:4402
16022 " set-autosync true|false\n"
16027 #: ../fish/guestfish-actions.pod:4404 ../src/guestfs-actions.pod:6835
16029 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
16030 "effort attempt to make filesystems consistent and synchronized when the "
16031 "handle is closed (also if the program exits without closing handles)."
16035 #: ../fish/guestfish-actions.pod:4409 ../src/guestfs-actions.pod:6840
16037 "This is enabled by default (since libguestfs 1.5.24, previously it was "
16038 "disabled by default)."
16042 #: ../fish/guestfish-actions.pod:4412
16047 #: ../fish/guestfish-actions.pod:4414
16052 #: ../fish/guestfish-actions.pod:4416
16055 " set-direct true|false\n"
16060 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6853
16062 "If the direct appliance mode flag is enabled, then stdin and stdout are "
16063 "passed directly through to the appliance once it is launched."
16067 #: ../fish/guestfish-actions.pod:4422
16069 "One consequence of this is that log messages aren't caught by the library "
16070 "and handled by L</set-log-message-callback>, but go straight to stdout."
16074 #: ../fish/guestfish-actions.pod:4426 ../src/guestfs-actions.pod:6861
16075 msgid "You probably don't want to use this unless you know what you are doing."
16079 #: ../fish/guestfish-actions.pod:4429 ../src/guestfs-actions.pod:6864
16080 msgid "The default is disabled."
16084 #: ../fish/guestfish-actions.pod:4431
16085 msgid "set-e2label"
16089 #: ../fish/guestfish-actions.pod:4433
16092 " set-e2label device label\n"
16097 #: ../fish/guestfish-actions.pod:4435 ../src/guestfs-actions.pod:6877
16099 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
16100 "C<label>. Filesystem labels are limited to 16 characters."
16104 #: ../fish/guestfish-actions.pod:4439
16106 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
16107 "label on a filesystem."
16111 #: ../fish/guestfish-actions.pod:4442
16116 #: ../fish/guestfish-actions.pod:4444
16119 " set-e2uuid device uuid\n"
16124 #: ../fish/guestfish-actions.pod:4446 ../src/guestfs-actions.pod:6895
16126 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
16127 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
16128 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
16132 #: ../fish/guestfish-actions.pod:4451
16134 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
16135 "UUID of a filesystem."
16139 #: ../fish/guestfish-actions.pod:4454
16140 msgid "set-memsize"
16144 #: ../fish/guestfish-actions.pod:4456
16149 #: ../fish/guestfish-actions.pod:4458
16152 " set-memsize memsize\n"
16157 #: ../fish/guestfish-actions.pod:4460
16159 "This sets the memory size in megabytes allocated to the qemu subprocess. "
16160 "This only has any effect if called before L</launch>."
16164 #: ../fish/guestfish-actions.pod:4464 ../src/guestfs-actions.pod:6917
16166 "You can also change this by setting the environment variable "
16167 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
16171 #: ../fish/guestfish-actions.pod:4471
16172 msgid "set-network"
16176 #: ../fish/guestfish-actions.pod:4473
16181 #: ../fish/guestfish-actions.pod:4475
16184 " set-network true|false\n"
16189 #: ../fish/guestfish-actions.pod:4477 ../src/guestfs-actions.pod:6934
16191 "If C<network> is true, then the network is enabled in the libguestfs "
16192 "appliance. The default is false."
16196 #: ../fish/guestfish-actions.pod:4480 ../src/guestfs-actions.pod:6937
16198 "This affects whether commands are able to access the network (see L<guestfs"
16199 "(3)/RUNNING COMMANDS>)."
16203 #: ../fish/guestfish-actions.pod:4483
16205 "You must call this before calling L</launch>, otherwise it has no effect."
16209 #: ../fish/guestfish-actions.pod:4486
16214 #: ../fish/guestfish-actions.pod:4490
16217 " set-path searchpath\n"
16222 #: ../fish/guestfish-actions.pod:4492 ../src/guestfs-actions.pod:6953
16223 msgid "Set the path that libguestfs searches for kernel and initrd.img."
16227 #: ../fish/guestfish-actions.pod:4494 ../src/guestfs-actions.pod:6955
16229 "The default is C<$libdir/guestfs> unless overridden by setting "
16230 "C<LIBGUESTFS_PATH> environment variable."
16234 #: ../fish/guestfish-actions.pod:4497 ../src/guestfs-actions.pod:6958
16235 msgid "Setting C<path> to C<NULL> restores the default path."
16239 #: ../fish/guestfish-actions.pod:4499
16244 #: ../fish/guestfish-actions.pod:4501
16249 #: ../fish/guestfish-actions.pod:4503
16252 " set-pgroup true|false\n"
16257 #: ../fish/guestfish-actions.pod:4505 ../src/guestfs-actions.pod:6970
16259 "If C<pgroup> is true, child processes are placed into their own process "
16264 #: ../fish/guestfish-actions.pod:4508 ../src/guestfs-actions.pod:6973
16266 "The practical upshot of this is that signals like C<SIGINT> (from users "
16267 "pressing C<^C>) won't be received by the child process."
16271 #: ../fish/guestfish-actions.pod:4511 ../src/guestfs-actions.pod:6976
16273 "The default for this flag is false, because usually you want C<^C> to kill "
16278 #: ../fish/guestfish-actions.pod:4514
16283 #: ../fish/guestfish-actions.pod:4516
16288 #: ../fish/guestfish-actions.pod:4518
16296 #: ../fish/guestfish-actions.pod:4520 ../src/guestfs-actions.pod:6989
16297 msgid "Set the qemu binary that we will use."
16301 #: ../fish/guestfish-actions.pod:4522 ../src/guestfs-actions.pod:6991
16303 "The default is chosen when the library was compiled by the configure script."
16307 #: ../fish/guestfish-actions.pod:4525 ../src/guestfs-actions.pod:6994
16309 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
16314 #: ../fish/guestfish-actions.pod:4528 ../src/guestfs-actions.pod:6997
16315 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
16319 #: ../fish/guestfish-actions.pod:4530 ../src/guestfs-actions.pod:6999
16321 "Note that you should call this function as early as possible after creating "
16322 "the handle. This is because some pre-launch operations depend on testing "
16323 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
16324 "don't retest features, and so you might see inconsistent results. Using the "
16325 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
16326 "the qemu binary at the same time as the handle is created."
16330 #: ../fish/guestfish-actions.pod:4538
16331 msgid "set-recovery-proc"
16335 #: ../fish/guestfish-actions.pod:4540
16336 msgid "recovery-proc"
16340 #: ../fish/guestfish-actions.pod:4542
16343 " set-recovery-proc true|false\n"
16348 #: ../fish/guestfish-actions.pod:4544
16350 "If this is called with the parameter C<false> then L</launch> does not "
16351 "create a recovery process. The purpose of the recovery process is to stop "
16352 "runaway qemu processes in the case where the main program aborts abruptly."
16356 #: ../fish/guestfish-actions.pod:4549
16358 "This only has any effect if called before L</launch>, and the default is "
16363 #: ../fish/guestfish-actions.pod:4552 ../src/guestfs-actions.pod:7025
16365 "About the only time when you would want to disable this is if the main "
16366 "process will fork itself into the background (\"daemonize\" itself). In "
16367 "this case the recovery process thinks that the main program has disappeared "
16368 "and so kills qemu, which is not very helpful."
16372 #: ../fish/guestfish-actions.pod:4558
16373 msgid "set-selinux"
16377 #: ../fish/guestfish-actions.pod:4560
16382 #: ../fish/guestfish-actions.pod:4562
16385 " set-selinux true|false\n"
16390 #: ../fish/guestfish-actions.pod:4564 ../src/guestfs-actions.pod:7041
16392 "This sets the selinux flag that is passed to the appliance at boot time. "
16393 "The default is C<selinux=0> (disabled)."
16397 #: ../fish/guestfish-actions.pod:4567 ../src/guestfs-actions.pod:7044
16399 "Note that if SELinux is enabled, it is always in Permissive mode "
16400 "(C<enforcing=0>)."
16404 #: ../fish/guestfish-actions.pod:4573
16409 #: ../fish/guestfish-actions.pod:4575
16414 #: ../fish/guestfish-actions.pod:4577
16422 #: ../fish/guestfish-actions.pod:4579 ../src/guestfs-actions.pod:7060
16424 "Change the number of virtual CPUs assigned to the appliance. The default is "
16425 "C<1>. Increasing this may improve performance, though often it has no "
16430 #: ../fish/guestfish-actions.pod:4583
16431 msgid "This function must be called before L</launch>."
16435 #: ../fish/guestfish-actions.pod:4585
16440 #: ../fish/guestfish-actions.pod:4587
16445 #: ../fish/guestfish-actions.pod:4589
16448 " set-trace true|false\n"
16453 #: ../fish/guestfish-actions.pod:4591 ../src/guestfs-actions.pod:7076
16455 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
16456 "return values are traced."
16460 #: ../fish/guestfish-actions.pod:4594 ../src/guestfs-actions.pod:7079
16462 "If you want to trace C API calls into libguestfs (and other libraries) then "
16463 "possibly a better way is to use the external ltrace(1) command."
16467 #: ../fish/guestfish-actions.pod:4598 ../src/guestfs-actions.pod:7083
16469 "Command traces are disabled unless the environment variable "
16470 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
16474 #: ../fish/guestfish-actions.pod:4601
16476 "Trace messages are normally sent to C<stderr>, unless you register a "
16477 "callback to send them somewhere else (see L</set-event-callback>)."
16481 #: ../fish/guestfish-actions.pod:4605
16482 msgid "set-verbose"
16486 #: ../fish/guestfish-actions.pod:4607
16491 #: ../fish/guestfish-actions.pod:4609
16494 " set-verbose true|false\n"
16499 #: ../fish/guestfish-actions.pod:4611 ../src/guestfs-actions.pod:7100
16500 msgid "If C<verbose> is true, this turns on verbose messages."
16504 #: ../fish/guestfish-actions.pod:4613 ../src/guestfs-actions.pod:7102
16506 "Verbose messages are disabled unless the environment variable "
16507 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
16511 #: ../fish/guestfish-actions.pod:4616
16513 "Verbose messages are normally sent to C<stderr>, unless you register a "
16514 "callback to send them somewhere else (see L</set-event-callback>)."
16518 #: ../fish/guestfish-actions.pod:4620
16523 #: ../fish/guestfish-actions.pod:4622
16526 " setcon context\n"
16531 #: ../fish/guestfish-actions.pod:4624 ../src/guestfs-actions.pod:7119
16533 "This sets the SELinux security context of the daemon to the string "
16538 #: ../fish/guestfish-actions.pod:4627 ../src/guestfs-actions.pod:7122
16539 msgid "See the documentation about SELINUX in L<guestfs(3)>."
16543 #: ../fish/guestfish-actions.pod:4629
16548 #: ../fish/guestfish-actions.pod:4631
16551 " setxattr xattr val vallen path\n"
16556 #: ../fish/guestfish-actions.pod:4633 ../src/guestfs-actions.pod:7137
16558 "This call sets the extended attribute named C<xattr> of the file C<path> to "
16559 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
16563 #: ../fish/guestfish-actions.pod:4637
16564 msgid "See also: L</lsetxattr>, L<attr(5)>."
16568 #: ../fish/guestfish-actions.pod:4639
16573 #: ../fish/guestfish-actions.pod:4641
16576 " sfdisk device cyls heads sectors 'lines ...'\n"
16581 #: ../fish/guestfish-actions.pod:4643 ../src/guestfs-actions.pod:7164
16583 "This is a direct interface to the L<sfdisk(8)> program for creating "
16584 "partitions on block devices."
16588 #: ../fish/guestfish-actions.pod:4646 ../src/guestfs-actions.pod:7167
16589 msgid "C<device> should be a block device, for example C</dev/sda>."
16593 #: ../fish/guestfish-actions.pod:4648 ../src/guestfs-actions.pod:7169
16595 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
16596 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
16597 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
16598 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
16599 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
16600 "the kernel) cannot work out the right geometry and you will need to tell it."
16604 #: ../fish/guestfish-actions.pod:4656 ../src/guestfs-actions.pod:7177
16606 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
16607 "refer to the L<sfdisk(8)> manpage."
16611 #: ../fish/guestfish-actions.pod:4659 ../src/guestfs-actions.pod:7180
16613 "To create a single partition occupying the whole disk, you would pass "
16614 "C<lines> as a single element list, when the single element being the string "
16619 #: ../fish/guestfish-actions.pod:4663
16620 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
16624 #: ../fish/guestfish-actions.pod:4666 ../fish/guestfish-actions.pod:4686
16625 #: ../fish/guestfish-actions.pod:4705
16627 "I<This function is deprecated.> In new code, use the L</part_add> call "
16632 #: ../fish/guestfish-actions.pod:4673
16637 #: ../fish/guestfish-actions.pod:4675
16640 " sfdiskM device 'lines ...'\n"
16645 #: ../fish/guestfish-actions.pod:4677
16647 "This is a simplified interface to the L</sfdisk> command, where partition "
16648 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
16649 "you don't need to specify the cyls, heads and sectors parameters which were "
16650 "rarely if ever used anyway."
16654 #: ../fish/guestfish-actions.pod:4683
16655 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
16659 #: ../fish/guestfish-actions.pod:4693
16664 #: ../fish/guestfish-actions.pod:4695
16667 " sfdisk-N device partnum cyls heads sectors line\n"
16672 #: ../fish/guestfish-actions.pod:4697 ../src/guestfs-actions.pod:7236
16674 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
16675 "(note: C<n> counts from 1)."
16679 #: ../fish/guestfish-actions.pod:4700
16681 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
16682 "cyls/heads/sectors parameters."
16686 #: ../fish/guestfish-actions.pod:4703
16687 msgid "See also: L</part-add>"
16691 #: ../fish/guestfish-actions.pod:4712
16692 msgid "sfdisk-disk-geometry"
16696 #: ../fish/guestfish-actions.pod:4714
16699 " sfdisk-disk-geometry device\n"
16704 #: ../fish/guestfish-actions.pod:4716
16706 "This displays the disk geometry of C<device> read from the partition table. "
16707 "Especially in the case where the underlying block device has been resized, "
16708 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
16709 "kernel-geometry>)."
16713 #: ../fish/guestfish-actions.pod:4721 ../fish/guestfish-actions.pod:4730
16714 #: ../src/guestfs-actions.pod:7259 ../src/guestfs-actions.pod:7275
16715 msgid "The result is in human-readable format, and not designed to be parsed."
16719 #: ../fish/guestfish-actions.pod:4724
16720 msgid "sfdisk-kernel-geometry"
16724 #: ../fish/guestfish-actions.pod:4726
16727 " sfdisk-kernel-geometry device\n"
16732 #: ../fish/guestfish-actions.pod:4728 ../src/guestfs-actions.pod:7273
16733 msgid "This displays the kernel's idea of the geometry of C<device>."
16737 #: ../fish/guestfish-actions.pod:4733
16742 #: ../fish/guestfish-actions.pod:4735
16745 " sfdisk-l device\n"
16750 #: ../fish/guestfish-actions.pod:4737 ../src/guestfs-actions.pod:7296
16752 "This displays the partition table on C<device>, in the human-readable output "
16753 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16757 #: ../fish/guestfish-actions.pod:4741
16758 msgid "See also: L</part-list>"
16762 #: ../fish/guestfish-actions.pod:4743
16764 "I<This function is deprecated.> In new code, use the L</part_list> call "
16769 #: ../fish/guestfish-actions.pod:4750
16774 #: ../fish/guestfish-actions.pod:4752
16782 #: ../fish/guestfish-actions.pod:4754 ../src/guestfs-actions.pod:7313
16784 "This call runs a command from the guest filesystem via the guest's C</bin/"
16789 #: ../fish/guestfish-actions.pod:4757
16790 msgid "This is like L</command>, but passes the command to:"
16794 #: ../fish/guestfish-actions.pod:4759 ../src/guestfs-actions.pod:7318
16797 " /bin/sh -c \"command\"\n"
16802 #: ../fish/guestfish-actions.pod:4761 ../src/guestfs-actions.pod:7320
16804 "Depending on the guest's shell, this usually results in wildcards being "
16805 "expanded, shell expressions being interpolated and so on."
16809 #: ../fish/guestfish-actions.pod:4765
16810 msgid "All the provisos about L</command> apply to this call."
16814 #: ../fish/guestfish-actions.pod:4767
16819 #: ../fish/guestfish-actions.pod:4769
16822 " sh-lines command\n"
16827 #: ../fish/guestfish-actions.pod:4771
16828 msgid "This is the same as L</sh>, but splits the result into a list of lines."
16832 #: ../fish/guestfish-actions.pod:4774
16833 msgid "See also: L</command-lines>"
16837 #: ../fish/guestfish-actions.pod:4776
16842 #: ../fish/guestfish-actions.pod:4778
16850 #: ../fish/guestfish-actions.pod:4780 ../src/guestfs-actions.pod:7354
16851 msgid "Sleep for C<secs> seconds."
16855 #: ../fish/guestfish-actions.pod:4782
16860 #: ../fish/guestfish-actions.pod:4784
16868 #: ../fish/guestfish-actions.pod:4788 ../src/guestfs-actions.pod:7368
16869 msgid "This is the same as the C<stat(2)> system call."
16873 #: ../fish/guestfish-actions.pod:4790
16878 #: ../fish/guestfish-actions.pod:4792
16886 #: ../fish/guestfish-actions.pod:4794 ../src/guestfs-actions.pod:7382
16888 "Returns file system statistics for any mounted file system. C<path> should "
16889 "be a file or directory in the mounted file system (typically it is the mount "
16890 "point itself, but it doesn't need to be)."
16894 #: ../fish/guestfish-actions.pod:4798 ../src/guestfs-actions.pod:7386
16895 msgid "This is the same as the C<statvfs(2)> system call."
16899 #: ../fish/guestfish-actions.pod:4800
16904 #: ../fish/guestfish-actions.pod:4802
16912 #: ../fish/guestfish-actions.pod:4804 ../src/guestfs-actions.pod:7400
16914 "This runs the L<strings(1)> command on a file and returns the list of "
16915 "printable strings found."
16919 #: ../fish/guestfish-actions.pod:4810
16924 #: ../fish/guestfish-actions.pod:4812
16927 " strings-e encoding path\n"
16932 #: ../fish/guestfish-actions.pod:4814
16934 "This is like the L</strings> command, but allows you to specify the encoding "
16935 "of strings that are looked for in the source file C<path>."
16939 #: ../fish/guestfish-actions.pod:4818 ../src/guestfs-actions.pod:7423
16940 msgid "Allowed encodings are:"
16944 #: ../fish/guestfish-actions.pod:4822 ../src/guestfs-actions.pod:7427
16949 #: ../fish/guestfish-actions.pod:4824
16951 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16952 "ISO-8859-X (this is what L</strings> uses)."
16956 #: ../fish/guestfish-actions.pod:4827 ../src/guestfs-actions.pod:7432
16961 #: ../fish/guestfish-actions.pod:4829 ../src/guestfs-actions.pod:7434
16962 msgid "Single 8-bit-byte characters."
16966 #: ../fish/guestfish-actions.pod:4831 ../src/guestfs-actions.pod:7436
16971 #: ../fish/guestfish-actions.pod:4833 ../src/guestfs-actions.pod:7438
16972 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16976 #: ../fish/guestfish-actions.pod:4836 ../src/guestfs-actions.pod:7441
16977 msgid "l (lower case letter L)"
16981 #: ../fish/guestfish-actions.pod:4838 ../src/guestfs-actions.pod:7443
16983 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16984 "examining binaries in Windows guests."
16988 #: ../fish/guestfish-actions.pod:4841 ../src/guestfs-actions.pod:7446
16993 #: ../fish/guestfish-actions.pod:4843 ../src/guestfs-actions.pod:7448
16994 msgid "32-bit big endian such as UCS-4BE."
16998 #: ../fish/guestfish-actions.pod:4845 ../src/guestfs-actions.pod:7450
17003 #: ../fish/guestfish-actions.pod:4847 ../src/guestfs-actions.pod:7452
17004 msgid "32-bit little endian such as UCS-4LE."
17008 #: ../fish/guestfish-actions.pod:4851 ../src/guestfs-actions.pod:7456
17009 msgid "The returned strings are transcoded to UTF-8."
17013 #: ../fish/guestfish-actions.pod:4856
17014 msgid "swapoff-device"
17018 #: ../fish/guestfish-actions.pod:4858
17021 " swapoff-device device\n"
17026 #: ../fish/guestfish-actions.pod:4860
17028 "This command disables the libguestfs appliance swap device or partition "
17029 "named C<device>. See L</swapon-device>."
17033 #: ../fish/guestfish-actions.pod:4864
17034 msgid "swapoff-file"
17038 #: ../fish/guestfish-actions.pod:4866
17041 " swapoff-file file\n"
17046 #: ../fish/guestfish-actions.pod:4868 ../src/guestfs-actions.pod:7487
17047 msgid "This command disables the libguestfs appliance swap on file."
17051 #: ../fish/guestfish-actions.pod:4870
17052 msgid "swapoff-label"
17056 #: ../fish/guestfish-actions.pod:4872
17059 " swapoff-label label\n"
17064 #: ../fish/guestfish-actions.pod:4874 ../src/guestfs-actions.pod:7499
17066 "This command disables the libguestfs appliance swap on labeled swap "
17071 #: ../fish/guestfish-actions.pod:4877
17072 msgid "swapoff-uuid"
17076 #: ../fish/guestfish-actions.pod:4879
17079 " swapoff-uuid uuid\n"
17084 #: ../fish/guestfish-actions.pod:4881 ../src/guestfs-actions.pod:7512
17086 "This command disables the libguestfs appliance swap partition with the given "
17091 #: ../fish/guestfish-actions.pod:4884
17092 msgid "swapon-device"
17096 #: ../fish/guestfish-actions.pod:4886
17099 " swapon-device device\n"
17104 #: ../fish/guestfish-actions.pod:4888
17106 "This command enables the libguestfs appliance to use the swap device or "
17107 "partition named C<device>. The increased memory is made available for all "
17108 "commands, for example those run using L</command> or L</sh>."
17112 #: ../fish/guestfish-actions.pod:4893 ../src/guestfs-actions.pod:7530
17114 "Note that you should not swap to existing guest swap partitions unless you "
17115 "know what you are doing. They may contain hibernation information, or other "
17116 "information that the guest doesn't want you to trash. You also risk leaking "
17117 "information about the host to the guest this way. Instead, attach a new "
17118 "host device to the guest and swap on that."
17122 #: ../fish/guestfish-actions.pod:4900
17123 msgid "swapon-file"
17127 #: ../fish/guestfish-actions.pod:4902
17130 " swapon-file file\n"
17135 #: ../fish/guestfish-actions.pod:4904
17137 "This command enables swap to a file. See L</swapon-device> for other notes."
17141 #: ../fish/guestfish-actions.pod:4907
17142 msgid "swapon-label"
17146 #: ../fish/guestfish-actions.pod:4909
17149 " swapon-label label\n"
17154 #: ../fish/guestfish-actions.pod:4911
17156 "This command enables swap to a labeled swap partition. See L</swapon-"
17157 "device> for other notes."
17161 #: ../fish/guestfish-actions.pod:4914
17162 msgid "swapon-uuid"
17166 #: ../fish/guestfish-actions.pod:4916
17169 " swapon-uuid uuid\n"
17174 #: ../fish/guestfish-actions.pod:4918
17176 "This command enables swap to a swap partition with the given UUID. See L</"
17177 "swapon-device> for other notes."
17181 #: ../fish/guestfish-actions.pod:4921
17186 #: ../fish/guestfish-actions.pod:4923
17194 #: ../fish/guestfish-actions.pod:4925 ../src/guestfs-actions.pod:7585
17196 "This syncs the disk, so that any writes are flushed through to the "
17197 "underlying disk image."
17201 #: ../fish/guestfish-actions.pod:4928 ../src/guestfs-actions.pod:7588
17203 "You should always call this if you have modified a disk image, before "
17204 "closing the handle."
17208 #: ../fish/guestfish-actions.pod:4931
17213 #: ../fish/guestfish-actions.pod:4933
17221 #: ../fish/guestfish-actions.pod:4935 ../src/guestfs-actions.pod:7601
17223 "This command returns up to the last 10 lines of a file as a list of strings."
17227 #: ../fish/guestfish-actions.pod:4941
17232 #: ../fish/guestfish-actions.pod:4943
17235 " tail-n nrlines path\n"
17240 #: ../fish/guestfish-actions.pod:4945 ../src/guestfs-actions.pod:7620
17242 "If the parameter C<nrlines> is a positive number, this returns the last "
17243 "C<nrlines> lines of the file C<path>."
17247 #: ../fish/guestfish-actions.pod:4948 ../src/guestfs-actions.pod:7623
17249 "If the parameter C<nrlines> is a negative number, this returns lines from "
17250 "the file C<path>, starting with the C<-nrlines>th line."
17254 #: ../fish/guestfish-actions.pod:4956
17259 #: ../fish/guestfish-actions.pod:4958
17262 " tar-in (tarfile|-) directory\n"
17267 #: ../fish/guestfish-actions.pod:4960 ../src/guestfs-actions.pod:7644
17269 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
17270 "tar file) into C<directory>."
17274 #: ../fish/guestfish-actions.pod:4963
17275 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
17279 #: ../fish/guestfish-actions.pod:4968
17284 #: ../fish/guestfish-actions.pod:4970
17287 " tar-out directory (tarfile|-)\n"
17292 #: ../fish/guestfish-actions.pod:4972 ../src/guestfs-actions.pod:7661
17294 "This command packs the contents of C<directory> and downloads it to local "
17299 #: ../fish/guestfish-actions.pod:4975
17300 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
17304 #: ../fish/guestfish-actions.pod:4980
17309 #: ../fish/guestfish-actions.pod:4982
17312 " tgz-in (tarball|-) directory\n"
17317 #: ../fish/guestfish-actions.pod:4984 ../src/guestfs-actions.pod:7678
17319 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
17320 "tar file) into C<directory>."
17324 #: ../fish/guestfish-actions.pod:4987
17325 msgid "To upload an uncompressed tarball, use L</tar-in>."
17329 #: ../fish/guestfish-actions.pod:4991
17334 #: ../fish/guestfish-actions.pod:4993
17337 " tgz-out directory (tarball|-)\n"
17342 #: ../fish/guestfish-actions.pod:4995 ../src/guestfs-actions.pod:7694
17344 "This command packs the contents of C<directory> and downloads it to local "
17349 #: ../fish/guestfish-actions.pod:4998
17350 msgid "To download an uncompressed tarball, use L</tar-out>."
17354 #: ../fish/guestfish-actions.pod:5002
17359 #: ../fish/guestfish-actions.pod:5004
17367 #: ../fish/guestfish-actions.pod:5006 ../src/guestfs-actions.pod:7709
17369 "Touch acts like the L<touch(1)> command. It can be used to update the "
17370 "timestamps on a file, or, if the file does not exist, to create a new zero-"
17375 #: ../fish/guestfish-actions.pod:5010 ../src/guestfs-actions.pod:7713
17377 "This command only works on regular files, and will fail on other file types "
17378 "such as directories, symbolic links, block special etc."
17382 #: ../fish/guestfish-actions.pod:5013
17387 #: ../fish/guestfish-actions.pod:5015
17395 #: ../fish/guestfish-actions.pod:5017 ../src/guestfs-actions.pod:7726
17397 "This command truncates C<path> to a zero-length file. The file must exist "
17402 #: ../fish/guestfish-actions.pod:5020
17403 msgid "truncate-size"
17407 #: ../fish/guestfish-actions.pod:5022
17410 " truncate-size path size\n"
17415 #: ../fish/guestfish-actions.pod:5024 ../src/guestfs-actions.pod:7740
17417 "This command truncates C<path> to size C<size> bytes. The file must exist "
17422 #: ../fish/guestfish-actions.pod:5027
17424 "If the current file size is less than C<size> then the file is extended to "
17425 "the required size with zero bytes. This creates a sparse file (ie. disk "
17426 "blocks are not allocated for the file until you write to it). To create a "
17427 "non-sparse file of zeroes, use L</fallocate64> instead."
17431 #: ../fish/guestfish-actions.pod:5033
17436 #: ../fish/guestfish-actions.pod:5035
17439 " tune2fs device [force:true|false] [maxmountcount:N] [mountcount:N] [errorbehavior:..] [group:N] [intervalbetweenchecks:N] [reservedblockspercentage:N] [lastmounteddirectory:..] [reservedblockscount:N] [user:N]\n"
17444 #: ../fish/guestfish-actions.pod:5037 ../src/guestfs-actions.pod:7776
17446 "This call allows you to adjust various filesystem parameters of an ext2/ext3/"
17447 "ext4 filesystem called C<device>."
17451 #: ../fish/guestfish-actions.pod:5046 ../src/guestfs-actions.pod:7785
17453 "Force tune2fs to complete the operation even in the face of errors. This is "
17454 "the same as the tune2fs C<-f> option."
17458 #: ../fish/guestfish-actions.pod:5049 ../src/guestfs-actions.pod:7788
17459 msgid "C<maxmountcount>"
17463 #: ../fish/guestfish-actions.pod:5051 ../src/guestfs-actions.pod:7790
17465 "Set the number of mounts after which the filesystem is checked by L<e2fsck(8)"
17466 ">. If this is C<0> then the number of mounts is disregarded. This is the "
17467 "same as the tune2fs C<-c> option."
17471 #: ../fish/guestfish-actions.pod:5055 ../src/guestfs-actions.pod:7794
17472 msgid "C<mountcount>"
17476 #: ../fish/guestfish-actions.pod:5057 ../src/guestfs-actions.pod:7796
17478 "Set the number of times the filesystem has been mounted. This is the same "
17479 "as the tune2fs C<-C> option."
17483 #: ../fish/guestfish-actions.pod:5060 ../src/guestfs-actions.pod:7799
17484 msgid "C<errorbehavior>"
17488 #: ../fish/guestfish-actions.pod:5062 ../src/guestfs-actions.pod:7801
17490 "Change the behavior of the kernel code when errors are detected. Possible "
17491 "values currently are: C<continue>, C<remount-ro>, C<panic>. In practice "
17492 "these options don't really make any difference, particularly for write "
17497 #: ../fish/guestfish-actions.pod:5067 ../src/guestfs-actions.pod:7806
17498 msgid "This is the same as the tune2fs C<-e> option."
17502 #: ../fish/guestfish-actions.pod:5069 ../src/guestfs-actions.pod:7808
17507 #: ../fish/guestfish-actions.pod:5071 ../src/guestfs-actions.pod:7810
17509 "Set the group which can use reserved filesystem blocks. This is the same as "
17510 "the tune2fs C<-g> option except that it can only be specified as a number."
17514 #: ../fish/guestfish-actions.pod:5075 ../src/guestfs-actions.pod:7814
17515 msgid "C<intervalbetweenchecks>"
17519 #: ../fish/guestfish-actions.pod:5077 ../src/guestfs-actions.pod:7816
17521 "Adjust the maximal time between two filesystem checks (in seconds). If the "
17522 "option is passed as C<0> then time-dependent checking is disabled."
17526 #: ../fish/guestfish-actions.pod:5081 ../src/guestfs-actions.pod:7820
17527 msgid "This is the same as the tune2fs C<-i> option."
17531 #: ../fish/guestfish-actions.pod:5083 ../src/guestfs-actions.pod:7822
17532 msgid "C<reservedblockspercentage>"
17536 #: ../fish/guestfish-actions.pod:5085 ../src/guestfs-actions.pod:7824
17538 "Set the percentage of the filesystem which may only be allocated by "
17539 "privileged processes. This is the same as the tune2fs C<-m> option."
17543 #: ../fish/guestfish-actions.pod:5089 ../src/guestfs-actions.pod:7828
17544 msgid "C<lastmounteddirectory>"
17548 #: ../fish/guestfish-actions.pod:5091 ../src/guestfs-actions.pod:7830
17550 "Set the last mounted directory. This is the same as the tune2fs C<-M> "
17555 #: ../fish/guestfish-actions.pod:5094 ../src/guestfs-actions.pod:7833
17557 "C<reservedblockscount> Set the number of reserved filesystem blocks. This "
17558 "is the same as the tune2fs C<-r> option."
17562 #: ../fish/guestfish-actions.pod:5098 ../src/guestfs-actions.pod:7837
17567 #: ../fish/guestfish-actions.pod:5100 ../src/guestfs-actions.pod:7839
17569 "Set the user who can use the reserved filesystem blocks. This is the same "
17570 "as the tune2fs C<-u> option except that it can only be specified as a number."
17574 #: ../fish/guestfish-actions.pod:5106
17576 "To get the current values of filesystem parameters, see L</tune2fs-l>. For "
17577 "precise details of how tune2fs works, see the L<tune2fs(8)> man page."
17581 #: ../fish/guestfish-actions.pod:5112
17586 #: ../fish/guestfish-actions.pod:5114
17589 " tune2fs-l device\n"
17594 #: ../fish/guestfish-actions.pod:5116 ../src/guestfs-actions.pod:7881
17596 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
17601 #: ../fish/guestfish-actions.pod:5119 ../src/guestfs-actions.pod:7884
17603 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
17604 "for more details. The list of fields returned isn't clearly defined, and "
17605 "depends on both the version of C<tune2fs> that libguestfs was built against, "
17606 "and the filesystem itself."
17610 #: ../fish/guestfish-actions.pod:5124
17615 #: ../fish/guestfish-actions.pod:5126
17618 " txz-in (tarball|-) directory\n"
17623 #: ../fish/guestfish-actions.pod:5128 ../src/guestfs-actions.pod:7904
17625 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
17626 "tar file) into C<directory>."
17630 #: ../fish/guestfish-actions.pod:5133
17635 #: ../fish/guestfish-actions.pod:5135
17638 " txz-out directory (tarball|-)\n"
17643 #: ../fish/guestfish-actions.pod:5137 ../src/guestfs-actions.pod:7918
17645 "This command packs the contents of C<directory> and downloads it to local "
17646 "file C<tarball> (as an xz compressed tar archive)."
17650 #: ../fish/guestfish-actions.pod:5142
17655 #: ../fish/guestfish-actions.pod:5144
17663 #: ../fish/guestfish-actions.pod:5146 ../src/guestfs-actions.pod:7931
17665 "This function sets the mask used for creating new files and device nodes to "
17670 #: ../fish/guestfish-actions.pod:5149 ../src/guestfs-actions.pod:7934
17672 "Typical umask values would be C<022> which creates new files with "
17673 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
17674 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
17678 #: ../fish/guestfish-actions.pod:5154 ../src/guestfs-actions.pod:7939
17680 "The default umask is C<022>. This is important because it means that "
17681 "directories and device nodes will be created with C<0644> or C<0755> mode "
17682 "even if you specify C<0777>."
17686 #: ../fish/guestfish-actions.pod:5158
17687 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
17691 #: ../fish/guestfish-actions.pod:5161 ../src/guestfs-actions.pod:7946
17692 msgid "This call returns the previous umask."
17696 #: ../fish/guestfish-actions.pod:5163
17701 #: ../fish/guestfish-actions.pod:5165
17706 #: ../fish/guestfish-actions.pod:5167
17709 " umount pathordevice\n"
17714 #: ../fish/guestfish-actions.pod:5169 ../src/guestfs-actions.pod:7958
17716 "This unmounts the given filesystem. The filesystem may be specified either "
17717 "by its mountpoint (path) or the device which contains the filesystem."
17721 #: ../fish/guestfish-actions.pod:5173
17726 #: ../fish/guestfish-actions.pod:5175
17727 msgid "unmount-all"
17731 #: ../fish/guestfish-actions.pod:5177
17739 #: ../fish/guestfish-actions.pod:5179 ../src/guestfs-actions.pod:7971
17740 msgid "This unmounts all mounted filesystems."
17744 #: ../fish/guestfish-actions.pod:5181 ../src/guestfs-actions.pod:7973
17745 msgid "Some internal mounts are not unmounted by this call."
17749 #: ../fish/guestfish-actions.pod:5183
17754 #: ../fish/guestfish-actions.pod:5185
17757 " upload (filename|-) remotefilename\n"
17762 #: ../fish/guestfish-actions.pod:5187 ../fish/guestfish-actions.pod:5200
17763 #: ../src/guestfs-actions.pod:7986 ../src/guestfs-actions.pod:8010
17764 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17768 #: ../fish/guestfish-actions.pod:5192
17769 msgid "See also L</download>."
17773 #: ../fish/guestfish-actions.pod:5196
17774 msgid "upload-offset"
17778 #: ../fish/guestfish-actions.pod:5198
17781 " upload-offset (filename|-) remotefilename offset\n"
17786 #: ../fish/guestfish-actions.pod:5203 ../src/guestfs-actions.pod:8013
17788 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17789 "The intention is to overwrite parts of existing files or devices, although "
17790 "if a non-existant file is specified then it is created with a \"hole\" "
17791 "before C<offset>. The size of the data written is implicit in the size of "
17792 "the source C<filename>."
17796 #: ../fish/guestfish-actions.pod:5210
17798 "Note that there is no limit on the amount of data that can be uploaded with "
17799 "this call, unlike with L</pwrite>, and this call always writes the full "
17800 "amount unless an error occurs."
17804 #: ../fish/guestfish-actions.pod:5215
17805 msgid "See also L</upload>, L</pwrite>."
17809 #: ../fish/guestfish-actions.pod:5219
17814 #: ../fish/guestfish-actions.pod:5221
17817 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
17822 #: ../fish/guestfish-actions.pod:5223 ../src/guestfs-actions.pod:8046
17823 msgid "This command sets the timestamps of a file with nanosecond precision."
17827 #: ../fish/guestfish-actions.pod:5226 ../src/guestfs-actions.pod:8049
17829 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17834 #: ../fish/guestfish-actions.pod:5229 ../src/guestfs-actions.pod:8052
17836 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17837 "nanoseconds from the epoch."
17841 #: ../fish/guestfish-actions.pod:5232 ../src/guestfs-actions.pod:8055
17843 "If the C<*nsecs> field contains the special value C<-1> then the "
17844 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17845 "ignored in this case)."
17849 #: ../fish/guestfish-actions.pod:5236 ../src/guestfs-actions.pod:8059
17851 "If the C<*nsecs> field contains the special value C<-2> then the "
17852 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17857 #: ../fish/guestfish-actions.pod:5240
17862 #: ../fish/guestfish-actions.pod:5242
17870 #: ../fish/guestfish-actions.pod:5244 ../src/guestfs-actions.pod:8072
17872 "Return the libguestfs version number that the program is linked against."
17876 #: ../fish/guestfish-actions.pod:5247 ../src/guestfs-actions.pod:8075
17878 "Note that because of dynamic linking this is not necessarily the version of "
17879 "libguestfs that you compiled against. You can compile the program, and then "
17880 "at runtime dynamically link against a completely different C<libguestfs.so> "
17885 #: ../fish/guestfish-actions.pod:5252 ../src/guestfs-actions.pod:8080
17887 "This call was added in version C<1.0.58>. In previous versions of "
17888 "libguestfs there was no way to get the version number. From C code you can "
17889 "use dynamic linker functions to find out if this symbol exists (if it "
17890 "doesn't, then it's an earlier version)."
17894 #: ../fish/guestfish-actions.pod:5258 ../src/guestfs-actions.pod:8086
17896 "The call returns a structure with four elements. The first three (C<major>, "
17897 "C<minor> and C<release>) are numbers and correspond to the usual version "
17898 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17899 "but may be used for distro-specific information."
17903 #: ../fish/guestfish-actions.pod:5264 ../src/guestfs-actions.pod:8092
17905 "To construct the original version string: C<$major.$minor.$release$extra>"
17909 #: ../fish/guestfish-actions.pod:5267 ../src/guestfs-actions.pod:8095
17910 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17914 #: ../fish/guestfish-actions.pod:5269
17916 "I<Note:> Don't use this call to test for availability of features. In "
17917 "enterprise distributions we backport features from later versions into "
17918 "earlier versions, making this an unreliable way to test for features. Use "
17919 "L</available> instead."
17923 #: ../fish/guestfish-actions.pod:5275
17928 #: ../fish/guestfish-actions.pod:5277
17931 " vfs-label device\n"
17936 #: ../fish/guestfish-actions.pod:5279 ../src/guestfs-actions.pod:8115
17937 msgid "This returns the filesystem label of the filesystem on C<device>."
17941 #: ../fish/guestfish-actions.pod:5282 ../src/guestfs-actions.pod:8118
17942 msgid "If the filesystem is unlabeled, this returns the empty string."
17946 #: ../fish/guestfish-actions.pod:5284
17947 msgid "To find a filesystem from the label, use L</findfs-label>."
17951 #: ../fish/guestfish-actions.pod:5286
17956 #: ../fish/guestfish-actions.pod:5288
17959 " vfs-type device\n"
17964 #: ../fish/guestfish-actions.pod:5290 ../src/guestfs-actions.pod:8133
17966 "This command gets the filesystem type corresponding to the filesystem on "
17971 #: ../fish/guestfish-actions.pod:5293 ../src/guestfs-actions.pod:8136
17973 "For most filesystems, the result is the name of the Linux VFS module which "
17974 "would be used to mount this filesystem if you mounted it without specifying "
17975 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17979 #: ../fish/guestfish-actions.pod:5298
17984 #: ../fish/guestfish-actions.pod:5300
17987 " vfs-uuid device\n"
17992 #: ../fish/guestfish-actions.pod:5302 ../src/guestfs-actions.pod:8152
17993 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17997 #: ../fish/guestfish-actions.pod:5305 ../src/guestfs-actions.pod:8155
17998 msgid "If the filesystem does not have a UUID, this returns the empty string."
18002 #: ../fish/guestfish-actions.pod:5307
18003 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
18007 #: ../fish/guestfish-actions.pod:5309
18008 msgid "vg-activate"
18012 #: ../fish/guestfish-actions.pod:5311
18015 " vg-activate true|false 'volgroups ...'\n"
18020 #: ../fish/guestfish-actions.pod:5313 ../src/guestfs-actions.pod:8171
18022 "This command activates or (if C<activate> is false) deactivates all logical "
18023 "volumes in the listed volume groups C<volgroups>."
18027 #: ../fish/guestfish-actions.pod:5316 ../src/guestfs-actions.pod:8174
18028 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
18032 #: ../fish/guestfish-actions.pod:5318 ../src/guestfs-actions.pod:8176
18034 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
18035 "activated or deactivated."
18039 #: ../fish/guestfish-actions.pod:5321
18040 msgid "vg-activate-all"
18044 #: ../fish/guestfish-actions.pod:5323
18047 " vg-activate-all true|false\n"
18052 #: ../fish/guestfish-actions.pod:5325 ../src/guestfs-actions.pod:8189
18054 "This command activates or (if C<activate> is false) deactivates all logical "
18055 "volumes in all volume groups."
18059 #: ../fish/guestfish-actions.pod:5328 ../src/guestfs-actions.pod:8192
18060 msgid "This command is the same as running C<vgchange -a y|n>"
18064 #: ../fish/guestfish-actions.pod:5330
18069 #: ../fish/guestfish-actions.pod:5332
18072 " vgcreate volgroup 'physvols ...'\n"
18077 #: ../fish/guestfish-actions.pod:5334 ../src/guestfs-actions.pod:8205
18079 "This creates an LVM volume group called C<volgroup> from the non-empty list "
18080 "of physical volumes C<physvols>."
18084 #: ../fish/guestfish-actions.pod:5337
18089 #: ../fish/guestfish-actions.pod:5339
18092 " vglvuuids vgname\n"
18097 #: ../fish/guestfish-actions.pod:5341 ../src/guestfs-actions.pod:8218
18099 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
18100 "volumes created in this volume group."
18104 #: ../fish/guestfish-actions.pod:5344
18106 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
18107 "logical volumes and volume groups."
18111 #: ../fish/guestfish-actions.pod:5347
18112 msgid "See also L</vgpvuuids>."
18116 #: ../fish/guestfish-actions.pod:5349
18121 #: ../fish/guestfish-actions.pod:5351
18124 " vgpvuuids vgname\n"
18129 #: ../fish/guestfish-actions.pod:5353 ../src/guestfs-actions.pod:8238
18131 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
18132 "volumes that this volume group resides on."
18136 #: ../fish/guestfish-actions.pod:5356
18138 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
18139 "physical volumes and volume groups."
18143 #: ../fish/guestfish-actions.pod:5359
18144 msgid "See also L</vglvuuids>."
18148 #: ../fish/guestfish-actions.pod:5361
18153 #: ../fish/guestfish-actions.pod:5363
18156 " vgremove vgname\n"
18161 #: ../fish/guestfish-actions.pod:5365 ../src/guestfs-actions.pod:8258
18162 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
18166 #: ../fish/guestfish-actions.pod:5367 ../src/guestfs-actions.pod:8260
18168 "This also forcibly removes all logical volumes in the volume group (if any)."
18172 #: ../fish/guestfish-actions.pod:5370
18177 #: ../fish/guestfish-actions.pod:5372
18180 " vgrename volgroup newvolgroup\n"
18185 #: ../fish/guestfish-actions.pod:5374 ../src/guestfs-actions.pod:8274
18186 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
18190 #: ../fish/guestfish-actions.pod:5376
18195 #: ../fish/guestfish-actions.pod:5378
18203 #: ../fish/guestfish-actions.pod:5380 ../src/guestfs-actions.pod:8285
18205 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18210 #: ../fish/guestfish-actions.pod:5383 ../src/guestfs-actions.pod:8288
18212 "This returns a list of just the volume group names that were detected (eg. "
18217 #: ../fish/guestfish-actions.pod:5386
18218 msgid "See also L</vgs-full>."
18222 #: ../fish/guestfish-actions.pod:5388
18227 #: ../fish/guestfish-actions.pod:5390
18235 #: ../fish/guestfish-actions.pod:5392 ../src/guestfs-actions.pod:8304
18237 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18238 "> command. The \"full\" version includes all fields."
18242 #: ../fish/guestfish-actions.pod:5395
18247 #: ../fish/guestfish-actions.pod:5397
18255 #: ../fish/guestfish-actions.pod:5399 ../src/guestfs-actions.pod:8318
18257 "This rescans all block devices and rebuilds the list of LVM physical "
18258 "volumes, volume groups and logical volumes."
18262 #: ../fish/guestfish-actions.pod:5402
18267 #: ../fish/guestfish-actions.pod:5404
18275 #: ../fish/guestfish-actions.pod:5406 ../src/guestfs-actions.pod:8331
18276 msgid "This command returns the UUID of the LVM VG named C<vgname>."
18280 #: ../fish/guestfish-actions.pod:5408
18285 #: ../fish/guestfish-actions.pod:5410
18293 #: ../fish/guestfish-actions.pod:5412 ../src/guestfs-actions.pod:8371
18295 "This command counts the characters in a file, using the C<wc -c> external "
18300 #: ../fish/guestfish-actions.pod:5415
18305 #: ../fish/guestfish-actions.pod:5417
18313 #: ../fish/guestfish-actions.pod:5419 ../src/guestfs-actions.pod:8384
18315 "This command counts the lines in a file, using the C<wc -l> external command."
18319 #: ../fish/guestfish-actions.pod:5422
18324 #: ../fish/guestfish-actions.pod:5424
18332 #: ../fish/guestfish-actions.pod:5426 ../src/guestfs-actions.pod:8397
18334 "This command counts the words in a file, using the C<wc -w> external command."
18338 #: ../fish/guestfish-actions.pod:5429
18343 #: ../fish/guestfish-actions.pod:5431
18346 " write path content\n"
18351 #: ../fish/guestfish-actions.pod:5433 ../src/guestfs-actions.pod:8412
18353 "This call creates a file called C<path>. The content of the file is the "
18354 "string C<content> (which can contain any 8 bit data)."
18358 #: ../fish/guestfish-actions.pod:5436
18359 msgid "See also L</write-append>."
18363 #: ../fish/guestfish-actions.pod:5441
18364 msgid "write-append"
18368 #: ../fish/guestfish-actions.pod:5443
18371 " write-append path content\n"
18376 #: ../fish/guestfish-actions.pod:5445 ../src/guestfs-actions.pod:8432
18378 "This call appends C<content> to the end of file C<path>. If C<path> does "
18379 "not exist, then a new file is created."
18383 #: ../fish/guestfish-actions.pod:5448
18384 msgid "See also L</write>."
18388 #: ../fish/guestfish-actions.pod:5453
18393 #: ../fish/guestfish-actions.pod:5455
18396 " write-file path content size\n"
18401 #: ../fish/guestfish-actions.pod:5457 ../src/guestfs-actions.pod:8459
18403 "This call creates a file called C<path>. The contents of the file is the "
18404 "string C<content> (which can contain any 8 bit data), with length C<size>."
18408 #: ../fish/guestfish-actions.pod:5461 ../src/guestfs-actions.pod:8463
18410 "As a special case, if C<size> is C<0> then the length is calculated using "
18411 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
18415 #: ../fish/guestfish-actions.pod:5465 ../src/guestfs-actions.pod:8467
18417 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
18418 "I<not> work, even if the length is specified."
18422 #: ../fish/guestfish-actions.pod:5471
18424 "I<This function is deprecated.> In new code, use the L</write> call instead."
18428 #: ../fish/guestfish-actions.pod:5478
18433 #: ../fish/guestfish-actions.pod:5480
18436 " zegrep regex path\n"
18441 #: ../fish/guestfish-actions.pod:5482 ../src/guestfs-actions.pod:8484
18443 "This calls the external C<zegrep> program and returns the matching lines."
18447 #: ../fish/guestfish-actions.pod:5488
18452 #: ../fish/guestfish-actions.pod:5490
18455 " zegrepi regex path\n"
18460 #: ../fish/guestfish-actions.pod:5492 ../src/guestfs-actions.pod:8503
18462 "This calls the external C<zegrep -i> program and returns the matching lines."
18466 #: ../fish/guestfish-actions.pod:5498
18471 #: ../fish/guestfish-actions.pod:5500
18479 #: ../fish/guestfish-actions.pod:5502 ../src/guestfs-actions.pod:8521
18480 msgid "This command writes zeroes over the first few blocks of C<device>."
18484 #: ../fish/guestfish-actions.pod:5504 ../src/guestfs-actions.pod:8523
18486 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
18487 "securely wipe the device). It should be sufficient to remove any partition "
18488 "tables, filesystem superblocks and so on."
18492 #: ../fish/guestfish-actions.pod:5508 ../fish/guestfish-actions.pod:5523
18493 #: ../src/guestfs-actions.pod:8527 ../src/guestfs-actions.pod:8553
18495 "If blocks are already zero, then this command avoids writing zeroes. This "
18496 "prevents the underlying device from becoming non-sparse or growing "
18501 #: ../fish/guestfish-actions.pod:5512
18502 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
18506 #: ../fish/guestfish-actions.pod:5515
18507 msgid "zero-device"
18511 #: ../fish/guestfish-actions.pod:5517
18514 " zero-device device\n"
18519 #: ../fish/guestfish-actions.pod:5519
18521 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
18522 "which just zeroes the first few blocks of a device."
18526 #: ../fish/guestfish-actions.pod:5527
18531 #: ../fish/guestfish-actions.pod:5529
18534 " zerofree device\n"
18539 #: ../fish/guestfish-actions.pod:5531 ../src/guestfs-actions.pod:8572
18541 "This runs the I<zerofree> program on C<device>. This program claims to zero "
18542 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
18543 "possible to compress the filesystem more effectively."
18547 #: ../fish/guestfish-actions.pod:5536 ../src/guestfs-actions.pod:8577
18548 msgid "You should B<not> run this program if the filesystem is mounted."
18552 #: ../fish/guestfish-actions.pod:5539 ../src/guestfs-actions.pod:8580
18554 "It is possible that using this program can damage the filesystem or data on "
18559 #: ../fish/guestfish-actions.pod:5542
18564 #: ../fish/guestfish-actions.pod:5544
18567 " zfgrep pattern path\n"
18572 #: ../fish/guestfish-actions.pod:5546 ../src/guestfs-actions.pod:8594
18574 "This calls the external C<zfgrep> program and returns the matching lines."
18578 #: ../fish/guestfish-actions.pod:5552
18583 #: ../fish/guestfish-actions.pod:5554
18586 " zfgrepi pattern path\n"
18591 #: ../fish/guestfish-actions.pod:5556 ../src/guestfs-actions.pod:8613
18593 "This calls the external C<zfgrep -i> program and returns the matching lines."
18597 #: ../fish/guestfish-actions.pod:5562
18602 #: ../fish/guestfish-actions.pod:5564
18605 " zfile meth path\n"
18610 #: ../fish/guestfish-actions.pod:5566 ../src/guestfs-actions.pod:8639
18612 "This command runs C<file> after first decompressing C<path> using C<method>."
18616 #: ../fish/guestfish-actions.pod:5569 ../src/guestfs-actions.pod:8642
18617 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
18621 #: ../fish/guestfish-actions.pod:5571
18623 "Since 1.0.63, use L</file> instead which can now process compressed files."
18627 #: ../fish/guestfish-actions.pod:5574
18629 "I<This function is deprecated.> In new code, use the L</file> call instead."
18633 #: ../fish/guestfish-actions.pod:5581
18638 #: ../fish/guestfish-actions.pod:5583
18641 " zgrep regex path\n"
18646 #: ../fish/guestfish-actions.pod:5585 ../src/guestfs-actions.pod:8659
18648 "This calls the external C<zgrep> program and returns the matching lines."
18652 #: ../fish/guestfish-actions.pod:5591
18657 #: ../fish/guestfish-actions.pod:5593
18660 " zgrepi regex path\n"
18665 #: ../fish/guestfish-actions.pod:5595 ../src/guestfs-actions.pod:8678
18667 "This calls the external C<zgrep -i> program and returns the matching lines."
18671 #: ../fish/guestfish-commands.pod:1
18676 #: ../fish/guestfish-commands.pod:3
18681 #: ../fish/guestfish-commands.pod:5
18684 " alloc filename size\n"
18689 #: ../fish/guestfish-commands.pod:7
18691 "This creates an empty (zeroed) file of the given size, and then adds so it "
18692 "can be further examined."
18696 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
18697 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
18701 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
18702 msgid "Size can be specified using standard suffixes, eg. C<1M>."
18706 #: ../fish/guestfish-commands.pod:14
18708 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
18709 "image, see L</PREPARED DISK IMAGES>."
18713 #: ../fish/guestfish-commands.pod:17
18718 #: ../fish/guestfish-commands.pod:19
18721 " copy-in local [local ...] /remotedir\n"
18726 #: ../fish/guestfish-commands.pod:21
18728 "C<copy-in> copies local files or directories recursively into the disk "
18729 "image, placing them in the directory called C</remotedir> (which must "
18730 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
18731 "other commands as necessary."
18735 #: ../fish/guestfish-commands.pod:26
18737 "Multiple local files and directories can be specified, but the last "
18738 "parameter must always be a remote directory. Wildcards cannot be used."
18742 #: ../fish/guestfish-commands.pod:30
18747 #: ../fish/guestfish-commands.pod:32
18750 " copy-out remote [remote ...] localdir\n"
18755 #: ../fish/guestfish-commands.pod:34
18757 "C<copy-out> copies remote files or directories recursively out of the disk "
18758 "image, placing them on the host disk in a local directory called C<localdir> "
18759 "(which must exist). This guestfish meta-command turns into a sequence of L</"
18760 "download>, L</tar-out> and other commands as necessary."
18764 #: ../fish/guestfish-commands.pod:40
18766 "Multiple remote files and directories can be specified, but the last "
18767 "parameter must always be a local directory. To download to the current "
18768 "directory, use C<.> as in:"
18772 #: ../fish/guestfish-commands.pod:44
18775 " copy-out /home .\n"
18780 #: ../fish/guestfish-commands.pod:46
18782 "Wildcards cannot be used in the ordinary command, but you can use them with "
18783 "the help of L</glob> like this:"
18787 #: ../fish/guestfish-commands.pod:49
18790 " glob copy-out /home/* .\n"
18795 #: ../fish/guestfish-commands.pod:51
18800 #: ../fish/guestfish-commands.pod:53
18803 " display filename\n"
18808 #: ../fish/guestfish-commands.pod:55
18810 "Use C<display> (a graphical display program) to display an image file. It "
18811 "downloads the file, and runs C<display> on it."
18815 #: ../fish/guestfish-commands.pod:58
18817 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
18818 "environment variable. For example to use the GNOME display program:"
18822 #: ../fish/guestfish-commands.pod:61
18825 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
18830 #: ../fish/guestfish-commands.pod:63
18831 msgid "See also L<display(1)>."
18835 #: ../fish/guestfish-commands.pod:65
18840 #: ../fish/guestfish-commands.pod:67
18843 " echo [params ...]\n"
18848 #: ../fish/guestfish-commands.pod:69
18849 msgid "This echos the parameters to the terminal."
18853 #: ../fish/guestfish-commands.pod:71
18858 #: ../fish/guestfish-commands.pod:73
18863 #: ../fish/guestfish-commands.pod:75
18868 #: ../fish/guestfish-commands.pod:77
18876 #: ../fish/guestfish-commands.pod:79
18878 "This is used to edit a file. It downloads the file, edits it locally using "
18879 "your editor, then uploads the result."
18883 #: ../fish/guestfish-commands.pod:82
18885 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
18886 "or C<emacs> you will get those corresponding editors."
18890 #: ../fish/guestfish-commands.pod:86
18895 #: ../fish/guestfish-commands.pod:88
18898 " glob command args...\n"
18903 #: ../fish/guestfish-commands.pod:90
18905 "Expand wildcards in any paths in the args list, and run C<command> "
18906 "repeatedly on each matching path."
18910 #: ../fish/guestfish-commands.pod:93
18911 msgid "See L</WILDCARDS AND GLOBBING>."
18915 #: ../fish/guestfish-commands.pod:95
18920 #: ../fish/guestfish-commands.pod:97
18923 " hexedit <filename|device>\n"
18924 " hexedit <filename|device> <max>\n"
18925 " hexedit <filename|device> <start> <max>\n"
18930 #: ../fish/guestfish-commands.pod:101
18932 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
18937 #: ../fish/guestfish-commands.pod:104
18939 "This command works by downloading potentially the whole file or device, "
18940 "editing it locally, then uploading it. If the file or device is large, you "
18941 "have to specify which part you wish to edit by using C<max> and/or C<start> "
18942 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
18943 "usual modifiers allowed such as C<1M> (1 megabyte)."
18947 #: ../fish/guestfish-commands.pod:111
18948 msgid "For example to edit the first few sectors of a disk you might do:"
18952 #: ../fish/guestfish-commands.pod:114
18955 " hexedit /dev/sda 1M\n"
18960 #: ../fish/guestfish-commands.pod:116
18962 "which would allow you to edit anywhere within the first megabyte of the disk."
18966 #: ../fish/guestfish-commands.pod:119
18967 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
18971 #: ../fish/guestfish-commands.pod:121
18974 " hexedit /dev/sda1 0x400 0x400\n"
18979 #: ../fish/guestfish-commands.pod:123
18980 msgid "(assuming the superblock is in the standard location)."
18984 #: ../fish/guestfish-commands.pod:125
18986 "This command requires the external L<hexedit(1)> program. You can specify "
18987 "another program to use by setting the C<HEXEDITOR> environment variable."
18991 #: ../fish/guestfish-commands.pod:129
18992 msgid "See also L</hexdump>."
18996 #: ../fish/guestfish-commands.pod:131
19001 #: ../fish/guestfish-commands.pod:133
19009 #: ../fish/guestfish-commands.pod:135
19011 "Change the local directory, ie. the current directory of guestfish itself."
19015 #: ../fish/guestfish-commands.pod:138
19016 msgid "Note that C<!cd> won't do what you might expect."
19020 #: ../fish/guestfish-commands.pod:140
19025 #: ../fish/guestfish-commands.pod:142
19030 #: ../fish/guestfish-commands.pod:144
19038 #: ../fish/guestfish-commands.pod:146
19039 msgid "Opens the manual page for guestfish."
19043 #: ../fish/guestfish-commands.pod:148
19048 #: ../fish/guestfish-commands.pod:150
19053 #: ../fish/guestfish-commands.pod:152
19061 #: ../fish/guestfish-commands.pod:154
19069 #: ../fish/guestfish-commands.pod:156
19070 msgid "This is used to view a file."
19074 #: ../fish/guestfish-commands.pod:158
19076 "The default viewer is C<$PAGER>. However if you use the alternate command "
19077 "C<less> you will get the C<less> command specifically."
19081 #: ../fish/guestfish-commands.pod:161
19086 #: ../fish/guestfish-commands.pod:163
19094 #: ../fish/guestfish-commands.pod:165
19096 "Close and reopen the libguestfs handle. It is not necessary to use this "
19097 "normally, because the handle is closed properly when guestfish exits. "
19098 "However this is occasionally useful for testing."
19102 #: ../fish/guestfish-commands.pod:169
19107 #: ../fish/guestfish-commands.pod:171
19110 " setenv VAR value\n"
19115 #: ../fish/guestfish-commands.pod:173
19116 msgid "Set the environment variable C<VAR> to the string C<value>."
19120 #: ../fish/guestfish-commands.pod:175
19122 "To print the value of an environment variable use a shell command such as:"
19126 #: ../fish/guestfish-commands.pod:178
19134 #: ../fish/guestfish-commands.pod:180
19139 #: ../fish/guestfish-commands.pod:182
19142 " sparse filename size\n"
19147 #: ../fish/guestfish-commands.pod:184
19149 "This creates an empty sparse file of the given size, and then adds so it can "
19150 "be further examined."
19154 #: ../fish/guestfish-commands.pod:187
19156 "In all respects it works the same as the L</alloc> command, except that the "
19157 "image file is allocated sparsely, which means that disk blocks are not "
19158 "assigned to the file until they are needed. Sparse disk files only use "
19159 "space when written to, but they are slower and there is a danger you could "
19160 "run out of real disk space during a write operation."
19164 #: ../fish/guestfish-commands.pod:197
19169 #: ../fish/guestfish-commands.pod:199
19177 #: ../fish/guestfish-commands.pod:201
19179 "This command returns a list of the optional groups known to the daemon, and "
19180 "indicates which ones are supported by this build of the libguestfs appliance."
19184 #: ../fish/guestfish-commands.pod:205
19185 msgid "See also L<guestfs(3)/AVAILABILITY>."
19189 #: ../fish/guestfish-commands.pod:207
19194 #: ../fish/guestfish-commands.pod:209
19197 " time command args...\n"
19202 #: ../fish/guestfish-commands.pod:211
19204 "Run the command as usual, but print the elapsed time afterwards. This can "
19205 "be useful for benchmarking operations."
19209 #: ../fish/guestfish-commands.pod:214
19214 #: ../fish/guestfish-commands.pod:216
19222 #: ../fish/guestfish-commands.pod:218
19223 msgid "Remove C<VAR> from the environment."
19227 #: ../fish/guestfish.pod:5
19228 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
19232 #: ../fish/guestfish.pod:9
19235 " guestfish [--options] [commands]\n"
19240 #: ../fish/guestfish.pod:11
19248 #: ../fish/guestfish.pod:13
19251 " guestfish [--ro|--rw] -a disk.img\n"
19256 #: ../fish/guestfish.pod:15
19259 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
19264 #: ../fish/guestfish.pod:17
19267 " guestfish -d libvirt-domain\n"
19272 #: ../fish/guestfish.pod:19
19275 " guestfish [--ro|--rw] -a disk.img -i\n"
19280 #: ../fish/guestfish.pod:21
19283 " guestfish -d libvirt-domain -i\n"
19288 #: ../fish/guestfish.pod:25
19290 "Using guestfish in read/write mode on live virtual machines can be "
19291 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
19292 "option to use guestfish safely if the disk image or virtual machine might be "
19297 #: ../fish/guestfish.pod:32
19299 "Guestfish is a shell and command-line tool for examining and modifying "
19300 "virtual machine filesystems. It uses libguestfs and exposes all of the "
19301 "functionality of the guestfs API, see L<guestfs(3)>."
19305 #: ../fish/guestfish.pod:36
19307 "Guestfish gives you structured access to the libguestfs API, from shell "
19308 "scripts or the command line or interactively. If you want to rescue a "
19309 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
19314 #: ../fish/guestfish.pod:43
19315 msgid "As an interactive shell"
19319 #: ../fish/guestfish.pod:45
19327 #: ../fish/guestfish.pod:47
19330 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
19331 " editing virtual machine filesystems.\n"
19336 #: ../fish/guestfish.pod:50
19339 " Type: 'help' for a list of commands\n"
19340 " 'man' to read the manual\n"
19341 " 'quit' to quit the shell\n"
19346 #: ../fish/guestfish.pod:54
19349 " ><fs> add-ro disk.img\n"
19351 " ><fs> list-filesystems\n"
19352 " /dev/sda1: ext4\n"
19353 " /dev/vg_guest/lv_root: ext4\n"
19354 " /dev/vg_guest/lv_swap: swap\n"
19355 " ><fs> mount /dev/vg_guest/lv_root /\n"
19356 " ><fs> cat /etc/fstab\n"
19358 " # Created by anaconda\n"
19365 #: ../fish/guestfish.pod:67
19366 msgid "From shell scripts"
19370 #: ../fish/guestfish.pod:69
19371 msgid "Create a new C</etc/motd> file in a guest or disk image:"
19375 #: ../fish/guestfish.pod:71
19378 " guestfish <<_EOF_\n"
19381 " mount /dev/vg_guest/lv_root /\n"
19382 " write /etc/motd \"Welcome, new users\"\n"
19388 #: ../fish/guestfish.pod:78
19389 msgid "List the LVM logical volumes in a disk image:"
19393 #: ../fish/guestfish.pod:80
19396 " guestfish -a disk.img --ro <<_EOF_\n"
19404 #: ../fish/guestfish.pod:85
19405 msgid "List all the filesystems in a disk image:"
19409 #: ../fish/guestfish.pod:87
19412 " guestfish -a disk.img --ro <<_EOF_\n"
19414 " list-filesystems\n"
19420 #: ../fish/guestfish.pod:92
19421 msgid "On one command line"
19425 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
19426 msgid "Update C</etc/resolv.conf> in a guest:"
19430 #: ../fish/guestfish.pod:96
19434 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
19435 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
19440 #: ../fish/guestfish.pod:100
19441 msgid "Edit C</boot/grub/grub.conf> interactively:"
19445 #: ../fish/guestfish.pod:102
19448 " guestfish --rw --add disk.img \\\n"
19449 " --mount /dev/vg_guest/lv_root \\\n"
19450 " --mount /dev/sda1:/boot \\\n"
19451 " edit /boot/grub/grub.conf\n"
19456 #: ../fish/guestfish.pod:107
19457 msgid "Mount disks automatically"
19461 #: ../fish/guestfish.pod:109
19463 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
19467 #: ../fish/guestfish.pod:112
19470 " guestfish --ro -a disk.img -i cat /etc/group\n"
19475 #: ../fish/guestfish.pod:114
19478 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
19483 #: ../fish/guestfish.pod:116
19484 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
19488 #: ../fish/guestfish.pod:118
19491 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
19496 #: ../fish/guestfish.pod:120
19497 msgid "As a script interpreter"
19501 #: ../fish/guestfish.pod:122
19502 msgid "Create a 100MB disk containing an ext2-formatted partition:"
19506 #: ../fish/guestfish.pod:124
19509 " #!/usr/bin/guestfish -f\n"
19510 " sparse test1.img 100M\n"
19512 " part-disk /dev/sda mbr\n"
19513 " mkfs ext2 /dev/sda1\n"
19518 #: ../fish/guestfish.pod:130
19519 msgid "Start with a prepared disk"
19523 #: ../fish/guestfish.pod:132
19525 "An alternate way to create a 100MB disk called C<test1.img> containing a "
19526 "single ext2-formatted partition:"
19530 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2243
19533 " guestfish -N fs\n"
19538 #: ../fish/guestfish.pod:137
19539 msgid "To list what is available do:"
19543 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
19546 " guestfish -N help | less\n"
19551 #: ../fish/guestfish.pod:141
19552 msgid "Remote control"
19556 #: ../fish/guestfish.pod:143
19559 " eval \"`guestfish --listen`\"\n"
19560 " guestfish --remote add-ro disk.img\n"
19561 " guestfish --remote run\n"
19562 " guestfish --remote lvs\n"
19567 #: ../fish/guestfish.pod:154
19568 msgid "Displays general help on options."
19572 #: ../fish/guestfish.pod:158
19573 msgid "B<--cmd-help>"
19577 #: ../fish/guestfish.pod:160
19578 msgid "Lists all available guestfish commands."
19582 #: ../fish/guestfish.pod:162
19587 #: ../fish/guestfish.pod:164
19588 msgid "B<--cmd-help cmd>"
19592 #: ../fish/guestfish.pod:166
19593 msgid "Displays detailed help on a single command C<cmd>."
19597 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
19598 msgid "B<-a image>"
19602 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
19603 msgid "B<--add image>"
19607 #: ../fish/guestfish.pod:172
19608 msgid "Add a block device or virtual machine image to the shell."
19612 #: ../fish/guestfish.pod:177
19614 "Using this flag is mostly equivalent to using the C<add> command, with "
19615 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
19616 "the I<--format=...> flag was given."
19620 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
19622 "When used in conjunction with the I<-d> option, this specifies the libvirt "
19623 "URI to use. The default is to use the default libvirt connection."
19627 #: ../fish/guestfish.pod:189
19632 #: ../fish/guestfish.pod:191
19634 "If using the I<--listen> option and a csh-like shell, use this option. See "
19635 "section L</REMOTE CONTROL AND CSH> below."
19639 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
19640 msgid "B<-d libvirt-domain>"
19644 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
19645 msgid "B<--domain libvirt-domain>"
19649 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
19651 "Add disks from the named libvirt domain. If the I<--ro> option is also "
19652 "used, then any libvirt domain can be used. However in write mode, only "
19653 "libvirt domains which are shut down can be named here."
19657 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
19658 msgid "Domain UUIDs can be used instead of names."
19662 #: ../fish/guestfish.pod:204
19664 "Using this flag is mostly equivalent to using the C<add-domain> command, "
19665 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
19666 "if the I<--format:...> flag was given."
19670 #: ../fish/guestfish.pod:208
19675 #: ../fish/guestfish.pod:210
19676 msgid "B<--no-dest-paths>"
19680 #: ../fish/guestfish.pod:212
19682 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
19683 "to hit the tab key to complete paths on the guest filesystem, but this "
19684 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
19685 "allow this feature to be disabled."
19689 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
19691 "When prompting for keys and passphrases, guestfish normally turns echoing "
19692 "off so you cannot see what you are typing. If you are not worried about "
19693 "Tempest attacks and there is no one else in the room you can specify this "
19694 "flag to see what you are typing."
19698 #: ../fish/guestfish.pod:224
19703 #: ../fish/guestfish.pod:226
19704 msgid "B<--file file>"
19708 #: ../fish/guestfish.pod:228
19709 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19713 #: ../fish/guestfish.pod:231
19716 " #!/usr/bin/guestfish -f\n"
19721 #: ../fish/guestfish.pod:244
19724 " guestfish --format=raw -a disk.img\n"
19729 #: ../fish/guestfish.pod:248
19732 " guestfish --format=raw -a disk.img --format -a another.img\n"
19737 #: ../fish/guestfish.pod:253
19739 "If you have untrusted raw-format guest disk images, you should use this "
19740 "option to specify the disk format. This avoids a possible security problem "
19741 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19745 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
19746 msgid "B<--inspector>"
19750 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
19752 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19753 "system and mount filesystems as they would be mounted on the real virtual "
19758 #: ../fish/guestfish.pod:266
19759 msgid "Typical usage is either:"
19763 #: ../fish/guestfish.pod:268
19766 " guestfish -d myguest -i\n"
19771 #: ../fish/guestfish.pod:270
19772 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19776 #: ../fish/guestfish.pod:272
19779 " guestfish --ro -d myguest -i\n"
19784 #: ../fish/guestfish.pod:274
19785 msgid "(for active domains, readonly), or specify the block device directly:"
19789 #: ../fish/guestfish.pod:276
19792 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19797 #: ../fish/guestfish.pod:278
19799 "Note that the command line syntax changed slightly over older versions of "
19800 "guestfish. You can still use the old syntax:"
19804 #: ../fish/guestfish.pod:281
19807 " guestfish [--ro] -i disk.img\n"
19812 #: ../fish/guestfish.pod:283
19815 " guestfish [--ro] -i libvirt-domain\n"
19820 #: ../fish/guestfish.pod:285
19822 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
19823 "then using other commands to mount the filesystems that were found."
19827 #: ../fish/guestfish.pod:294
19828 msgid "B<--listen>"
19832 #: ../fish/guestfish.pod:296
19834 "Fork into the background and listen for remote commands. See section L</"
19835 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
19839 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
19844 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
19846 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
19847 "ATTACHING TO RUNNING DAEMONS>)."
19851 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
19852 msgid "B<-m dev[:mountpoint[:options]]>"
19856 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
19857 msgid "B<--mount dev[:mountpoint[:options]]>"
19861 #: ../fish/guestfish.pod:308
19862 msgid "Mount the named partition or logical volume on the given mountpoint."
19866 #: ../fish/guestfish.pod:310
19867 msgid "If the mountpoint is omitted, it defaults to C</>."
19871 #: ../fish/guestfish.pod:312
19872 msgid "You have to mount something on C</> before most commands will work."
19876 #: ../fish/guestfish.pod:314
19878 "If any I<-m> or I<--mount> options are given, the guest is automatically "
19883 #: ../fish/guestfish.pod:317
19885 "If you don't know what filesystems a disk image contains, you can either run "
19886 "guestfish without this option, then list the partitions, filesystems and LVs "
19887 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
19888 "commands), or you can use the L<virt-filesystems(1)> program."
19892 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
19894 "The third (and rarely used) part of the mount parameter is the list of mount "
19895 "options used to mount the underlying filesystem. If this is not given, then "
19896 "the mount options are either the empty string or C<ro> (the latter if the "
19897 "I<--ro> flag is used). By specifying the mount options, you override this "
19898 "default choice. Probably the only time you would use this is to enable ACLs "
19899 "and/or extended attributes if the filesystem can support them:"
19903 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
19906 " -m /dev/sda1:/:acl,user_xattr\n"
19911 #: ../fish/guestfish.pod:333
19912 msgid "Using this flag is equivalent to using the C<mount-options> command."
19916 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
19917 #: ../resize/virt-resize.pod:435
19922 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
19923 msgid "B<--no-sync>"
19927 #: ../fish/guestfish.pod:339
19929 "Disable autosync. This is enabled by default. See the discussion of "
19930 "autosync in the L<guestfs(3)> manpage."
19934 #: ../fish/guestfish.pod:342
19939 #: ../fish/guestfish.pod:344
19940 msgid "B<--new type>"
19944 #: ../fish/guestfish.pod:346
19949 #: ../fish/guestfish.pod:348
19951 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
19952 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
19953 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
19958 #: ../fish/guestfish.pod:353
19959 msgid "B<--progress-bars>"
19963 #: ../fish/guestfish.pod:355
19964 msgid "Enable progress bars, even when guestfish is used non-interactively."
19968 #: ../fish/guestfish.pod:357
19970 "Progress bars are enabled by default when guestfish is used as an "
19971 "interactive shell."
19975 #: ../fish/guestfish.pod:360
19976 msgid "B<--no-progress-bars>"
19980 #: ../fish/guestfish.pod:362
19981 msgid "Disable progress bars."
19985 #: ../fish/guestfish.pod:364
19986 msgid "B<--remote[=pid]>"
19990 #: ../fish/guestfish.pod:366
19992 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
19993 "CONTROL GUESTFISH OVER A SOCKET> below."
19997 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
19998 #: ../rescue/virt-rescue.pod:189
20003 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
20004 #: ../rescue/virt-rescue.pod:191
20009 #: ../fish/guestfish.pod:373
20011 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20012 "mounts are done read-only."
20016 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:195
20018 "The option must always be used if the disk image or virtual machine might be "
20019 "running, and is generally recommended in cases where you don't need write "
20020 "access to the disk."
20024 #: ../fish/guestfish.pod:380
20026 "Note that prepared disk images created with I<-N> are not affected by this "
20027 "option. Also commands like C<add> are not affected - you have to specify "
20028 "the C<readonly:true> option explicitly if you need it."
20032 #: ../fish/guestfish.pod:384
20033 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
20037 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
20038 #: ../rescue/virt-rescue.pod:201
20039 msgid "B<--selinux>"
20043 #: ../fish/guestfish.pod:388
20044 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
20048 #: ../fish/guestfish.pod:394
20050 "Enable very verbose messages. This is particularly useful if you find a bug."
20054 #: ../fish/guestfish.pod:401
20055 msgid "Display the guestfish / libguestfs version number and exit."
20059 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
20060 #: ../rescue/virt-rescue.pod:231
20065 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
20066 #: ../rescue/virt-rescue.pod:233
20071 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
20073 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20074 "mounts are done read-write."
20078 #: ../fish/guestfish.pod:410
20079 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
20083 #: ../fish/guestfish.pod:414
20084 msgid "Echo each command before executing it."
20088 #: ../fish/guestfish.pod:418
20089 msgid "COMMANDS ON COMMAND LINE"
20093 #: ../fish/guestfish.pod:420
20095 "Any additional (non-option) arguments are treated as commands to execute."
20099 #: ../fish/guestfish.pod:423
20101 "Commands to execute should be separated by a colon (C<:>), where the colon "
20102 "is a separate parameter. Thus:"
20106 #: ../fish/guestfish.pod:426
20109 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
20114 #: ../fish/guestfish.pod:428
20116 "If there are no additional arguments, then we enter a shell, either an "
20117 "interactive shell with a prompt (if the input is a terminal) or a non-"
20118 "interactive shell."
20122 #: ../fish/guestfish.pod:432
20124 "In either command line mode or non-interactive shell, the first command that "
20125 "gives an error causes the whole shell to exit. In interactive mode (with a "
20126 "prompt) if a command fails, you can continue to enter commands."
20130 #: ../fish/guestfish.pod:437
20131 msgid "USING launch (OR run)"
20135 #: ../fish/guestfish.pod:439
20137 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
20138 "then launch it, then mount any disks you need, and finally issue actions/"
20139 "commands. So the general order of the day is:"
20143 #: ../fish/guestfish.pod:447
20144 msgid "add or -a/--add"
20148 #: ../fish/guestfish.pod:451
20149 msgid "launch (aka run)"
20153 #: ../fish/guestfish.pod:455
20154 msgid "mount or -m/--mount"
20158 #: ../fish/guestfish.pod:459
20159 msgid "any other commands"
20163 #: ../fish/guestfish.pod:463
20165 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
20166 "guest before mounting or performing any other commands."
20170 #: ../fish/guestfish.pod:466
20172 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
20173 "I<--new> options were given then C<run> is done automatically, simply "
20174 "because guestfish can't perform the action you asked for without doing this."
20178 #: ../fish/guestfish.pod:471
20179 msgid "OPENING DISKS FOR READ AND WRITE"
20183 #: ../fish/guestfish.pod:473
20185 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
20186 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
20187 "I<-i> and I<-m> open disk images read-only or for writing."
20191 #: ../fish/guestfish.pod:478
20193 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
20194 "opening disk images supplied on the command line for write. To open a disk "
20195 "image read-only you have to do I<-a image --ro>."
20199 #: ../fish/guestfish.pod:482
20201 "This matters: If you accidentally open a live VM disk image writable then "
20202 "you will cause irreversible disk corruption."
20206 #: ../fish/guestfish.pod:485
20208 "In a future libguestfs we intend to change the default the other way. Disk "
20209 "images will be opened read-only. You will have to either specify "
20210 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
20211 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
20212 "access for disk images specified by those other command line options."
20216 #: ../fish/guestfish.pod:492
20218 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
20219 "which does nothing (it is already the default). However it is highly "
20220 "recommended that you use this option to indicate that you need write access, "
20221 "and prepare your scripts for the day when this option will be required for "
20226 #: ../fish/guestfish.pod:498
20228 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
20229 "other libguestfs program apart from guestfish and guestmount."
20233 #: ../fish/guestfish.pod:501
20238 #: ../fish/guestfish.pod:503
20240 "You can quote ordinary parameters using either single or double quotes. For "
20245 #: ../fish/guestfish.pod:506
20248 " add \"file with a space.img\"\n"
20253 #: ../fish/guestfish.pod:508
20256 " rm '/file name'\n"
20261 #: ../fish/guestfish.pod:510
20269 #: ../fish/guestfish.pod:512
20271 "A few commands require a list of strings to be passed. For these, use a "
20272 "whitespace-separated list, enclosed in quotes. Strings containing "
20273 "whitespace to be passed through must be enclosed in single quotes. A "
20274 "literal single quote must be escaped with a backslash."
20278 #: ../fish/guestfish.pod:517
20281 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
20282 " command \"/bin/echo 'foo bar'\"\n"
20283 " command \"/bin/echo \\'foo\\'\"\n"
20288 #: ../fish/guestfish.pod:521
20289 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
20293 #: ../fish/guestfish.pod:523
20295 "In double-quoted arguments (only) use backslash to insert special characters:"
20299 #: ../fish/guestfish.pod:528
20304 #: ../fish/guestfish.pod:530
20305 msgid "Alert (bell) character."
20309 #: ../fish/guestfish.pod:532
20314 #: ../fish/guestfish.pod:534
20315 msgid "Backspace character."
20319 #: ../fish/guestfish.pod:536
20324 #: ../fish/guestfish.pod:538
20325 msgid "Form feed character."
20329 #: ../fish/guestfish.pod:540
20334 #: ../fish/guestfish.pod:542
20335 msgid "Newline character."
20339 #: ../fish/guestfish.pod:544
20344 #: ../fish/guestfish.pod:546
20345 msgid "Carriage return character."
20349 #: ../fish/guestfish.pod:548
20354 #: ../fish/guestfish.pod:550
20355 msgid "Horizontal tab character."
20359 #: ../fish/guestfish.pod:552
20364 #: ../fish/guestfish.pod:554
20365 msgid "Vertical tab character."
20369 #: ../fish/guestfish.pod:556
20374 #: ../fish/guestfish.pod:558
20375 msgid "A literal double quote character."
20379 #: ../fish/guestfish.pod:560
20384 #: ../fish/guestfish.pod:562
20386 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
20391 #: ../fish/guestfish.pod:565
20396 #: ../fish/guestfish.pod:567
20398 "A character with hex value I<hh>. There must be precisely 2 hex digits."
20402 #: ../fish/guestfish.pod:570
20404 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
20409 #: ../fish/guestfish.pod:573
20414 #: ../fish/guestfish.pod:575
20415 msgid "A literal backslash character."
20419 #: ../fish/guestfish.pod:579
20420 msgid "OPTIONAL ARGUMENTS"
20424 #: ../fish/guestfish.pod:581
20426 "Some commands take optional arguments. These arguments appear in this "
20427 "documentation as C<[argname:..]>. You can use them as in these examples:"
20431 #: ../fish/guestfish.pod:585
20434 " add-drive-opts filename\n"
20439 #: ../fish/guestfish.pod:587
20442 " add-drive-opts filename readonly:true\n"
20447 #: ../fish/guestfish.pod:589
20450 " add-drive-opts filename format:qcow2 readonly:false\n"
20455 #: ../fish/guestfish.pod:591
20457 "Each optional argument can appear at most once. All optional arguments must "
20458 "appear after the required ones."
20462 #: ../fish/guestfish.pod:594
20467 #: ../fish/guestfish.pod:596
20469 "This section applies to all commands which can take integers as parameters."
20473 #: ../fish/guestfish.pod:599
20474 msgid "SIZE SUFFIX"
20478 #: ../fish/guestfish.pod:601
20480 "When the command takes a parameter measured in bytes, you can use one of the "
20481 "following suffixes to specify kilobytes, megabytes and larger sizes:"
20485 #: ../fish/guestfish.pod:607
20486 msgid "B<k> or B<K> or B<KiB>"
20490 #: ../fish/guestfish.pod:609
20491 msgid "The size in kilobytes (multiplied by 1024)."
20495 #: ../fish/guestfish.pod:611
20500 #: ../fish/guestfish.pod:613
20501 msgid "The size in SI 1000 byte units."
20505 #: ../fish/guestfish.pod:615
20506 msgid "B<M> or B<MiB>"
20510 #: ../fish/guestfish.pod:617
20511 msgid "The size in megabytes (multiplied by 1048576)."
20515 #: ../fish/guestfish.pod:619
20520 #: ../fish/guestfish.pod:621
20521 msgid "The size in SI 1000000 byte units."
20525 #: ../fish/guestfish.pod:623
20526 msgid "B<G> or B<GiB>"
20530 #: ../fish/guestfish.pod:625
20531 msgid "The size in gigabytes (multiplied by 2**30)."
20535 #: ../fish/guestfish.pod:627
20540 #: ../fish/guestfish.pod:629
20541 msgid "The size in SI 10**9 byte units."
20545 #: ../fish/guestfish.pod:631
20546 msgid "B<T> or B<TiB>"
20550 #: ../fish/guestfish.pod:633
20551 msgid "The size in terabytes (multiplied by 2**40)."
20555 #: ../fish/guestfish.pod:635
20560 #: ../fish/guestfish.pod:637
20561 msgid "The size in SI 10**12 byte units."
20565 #: ../fish/guestfish.pod:639
20566 msgid "B<P> or B<PiB>"
20570 #: ../fish/guestfish.pod:641
20571 msgid "The size in petabytes (multiplied by 2**50)."
20575 #: ../fish/guestfish.pod:643
20580 #: ../fish/guestfish.pod:645
20581 msgid "The size in SI 10**15 byte units."
20585 #: ../fish/guestfish.pod:647
20586 msgid "B<E> or B<EiB>"
20590 #: ../fish/guestfish.pod:649
20591 msgid "The size in exabytes (multiplied by 2**60)."
20595 #: ../fish/guestfish.pod:651
20600 #: ../fish/guestfish.pod:653
20601 msgid "The size in SI 10**18 byte units."
20605 #: ../fish/guestfish.pod:655
20606 msgid "B<Z> or B<ZiB>"
20610 #: ../fish/guestfish.pod:657
20611 msgid "The size in zettabytes (multiplied by 2**70)."
20615 #: ../fish/guestfish.pod:659
20620 #: ../fish/guestfish.pod:661
20621 msgid "The size in SI 10**21 byte units."
20625 #: ../fish/guestfish.pod:663
20626 msgid "B<Y> or B<YiB>"
20630 #: ../fish/guestfish.pod:665
20631 msgid "The size in yottabytes (multiplied by 2**80)."
20635 #: ../fish/guestfish.pod:667
20640 #: ../fish/guestfish.pod:669
20641 msgid "The size in SI 10**24 byte units."
20645 #: ../fish/guestfish.pod:675
20648 " truncate-size /file 1G\n"
20653 #: ../fish/guestfish.pod:677
20654 msgid "would truncate the file to 1 gigabyte."
20658 #: ../fish/guestfish.pod:679
20660 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
20661 "the parameter to L</memsize> is specified in megabytes already). Adding a "
20662 "suffix will probably not do what you expect."
20666 #: ../fish/guestfish.pod:683
20667 msgid "OCTAL AND HEXADECIMAL NUMBERS"
20671 #: ../fish/guestfish.pod:685
20673 "For specifying the radix (base) use the C convention: C<0> to prefix an "
20674 "octal number or C<0x> to prefix a hexadecimal number. For example:"
20678 #: ../fish/guestfish.pod:688
20681 " 1234 decimal number 1234\n"
20682 " 02322 octal number, equivalent to decimal 1234\n"
20683 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
20688 #: ../fish/guestfish.pod:692
20690 "When using the C<chmod> command, you almost always want to specify an octal "
20691 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
20692 "L<chmod(1)> program):"
20696 #: ../fish/guestfish.pod:696
20699 " chmod 0777 /public # OK\n"
20700 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20705 #: ../fish/guestfish.pod:699
20707 "Commands that return numbers usually print them in decimal, but some "
20708 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20709 "octal, preceeded by C<0>)."
20713 #: ../fish/guestfish.pod:703
20714 msgid "WILDCARDS AND GLOBBING"
20718 #: ../fish/guestfish.pod:705
20720 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20721 "(globbing) by default. So for example the following will not do what you "
20726 #: ../fish/guestfish.pod:709
20734 #: ../fish/guestfish.pod:711
20736 "Assuming you don't have a directory called literally C</home/*> then the "
20737 "above command will return an error."
20741 #: ../fish/guestfish.pod:714
20742 msgid "To perform wildcard expansion, use the C<glob> command."
20746 #: ../fish/guestfish.pod:716
20749 " glob rm-rf /home/*\n"
20754 #: ../fish/guestfish.pod:718
20756 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20757 "many times), equivalent to:"
20761 #: ../fish/guestfish.pod:721
20764 " rm-rf /home/jim\n"
20765 " rm-rf /home/joe\n"
20766 " rm-rf /home/mary\n"
20771 #: ../fish/guestfish.pod:725
20772 msgid "C<glob> only works on simple guest paths and not on device names."
20776 #: ../fish/guestfish.pod:727
20778 "If you have several parameters, each containing a wildcard, then glob will "
20779 "perform a Cartesian product."
20783 #: ../fish/guestfish.pod:730
20788 #: ../fish/guestfish.pod:732
20790 "Any line which starts with a I<#> character is treated as a comment and "
20791 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20792 "a command. For example:"
20796 #: ../fish/guestfish.pod:736
20799 " # this is a comment\n"
20800 " # this is a comment\n"
20801 " foo # NOT a comment\n"
20806 #: ../fish/guestfish.pod:740
20807 msgid "Blank lines are also ignored."
20811 #: ../fish/guestfish.pod:742
20812 msgid "RUNNING COMMANDS LOCALLY"
20816 #: ../fish/guestfish.pod:744
20818 "Any line which starts with a I<!> character is treated as a command sent to "
20819 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20823 #: ../fish/guestfish.pod:748
20827 " tgz-out /remote local/remote-data.tar.gz\n"
20832 #: ../fish/guestfish.pod:751
20834 "will create a directory C<local> on the host, and then export the contents "
20835 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20836 "(See C<tgz-out>)."
20840 #: ../fish/guestfish.pod:755
20842 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20843 "effect, due to the way that subprocesses work in Unix."
20847 #: ../fish/guestfish.pod:758
20848 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20852 #: ../fish/guestfish.pod:760
20854 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20855 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20856 "and executed as guestfish commands."
20860 #: ../fish/guestfish.pod:764
20862 "Thus you can use shell script to construct arbitrary guestfish commands "
20863 "which are then parsed by guestfish."
20867 #: ../fish/guestfish.pod:767
20869 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20870 "through C</foo.100>) using guestfish commands alone. However this is simple "
20871 "if we use a shell script to create the guestfish commands for us:"
20875 #: ../fish/guestfish.pod:772
20878 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20883 #: ../fish/guestfish.pod:774
20884 msgid "or with names like C</foo.001>:"
20888 #: ../fish/guestfish.pod:776
20891 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20896 #: ../fish/guestfish.pod:778
20898 "When using guestfish interactively it can be helpful to just run the shell "
20899 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20900 "ordinary I<!> local command), see what guestfish commands it would run, and "
20901 "when you are happy with those prepend the C<E<lt>> character to run the "
20902 "guestfish commands for real."
20906 #: ../fish/guestfish.pod:784
20911 #: ../fish/guestfish.pod:786
20913 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
20914 "command (a guestfish command) to the second command (any host command). For "
20919 #: ../fish/guestfish.pod:790
20922 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
20927 #: ../fish/guestfish.pod:792
20929 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
20930 "program). The above command would list all accounts in the guest filesystem "
20931 "which have UID 0, ie. root accounts including backdoors. Other examples:"
20935 #: ../fish/guestfish.pod:797
20938 " hexdump /bin/ls | head\n"
20939 " list-devices | tail -1\n"
20940 " tgz-out / - | tar ztf -\n"
20945 #: ../fish/guestfish.pod:801
20947 "The space before the pipe symbol is required, any space after the pipe "
20948 "symbol is optional. Everything after the pipe symbol is just passed "
20949 "straight to the host shell, so it can contain redirections, globs and "
20950 "anything else that makes sense on the host side."
20954 #: ../fish/guestfish.pod:806
20956 "To use a literal argument which begins with a pipe symbol, you have to quote "
20961 #: ../fish/guestfish.pod:809
20969 #: ../fish/guestfish.pod:811
20970 msgid "HOME DIRECTORIES"
20974 #: ../fish/guestfish.pod:813
20976 "If a parameter starts with the character C<~> then the tilde may be expanded "
20977 "as a home directory path (either C<~> for the current user's home directory, "
20978 "or C<~user> for another user)."
20982 #: ../fish/guestfish.pod:817
20984 "Note that home directory expansion happens for users known I<on the host>, "
20985 "not in the guest filesystem."
20989 #: ../fish/guestfish.pod:820
20991 "To use a literal argument which begins with a tilde, you have to quote it, "
20996 #: ../fish/guestfish.pod:823
21004 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:534
21005 msgid "ENCRYPTED DISKS"
21009 #: ../fish/guestfish.pod:827
21011 "Libguestfs has some support for Linux guests encrypted according to the "
21012 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
21013 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
21014 "LUKS is supported."
21018 #: ../fish/guestfish.pod:832
21019 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
21023 #: ../fish/guestfish.pod:834
21026 " ><fs> vfs-type /dev/sda2\n"
21032 #: ../fish/guestfish.pod:837
21034 "Then open those devices using L</luks-open>. This creates a device-mapper "
21035 "device called C</dev/mapper/luksdev>."
21039 #: ../fish/guestfish.pod:840
21042 " ><fs> luks-open /dev/sda2 luksdev\n"
21043 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
21048 #: ../fish/guestfish.pod:843
21050 "Finally you have to tell LVM to scan for volume groups on the newly created "
21055 #: ../fish/guestfish.pod:846
21059 " vg-activate-all true\n"
21064 #: ../fish/guestfish.pod:849
21065 msgid "The logical volume(s) can now be mounted in the usual way."
21069 #: ../fish/guestfish.pod:851
21071 "Before closing a LUKS device you must unmount any logical volumes on it and "
21072 "deactivate the volume groups by calling C<vg-activate false VG> on each "
21073 "one. Then you can close the mapper device:"
21077 #: ../fish/guestfish.pod:855
21080 " vg-activate false /dev/VG\n"
21081 " luks-close /dev/mapper/luksdev\n"
21086 #: ../fish/guestfish.pod:860
21088 "If a path is prefixed with C<win:> then you can use Windows-style drive "
21089 "letters and paths (with some limitations). The following commands are "
21094 #: ../fish/guestfish.pod:864
21097 " file /WINDOWS/system32/config/system.LOG\n"
21102 #: ../fish/guestfish.pod:866
21105 " file win:\\windows\\system32\\config\\system.log\n"
21110 #: ../fish/guestfish.pod:868
21113 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
21118 #: ../fish/guestfish.pod:870
21120 "The parameter is rewritten \"behind the scenes\" by looking up the position "
21121 "where the drive is mounted, prepending that to the path, changing all "
21122 "backslash characters to forward slash, then resolving the result using L</"
21123 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
21124 "the parameter might be rewritten like this:"
21128 #: ../fish/guestfish.pod:876
21131 " win:e:\\foo\\bar => /e/FOO/bar\n"
21136 #: ../fish/guestfish.pod:878
21137 msgid "This only works in argument positions that expect a path."
21141 #: ../fish/guestfish.pod:880
21142 msgid "UPLOADING AND DOWNLOADING FILES"
21146 #: ../fish/guestfish.pod:882
21148 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
21149 "others which upload from or download to a local file, you can use the "
21150 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
21154 #: ../fish/guestfish.pod:886
21162 #: ../fish/guestfish.pod:888
21164 "reads stdin and creates from that a file C</foo> in the disk image, and:"
21168 #: ../fish/guestfish.pod:891
21171 " tar-out /etc - | tar tf -\n"
21176 #: ../fish/guestfish.pod:893
21178 "writes the tarball to stdout and then pipes that into the external \"tar\" "
21179 "command (see L</PIPES>)."
21183 #: ../fish/guestfish.pod:896
21185 "When using C<-> to read from stdin, the input is read up to the end of "
21186 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
21187 "some arbitrary end marker:"
21191 #: ../fish/guestfish.pod:900
21194 " upload -<<END /foo\n"
21203 #: ../fish/guestfish.pod:906
21205 "Any string of characters can be used instead of C<END>. The end marker must "
21206 "appear on a line of its own, without any preceeding or following characters "
21207 "(not even spaces)."
21211 #: ../fish/guestfish.pod:910
21213 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
21214 "upload local files (so-called \"FileIn\" parameters in the generator)."
21218 #: ../fish/guestfish.pod:913
21219 msgid "EXIT ON ERROR BEHAVIOUR"
21223 #: ../fish/guestfish.pod:915
21225 "By default, guestfish will ignore any errors when in interactive mode (ie. "
21226 "taking commands from a human over a tty), and will exit on the first error "
21227 "in non-interactive mode (scripts, commands given on the command line)."
21231 #: ../fish/guestfish.pod:920
21233 "If you prefix a command with a I<-> character, then that command will not "
21234 "cause guestfish to exit, even if that (one) command returns an error."
21238 #: ../fish/guestfish.pod:924
21239 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
21243 #: ../fish/guestfish.pod:926
21245 "Guestfish can be remote-controlled over a socket. This is useful "
21246 "particularly in shell scripts where you want to make several different "
21247 "changes to a filesystem, but you don't want the overhead of starting up a "
21248 "guestfish process each time."
21252 #: ../fish/guestfish.pod:931
21253 msgid "Start a guestfish server process using:"
21257 #: ../fish/guestfish.pod:933
21260 " eval \"`guestfish --listen`\"\n"
21265 #: ../fish/guestfish.pod:935
21266 msgid "and then send it commands by doing:"
21270 #: ../fish/guestfish.pod:937
21273 " guestfish --remote cmd [...]\n"
21278 #: ../fish/guestfish.pod:939
21279 msgid "To cause the server to exit, send it the exit command:"
21283 #: ../fish/guestfish.pod:943
21285 "Note that the server will normally exit if there is an error in a command. "
21286 "You can change this in the usual way. See section L</EXIT ON ERROR "
21291 #: ../fish/guestfish.pod:947
21292 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
21296 #: ../fish/guestfish.pod:949
21298 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
21299 "is how the I<--remote> option knows where to send the commands. You can "
21300 "have several guestfish listener processes running using:"
21304 #: ../fish/guestfish.pod:953
21307 " eval \"`guestfish --listen`\"\n"
21308 " pid1=$GUESTFISH_PID\n"
21309 " eval \"`guestfish --listen`\"\n"
21310 " pid2=$GUESTFISH_PID\n"
21312 " guestfish --remote=$pid1 cmd\n"
21313 " guestfish --remote=$pid2 cmd\n"
21318 #: ../fish/guestfish.pod:961
21319 msgid "REMOTE CONTROL AND CSH"
21323 #: ../fish/guestfish.pod:963
21325 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
21330 #: ../fish/guestfish.pod:966
21333 " eval \"`guestfish --listen --csh`\"\n"
21338 #: ../fish/guestfish.pod:968
21339 msgid "REMOTE CONTROL DETAILS"
21343 #: ../fish/guestfish.pod:970
21345 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
21346 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
21347 "and C<$PID> is the process ID of the server."
21351 #: ../fish/guestfish.pod:974
21352 msgid "Guestfish client and server versions must match exactly."
21356 #: ../fish/guestfish.pod:976
21357 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
21361 #: ../fish/guestfish.pod:978
21363 "From Bash, you can use the following code which creates a guestfish "
21364 "instance, correctly quotes the command line, handles failure to start, and "
21365 "cleans up guestfish when the script exits:"
21369 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:980
21377 #: ../fish/guestfish.pod:986
21380 " guestfish[0]=\"guestfish\"\n"
21381 " guestfish[1]=\"--listen\"\n"
21382 " guestfish[2]=\"--ro\"\n"
21383 " guestfish[3]=\"-a\"\n"
21384 " guestfish[4]=\"disk.img\"\n"
21389 #: ../fish/guestfish.pod:992
21392 " GUESTFISH_PID=\n"
21393 " eval $(\"${guestfish[@]}\")\n"
21394 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
21395 " echo \"error: guestfish didn't start up, see error messages above\"\n"
21402 #: ../fish/guestfish.pod:999
21405 " cleanup_guestfish ()\n"
21407 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
21409 " trap cleanup_guestfish EXIT ERR\n"
21414 #: ../fish/guestfish.pod:1005
21417 " guestfish --remote -- run\n"
21422 #: ../fish/guestfish.pod:1007
21430 #: ../fish/guestfish.pod:1009
21431 msgid "REMOTE CONTROL RUN COMMAND HANGING"
21435 #: ../fish/guestfish.pod:1011
21437 "Using the C<run> (or C<launch>) command remotely in a command substitution "
21438 "context hangs, ie. don't do (note the backquotes):"
21442 #: ../fish/guestfish.pod:1014
21445 " a=`guestfish --remote run`\n"
21450 #: ../fish/guestfish.pod:1016
21452 "Since the C<run> command produces no output on stdout, this is not useful "
21453 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
21458 #: ../fish/guestfish.pod:1020
21459 msgid "PREPARED DISK IMAGES"
21463 #: ../fish/guestfish.pod:1022
21465 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
21466 "preformatted disk images that guestfish can make for you to save typing. "
21467 "This is particularly useful for testing purposes. This option is used "
21468 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
21469 "can be mixed with I<-a>)."
21473 #: ../fish/guestfish.pod:1028
21475 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
21476 "the second and so on. Existing files in the current directory are "
21481 #: ../fish/guestfish.pod:1032
21483 "The type briefly describes how the disk should be sized, partitioned, how "
21484 "filesystem(s) should be created, and how content should be added. "
21485 "Optionally the type can be followed by extra parameters, separated by C<:> "
21486 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
21487 "allocated disk, containing a single partition, with the partition formatted "
21488 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
21493 #: ../fish/guestfish.pod:1040
21494 msgid "To list the available types and any extra parameters they take, run:"
21498 #: ../fish/guestfish.pod:1044
21500 "Note that the prepared filesystem is not mounted. You would usually have to "
21501 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
21505 #: ../fish/guestfish.pod:1048
21507 "If any I<-N> or I<--new> options are given, the guest is automatically "
21512 #: ../fish/guestfish.pod:1053
21513 msgid "Create a 100MB disk with an ext4-formatted partition:"
21517 #: ../fish/guestfish.pod:1055
21520 " guestfish -N fs:ext4\n"
21525 #: ../fish/guestfish.pod:1057
21526 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
21530 #: ../fish/guestfish.pod:1059
21533 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
21538 #: ../fish/guestfish.pod:1061
21539 msgid "Create a blank 200MB disk:"
21543 #: ../fish/guestfish.pod:1063
21546 " guestfish -N disk:200M\n"
21551 #: ../fish/guestfish.pod:1065
21552 msgid "PROGRESS BARS"
21556 #: ../fish/guestfish.pod:1067
21558 "Some (not all) long-running commands send progress notification messages as "
21559 "they are running. Guestfish turns these messages into progress bars."
21563 #: ../fish/guestfish.pod:1071
21565 "When a command that supports progress bars takes longer than two seconds to "
21566 "run, and if progress bars are enabled, then you will see one appearing below "
21571 #: ../fish/guestfish.pod:1075
21574 " ><fs> copy-size /large-file /another-file 2048M\n"
21575 " / 10% [#####-----------------------------------------] 00:30\n"
21580 #: ../fish/guestfish.pod:1078
21582 "The spinner on the left hand side moves round once for every progress "
21583 "notification received from the backend. This is a (reasonably) golden "
21584 "assurance that the command is \"doing something\" even if the progress bar "
21585 "is not moving, because the command is able to send the progress "
21586 "notifications. When the bar reaches 100% and the command finishes, the "
21587 "spinner disappears."
21591 #: ../fish/guestfish.pod:1085
21593 "Progress bars are enabled by default when guestfish is used interactively. "
21594 "You can enable them even for non-interactive modes using I<--progress-bars>, "
21595 "and you can disable them completely using I<--no-progress-bars>."
21599 #: ../fish/guestfish.pod:1090
21600 msgid "GUESTFISH COMMANDS"
21604 #: ../fish/guestfish.pod:1092
21606 "The commands in this section are guestfish convenience commands, in other "
21607 "words, they are not part of the L<guestfs(3)> API."
21611 #: ../fish/guestfish.pod:1095
21616 #: ../fish/guestfish.pod:1097
21625 #: ../fish/guestfish.pod:1100
21626 msgid "Without any parameter, this provides general help."
21630 #: ../fish/guestfish.pod:1102
21631 msgid "With a C<cmd> parameter, this displays detailed help for that command."
21635 #: ../fish/guestfish.pod:1104
21636 msgid "quit | exit"
21640 #: ../fish/guestfish.pod:1106
21641 msgid "This exits guestfish. You can also use C<^D> key."
21645 #: ../fish/guestfish.pod:1108
21646 msgid "@FISH_COMMANDS@"
21650 #: ../fish/guestfish.pod:1110
21655 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1520
21660 #: ../fish/guestfish.pod:1116
21662 "guestfish returns 0 if the commands completed without error, or 1 if there "
21667 #: ../fish/guestfish.pod:1123
21672 #: ../fish/guestfish.pod:1125
21674 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
21679 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3218
21680 msgid "FEBOOTSTRAP_KERNEL"
21684 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3220
21685 msgid "FEBOOTSTRAP_MODULES"
21689 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3222
21691 "These two environment variables allow the kernel that libguestfs uses in the "
21692 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
21693 "most recent host kernel is chosen. For more information about kernel "
21694 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
21695 "available in febootstrap E<ge> 3.8."
21699 #: ../fish/guestfish.pod:1138
21700 msgid "GUESTFISH_DISPLAY_IMAGE"
21704 #: ../fish/guestfish.pod:1140
21706 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
21707 "If not set, it uses L<display(1)>."
21711 #: ../fish/guestfish.pod:1143
21712 msgid "GUESTFISH_PID"
21716 #: ../fish/guestfish.pod:1145
21718 "Used with the I<--remote> option to specify the remote guestfish process to "
21719 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21723 #: ../fish/guestfish.pod:1149
21728 #: ../fish/guestfish.pod:1151
21730 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21731 "not specified, the external L<hexedit(1)> program is used."
21735 #: ../fish/guestfish.pod:1155
21740 #: ../fish/guestfish.pod:1157
21742 "If compiled with GNU readline support, various files in the home directory "
21743 "can be used. See L</FILES>."
21747 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3228
21748 msgid "LIBGUESTFS_APPEND"
21752 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3230
21753 msgid "Pass additional options to the guest kernel."
21757 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3232
21758 msgid "LIBGUESTFS_DEBUG"
21762 #: ../fish/guestfish.pod:1166
21764 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21765 "effect as using the B<-v> option."
21769 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3237
21770 msgid "LIBGUESTFS_MEMSIZE"
21774 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3239
21776 "Set the memory allocated to the qemu process, in megabytes. For example:"
21780 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3242
21783 " LIBGUESTFS_MEMSIZE=700\n"
21788 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3244
21789 msgid "LIBGUESTFS_PATH"
21793 #: ../fish/guestfish.pod:1178
21795 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21796 "the discussion of paths in L<guestfs(3)>."
21800 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3249
21801 msgid "LIBGUESTFS_QEMU"
21805 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3251
21807 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
21808 "which was found at compile time by the configure script is used."
21812 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3257
21813 msgid "LIBGUESTFS_TRACE"
21817 #: ../fish/guestfish.pod:1189
21818 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21822 #: ../fish/guestfish.pod:1191
21827 #: ../fish/guestfish.pod:1193
21829 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21834 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:254
21835 #: ../src/guestfs.pod:3262
21840 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3264
21842 "Location of temporary directory, defaults to C</tmp> except for the cached "
21843 "supermin appliance which defaults to C</var/tmp>."
21847 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3267
21849 "If libguestfs was compiled to use the supermin appliance then the real "
21850 "appliance is cached in this directory, shared between all handles belonging "
21851 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
21852 "use in case C</var/tmp> is not large enough."
21856 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
21857 #: ../rescue/virt-rescue.pod:310
21862 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
21863 #: ../rescue/virt-rescue.pod:314
21864 msgid "$HOME/.libguestfs-tools.rc"
21868 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
21869 #: ../rescue/virt-rescue.pod:316
21870 msgid "/etc/libguestfs-tools.conf"
21874 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
21875 #: ../rescue/virt-rescue.pod:318
21877 "This configuration file controls the default read-only or read-write mode "
21878 "(I<--ro> or I<--rw>)."
21882 #: ../fish/guestfish.pod:1220
21883 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21887 #: ../fish/guestfish.pod:1222
21888 msgid "$HOME/.guestfish"
21892 #: ../fish/guestfish.pod:1224
21894 "If compiled with GNU readline support, then the command history is saved in "
21899 #: ../fish/guestfish.pod:1227
21900 msgid "$HOME/.inputrc"
21904 #: ../fish/guestfish.pod:1229
21905 msgid "/etc/inputrc"
21909 #: ../fish/guestfish.pod:1231
21911 "If compiled with GNU readline support, then these files can be used to "
21912 "configure readline. For further information, please see L<readline(3)/"
21913 "INITIALIZATION FILE>."
21917 #: ../fish/guestfish.pod:1235
21918 msgid "To write rules which only apply to guestfish, use:"
21922 #: ../fish/guestfish.pod:1237
21932 #: ../fish/guestfish.pod:1241
21934 "Variables that you can set in inputrc that change the behaviour of guestfish "
21935 "in useful ways include:"
21939 #: ../fish/guestfish.pod:1246
21940 msgid "completion-ignore-case (default: on)"
21944 #: ../fish/guestfish.pod:1248
21946 "By default, guestfish will ignore case when tab-completing paths on the "
21951 #: ../fish/guestfish.pod:1251
21954 " set completion-ignore-case off\n"
21959 #: ../fish/guestfish.pod:1253
21960 msgid "to make guestfish case sensitive."
21964 #: ../fish/guestfish.pod:1257
21969 #: ../fish/guestfish.pod:1259
21970 msgid "test2.img (etc)"
21974 #: ../fish/guestfish.pod:1261
21976 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21977 "will be created in the file C<test1.img> in the current directory. The "
21978 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21979 "the same name will be overwritten."
21983 #: ../fish/guestfish.pod:1270
21985 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
21986 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit"
21987 "(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems"
21988 "(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-"
21989 "rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, "
21990 "L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, "
21991 "L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
21995 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3360
21996 #: ../test-tool/libguestfs-test-tool.pod:112
21997 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
22001 #: ../fish/virt-copy-in.pod:5
22003 "virt-copy-in - Copy files and directories into a virtual machine disk image."
22007 #: ../fish/virt-copy-in.pod:9
22010 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
22015 #: ../fish/virt-copy-in.pod:11
22018 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
22023 #: ../fish/virt-copy-in.pod:15
22025 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
22026 "causing disk corruption. The virtual machine must be shut down before you "
22027 "use this command."
22031 #: ../fish/virt-copy-in.pod:21
22033 "C<virt-copy-in> copies files and directories from the local disk into a "
22034 "virtual machine disk image or named libvirt domain."
22038 #: ../fish/virt-copy-in.pod:24
22040 "You can give one of more filenames and directories on the command line. "
22041 "Directories are copied in recursively. The final parameter must be the "
22042 "destination directory in the disk image which must be an absolute path "
22043 "starting with a C</> character."
22047 #: ../fish/virt-copy-in.pod:33
22050 " virt-copy-in -d MyGuest resolv.conf /etc\n"
22055 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
22056 msgid "Upload a home directory to a guest:"
22060 #: ../fish/virt-copy-in.pod:37
22063 " virt-copy-in -d MyGuest skel /home\n"
22068 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
22069 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
22070 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
22074 #: ../fish/virt-copy-in.pod:41
22076 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22077 "> C<copy-in> command. For anything more complex than a trivial copy, you "
22078 "are probably better off using guestfish directly."
22082 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
22083 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
22085 "Since the shell script just passes options straight to guestfish, read "
22086 "L<guestfish(1)> to see the full list of options."
22090 #: ../fish/virt-copy-in.pod:52
22092 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
22093 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
22097 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
22098 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
22099 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
22103 #: ../fish/virt-copy-out.pod:5
22105 "virt-copy-out - Copy files and directories out of a virtual machine disk "
22110 #: ../fish/virt-copy-out.pod:9
22113 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
22118 #: ../fish/virt-copy-out.pod:11
22121 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
22126 #: ../fish/virt-copy-out.pod:15
22128 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
22129 "image or named libvirt domain."
22133 #: ../fish/virt-copy-out.pod:18
22135 "You can give one of more filenames and directories on the command line. "
22136 "Directories are copied out recursively."
22140 #: ../fish/virt-copy-out.pod:23
22141 msgid "Download the home directories from a virtual machine:"
22145 #: ../fish/virt-copy-out.pod:25
22149 " virt-copy-out -d MyGuest /home homes\n"
22154 #: ../fish/virt-copy-out.pod:30
22156 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22157 "> C<copy-out> command. For anything more complex than a trivial copy, you "
22158 "are probably better off using guestfish directly."
22162 #: ../fish/virt-copy-out.pod:41
22164 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
22165 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
22169 #: ../fish/virt-tar-in.pod:5
22170 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
22174 #: ../fish/virt-tar-in.pod:9
22177 " virt-tar-in -a disk.img data.tar /destination\n"
22182 #: ../fish/virt-tar-in.pod:11
22185 " virt-tar-in -d domain data.tar /destination\n"
22190 #: ../fish/virt-tar-in.pod:13
22193 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
22198 #: ../fish/virt-tar-in.pod:17
22200 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
22201 "causing disk corruption. The virtual machine must be shut down before you "
22202 "use this command."
22206 #: ../fish/virt-tar-in.pod:23
22208 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
22209 "image or named libvirt domain."
22213 #: ../fish/virt-tar-in.pod:26
22215 "The first parameter is the tar file. Use C<-> to read the tar file from "
22216 "standard input. The second parameter is the absolute target directory to "
22221 #: ../fish/virt-tar-in.pod:34
22224 " virt-tar-in -d MyGuest homes.tar /home\n"
22229 #: ../fish/virt-tar-in.pod:38
22231 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22232 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
22233 "probably better off using guestfish directly."
22237 #: ../fish/virt-tar-in.pod:49
22239 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
22240 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
22245 #: ../fish/virt-tar-out.pod:5
22247 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
22251 #: ../fish/virt-tar-out.pod:9
22254 " virt-tar-out -a disk.img /dir files.tar\n"
22259 #: ../fish/virt-tar-out.pod:11
22262 " virt-tar-out -d domain /dir files.tar\n"
22267 #: ../fish/virt-tar-out.pod:13
22270 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
22275 #: ../fish/virt-tar-out.pod:17
22277 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
22281 #: ../fish/virt-tar-out.pod:20
22283 "The first parameter is the absolute path of the virtual machine directory. "
22284 "The second parameter is the tar file to write. Use C<-> to write to "
22289 #: ../fish/virt-tar-out.pod:26
22290 msgid "Download the home directories from a guest:"
22294 #: ../fish/virt-tar-out.pod:28
22297 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
22302 #: ../fish/virt-tar-out.pod:32
22304 "This command is just a simple shell script wrapper around the L<guestfish(1)"
22305 "> C<tar-out> command. For anything more complex than a trivial copy, you "
22306 "are probably better off using guestfish directly."
22310 #: ../fish/virt-tar-out.pod:43
22312 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
22313 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
22317 #: ../fuse/guestmount.pod:5
22319 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
22323 #: ../fuse/guestmount.pod:9
22326 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
22331 #: ../fuse/guestmount.pod:11
22334 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
22339 #: ../fuse/guestmount.pod:13
22342 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
22347 #: ../fuse/guestmount.pod:17
22349 "You must I<not> use C<guestmount> in read-write mode on live virtual "
22350 "machines. If you do this, you risk disk corruption in the VM."
22354 #: ../fuse/guestmount.pod:22
22356 "The guestmount program can be used to mount virtual machine filesystems and "
22357 "other disk images on the host. It uses libguestfs for access to the guest "
22358 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
22359 "a mountable device."
22363 #: ../fuse/guestmount.pod:27
22365 "Along with other options, you have to give at least one device (I<-a> "
22366 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
22367 "option) or use the I<-i> inspection option or the I<--live> option. How "
22368 "this works is better explained in the L<guestfish(1)> manual page, or by "
22369 "looking at the examples below."
22373 #: ../fuse/guestmount.pod:33
22375 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
22376 "by you, and the filesystem will not be visible to any other users unless you "
22377 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
22378 "the filesystem, use the C<fusermount -u> command."
22382 #: ../fuse/guestmount.pod:41
22384 "For a typical Windows guest which has its main filesystem on the first "
22389 #: ../fuse/guestmount.pod:44
22392 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
22397 #: ../fuse/guestmount.pod:46
22399 "For a typical Linux guest which has a /boot filesystem on the first "
22400 "partition, and the root filesystem on a logical volume:"
22404 #: ../fuse/guestmount.pod:49
22407 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
22412 #: ../fuse/guestmount.pod:51
22413 msgid "To get libguestfs to detect guest mountpoints for you:"
22417 #: ../fuse/guestmount.pod:53
22420 " guestmount -a guest.img -i --ro /mnt\n"
22425 #: ../fuse/guestmount.pod:55
22426 msgid "For a libvirt guest called \"Guest\" you could do:"
22430 #: ../fuse/guestmount.pod:57
22433 " guestmount -d Guest -i --ro /mnt\n"
22438 #: ../fuse/guestmount.pod:59
22440 "If you don't know what filesystems are contained in a guest or disk image, "
22441 "use L<virt-filesystems(1)> first:"
22445 #: ../fuse/guestmount.pod:62
22448 " virt-filesystems MyGuest\n"
22453 #: ../fuse/guestmount.pod:64
22455 "If you want to trace the libguestfs calls but without excessive debugging "
22456 "information, we recommend:"
22460 #: ../fuse/guestmount.pod:67
22463 " guestmount [...] --trace /mnt\n"
22468 #: ../fuse/guestmount.pod:69
22469 msgid "If you want to debug the program, we recommend:"
22473 #: ../fuse/guestmount.pod:71
22476 " guestmount [...] --trace --verbose /mnt\n"
22481 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:96
22482 #: ../resize/virt-resize.pod:621
22487 #: ../fuse/guestmount.pod:75
22488 msgid "Other users cannot see the filesystem by default"
22492 #: ../fuse/guestmount.pod:77
22494 "If you mount a filesystem as one user (eg. root), then other users will not "
22495 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
22496 "option when mounting:"
22500 #: ../fuse/guestmount.pod:81
22503 " sudo guestmount [...] -o allow_other /mnt\n"
22508 #: ../fuse/guestmount.pod:83
22509 msgid "Enabling FUSE"
22513 #: ../fuse/guestmount.pod:85
22515 "On some distros, you may need to add yourself to a special group (eg. "
22516 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
22517 "Debian and derivatives."
22521 #: ../fuse/guestmount.pod:89
22523 "On other distros, no special group is required. It is not necessary on "
22524 "Fedora or Red Hat Enterprise Linux."
22528 #: ../fuse/guestmount.pod:100
22529 msgid "Add a block device or virtual machine image."
22533 #: ../fuse/guestmount.pod:123
22534 msgid "B<--dir-cache-timeout N>"
22538 #: ../fuse/guestmount.pod:125
22540 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
22541 "seconds. The readdir cache [actually, there are several semi-independent "
22542 "caches] is populated after a readdir(2) call with the stat and extended "
22543 "attributes of the files in the directory, in anticipation that they will be "
22544 "requested soon after."
22548 #: ../fuse/guestmount.pod:131
22550 "There is also a different attribute cache implemented by FUSE (see the FUSE "
22551 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
22552 "requests, only cache existing ones."
22556 #: ../fuse/guestmount.pod:151
22558 "If you have untrusted raw-format guest disk images, you should use this "
22559 "option to specify the disk format. This avoids a possible security problem "
22560 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
22561 "guestfs_add_drive_opts>."
22565 #: ../fuse/guestmount.pod:156
22566 msgid "B<--fuse-help>"
22570 #: ../fuse/guestmount.pod:158
22571 msgid "Display help on special FUSE options (see I<-o> below)."
22575 #: ../fuse/guestmount.pod:162
22576 msgid "Display brief help and exit."
22580 #: ../fuse/guestmount.pod:186
22582 "Mount the named partition or logical volume on the given mountpoint B<in the "
22583 "guest> (this has nothing to do with mountpoints in the host)."
22587 #: ../fuse/guestmount.pod:189
22589 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
22590 "something on C</>."
22594 #: ../fuse/guestmount.pod:206
22596 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
22597 "unmounted. If you specify this option, then we don't attempt to sync the "
22598 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
22602 #: ../fuse/guestmount.pod:211
22603 msgid "B<-o option>"
22607 #: ../fuse/guestmount.pod:213
22608 msgid "B<--option option>"
22612 #: ../fuse/guestmount.pod:215
22613 msgid "Pass extra options to FUSE."
22617 #: ../fuse/guestmount.pod:217
22619 "To get a list of all the extra options supported by FUSE, use the command "
22620 "below. Note that only the FUSE I<-o> options can be passed, and only some "
22621 "of them are a good idea."
22625 #: ../fuse/guestmount.pod:221
22628 " guestmount --fuse-help\n"
22633 #: ../fuse/guestmount.pod:223
22634 msgid "Some potentially useful FUSE options:"
22638 #: ../fuse/guestmount.pod:227
22639 msgid "B<-o allow_other>"
22643 #: ../fuse/guestmount.pod:229
22644 msgid "Allow other users to see the filesystem."
22648 #: ../fuse/guestmount.pod:231
22649 msgid "B<-o attr_timeout=N>"
22653 #: ../fuse/guestmount.pod:233
22654 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22658 #: ../fuse/guestmount.pod:235
22659 msgid "B<-o kernel_cache>"
22663 #: ../fuse/guestmount.pod:237
22665 "Allow the kernel to cache files (reduces the number of reads that have to go "
22666 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22667 "afford the extra memory usage."
22671 #: ../fuse/guestmount.pod:241
22672 msgid "B<-o uid=N> B<-o gid=N>"
22676 #: ../fuse/guestmount.pod:243
22678 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22679 "the chosen values."
22683 #: ../fuse/guestmount.pod:252
22685 "Add devices and mount everything read-only. Also disallow writes and make "
22686 "the disk appear read-only to FUSE."
22690 #: ../fuse/guestmount.pod:255
22692 "This is highly recommended if you are not going to edit the guest disk. If "
22693 "the guest is running and this option is I<not> supplied, then there is a "
22694 "strong risk of disk corruption in the guest. We try to prevent this from "
22695 "happening, but it is not always possible."
22699 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:199
22700 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22704 #: ../fuse/guestmount.pod:264
22705 msgid "Enable SELinux support for the guest."
22709 #: ../fuse/guestmount.pod:270
22710 msgid "Enable verbose messages from underlying libguestfs."
22714 #: ../fuse/guestmount.pod:276
22715 msgid "Display the program version and exit."
22719 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
22720 #: ../rescue/virt-rescue.pod:238 ../rescue/virt-rescue.pod:321
22721 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
22725 #: ../fuse/guestmount.pod:289
22730 #: ../fuse/guestmount.pod:291
22731 msgid "Trace libguestfs calls and entry into each FUSE function."
22735 #: ../fuse/guestmount.pod:293
22736 msgid "This also stops the daemon from forking into the background."
22740 #: ../fuse/guestmount.pod:319
22742 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22743 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
22748 #: ../fuse/guestmount.pod:334
22749 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
22753 #: ../inspector/virt-inspector.pod:5
22755 "virt-inspector - Display operating system version and other information "
22756 "about a virtual machine"
22760 #: ../inspector/virt-inspector.pod:9
22763 " virt-inspector [--options] -d domname\n"
22768 #: ../inspector/virt-inspector.pod:11
22771 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
22776 #: ../inspector/virt-inspector.pod:15
22779 " virt-inspector domname\n"
22784 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:148
22787 " virt-inspector disk.img [disk.img ...]\n"
22792 #: ../inspector/virt-inspector.pod:21
22794 "B<virt-inspector> examines a virtual machine or disk image and tries to "
22795 "determine the version of the operating system and other information about "
22796 "the virtual machine."
22800 #: ../inspector/virt-inspector.pod:25
22801 msgid "Virt-inspector produces XML output for feeding into other programs."
22805 #: ../inspector/virt-inspector.pod:27
22807 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
22808 "the libvirt domain (see: C<virsh list --all>)."
22812 #: ../inspector/virt-inspector.pod:30
22814 "You can also run virt-inspector directly on disk images from a single "
22815 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
22816 "has several block devices, in which case you should list several I<-a> "
22817 "options one after another, with the first corresponding to the guest's C</"
22818 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
22822 #: ../inspector/virt-inspector.pod:37
22824 "You can also run virt-inspector on install disks, live CDs, bootable USB "
22825 "keys and similar."
22829 #: ../inspector/virt-inspector.pod:40
22831 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22832 "inspect several virtual machines, you have to run virt-inspector several "
22833 "times (for example, from a shell script for-loop)."
22837 #: ../inspector/virt-inspector.pod:45
22839 "Because virt-inspector needs direct access to guest images, it won't "
22840 "normally work over remote libvirt connections."
22844 #: ../inspector/virt-inspector.pod:48
22846 "All of the information available from virt-inspector is also available "
22847 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
22848 "The same information can also be fetched using guestfish or via libguestfs "
22849 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
22850 "WITH OTHER PROGRAMMING LANGUAGES>)."
22854 #: ../inspector/virt-inspector.pod:81
22856 "Libvirt is only used if you specify a C<domname> on the command line. If "
22857 "you specify guest block devices directly (I<-a>), then libvirt is not used "
22862 #: ../inspector/virt-inspector.pod:94
22864 "When prompting for keys and passphrases, virt-inspector normally turns "
22865 "echoing off so you cannot see what you are typing. If you are not worried "
22866 "about Tempest attacks and there is no one else in the room you can specify "
22867 "this flag to see what you are typing."
22871 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
22872 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
22873 #: ../tools/virt-win-reg.pl:144
22875 "Specify the format of disk images given on the command line. If this is "
22876 "omitted then the format is autodetected from the content of the disk image."
22880 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
22881 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
22882 #: ../tools/virt-win-reg.pl:148
22884 "If disk images are requested from libvirt, then this program asks libvirt "
22885 "for this information. In this case, the value of the format parameter is "
22890 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:391
22891 #: ../resize/virt-resize.pod:483 ../sparsify/virt-sparsify.pod:138
22892 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
22893 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
22895 "If working with untrusted raw-format guest disk images, you should ensure "
22896 "the format is always specified."
22900 #: ../inspector/virt-inspector.pod:135
22901 msgid "B<--xpath> query"
22905 #: ../inspector/virt-inspector.pod:137
22907 "Perform an XPath query on the XML on stdin, and print the result on stdout. "
22908 "In this mode virt-inspector simply runs an XPath query; all other inspection "
22909 "functions are disabled. See L</XPATH QUERIES> below for some examples."
22913 #: ../inspector/virt-inspector.pod:146
22914 msgid "Previous versions of virt-inspector allowed you to write either:"
22918 #: ../inspector/virt-inspector.pod:152
22921 " virt-inspector guestname\n"
22926 #: ../inspector/virt-inspector.pod:160
22931 #: ../inspector/virt-inspector.pod:162
22933 "The virt-inspector XML is described precisely in a RELAX NG schema file "
22934 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
22935 "just an overview."
22939 #: ../inspector/virt-inspector.pod:166
22941 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
22942 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
22943 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
22944 "which is vanishingly rare in real world VMs."
22948 #: ../inspector/virt-inspector.pod:171
22949 msgid "E<lt>operatingsystemE<gt>"
22953 #: ../inspector/virt-inspector.pod:173
22955 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
22956 "describe the operating system, its architecture, the descriptive \"product "
22957 "name\" string, the type of OS and so on, as in this example:"
22961 #: ../inspector/virt-inspector.pod:177
22964 " <operatingsystems>\n"
22965 " <operatingsystem>\n"
22966 " <root>/dev/sda2</root>\n"
22967 " <name>windows</name>\n"
22968 " <arch>i386</arch>\n"
22969 " <distro>windows</distro>\n"
22970 " <product_name>Windows 7 Enterprise</product_name>\n"
22971 " <product_variant>Client</product_variant>\n"
22972 " <major_version>6</major_version>\n"
22973 " <minor_version>1</minor_version>\n"
22974 " <windows_systemroot>/Windows</windows_systemroot>\n"
22975 " <format>installed</format>\n"
22980 #: ../inspector/virt-inspector.pod:190
22982 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
22983 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
22984 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
22985 "architecture. The other fields are fairly self-explanatory, but because "
22986 "these fields are taken directly from the libguestfs inspection API you can "
22987 "find precise information from L<guestfs(3)/INSPECTION>."
22991 #: ../inspector/virt-inspector.pod:198
22993 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
22994 "of view of libguestfs (block devices may have completely different names "
22995 "inside the VM itself)."
22999 #: ../inspector/virt-inspector.pod:202
23000 msgid "E<lt>mountpointsE<gt>"
23004 #: ../inspector/virt-inspector.pod:204
23006 "Un*x-like guests typically have multiple filesystems which are mounted at "
23007 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
23008 "element which looks like this:"
23012 #: ../inspector/virt-inspector.pod:208
23015 " <operatingsystems>\n"
23016 " <operatingsystem>\n"
23019 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
23020 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
23021 " </mountpoints>\n"
23026 #: ../inspector/virt-inspector.pod:216
23028 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
23029 "and may have completely different names inside the guest. Only mountable "
23030 "filesystems appear in this list, not things like swap devices."
23034 #: ../inspector/virt-inspector.pod:221
23035 msgid "E<lt>filesystemsE<gt>"
23039 #: ../inspector/virt-inspector.pod:223
23041 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
23042 "filesystems belonging to the guest, including swap and empty partitions. "
23043 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
23044 "this OS or shared with this OS and other OSes)."
23048 #: ../inspector/virt-inspector.pod:229
23049 msgid "You might see something like this:"
23053 #: ../inspector/virt-inspector.pod:231
23056 " <operatingsystems>\n"
23057 " <operatingsystem>\n"
23060 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
23061 " <type>ext4</type>\n"
23062 " <label>Fedora-13-x86_64</label>\n"
23063 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
23069 #: ../inspector/virt-inspector.pod:241
23071 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
23072 "the label, and the UUID."
23076 #: ../inspector/virt-inspector.pod:244
23077 msgid "E<lt>applicationsE<gt>"
23081 #: ../inspector/virt-inspector.pod:246
23083 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
23084 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
23089 #: ../inspector/virt-inspector.pod:250
23091 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
23092 "Typical values would be C<rpm> and C<deb>."
23096 #: ../inspector/virt-inspector.pod:253
23098 "E<lt>package_managementE<gt>, if present, describes the package manager. "
23099 "Typical values include C<yum>, C<up2date> and C<apt>"
23103 #: ../inspector/virt-inspector.pod:256
23104 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
23108 #: ../inspector/virt-inspector.pod:259
23111 " <operatingsystems>\n"
23112 " <operatingsystem>\n"
23114 " <applications>\n"
23116 " <name>coreutils</name>\n"
23117 " <version>8.5</version>\n"
23118 " <release>1</release>\n"
23119 " </application>\n"
23124 #: ../inspector/virt-inspector.pod:269
23126 "The version and release fields may not be available for some types guests. "
23127 "Other fields are possible, see L<guestfs(3)/"
23128 "guestfs_inspect_list_applications>."
23132 #: ../inspector/virt-inspector.pod:273
23133 msgid "E<lt>drive_mappingsE<gt>"
23137 #: ../inspector/virt-inspector.pod:275
23139 "For operating systems like Windows which use drive letters, virt-inspector "
23140 "is able to find out how drive letters map to filesystems."
23144 #: ../inspector/virt-inspector.pod:279
23147 " <operatingsystems>\n"
23148 " <operatingsystem>\n"
23150 " <drive_mappings>\n"
23151 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
23152 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
23153 " </drive_mappings>\n"
23158 #: ../inspector/virt-inspector.pod:287
23160 "In the example above, drive C maps to the filesystem on the second partition "
23161 "on the first disk, and drive E maps to the filesystem on the first partition "
23162 "on the second disk."
23166 #: ../inspector/virt-inspector.pod:291
23168 "Note that this only covers permanent local filesystem mappings, not things "
23169 "like network shares. Furthermore NTFS volume mount points may not be listed "
23174 #: ../inspector/virt-inspector.pod:295
23175 msgid "E<lt>iconE<gt>"
23179 #: ../inspector/virt-inspector.pod:297
23181 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
23182 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
23183 "very large and high quality."
23187 #: ../inspector/virt-inspector.pod:301
23190 " <operatingsystems>\n"
23191 " <operatingsystem>\n"
23194 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
23195 " [... many lines of base64 data ...]\n"
23201 #: ../inspector/virt-inspector.pod:309
23203 "To display the icon, you have to extract it and convert the base64 data back "
23204 "to a binary file. Use an XPath query or simply an editor to extract the "
23205 "data, then use the coreutils L<base64(1)> program to do the conversion back "
23210 #: ../inspector/virt-inspector.pod:314
23213 " base64 -i -d < icon.data > icon.png\n"
23218 #: ../inspector/virt-inspector.pod:316
23219 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
23223 #: ../inspector/virt-inspector.pod:318
23225 "Virt-inspector can detect some operating system installers on install disks, "
23226 "live CDs, bootable USB keys and more."
23230 #: ../inspector/virt-inspector.pod:321
23232 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
23233 "fields may be present to indicate a live CD, network installer, or one part "
23234 "of a multipart CD. For example:"
23238 #: ../inspector/virt-inspector.pod:325
23241 " <operatingsystems>\n"
23242 " <operatingsystem>\n"
23243 " <root>/dev/sda</root>\n"
23244 " <name>linux</name>\n"
23245 " <arch>i386</arch>\n"
23246 " <distro>ubuntu</distro>\n"
23247 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
23248 " <major_version>10</major_version>\n"
23249 " <minor_version>10</minor_version>\n"
23250 " <format>installer</format>\n"
23256 #: ../inspector/virt-inspector.pod:337
23257 msgid "XPATH QUERIES"
23261 #: ../inspector/virt-inspector.pod:339
23263 "Virt-inspector includes built in support for running XPath queries. The "
23264 "reason for including XPath support directly in virt-inspector is simply that "
23265 "there are no good and widely available command line programs that can do "
23266 "XPath queries. The only good one is L<xmlstarlet(1)> and that is not "
23267 "available on Red Hat Enterprise Linux."
23271 #: ../inspector/virt-inspector.pod:346
23273 "To perform an XPath query, use the I<--xpath> option. Note that in this "
23274 "mode, virt-inspector simply reads XML from stdin and outputs the query "
23275 "result on stdout. All other inspection features are disabled in this mode."
23279 #: ../inspector/virt-inspector.pod:353
23282 " $ virt-inspector -d Guest | virt-inspector --xpath '//filesystems'\n"
23284 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
23285 " <type>ext4</type>\n"
23291 #: ../inspector/virt-inspector.pod:359
23294 " $ virt-inspector -d Guest | \\\n"
23295 " virt-inspector --xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
23301 #: ../inspector/virt-inspector.pod:363
23304 " $ virt-inspector -d Guest | \\\n"
23305 " virt-inspector --xpath 'string(//icon)' | base64 -i -d | display -\n"
23306 " [displays the guest icon, if there is one]\n"
23311 #: ../inspector/virt-inspector.pod:374
23312 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
23316 #: ../inspector/virt-inspector.pod:376
23318 "Early versions of libguestfs shipped with a different virt-inspector program "
23319 "written in Perl (the current version is written in C). The XML output of "
23320 "the Perl virt-inspector was different and it could also output in other "
23321 "formats like text."
23325 #: ../inspector/virt-inspector.pod:381
23327 "The old virt-inspector is no longer supported or shipped with libguestfs."
23331 #: ../inspector/virt-inspector.pod:384
23333 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
23334 "versions of virt-inspector with different names:"
23338 #: ../inspector/virt-inspector.pod:387
23341 " virt-inspector Old Perl version.\n"
23342 " virt-inspector2 New C version.\n"
23347 #: ../inspector/virt-inspector.pod:397
23349 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
23350 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
23354 #: ../inspector/virt-inspector.pod:414
23355 msgid "Matthew Booth L<mbooth@redhat.com>"
23359 #: ../java/examples/guestfs-java.pod:5
23360 msgid "guestfs-java - How to use libguestfs from Java"
23364 #: ../java/examples/guestfs-java.pod:9
23367 " import com.redhat.et.libguestfs.*;\n"
23372 #: ../java/examples/guestfs-java.pod:11
23375 " GuestFS g = new GuestFS ();\n"
23376 " g.add_drive_opts (\"disk.img\", null);\n"
23382 #: ../java/examples/guestfs-java.pod:17
23384 "This manual page documents how to call libguestfs from the Java programming "
23385 "language. This page just documents the differences from the C API and gives "
23386 "some examples. If you are not familiar with using libguestfs, you also need "
23387 "to read L<guestfs(3)>."
23391 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
23392 msgid "CLOSING THE HANDLE"
23396 #: ../java/examples/guestfs-java.pod:24
23398 "The handle is closed when it is reaped by the garbage collector. Because "
23399 "libguestfs handles include a lot of state, it is also possible to close (and "
23400 "hence free) them explicitly by calling the C<close> method."
23404 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
23405 #: ../python/examples/guestfs-python.pod:21
23406 #: ../ruby/examples/guestfs-ruby.pod:22
23411 #: ../java/examples/guestfs-java.pod:31
23413 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
23414 "exception. This has a single parameter which is the error message (a "
23419 #: ../java/examples/guestfs-java.pod:35
23420 msgid "Calling any method on a closed handle raises the same exception."
23424 #: ../java/examples/guestfs-java.pod:47
23426 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
23427 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
23428 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
23432 #: ../ocaml/examples/guestfs-ocaml.pod:5
23433 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
23437 #: ../ocaml/examples/guestfs-ocaml.pod:9
23438 msgid "Module style:"
23442 #: ../ocaml/examples/guestfs-ocaml.pod:11
23445 " let g = Guestfs.create () in\n"
23446 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
23447 " Guestfs.launch g;\n"
23452 #: ../ocaml/examples/guestfs-ocaml.pod:15
23453 msgid "Object-oriented style:"
23457 #: ../ocaml/examples/guestfs-ocaml.pod:17
23460 " let g = new Guestfs.guestfs () in\n"
23461 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
23467 #: ../ocaml/examples/guestfs-ocaml.pod:21
23470 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
23472 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
23477 #: ../ocaml/examples/guestfs-ocaml.pod:27
23479 "This manual page documents how to call libguestfs from the OCaml programming "
23480 "language. This page just documents the differences from the C API and gives "
23481 "some examples. If you are not familiar with using libguestfs, you also need "
23482 "to read L<guestfs(3)>."
23486 #: ../ocaml/examples/guestfs-ocaml.pod:32
23487 msgid "PROGRAMMING STYLES"
23491 #: ../ocaml/examples/guestfs-ocaml.pod:34
23493 "There are two different programming styles supported by the OCaml bindings. "
23494 "You can use a module style, with each C function mapped to an OCaml function:"
23498 #: ../ocaml/examples/guestfs-ocaml.pod:38
23501 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
23506 #: ../ocaml/examples/guestfs-ocaml.pod:40
23511 #: ../ocaml/examples/guestfs-ocaml.pod:42
23514 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
23519 #: ../ocaml/examples/guestfs-ocaml.pod:44
23521 "Alternately you can use an object-oriented style, calling methods on the "
23522 "class C<Guestfs.guestfs>:"
23526 #: ../ocaml/examples/guestfs-ocaml.pod:47
23529 " method set_verbose : bool -> unit\n"
23534 #: ../ocaml/examples/guestfs-ocaml.pod:49
23536 "The object-oriented style is usually briefer, and the minor performance "
23537 "penalty isn't noticable in the general overhead of performing libguestfs "
23542 #: ../ocaml/examples/guestfs-ocaml.pod:55
23544 "The handle is closed when it is reaped by the garbage collector. Because "
23545 "libguestfs handles include a lot of state, it is also possible to close (and "
23546 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
23551 #: ../ocaml/examples/guestfs-ocaml.pod:62
23553 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
23554 "exception. This has a single parameter which is the error message (a "
23559 #: ../ocaml/examples/guestfs-ocaml.pod:66
23561 "Calling any function/method on a closed handle raises C<Guestfs."
23562 "Handle_closed>. The single parameter is the name of the function that you "
23567 #: ../ocaml/examples/guestfs-ocaml.pod:80
23569 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
23570 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
23571 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
23575 #: ../perl/examples/guestfs-perl.pod:5
23576 msgid "guestfs-perl - How to use libguestfs from Perl"
23580 #: ../perl/examples/guestfs-perl.pod:9
23583 " use Sys::Guestfs;\n"
23588 #: ../perl/examples/guestfs-perl.pod:11
23591 " my $h = Sys::Guestfs->new ();\n"
23592 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
23593 " $h->launch ();\n"
23594 " $h->mount_options ('', '/dev/sda1', '/');\n"
23595 " $h->touch ('/hello');\n"
23601 #: ../perl/examples/guestfs-perl.pod:20
23603 "This manual page documents how to call libguestfs from the Perl programming "
23604 "language. This page just documents the differences from the C API and gives "
23605 "some examples. If you are not familiar with using libguestfs, you also need "
23606 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
23610 #: ../perl/examples/guestfs-perl.pod:26
23615 #: ../perl/examples/guestfs-perl.pod:28
23617 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
23622 #: ../perl/examples/guestfs-perl.pod:41
23624 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
23625 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
23626 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
23630 #: ../python/examples/guestfs-python.pod:5
23631 msgid "guestfs-python - How to use libguestfs from Python"
23635 #: ../python/examples/guestfs-python.pod:9
23638 " import guestfs\n"
23639 " g = guestfs.GuestFS ()\n"
23640 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
23646 #: ../python/examples/guestfs-python.pod:16
23648 "This manual page documents how to call libguestfs from the Python "
23649 "programming language. This page just documents the differences from the C "
23650 "API and gives some examples. If you are not familiar with using libguestfs, "
23651 "you also need to read L<guestfs(3)>."
23655 #: ../python/examples/guestfs-python.pod:23
23657 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
23658 "single string argument which is the error message."
23662 #: ../python/examples/guestfs-python.pod:26
23663 msgid "MORE DOCUMENTATION"
23667 #: ../python/examples/guestfs-python.pod:28
23672 #: ../python/examples/guestfs-python.pod:30
23676 " >>> import guestfs\n"
23677 " >>> help (guestfs)\n"
23682 #: ../python/examples/guestfs-python.pod:44
23684 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
23685 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
23686 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
23690 #: ../rescue/virt-rescue.pod:5
23691 msgid "virt-rescue - Run a rescue shell on a virtual machine"
23695 #: ../rescue/virt-rescue.pod:9
23698 " virt-rescue [--options] -d domname\n"
23703 #: ../rescue/virt-rescue.pod:11
23706 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
23711 #: ../rescue/virt-rescue.pod:13
23714 " virt-rescue --suggest (-d domname | -a disk.img ...)\n"
23719 #: ../rescue/virt-rescue.pod:17
23722 " virt-rescue [--options] domname\n"
23727 #: ../rescue/virt-rescue.pod:19
23730 " virt-rescue [--options] disk.img [disk.img ...]\n"
23735 #: ../rescue/virt-rescue.pod:23
23737 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23738 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23739 "you from doing this, but doesn't catch all cases."
23743 #: ../rescue/virt-rescue.pod:27
23745 "However if you use the I<--ro> (read only) option, then you can attach a "
23746 "shell to a live virtual machine. The results might be strange or "
23747 "inconsistent at times but you won't get disk corruption."
23751 #: ../rescue/virt-rescue.pod:33
23753 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23754 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23755 "recovery tools which you can use to examine or rescue a virtual machine or "
23760 #: ../rescue/virt-rescue.pod:38
23762 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23763 "on disk image(s):"
23767 #: ../rescue/virt-rescue.pod:41
23770 " virt-rescue -d GuestName\n"
23775 #: ../rescue/virt-rescue.pod:43
23778 " virt-rescue --ro -a /path/to/disk.img\n"
23783 #: ../rescue/virt-rescue.pod:45
23786 " virt-rescue -a /dev/sdc\n"
23791 #: ../rescue/virt-rescue.pod:47
23792 msgid "For live VMs you I<must> use the --ro option."
23796 #: ../rescue/virt-rescue.pod:49
23798 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23799 "in an interactive bash shell where you can use many ordinary Linux "
23800 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23801 "appliance. You must mount the virtual machine's filesystems by hand. There "
23802 "is an empty directory called C</sysroot> where you can mount filesystems."
23806 #: ../rescue/virt-rescue.pod:56
23808 "You can get virt-rescue to suggest mount commands for you by using the I<--"
23809 "suggest> option (in another terminal):"
23813 #: ../rescue/virt-rescue.pod:59
23816 " $ virt-rescue --suggest -d Fedora15\n"
23817 " Inspecting the virtual machine or disk image ...\n"
23822 #: ../rescue/virt-rescue.pod:62
23825 " This disk contains one or more operating systems. You can use these\n"
23826 " mount commands in virt-rescue (at the ><rescue> prompt) to mount the\n"
23832 #: ../rescue/virt-rescue.pod:66
23835 " # /dev/vg_f15x32/lv_root is the root of a linux operating system\n"
23836 " # type: linux, distro: fedora, version: 15.0\n"
23837 " # Fedora release 15 (Lovelock)\n"
23842 #: ../rescue/virt-rescue.pod:70
23845 " mount /dev/vg_f15x32/lv_root /sysroot/\n"
23846 " mount /dev/vda1 /sysroot/boot\n"
23847 " mount --bind /dev /sysroot/dev\n"
23848 " mount --bind /dev/pts /sysroot/dev/pts\n"
23849 " mount --bind /proc /sysroot/proc\n"
23850 " mount --bind /sys /sysroot/sys\n"
23855 #: ../rescue/virt-rescue.pod:77
23857 "Another way is to list the logical volumes (with L<lvs(8)>) and partitions "
23858 "(with L<parted(8)>) and mount them by hand:"
23862 #: ../rescue/virt-rescue.pod:80
23866 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23867 " lv_root vg_f15x32 -wi-a- 8.83G\n"
23868 " lv_swap vg_f15x32 -wi-a- 992.00M\n"
23869 " ><rescue> mount /dev/vg_f15x32/lv_root /sysroot\n"
23870 " ><rescue> mount /dev/vda1 /sysroot/boot\n"
23871 " ><rescue> ls /sysroot\n"
23876 #: ../rescue/virt-rescue.pod:88
23878 "Another command to list available filesystems is L<virt-filesystems(1)>."
23882 #: ../rescue/virt-rescue.pod:91
23884 "To run commands in a Linux guest (for example, grub), you should chroot into "
23885 "the /sysroot directory first:"
23889 #: ../rescue/virt-rescue.pod:94
23892 " ><rescue> chroot /sysroot\n"
23897 #: ../rescue/virt-rescue.pod:98
23899 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23900 "virtual machine. For example you can use it on a blank file if you want to "
23901 "partition that file (although we would recommend using L<guestfish(1)> "
23902 "instead as it is more suitable for this purpose). You can even use virt-"
23903 "rescue on things like SD cards."
23907 #: ../rescue/virt-rescue.pod:104
23909 "Virt-rescue does not require root. You only need to run it as root if you "
23910 "need root to open the disk image."
23914 #: ../rescue/virt-rescue.pod:107
23916 "This tool is just designed for quick interactive hacking on a virtual "
23917 "machine. For more structured access to a virtual machine disk image, you "
23918 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23919 "make scripted changes to guests, use L<guestfish(1)>."
23923 #: ../rescue/virt-rescue.pod:131
23924 msgid "B<--append kernelopts>"
23928 #: ../rescue/virt-rescue.pod:133
23929 msgid "Pass additional options to the rescue kernel."
23933 #: ../rescue/virt-rescue.pod:163
23936 " virt-rescue --format=raw -a disk.img\n"
23941 #: ../rescue/virt-rescue.pod:167
23944 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
23949 #: ../rescue/virt-rescue.pod:176
23954 #: ../rescue/virt-rescue.pod:178
23955 msgid "B<--memsize MB>"
23959 #: ../rescue/virt-rescue.pod:180
23961 "Change the amount of memory allocated to the rescue system. The default is "
23962 "set by libguestfs and is small but adequate for running system tools. The "
23963 "occasional program might need more memory. The parameter is specified in "
23968 #: ../rescue/virt-rescue.pod:185
23969 msgid "B<--network>"
23973 #: ../rescue/virt-rescue.pod:187
23974 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
23978 #: ../rescue/virt-rescue.pod:193
23979 msgid "Open the image read-only."
23983 #: ../rescue/virt-rescue.pod:203
23985 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
23986 "SELINUX> before using this option."
23990 #: ../rescue/virt-rescue.pod:206
23995 #: ../rescue/virt-rescue.pod:208
23996 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
24000 #: ../rescue/virt-rescue.pod:210
24001 msgid "B<--suggest>"
24005 #: ../rescue/virt-rescue.pod:212
24007 "Inspect the disk image and suggest what mount commands should be used to "
24008 "mount the disks. You should use the I<--suggest> option in a second "
24009 "terminal, then paste the commands into another virt-rescue."
24013 #: ../rescue/virt-rescue.pod:216
24015 "This option implies I<--ro> and is safe to use even if the guest is up or if "
24016 "another virt-rescue is running."
24020 #: ../rescue/virt-rescue.pod:235
24022 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
24023 "are done read-write."
24027 #: ../rescue/virt-rescue.pod:248
24028 msgid "Previous versions of virt-rescue allowed you to write either:"
24032 #: ../rescue/virt-rescue.pod:250
24035 " virt-rescue disk.img [disk.img ...]\n"
24040 #: ../rescue/virt-rescue.pod:254
24043 " virt-rescue guestname\n"
24048 #: ../rescue/virt-rescue.pod:262
24053 #: ../rescue/virt-rescue.pod:264
24055 "Adding the I<--network> option enables QEMU user networking in the rescue "
24056 "appliance. There are some differences between user networking and ordinary "
24061 #: ../rescue/virt-rescue.pod:270
24062 msgid "ping does not work"
24066 #: ../rescue/virt-rescue.pod:272
24068 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
24069 "send the ping packets, and because virt-rescue must be able to run as non-"
24070 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
24071 "The ping command will appear to resolve addresses but will not be able to "
24072 "send or receive any packets. This does not mean that the network is not "
24077 #: ../rescue/virt-rescue.pod:279
24078 msgid "cannot receive connections"
24082 #: ../rescue/virt-rescue.pod:281
24083 msgid "QEMU user networking cannot receive incoming connections."
24087 #: ../rescue/virt-rescue.pod:283
24088 msgid "making TCP connections"
24092 #: ../rescue/virt-rescue.pod:285
24094 "The virt-rescue appliance needs to be small and so does not include many "
24095 "network tools. In particular there is no L<telnet(1)> command. You can "
24096 "make TCP connections from the shell using the magical C</dev/tcp/"
24097 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
24101 #: ../rescue/virt-rescue.pod:290
24104 " exec 3<>/dev/tcp/redhat.com/80\n"
24105 " echo \"GET /\" >&3\n"
24111 #: ../rescue/virt-rescue.pod:294
24112 msgid "See L<bash(1)> for more details."
24116 #: ../rescue/virt-rescue.pod:300
24118 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
24119 "ENVIRONMENT VARIABLES> for the complete list."
24123 #: ../rescue/virt-rescue.pod:327
24125 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-"
24126 "filesystems(1)>, L<http://libguestfs.org/>."
24130 #: ../resize/virt-resize.pod:5
24131 msgid "virt-resize - Resize a virtual machine disk"
24135 #: ../resize/virt-resize.pod:9
24138 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24139 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24140 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24145 #: ../resize/virt-resize.pod:15
24147 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24148 "larger or smaller overall, and resizing or deleting any partitions contained "
24153 #: ../resize/virt-resize.pod:19
24155 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24156 "not> be used on live virtual machines - for consistent results, shut the "
24157 "virtual machine down before resizing it."
24161 #: ../resize/virt-resize.pod:23
24163 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
24164 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
24168 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:597
24169 #: ../sparsify/virt-sparsify.pod:221 ../src/guestfs.pod:484
24170 #: ../src/guestfs.pod:1302 ../src/guestfs.pod:1441 ../src/guestfs.pod:2690
24175 #: ../resize/virt-resize.pod:33
24177 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24178 "fill the extra 5GB of space."
24182 #: ../resize/virt-resize.pod:36
24185 " virt-filesystems --long -h --all -a olddisk\n"
24190 #: ../resize/virt-resize.pod:38
24193 " truncate -r olddisk newdisk\n"
24194 " truncate -s +5G newdisk\n"
24199 #: ../resize/virt-resize.pod:41
24202 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24203 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24208 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:604
24209 #: ../sparsify/virt-sparsify.pod:228 ../src/guestfs.pod:490
24210 #: ../src/guestfs.pod:1306 ../src/guestfs.pod:1445 ../src/guestfs.pod:2715
24215 #: ../resize/virt-resize.pod:46
24217 "As above, but make the /boot partition 200MB bigger, while giving the "
24218 "remaining space to /dev/sda2:"
24222 #: ../resize/virt-resize.pod:49
24225 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24226 " olddisk newdisk\n"
24231 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:610
24232 #: ../sparsify/virt-sparsify.pod:234 ../src/guestfs.pod:501
24233 #: ../src/guestfs.pod:1451
24238 #: ../resize/virt-resize.pod:54
24240 "As in the first example, but expand a logical volume as the final step. "
24241 "This is what you would typically use for Linux guests that use LVM:"
24245 #: ../resize/virt-resize.pod:58
24248 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
24249 " olddisk newdisk\n"
24254 #: ../resize/virt-resize.pod:61
24259 #: ../resize/virt-resize.pod:63
24261 "As in the first example, but the output format will be qcow2 instead of a "
24266 #: ../resize/virt-resize.pod:66
24269 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
24270 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
24275 #: ../resize/virt-resize.pod:71
24276 msgid "DETAILED USAGE"
24280 #: ../resize/virt-resize.pod:73
24281 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24285 #: ../resize/virt-resize.pod:77
24286 msgid "1. Shut down the virtual machine"
24290 #: ../resize/virt-resize.pod:79
24291 msgid "2. Locate input disk image"
24295 #: ../resize/virt-resize.pod:81
24297 "Locate the input disk image (ie. the file or device on the host containing "
24298 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24299 "dumpxml> like this to find the disk image name:"
24303 #: ../resize/virt-resize.pod:85
24306 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24307 " Found 1 nodes:\n"
24309 " <source dev=\"/dev/vg/lv_guest\" />\n"
24314 #: ../resize/virt-resize.pod:90
24315 msgid "3. Look at current sizing"
24319 #: ../resize/virt-resize.pod:92
24320 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
24324 #: ../resize/virt-resize.pod:95
24327 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
24328 " Name Type Size Parent\n"
24329 " /dev/sda1 partition 101M /dev/sda\n"
24330 " /dev/sda2 partition 7.9G /dev/sda\n"
24331 " /dev/sda device 8.0G -\n"
24336 #: ../resize/virt-resize.pod:101
24338 "(This example is a virtual machine with an 8 GB disk which we would like to "
24339 "expand up to 10 GB)."
24343 #: ../resize/virt-resize.pod:104
24344 msgid "4. Create output disk"
24348 #: ../resize/virt-resize.pod:106
24350 "Virt-resize cannot do in-place disk modifications. You have to have space "
24351 "to store the resized output disk."
24355 #: ../resize/virt-resize.pod:109
24357 "To store the resized disk image in a file, create a file of a suitable size:"
24361 #: ../resize/virt-resize.pod:112
24364 " # rm -f outdisk\n"
24365 " # truncate -s 10G outdisk\n"
24370 #: ../resize/virt-resize.pod:115
24371 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24375 #: ../resize/virt-resize.pod:117
24378 " # lvcreate -L 10G -n lv_name vg_name\n"
24383 #: ../resize/virt-resize.pod:119
24384 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24388 #: ../resize/virt-resize.pod:121
24391 " # virsh pool-list\n"
24392 " # virsh vol-create-as poolname newvol 10G\n"
24397 #: ../resize/virt-resize.pod:124
24402 #: ../resize/virt-resize.pod:126
24404 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24405 "file) and the output disk. The output disk is the one created in the "
24410 #: ../resize/virt-resize.pod:130
24413 " # virt-resize indisk outdisk\n"
24418 #: ../resize/virt-resize.pod:132
24420 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24421 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24422 "larger, then an extra, empty partition is created at the end of the disk "
24423 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24428 #: ../resize/virt-resize.pod:138
24430 "More realistically you'd want to expand existing partitions in the disk "
24431 "image by passing extra options (for the full list see the L</OPTIONS> "
24436 #: ../resize/virt-resize.pod:142
24438 "L</--expand> is the most useful option. It expands the named partition "
24439 "within the disk to fill any extra space:"
24443 #: ../resize/virt-resize.pod:145
24446 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24451 #: ../resize/virt-resize.pod:147
24453 "(In this case, an extra partition is I<not> created at the end of the disk, "
24454 "because there will be no unused space)."
24458 #: ../resize/virt-resize.pod:150
24460 "L</--resize> is the other commonly used option. The following would "
24461 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24462 "rest of the available space:"
24466 #: ../resize/virt-resize.pod:154
24469 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24470 " indisk outdisk\n"
24475 #: ../resize/virt-resize.pod:157
24477 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24478 "if virt-resize knows how, it will resize the contents, the equivalent of "
24479 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
24480 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
24481 "filesystems, so you would have to online resize them after booting the guest."
24485 #: ../resize/virt-resize.pod:164
24486 msgid "Other options are covered below."
24490 #: ../resize/virt-resize.pod:166
24495 #: ../resize/virt-resize.pod:168
24496 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24500 #: ../resize/virt-resize.pod:170
24501 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24505 #: ../resize/virt-resize.pod:172
24508 " # virsh edit guestname\n"
24513 #: ../resize/virt-resize.pod:174
24515 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
24516 "html#elementsDisks>"
24520 #: ../resize/virt-resize.pod:177
24521 msgid "Then start up the domain with the new, resized disk:"
24525 #: ../resize/virt-resize.pod:179
24528 " # virsh start guestname\n"
24533 #: ../resize/virt-resize.pod:181
24535 "and check that it still works. See also the L</NOTES> section below for "
24536 "additional information."
24540 #: ../resize/virt-resize.pod:184
24541 msgid "7. Resize LVs etc inside the guest"
24545 #: ../resize/virt-resize.pod:186
24546 msgid "(This can also be done offline using L<guestfish(1)>)"
24550 #: ../resize/virt-resize.pod:188
24552 "Once the guest has booted you should see the new space available, at least "
24553 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24554 "may need to resize LVs inside PVs, and also resize filesystem types that "
24555 "virt-resize does not know how to expand."
24559 #: ../resize/virt-resize.pod:195
24560 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24564 #: ../resize/virt-resize.pod:197
24566 "Shrinking is somewhat more complex than expanding, and only an overview is "
24571 #: ../resize/virt-resize.pod:200
24573 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24574 "filesystems). The user has to shrink content before passing the disk image "
24575 "to virt-resize, and virt-resize will check that the content has been shrunk "
24580 #: ../resize/virt-resize.pod:205
24581 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24585 #: ../resize/virt-resize.pod:207
24587 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24588 "steps 3 and 4 above to allocate a new disk image."
24592 #: ../resize/virt-resize.pod:210
24594 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
24598 #: ../resize/virt-resize.pod:213
24599 msgid "IGNORING OR DELETING PARTITIONS"
24603 #: ../resize/virt-resize.pod:215
24605 "virt-resize also gives a convenient way to ignore or delete partitions when "
24606 "copying from the input disk to the output disk. Ignoring a partition speeds "
24607 "up the copy where you don't care about the existing contents of a "
24608 "partition. Deleting a partition removes it completely, but note that it "
24609 "also renumbers any partitions after the one which is deleted, which can "
24610 "leave some guests unbootable."
24614 #: ../resize/virt-resize.pod:222
24615 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
24619 #: ../resize/virt-resize.pod:224
24621 "If the input disk is in qcow2 format, then you may prefer that the output is "
24622 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
24623 "the fly. The output format is simply determined by the format of the empty "
24624 "output container that you provide. Thus to create qcow2 output, use:"
24628 #: ../resize/virt-resize.pod:230
24631 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
24636 #: ../resize/virt-resize.pod:232
24637 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
24641 #: ../resize/virt-resize.pod:234
24642 msgid "Similarly, to get non-sparse raw output use:"
24646 #: ../resize/virt-resize.pod:236
24649 " fallocate -l size outdisk\n"
24654 #: ../resize/virt-resize.pod:238
24656 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
24657 "dev/zero of=outdisk bs=1M count=..>)"
24661 #: ../resize/virt-resize.pod:241
24662 msgid "LOGICAL PARTITIONS"
24666 #: ../resize/virt-resize.pod:243
24668 "Logical partitions (a.k.a. C</dev/sda5+> on disks using DOS partition "
24669 "tables) cannot be resized."
24673 #: ../resize/virt-resize.pod:246
24675 "To understand what is going on, firstly one of the four partitions C</dev/"
24676 "sda1-4> will have MBR partition type C<05> or C<0f>. This is called the "
24677 "B<extended partition>. Use L<virt-filesystems(1)> to see the MBR partition "
24682 #: ../resize/virt-resize.pod:251
24683 msgid "Logical partitions live inside the extended partition."
24687 #: ../resize/virt-resize.pod:253
24689 "The extended partition can be expanded, but not shrunk (unless you force it, "
24690 "which is not advisable). When the extended partition is copied across, all "
24691 "the logical partitions contained inside are copied over implicitly. Virt-"
24692 "resize does not look inside the extended partition, so it copies the logical "
24693 "partitions blindly."
24697 #: ../resize/virt-resize.pod:259
24699 "You cannot specify a logical partition (C</dev/sda5+>) at all on the command "
24700 "line. Doing so will give an error."
24704 #: ../resize/virt-resize.pod:268 ../sparsify/virt-sparsify.pod:105
24705 msgid "Display help."
24709 #: ../resize/virt-resize.pod:270
24710 msgid "B<--align-first auto>"
24714 #: ../resize/virt-resize.pod:272
24715 msgid "B<--align-first never>"
24719 #: ../resize/virt-resize.pod:274
24720 msgid "B<--align-first always>"
24724 #: ../resize/virt-resize.pod:276
24726 "Align the first partition for improved performance (see also the I<--"
24727 "alignment> option)."
24731 #: ../resize/virt-resize.pod:279
24733 "The default is I<--align-first auto> which only aligns the first partition "
24734 "if it is safe to do so. That is, only when we know how to fix the "
24735 "bootloader automatically, and at the moment that can only be done for "
24740 #: ../resize/virt-resize.pod:284
24742 "I<--align-first never> means we never move the first partition. This is the "
24743 "safest option. Try this if the guest does not boot after resizing."
24747 #: ../resize/virt-resize.pod:288
24749 "I<--align-first always> means we always align the first partition (if it "
24750 "needs to be aligned). For some guests this will break the bootloader, "
24751 "making the guest unbootable."
24755 #: ../resize/virt-resize.pod:292
24756 msgid "B<--alignment N>"
24760 #: ../resize/virt-resize.pod:294
24762 "Set the alignment of partitions to C<N> sectors. The default in virt-resize "
24763 "E<lt> 1.13.19 was 64 sectors, and after that is 128 sectors."
24767 #: ../resize/virt-resize.pod:298
24769 "Assuming 512 byte sector size inside the guest, here are some suitable "
24774 #: ../resize/virt-resize.pod:303
24775 msgid "I<--alignment 1> (512 bytes)"
24779 #: ../resize/virt-resize.pod:305
24781 "The partitions would be packed together as closely as possible, but would be "
24782 "completely unaligned. In some cases this can cause very poor performance. "
24783 "See L<virt-alignment-scan(1)> for further details."
24787 #: ../resize/virt-resize.pod:309
24788 msgid "I<--alignment 8> (4K)"
24792 #: ../resize/virt-resize.pod:311
24794 "This would be the minimum acceptable alignment for reasonable performance on "
24799 #: ../resize/virt-resize.pod:314
24800 msgid "I<--alignment 128> (64K)"
24804 #: ../resize/virt-resize.pod:316
24806 "This alignment provides good performance when the host is using high end "
24811 #: ../resize/virt-resize.pod:319
24812 msgid "I<--alignment 2048> (1M)"
24816 #: ../resize/virt-resize.pod:321
24818 "This is the standard alignment used by all newly installed guests since "
24823 #: ../resize/virt-resize.pod:326
24828 #: ../resize/virt-resize.pod:328 ../tools/virt-make-fs.pl:177
24829 #: ../tools/virt-win-reg.pl:120
24834 #: ../resize/virt-resize.pod:330 ../tools/virt-win-reg.pl:122
24835 msgid "Enable debugging messages."
24839 #: ../resize/virt-resize.pod:332
24840 msgid "B<--delete part>"
24844 #: ../resize/virt-resize.pod:334
24846 "Delete the named partition. It would be more accurate to describe this as "
24847 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24848 "the original disk image is left intact."
24852 #: ../resize/virt-resize.pod:338
24854 "Note that when you delete a partition, then anything contained in the "
24855 "partition is also deleted. Furthermore, this causes any partitions that "
24856 "come after to be I<renumbered>, which can easily make your guest unbootable."
24860 #: ../resize/virt-resize.pod:343 ../resize/virt-resize.pod:404
24861 #: ../resize/virt-resize.pod:531 ../sparsify/virt-sparsify.pod:151
24862 msgid "You can give this option multiple times."
24866 #: ../resize/virt-resize.pod:345
24867 msgid "B<--expand part>"
24871 #: ../resize/virt-resize.pod:347
24873 "Expand the named partition so it uses up all extra space (space left over "
24874 "after any other resize changes that you request have been done)."
24878 #: ../resize/virt-resize.pod:350
24880 "If virt-resize knows how, it will expand the direct content of the "
24881 "partition. For example, if the partition is an LVM PV, it will expand the "
24882 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24883 "content it doesn't know about alone."
24887 #: ../resize/virt-resize.pod:355
24888 msgid "Currently virt-resize can resize:"
24892 #: ../resize/virt-resize.pod:361
24893 msgid "ext2, ext3 and ext4 filesystems."
24897 #: ../resize/virt-resize.pod:365
24898 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
24902 #: ../resize/virt-resize.pod:367
24904 "The filesystem must have been shut down consistently last time it was used. "
24905 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24906 "consistency check, so at the first boot after resizing Windows will check "
24911 #: ../resize/virt-resize.pod:374
24913 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
24914 "inside the PV, but see the I<--LV-expand> option. The user could also "
24915 "resize LVs as desired after boot."
24919 #: ../resize/virt-resize.pod:380
24920 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
24924 #: ../resize/virt-resize.pod:384 ../resize/virt-resize.pod:559
24925 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
24929 #: ../resize/virt-resize.pod:386 ../sparsify/virt-sparsify.pod:131
24930 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
24931 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
24932 msgid "B<--format> raw"
24936 #: ../resize/virt-resize.pod:388 ../sparsify/virt-sparsify.pod:135
24938 "Specify the format of the input disk image. If this flag is not given then "
24939 "it is auto-detected from the image itself."
24943 #: ../resize/virt-resize.pod:394
24945 "Note that this option I<does not> affect the output format. See L</QCOW2 "
24946 "AND NON-SPARSE RAW FORMATS>."
24950 #: ../resize/virt-resize.pod:397
24951 msgid "B<--ignore part>"
24955 #: ../resize/virt-resize.pod:399
24957 "Ignore the named partition. Effectively this means the partition is "
24958 "allocated on the destination disk, but the content is not copied across from "
24959 "the source disk. The content of the partition will be blank (all zero "
24964 #: ../resize/virt-resize.pod:406
24965 msgid "B<--LV-expand logvol>"
24969 #: ../resize/virt-resize.pod:408
24971 "This takes the logical volume and, as a final step, expands it to fill all "
24972 "the space available in its volume group. A typical usage, assuming a Linux "
24973 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
24974 "lv_root> would be:"
24978 #: ../resize/virt-resize.pod:413
24981 " virt-resize indisk outdisk \\\n"
24982 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24987 #: ../resize/virt-resize.pod:416
24989 "This would first expand the partition (and PV), and then expand the root "
24990 "device to fill the extra space in the PV."
24994 #: ../resize/virt-resize.pod:419
24996 "The contents of the LV are also resized if virt-resize knows how to do "
24997 "that. You can stop virt-resize from trying to expand the content by using "
24998 "the option I<--no-expand-content>."
25002 #: ../resize/virt-resize.pod:423
25003 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
25007 #: ../resize/virt-resize.pod:425
25009 "You can give this option multiple times, I<but> it doesn't make sense to do "
25010 "this unless the logical volumes you specify are all in different volume "
25015 #: ../resize/virt-resize.pod:429 ../sparsify/virt-sparsify.pod:153
25016 msgid "B<--machine-readable>"
25020 #: ../resize/virt-resize.pod:431 ../sparsify/virt-sparsify.pod:155
25022 "This option is used to make the output more machine friendly when being "
25023 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
25027 #: ../resize/virt-resize.pod:437
25028 msgid "B<--dryrun>"
25032 #: ../resize/virt-resize.pod:439
25033 msgid "Print a summary of what would be done, but don't do anything."
25037 #: ../resize/virt-resize.pod:441
25038 msgid "B<--no-copy-boot-loader>"
25042 #: ../resize/virt-resize.pod:443
25044 "By default, virt-resize copies over some sectors at the start of the disk "
25045 "(up to the beginning of the first partition). Commonly these sectors "
25046 "contain the Master Boot Record (MBR) and the boot loader, and are required "
25047 "in order for the guest to boot correctly."
25051 #: ../resize/virt-resize.pod:448
25053 "If you specify this flag, then this initial copy is not done. You may need "
25054 "to reinstall the boot loader in this case."
25058 #: ../resize/virt-resize.pod:451
25059 msgid "B<--no-extra-partition>"
25063 #: ../resize/virt-resize.pod:453
25065 "By default, virt-resize creates an extra partition if there is any extra, "
25066 "unused space after all resizing has happened. Use this option to prevent "
25067 "the extra partition from being created. If you do this then the extra space "
25068 "will be inaccessible until you run fdisk, parted, or some other partitioning "
25069 "tool in the guest."
25073 #: ../resize/virt-resize.pod:459
25075 "Note that if the surplus space is smaller than 10 MB, no extra partition "
25080 #: ../resize/virt-resize.pod:462
25081 msgid "B<--no-expand-content>"
25085 #: ../resize/virt-resize.pod:464
25087 "By default, virt-resize will try to expand the direct contents of "
25088 "partitions, if it knows how (see I<--expand> option above)."
25092 #: ../resize/virt-resize.pod:467
25094 "If you give the I<--no-expand-content> option then virt-resize will not "
25099 #: ../resize/virt-resize.pod:470
25100 msgid "B<--ntfsresize-force>"
25104 #: ../resize/virt-resize.pod:472
25106 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
25107 "the NTFS disk is marked as needing a consistency check. You have to use "
25108 "this option if you want to resize a Windows guest multiple times without "
25109 "booting into Windows between each resize."
25113 #: ../resize/virt-resize.pod:478
25114 msgid "B<--output-format> raw"
25118 #: ../resize/virt-resize.pod:480
25120 "Specify the format of the output disk image. If this flag is not given then "
25121 "it is auto-detected from the image itself."
25125 #: ../resize/virt-resize.pod:486
25127 "Note that this option I<does not create> the output format. This option "
25128 "just tells libguestfs what it is so it doesn't try to guess it. You still "
25129 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
25130 "SPARSE RAW FORMATS>."
25134 #: ../resize/virt-resize.pod:495
25135 msgid "Don't print the summary."
25139 #: ../resize/virt-resize.pod:497
25140 msgid "B<--resize part=size>"
25144 #: ../resize/virt-resize.pod:499
25146 "Resize the named partition (expanding or shrinking it) so that it has the "
25151 #: ../resize/virt-resize.pod:502
25153 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
25154 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
25155 "size; or as a relative number or percentage. For example:"
25159 #: ../resize/virt-resize.pod:508
25162 " --resize /dev/sda2=10G\n"
25167 #: ../resize/virt-resize.pod:510
25170 " --resize /dev/sda4=90%\n"
25175 #: ../resize/virt-resize.pod:512
25178 " --resize /dev/sda2=+1G\n"
25183 #: ../resize/virt-resize.pod:514
25186 " --resize /dev/sda2=-200M\n"
25191 #: ../resize/virt-resize.pod:516
25194 " --resize /dev/sda1=+128K\n"
25199 #: ../resize/virt-resize.pod:518
25202 " --resize /dev/sda1=+10%\n"
25207 #: ../resize/virt-resize.pod:520
25210 " --resize /dev/sda1=-10%\n"
25215 #: ../resize/virt-resize.pod:522
25217 "You can increase the size of any partition. Virt-resize will expand the "
25218 "direct content of the partition if it knows how (see I<--expand> below)."
25222 #: ../resize/virt-resize.pod:526
25224 "You can only I<decrease> the size of partitions that contain filesystems or "
25225 "PVs which have already been shrunk. Virt-resize will check this has been "
25226 "done before proceeding, or else will print an error (see also I<--resize-"
25231 #: ../resize/virt-resize.pod:533
25232 msgid "B<--resize-force part=size>"
25236 #: ../resize/virt-resize.pod:535
25238 "This is the same as I<--resize> except that it will let you decrease the "
25239 "size of any partition. Generally this means you will lose any data which "
25240 "was at the end of the partition you shrink, but you may not care about that "
25241 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
25242 "as a swap partition)."
25246 #: ../resize/virt-resize.pod:541
25247 msgid "See also the I<--ignore> option."
25251 #: ../resize/virt-resize.pod:543
25252 msgid "B<--shrink part>"
25256 #: ../resize/virt-resize.pod:545
25258 "Shrink the named partition until the overall disk image fits in the "
25259 "destination. The named partition B<must> contain a filesystem or PV which "
25260 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
25261 "online tools). Virt-resize will check this and give an error if it has not "
25266 #: ../resize/virt-resize.pod:551
25268 "The amount by which the overall disk must be shrunk (after carrying out all "
25269 "other operations requested by the user) is called the \"deficit\". For "
25270 "example, a straight copy (assume no other operations) from a 5GB disk image "
25271 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
25272 "would give an error unless the user specified a partition to shrink and that "
25273 "partition had more than a gigabyte of free space."
25277 #: ../resize/virt-resize.pod:569 ../sparsify/virt-sparsify.pod:195
25278 msgid "MACHINE READABLE OUTPUT"
25282 #: ../resize/virt-resize.pod:571
25284 "The I<--machine-readable> option can be used to make the output more machine "
25285 "friendly, which is useful when calling virt-resize from other programs, GUIs "
25290 #: ../resize/virt-resize.pod:575 ../sparsify/virt-sparsify.pod:201
25291 msgid "There are two ways to use this option."
25295 #: ../resize/virt-resize.pod:577
25297 "Firstly use the option on its own to query the capabilities of the virt-"
25298 "resize binary. Typical output looks like this:"
25302 #: ../resize/virt-resize.pod:580
25305 " $ virt-resize --machine-readable\n"
25307 " ntfsresize-force\n"
25315 #: ../resize/virt-resize.pod:587 ../sparsify/virt-sparsify.pod:211
25317 "A list of features is printed, one per line, and the program exits with "
25322 #: ../resize/virt-resize.pod:590 ../sparsify/virt-sparsify.pod:214
25324 "Secondly use the option in conjunction with other options to make the "
25325 "regular program output more machine friendly."
25329 #: ../resize/virt-resize.pod:593 ../sparsify/virt-sparsify.pod:217
25330 msgid "At the moment this means:"
25334 #: ../resize/virt-resize.pod:599 ../sparsify/virt-sparsify.pod:223
25336 "Progress bar messages can be parsed from stdout by looking for this regular "
25341 #: ../resize/virt-resize.pod:602 ../sparsify/virt-sparsify.pod:226
25344 " ^[0-9]+/[0-9]+$\n"
25349 #: ../resize/virt-resize.pod:606 ../sparsify/virt-sparsify.pod:230
25351 "The calling program should treat messages sent to stdout (except for "
25352 "progress bar messages) as status messages. They can be logged and/or "
25353 "displayed to the user."
25357 #: ../resize/virt-resize.pod:612
25359 "The calling program should treat messages sent to stderr as error messages. "
25360 "In addition, virt-resize exits with a non-zero status code if there was a "
25365 #: ../resize/virt-resize.pod:618
25367 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
25368 "readable> option and will return an error."
25372 #: ../resize/virt-resize.pod:623
25373 msgid "\"Partition 1 does not end on cylinder boundary.\""
25377 #: ../resize/virt-resize.pod:625
25379 "Virt-resize aligns partitions to multiples of 128 sectors (see the I<--"
25380 "alignment> parameter). Usually this means the partitions will not be "
25381 "aligned to the ancient CHS geometry. However CHS geometry is meaningless "
25382 "for disks manufactured since the early 1990s, and doubly so for virtual hard "
25383 "drives. Alignment of partitions to cylinders is not required by any modern "
25384 "operating system."
25388 #: ../resize/virt-resize.pod:632
25389 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
25393 #: ../resize/virt-resize.pod:634
25395 "In Windows Vista and later versions, Microsoft switched to using a separate "
25396 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
25397 "and C</dev/sda2> is the main (C:) drive. Resizing the first (boot) "
25398 "partition causes the bootloader to fail with C<0xC0000225> error. Resizing "
25399 "the second partition (ie. C: drive) should work."
25403 #: ../resize/virt-resize.pod:641
25405 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
25406 "NTFS partitions have been expanded. This is just a safety check and (unless "
25407 "it find errors) is nothing to worry about."
25411 #: ../resize/virt-resize.pod:645
25412 msgid "GUEST BOOT STUCK AT \"GRUB\""
25416 #: ../resize/virt-resize.pod:647
25418 "If a Linux guest does not boot after resizing, and the boot is stuck after "
25419 "printing C<GRUB> on the console, try reinstalling grub."
25423 #: ../resize/virt-resize.pod:650
25426 " guestfish -i -a newdisk\n"
25427 " ><fs> cat /boot/grub/device.map\n"
25428 " # check the contents of this file are sensible or\n"
25429 " # edit the file if necessary\n"
25430 " ><fs> grub-install / /dev/vda\n"
25436 #: ../resize/virt-resize.pod:657
25438 "For more flexible guest reconfiguration, including if you need to specify "
25439 "other parameters to grub-install, use L<virt-rescue(1)>."
25443 #: ../resize/virt-resize.pod:660
25444 msgid "ALTERNATIVE TOOLS"
25448 #: ../resize/virt-resize.pod:662
25450 "There are several proprietary tools for resizing partitions. We won't "
25451 "mention any here."
25455 #: ../resize/virt-resize.pod:665
25457 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
25458 "operations on disk images. They can resize and move partitions, but I don't "
25459 "think they can do anything with the contents, and they certainly don't "
25464 #: ../resize/virt-resize.pod:670
25466 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
25467 "but at a much lower level. You will probably end up hand-calculating sector "
25468 "offsets, which is something that virt-resize was designed to avoid. If you "
25469 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
25474 #: ../resize/virt-resize.pod:690
25476 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
25477 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
25478 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
25479 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-sparsify(1)>, "
25480 "L<virt-alignment-scan(1)>, L<http://libguestfs.org/>."
25484 #: ../ruby/examples/guestfs-ruby.pod:5
25485 msgid "guestfs-ruby - How to use libguestfs from Ruby"
25489 #: ../ruby/examples/guestfs-ruby.pod:9
25492 " require 'guestfs'\n"
25493 " g = Guestfs::Guestfs.new()\n"
25494 " g.add_drive_opts(\"disk.img\",\n"
25495 " :readonly => 1, :format => \"raw\")\n"
25501 #: ../ruby/examples/guestfs-ruby.pod:17
25503 "This manual page documents how to call libguestfs from the Ruby programming "
25504 "language. This page just documents the differences from the C API and gives "
25505 "some examples. If you are not familiar with using libguestfs, you also need "
25506 "to read L<guestfs(3)>."
25510 #: ../ruby/examples/guestfs-ruby.pod:24
25512 "Errors from libguestfs functions are mapped into the C<Error> exception. "
25513 "This has a single parameter which is the error message (a string)."
25517 #: ../ruby/examples/guestfs-ruby.pod:38
25519 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
25520 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
25521 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
25525 #: ../sparsify/virt-sparsify.pod:5
25526 msgid "virt-sparsify - Make a virtual machine disk sparse"
25530 #: ../sparsify/virt-sparsify.pod:9
25533 " virt-sparsify [--options] indisk outdisk\n"
25538 #: ../sparsify/virt-sparsify.pod:13
25540 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
25541 "image) sparse a.k.a. thin-provisioned. This means that free space within "
25542 "the disk image can be converted back to free space on the host."
25546 #: ../sparsify/virt-sparsify.pod:18
25548 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
25549 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
25553 #: ../sparsify/virt-sparsify.pod:21
25555 "Virt-sparsify can also convert between some disk formats, for example "
25556 "converting a raw disk image to a thin-provisioned qcow2 image."
25560 #: ../sparsify/virt-sparsify.pod:24
25562 "Virt-sparsify can operate on any disk image, not just ones from virtual "
25563 "machines. If a virtual machine has more than one attached disk, you must "
25564 "sparsify each one separately."
25568 #: ../sparsify/virt-sparsify.pod:28
25569 msgid "IMPORTANT LIMITATIONS"
25573 #: ../sparsify/virt-sparsify.pod:34
25575 "Virt-sparsify does not do in-place modifications. It copies from a source "
25576 "image to a destination image, leaving the source unchanged. I<Check that "
25577 "the sparsification was successful before deleting the source image>."
25581 #: ../sparsify/virt-sparsify.pod:41
25582 msgid "The virtual machine I<must be shut down> before using this tool."
25586 #: ../sparsify/virt-sparsify.pod:45
25588 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
25589 "(1 temporary copy + 1 destination image). This is in the worst case and "
25590 "usually much less space is required."
25594 #: ../sparsify/virt-sparsify.pod:51
25596 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
25600 #: ../sparsify/virt-sparsify.pod:56
25601 msgid "Virt-sparsify cannot handle encrypted disks."
25605 #: ../sparsify/virt-sparsify.pod:60
25607 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
25608 "this space is often used for critical items like bootloaders so it's not "
25613 #: ../sparsify/virt-sparsify.pod:66
25615 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
25616 "to do this unless we can be sure there is no hibernation data, so at the "
25617 "moment swap partitions are ignored."
25621 #: ../sparsify/virt-sparsify.pod:72
25623 "You may also want to read the manual pages for the associated tools L<virt-"
25624 "filesystems(1)> and L<virt-df(1)> before starting."
25628 #: ../sparsify/virt-sparsify.pod:77
25629 msgid "Typical usage is:"
25633 #: ../sparsify/virt-sparsify.pod:79
25636 " virt-sparsify indisk outdisk\n"
25641 #: ../sparsify/virt-sparsify.pod:81
25643 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
25644 "is created, or overwritten if it already exists. The format of the input "
25645 "disk is detected (eg. qcow2) and the same format is used for the output disk."
25649 #: ../sparsify/virt-sparsify.pod:86
25650 msgid "To convert between formats, use the I<--convert> option:"
25654 #: ../sparsify/virt-sparsify.pod:88
25657 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
25662 #: ../sparsify/virt-sparsify.pod:90
25664 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
25665 "can find within the source disk image. You can get it to ignore (don't zero "
25666 "free space on) certain filesystems by doing:"
25670 #: ../sparsify/virt-sparsify.pod:94
25673 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
25678 #: ../sparsify/virt-sparsify.pod:96
25680 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
25684 #: ../sparsify/virt-sparsify.pod:107
25685 msgid "B<--compress>"
25689 #: ../sparsify/virt-sparsify.pod:109
25691 "Compress the output file. This I<only> works if the output format is "
25696 #: ../sparsify/virt-sparsify.pod:112
25697 msgid "B<--convert> raw"
25701 #: ../sparsify/virt-sparsify.pod:114
25702 msgid "B<--convert> qcow2"
25706 #: ../sparsify/virt-sparsify.pod:116
25707 msgid "B<--convert> [other formats]"
25711 #: ../sparsify/virt-sparsify.pod:118
25713 "Use C<output-format> as the format for the destination image. If this is "
25714 "not specified, then the input format is used."
25718 #: ../sparsify/virt-sparsify.pod:121
25720 "Supported and known-working output formats are: C<raw>, C<qcow2>, C<vdi>."
25724 #: ../sparsify/virt-sparsify.pod:123
25726 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
25727 "C<vmdk>, but support for other formats is reliant on qemu."
25731 #: ../sparsify/virt-sparsify.pod:126
25733 "Specifying the I<--convert> option is usually a good idea, because then virt-"
25734 "sparsify doesn't need to try to guess the input format."
25738 #: ../sparsify/virt-sparsify.pod:129
25739 msgid "For fine-tuning the output format, see: I<--compress>, I<-o>."
25743 #: ../sparsify/virt-sparsify.pod:133
25744 msgid "B<--format> qcow2"
25748 #: ../sparsify/virt-sparsify.pod:141
25749 msgid "B<--ignore> filesystem"
25753 #: ../sparsify/virt-sparsify.pod:143
25754 msgid "B<--ignore> volgroup"
25758 #: ../sparsify/virt-sparsify.pod:145
25760 "Ignore the named filesystem. Free space on the filesystem will not be "
25761 "zeroed, but existing blocks of zeroes will still be sparsified."
25765 #: ../sparsify/virt-sparsify.pod:148
25767 "In the second form, this ignores the named volume group. Use the volume "
25768 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
25772 #: ../sparsify/virt-sparsify.pod:159
25773 msgid "B<-o> option[,option,...]"
25777 #: ../sparsify/virt-sparsify.pod:161
25779 "Pass I<-o> option(s) to the L<qemu-img(1)> command to fine-tune the output "
25780 "format. Options available depend on the output format (see I<--convert>) "
25781 "and the installed version of the qemu-img program."
25785 #: ../sparsify/virt-sparsify.pod:165
25787 "You should use I<-o> at most once. To pass multiple options, separate them "
25792 #: ../sparsify/virt-sparsify.pod:168
25795 " virt-sparsify --convert qcow2 \\\n"
25796 " -o cluster_size=512,preallocation=metadata ...\n"
25801 #: ../sparsify/virt-sparsify.pod:175
25802 msgid "This disables progress bars and other unnecessary output."
25806 #: ../sparsify/virt-sparsify.pod:197
25808 "The I<--machine-readable> option can be used to make the output more machine "
25809 "friendly, which is useful when calling virt-sparsify from other programs, "
25814 #: ../sparsify/virt-sparsify.pod:203
25816 "Firstly use the option on its own to query the capabilities of the virt-"
25817 "sparsify binary. Typical output looks like this:"
25821 #: ../sparsify/virt-sparsify.pod:206
25824 " $ virt-sparsify --machine-readable\n"
25832 #: ../sparsify/virt-sparsify.pod:236
25834 "The calling program should treat messages sent to stderr as error messages. "
25835 "In addition, virt-sparsify exits with a non-zero status code if there was a "
25840 #: ../sparsify/virt-sparsify.pod:242
25842 "All versions of virt-sparsify have supported the I<--machine-readable> "
25847 #: ../sparsify/virt-sparsify.pod:256
25849 "Location of the temporary directory used for the potentially large temporary "
25854 #: ../sparsify/virt-sparsify.pod:259
25856 "You should ensure there is enough free space in the worst case for a full "
25857 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
25858 "to another directory that has enough space."
25862 #: ../sparsify/virt-sparsify.pod:263
25863 msgid "This defaults to C</tmp>."
25867 #: ../sparsify/virt-sparsify.pod:267
25869 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
25873 #: ../sparsify/virt-sparsify.pod:271
25875 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
25876 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-img"
25877 "(1)>, L<http://libguestfs.org/>."
25881 #: ../src/guestfs-actions.pod:1
25882 msgid "guestfs_add_cdrom"
25886 #: ../src/guestfs-actions.pod:3
25890 " guestfs_add_cdrom (guestfs_h *g,\n"
25891 " const char *filename);\n"
25896 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:302
25897 #: ../src/guestfs-actions.pod:323
25899 "I<This function is deprecated.> In new code, use the L</"
25900 "guestfs_add_drive_opts> call instead."
25904 #: ../src/guestfs-actions.pod:24
25906 "This call checks for the existence of C<filename>. This stops you from "
25907 "specifying other types of drive which are supported by qemu such as C<nbd:> "
25908 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
25913 #: ../src/guestfs-actions.pod:31
25915 "If you just want to add an ISO file (often you use this as an efficient way "
25916 "to transfer large files into the guest), then you should probably use "
25917 "C<guestfs_add_drive_ro> instead."
25921 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:187
25922 #: ../src/guestfs-actions.pod:254 ../src/guestfs-actions.pod:291
25923 #: ../src/guestfs-actions.pod:312 ../src/guestfs-actions.pod:333
25924 #: ../src/guestfs-actions.pod:346 ../src/guestfs-actions.pod:360
25925 #: ../src/guestfs-actions.pod:480 ../src/guestfs-actions.pod:500
25926 #: ../src/guestfs-actions.pod:514 ../src/guestfs-actions.pod:559
25927 #: ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:605
25928 #: ../src/guestfs-actions.pod:672 ../src/guestfs-actions.pod:705
25929 #: ../src/guestfs-actions.pod:719 ../src/guestfs-actions.pod:734
25930 #: ../src/guestfs-actions.pod:833 ../src/guestfs-actions.pod:851
25931 #: ../src/guestfs-actions.pod:865 ../src/guestfs-actions.pod:879
25932 #: ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:1099
25933 #: ../src/guestfs-actions.pod:1119 ../src/guestfs-actions.pod:1137
25934 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:1286
25935 #: ../src/guestfs-actions.pod:1332 ../src/guestfs-actions.pod:1372
25936 #: ../src/guestfs-actions.pod:1425 ../src/guestfs-actions.pod:1478
25937 #: ../src/guestfs-actions.pod:1536 ../src/guestfs-actions.pod:1590
25938 #: ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1623
25939 #: ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:1721
25940 #: ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:1777
25941 #: ../src/guestfs-actions.pod:1819 ../src/guestfs-actions.pod:1932
25942 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:2174
25943 #: ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2283
25944 #: ../src/guestfs-actions.pod:2791 ../src/guestfs-actions.pod:2935
25945 #: ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3031
25946 #: ../src/guestfs-actions.pod:4092 ../src/guestfs-actions.pod:4107
25947 #: ../src/guestfs-actions.pod:4132 ../src/guestfs-actions.pod:4334
25948 #: ../src/guestfs-actions.pod:4348 ../src/guestfs-actions.pod:4361
25949 #: ../src/guestfs-actions.pod:4375 ../src/guestfs-actions.pod:4390
25950 #: ../src/guestfs-actions.pod:4426 ../src/guestfs-actions.pod:4498
25951 #: ../src/guestfs-actions.pod:4518 ../src/guestfs-actions.pod:4535
25952 #: ../src/guestfs-actions.pod:4555 ../src/guestfs-actions.pod:4575
25953 #: ../src/guestfs-actions.pod:4610 ../src/guestfs-actions.pod:4629
25954 #: ../src/guestfs-actions.pod:4648 ../src/guestfs-actions.pod:4683
25955 #: ../src/guestfs-actions.pod:4695 ../src/guestfs-actions.pod:4728
25956 #: ../src/guestfs-actions.pod:4744 ../src/guestfs-actions.pod:4757
25957 #: ../src/guestfs-actions.pod:4772 ../src/guestfs-actions.pod:4789
25958 #: ../src/guestfs-actions.pod:4947 ../src/guestfs-actions.pod:5021
25959 #: ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5051
25960 #: ../src/guestfs-actions.pod:5064 ../src/guestfs-actions.pod:5115
25961 #: ../src/guestfs-actions.pod:5133 ../src/guestfs-actions.pod:5151
25962 #: ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5181
25963 #: ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5212
25964 #: ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:5254
25965 #: ../src/guestfs-actions.pod:5317 ../src/guestfs-actions.pod:5390
25966 #: ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5440
25967 #: ../src/guestfs-actions.pod:5459 ../src/guestfs-actions.pod:5471
25968 #: ../src/guestfs-actions.pod:5488 ../src/guestfs-actions.pod:5501
25969 #: ../src/guestfs-actions.pod:5516 ../src/guestfs-actions.pod:5531
25970 #: ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5589
25971 #: ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5648
25972 #: ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5679
25973 #: ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5781
25974 #: ../src/guestfs-actions.pod:5828 ../src/guestfs-actions.pod:5871
25975 #: ../src/guestfs-actions.pod:5899 ../src/guestfs-actions.pod:5916
25976 #: ../src/guestfs-actions.pod:5934 ../src/guestfs-actions.pod:6071
25977 #: ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6150
25978 #: ../src/guestfs-actions.pod:6168 ../src/guestfs-actions.pod:6220
25979 #: ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6303
25980 #: ../src/guestfs-actions.pod:6316 ../src/guestfs-actions.pod:6330
25981 #: ../src/guestfs-actions.pod:6619 ../src/guestfs-actions.pod:6638
25982 #: ../src/guestfs-actions.pod:6657 ../src/guestfs-actions.pod:6671
25983 #: ../src/guestfs-actions.pod:6683 ../src/guestfs-actions.pod:6697
25984 #: ../src/guestfs-actions.pod:6709 ../src/guestfs-actions.pod:6723
25985 #: ../src/guestfs-actions.pod:6739 ../src/guestfs-actions.pod:6757
25986 #: ../src/guestfs-actions.pod:6776 ../src/guestfs-actions.pod:6795
25987 #: ../src/guestfs-actions.pod:6825 ../src/guestfs-actions.pod:6843
25988 #: ../src/guestfs-actions.pod:6866 ../src/guestfs-actions.pod:6884
25989 #: ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6924
25990 #: ../src/guestfs-actions.pod:6943 ../src/guestfs-actions.pod:6960
25991 #: ../src/guestfs-actions.pod:6979 ../src/guestfs-actions.pod:7007
25992 #: ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7050
25993 #: ../src/guestfs-actions.pod:7066 ../src/guestfs-actions.pod:7090
25994 #: ../src/guestfs-actions.pod:7109 ../src/guestfs-actions.pod:7124
25995 #: ../src/guestfs-actions.pod:7143 ../src/guestfs-actions.pod:7187
25996 #: ../src/guestfs-actions.pod:7214 ../src/guestfs-actions.pod:7244
25997 #: ../src/guestfs-actions.pod:7356 ../src/guestfs-actions.pod:7477
25998 #: ../src/guestfs-actions.pod:7489 ../src/guestfs-actions.pod:7502
25999 #: ../src/guestfs-actions.pod:7515 ../src/guestfs-actions.pod:7537
26000 #: ../src/guestfs-actions.pod:7550 ../src/guestfs-actions.pod:7563
26001 #: ../src/guestfs-actions.pod:7576 ../src/guestfs-actions.pod:7591
26002 #: ../src/guestfs-actions.pod:7650 ../src/guestfs-actions.pod:7667
26003 #: ../src/guestfs-actions.pod:7683 ../src/guestfs-actions.pod:7699
26004 #: ../src/guestfs-actions.pod:7716 ../src/guestfs-actions.pod:7729
26005 #: ../src/guestfs-actions.pod:7749 ../src/guestfs-actions.pod:7849
26006 #: ../src/guestfs-actions.pod:7907 ../src/guestfs-actions.pod:7921
26007 #: ../src/guestfs-actions.pod:7962 ../src/guestfs-actions.pod:7975
26008 #: ../src/guestfs-actions.pod:7993 ../src/guestfs-actions.pod:8027
26009 #: ../src/guestfs-actions.pod:8063 ../src/guestfs-actions.pod:8179
26010 #: ../src/guestfs-actions.pod:8194 ../src/guestfs-actions.pod:8208
26011 #: ../src/guestfs-actions.pod:8263 ../src/guestfs-actions.pod:8276
26012 #: ../src/guestfs-actions.pod:8321 ../src/guestfs-actions.pod:8361
26013 #: ../src/guestfs-actions.pod:8417 ../src/guestfs-actions.pod:8437
26014 #: ../src/guestfs-actions.pod:8470 ../src/guestfs-actions.pod:8534
26015 #: ../src/guestfs-actions.pod:8557 ../src/guestfs-actions.pod:8583
26016 msgid "This function returns 0 on success or -1 on error."
26020 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:189
26021 #: ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:2397
26022 #: ../src/guestfs-actions.pod:2495 ../src/guestfs-actions.pod:2620
26023 #: ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4114
26024 #: ../src/guestfs-actions.pod:5565 ../src/guestfs-actions.pod:6845
26025 #: ../src/guestfs-actions.pod:6962 ../src/guestfs-actions.pod:7111
26026 #: ../src/guestfs-actions.pod:7593 ../src/guestfs-actions.pod:7718
26027 #: ../src/guestfs-actions.pod:8363
26028 msgid "(Added in 0.3)"
26032 #: ../src/guestfs-actions.pod:41
26033 msgid "guestfs_add_domain"
26037 #: ../src/guestfs-actions.pod:43
26041 " guestfs_add_domain (guestfs_h *g,\n"
26042 " const char *dom,\n"
26048 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:198
26049 #: ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:1214
26050 #: ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1344
26051 #: ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1466
26052 #: ../src/guestfs-actions.pod:1519 ../src/guestfs-actions.pod:3288
26053 #: ../src/guestfs-actions.pod:4882 ../src/guestfs-actions.pod:5266
26054 #: ../src/guestfs-actions.pod:5575 ../src/guestfs-actions.pod:5792
26055 #: ../src/guestfs-actions.pod:7760
26057 "You may supply a list of optional arguments to this call. Use zero or more "
26058 "of the following pairs of parameters, and terminate the list with C<-1> on "
26059 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
26063 #: ../src/guestfs-actions.pod:53
26066 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
26067 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
26068 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
26069 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
26070 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
26071 " GUESTFS_ADD_DOMAIN_READONLYDISK, const char *readonlydisk,\n"
26076 #: ../src/guestfs-actions.pod:60
26078 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
26079 "It works by connecting to libvirt, requesting the domain and domain XML from "
26080 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
26085 #: ../src/guestfs-actions.pod:141
26087 "The other optional parameters are passed directly through to "
26088 "C<guestfs_add_drive_opts>."
26092 #: ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:403
26093 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:751
26094 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
26095 #: ../src/guestfs-actions.pod:819 ../src/guestfs-actions.pod:1797
26096 #: ../src/guestfs-actions.pod:2153 ../src/guestfs-actions.pod:2356
26097 #: ../src/guestfs-actions.pod:2467 ../src/guestfs-actions.pod:2518
26098 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2584
26099 #: ../src/guestfs-actions.pod:2607 ../src/guestfs-actions.pod:2922
26100 #: ../src/guestfs-actions.pod:3406 ../src/guestfs-actions.pod:3424
26101 #: ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5968
26102 #: ../src/guestfs-actions.pod:6206 ../src/guestfs-actions.pod:6400
26103 #: ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:7948
26104 #: ../src/guestfs-actions.pod:8374 ../src/guestfs-actions.pod:8387
26105 #: ../src/guestfs-actions.pod:8400
26106 msgid "On error this function returns -1."
26110 #: ../src/guestfs-actions.pod:146
26111 msgid "(Added in 1.7.4)"
26115 #: ../src/guestfs-actions.pod:148
26116 msgid "guestfs_add_domain_va"
26120 #: ../src/guestfs-actions.pod:150
26124 " guestfs_add_domain_va (guestfs_h *g,\n"
26125 " const char *dom,\n"
26126 " va_list args);\n"
26131 #: ../src/guestfs-actions.pod:155
26132 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
26136 #: ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:168
26137 #: ../src/guestfs-actions.pod:267 ../src/guestfs-actions.pod:278
26138 #: ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:940
26139 #: ../src/guestfs-actions.pod:1242 ../src/guestfs-actions.pod:1255
26140 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1314
26141 #: ../src/guestfs-actions.pod:1391 ../src/guestfs-actions.pod:1403
26142 #: ../src/guestfs-actions.pod:1444 ../src/guestfs-actions.pod:1456
26143 #: ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1509
26144 #: ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1567
26145 #: ../src/guestfs-actions.pod:3372 ../src/guestfs-actions.pod:3384
26146 #: ../src/guestfs-actions.pod:4959 ../src/guestfs-actions.pod:4971
26147 #: ../src/guestfs-actions.pod:5331 ../src/guestfs-actions.pod:5343
26148 #: ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5615
26149 #: ../src/guestfs-actions.pod:5841 ../src/guestfs-actions.pod:5852
26150 #: ../src/guestfs-actions.pod:7862 ../src/guestfs-actions.pod:7873
26151 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
26155 #: ../src/guestfs-actions.pod:159
26156 msgid "guestfs_add_domain_argv"
26160 #: ../src/guestfs-actions.pod:161
26164 " guestfs_add_domain_argv (guestfs_h *g,\n"
26165 " const char *dom,\n"
26166 " const struct guestfs_add_domain_argv *optargs);\n"
26171 #: ../src/guestfs-actions.pod:166
26172 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
26176 #: ../src/guestfs-actions.pod:170
26177 msgid "guestfs_add_drive"
26181 #: ../src/guestfs-actions.pod:172
26185 " guestfs_add_drive (guestfs_h *g,\n"
26186 " const char *filename);\n"
26191 #: ../src/guestfs-actions.pod:176
26193 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
26194 "optional parameters, so the disk is added writable, with the format being "
26195 "detected automatically."
26199 #: ../src/guestfs-actions.pod:180
26201 "Automatic detection of the format opens you up to a potential security hole "
26202 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
26203 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
26204 "you should think about replacing calls to this function with calls to "
26205 "C<guestfs_add_drive_opts>, and specifying the format."
26209 #: ../src/guestfs-actions.pod:191
26210 msgid "guestfs_add_drive_opts"
26214 #: ../src/guestfs-actions.pod:193
26218 " guestfs_add_drive_opts (guestfs_h *g,\n"
26219 " const char *filename,\n"
26225 #: ../src/guestfs-actions.pod:203
26228 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
26229 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
26230 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
26231 " GUESTFS_ADD_DRIVE_OPTS_NAME, const char *name,\n"
26236 #: ../src/guestfs-actions.pod:233
26238 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
26239 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
26240 "Possible formats include C<raw> and C<qcow2>."
26244 #: ../src/guestfs-actions.pod:244
26246 "This rarely-used option lets you emulate the behaviour of the deprecated "
26247 "C<guestfs_add_drive_with_if> call (q.v.)"
26251 #: ../src/guestfs-actions.pod:256
26252 msgid "(Added in 1.5.23)"
26256 #: ../src/guestfs-actions.pod:258
26257 msgid "guestfs_add_drive_opts_va"
26261 #: ../src/guestfs-actions.pod:260
26265 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
26266 " const char *filename,\n"
26267 " va_list args);\n"
26272 #: ../src/guestfs-actions.pod:265
26273 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
26277 #: ../src/guestfs-actions.pod:269
26278 msgid "guestfs_add_drive_opts_argv"
26282 #: ../src/guestfs-actions.pod:271
26286 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
26287 " const char *filename,\n"
26288 " const struct guestfs_add_drive_opts_argv *optargs);\n"
26293 #: ../src/guestfs-actions.pod:276
26294 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
26298 #: ../src/guestfs-actions.pod:280
26299 msgid "guestfs_add_drive_ro"
26303 #: ../src/guestfs-actions.pod:282
26307 " guestfs_add_drive_ro (guestfs_h *g,\n"
26308 " const char *filename);\n"
26313 #: ../src/guestfs-actions.pod:286
26315 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
26316 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
26317 "disk is added read-only, with the format being detected automatically."
26321 #: ../src/guestfs-actions.pod:293
26322 msgid "(Added in 1.0.38)"
26326 #: ../src/guestfs-actions.pod:295
26327 msgid "guestfs_add_drive_ro_with_if"
26331 #: ../src/guestfs-actions.pod:297
26335 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
26336 " const char *filename,\n"
26337 " const char *iface);\n"
26342 #: ../src/guestfs-actions.pod:309
26344 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
26345 "QEMU interface emulation to use at run time."
26349 #: ../src/guestfs-actions.pod:314 ../src/guestfs-actions.pod:335
26350 #: ../src/guestfs-actions.pod:2881
26351 msgid "(Added in 1.0.84)"
26355 #: ../src/guestfs-actions.pod:316
26356 msgid "guestfs_add_drive_with_if"
26360 #: ../src/guestfs-actions.pod:318
26364 " guestfs_add_drive_with_if (guestfs_h *g,\n"
26365 " const char *filename,\n"
26366 " const char *iface);\n"
26371 #: ../src/guestfs-actions.pod:330
26373 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
26374 "QEMU interface emulation to use at run time."
26378 #: ../src/guestfs-actions.pod:337
26379 msgid "guestfs_aug_clear"
26383 #: ../src/guestfs-actions.pod:339
26387 " guestfs_aug_clear (guestfs_h *g,\n"
26388 " const char *augpath);\n"
26393 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:2609
26394 msgid "(Added in 1.3.4)"
26398 #: ../src/guestfs-actions.pod:350
26399 msgid "guestfs_aug_close"
26403 #: ../src/guestfs-actions.pod:352
26407 " guestfs_aug_close (guestfs_h *g);\n"
26412 #: ../src/guestfs-actions.pod:355
26414 "Close the current Augeas handle and free up any resources used by it. After "
26415 "calling this, you have to call C<guestfs_aug_init> again before you can use "
26416 "any other Augeas functions."
26420 #: ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:387
26421 #: ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:419
26422 #: ../src/guestfs-actions.pod:482 ../src/guestfs-actions.pod:502
26423 #: ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:547
26424 #: ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:575
26425 #: ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:607
26426 #: ../src/guestfs-actions.pod:6477
26427 msgid "(Added in 0.7)"
26431 #: ../src/guestfs-actions.pod:364
26432 msgid "guestfs_aug_defnode"
26436 #: ../src/guestfs-actions.pod:366
26439 " struct guestfs_int_bool *\n"
26440 " guestfs_aug_defnode (guestfs_h *g,\n"
26441 " const char *name,\n"
26442 " const char *expr,\n"
26443 " const char *val);\n"
26448 #: ../src/guestfs-actions.pod:375
26450 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
26451 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
26452 "containing that single node."
26456 #: ../src/guestfs-actions.pod:383
26458 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
26459 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
26463 #: ../src/guestfs-actions.pod:389
26464 msgid "guestfs_aug_defvar"
26468 #: ../src/guestfs-actions.pod:391
26472 " guestfs_aug_defvar (guestfs_h *g,\n"
26473 " const char *name,\n"
26474 " const char *expr);\n"
26479 #: ../src/guestfs-actions.pod:407
26480 msgid "guestfs_aug_get"
26484 #: ../src/guestfs-actions.pod:409
26488 " guestfs_aug_get (guestfs_h *g,\n"
26489 " const char *augpath);\n"
26494 #: ../src/guestfs-actions.pod:416 ../src/guestfs-actions.pod:980
26495 #: ../src/guestfs-actions.pod:998 ../src/guestfs-actions.pod:1058
26496 #: ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1177
26497 #: ../src/guestfs-actions.pod:1666 ../src/guestfs-actions.pod:1683
26498 #: ../src/guestfs-actions.pod:1702 ../src/guestfs-actions.pod:1836
26499 #: ../src/guestfs-actions.pod:2024 ../src/guestfs-actions.pod:2136
26500 #: ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2316
26501 #: ../src/guestfs-actions.pod:2383 ../src/guestfs-actions.pod:2426
26502 #: ../src/guestfs-actions.pod:2447 ../src/guestfs-actions.pod:2632
26503 #: ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:3050
26504 #: ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3256
26505 #: ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3490
26506 #: ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:3539
26507 #: ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3640
26508 #: ../src/guestfs-actions.pod:3660 ../src/guestfs-actions.pod:3680
26509 #: ../src/guestfs-actions.pod:4320 ../src/guestfs-actions.pod:4667
26510 #: ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:5093
26511 #: ../src/guestfs-actions.pod:5986 ../src/guestfs-actions.pod:6187
26512 #: ../src/guestfs-actions.pod:6375 ../src/guestfs-actions.pod:6553
26513 #: ../src/guestfs-actions.pod:6602 ../src/guestfs-actions.pod:7262
26514 #: ../src/guestfs-actions.pod:7278 ../src/guestfs-actions.pod:7302
26515 #: ../src/guestfs-actions.pod:7326 ../src/guestfs-actions.pod:8122
26516 #: ../src/guestfs-actions.pod:8141 ../src/guestfs-actions.pod:8159
26517 #: ../src/guestfs-actions.pod:8333 ../src/guestfs-actions.pod:8647
26519 "This function returns a string, or NULL on error. I<The caller must free "
26520 "the returned string after use>."
26524 #: ../src/guestfs-actions.pod:421
26525 msgid "guestfs_aug_init"
26529 #: ../src/guestfs-actions.pod:423
26533 " guestfs_aug_init (guestfs_h *g,\n"
26534 " const char *root,\n"
26540 #: ../src/guestfs-actions.pod:432
26541 msgid "You must call this before using any other C<guestfs_aug_*> commands."
26545 #: ../src/guestfs-actions.pod:457
26547 "This option is only useful when debugging Augeas lenses. Use of this option "
26548 "may require additional memory for the libguestfs appliance. You may need to "
26549 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
26550 "C<guestfs_set_memsize>."
26554 #: ../src/guestfs-actions.pod:472
26555 msgid "Do not load the tree in C<guestfs_aug_init>."
26559 #: ../src/guestfs-actions.pod:476
26560 msgid "To close the handle, you can call C<guestfs_aug_close>."
26564 #: ../src/guestfs-actions.pod:484
26565 msgid "guestfs_aug_insert"
26569 #: ../src/guestfs-actions.pod:486
26573 " guestfs_aug_insert (guestfs_h *g,\n"
26574 " const char *augpath,\n"
26575 " const char *label,\n"
26581 #: ../src/guestfs-actions.pod:504
26582 msgid "guestfs_aug_load"
26586 #: ../src/guestfs-actions.pod:506
26590 " guestfs_aug_load (guestfs_h *g);\n"
26595 #: ../src/guestfs-actions.pod:518
26596 msgid "guestfs_aug_ls"
26600 #: ../src/guestfs-actions.pod:520
26604 " guestfs_aug_ls (guestfs_h *g,\n"
26605 " const char *augpath);\n"
26610 #: ../src/guestfs-actions.pod:524
26612 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
26613 "sorting the resulting nodes into alphabetical order."
26617 #: ../src/guestfs-actions.pod:527 ../src/guestfs-actions.pod:543
26618 #: ../src/guestfs-actions.pod:689 ../src/guestfs-actions.pod:1196
26619 #: ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:1870
26620 #: ../src/guestfs-actions.pod:1973 ../src/guestfs-actions.pod:1992
26621 #: ../src/guestfs-actions.pod:2238 ../src/guestfs-actions.pod:2704
26622 #: ../src/guestfs-actions.pod:2720 ../src/guestfs-actions.pod:2739
26623 #: ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:2828
26624 #: ../src/guestfs-actions.pod:2899 ../src/guestfs-actions.pod:2948
26625 #: ../src/guestfs-actions.pod:3217 ../src/guestfs-actions.pod:3592
26626 #: ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:4190
26627 #: ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4227
26628 #: ../src/guestfs-actions.pod:4282 ../src/guestfs-actions.pod:4302
26629 #: ../src/guestfs-actions.pod:4407 ../src/guestfs-actions.pod:4806
26630 #: ../src/guestfs-actions.pod:5712 ../src/guestfs-actions.pod:6347
26631 #: ../src/guestfs-actions.pod:6473 ../src/guestfs-actions.pod:6587
26632 #: ../src/guestfs-actions.pod:7342 ../src/guestfs-actions.pod:7403
26633 #: ../src/guestfs-actions.pod:7458 ../src/guestfs-actions.pod:7604
26634 #: ../src/guestfs-actions.pod:7628 ../src/guestfs-actions.pod:8226
26635 #: ../src/guestfs-actions.pod:8246 ../src/guestfs-actions.pod:8293
26636 #: ../src/guestfs-actions.pod:8487 ../src/guestfs-actions.pod:8506
26637 #: ../src/guestfs-actions.pod:8597 ../src/guestfs-actions.pod:8616
26638 #: ../src/guestfs-actions.pod:8662 ../src/guestfs-actions.pod:8681
26640 "This function returns a NULL-terminated array of strings (like L<environ(3)"
26641 ">), or NULL if there was an error. I<The caller must free the strings and "
26642 "the array after use>."
26646 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:1121
26647 #: ../src/guestfs-actions.pod:1139 ../src/guestfs-actions.pod:1908
26648 #: ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:3985
26649 #: ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:4697
26650 #: ../src/guestfs-actions.pod:5033 ../src/guestfs-actions.pod:5066
26651 #: ../src/guestfs-actions.pod:5229 ../src/guestfs-actions.pod:5716
26652 #: ../src/guestfs-actions.pod:6288 ../src/guestfs-actions.pod:6685
26653 #: ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6711
26654 #: ../src/guestfs-actions.pod:7189 ../src/guestfs-actions.pod:7964
26655 #: ../src/guestfs-actions.pod:7977 ../src/guestfs-actions.pod:8210
26656 #: ../src/guestfs-actions.pod:8475
26657 msgid "(Added in 0.8)"
26661 #: ../src/guestfs-actions.pod:533
26662 msgid "guestfs_aug_match"
26666 #: ../src/guestfs-actions.pod:535
26670 " guestfs_aug_match (guestfs_h *g,\n"
26671 " const char *augpath);\n"
26676 #: ../src/guestfs-actions.pod:549
26677 msgid "guestfs_aug_mv"
26681 #: ../src/guestfs-actions.pod:551
26685 " guestfs_aug_mv (guestfs_h *g,\n"
26686 " const char *src,\n"
26687 " const char *dest);\n"
26692 #: ../src/guestfs-actions.pod:563
26693 msgid "guestfs_aug_rm"
26697 #: ../src/guestfs-actions.pod:565
26701 " guestfs_aug_rm (guestfs_h *g,\n"
26702 " const char *augpath);\n"
26707 #: ../src/guestfs-actions.pod:577
26708 msgid "guestfs_aug_save"
26712 #: ../src/guestfs-actions.pod:579
26716 " guestfs_aug_save (guestfs_h *g);\n"
26721 #: ../src/guestfs-actions.pod:584
26723 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
26728 #: ../src/guestfs-actions.pod:591
26729 msgid "guestfs_aug_set"
26733 #: ../src/guestfs-actions.pod:593
26737 " guestfs_aug_set (guestfs_h *g,\n"
26738 " const char *augpath,\n"
26739 " const char *val);\n"
26744 #: ../src/guestfs-actions.pod:600
26746 "In the Augeas API, it is possible to clear a node by setting the value to "
26747 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
26748 "this call. Instead you must use the C<guestfs_aug_clear> call."
26752 #: ../src/guestfs-actions.pod:609
26753 msgid "guestfs_available"
26757 #: ../src/guestfs-actions.pod:611
26761 " guestfs_available (guestfs_h *g,\n"
26762 " char *const *groups);\n"
26767 #: ../src/guestfs-actions.pod:619
26769 "The libguestfs groups, and the functions that those groups correspond to, "
26770 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
26771 "runtime by calling C<guestfs_available_all_groups>."
26775 #: ../src/guestfs-actions.pod:643
26776 msgid "You must call C<guestfs_launch> before calling this function."
26780 #: ../src/guestfs-actions.pod:665
26782 "This call was added in version C<1.0.80>. In previous versions of "
26783 "libguestfs all you could do would be to speculatively execute a command to "
26784 "find out if the daemon implemented it. See also C<guestfs_version>."
26788 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:1653
26789 msgid "(Added in 1.0.80)"
26793 #: ../src/guestfs-actions.pod:676
26794 msgid "guestfs_available_all_groups"
26798 #: ../src/guestfs-actions.pod:678
26802 " guestfs_available_all_groups (guestfs_h *g);\n"
26807 #: ../src/guestfs-actions.pod:681
26809 "This command returns a list of all optional groups that this daemon knows "
26810 "about. Note this returns both supported and unsupported groups. To find "
26811 "out which ones the daemon can actually support you have to call "
26812 "C<guestfs_available> on each member of the returned list."
26816 #: ../src/guestfs-actions.pod:687
26817 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
26821 #: ../src/guestfs-actions.pod:693
26822 msgid "(Added in 1.3.15)"
26826 #: ../src/guestfs-actions.pod:695
26827 msgid "guestfs_base64_in"
26831 #: ../src/guestfs-actions.pod:697
26835 " guestfs_base64_in (guestfs_h *g,\n"
26836 " const char *base64file,\n"
26837 " const char *filename);\n"
26842 #: ../src/guestfs-actions.pod:707 ../src/guestfs-actions.pod:721
26843 msgid "(Added in 1.3.5)"
26847 #: ../src/guestfs-actions.pod:709
26848 msgid "guestfs_base64_out"
26852 #: ../src/guestfs-actions.pod:711
26856 " guestfs_base64_out (guestfs_h *g,\n"
26857 " const char *filename,\n"
26858 " const char *base64file);\n"
26863 #: ../src/guestfs-actions.pod:723
26864 msgid "guestfs_blockdev_flushbufs"
26868 #: ../src/guestfs-actions.pod:725
26872 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
26873 " const char *device);\n"
26878 #: ../src/guestfs-actions.pod:736 ../src/guestfs-actions.pod:753
26879 #: ../src/guestfs-actions.pod:768 ../src/guestfs-actions.pod:784
26880 #: ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:821
26881 #: ../src/guestfs-actions.pod:835 ../src/guestfs-actions.pod:853
26882 #: ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:881
26883 msgid "(Added in 0.9.3)"
26887 #: ../src/guestfs-actions.pod:738
26888 msgid "guestfs_blockdev_getbsz"
26892 #: ../src/guestfs-actions.pod:740
26896 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
26897 " const char *device);\n"
26902 #: ../src/guestfs-actions.pod:755
26903 msgid "guestfs_blockdev_getro"
26907 #: ../src/guestfs-actions.pod:757
26911 " guestfs_blockdev_getro (guestfs_h *g,\n"
26912 " const char *device);\n"
26917 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1891
26918 #: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:2395
26919 #: ../src/guestfs-actions.pod:2406 ../src/guestfs-actions.pod:2478
26920 #: ../src/guestfs-actions.pod:2504 ../src/guestfs-actions.pod:2544
26921 #: ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2595
26922 #: ../src/guestfs-actions.pod:2618 ../src/guestfs-actions.pod:3697
26923 #: ../src/guestfs-actions.pod:3713 ../src/guestfs-actions.pod:3731
26924 #: ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3907
26925 #: ../src/guestfs-actions.pod:3922 ../src/guestfs-actions.pod:3936
26926 #: ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:3967
26927 #: ../src/guestfs-actions.pod:3983 ../src/guestfs-actions.pod:3997
26928 #: ../src/guestfs-actions.pod:4010 ../src/guestfs-actions.pod:4024
26929 #: ../src/guestfs-actions.pod:4039 ../src/guestfs-actions.pod:4054
26930 #: ../src/guestfs-actions.pod:4067 ../src/guestfs-actions.pod:4081
26931 #: ../src/guestfs-actions.pod:5950
26932 msgid "This function returns a C truth value on success or -1 on error."
26936 #: ../src/guestfs-actions.pod:770
26937 msgid "guestfs_blockdev_getsize64"
26941 #: ../src/guestfs-actions.pod:772
26945 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
26946 " const char *device);\n"
26951 #: ../src/guestfs-actions.pod:778
26952 msgid "See also C<guestfs_blockdev_getsz>."
26956 #: ../src/guestfs-actions.pod:786
26957 msgid "guestfs_blockdev_getss"
26961 #: ../src/guestfs-actions.pod:788
26965 " guestfs_blockdev_getss (guestfs_h *g,\n"
26966 " const char *device);\n"
26971 #: ../src/guestfs-actions.pod:795
26973 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
26978 #: ../src/guestfs-actions.pod:804
26979 msgid "guestfs_blockdev_getsz"
26983 #: ../src/guestfs-actions.pod:806
26987 " guestfs_blockdev_getsz (guestfs_h *g,\n"
26988 " const char *device);\n"
26993 #: ../src/guestfs-actions.pod:813
26995 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
26996 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
27000 #: ../src/guestfs-actions.pod:823
27001 msgid "guestfs_blockdev_rereadpt"
27005 #: ../src/guestfs-actions.pod:825
27009 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
27010 " const char *device);\n"
27015 #: ../src/guestfs-actions.pod:837
27016 msgid "guestfs_blockdev_setbsz"
27020 #: ../src/guestfs-actions.pod:839
27024 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
27025 " const char *device,\n"
27026 " int blocksize);\n"
27031 #: ../src/guestfs-actions.pod:855
27032 msgid "guestfs_blockdev_setro"
27036 #: ../src/guestfs-actions.pod:857
27040 " guestfs_blockdev_setro (guestfs_h *g,\n"
27041 " const char *device);\n"
27046 #: ../src/guestfs-actions.pod:869
27047 msgid "guestfs_blockdev_setrw"
27051 #: ../src/guestfs-actions.pod:871
27055 " guestfs_blockdev_setrw (guestfs_h *g,\n"
27056 " const char *device);\n"
27061 #: ../src/guestfs-actions.pod:883
27062 msgid "guestfs_btrfs_filesystem_resize"
27066 #: ../src/guestfs-actions.pod:885
27070 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
27071 " const char *mountpoint,\n"
27077 #: ../src/guestfs-actions.pod:895
27080 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
27085 #: ../src/guestfs-actions.pod:918
27086 msgid "(Added in 1.11.17)"
27090 #: ../src/guestfs-actions.pod:920
27091 msgid "guestfs_btrfs_filesystem_resize_va"
27095 #: ../src/guestfs-actions.pod:922
27099 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
27100 " const char *mountpoint,\n"
27101 " va_list args);\n"
27106 #: ../src/guestfs-actions.pod:927
27107 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
27111 #: ../src/guestfs-actions.pod:931
27112 msgid "guestfs_btrfs_filesystem_resize_argv"
27116 #: ../src/guestfs-actions.pod:933
27120 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
27121 " const char *mountpoint,\n"
27122 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
27127 #: ../src/guestfs-actions.pod:938
27128 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
27132 #: ../src/guestfs-actions.pod:942
27133 msgid "guestfs_case_sensitive_path"
27137 #: ../src/guestfs-actions.pod:944
27141 " guestfs_case_sensitive_path (guestfs_h *g,\n"
27142 " const char *path);\n"
27147 #: ../src/guestfs-actions.pod:970
27149 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
27150 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
27151 "how the directories were originally created under Windows)."
27155 #: ../src/guestfs-actions.pod:978
27156 msgid "See also C<guestfs_realpath>."
27160 #: ../src/guestfs-actions.pod:983 ../src/guestfs-actions.pod:8144
27161 msgid "(Added in 1.0.75)"
27165 #: ../src/guestfs-actions.pod:985
27166 msgid "guestfs_cat"
27170 #: ../src/guestfs-actions.pod:987
27174 " guestfs_cat (guestfs_h *g,\n"
27175 " const char *path);\n"
27180 #: ../src/guestfs-actions.pod:993
27182 "Note that this function cannot correctly handle binary files (specifically, "
27183 "files containing C<\\0> character which is treated as end of string). For "
27184 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
27185 "functions which have a more complex interface."
27189 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:4211
27190 #: ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4323
27191 #: ../src/guestfs-actions.pod:4411 ../src/guestfs-actions.pod:4810
27192 #: ../src/guestfs-actions.pod:4824 ../src/guestfs-actions.pod:6351
27193 #: ../src/guestfs-actions.pod:6365 ../src/guestfs-actions.pod:8297
27194 #: ../src/guestfs-actions.pod:8311
27195 msgid "(Added in 0.4)"
27199 #: ../src/guestfs-actions.pod:1006
27200 msgid "guestfs_checksum"
27204 #: ../src/guestfs-actions.pod:1008
27208 " guestfs_checksum (guestfs_h *g,\n"
27209 " const char *csumtype,\n"
27210 " const char *path);\n"
27215 #: ../src/guestfs-actions.pod:1054
27216 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
27220 #: ../src/guestfs-actions.pod:1056
27221 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
27225 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1728
27226 #: ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:3909
27227 #: ../src/guestfs-actions.pod:3938 ../src/guestfs-actions.pod:3999
27228 #: ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:8000
27229 msgid "(Added in 1.0.2)"
27233 #: ../src/guestfs-actions.pod:1063
27234 msgid "guestfs_checksum_device"
27238 #: ../src/guestfs-actions.pod:1065
27242 " guestfs_checksum_device (guestfs_h *g,\n"
27243 " const char *csumtype,\n"
27244 " const char *device);\n"
27249 #: ../src/guestfs-actions.pod:1070
27251 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
27252 "device named C<device>. For the types of checksums supported see the "
27253 "C<guestfs_checksum> command."
27257 #: ../src/guestfs-actions.pod:1077 ../src/guestfs-actions.pod:5783
27258 #: ../src/guestfs-actions.pod:5918 ../src/guestfs-actions.pod:5952
27259 #: ../src/guestfs-actions.pod:5970 ../src/guestfs-actions.pod:6152
27260 #: ../src/guestfs-actions.pod:7909 ../src/guestfs-actions.pod:7923
27261 #: ../src/guestfs-actions.pod:8323
27262 msgid "(Added in 1.3.2)"
27266 #: ../src/guestfs-actions.pod:1079
27267 msgid "guestfs_checksums_out"
27271 #: ../src/guestfs-actions.pod:1081
27275 " guestfs_checksums_out (guestfs_h *g,\n"
27276 " const char *csumtype,\n"
27277 " const char *directory,\n"
27278 " const char *sumsfile);\n"
27283 #: ../src/guestfs-actions.pod:1101
27284 msgid "(Added in 1.3.7)"
27288 #: ../src/guestfs-actions.pod:1103
27289 msgid "guestfs_chmod"
27293 #: ../src/guestfs-actions.pod:1105
27297 " guestfs_chmod (guestfs_h *g,\n"
27299 " const char *path);\n"
27304 #: ../src/guestfs-actions.pod:1123
27305 msgid "guestfs_chown"
27309 #: ../src/guestfs-actions.pod:1125
27313 " guestfs_chown (guestfs_h *g,\n"
27316 " const char *path);\n"
27321 #: ../src/guestfs-actions.pod:1141
27322 msgid "guestfs_command"
27326 #: ../src/guestfs-actions.pod:1143
27330 " guestfs_command (guestfs_h *g,\n"
27331 " char *const *arguments);\n"
27336 #: ../src/guestfs-actions.pod:1152
27338 "The single parameter is an argv-style list of arguments. The first element "
27339 "is the name of the program to run. Subsequent elements are parameters. The "
27340 "list must be non-empty (ie. must contain a program name). Note that the "
27341 "command runs directly, and is I<not> invoked via the shell (see "
27346 #: ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1203
27347 #: ../src/guestfs-actions.pod:2027
27348 msgid "(Added in 0.9.1)"
27352 #: ../src/guestfs-actions.pod:1185
27353 msgid "guestfs_command_lines"
27357 #: ../src/guestfs-actions.pod:1187
27361 " guestfs_command_lines (guestfs_h *g,\n"
27362 " char *const *arguments);\n"
27367 #: ../src/guestfs-actions.pod:1191
27369 "This is the same as C<guestfs_command>, but splits the result into a list of "
27374 #: ../src/guestfs-actions.pod:1194
27375 msgid "See also: C<guestfs_sh_lines>"
27379 #: ../src/guestfs-actions.pod:1205
27380 msgid "guestfs_compress_device_out"
27384 #: ../src/guestfs-actions.pod:1207
27388 " guestfs_compress_device_out (guestfs_h *g,\n"
27389 " const char *ctype,\n"
27390 " const char *device,\n"
27391 " const char *zdevice,\n"
27397 #: ../src/guestfs-actions.pod:1219
27400 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
27405 #: ../src/guestfs-actions.pod:1224
27407 "The C<ctype> and optional C<level> parameters have the same meaning as in "
27408 "C<guestfs_compress_out>."
27412 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1288
27413 #: ../src/guestfs-actions.pod:2572 ../src/guestfs-actions.pod:7068
27414 msgid "(Added in 1.13.15)"
27418 #: ../src/guestfs-actions.pod:1231
27419 msgid "guestfs_compress_device_out_va"
27423 #: ../src/guestfs-actions.pod:1233
27427 " guestfs_compress_device_out_va (guestfs_h *g,\n"
27428 " const char *ctype,\n"
27429 " const char *device,\n"
27430 " const char *zdevice,\n"
27431 " va_list args);\n"
27436 #: ../src/guestfs-actions.pod:1240
27437 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
27441 #: ../src/guestfs-actions.pod:1244
27442 msgid "guestfs_compress_device_out_argv"
27446 #: ../src/guestfs-actions.pod:1246
27450 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
27451 " const char *ctype,\n"
27452 " const char *device,\n"
27453 " const char *zdevice,\n"
27454 " const struct guestfs_compress_device_out_argv *optargs);\n"
27459 #: ../src/guestfs-actions.pod:1253
27460 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
27464 #: ../src/guestfs-actions.pod:1257
27465 msgid "guestfs_compress_out"
27469 #: ../src/guestfs-actions.pod:1259
27473 " guestfs_compress_out (guestfs_h *g,\n"
27474 " const char *ctype,\n"
27475 " const char *file,\n"
27476 " const char *zfile,\n"
27482 #: ../src/guestfs-actions.pod:1271
27485 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
27490 #: ../src/guestfs-actions.pod:1290
27491 msgid "guestfs_compress_out_va"
27495 #: ../src/guestfs-actions.pod:1292
27499 " guestfs_compress_out_va (guestfs_h *g,\n"
27500 " const char *ctype,\n"
27501 " const char *file,\n"
27502 " const char *zfile,\n"
27503 " va_list args);\n"
27508 #: ../src/guestfs-actions.pod:1299
27509 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
27513 #: ../src/guestfs-actions.pod:1303
27514 msgid "guestfs_compress_out_argv"
27518 #: ../src/guestfs-actions.pod:1305
27522 " guestfs_compress_out_argv (guestfs_h *g,\n"
27523 " const char *ctype,\n"
27524 " const char *file,\n"
27525 " const char *zfile,\n"
27526 " const struct guestfs_compress_out_argv *optargs);\n"
27531 #: ../src/guestfs-actions.pod:1312
27532 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
27536 #: ../src/guestfs-actions.pod:1316
27537 msgid "guestfs_config"
27541 #: ../src/guestfs-actions.pod:1318
27545 " guestfs_config (guestfs_h *g,\n"
27546 " const char *qemuparam,\n"
27547 " const char *qemuvalue);\n"
27552 #: ../src/guestfs-actions.pod:1336
27553 msgid "guestfs_copy_device_to_device"
27557 #: ../src/guestfs-actions.pod:1338
27561 " guestfs_copy_device_to_device (guestfs_h *g,\n"
27562 " const char *src,\n"
27563 " const char *dest,\n"
27569 #: ../src/guestfs-actions.pod:1349
27572 " GUESTFS_COPY_DEVICE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
27573 " GUESTFS_COPY_DEVICE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
27574 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, int64_t size,\n"
27579 #: ../src/guestfs-actions.pod:1353
27581 "The four calls C<guestfs_copy_device_to_device>, "
27582 "C<guestfs_copy_device_to_file>, C<guestfs_copy_file_to_device>, and "
27583 "C<guestfs_copy_file_to_file> let you copy from a source (device|file) to a "
27584 "destination (device|file)."
27588 #: ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1427
27589 #: ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1538
27590 #: ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:1723
27591 #: ../src/guestfs-actions.pod:1754 ../src/guestfs-actions.pod:1799
27592 #: ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2198
27593 #: ../src/guestfs-actions.pod:4109 ../src/guestfs-actions.pod:7995
27594 #: ../src/guestfs-actions.pod:8029 ../src/guestfs-actions.pod:8536
27595 #: ../src/guestfs-actions.pod:8559
27597 "This long-running command can generate progress notification messages so "
27598 "that the caller can display a progress bar or indicator. To receive these "
27599 "messages, the caller must register a progress event callback. See L<guestfs"
27600 "(3)/GUESTFS_EVENT_PROGRESS>."
27604 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1432
27605 #: ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1543
27606 #: ../src/guestfs-actions.pod:6208
27607 msgid "(Added in 1.13.25)"
27611 #: ../src/guestfs-actions.pod:1381
27612 msgid "guestfs_copy_device_to_device_va"
27616 #: ../src/guestfs-actions.pod:1383
27620 " guestfs_copy_device_to_device_va (guestfs_h *g,\n"
27621 " const char *src,\n"
27622 " const char *dest,\n"
27623 " va_list args);\n"
27628 #: ../src/guestfs-actions.pod:1389
27629 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_device>."
27633 #: ../src/guestfs-actions.pod:1393
27634 msgid "guestfs_copy_device_to_device_argv"
27638 #: ../src/guestfs-actions.pod:1395
27642 " guestfs_copy_device_to_device_argv (guestfs_h *g,\n"
27643 " const char *src,\n"
27644 " const char *dest,\n"
27645 " const struct guestfs_copy_device_to_device_argv *optargs);\n"
27650 #: ../src/guestfs-actions.pod:1401
27651 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_device>."
27655 #: ../src/guestfs-actions.pod:1405
27656 msgid "guestfs_copy_device_to_file"
27660 #: ../src/guestfs-actions.pod:1407
27664 " guestfs_copy_device_to_file (guestfs_h *g,\n"
27665 " const char *src,\n"
27666 " const char *dest,\n"
27672 #: ../src/guestfs-actions.pod:1418
27675 " GUESTFS_COPY_DEVICE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
27676 " GUESTFS_COPY_DEVICE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
27677 " GUESTFS_COPY_DEVICE_TO_FILE_SIZE, int64_t size,\n"
27682 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1475
27683 #: ../src/guestfs-actions.pod:1528
27685 "See C<guestfs_copy_device_to_device> for a general overview of this call."
27689 #: ../src/guestfs-actions.pod:1434
27690 msgid "guestfs_copy_device_to_file_va"
27694 #: ../src/guestfs-actions.pod:1436
27698 " guestfs_copy_device_to_file_va (guestfs_h *g,\n"
27699 " const char *src,\n"
27700 " const char *dest,\n"
27701 " va_list args);\n"
27706 #: ../src/guestfs-actions.pod:1442
27707 msgid "This is the \"va_list variant\" of L</guestfs_copy_device_to_file>."
27711 #: ../src/guestfs-actions.pod:1446
27712 msgid "guestfs_copy_device_to_file_argv"
27716 #: ../src/guestfs-actions.pod:1448
27720 " guestfs_copy_device_to_file_argv (guestfs_h *g,\n"
27721 " const char *src,\n"
27722 " const char *dest,\n"
27723 " const struct guestfs_copy_device_to_file_argv *optargs);\n"
27728 #: ../src/guestfs-actions.pod:1454
27729 msgid "This is the \"argv variant\" of L</guestfs_copy_device_to_file>."
27733 #: ../src/guestfs-actions.pod:1458
27734 msgid "guestfs_copy_file_to_device"
27738 #: ../src/guestfs-actions.pod:1460
27742 " guestfs_copy_file_to_device (guestfs_h *g,\n"
27743 " const char *src,\n"
27744 " const char *dest,\n"
27750 #: ../src/guestfs-actions.pod:1471
27753 " GUESTFS_COPY_FILE_TO_DEVICE_SRCOFFSET, int64_t srcoffset,\n"
27754 " GUESTFS_COPY_FILE_TO_DEVICE_DESTOFFSET, int64_t destoffset,\n"
27755 " GUESTFS_COPY_FILE_TO_DEVICE_SIZE, int64_t size,\n"
27760 #: ../src/guestfs-actions.pod:1487
27761 msgid "guestfs_copy_file_to_device_va"
27765 #: ../src/guestfs-actions.pod:1489
27769 " guestfs_copy_file_to_device_va (guestfs_h *g,\n"
27770 " const char *src,\n"
27771 " const char *dest,\n"
27772 " va_list args);\n"
27777 #: ../src/guestfs-actions.pod:1495
27778 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_device>."
27782 #: ../src/guestfs-actions.pod:1499
27783 msgid "guestfs_copy_file_to_device_argv"
27787 #: ../src/guestfs-actions.pod:1501
27791 " guestfs_copy_file_to_device_argv (guestfs_h *g,\n"
27792 " const char *src,\n"
27793 " const char *dest,\n"
27794 " const struct guestfs_copy_file_to_device_argv *optargs);\n"
27799 #: ../src/guestfs-actions.pod:1507
27800 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_device>."
27804 #: ../src/guestfs-actions.pod:1511
27805 msgid "guestfs_copy_file_to_file"
27809 #: ../src/guestfs-actions.pod:1513
27813 " guestfs_copy_file_to_file (guestfs_h *g,\n"
27814 " const char *src,\n"
27815 " const char *dest,\n"
27821 #: ../src/guestfs-actions.pod:1524
27824 " GUESTFS_COPY_FILE_TO_FILE_SRCOFFSET, int64_t srcoffset,\n"
27825 " GUESTFS_COPY_FILE_TO_FILE_DESTOFFSET, int64_t destoffset,\n"
27826 " GUESTFS_COPY_FILE_TO_FILE_SIZE, int64_t size,\n"
27831 #: ../src/guestfs-actions.pod:1531
27833 "This is B<not> the function you want for copying files. This is for copying "
27834 "blocks within existing files. See C<guestfs_cp>, C<guestfs_cp_a> and "
27835 "C<guestfs_mv> for general file copying and moving functions."
27839 #: ../src/guestfs-actions.pod:1545
27840 msgid "guestfs_copy_file_to_file_va"
27844 #: ../src/guestfs-actions.pod:1547
27848 " guestfs_copy_file_to_file_va (guestfs_h *g,\n"
27849 " const char *src,\n"
27850 " const char *dest,\n"
27851 " va_list args);\n"
27856 #: ../src/guestfs-actions.pod:1553
27857 msgid "This is the \"va_list variant\" of L</guestfs_copy_file_to_file>."
27861 #: ../src/guestfs-actions.pod:1557
27862 msgid "guestfs_copy_file_to_file_argv"
27866 #: ../src/guestfs-actions.pod:1559
27870 " guestfs_copy_file_to_file_argv (guestfs_h *g,\n"
27871 " const char *src,\n"
27872 " const char *dest,\n"
27873 " const struct guestfs_copy_file_to_file_argv *optargs);\n"
27878 #: ../src/guestfs-actions.pod:1565
27879 msgid "This is the \"argv variant\" of L</guestfs_copy_file_to_file>."
27883 #: ../src/guestfs-actions.pod:1569
27884 msgid "guestfs_copy_size"
27888 #: ../src/guestfs-actions.pod:1571
27892 " guestfs_copy_size (guestfs_h *g,\n"
27893 " const char *src,\n"
27894 " const char *dest,\n"
27895 " int64_t size);\n"
27900 #: ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1634
27902 "I<This function is deprecated.> In new code, use the L</"
27903 "guestfs_copy_device_to_device> call instead."
27907 #: ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:4837
27908 #: ../src/guestfs-actions.pod:6378 ../src/guestfs-actions.pod:8230
27909 #: ../src/guestfs-actions.pod:8250 ../src/guestfs-actions.pod:8336
27910 msgid "(Added in 1.0.87)"
27914 #: ../src/guestfs-actions.pod:1599
27919 #: ../src/guestfs-actions.pod:1601
27923 " guestfs_cp (guestfs_h *g,\n"
27924 " const char *src,\n"
27925 " const char *dest);\n"
27930 #: ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1625
27931 #: ../src/guestfs-actions.pod:1705 ../src/guestfs-actions.pod:1779
27932 #: ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:5730
27933 #: ../src/guestfs-actions.pod:6222
27934 msgid "(Added in 1.0.18)"
27938 #: ../src/guestfs-actions.pod:1613
27939 msgid "guestfs_cp_a"
27943 #: ../src/guestfs-actions.pod:1615
27947 " guestfs_cp_a (guestfs_h *g,\n"
27948 " const char *src,\n"
27949 " const char *dest);\n"
27954 #: ../src/guestfs-actions.pod:1627
27959 #: ../src/guestfs-actions.pod:1629
27963 " guestfs_dd (guestfs_h *g,\n"
27964 " const char *src,\n"
27965 " const char *dest);\n"
27970 #: ../src/guestfs-actions.pod:1646
27972 "If the destination is a device, it must be as large or larger than the "
27973 "source file or device, otherwise the copy will fail. This command cannot do "
27974 "partial copies (see C<guestfs_copy_device_to_device>)."
27978 #: ../src/guestfs-actions.pod:1655
27983 #: ../src/guestfs-actions.pod:1657
27987 " guestfs_df (guestfs_h *g);\n"
27992 #: ../src/guestfs-actions.pod:1662 ../src/guestfs-actions.pod:1679
27994 "This command is mostly useful for interactive sessions. It is I<not> "
27995 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
28000 #: ../src/guestfs-actions.pod:1669 ../src/guestfs-actions.pod:1686
28001 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:2811
28002 #: ../src/guestfs-actions.pod:2835 ../src/guestfs-actions.pod:2903
28003 #: ../src/guestfs-actions.pod:5096 ../src/guestfs-actions.pod:5630
28004 #: ../src/guestfs-actions.pod:7611 ../src/guestfs-actions.pod:7635
28005 #: ../src/guestfs-actions.pod:8376 ../src/guestfs-actions.pod:8389
28006 #: ../src/guestfs-actions.pod:8402
28007 msgid "(Added in 1.0.54)"
28011 #: ../src/guestfs-actions.pod:1671
28012 msgid "guestfs_df_h"
28016 #: ../src/guestfs-actions.pod:1673
28020 " guestfs_df_h (guestfs_h *g);\n"
28025 #: ../src/guestfs-actions.pod:1688
28026 msgid "guestfs_dmesg"
28030 #: ../src/guestfs-actions.pod:1690
28034 " guestfs_dmesg (guestfs_h *g);\n"
28039 #: ../src/guestfs-actions.pod:1697
28041 "Another way to get the same information is to enable verbose messages with "
28042 "C<guestfs_set_verbose> or by setting the environment variable "
28043 "C<LIBGUESTFS_DEBUG=1> before running the program."
28047 #: ../src/guestfs-actions.pod:1707
28048 msgid "guestfs_download"
28052 #: ../src/guestfs-actions.pod:1709
28056 " guestfs_download (guestfs_h *g,\n"
28057 " const char *remotefilename,\n"
28058 " const char *filename);\n"
28063 #: ../src/guestfs-actions.pod:1719
28064 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
28068 #: ../src/guestfs-actions.pod:1730
28069 msgid "guestfs_download_offset"
28073 #: ../src/guestfs-actions.pod:1732
28077 " guestfs_download_offset (guestfs_h *g,\n"
28078 " const char *remotefilename,\n"
28079 " const char *filename,\n"
28080 " int64_t offset,\n"
28081 " int64_t size);\n"
28086 #: ../src/guestfs-actions.pod:1745
28088 "Note that there is no limit on the amount of data that can be downloaded "
28089 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
28090 "full amount unless an error occurs."
28094 #: ../src/guestfs-actions.pod:1750
28095 msgid "See also C<guestfs_download>, C<guestfs_pread>."
28099 #: ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:8034
28100 msgid "(Added in 1.5.17)"
28104 #: ../src/guestfs-actions.pod:1761
28105 msgid "guestfs_drop_caches"
28109 #: ../src/guestfs-actions.pod:1763
28113 " guestfs_drop_caches (guestfs_h *g,\n"
28114 " int whattodrop);\n"
28119 #: ../src/guestfs-actions.pod:1781
28124 #: ../src/guestfs-actions.pod:1783
28128 " guestfs_du (guestfs_h *g,\n"
28129 " const char *path);\n"
28134 #: ../src/guestfs-actions.pod:1806
28135 msgid "guestfs_e2fsck_f"
28139 #: ../src/guestfs-actions.pod:1808
28143 " guestfs_e2fsck_f (guestfs_h *g,\n"
28144 " const char *device);\n"
28149 #: ../src/guestfs-actions.pod:1816
28151 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
28152 "Normally you should use C<guestfs_fsck>."
28156 #: ../src/guestfs-actions.pod:1821
28157 msgid "(Added in 1.0.29)"
28161 #: ../src/guestfs-actions.pod:1823
28162 msgid "guestfs_echo_daemon"
28166 #: ../src/guestfs-actions.pod:1825
28170 " guestfs_echo_daemon (guestfs_h *g,\n"
28171 " char *const *words);\n"
28176 #: ../src/guestfs-actions.pod:1834
28177 msgid "See also C<guestfs_ping_daemon>."
28181 #: ../src/guestfs-actions.pod:1839 ../src/guestfs-actions.pod:2597
28182 #: ../src/guestfs-actions.pod:7092
28183 msgid "(Added in 1.0.69)"
28187 #: ../src/guestfs-actions.pod:1841
28188 msgid "guestfs_egrep"
28192 #: ../src/guestfs-actions.pod:1843
28196 " guestfs_egrep (guestfs_h *g,\n"
28197 " const char *regex,\n"
28198 " const char *path);\n"
28203 #: ../src/guestfs-actions.pod:1858 ../src/guestfs-actions.pod:1877
28204 #: ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:1980
28205 #: ../src/guestfs-actions.pod:1999 ../src/guestfs-actions.pod:2727
28206 #: ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2924
28207 #: ../src/guestfs-actions.pod:2937 ../src/guestfs-actions.pod:2952
28208 #: ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3020
28209 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:4336
28210 #: ../src/guestfs-actions.pod:4350 ../src/guestfs-actions.pod:4363
28211 #: ../src/guestfs-actions.pod:4377 ../src/guestfs-actions.pod:5518
28212 #: ../src/guestfs-actions.pod:6556 ../src/guestfs-actions.pod:6605
28213 #: ../src/guestfs-actions.pod:7479 ../src/guestfs-actions.pod:7491
28214 #: ../src/guestfs-actions.pod:7504 ../src/guestfs-actions.pod:7517
28215 #: ../src/guestfs-actions.pod:7539 ../src/guestfs-actions.pod:7552
28216 #: ../src/guestfs-actions.pod:7565 ../src/guestfs-actions.pod:7578
28217 #: ../src/guestfs-actions.pod:8494 ../src/guestfs-actions.pod:8513
28218 #: ../src/guestfs-actions.pod:8604 ../src/guestfs-actions.pod:8623
28219 #: ../src/guestfs-actions.pod:8669 ../src/guestfs-actions.pod:8688
28220 msgid "(Added in 1.0.66)"
28224 #: ../src/guestfs-actions.pod:1860
28225 msgid "guestfs_egrepi"
28229 #: ../src/guestfs-actions.pod:1862
28233 " guestfs_egrepi (guestfs_h *g,\n"
28234 " const char *regex,\n"
28235 " const char *path);\n"
28240 #: ../src/guestfs-actions.pod:1879
28241 msgid "guestfs_equal"
28245 #: ../src/guestfs-actions.pod:1881
28249 " guestfs_equal (guestfs_h *g,\n"
28250 " const char *file1,\n"
28251 " const char *file2);\n"
28256 #: ../src/guestfs-actions.pod:1895
28257 msgid "guestfs_exists"
28261 #: ../src/guestfs-actions.pod:1897
28265 " guestfs_exists (guestfs_h *g,\n"
28266 " const char *path);\n"
28271 #: ../src/guestfs-actions.pod:1904
28272 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
28276 #: ../src/guestfs-actions.pod:1910
28277 msgid "guestfs_fallocate"
28281 #: ../src/guestfs-actions.pod:1912
28285 " guestfs_fallocate (guestfs_h *g,\n"
28286 " const char *path,\n"
28292 #: ../src/guestfs-actions.pod:1917
28294 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
28299 #: ../src/guestfs-actions.pod:1936
28300 msgid "guestfs_fallocate64"
28304 #: ../src/guestfs-actions.pod:1938
28308 " guestfs_fallocate64 (guestfs_h *g,\n"
28309 " const char *path,\n"
28315 #: ../src/guestfs-actions.pod:1947
28317 "Note that this call allocates disk blocks for the file. To create a sparse "
28318 "file use C<guestfs_truncate_size> instead."
28322 #: ../src/guestfs-actions.pod:1950
28324 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
28325 "oversight it only allowed 30 bit lengths to be specified, effectively "
28326 "limiting the maximum size of files created through that call to 1GB."
28330 #: ../src/guestfs-actions.pod:1961
28331 msgid "(Added in 1.3.17)"
28335 #: ../src/guestfs-actions.pod:1963
28336 msgid "guestfs_fgrep"
28340 #: ../src/guestfs-actions.pod:1965
28344 " guestfs_fgrep (guestfs_h *g,\n"
28345 " const char *pattern,\n"
28346 " const char *path);\n"
28351 #: ../src/guestfs-actions.pod:1982
28352 msgid "guestfs_fgrepi"
28356 #: ../src/guestfs-actions.pod:1984
28360 " guestfs_fgrepi (guestfs_h *g,\n"
28361 " const char *pattern,\n"
28362 " const char *path);\n"
28367 #: ../src/guestfs-actions.pod:2001
28368 msgid "guestfs_file"
28372 #: ../src/guestfs-actions.pod:2003
28376 " guestfs_file (guestfs_h *g,\n"
28377 " const char *path);\n"
28382 #: ../src/guestfs-actions.pod:2021
28384 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
28385 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
28389 #: ../src/guestfs-actions.pod:2029
28390 msgid "guestfs_file_architecture"
28394 #: ../src/guestfs-actions.pod:2031
28398 " guestfs_file_architecture (guestfs_h *g,\n"
28399 " const char *filename);\n"
28404 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:2302
28405 #: ../src/guestfs-actions.pod:2319 ../src/guestfs-actions.pod:3053
28406 #: ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:3221
28407 #: ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3426
28408 #: ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3542
28409 #: ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3880
28410 #: ../src/guestfs-actions.pod:4012
28411 msgid "(Added in 1.5.3)"
28415 #: ../src/guestfs-actions.pod:2141
28416 msgid "guestfs_filesize"
28420 #: ../src/guestfs-actions.pod:2143
28424 " guestfs_filesize (guestfs_h *g,\n"
28425 " const char *file);\n"
28430 #: ../src/guestfs-actions.pod:2149
28432 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
28433 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
28434 "devices, use C<guestfs_blockdev_getsize64>."
28438 #: ../src/guestfs-actions.pod:2155
28439 msgid "(Added in 1.0.82)"
28443 #: ../src/guestfs-actions.pod:2157
28444 msgid "guestfs_fill"
28448 #: ../src/guestfs-actions.pod:2159
28452 " guestfs_fill (guestfs_h *g,\n"
28455 " const char *path);\n"
28460 #: ../src/guestfs-actions.pod:2169
28462 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
28463 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
28464 "bytes use C<guestfs_fill_pattern>."
28468 #: ../src/guestfs-actions.pod:2181
28469 msgid "(Added in 1.0.79)"
28473 #: ../src/guestfs-actions.pod:2183
28474 msgid "guestfs_fill_pattern"
28478 #: ../src/guestfs-actions.pod:2185
28482 " guestfs_fill_pattern (guestfs_h *g,\n"
28483 " const char *pattern,\n"
28485 " const char *path);\n"
28490 #: ../src/guestfs-actions.pod:2191
28492 "This function is like C<guestfs_fill> except that it creates a new file of "
28493 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
28494 "pattern is truncated if necessary to ensure the length of the file is "
28495 "exactly C<len> bytes."
28499 #: ../src/guestfs-actions.pod:2203
28500 msgid "(Added in 1.3.12)"
28504 #: ../src/guestfs-actions.pod:2205
28505 msgid "guestfs_find"
28509 #: ../src/guestfs-actions.pod:2207
28513 " guestfs_find (guestfs_h *g,\n"
28514 " const char *directory);\n"
28519 #: ../src/guestfs-actions.pod:2223
28521 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
28525 #: ../src/guestfs-actions.pod:2236
28526 msgid "See also C<guestfs_find0>."
28530 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:4774
28531 #: ../src/guestfs-actions.pod:6640
28532 msgid "(Added in 1.0.27)"
28536 #: ../src/guestfs-actions.pod:2247
28537 msgid "guestfs_find0"
28541 #: ../src/guestfs-actions.pod:2249
28545 " guestfs_find0 (guestfs_h *g,\n"
28546 " const char *directory,\n"
28547 " const char *files);\n"
28552 #: ../src/guestfs-actions.pod:2258
28554 "This command works the same way as C<guestfs_find> with the following "
28559 #: ../src/guestfs-actions.pod:2285
28560 msgid "(Added in 1.0.74)"
28564 #: ../src/guestfs-actions.pod:2287
28565 msgid "guestfs_findfs_label"
28569 #: ../src/guestfs-actions.pod:2289
28573 " guestfs_findfs_label (guestfs_h *g,\n"
28574 " const char *label);\n"
28579 #: ../src/guestfs-actions.pod:2297
28580 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
28584 #: ../src/guestfs-actions.pod:2304
28585 msgid "guestfs_findfs_uuid"
28589 #: ../src/guestfs-actions.pod:2306
28593 " guestfs_findfs_uuid (guestfs_h *g,\n"
28594 " const char *uuid);\n"
28599 #: ../src/guestfs-actions.pod:2314
28600 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
28604 #: ../src/guestfs-actions.pod:2321
28605 msgid "guestfs_fsck"
28609 #: ../src/guestfs-actions.pod:2323
28613 " guestfs_fsck (guestfs_h *g,\n"
28614 " const char *fstype,\n"
28615 " const char *device);\n"
28620 #: ../src/guestfs-actions.pod:2358 ../src/guestfs-actions.pod:8541
28621 msgid "(Added in 1.0.16)"
28625 #: ../src/guestfs-actions.pod:2360
28626 msgid "guestfs_get_append"
28630 #: ../src/guestfs-actions.pod:2362
28634 " guestfs_get_append (guestfs_h *g);\n"
28639 #: ../src/guestfs-actions.pod:2370
28641 "This function returns a string which may be NULL. There is no way to return "
28642 "an error from this function. The string is owned by the guest handle and "
28643 "must I<not> be freed."
28647 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:6318
28648 #: ../src/guestfs-actions.pod:6797 ../src/guestfs-actions.pod:7246
28649 #: ../src/guestfs-actions.pod:7265 ../src/guestfs-actions.pod:7281
28650 #: ../src/guestfs-actions.pod:7305 ../src/guestfs-actions.pod:8181
28651 #: ../src/guestfs-actions.pod:8196 ../src/guestfs-actions.pod:8585
28652 msgid "(Added in 1.0.26)"
28656 #: ../src/guestfs-actions.pod:2376
28657 msgid "guestfs_get_attach_method"
28661 #: ../src/guestfs-actions.pod:2378
28665 " guestfs_get_attach_method (guestfs_h *g);\n"
28670 #: ../src/guestfs-actions.pod:2381
28671 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
28675 #: ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:6827
28676 msgid "(Added in 1.9.8)"
28680 #: ../src/guestfs-actions.pod:2388
28681 msgid "guestfs_get_autosync"
28685 #: ../src/guestfs-actions.pod:2390
28689 " guestfs_get_autosync (guestfs_h *g);\n"
28694 #: ../src/guestfs-actions.pod:2399
28695 msgid "guestfs_get_direct"
28699 #: ../src/guestfs-actions.pod:2401
28703 " guestfs_get_direct (guestfs_h *g);\n"
28708 #: ../src/guestfs-actions.pod:2408 ../src/guestfs-actions.pod:6868
28709 msgid "(Added in 1.0.72)"
28713 #: ../src/guestfs-actions.pod:2410
28714 msgid "guestfs_get_e2label"
28718 #: ../src/guestfs-actions.pod:2412
28722 " guestfs_get_e2label (guestfs_h *g,\n"
28723 " const char *device);\n"
28728 #: ../src/guestfs-actions.pod:2416
28730 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
28735 #: ../src/guestfs-actions.pod:2429 ../src/guestfs-actions.pod:2450
28736 #: ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6905
28737 msgid "(Added in 1.0.15)"
28741 #: ../src/guestfs-actions.pod:2431
28742 msgid "guestfs_get_e2uuid"
28746 #: ../src/guestfs-actions.pod:2433
28750 " guestfs_get_e2uuid (guestfs_h *g,\n"
28751 " const char *device);\n"
28756 #: ../src/guestfs-actions.pod:2437
28758 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
28763 #: ../src/guestfs-actions.pod:2452
28764 msgid "guestfs_get_memsize"
28768 #: ../src/guestfs-actions.pod:2454
28772 " guestfs_get_memsize (guestfs_h *g);\n"
28777 #: ../src/guestfs-actions.pod:2460
28779 "If C<guestfs_set_memsize> was not called on this handle, and if "
28780 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
28781 "value for memsize."
28785 #: ../src/guestfs-actions.pod:2469 ../src/guestfs-actions.pod:5214
28786 #: ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5442
28787 #: ../src/guestfs-actions.pod:5461 ../src/guestfs-actions.pod:5473
28788 #: ../src/guestfs-actions.pod:5490 ../src/guestfs-actions.pod:5503
28789 #: ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6926
28790 #: ../src/guestfs-actions.pod:7216 ../src/guestfs-actions.pod:7950
28791 msgid "(Added in 1.0.55)"
28795 #: ../src/guestfs-actions.pod:2471
28796 msgid "guestfs_get_network"
28800 #: ../src/guestfs-actions.pod:2473
28804 " guestfs_get_network (guestfs_h *g);\n"
28809 #: ../src/guestfs-actions.pod:2480 ../src/guestfs-actions.pod:6945
28810 msgid "(Added in 1.5.4)"
28814 #: ../src/guestfs-actions.pod:2482
28815 msgid "guestfs_get_path"
28819 #: ../src/guestfs-actions.pod:2484
28823 " guestfs_get_path (guestfs_h *g);\n"
28828 #: ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2532
28830 "This function returns a string, or NULL on error. The string is owned by "
28831 "the guest handle and must I<not> be freed."
28835 #: ../src/guestfs-actions.pod:2497
28836 msgid "guestfs_get_pgroup"
28840 #: ../src/guestfs-actions.pod:2499
28844 " guestfs_get_pgroup (guestfs_h *g);\n"
28849 #: ../src/guestfs-actions.pod:2506 ../src/guestfs-actions.pod:6981
28850 #: ../src/guestfs-actions.pod:8442
28851 msgid "(Added in 1.11.18)"
28855 #: ../src/guestfs-actions.pod:2508
28856 msgid "guestfs_get_pid"
28860 #: ../src/guestfs-actions.pod:2510
28864 " guestfs_get_pid (guestfs_h *g);\n"
28869 #: ../src/guestfs-actions.pod:2520
28870 msgid "(Added in 1.0.56)"
28874 #: ../src/guestfs-actions.pod:2522
28875 msgid "guestfs_get_qemu"
28879 #: ../src/guestfs-actions.pod:2524
28883 " guestfs_get_qemu (guestfs_h *g);\n"
28888 #: ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:7009
28889 msgid "(Added in 1.0.6)"
28893 #: ../src/guestfs-actions.pod:2537
28894 msgid "guestfs_get_recovery_proc"
28898 #: ../src/guestfs-actions.pod:2539
28902 " guestfs_get_recovery_proc (guestfs_h *g);\n"
28907 #: ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:4134
28908 #: ../src/guestfs-actions.pod:4478 ../src/guestfs-actions.pod:4872
28909 #: ../src/guestfs-actions.pod:5053 ../src/guestfs-actions.pod:6248
28910 #: ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:7033
28911 #: ../src/guestfs-actions.pod:7731 ../src/guestfs-actions.pod:7751
28912 #: ../src/guestfs-actions.pod:8065
28913 msgid "(Added in 1.0.77)"
28917 #: ../src/guestfs-actions.pod:2548
28918 msgid "guestfs_get_selinux"
28922 #: ../src/guestfs-actions.pod:2550
28926 " guestfs_get_selinux (guestfs_h *g);\n"
28931 #: ../src/guestfs-actions.pod:2553
28933 "This returns the current setting of the selinux flag which is passed to the "
28934 "appliance at boot time. See C<guestfs_set_selinux>."
28938 #: ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2635
28939 #: ../src/guestfs-actions.pod:7052 ../src/guestfs-actions.pod:7126
28940 msgid "(Added in 1.0.67)"
28944 #: ../src/guestfs-actions.pod:2563
28945 msgid "guestfs_get_smp"
28949 #: ../src/guestfs-actions.pod:2565
28953 " guestfs_get_smp (guestfs_h *g);\n"
28958 #: ../src/guestfs-actions.pod:2574
28959 msgid "guestfs_get_state"
28963 #: ../src/guestfs-actions.pod:2576
28967 " guestfs_get_state (guestfs_h *g);\n"
28972 #: ../src/guestfs-actions.pod:2588
28973 msgid "guestfs_get_trace"
28977 #: ../src/guestfs-actions.pod:2590
28981 " guestfs_get_trace (guestfs_h *g);\n"
28986 #: ../src/guestfs-actions.pod:2599
28987 msgid "guestfs_get_umask"
28991 #: ../src/guestfs-actions.pod:2601
28995 " guestfs_get_umask (guestfs_h *g);\n"
29000 #: ../src/guestfs-actions.pod:2604
29002 "Return the current umask. By default the umask is C<022> unless it has been "
29003 "set by calling C<guestfs_umask>."
29007 #: ../src/guestfs-actions.pod:2611
29008 msgid "guestfs_get_verbose"
29012 #: ../src/guestfs-actions.pod:2613
29016 " guestfs_get_verbose (guestfs_h *g);\n"
29021 #: ../src/guestfs-actions.pod:2622
29022 msgid "guestfs_getcon"
29026 #: ../src/guestfs-actions.pod:2624
29030 " guestfs_getcon (guestfs_h *g);\n"
29035 #: ../src/guestfs-actions.pod:2629
29037 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
29041 #: ../src/guestfs-actions.pod:2637
29042 msgid "guestfs_getxattr"
29046 #: ../src/guestfs-actions.pod:2639
29050 " guestfs_getxattr (guestfs_h *g,\n"
29051 " const char *path,\n"
29052 " const char *name,\n"
29053 " size_t *size_r);\n"
29058 #: ../src/guestfs-actions.pod:2645
29060 "Get a single extended attribute from file C<path> named C<name>. This call "
29061 "follows symlinks. If you want to lookup an extended attribute for the "
29062 "symlink itself, use C<guestfs_lgetxattr>."
29066 #: ../src/guestfs-actions.pod:2649 ../src/guestfs-actions.pod:4148
29068 "Normally it is better to get all extended attributes from a file in one go "
29069 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
29070 "implementations are buggy and do not provide a way to list out attributes. "
29071 "For these filesystems (notably ntfs-3g) you have to know the names of the "
29072 "extended attributes you want in advance and call this function."
29076 #: ../src/guestfs-actions.pod:2659
29077 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
29081 #: ../src/guestfs-actions.pod:2661 ../src/guestfs-actions.pod:2874
29082 #: ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4160
29083 #: ../src/guestfs-actions.pod:6241 ../src/guestfs-actions.pod:6267
29084 #: ../src/guestfs-actions.pod:6448
29086 "This function returns a buffer, or NULL on error. The size of the returned "
29087 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
29092 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4164
29093 msgid "(Added in 1.7.24)"
29097 #: ../src/guestfs-actions.pod:2667
29098 msgid "guestfs_getxattrs"
29102 #: ../src/guestfs-actions.pod:2669
29105 " struct guestfs_xattr_list *\n"
29106 " guestfs_getxattrs (guestfs_h *g,\n"
29107 " const char *path);\n"
29112 #: ../src/guestfs-actions.pod:2679
29113 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
29117 #: ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:4176
29118 #: ../src/guestfs-actions.pod:4868
29120 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
29121 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
29125 #: ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:4180
29126 #: ../src/guestfs-actions.pod:4392 ../src/guestfs-actions.pod:4428
29127 #: ../src/guestfs-actions.pod:6621 ../src/guestfs-actions.pod:7145
29128 #: ../src/guestfs-actions.pod:8650
29129 msgid "(Added in 1.0.59)"
29133 #: ../src/guestfs-actions.pod:2687
29134 msgid "guestfs_glob_expand"
29138 #: ../src/guestfs-actions.pod:2689
29142 " guestfs_glob_expand (guestfs_h *g,\n"
29143 " const char *pattern);\n"
29148 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:7329
29149 #: ../src/guestfs-actions.pod:7346
29150 msgid "(Added in 1.0.50)"
29154 #: ../src/guestfs-actions.pod:2710
29155 msgid "guestfs_grep"
29159 #: ../src/guestfs-actions.pod:2712
29163 " guestfs_grep (guestfs_h *g,\n"
29164 " const char *regex,\n"
29165 " const char *path);\n"
29170 #: ../src/guestfs-actions.pod:2729
29171 msgid "guestfs_grepi"
29175 #: ../src/guestfs-actions.pod:2731
29179 " guestfs_grepi (guestfs_h *g,\n"
29180 " const char *regex,\n"
29181 " const char *path);\n"
29186 #: ../src/guestfs-actions.pod:2748
29187 msgid "guestfs_grub_install"
29191 #: ../src/guestfs-actions.pod:2750
29195 " guestfs_grub_install (guestfs_h *g,\n"
29196 " const char *root,\n"
29197 " const char *device);\n"
29202 #: ../src/guestfs-actions.pod:2793
29203 msgid "(Added in 1.0.17)"
29207 #: ../src/guestfs-actions.pod:2795
29208 msgid "guestfs_head"
29212 #: ../src/guestfs-actions.pod:2797
29216 " guestfs_head (guestfs_h *g,\n"
29217 " const char *path);\n"
29222 #: ../src/guestfs-actions.pod:2813
29223 msgid "guestfs_head_n"
29227 #: ../src/guestfs-actions.pod:2815
29231 " guestfs_head_n (guestfs_h *g,\n"
29233 " const char *path);\n"
29238 #: ../src/guestfs-actions.pod:2837
29239 msgid "guestfs_hexdump"
29243 #: ../src/guestfs-actions.pod:2839
29247 " guestfs_hexdump (guestfs_h *g,\n"
29248 " const char *path);\n"
29253 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:7410
29254 #: ../src/guestfs-actions.pod:7465
29255 msgid "(Added in 1.0.22)"
29259 #: ../src/guestfs-actions.pod:2854
29260 msgid "guestfs_initrd_cat"
29264 #: ../src/guestfs-actions.pod:2856
29268 " guestfs_initrd_cat (guestfs_h *g,\n"
29269 " const char *initrdpath,\n"
29270 " const char *filename,\n"
29271 " size_t *size_r);\n"
29276 #: ../src/guestfs-actions.pod:2872
29277 msgid "See also C<guestfs_initrd_list>."
29281 #: ../src/guestfs-actions.pod:2883
29282 msgid "guestfs_initrd_list"
29286 #: ../src/guestfs-actions.pod:2885
29290 " guestfs_initrd_list (guestfs_h *g,\n"
29291 " const char *path);\n"
29296 #: ../src/guestfs-actions.pod:2905
29297 msgid "guestfs_inotify_add_watch"
29301 #: ../src/guestfs-actions.pod:2907
29305 " guestfs_inotify_add_watch (guestfs_h *g,\n"
29306 " const char *path,\n"
29312 #: ../src/guestfs-actions.pod:2926
29313 msgid "guestfs_inotify_close"
29317 #: ../src/guestfs-actions.pod:2928
29321 " guestfs_inotify_close (guestfs_h *g);\n"
29326 #: ../src/guestfs-actions.pod:2939
29327 msgid "guestfs_inotify_files"
29331 #: ../src/guestfs-actions.pod:2941
29335 " guestfs_inotify_files (guestfs_h *g);\n"
29340 #: ../src/guestfs-actions.pod:2944
29342 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
29343 "returns a list of pathnames of objects that were touched. The returned "
29344 "pathnames are sorted and deduplicated."
29348 #: ../src/guestfs-actions.pod:2954
29349 msgid "guestfs_inotify_init"
29353 #: ../src/guestfs-actions.pod:2956
29357 " guestfs_inotify_init (guestfs_h *g,\n"
29358 " int maxevents);\n"
29363 #: ../src/guestfs-actions.pod:2964
29365 "C<maxevents> is the maximum number of events which will be queued up between "
29366 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
29367 "passed as C<0>, then the kernel (or previously set) default is used. For "
29368 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
29369 "throws away events, but records the fact that it threw them away by setting "
29370 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
29371 "C<guestfs_inotify_read>)."
29375 #: ../src/guestfs-actions.pod:2974
29377 "Before any events are generated, you have to add some watches to the "
29378 "internal watch list. See: C<guestfs_inotify_add_watch>, "
29379 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
29383 #: ../src/guestfs-actions.pod:2980
29385 "Queued up events should be read periodically by calling "
29386 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
29387 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
29388 "often enough then you risk the internal queue overflowing."
29392 #: ../src/guestfs-actions.pod:2987
29394 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
29395 "This also removes any watches automatically."
29399 #: ../src/guestfs-actions.pod:3000
29400 msgid "guestfs_inotify_read"
29404 #: ../src/guestfs-actions.pod:3002
29407 " struct guestfs_inotify_event_list *\n"
29408 " guestfs_inotify_read (guestfs_h *g);\n"
29413 #: ../src/guestfs-actions.pod:3016
29415 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
29416 "there was an error. I<The caller must call "
29417 "C<guestfs_free_inotify_event_list> after use>."
29421 #: ../src/guestfs-actions.pod:3022
29422 msgid "guestfs_inotify_rm_watch"
29426 #: ../src/guestfs-actions.pod:3024
29430 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
29436 #: ../src/guestfs-actions.pod:3028
29438 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
29442 #: ../src/guestfs-actions.pod:3035
29443 msgid "guestfs_inspect_get_arch"
29447 #: ../src/guestfs-actions.pod:3037
29451 " guestfs_inspect_get_arch (guestfs_h *g,\n"
29452 " const char *root);\n"
29457 #: ../src/guestfs-actions.pod:3041
29459 "This returns the architecture of the inspected operating system. The "
29460 "possible return values are listed under C<guestfs_file_architecture>."
29464 #: ../src/guestfs-actions.pod:3055
29465 msgid "guestfs_inspect_get_distro"
29469 #: ../src/guestfs-actions.pod:3057
29473 " guestfs_inspect_get_distro (guestfs_h *g,\n"
29474 " const char *root);\n"
29479 #: ../src/guestfs-actions.pod:3157
29480 msgid "guestfs_inspect_get_drive_mappings"
29484 #: ../src/guestfs-actions.pod:3159
29488 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
29489 " const char *root);\n"
29494 #: ../src/guestfs-actions.pod:3188
29496 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29497 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
29501 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3460
29502 #: ../src/guestfs-actions.pod:4267 ../src/guestfs-actions.pod:5006
29503 #: ../src/guestfs-actions.pod:5692 ../src/guestfs-actions.pod:7889
29505 "This function returns a NULL-terminated array of strings, or NULL if there "
29506 "was an error. The array of strings will always have length C<2n+1>, where "
29507 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
29508 "caller must free the strings and the array after use>."
29512 #: ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3663
29513 msgid "(Added in 1.9.17)"
29517 #: ../src/guestfs-actions.pod:3200
29518 msgid "guestfs_inspect_get_filesystems"
29522 #: ../src/guestfs-actions.pod:3202
29526 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
29527 " const char *root);\n"
29532 #: ../src/guestfs-actions.pod:3214
29534 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29535 "C<guestfs_inspect_get_mountpoints>."
29539 #: ../src/guestfs-actions.pod:3223
29540 msgid "guestfs_inspect_get_format"
29544 #: ../src/guestfs-actions.pod:3225
29548 " guestfs_inspect_get_format (guestfs_h *g,\n"
29549 " const char *root);\n"
29554 #: ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3699
29555 #: ../src/guestfs-actions.pod:3715 ../src/guestfs-actions.pod:3733
29556 #: ../src/guestfs-actions.pod:6659
29557 msgid "(Added in 1.9.4)"
29561 #: ../src/guestfs-actions.pod:3261
29562 msgid "guestfs_inspect_get_hostname"
29566 #: ../src/guestfs-actions.pod:3263
29570 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
29571 " const char *root);\n"
29576 #: ../src/guestfs-actions.pod:3278
29577 msgid "(Added in 1.7.9)"
29581 #: ../src/guestfs-actions.pod:3280
29582 msgid "guestfs_inspect_get_icon"
29586 #: ../src/guestfs-actions.pod:3282
29590 " guestfs_inspect_get_icon (guestfs_h *g,\n"
29591 " const char *root,\n"
29592 " size_t *size_r,\n"
29598 #: ../src/guestfs-actions.pod:3293
29601 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
29602 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
29607 #: ../src/guestfs-actions.pod:3360 ../src/guestfs-actions.pod:4194
29608 #: ../src/guestfs-actions.pod:5591
29609 msgid "(Added in 1.11.12)"
29613 #: ../src/guestfs-actions.pod:3362
29614 msgid "guestfs_inspect_get_icon_va"
29618 #: ../src/guestfs-actions.pod:3364
29622 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
29623 " const char *root,\n"
29624 " size_t *size_r,\n"
29625 " va_list args);\n"
29630 #: ../src/guestfs-actions.pod:3370
29631 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
29635 #: ../src/guestfs-actions.pod:3374
29636 msgid "guestfs_inspect_get_icon_argv"
29640 #: ../src/guestfs-actions.pod:3376
29644 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
29645 " const char *root,\n"
29646 " size_t *size_r,\n"
29647 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
29652 #: ../src/guestfs-actions.pod:3382
29653 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
29657 #: ../src/guestfs-actions.pod:3386
29658 msgid "guestfs_inspect_get_major_version"
29662 #: ../src/guestfs-actions.pod:3388
29666 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
29667 " const char *root);\n"
29672 #: ../src/guestfs-actions.pod:3410
29673 msgid "guestfs_inspect_get_minor_version"
29677 #: ../src/guestfs-actions.pod:3412
29681 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
29682 " const char *root);\n"
29687 #: ../src/guestfs-actions.pod:3421
29689 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29690 "C<guestfs_inspect_get_major_version>."
29694 #: ../src/guestfs-actions.pod:3428
29695 msgid "guestfs_inspect_get_mountpoints"
29699 #: ../src/guestfs-actions.pod:3430
29703 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
29704 " const char *root);\n"
29709 #: ../src/guestfs-actions.pod:3451
29711 "For operating systems like Windows which still use drive letters, this call "
29712 "will only return an entry for the first drive \"mounted on\" C</>. For "
29713 "information about the mapping of drive letters to partitions, see "
29714 "C<guestfs_inspect_get_drive_mappings>."
29718 #: ../src/guestfs-actions.pod:3457
29720 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29721 "C<guestfs_inspect_get_filesystems>."
29725 #: ../src/guestfs-actions.pod:3468
29726 msgid "guestfs_inspect_get_package_format"
29730 #: ../src/guestfs-actions.pod:3470
29734 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
29735 " const char *root);\n"
29740 #: ../src/guestfs-actions.pod:3474
29742 "This function and C<guestfs_inspect_get_package_management> return the "
29743 "package format and package management tool used by the inspected operating "
29744 "system. For example for Fedora these functions would return C<rpm> (package "
29745 "format) and C<yum> (package management)."
29749 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3521
29750 msgid "(Added in 1.7.5)"
29754 #: ../src/guestfs-actions.pod:3495
29755 msgid "guestfs_inspect_get_package_management"
29759 #: ../src/guestfs-actions.pod:3497
29763 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
29764 " const char *root);\n"
29769 #: ../src/guestfs-actions.pod:3501
29771 "C<guestfs_inspect_get_package_format> and this function return the package "
29772 "format and package management tool used by the inspected operating system. "
29773 "For example for Fedora these functions would return C<rpm> (package format) "
29774 "and C<yum> (package management)."
29778 #: ../src/guestfs-actions.pod:3523
29779 msgid "guestfs_inspect_get_product_name"
29783 #: ../src/guestfs-actions.pod:3525
29787 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
29788 " const char *root);\n"
29793 #: ../src/guestfs-actions.pod:3544
29794 msgid "guestfs_inspect_get_product_variant"
29798 #: ../src/guestfs-actions.pod:3546
29802 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
29803 " const char *root);\n"
29808 #: ../src/guestfs-actions.pod:3569
29810 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
29811 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
29815 #: ../src/guestfs-actions.pod:3576
29816 msgid "(Added in 1.9.13)"
29820 #: ../src/guestfs-actions.pod:3578
29821 msgid "guestfs_inspect_get_roots"
29825 #: ../src/guestfs-actions.pod:3580
29829 " guestfs_inspect_get_roots (guestfs_h *g);\n"
29834 #: ../src/guestfs-actions.pod:3583
29836 "This function is a convenient way to get the list of root devices, as "
29837 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
29838 "the whole inspection process."
29842 #: ../src/guestfs-actions.pod:3587
29844 "This returns an empty list if either no root devices were found or the "
29845 "caller has not called C<guestfs_inspect_os>."
29849 #: ../src/guestfs-actions.pod:3596
29850 msgid "(Added in 1.7.3)"
29854 #: ../src/guestfs-actions.pod:3598
29855 msgid "guestfs_inspect_get_type"
29859 #: ../src/guestfs-actions.pod:3600
29863 " guestfs_inspect_get_type (guestfs_h *g,\n"
29864 " const char *root);\n"
29869 #: ../src/guestfs-actions.pod:3645
29870 msgid "guestfs_inspect_get_windows_current_control_set"
29874 #: ../src/guestfs-actions.pod:3647
29878 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
29879 " const char *root);\n"
29884 #: ../src/guestfs-actions.pod:3665
29885 msgid "guestfs_inspect_get_windows_systemroot"
29889 #: ../src/guestfs-actions.pod:3667
29893 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
29894 " const char *root);\n"
29899 #: ../src/guestfs-actions.pod:3683
29900 msgid "(Added in 1.5.25)"
29904 #: ../src/guestfs-actions.pod:3685
29905 msgid "guestfs_inspect_is_live"
29909 #: ../src/guestfs-actions.pod:3687
29913 " guestfs_inspect_is_live (guestfs_h *g,\n"
29914 " const char *root);\n"
29919 #: ../src/guestfs-actions.pod:3691
29921 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
29922 "disk), then this returns true if a live image was detected on the disk."
29926 #: ../src/guestfs-actions.pod:3701
29927 msgid "guestfs_inspect_is_multipart"
29931 #: ../src/guestfs-actions.pod:3703
29935 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
29936 " const char *root);\n"
29941 #: ../src/guestfs-actions.pod:3707
29943 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
29944 "disk), then this returns true if the disk is part of a set."
29948 #: ../src/guestfs-actions.pod:3717
29949 msgid "guestfs_inspect_is_netinst"
29953 #: ../src/guestfs-actions.pod:3719
29957 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
29958 " const char *root);\n"
29963 #: ../src/guestfs-actions.pod:3723
29965 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
29966 "disk), then this returns true if the disk is a network installer, ie. not a "
29967 "self-contained install CD but one which is likely to require network access "
29968 "to complete the install."
29972 #: ../src/guestfs-actions.pod:3735
29973 msgid "guestfs_inspect_list_applications"
29977 #: ../src/guestfs-actions.pod:3737
29980 " struct guestfs_application_list *\n"
29981 " guestfs_inspect_list_applications (guestfs_h *g,\n"
29982 " const char *root);\n"
29987 #: ../src/guestfs-actions.pod:3743
29989 "I<Note:> This call works differently from other parts of the inspection "
29990 "API. You have to call C<guestfs_inspect_os>, then "
29991 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
29992 "this. Listing applications is a significantly more difficult operation "
29993 "which requires access to the full filesystem. Also note that unlike the "
29994 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
29995 "the libguestfs handle, this call actually reads parts of the mounted "
29996 "filesystems during the call."
30000 #: ../src/guestfs-actions.pod:3833
30002 "This function returns a C<struct guestfs_application_list *>, or NULL if "
30003 "there was an error. I<The caller must call C<guestfs_free_application_list> "
30008 #: ../src/guestfs-actions.pod:3837
30009 msgid "(Added in 1.7.8)"
30013 #: ../src/guestfs-actions.pod:3839
30014 msgid "guestfs_inspect_os"
30018 #: ../src/guestfs-actions.pod:3841
30022 " guestfs_inspect_os (guestfs_h *g);\n"
30027 #: ../src/guestfs-actions.pod:3857
30029 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
30030 "functions in order to query further information about each operating system, "
30031 "such as the name and version."
30035 #: ../src/guestfs-actions.pod:3862
30037 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
30038 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
30039 "the contents. This should be called with no disks currently mounted. The "
30040 "function may also use Augeas, so any existing Augeas handle will be closed."
30044 #: ../src/guestfs-actions.pod:3874 ../src/guestfs-actions.pod:4205
30045 #: ../src/guestfs-actions.pod:4300
30046 msgid "See also C<guestfs_list_filesystems>."
30050 #: ../src/guestfs-actions.pod:3882
30051 msgid "guestfs_is_blockdev"
30055 #: ../src/guestfs-actions.pod:3884
30059 " guestfs_is_blockdev (guestfs_h *g,\n"
30060 " const char *path);\n"
30065 #: ../src/guestfs-actions.pod:3891 ../src/guestfs-actions.pod:3920
30066 #: ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3965
30067 #: ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4037
30068 #: ../src/guestfs-actions.pod:4052
30069 msgid "See also C<guestfs_stat>."
30073 #: ../src/guestfs-actions.pod:3895 ../src/guestfs-actions.pod:3924
30074 #: ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4041
30075 #: ../src/guestfs-actions.pod:4056
30076 msgid "(Added in 1.5.10)"
30080 #: ../src/guestfs-actions.pod:3897
30081 msgid "guestfs_is_busy"
30085 #: ../src/guestfs-actions.pod:3899
30089 " guestfs_is_busy (guestfs_h *g);\n"
30094 #: ../src/guestfs-actions.pod:3911
30095 msgid "guestfs_is_chardev"
30099 #: ../src/guestfs-actions.pod:3913
30103 " guestfs_is_chardev (guestfs_h *g,\n"
30104 " const char *path);\n"
30109 #: ../src/guestfs-actions.pod:3926
30110 msgid "guestfs_is_config"
30114 #: ../src/guestfs-actions.pod:3928
30118 " guestfs_is_config (guestfs_h *g);\n"
30123 #: ../src/guestfs-actions.pod:3940
30124 msgid "guestfs_is_dir"
30128 #: ../src/guestfs-actions.pod:3942
30132 " guestfs_is_dir (guestfs_h *g,\n"
30133 " const char *path);\n"
30138 #: ../src/guestfs-actions.pod:3956
30139 msgid "guestfs_is_fifo"
30143 #: ../src/guestfs-actions.pod:3958
30147 " guestfs_is_fifo (guestfs_h *g,\n"
30148 " const char *path);\n"
30153 #: ../src/guestfs-actions.pod:3971
30154 msgid "guestfs_is_file"
30158 #: ../src/guestfs-actions.pod:3973
30162 " guestfs_is_file (guestfs_h *g,\n"
30163 " const char *path);\n"
30168 #: ../src/guestfs-actions.pod:3987
30169 msgid "guestfs_is_launching"
30173 #: ../src/guestfs-actions.pod:3989
30177 " guestfs_is_launching (guestfs_h *g);\n"
30182 #: ../src/guestfs-actions.pod:4001
30183 msgid "guestfs_is_lv"
30187 #: ../src/guestfs-actions.pod:4003
30191 " guestfs_is_lv (guestfs_h *g,\n"
30192 " const char *device);\n"
30197 #: ../src/guestfs-actions.pod:4014
30198 msgid "guestfs_is_ready"
30202 #: ../src/guestfs-actions.pod:4016
30206 " guestfs_is_ready (guestfs_h *g);\n"
30211 #: ../src/guestfs-actions.pod:4028
30212 msgid "guestfs_is_socket"
30216 #: ../src/guestfs-actions.pod:4030
30220 " guestfs_is_socket (guestfs_h *g,\n"
30221 " const char *path);\n"
30226 #: ../src/guestfs-actions.pod:4043
30227 msgid "guestfs_is_symlink"
30231 #: ../src/guestfs-actions.pod:4045
30235 " guestfs_is_symlink (guestfs_h *g,\n"
30236 " const char *path);\n"
30241 #: ../src/guestfs-actions.pod:4058
30242 msgid "guestfs_is_zero"
30246 #: ../src/guestfs-actions.pod:4060
30250 " guestfs_is_zero (guestfs_h *g,\n"
30251 " const char *path);\n"
30256 #: ../src/guestfs-actions.pod:4069 ../src/guestfs-actions.pod:4083
30257 msgid "(Added in 1.11.8)"
30261 #: ../src/guestfs-actions.pod:4071
30262 msgid "guestfs_is_zero_device"
30266 #: ../src/guestfs-actions.pod:4073
30270 " guestfs_is_zero_device (guestfs_h *g,\n"
30271 " const char *device);\n"
30276 #: ../src/guestfs-actions.pod:4085
30277 msgid "guestfs_kill_subprocess"
30281 #: ../src/guestfs-actions.pod:4087
30285 " guestfs_kill_subprocess (guestfs_h *g);\n"
30290 #: ../src/guestfs-actions.pod:4096
30291 msgid "guestfs_launch"
30295 #: ../src/guestfs-actions.pod:4098
30299 " guestfs_launch (guestfs_h *g);\n"
30304 #: ../src/guestfs-actions.pod:4116
30305 msgid "guestfs_lchown"
30309 #: ../src/guestfs-actions.pod:4118
30313 " guestfs_lchown (guestfs_h *g,\n"
30316 " const char *path);\n"
30321 #: ../src/guestfs-actions.pod:4124
30323 "Change the file owner to C<owner> and group to C<group>. This is like "
30324 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
30325 "changed, not the target."
30329 #: ../src/guestfs-actions.pod:4136
30330 msgid "guestfs_lgetxattr"
30334 #: ../src/guestfs-actions.pod:4138
30338 " guestfs_lgetxattr (guestfs_h *g,\n"
30339 " const char *path,\n"
30340 " const char *name,\n"
30341 " size_t *size_r);\n"
30346 #: ../src/guestfs-actions.pod:4158
30347 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
30351 #: ../src/guestfs-actions.pod:4166
30352 msgid "guestfs_lgetxattrs"
30356 #: ../src/guestfs-actions.pod:4168
30359 " struct guestfs_xattr_list *\n"
30360 " guestfs_lgetxattrs (guestfs_h *g,\n"
30361 " const char *path);\n"
30366 #: ../src/guestfs-actions.pod:4172
30368 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
30369 "then it returns the extended attributes of the link itself."
30373 #: ../src/guestfs-actions.pod:4182
30374 msgid "guestfs_list_9p"
30378 #: ../src/guestfs-actions.pod:4184
30382 " guestfs_list_9p (guestfs_h *g);\n"
30387 #: ../src/guestfs-actions.pod:4196
30388 msgid "guestfs_list_devices"
30392 #: ../src/guestfs-actions.pod:4198
30396 " guestfs_list_devices (guestfs_h *g);\n"
30401 #: ../src/guestfs-actions.pod:4213
30402 msgid "guestfs_list_dm_devices"
30406 #: ../src/guestfs-actions.pod:4215
30410 " guestfs_list_dm_devices (guestfs_h *g);\n"
30415 #: ../src/guestfs-actions.pod:4220
30417 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
30418 "previous call to C<guestfs_luks_open>."
30422 #: ../src/guestfs-actions.pod:4223
30424 "Device mapper devices which correspond to logical volumes are I<not> "
30425 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
30430 #: ../src/guestfs-actions.pod:4231 ../src/guestfs-actions.pod:5830
30431 msgid "(Added in 1.11.15)"
30435 #: ../src/guestfs-actions.pod:4233
30436 msgid "guestfs_list_filesystems"
30440 #: ../src/guestfs-actions.pod:4235
30444 " guestfs_list_filesystems (guestfs_h *g);\n"
30449 #: ../src/guestfs-actions.pod:4255
30451 "This command runs other libguestfs commands, which might include "
30452 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
30453 "soon after launch and only when nothing is mounted."
30457 #: ../src/guestfs-actions.pod:4259
30459 "Not all of the filesystems returned will be mountable. In particular, swap "
30460 "partitions are returned in the list. Also this command does not check that "
30461 "each filesystem found is valid and mountable, and some filesystems might be "
30462 "mountable but require special options. Filesystems may not all belong to a "
30463 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
30467 #: ../src/guestfs-actions.pod:4273 ../src/guestfs-actions.pod:6190
30468 msgid "(Added in 1.5.15)"
30472 #: ../src/guestfs-actions.pod:4275
30473 msgid "guestfs_list_md_devices"
30477 #: ../src/guestfs-actions.pod:4277
30481 " guestfs_list_md_devices (guestfs_h *g);\n"
30486 #: ../src/guestfs-actions.pod:4286 ../src/guestfs-actions.pod:7851
30487 msgid "(Added in 1.15.4)"
30491 #: ../src/guestfs-actions.pod:4288
30492 msgid "guestfs_list_partitions"
30496 #: ../src/guestfs-actions.pod:4290
30500 " guestfs_list_partitions (guestfs_h *g);\n"
30505 #: ../src/guestfs-actions.pod:4297
30507 "This does not return logical volumes. For that you will need to call "
30512 #: ../src/guestfs-actions.pod:4308
30517 #: ../src/guestfs-actions.pod:4310
30521 " guestfs_ll (guestfs_h *g,\n"
30522 " const char *directory);\n"
30527 #: ../src/guestfs-actions.pod:4325
30532 #: ../src/guestfs-actions.pod:4327
30536 " guestfs_ln (guestfs_h *g,\n"
30537 " const char *target,\n"
30538 " const char *linkname);\n"
30543 #: ../src/guestfs-actions.pod:4338
30544 msgid "guestfs_ln_f"
30548 #: ../src/guestfs-actions.pod:4340
30552 " guestfs_ln_f (guestfs_h *g,\n"
30553 " const char *target,\n"
30554 " const char *linkname);\n"
30559 #: ../src/guestfs-actions.pod:4352
30560 msgid "guestfs_ln_s"
30564 #: ../src/guestfs-actions.pod:4354
30568 " guestfs_ln_s (guestfs_h *g,\n"
30569 " const char *target,\n"
30570 " const char *linkname);\n"
30575 #: ../src/guestfs-actions.pod:4365
30576 msgid "guestfs_ln_sf"
30580 #: ../src/guestfs-actions.pod:4367
30584 " guestfs_ln_sf (guestfs_h *g,\n"
30585 " const char *target,\n"
30586 " const char *linkname);\n"
30591 #: ../src/guestfs-actions.pod:4379
30592 msgid "guestfs_lremovexattr"
30596 #: ../src/guestfs-actions.pod:4381
30600 " guestfs_lremovexattr (guestfs_h *g,\n"
30601 " const char *xattr,\n"
30602 " const char *path);\n"
30607 #: ../src/guestfs-actions.pod:4386
30609 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
30610 "link, then it removes an extended attribute of the link itself."
30614 #: ../src/guestfs-actions.pod:4394
30619 #: ../src/guestfs-actions.pod:4396
30623 " guestfs_ls (guestfs_h *g,\n"
30624 " const char *directory);\n"
30629 #: ../src/guestfs-actions.pod:4404
30631 "This command is mostly useful for interactive sessions. Programs should "
30632 "probably use C<guestfs_readdir> instead."
30636 #: ../src/guestfs-actions.pod:4413
30637 msgid "guestfs_lsetxattr"
30641 #: ../src/guestfs-actions.pod:4415
30645 " guestfs_lsetxattr (guestfs_h *g,\n"
30646 " const char *xattr,\n"
30647 " const char *val,\n"
30649 " const char *path);\n"
30654 #: ../src/guestfs-actions.pod:4422
30656 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
30657 "then it sets an extended attribute of the link itself."
30661 #: ../src/guestfs-actions.pod:4430
30662 msgid "guestfs_lstat"
30666 #: ../src/guestfs-actions.pod:4432
30669 " struct guestfs_stat *\n"
30670 " guestfs_lstat (guestfs_h *g,\n"
30671 " const char *path);\n"
30676 #: ../src/guestfs-actions.pod:4438
30678 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
30679 "link, then the link is stat-ed, not the file it refers to."
30683 #: ../src/guestfs-actions.pod:4444 ../src/guestfs-actions.pod:7370
30685 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
30686 "error. I<The caller must call C<guestfs_free_stat> after use>."
30690 #: ../src/guestfs-actions.pod:4448 ../src/guestfs-actions.pod:7374
30691 #: ../src/guestfs-actions.pod:7392 ../src/guestfs-actions.pod:7895
30692 msgid "(Added in 0.9.2)"
30696 #: ../src/guestfs-actions.pod:4450
30697 msgid "guestfs_lstatlist"
30701 #: ../src/guestfs-actions.pod:4452
30704 " struct guestfs_stat_list *\n"
30705 " guestfs_lstatlist (guestfs_h *g,\n"
30706 " const char *path,\n"
30707 " char *const *names);\n"
30712 #: ../src/guestfs-actions.pod:4457
30714 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
30715 "files, where all files are in the directory C<path>. C<names> is the list "
30716 "of files from this directory."
30720 #: ../src/guestfs-actions.pod:4466
30722 "This call is intended for programs that want to efficiently list a directory "
30723 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
30724 "for a similarly efficient call for getting extended attributes. Very long "
30725 "directory listings might cause the protocol message size to be exceeded, "
30726 "causing this call to fail. The caller must split up such requests into "
30727 "smaller groups of names."
30731 #: ../src/guestfs-actions.pod:4474
30733 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
30734 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
30738 #: ../src/guestfs-actions.pod:4480
30739 msgid "guestfs_luks_add_key"
30743 #: ../src/guestfs-actions.pod:4482
30747 " guestfs_luks_add_key (guestfs_h *g,\n"
30748 " const char *device,\n"
30749 " const char *key,\n"
30750 " const char *newkey,\n"
30756 #: ../src/guestfs-actions.pod:4494
30758 "Note that if C<keyslot> already contains a key, then this command will "
30759 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
30763 #: ../src/guestfs-actions.pod:4500 ../src/guestfs-actions.pod:4537
30764 #: ../src/guestfs-actions.pod:4557 ../src/guestfs-actions.pod:4577
30765 #: ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4631
30767 "This function takes a key or passphrase parameter which could contain "
30768 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
30773 #: ../src/guestfs-actions.pod:4504 ../src/guestfs-actions.pod:4541
30774 #: ../src/guestfs-actions.pod:4561 ../src/guestfs-actions.pod:4581
30775 msgid "(Added in 1.5.2)"
30779 #: ../src/guestfs-actions.pod:4506
30780 msgid "guestfs_luks_close"
30784 #: ../src/guestfs-actions.pod:4508
30788 " guestfs_luks_close (guestfs_h *g,\n"
30789 " const char *device);\n"
30794 #: ../src/guestfs-actions.pod:4512
30796 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
30797 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
30798 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
30799 "underlying block device."
30803 #: ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4616
30804 #: ../src/guestfs-actions.pod:4635 ../src/guestfs-actions.pod:4685
30805 #: ../src/guestfs-actions.pod:4730
30806 msgid "(Added in 1.5.1)"
30810 #: ../src/guestfs-actions.pod:4522
30811 msgid "guestfs_luks_format"
30815 #: ../src/guestfs-actions.pod:4524
30819 " guestfs_luks_format (guestfs_h *g,\n"
30820 " const char *device,\n"
30821 " const char *key,\n"
30827 #: ../src/guestfs-actions.pod:4543
30828 msgid "guestfs_luks_format_cipher"
30832 #: ../src/guestfs-actions.pod:4545
30836 " guestfs_luks_format_cipher (guestfs_h *g,\n"
30837 " const char *device,\n"
30838 " const char *key,\n"
30840 " const char *cipher);\n"
30845 #: ../src/guestfs-actions.pod:4552
30847 "This command is the same as C<guestfs_luks_format> but it also allows you to "
30848 "set the C<cipher> used."
30852 #: ../src/guestfs-actions.pod:4563
30853 msgid "guestfs_luks_kill_slot"
30857 #: ../src/guestfs-actions.pod:4565
30861 " guestfs_luks_kill_slot (guestfs_h *g,\n"
30862 " const char *device,\n"
30863 " const char *key,\n"
30869 #: ../src/guestfs-actions.pod:4583
30870 msgid "guestfs_luks_open"
30874 #: ../src/guestfs-actions.pod:4585
30878 " guestfs_luks_open (guestfs_h *g,\n"
30879 " const char *device,\n"
30880 " const char *key,\n"
30881 " const char *mapname);\n"
30886 #: ../src/guestfs-actions.pod:4603
30888 "If this block device contains LVM volume groups, then calling "
30889 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
30894 #: ../src/guestfs-actions.pod:4607
30895 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
30899 #: ../src/guestfs-actions.pod:4618
30900 msgid "guestfs_luks_open_ro"
30904 #: ../src/guestfs-actions.pod:4620
30908 " guestfs_luks_open_ro (guestfs_h *g,\n"
30909 " const char *device,\n"
30910 " const char *key,\n"
30911 " const char *mapname);\n"
30916 #: ../src/guestfs-actions.pod:4626
30918 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
30923 #: ../src/guestfs-actions.pod:4637
30924 msgid "guestfs_lvcreate"
30928 #: ../src/guestfs-actions.pod:4639
30932 " guestfs_lvcreate (guestfs_h *g,\n"
30933 " const char *logvol,\n"
30934 " const char *volgroup,\n"
30940 #: ../src/guestfs-actions.pod:4652
30941 msgid "guestfs_lvm_canonical_lv_name"
30945 #: ../src/guestfs-actions.pod:4654
30949 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
30950 " const char *lvname);\n"
30955 #: ../src/guestfs-actions.pod:4665
30956 msgid "See also C<guestfs_is_lv>."
30960 #: ../src/guestfs-actions.pod:4670
30961 msgid "(Added in 1.5.24)"
30965 #: ../src/guestfs-actions.pod:4672
30966 msgid "guestfs_lvm_clear_filter"
30970 #: ../src/guestfs-actions.pod:4674
30974 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
30979 #: ../src/guestfs-actions.pod:4677
30981 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
30982 "see every block device."
30986 #: ../src/guestfs-actions.pod:4687
30987 msgid "guestfs_lvm_remove_all"
30991 #: ../src/guestfs-actions.pod:4689
30995 " guestfs_lvm_remove_all (guestfs_h *g);\n"
31000 #: ../src/guestfs-actions.pod:4699
31001 msgid "guestfs_lvm_set_filter"
31005 #: ../src/guestfs-actions.pod:4701
31009 " guestfs_lvm_set_filter (guestfs_h *g,\n"
31010 " char *const *devices);\n"
31015 #: ../src/guestfs-actions.pod:4732
31016 msgid "guestfs_lvremove"
31020 #: ../src/guestfs-actions.pod:4734
31024 " guestfs_lvremove (guestfs_h *g,\n"
31025 " const char *device);\n"
31030 #: ../src/guestfs-actions.pod:4746 ../src/guestfs-actions.pod:6305
31031 #: ../src/guestfs-actions.pod:8265
31032 msgid "(Added in 1.0.13)"
31036 #: ../src/guestfs-actions.pod:4748
31037 msgid "guestfs_lvrename"
31041 #: ../src/guestfs-actions.pod:4750
31045 " guestfs_lvrename (guestfs_h *g,\n"
31046 " const char *logvol,\n"
31047 " const char *newlogvol);\n"
31052 #: ../src/guestfs-actions.pod:4759 ../src/guestfs-actions.pod:8278
31053 msgid "(Added in 1.0.83)"
31057 #: ../src/guestfs-actions.pod:4761
31058 msgid "guestfs_lvresize"
31062 #: ../src/guestfs-actions.pod:4763
31066 " guestfs_lvresize (guestfs_h *g,\n"
31067 " const char *device,\n"
31073 #: ../src/guestfs-actions.pod:4776
31074 msgid "guestfs_lvresize_free"
31078 #: ../src/guestfs-actions.pod:4778
31082 " guestfs_lvresize_free (guestfs_h *g,\n"
31083 " const char *lv,\n"
31089 #: ../src/guestfs-actions.pod:4791
31090 msgid "(Added in 1.3.3)"
31094 #: ../src/guestfs-actions.pod:4793
31095 msgid "guestfs_lvs"
31099 #: ../src/guestfs-actions.pod:4795
31103 " guestfs_lvs (guestfs_h *g);\n"
31108 #: ../src/guestfs-actions.pod:4804
31109 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
31113 #: ../src/guestfs-actions.pod:4812
31114 msgid "guestfs_lvs_full"
31118 #: ../src/guestfs-actions.pod:4814
31121 " struct guestfs_lvm_lv_list *\n"
31122 " guestfs_lvs_full (guestfs_h *g);\n"
31127 #: ../src/guestfs-actions.pod:4820
31129 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
31130 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
31134 #: ../src/guestfs-actions.pod:4826
31135 msgid "guestfs_lvuuid"
31139 #: ../src/guestfs-actions.pod:4828
31143 " guestfs_lvuuid (guestfs_h *g,\n"
31144 " const char *device);\n"
31149 #: ../src/guestfs-actions.pod:4839
31150 msgid "guestfs_lxattrlist"
31154 #: ../src/guestfs-actions.pod:4841
31157 " struct guestfs_xattr_list *\n"
31158 " guestfs_lxattrlist (guestfs_h *g,\n"
31159 " const char *path,\n"
31160 " char *const *names);\n"
31165 #: ../src/guestfs-actions.pod:4860
31167 "This call is intended for programs that want to efficiently list a directory "
31168 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
31169 "a similarly efficient call for getting standard stats. Very long directory "
31170 "listings might cause the protocol message size to be exceeded, causing this "
31171 "call to fail. The caller must split up such requests into smaller groups of "
31176 #: ../src/guestfs-actions.pod:4874
31177 msgid "guestfs_md_create"
31181 #: ../src/guestfs-actions.pod:4876
31185 " guestfs_md_create (guestfs_h *g,\n"
31186 " const char *name,\n"
31187 " char *const *devices,\n"
31193 #: ../src/guestfs-actions.pod:4887
31196 " GUESTFS_MD_CREATE_MISSINGBITMAP, int64_t missingbitmap,\n"
31197 " GUESTFS_MD_CREATE_NRDEVICES, int nrdevices,\n"
31198 " GUESTFS_MD_CREATE_SPARE, int spare,\n"
31199 " GUESTFS_MD_CREATE_CHUNK, int64_t chunk,\n"
31200 " GUESTFS_MD_CREATE_LEVEL, const char *level,\n"
31205 #: ../src/guestfs-actions.pod:4949
31206 msgid "guestfs_md_create_va"
31210 #: ../src/guestfs-actions.pod:4951
31214 " guestfs_md_create_va (guestfs_h *g,\n"
31215 " const char *name,\n"
31216 " char *const *devices,\n"
31217 " va_list args);\n"
31222 #: ../src/guestfs-actions.pod:4957
31223 msgid "This is the \"va_list variant\" of L</guestfs_md_create>."
31227 #: ../src/guestfs-actions.pod:4961
31228 msgid "guestfs_md_create_argv"
31232 #: ../src/guestfs-actions.pod:4963
31236 " guestfs_md_create_argv (guestfs_h *g,\n"
31237 " const char *name,\n"
31238 " char *const *devices,\n"
31239 " const struct guestfs_md_create_argv *optargs);\n"
31244 #: ../src/guestfs-actions.pod:4969
31245 msgid "This is the \"argv variant\" of L</guestfs_md_create>."
31249 #: ../src/guestfs-actions.pod:4973
31250 msgid "guestfs_md_detail"
31254 #: ../src/guestfs-actions.pod:4975
31258 " guestfs_md_detail (guestfs_h *g,\n"
31259 " const char *md);\n"
31264 #: ../src/guestfs-actions.pod:5012
31265 msgid "guestfs_md_stop"
31269 #: ../src/guestfs-actions.pod:5014
31273 " guestfs_md_stop (guestfs_h *g,\n"
31274 " const char *md);\n"
31279 #: ../src/guestfs-actions.pod:5023
31280 msgid "guestfs_mkdir"
31284 #: ../src/guestfs-actions.pod:5025
31288 " guestfs_mkdir (guestfs_h *g,\n"
31289 " const char *path);\n"
31294 #: ../src/guestfs-actions.pod:5035
31295 msgid "guestfs_mkdir_mode"
31299 #: ../src/guestfs-actions.pod:5037
31303 " guestfs_mkdir_mode (guestfs_h *g,\n"
31304 " const char *path,\n"
31310 #: ../src/guestfs-actions.pod:5049
31311 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
31315 #: ../src/guestfs-actions.pod:5055
31316 msgid "guestfs_mkdir_p"
31320 #: ../src/guestfs-actions.pod:5057
31324 " guestfs_mkdir_p (guestfs_h *g,\n"
31325 " const char *path);\n"
31330 #: ../src/guestfs-actions.pod:5068
31331 msgid "guestfs_mkdtemp"
31335 #: ../src/guestfs-actions.pod:5070
31339 " guestfs_mkdtemp (guestfs_h *g,\n"
31340 " const char *template);\n"
31345 #: ../src/guestfs-actions.pod:5098
31346 msgid "guestfs_mke2fs_J"
31350 #: ../src/guestfs-actions.pod:5100
31354 " guestfs_mke2fs_J (guestfs_h *g,\n"
31355 " const char *fstype,\n"
31356 " int blocksize,\n"
31357 " const char *device,\n"
31358 " const char *journal);\n"
31363 #: ../src/guestfs-actions.pod:5113
31364 msgid "See also C<guestfs_mke2journal>."
31368 #: ../src/guestfs-actions.pod:5117 ../src/guestfs-actions.pod:5135
31369 #: ../src/guestfs-actions.pod:5153 ../src/guestfs-actions.pod:5169
31370 #: ../src/guestfs-actions.pod:5183 ../src/guestfs-actions.pod:5197
31371 #: ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5533
31372 msgid "(Added in 1.0.68)"
31376 #: ../src/guestfs-actions.pod:5119
31377 msgid "guestfs_mke2fs_JL"
31381 #: ../src/guestfs-actions.pod:5121
31385 " guestfs_mke2fs_JL (guestfs_h *g,\n"
31386 " const char *fstype,\n"
31387 " int blocksize,\n"
31388 " const char *device,\n"
31389 " const char *label);\n"
31394 #: ../src/guestfs-actions.pod:5131
31395 msgid "See also C<guestfs_mke2journal_L>."
31399 #: ../src/guestfs-actions.pod:5137
31400 msgid "guestfs_mke2fs_JU"
31404 #: ../src/guestfs-actions.pod:5139
31408 " guestfs_mke2fs_JU (guestfs_h *g,\n"
31409 " const char *fstype,\n"
31410 " int blocksize,\n"
31411 " const char *device,\n"
31412 " const char *uuid);\n"
31417 #: ../src/guestfs-actions.pod:5149
31418 msgid "See also C<guestfs_mke2journal_U>."
31422 #: ../src/guestfs-actions.pod:5155
31423 msgid "guestfs_mke2journal"
31427 #: ../src/guestfs-actions.pod:5157
31431 " guestfs_mke2journal (guestfs_h *g,\n"
31432 " int blocksize,\n"
31433 " const char *device);\n"
31438 #: ../src/guestfs-actions.pod:5171
31439 msgid "guestfs_mke2journal_L"
31443 #: ../src/guestfs-actions.pod:5173
31447 " guestfs_mke2journal_L (guestfs_h *g,\n"
31448 " int blocksize,\n"
31449 " const char *label,\n"
31450 " const char *device);\n"
31455 #: ../src/guestfs-actions.pod:5185
31456 msgid "guestfs_mke2journal_U"
31460 #: ../src/guestfs-actions.pod:5187
31464 " guestfs_mke2journal_U (guestfs_h *g,\n"
31465 " int blocksize,\n"
31466 " const char *uuid,\n"
31467 " const char *device);\n"
31472 #: ../src/guestfs-actions.pod:5199
31473 msgid "guestfs_mkfifo"
31477 #: ../src/guestfs-actions.pod:5201
31481 " guestfs_mkfifo (guestfs_h *g,\n"
31483 " const char *path);\n"
31488 #: ../src/guestfs-actions.pod:5206
31490 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
31491 "is just a convenient wrapper around C<guestfs_mknod>."
31495 #: ../src/guestfs-actions.pod:5216
31496 msgid "guestfs_mkfs"
31500 #: ../src/guestfs-actions.pod:5218
31504 " guestfs_mkfs (guestfs_h *g,\n"
31505 " const char *fstype,\n"
31506 " const char *device);\n"
31511 #: ../src/guestfs-actions.pod:5231
31512 msgid "guestfs_mkfs_b"
31516 #: ../src/guestfs-actions.pod:5233
31520 " guestfs_mkfs_b (guestfs_h *g,\n"
31521 " const char *fstype,\n"
31522 " int blocksize,\n"
31523 " const char *device);\n"
31528 #: ../src/guestfs-actions.pod:5239
31530 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
31535 #: ../src/guestfs-actions.pod:5246
31537 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
31538 "block size of the resulting filesystem. Supported block sizes depend on the "
31539 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
31543 #: ../src/guestfs-actions.pod:5258
31544 msgid "guestfs_mkfs_opts"
31548 #: ../src/guestfs-actions.pod:5260
31552 " guestfs_mkfs_opts (guestfs_h *g,\n"
31553 " const char *fstype,\n"
31554 " const char *device,\n"
31560 #: ../src/guestfs-actions.pod:5271
31563 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
31564 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
31565 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
31566 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
31571 #: ../src/guestfs-actions.pod:5319
31572 msgid "(Added in 1.7.19)"
31576 #: ../src/guestfs-actions.pod:5321
31577 msgid "guestfs_mkfs_opts_va"
31581 #: ../src/guestfs-actions.pod:5323
31585 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
31586 " const char *fstype,\n"
31587 " const char *device,\n"
31588 " va_list args);\n"
31593 #: ../src/guestfs-actions.pod:5329
31594 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
31598 #: ../src/guestfs-actions.pod:5333
31599 msgid "guestfs_mkfs_opts_argv"
31603 #: ../src/guestfs-actions.pod:5335
31607 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
31608 " const char *fstype,\n"
31609 " const char *device,\n"
31610 " const struct guestfs_mkfs_opts_argv *optargs);\n"
31615 #: ../src/guestfs-actions.pod:5341
31616 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
31620 #: ../src/guestfs-actions.pod:5345
31621 msgid "guestfs_mkmountpoint"
31625 #: ../src/guestfs-actions.pod:5347
31629 " guestfs_mkmountpoint (guestfs_h *g,\n"
31630 " const char *exemptpath);\n"
31635 #: ../src/guestfs-actions.pod:5351
31637 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
31638 "that can be used to create extra mountpoints before mounting the first "
31643 #: ../src/guestfs-actions.pod:5375
31645 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
31646 "may get unexpected errors if you try to mix these calls. It is safest to "
31647 "manually unmount filesystems and remove mountpoints after use."
31651 #: ../src/guestfs-actions.pod:5379
31653 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
31654 "first, so for this to work for manual mountpoints, you must ensure that the "
31655 "innermost mountpoints have the longest pathnames, as in the example code "
31660 #: ../src/guestfs-actions.pod:5386
31662 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
31663 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
31664 "can also trigger these issues."
31668 #: ../src/guestfs-actions.pod:5392 ../src/guestfs-actions.pod:5698
31669 #: ../src/guestfs-actions.pod:6725
31670 msgid "(Added in 1.0.62)"
31674 #: ../src/guestfs-actions.pod:5394
31675 msgid "guestfs_mknod"
31679 #: ../src/guestfs-actions.pod:5396
31683 " guestfs_mknod (guestfs_h *g,\n"
31687 " const char *path);\n"
31692 #: ../src/guestfs-actions.pod:5411
31694 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
31695 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
31696 "regular file). These constants are available in the standard Linux header "
31697 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
31698 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
31699 "the appropriate constant for you."
31703 #: ../src/guestfs-actions.pod:5425
31704 msgid "guestfs_mknod_b"
31708 #: ../src/guestfs-actions.pod:5427
31712 " guestfs_mknod_b (guestfs_h *g,\n"
31716 " const char *path);\n"
31721 #: ../src/guestfs-actions.pod:5434
31723 "This call creates a block device node called C<path> with mode C<mode> and "
31724 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
31725 "wrapper around C<guestfs_mknod>."
31729 #: ../src/guestfs-actions.pod:5444
31730 msgid "guestfs_mknod_c"
31734 #: ../src/guestfs-actions.pod:5446
31738 " guestfs_mknod_c (guestfs_h *g,\n"
31742 " const char *path);\n"
31747 #: ../src/guestfs-actions.pod:5453
31749 "This call creates a char device node called C<path> with mode C<mode> and "
31750 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
31751 "wrapper around C<guestfs_mknod>."
31755 #: ../src/guestfs-actions.pod:5463
31756 msgid "guestfs_mkswap"
31760 #: ../src/guestfs-actions.pod:5465
31764 " guestfs_mkswap (guestfs_h *g,\n"
31765 " const char *device);\n"
31770 #: ../src/guestfs-actions.pod:5475
31771 msgid "guestfs_mkswap_L"
31775 #: ../src/guestfs-actions.pod:5477
31779 " guestfs_mkswap_L (guestfs_h *g,\n"
31780 " const char *label,\n"
31781 " const char *device);\n"
31786 #: ../src/guestfs-actions.pod:5492
31787 msgid "guestfs_mkswap_U"
31791 #: ../src/guestfs-actions.pod:5494
31795 " guestfs_mkswap_U (guestfs_h *g,\n"
31796 " const char *uuid,\n"
31797 " const char *device);\n"
31802 #: ../src/guestfs-actions.pod:5505
31803 msgid "guestfs_mkswap_file"
31807 #: ../src/guestfs-actions.pod:5507
31811 " guestfs_mkswap_file (guestfs_h *g,\n"
31812 " const char *path);\n"
31817 #: ../src/guestfs-actions.pod:5513
31819 "This command just writes a swap file signature to an existing file. To "
31820 "create the file itself, use something like C<guestfs_fallocate>."
31824 #: ../src/guestfs-actions.pod:5520
31825 msgid "guestfs_modprobe"
31829 #: ../src/guestfs-actions.pod:5522
31833 " guestfs_modprobe (guestfs_h *g,\n"
31834 " const char *modulename);\n"
31839 #: ../src/guestfs-actions.pod:5535
31840 msgid "guestfs_mount"
31844 #: ../src/guestfs-actions.pod:5537
31848 " guestfs_mount (guestfs_h *g,\n"
31849 " const char *device,\n"
31850 " const char *mountpoint);\n"
31855 #: ../src/guestfs-actions.pod:5556
31857 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
31858 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
31859 "problems for users. If your program might need to work with older versions "
31860 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
31861 "for the first parameter if you don't want any options)."
31865 #: ../src/guestfs-actions.pod:5567
31866 msgid "guestfs_mount_9p"
31870 #: ../src/guestfs-actions.pod:5569
31874 " guestfs_mount_9p (guestfs_h *g,\n"
31875 " const char *mounttag,\n"
31876 " const char *mountpoint,\n"
31882 #: ../src/guestfs-actions.pod:5580
31885 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
31890 #: ../src/guestfs-actions.pod:5593
31891 msgid "guestfs_mount_9p_va"
31895 #: ../src/guestfs-actions.pod:5595
31899 " guestfs_mount_9p_va (guestfs_h *g,\n"
31900 " const char *mounttag,\n"
31901 " const char *mountpoint,\n"
31902 " va_list args);\n"
31907 #: ../src/guestfs-actions.pod:5601
31908 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
31912 #: ../src/guestfs-actions.pod:5605
31913 msgid "guestfs_mount_9p_argv"
31917 #: ../src/guestfs-actions.pod:5607
31921 " guestfs_mount_9p_argv (guestfs_h *g,\n"
31922 " const char *mounttag,\n"
31923 " const char *mountpoint,\n"
31924 " const struct guestfs_mount_9p_argv *optargs);\n"
31929 #: ../src/guestfs-actions.pod:5613
31930 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
31934 #: ../src/guestfs-actions.pod:5617
31935 msgid "guestfs_mount_loop"
31939 #: ../src/guestfs-actions.pod:5619
31943 " guestfs_mount_loop (guestfs_h *g,\n"
31944 " const char *file,\n"
31945 " const char *mountpoint);\n"
31950 #: ../src/guestfs-actions.pod:5632
31951 msgid "guestfs_mount_options"
31955 #: ../src/guestfs-actions.pod:5634
31959 " guestfs_mount_options (guestfs_h *g,\n"
31960 " const char *options,\n"
31961 " const char *device,\n"
31962 " const char *mountpoint);\n"
31967 #: ../src/guestfs-actions.pod:5640
31969 "This is the same as the C<guestfs_mount> command, but it allows you to set "
31970 "the mount options as for the L<mount(8)> I<-o> flag."
31974 #: ../src/guestfs-actions.pod:5650 ../src/guestfs-actions.pod:5664
31975 #: ../src/guestfs-actions.pod:5681
31976 msgid "(Added in 1.0.10)"
31980 #: ../src/guestfs-actions.pod:5652
31981 msgid "guestfs_mount_ro"
31985 #: ../src/guestfs-actions.pod:5654
31989 " guestfs_mount_ro (guestfs_h *g,\n"
31990 " const char *device,\n"
31991 " const char *mountpoint);\n"
31996 #: ../src/guestfs-actions.pod:5659
31998 "This is the same as the C<guestfs_mount> command, but it mounts the "
31999 "filesystem with the read-only (I<-o ro>) flag."
32003 #: ../src/guestfs-actions.pod:5666
32004 msgid "guestfs_mount_vfs"
32008 #: ../src/guestfs-actions.pod:5668
32012 " guestfs_mount_vfs (guestfs_h *g,\n"
32013 " const char *options,\n"
32014 " const char *vfstype,\n"
32015 " const char *device,\n"
32016 " const char *mountpoint);\n"
32021 #: ../src/guestfs-actions.pod:5675
32023 "This is the same as the C<guestfs_mount> command, but it allows you to set "
32024 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
32029 #: ../src/guestfs-actions.pod:5683
32030 msgid "guestfs_mountpoints"
32034 #: ../src/guestfs-actions.pod:5685
32038 " guestfs_mountpoints (guestfs_h *g);\n"
32043 #: ../src/guestfs-actions.pod:5688
32045 "This call is similar to C<guestfs_mounts>. That call returns a list of "
32046 "devices. This one returns a hash table (map) of device name to directory "
32047 "where the device is mounted."
32051 #: ../src/guestfs-actions.pod:5700
32052 msgid "guestfs_mounts"
32056 #: ../src/guestfs-actions.pod:5702
32060 " guestfs_mounts (guestfs_h *g);\n"
32065 #: ../src/guestfs-actions.pod:5710
32066 msgid "See also: C<guestfs_mountpoints>"
32070 #: ../src/guestfs-actions.pod:5718
32075 #: ../src/guestfs-actions.pod:5720
32079 " guestfs_mv (guestfs_h *g,\n"
32080 " const char *src,\n"
32081 " const char *dest);\n"
32086 #: ../src/guestfs-actions.pod:5732
32087 msgid "guestfs_ntfs_3g_probe"
32091 #: ../src/guestfs-actions.pod:5734
32095 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
32097 " const char *device);\n"
32102 #: ../src/guestfs-actions.pod:5753
32103 msgid "(Added in 1.0.43)"
32107 #: ../src/guestfs-actions.pod:5755
32108 msgid "guestfs_ntfsresize"
32112 #: ../src/guestfs-actions.pod:5757
32116 " guestfs_ntfsresize (guestfs_h *g,\n"
32117 " const char *device);\n"
32122 #: ../src/guestfs-actions.pod:5761 ../src/guestfs-actions.pod:5861
32124 "I<This function is deprecated.> In new code, use the L</"
32125 "guestfs_ntfsresize_opts> call instead."
32129 #: ../src/guestfs-actions.pod:5785
32130 msgid "guestfs_ntfsresize_opts"
32134 #: ../src/guestfs-actions.pod:5787
32138 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
32139 " const char *device,\n"
32145 #: ../src/guestfs-actions.pod:5797
32148 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
32149 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
32154 #: ../src/guestfs-actions.pod:5817
32156 "After the resize operation, the filesystem is always marked as requiring a "
32157 "consistency check (for safety). You have to boot into Windows to perform "
32158 "this check and clear this condition. If you I<don't> set the C<force> "
32159 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
32160 "times on a single filesystem without booting into Windows between each "
32165 #: ../src/guestfs-actions.pod:5832
32166 msgid "guestfs_ntfsresize_opts_va"
32170 #: ../src/guestfs-actions.pod:5834
32174 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
32175 " const char *device,\n"
32176 " va_list args);\n"
32181 #: ../src/guestfs-actions.pod:5839
32182 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
32186 #: ../src/guestfs-actions.pod:5843
32187 msgid "guestfs_ntfsresize_opts_argv"
32191 #: ../src/guestfs-actions.pod:5845
32195 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
32196 " const char *device,\n"
32197 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
32202 #: ../src/guestfs-actions.pod:5850
32203 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
32207 #: ../src/guestfs-actions.pod:5854
32208 msgid "guestfs_ntfsresize_size"
32212 #: ../src/guestfs-actions.pod:5856
32216 " guestfs_ntfsresize_size (guestfs_h *g,\n"
32217 " const char *device,\n"
32218 " int64_t size);\n"
32223 #: ../src/guestfs-actions.pod:5868
32225 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
32226 "to specify the new size (in bytes) explicitly."
32230 #: ../src/guestfs-actions.pod:5873 ../src/guestfs-actions.pod:6332
32231 #: ../src/guestfs-actions.pod:6405 ../src/guestfs-actions.pod:6673
32232 #: ../src/guestfs-actions.pod:8422
32233 msgid "(Added in 1.3.14)"
32237 #: ../src/guestfs-actions.pod:5875
32238 msgid "guestfs_part_add"
32242 #: ../src/guestfs-actions.pod:5877
32246 " guestfs_part_add (guestfs_h *g,\n"
32247 " const char *device,\n"
32248 " const char *prlogex,\n"
32249 " int64_t startsect,\n"
32250 " int64_t endsect);\n"
32255 #: ../src/guestfs-actions.pod:5884
32257 "This command adds a partition to C<device>. If there is no partition table "
32258 "on the device, call C<guestfs_part_init> first."
32262 #: ../src/guestfs-actions.pod:5896
32264 "Creating a partition which covers the whole disk is not so easy. Use "
32265 "C<guestfs_part_disk> to do that."
32269 #: ../src/guestfs-actions.pod:5901 ../src/guestfs-actions.pod:5936
32270 #: ../src/guestfs-actions.pod:5989 ../src/guestfs-actions.pod:6073
32271 #: ../src/guestfs-actions.pod:6111 ../src/guestfs-actions.pod:6130
32272 #: ../src/guestfs-actions.pod:6170
32273 msgid "(Added in 1.0.78)"
32277 #: ../src/guestfs-actions.pod:5903
32278 msgid "guestfs_part_del"
32282 #: ../src/guestfs-actions.pod:5905
32286 " guestfs_part_del (guestfs_h *g,\n"
32287 " const char *device,\n"
32293 #: ../src/guestfs-actions.pod:5920
32294 msgid "guestfs_part_disk"
32298 #: ../src/guestfs-actions.pod:5922
32302 " guestfs_part_disk (guestfs_h *g,\n"
32303 " const char *device,\n"
32304 " const char *parttype);\n"
32309 #: ../src/guestfs-actions.pod:5927
32311 "This command is simply a combination of C<guestfs_part_init> followed by "
32312 "C<guestfs_part_add> to create a single primary partition covering the whole "
32317 #: ../src/guestfs-actions.pod:5931
32319 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
32320 "possible values are described in C<guestfs_part_init>."
32324 #: ../src/guestfs-actions.pod:5938
32325 msgid "guestfs_part_get_bootable"
32329 #: ../src/guestfs-actions.pod:5940
32333 " guestfs_part_get_bootable (guestfs_h *g,\n"
32334 " const char *device,\n"
32340 #: ../src/guestfs-actions.pod:5948
32341 msgid "See also C<guestfs_part_set_bootable>."
32345 #: ../src/guestfs-actions.pod:5954
32346 msgid "guestfs_part_get_mbr_id"
32350 #: ../src/guestfs-actions.pod:5956
32354 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
32355 " const char *device,\n"
32361 #: ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:6146
32363 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
32364 "undefined results for other partition table types (see "
32365 "C<guestfs_part_get_parttype>)."
32369 #: ../src/guestfs-actions.pod:5972
32370 msgid "guestfs_part_get_parttype"
32374 #: ../src/guestfs-actions.pod:5974
32378 " guestfs_part_get_parttype (guestfs_h *g,\n"
32379 " const char *device);\n"
32384 #: ../src/guestfs-actions.pod:5981
32386 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
32387 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
32388 "possible, although unusual. See C<guestfs_part_init> for a full list."
32392 #: ../src/guestfs-actions.pod:5991
32393 msgid "guestfs_part_init"
32397 #: ../src/guestfs-actions.pod:5993
32401 " guestfs_part_init (guestfs_h *g,\n"
32402 " const char *device,\n"
32403 " const char *parttype);\n"
32408 #: ../src/guestfs-actions.pod:6002
32410 "Initially there are no partitions. Following this, you should call "
32411 "C<guestfs_part_add> for each partition required."
32415 #: ../src/guestfs-actions.pod:6075
32416 msgid "guestfs_part_list"
32420 #: ../src/guestfs-actions.pod:6077
32423 " struct guestfs_partition_list *\n"
32424 " guestfs_part_list (guestfs_h *g,\n"
32425 " const char *device);\n"
32430 #: ../src/guestfs-actions.pod:6094
32432 "Start of the partition I<in bytes>. To get sectors you have to divide by "
32433 "the device's sector size, see C<guestfs_blockdev_getss>."
32437 #: ../src/guestfs-actions.pod:6107
32439 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
32440 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
32445 #: ../src/guestfs-actions.pod:6113
32446 msgid "guestfs_part_set_bootable"
32450 #: ../src/guestfs-actions.pod:6115
32454 " guestfs_part_set_bootable (guestfs_h *g,\n"
32455 " const char *device,\n"
32457 " int bootable);\n"
32462 #: ../src/guestfs-actions.pod:6132
32463 msgid "guestfs_part_set_mbr_id"
32467 #: ../src/guestfs-actions.pod:6134
32471 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
32472 " const char *device,\n"
32479 #: ../src/guestfs-actions.pod:6154
32480 msgid "guestfs_part_set_name"
32484 #: ../src/guestfs-actions.pod:6156
32488 " guestfs_part_set_name (guestfs_h *g,\n"
32489 " const char *device,\n"
32491 " const char *name);\n"
32496 #: ../src/guestfs-actions.pod:6172
32497 msgid "guestfs_part_to_dev"
32501 #: ../src/guestfs-actions.pod:6174
32505 " guestfs_part_to_dev (guestfs_h *g,\n"
32506 " const char *partition);\n"
32511 #: ../src/guestfs-actions.pod:6182 ../src/guestfs-actions.pod:6201
32513 "The named partition must exist, for example as a string returned from "
32514 "C<guestfs_list_partitions>."
32518 #: ../src/guestfs-actions.pod:6185
32519 msgid "See also C<guestfs_part_to_partnum>."
32523 #: ../src/guestfs-actions.pod:6192
32524 msgid "guestfs_part_to_partnum"
32528 #: ../src/guestfs-actions.pod:6194
32532 " guestfs_part_to_partnum (guestfs_h *g,\n"
32533 " const char *partition);\n"
32538 #: ../src/guestfs-actions.pod:6204
32539 msgid "See also C<guestfs_part_to_dev>."
32543 #: ../src/guestfs-actions.pod:6210
32544 msgid "guestfs_ping_daemon"
32548 #: ../src/guestfs-actions.pod:6212
32552 " guestfs_ping_daemon (guestfs_h *g);\n"
32557 #: ../src/guestfs-actions.pod:6224
32558 msgid "guestfs_pread"
32562 #: ../src/guestfs-actions.pod:6226
32566 " guestfs_pread (guestfs_h *g,\n"
32567 " const char *path,\n"
32569 " int64_t offset,\n"
32570 " size_t *size_r);\n"
32575 #: ../src/guestfs-actions.pod:6239
32576 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
32580 #: ../src/guestfs-actions.pod:6250
32581 msgid "guestfs_pread_device"
32585 #: ../src/guestfs-actions.pod:6252
32589 " guestfs_pread_device (guestfs_h *g,\n"
32590 " const char *device,\n"
32592 " int64_t offset,\n"
32593 " size_t *size_r);\n"
32598 #: ../src/guestfs-actions.pod:6265
32599 msgid "See also C<guestfs_pread>."
32603 #: ../src/guestfs-actions.pod:6274
32604 msgid "(Added in 1.5.21)"
32608 #: ../src/guestfs-actions.pod:6276
32609 msgid "guestfs_pvcreate"
32613 #: ../src/guestfs-actions.pod:6278
32617 " guestfs_pvcreate (guestfs_h *g,\n"
32618 " const char *device);\n"
32623 #: ../src/guestfs-actions.pod:6290
32624 msgid "guestfs_pvremove"
32628 #: ../src/guestfs-actions.pod:6292
32632 " guestfs_pvremove (guestfs_h *g,\n"
32633 " const char *device);\n"
32638 #: ../src/guestfs-actions.pod:6307
32639 msgid "guestfs_pvresize"
32643 #: ../src/guestfs-actions.pod:6309
32647 " guestfs_pvresize (guestfs_h *g,\n"
32648 " const char *device);\n"
32653 #: ../src/guestfs-actions.pod:6320
32654 msgid "guestfs_pvresize_size"
32658 #: ../src/guestfs-actions.pod:6322
32662 " guestfs_pvresize_size (guestfs_h *g,\n"
32663 " const char *device,\n"
32664 " int64_t size);\n"
32669 #: ../src/guestfs-actions.pod:6327
32671 "This command is the same as C<guestfs_pvresize> except that it allows you to "
32672 "specify the new size (in bytes) explicitly."
32676 #: ../src/guestfs-actions.pod:6334
32677 msgid "guestfs_pvs"
32681 #: ../src/guestfs-actions.pod:6336
32685 " guestfs_pvs (guestfs_h *g);\n"
32690 #: ../src/guestfs-actions.pod:6345
32691 msgid "See also C<guestfs_pvs_full>."
32695 #: ../src/guestfs-actions.pod:6353
32696 msgid "guestfs_pvs_full"
32700 #: ../src/guestfs-actions.pod:6355
32703 " struct guestfs_lvm_pv_list *\n"
32704 " guestfs_pvs_full (guestfs_h *g);\n"
32709 #: ../src/guestfs-actions.pod:6361
32711 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
32712 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
32716 #: ../src/guestfs-actions.pod:6367
32717 msgid "guestfs_pvuuid"
32721 #: ../src/guestfs-actions.pod:6369
32725 " guestfs_pvuuid (guestfs_h *g,\n"
32726 " const char *device);\n"
32731 #: ../src/guestfs-actions.pod:6380
32732 msgid "guestfs_pwrite"
32736 #: ../src/guestfs-actions.pod:6382
32740 " guestfs_pwrite (guestfs_h *g,\n"
32741 " const char *path,\n"
32742 " const char *content,\n"
32743 " size_t content_size,\n"
32744 " int64_t offset);\n"
32749 #: ../src/guestfs-actions.pod:6398
32750 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
32754 #: ../src/guestfs-actions.pod:6407
32755 msgid "guestfs_pwrite_device"
32759 #: ../src/guestfs-actions.pod:6409
32763 " guestfs_pwrite_device (guestfs_h *g,\n"
32764 " const char *device,\n"
32765 " const char *content,\n"
32766 " size_t content_size,\n"
32767 " int64_t offset);\n"
32772 #: ../src/guestfs-actions.pod:6424
32773 msgid "See also C<guestfs_pwrite>."
32777 #: ../src/guestfs-actions.pod:6431
32778 msgid "(Added in 1.5.20)"
32782 #: ../src/guestfs-actions.pod:6433
32783 msgid "guestfs_read_file"
32787 #: ../src/guestfs-actions.pod:6435
32791 " guestfs_read_file (guestfs_h *g,\n"
32792 " const char *path,\n"
32793 " size_t *size_r);\n"
32798 #: ../src/guestfs-actions.pod:6443
32800 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
32801 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
32802 "function is limited in the total size of file that can be handled."
32806 #: ../src/guestfs-actions.pod:6455
32807 msgid "(Added in 1.0.63)"
32811 #: ../src/guestfs-actions.pod:6457
32812 msgid "guestfs_read_lines"
32816 #: ../src/guestfs-actions.pod:6459
32820 " guestfs_read_lines (guestfs_h *g,\n"
32821 " const char *path);\n"
32826 #: ../src/guestfs-actions.pod:6468
32828 "Note that this function cannot correctly handle binary files (specifically, "
32829 "files containing C<\\0> character which is treated as end of line). For "
32830 "those you need to use the C<guestfs_read_file> function which has a more "
32831 "complex interface."
32835 #: ../src/guestfs-actions.pod:6479
32836 msgid "guestfs_readdir"
32840 #: ../src/guestfs-actions.pod:6481
32843 " struct guestfs_dirent_list *\n"
32844 " guestfs_readdir (guestfs_h *g,\n"
32845 " const char *dir);\n"
32850 #: ../src/guestfs-actions.pod:6535
32852 "This function is primarily intended for use by programs. To get a simple "
32853 "list of names, use C<guestfs_ls>. To get a printable directory for human "
32854 "consumption, use C<guestfs_ll>."
32858 #: ../src/guestfs-actions.pod:6539
32860 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
32861 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
32865 #: ../src/guestfs-actions.pod:6545
32866 msgid "guestfs_readlink"
32870 #: ../src/guestfs-actions.pod:6547
32874 " guestfs_readlink (guestfs_h *g,\n"
32875 " const char *path);\n"
32880 #: ../src/guestfs-actions.pod:6558
32881 msgid "guestfs_readlinklist"
32885 #: ../src/guestfs-actions.pod:6560
32889 " guestfs_readlinklist (guestfs_h *g,\n"
32890 " const char *path,\n"
32891 " char *const *names);\n"
32896 #: ../src/guestfs-actions.pod:6593
32897 msgid "guestfs_realpath"
32901 #: ../src/guestfs-actions.pod:6595
32905 " guestfs_realpath (guestfs_h *g,\n"
32906 " const char *path);\n"
32911 #: ../src/guestfs-actions.pod:6607
32912 msgid "guestfs_removexattr"
32916 #: ../src/guestfs-actions.pod:6609
32920 " guestfs_removexattr (guestfs_h *g,\n"
32921 " const char *xattr,\n"
32922 " const char *path);\n"
32927 #: ../src/guestfs-actions.pod:6617
32928 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
32932 #: ../src/guestfs-actions.pod:6623
32933 msgid "guestfs_resize2fs"
32937 #: ../src/guestfs-actions.pod:6625
32941 " guestfs_resize2fs (guestfs_h *g,\n"
32942 " const char *device);\n"
32947 #: ../src/guestfs-actions.pod:6632
32949 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
32950 "C<device> before calling this command. For unknown reasons C<resize2fs> "
32951 "sometimes gives an error about this and sometimes not. In any case, it is "
32952 "always safe to call C<guestfs_e2fsck_f> before calling this function."
32956 #: ../src/guestfs-actions.pod:6642
32957 msgid "guestfs_resize2fs_M"
32961 #: ../src/guestfs-actions.pod:6644
32965 " guestfs_resize2fs_M (guestfs_h *g,\n"
32966 " const char *device);\n"
32971 #: ../src/guestfs-actions.pod:6648
32973 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
32974 "resized to its minimum size. This works like the I<-M> option to the "
32975 "C<resize2fs> command."
32979 #: ../src/guestfs-actions.pod:6652
32981 "To get the resulting size of the filesystem you should call "
32982 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
32983 "These two numbers, multiplied together, give the resulting size of the "
32984 "minimal filesystem in bytes."
32988 #: ../src/guestfs-actions.pod:6661
32989 msgid "guestfs_resize2fs_size"
32993 #: ../src/guestfs-actions.pod:6663
32997 " guestfs_resize2fs_size (guestfs_h *g,\n"
32998 " const char *device,\n"
32999 " int64_t size);\n"
33004 #: ../src/guestfs-actions.pod:6668
33006 "This command is the same as C<guestfs_resize2fs> except that it allows you "
33007 "to specify the new size (in bytes) explicitly."
33011 #: ../src/guestfs-actions.pod:6675
33016 #: ../src/guestfs-actions.pod:6677
33020 " guestfs_rm (guestfs_h *g,\n"
33021 " const char *path);\n"
33026 #: ../src/guestfs-actions.pod:6687
33027 msgid "guestfs_rm_rf"
33031 #: ../src/guestfs-actions.pod:6689
33035 " guestfs_rm_rf (guestfs_h *g,\n"
33036 " const char *path);\n"
33041 #: ../src/guestfs-actions.pod:6701
33042 msgid "guestfs_rmdir"
33046 #: ../src/guestfs-actions.pod:6703
33050 " guestfs_rmdir (guestfs_h *g,\n"
33051 " const char *path);\n"
33056 #: ../src/guestfs-actions.pod:6713
33057 msgid "guestfs_rmmountpoint"
33061 #: ../src/guestfs-actions.pod:6715
33065 " guestfs_rmmountpoint (guestfs_h *g,\n"
33066 " const char *exemptpath);\n"
33071 #: ../src/guestfs-actions.pod:6719
33073 "This calls removes a mountpoint that was previously created with "
33074 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
33078 #: ../src/guestfs-actions.pod:6727
33079 msgid "guestfs_scrub_device"
33083 #: ../src/guestfs-actions.pod:6729
33087 " guestfs_scrub_device (guestfs_h *g,\n"
33088 " const char *device);\n"
33093 #: ../src/guestfs-actions.pod:6741 ../src/guestfs-actions.pod:6759
33094 #: ../src/guestfs-actions.pod:6778
33095 msgid "(Added in 1.0.52)"
33099 #: ../src/guestfs-actions.pod:6743
33100 msgid "guestfs_scrub_file"
33104 #: ../src/guestfs-actions.pod:6745
33108 " guestfs_scrub_file (guestfs_h *g,\n"
33109 " const char *file);\n"
33114 #: ../src/guestfs-actions.pod:6761
33115 msgid "guestfs_scrub_freespace"
33119 #: ../src/guestfs-actions.pod:6763
33123 " guestfs_scrub_freespace (guestfs_h *g,\n"
33124 " const char *dir);\n"
33129 #: ../src/guestfs-actions.pod:6767
33131 "This command creates the directory C<dir> and then fills it with files until "
33132 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
33133 "and deletes them. The intention is to scrub any free space on the partition "
33134 "containing C<dir>."
33138 #: ../src/guestfs-actions.pod:6780
33139 msgid "guestfs_set_append"
33143 #: ../src/guestfs-actions.pod:6782
33147 " guestfs_set_append (guestfs_h *g,\n"
33148 " const char *append);\n"
33153 #: ../src/guestfs-actions.pod:6799
33154 msgid "guestfs_set_attach_method"
33158 #: ../src/guestfs-actions.pod:6801
33162 " guestfs_set_attach_method (guestfs_h *g,\n"
33163 " const char *attachmethod);\n"
33168 #: ../src/guestfs-actions.pod:6829
33169 msgid "guestfs_set_autosync"
33173 #: ../src/guestfs-actions.pod:6831
33177 " guestfs_set_autosync (guestfs_h *g,\n"
33178 " int autosync);\n"
33183 #: ../src/guestfs-actions.pod:6847
33184 msgid "guestfs_set_direct"
33188 #: ../src/guestfs-actions.pod:6849
33192 " guestfs_set_direct (guestfs_h *g,\n"
33198 #: ../src/guestfs-actions.pod:6857
33200 "One consequence of this is that log messages aren't caught by the library "
33201 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
33206 #: ../src/guestfs-actions.pod:6870
33207 msgid "guestfs_set_e2label"
33211 #: ../src/guestfs-actions.pod:6872
33215 " guestfs_set_e2label (guestfs_h *g,\n"
33216 " const char *device,\n"
33217 " const char *label);\n"
33222 #: ../src/guestfs-actions.pod:6881
33224 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
33225 "the existing label on a filesystem."
33229 #: ../src/guestfs-actions.pod:6888
33230 msgid "guestfs_set_e2uuid"
33234 #: ../src/guestfs-actions.pod:6890
33238 " guestfs_set_e2uuid (guestfs_h *g,\n"
33239 " const char *device,\n"
33240 " const char *uuid);\n"
33245 #: ../src/guestfs-actions.pod:6900
33247 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
33248 "the existing UUID of a filesystem."
33252 #: ../src/guestfs-actions.pod:6907
33253 msgid "guestfs_set_memsize"
33257 #: ../src/guestfs-actions.pod:6909
33261 " guestfs_set_memsize (guestfs_h *g,\n"
33267 #: ../src/guestfs-actions.pod:6913
33269 "This sets the memory size in megabytes allocated to the qemu subprocess. "
33270 "This only has any effect if called before C<guestfs_launch>."
33274 #: ../src/guestfs-actions.pod:6928
33275 msgid "guestfs_set_network"
33279 #: ../src/guestfs-actions.pod:6930
33283 " guestfs_set_network (guestfs_h *g,\n"
33289 #: ../src/guestfs-actions.pod:6940
33291 "You must call this before calling C<guestfs_launch>, otherwise it has no "
33296 #: ../src/guestfs-actions.pod:6947
33297 msgid "guestfs_set_path"
33301 #: ../src/guestfs-actions.pod:6949
33305 " guestfs_set_path (guestfs_h *g,\n"
33306 " const char *searchpath);\n"
33311 #: ../src/guestfs-actions.pod:6964
33312 msgid "guestfs_set_pgroup"
33316 #: ../src/guestfs-actions.pod:6966
33320 " guestfs_set_pgroup (guestfs_h *g,\n"
33326 #: ../src/guestfs-actions.pod:6983
33327 msgid "guestfs_set_qemu"
33331 #: ../src/guestfs-actions.pod:6985
33335 " guestfs_set_qemu (guestfs_h *g,\n"
33336 " const char *qemu);\n"
33341 #: ../src/guestfs-actions.pod:7011
33342 msgid "guestfs_set_recovery_proc"
33346 #: ../src/guestfs-actions.pod:7013
33350 " guestfs_set_recovery_proc (guestfs_h *g,\n"
33351 " int recoveryproc);\n"
33356 #: ../src/guestfs-actions.pod:7017
33358 "If this is called with the parameter C<false> then C<guestfs_launch> does "
33359 "not create a recovery process. The purpose of the recovery process is to "
33360 "stop runaway qemu processes in the case where the main program aborts "
33365 #: ../src/guestfs-actions.pod:7022
33367 "This only has any effect if called before C<guestfs_launch>, and the default "
33372 #: ../src/guestfs-actions.pod:7035
33373 msgid "guestfs_set_selinux"
33377 #: ../src/guestfs-actions.pod:7037
33381 " guestfs_set_selinux (guestfs_h *g,\n"
33387 #: ../src/guestfs-actions.pod:7054
33388 msgid "guestfs_set_smp"
33392 #: ../src/guestfs-actions.pod:7056
33396 " guestfs_set_smp (guestfs_h *g,\n"
33402 #: ../src/guestfs-actions.pod:7064
33403 msgid "This function must be called before C<guestfs_launch>."
33407 #: ../src/guestfs-actions.pod:7070
33408 msgid "guestfs_set_trace"
33412 #: ../src/guestfs-actions.pod:7072
33416 " guestfs_set_trace (guestfs_h *g,\n"
33422 #: ../src/guestfs-actions.pod:7086
33424 "Trace messages are normally sent to C<stderr>, unless you register a "
33425 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
33429 #: ../src/guestfs-actions.pod:7094
33430 msgid "guestfs_set_verbose"
33434 #: ../src/guestfs-actions.pod:7096
33438 " guestfs_set_verbose (guestfs_h *g,\n"
33444 #: ../src/guestfs-actions.pod:7105
33446 "Verbose messages are normally sent to C<stderr>, unless you register a "
33447 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
33451 #: ../src/guestfs-actions.pod:7113
33452 msgid "guestfs_setcon"
33456 #: ../src/guestfs-actions.pod:7115
33460 " guestfs_setcon (guestfs_h *g,\n"
33461 " const char *context);\n"
33466 #: ../src/guestfs-actions.pod:7128
33467 msgid "guestfs_setxattr"
33471 #: ../src/guestfs-actions.pod:7130
33475 " guestfs_setxattr (guestfs_h *g,\n"
33476 " const char *xattr,\n"
33477 " const char *val,\n"
33479 " const char *path);\n"
33484 #: ../src/guestfs-actions.pod:7141
33485 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
33489 #: ../src/guestfs-actions.pod:7147
33490 msgid "guestfs_sfdisk"
33494 #: ../src/guestfs-actions.pod:7149
33498 " guestfs_sfdisk (guestfs_h *g,\n"
33499 " const char *device,\n"
33503 " char *const *lines);\n"
33508 #: ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7198
33509 #: ../src/guestfs-actions.pod:7229
33511 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
33516 #: ../src/guestfs-actions.pod:7184
33518 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
33522 #: ../src/guestfs-actions.pod:7191
33523 msgid "guestfs_sfdiskM"
33527 #: ../src/guestfs-actions.pod:7193
33531 " guestfs_sfdiskM (guestfs_h *g,\n"
33532 " const char *device,\n"
33533 " char *const *lines);\n"
33538 #: ../src/guestfs-actions.pod:7205
33540 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
33541 "partition sizes are specified in megabytes only (rounded to the nearest "
33542 "cylinder) and you don't need to specify the cyls, heads and sectors "
33543 "parameters which were rarely if ever used anyway."
33547 #: ../src/guestfs-actions.pod:7211
33549 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
33550 "C<guestfs_part_disk>"
33554 #: ../src/guestfs-actions.pod:7218
33555 msgid "guestfs_sfdisk_N"
33559 #: ../src/guestfs-actions.pod:7220
33563 " guestfs_sfdisk_N (guestfs_h *g,\n"
33564 " const char *device,\n"
33569 " const char *line);\n"
33574 #: ../src/guestfs-actions.pod:7239
33576 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
33577 "for the cyls/heads/sectors parameters."
33581 #: ../src/guestfs-actions.pod:7242
33582 msgid "See also: C<guestfs_part_add>"
33586 #: ../src/guestfs-actions.pod:7248
33587 msgid "guestfs_sfdisk_disk_geometry"
33591 #: ../src/guestfs-actions.pod:7250
33595 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
33596 " const char *device);\n"
33601 #: ../src/guestfs-actions.pod:7254
33603 "This displays the disk geometry of C<device> read from the partition table. "
33604 "Especially in the case where the underlying block device has been resized, "
33605 "this can be different from the kernel's idea of the geometry (see "
33606 "C<guestfs_sfdisk_kernel_geometry>)."
33610 #: ../src/guestfs-actions.pod:7267
33611 msgid "guestfs_sfdisk_kernel_geometry"
33615 #: ../src/guestfs-actions.pod:7269
33619 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
33620 " const char *device);\n"
33625 #: ../src/guestfs-actions.pod:7283
33626 msgid "guestfs_sfdisk_l"
33630 #: ../src/guestfs-actions.pod:7285
33634 " guestfs_sfdisk_l (guestfs_h *g,\n"
33635 " const char *device);\n"
33640 #: ../src/guestfs-actions.pod:7289
33642 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
33647 #: ../src/guestfs-actions.pod:7300
33648 msgid "See also: C<guestfs_part_list>"
33652 #: ../src/guestfs-actions.pod:7307
33657 #: ../src/guestfs-actions.pod:7309
33661 " guestfs_sh (guestfs_h *g,\n"
33662 " const char *command);\n"
33667 #: ../src/guestfs-actions.pod:7316
33668 msgid "This is like C<guestfs_command>, but passes the command to:"
33672 #: ../src/guestfs-actions.pod:7324
33673 msgid "All the provisos about C<guestfs_command> apply to this call."
33677 #: ../src/guestfs-actions.pod:7331
33678 msgid "guestfs_sh_lines"
33682 #: ../src/guestfs-actions.pod:7333
33686 " guestfs_sh_lines (guestfs_h *g,\n"
33687 " const char *command);\n"
33692 #: ../src/guestfs-actions.pod:7337
33694 "This is the same as C<guestfs_sh>, but splits the result into a list of "
33699 #: ../src/guestfs-actions.pod:7340
33700 msgid "See also: C<guestfs_command_lines>"
33704 #: ../src/guestfs-actions.pod:7348
33705 msgid "guestfs_sleep"
33709 #: ../src/guestfs-actions.pod:7350
33713 " guestfs_sleep (guestfs_h *g,\n"
33719 #: ../src/guestfs-actions.pod:7358
33720 msgid "(Added in 1.0.41)"
33724 #: ../src/guestfs-actions.pod:7360 ../src/guestfs-structs.pod:109
33725 msgid "guestfs_stat"
33729 #: ../src/guestfs-actions.pod:7362
33732 " struct guestfs_stat *\n"
33733 " guestfs_stat (guestfs_h *g,\n"
33734 " const char *path);\n"
33739 #: ../src/guestfs-actions.pod:7376 ../src/guestfs-structs.pod:135
33740 msgid "guestfs_statvfs"
33744 #: ../src/guestfs-actions.pod:7378
33747 " struct guestfs_statvfs *\n"
33748 " guestfs_statvfs (guestfs_h *g,\n"
33749 " const char *path);\n"
33754 #: ../src/guestfs-actions.pod:7388
33756 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
33757 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
33761 #: ../src/guestfs-actions.pod:7394
33762 msgid "guestfs_strings"
33766 #: ../src/guestfs-actions.pod:7396
33770 " guestfs_strings (guestfs_h *g,\n"
33771 " const char *path);\n"
33776 #: ../src/guestfs-actions.pod:7412
33777 msgid "guestfs_strings_e"
33781 #: ../src/guestfs-actions.pod:7414
33785 " guestfs_strings_e (guestfs_h *g,\n"
33786 " const char *encoding,\n"
33787 " const char *path);\n"
33792 #: ../src/guestfs-actions.pod:7419
33794 "This is like the C<guestfs_strings> command, but allows you to specify the "
33795 "encoding of strings that are looked for in the source file C<path>."
33799 #: ../src/guestfs-actions.pod:7429
33801 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
33802 "ISO-8859-X (this is what C<guestfs_strings> uses)."
33806 #: ../src/guestfs-actions.pod:7467
33807 msgid "guestfs_swapoff_device"
33811 #: ../src/guestfs-actions.pod:7469
33815 " guestfs_swapoff_device (guestfs_h *g,\n"
33816 " const char *device);\n"
33821 #: ../src/guestfs-actions.pod:7473
33823 "This command disables the libguestfs appliance swap device or partition "
33824 "named C<device>. See C<guestfs_swapon_device>."
33828 #: ../src/guestfs-actions.pod:7481
33829 msgid "guestfs_swapoff_file"
33833 #: ../src/guestfs-actions.pod:7483
33837 " guestfs_swapoff_file (guestfs_h *g,\n"
33838 " const char *file);\n"
33843 #: ../src/guestfs-actions.pod:7493
33844 msgid "guestfs_swapoff_label"
33848 #: ../src/guestfs-actions.pod:7495
33852 " guestfs_swapoff_label (guestfs_h *g,\n"
33853 " const char *label);\n"
33858 #: ../src/guestfs-actions.pod:7506
33859 msgid "guestfs_swapoff_uuid"
33863 #: ../src/guestfs-actions.pod:7508
33867 " guestfs_swapoff_uuid (guestfs_h *g,\n"
33868 " const char *uuid);\n"
33873 #: ../src/guestfs-actions.pod:7519
33874 msgid "guestfs_swapon_device"
33878 #: ../src/guestfs-actions.pod:7521
33882 " guestfs_swapon_device (guestfs_h *g,\n"
33883 " const char *device);\n"
33888 #: ../src/guestfs-actions.pod:7525
33890 "This command enables the libguestfs appliance to use the swap device or "
33891 "partition named C<device>. The increased memory is made available for all "
33892 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
33896 #: ../src/guestfs-actions.pod:7541
33897 msgid "guestfs_swapon_file"
33901 #: ../src/guestfs-actions.pod:7543
33905 " guestfs_swapon_file (guestfs_h *g,\n"
33906 " const char *file);\n"
33911 #: ../src/guestfs-actions.pod:7547
33913 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
33918 #: ../src/guestfs-actions.pod:7554
33919 msgid "guestfs_swapon_label"
33923 #: ../src/guestfs-actions.pod:7556
33927 " guestfs_swapon_label (guestfs_h *g,\n"
33928 " const char *label);\n"
33933 #: ../src/guestfs-actions.pod:7560
33935 "This command enables swap to a labeled swap partition. See "
33936 "C<guestfs_swapon_device> for other notes."
33940 #: ../src/guestfs-actions.pod:7567
33941 msgid "guestfs_swapon_uuid"
33945 #: ../src/guestfs-actions.pod:7569
33949 " guestfs_swapon_uuid (guestfs_h *g,\n"
33950 " const char *uuid);\n"
33955 #: ../src/guestfs-actions.pod:7573
33957 "This command enables swap to a swap partition with the given UUID. See "
33958 "C<guestfs_swapon_device> for other notes."
33962 #: ../src/guestfs-actions.pod:7580
33963 msgid "guestfs_sync"
33967 #: ../src/guestfs-actions.pod:7582
33971 " guestfs_sync (guestfs_h *g);\n"
33976 #: ../src/guestfs-actions.pod:7595
33977 msgid "guestfs_tail"
33981 #: ../src/guestfs-actions.pod:7597
33985 " guestfs_tail (guestfs_h *g,\n"
33986 " const char *path);\n"
33991 #: ../src/guestfs-actions.pod:7613
33992 msgid "guestfs_tail_n"
33996 #: ../src/guestfs-actions.pod:7615
34000 " guestfs_tail_n (guestfs_h *g,\n"
34002 " const char *path);\n"
34007 #: ../src/guestfs-actions.pod:7637
34008 msgid "guestfs_tar_in"
34012 #: ../src/guestfs-actions.pod:7639
34016 " guestfs_tar_in (guestfs_h *g,\n"
34017 " const char *tarfile,\n"
34018 " const char *directory);\n"
34023 #: ../src/guestfs-actions.pod:7647
34025 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
34029 #: ../src/guestfs-actions.pod:7652 ../src/guestfs-actions.pod:7669
34030 #: ../src/guestfs-actions.pod:7685 ../src/guestfs-actions.pod:7701
34031 msgid "(Added in 1.0.3)"
34035 #: ../src/guestfs-actions.pod:7654
34036 msgid "guestfs_tar_out"
34040 #: ../src/guestfs-actions.pod:7656
34044 " guestfs_tar_out (guestfs_h *g,\n"
34045 " const char *directory,\n"
34046 " const char *tarfile);\n"
34051 #: ../src/guestfs-actions.pod:7664
34053 "To download a compressed tarball, use C<guestfs_tgz_out> or "
34054 "C<guestfs_txz_out>."
34058 #: ../src/guestfs-actions.pod:7671
34059 msgid "guestfs_tgz_in"
34063 #: ../src/guestfs-actions.pod:7673
34067 " guestfs_tgz_in (guestfs_h *g,\n"
34068 " const char *tarball,\n"
34069 " const char *directory);\n"
34074 #: ../src/guestfs-actions.pod:7681
34075 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
34079 #: ../src/guestfs-actions.pod:7687
34080 msgid "guestfs_tgz_out"
34084 #: ../src/guestfs-actions.pod:7689
34088 " guestfs_tgz_out (guestfs_h *g,\n"
34089 " const char *directory,\n"
34090 " const char *tarball);\n"
34095 #: ../src/guestfs-actions.pod:7697
34096 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
34100 #: ../src/guestfs-actions.pod:7703
34101 msgid "guestfs_touch"
34105 #: ../src/guestfs-actions.pod:7705
34109 " guestfs_touch (guestfs_h *g,\n"
34110 " const char *path);\n"
34115 #: ../src/guestfs-actions.pod:7720
34116 msgid "guestfs_truncate"
34120 #: ../src/guestfs-actions.pod:7722
34124 " guestfs_truncate (guestfs_h *g,\n"
34125 " const char *path);\n"
34130 #: ../src/guestfs-actions.pod:7733
34131 msgid "guestfs_truncate_size"
34135 #: ../src/guestfs-actions.pod:7735
34139 " guestfs_truncate_size (guestfs_h *g,\n"
34140 " const char *path,\n"
34141 " int64_t size);\n"
34146 #: ../src/guestfs-actions.pod:7743
34148 "If the current file size is less than C<size> then the file is extended to "
34149 "the required size with zero bytes. This creates a sparse file (ie. disk "
34150 "blocks are not allocated for the file until you write to it). To create a "
34151 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
34155 #: ../src/guestfs-actions.pod:7753
34156 msgid "guestfs_tune2fs"
34160 #: ../src/guestfs-actions.pod:7755
34164 " guestfs_tune2fs (guestfs_h *g,\n"
34165 " const char *device,\n"
34171 #: ../src/guestfs-actions.pod:7765
34174 " GUESTFS_TUNE2FS_FORCE, int force,\n"
34175 " GUESTFS_TUNE2FS_MAXMOUNTCOUNT, int maxmountcount,\n"
34176 " GUESTFS_TUNE2FS_MOUNTCOUNT, int mountcount,\n"
34177 " GUESTFS_TUNE2FS_ERRORBEHAVIOR, const char *errorbehavior,\n"
34178 " GUESTFS_TUNE2FS_GROUP, int64_t group,\n"
34179 " GUESTFS_TUNE2FS_INTERVALBETWEENCHECKS, int intervalbetweenchecks,\n"
34180 " GUESTFS_TUNE2FS_RESERVEDBLOCKSPERCENTAGE, int reservedblockspercentage,\n"
34181 " GUESTFS_TUNE2FS_LASTMOUNTEDDIRECTORY, const char *lastmounteddirectory,\n"
34182 " GUESTFS_TUNE2FS_RESERVEDBLOCKSCOUNT, int64_t reservedblockscount,\n"
34183 " GUESTFS_TUNE2FS_USER, int64_t user,\n"
34188 #: ../src/guestfs-actions.pod:7845
34190 "To get the current values of filesystem parameters, see "
34191 "C<guestfs_tune2fs_l>. For precise details of how tune2fs works, see the "
34192 "L<tune2fs(8)> man page."
34196 #: ../src/guestfs-actions.pod:7853
34197 msgid "guestfs_tune2fs_va"
34201 #: ../src/guestfs-actions.pod:7855
34205 " guestfs_tune2fs_va (guestfs_h *g,\n"
34206 " const char *device,\n"
34207 " va_list args);\n"
34212 #: ../src/guestfs-actions.pod:7860
34213 msgid "This is the \"va_list variant\" of L</guestfs_tune2fs>."
34217 #: ../src/guestfs-actions.pod:7864
34218 msgid "guestfs_tune2fs_argv"
34222 #: ../src/guestfs-actions.pod:7866
34226 " guestfs_tune2fs_argv (guestfs_h *g,\n"
34227 " const char *device,\n"
34228 " const struct guestfs_tune2fs_argv *optargs);\n"
34233 #: ../src/guestfs-actions.pod:7871
34234 msgid "This is the \"argv variant\" of L</guestfs_tune2fs>."
34238 #: ../src/guestfs-actions.pod:7875
34239 msgid "guestfs_tune2fs_l"
34243 #: ../src/guestfs-actions.pod:7877
34247 " guestfs_tune2fs_l (guestfs_h *g,\n"
34248 " const char *device);\n"
34253 #: ../src/guestfs-actions.pod:7897
34254 msgid "guestfs_txz_in"
34258 #: ../src/guestfs-actions.pod:7899
34262 " guestfs_txz_in (guestfs_h *g,\n"
34263 " const char *tarball,\n"
34264 " const char *directory);\n"
34269 #: ../src/guestfs-actions.pod:7911
34270 msgid "guestfs_txz_out"
34274 #: ../src/guestfs-actions.pod:7913
34278 " guestfs_txz_out (guestfs_h *g,\n"
34279 " const char *directory,\n"
34280 " const char *tarball);\n"
34285 #: ../src/guestfs-actions.pod:7925
34286 msgid "guestfs_umask"
34290 #: ../src/guestfs-actions.pod:7927
34294 " guestfs_umask (guestfs_h *g,\n"
34300 #: ../src/guestfs-actions.pod:7943
34302 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
34303 "C<guestfs_mkdir>."
34307 #: ../src/guestfs-actions.pod:7952
34308 msgid "guestfs_umount"
34312 #: ../src/guestfs-actions.pod:7954
34316 " guestfs_umount (guestfs_h *g,\n"
34317 " const char *pathordevice);\n"
34322 #: ../src/guestfs-actions.pod:7966
34323 msgid "guestfs_umount_all"
34327 #: ../src/guestfs-actions.pod:7968
34331 " guestfs_umount_all (guestfs_h *g);\n"
34336 #: ../src/guestfs-actions.pod:7979
34337 msgid "guestfs_upload"
34341 #: ../src/guestfs-actions.pod:7981
34345 " guestfs_upload (guestfs_h *g,\n"
34346 " const char *filename,\n"
34347 " const char *remotefilename);\n"
34352 #: ../src/guestfs-actions.pod:7991
34353 msgid "See also C<guestfs_download>."
34357 #: ../src/guestfs-actions.pod:8002
34358 msgid "guestfs_upload_offset"
34362 #: ../src/guestfs-actions.pod:8004
34366 " guestfs_upload_offset (guestfs_h *g,\n"
34367 " const char *filename,\n"
34368 " const char *remotefilename,\n"
34369 " int64_t offset);\n"
34374 #: ../src/guestfs-actions.pod:8020
34376 "Note that there is no limit on the amount of data that can be uploaded with "
34377 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
34378 "full amount unless an error occurs."
34382 #: ../src/guestfs-actions.pod:8025
34383 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
34387 #: ../src/guestfs-actions.pod:8036
34388 msgid "guestfs_utimens"
34392 #: ../src/guestfs-actions.pod:8038
34396 " guestfs_utimens (guestfs_h *g,\n"
34397 " const char *path,\n"
34398 " int64_t atsecs,\n"
34399 " int64_t atnsecs,\n"
34400 " int64_t mtsecs,\n"
34401 " int64_t mtnsecs);\n"
34406 #: ../src/guestfs-actions.pod:8067 ../src/guestfs-structs.pod:175
34407 msgid "guestfs_version"
34411 #: ../src/guestfs-actions.pod:8069
34414 " struct guestfs_version *\n"
34415 " guestfs_version (guestfs_h *g);\n"
34420 #: ../src/guestfs-actions.pod:8097
34422 "I<Note:> Don't use this call to test for availability of features. In "
34423 "enterprise distributions we backport features from later versions into "
34424 "earlier versions, making this an unreliable way to test for features. Use "
34425 "C<guestfs_available> instead."
34429 #: ../src/guestfs-actions.pod:8103
34431 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
34432 "error. I<The caller must call C<guestfs_free_version> after use>."
34436 #: ../src/guestfs-actions.pod:8107
34437 msgid "(Added in 1.0.58)"
34441 #: ../src/guestfs-actions.pod:8109
34442 msgid "guestfs_vfs_label"
34446 #: ../src/guestfs-actions.pod:8111
34450 " guestfs_vfs_label (guestfs_h *g,\n"
34451 " const char *device);\n"
34456 #: ../src/guestfs-actions.pod:8120
34457 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
34461 #: ../src/guestfs-actions.pod:8125 ../src/guestfs-actions.pod:8162
34462 msgid "(Added in 1.3.18)"
34466 #: ../src/guestfs-actions.pod:8127
34467 msgid "guestfs_vfs_type"
34471 #: ../src/guestfs-actions.pod:8129
34475 " guestfs_vfs_type (guestfs_h *g,\n"
34476 " const char *device);\n"
34481 #: ../src/guestfs-actions.pod:8146
34482 msgid "guestfs_vfs_uuid"
34486 #: ../src/guestfs-actions.pod:8148
34490 " guestfs_vfs_uuid (guestfs_h *g,\n"
34491 " const char *device);\n"
34496 #: ../src/guestfs-actions.pod:8157
34497 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
34501 #: ../src/guestfs-actions.pod:8164
34502 msgid "guestfs_vg_activate"
34506 #: ../src/guestfs-actions.pod:8166
34510 " guestfs_vg_activate (guestfs_h *g,\n"
34512 " char *const *volgroups);\n"
34517 #: ../src/guestfs-actions.pod:8183
34518 msgid "guestfs_vg_activate_all"
34522 #: ../src/guestfs-actions.pod:8185
34526 " guestfs_vg_activate_all (guestfs_h *g,\n"
34527 " int activate);\n"
34532 #: ../src/guestfs-actions.pod:8198
34533 msgid "guestfs_vgcreate"
34537 #: ../src/guestfs-actions.pod:8200
34541 " guestfs_vgcreate (guestfs_h *g,\n"
34542 " const char *volgroup,\n"
34543 " char *const *physvols);\n"
34548 #: ../src/guestfs-actions.pod:8212
34549 msgid "guestfs_vglvuuids"
34553 #: ../src/guestfs-actions.pod:8214
34557 " guestfs_vglvuuids (guestfs_h *g,\n"
34558 " const char *vgname);\n"
34563 #: ../src/guestfs-actions.pod:8221
34565 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
34566 "associate logical volumes and volume groups."
34570 #: ../src/guestfs-actions.pod:8224
34571 msgid "See also C<guestfs_vgpvuuids>."
34575 #: ../src/guestfs-actions.pod:8232
34576 msgid "guestfs_vgpvuuids"
34580 #: ../src/guestfs-actions.pod:8234
34584 " guestfs_vgpvuuids (guestfs_h *g,\n"
34585 " const char *vgname);\n"
34590 #: ../src/guestfs-actions.pod:8241
34592 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
34593 "associate physical volumes and volume groups."
34597 #: ../src/guestfs-actions.pod:8244
34598 msgid "See also C<guestfs_vglvuuids>."
34602 #: ../src/guestfs-actions.pod:8252
34603 msgid "guestfs_vgremove"
34607 #: ../src/guestfs-actions.pod:8254
34611 " guestfs_vgremove (guestfs_h *g,\n"
34612 " const char *vgname);\n"
34617 #: ../src/guestfs-actions.pod:8267
34618 msgid "guestfs_vgrename"
34622 #: ../src/guestfs-actions.pod:8269
34626 " guestfs_vgrename (guestfs_h *g,\n"
34627 " const char *volgroup,\n"
34628 " const char *newvolgroup);\n"
34633 #: ../src/guestfs-actions.pod:8280
34634 msgid "guestfs_vgs"
34638 #: ../src/guestfs-actions.pod:8282
34642 " guestfs_vgs (guestfs_h *g);\n"
34647 #: ../src/guestfs-actions.pod:8291
34648 msgid "See also C<guestfs_vgs_full>."
34652 #: ../src/guestfs-actions.pod:8299
34653 msgid "guestfs_vgs_full"
34657 #: ../src/guestfs-actions.pod:8301
34660 " struct guestfs_lvm_vg_list *\n"
34661 " guestfs_vgs_full (guestfs_h *g);\n"
34666 #: ../src/guestfs-actions.pod:8307
34668 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
34669 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
34673 #: ../src/guestfs-actions.pod:8313
34674 msgid "guestfs_vgscan"
34678 #: ../src/guestfs-actions.pod:8315
34682 " guestfs_vgscan (guestfs_h *g);\n"
34687 #: ../src/guestfs-actions.pod:8325
34688 msgid "guestfs_vguuid"
34692 #: ../src/guestfs-actions.pod:8327
34696 " guestfs_vguuid (guestfs_h *g,\n"
34697 " const char *vgname);\n"
34702 #: ../src/guestfs-actions.pod:8338
34703 msgid "guestfs_wait_ready"
34707 #: ../src/guestfs-actions.pod:8340
34711 " guestfs_wait_ready (guestfs_h *g);\n"
34716 #: ../src/guestfs-actions.pod:8343
34718 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
34723 #: ../src/guestfs-actions.pod:8350
34724 msgid "This function is a no op."
34728 #: ../src/guestfs-actions.pod:8352
34730 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
34731 "calling C<guestfs_launch> to wait for the launch to complete. However this "
34732 "is no longer necessary because C<guestfs_launch> now does the waiting."
34736 #: ../src/guestfs-actions.pod:8357
34738 "If you see any calls to this function in code then you can just remove them, "
34739 "unless you want to retain compatibility with older versions of the API."
34743 #: ../src/guestfs-actions.pod:8365
34744 msgid "guestfs_wc_c"
34748 #: ../src/guestfs-actions.pod:8367
34752 " guestfs_wc_c (guestfs_h *g,\n"
34753 " const char *path);\n"
34758 #: ../src/guestfs-actions.pod:8378
34759 msgid "guestfs_wc_l"
34763 #: ../src/guestfs-actions.pod:8380
34767 " guestfs_wc_l (guestfs_h *g,\n"
34768 " const char *path);\n"
34773 #: ../src/guestfs-actions.pod:8391
34774 msgid "guestfs_wc_w"
34778 #: ../src/guestfs-actions.pod:8393
34782 " guestfs_wc_w (guestfs_h *g,\n"
34783 " const char *path);\n"
34788 #: ../src/guestfs-actions.pod:8404
34789 msgid "guestfs_write"
34793 #: ../src/guestfs-actions.pod:8406
34797 " guestfs_write (guestfs_h *g,\n"
34798 " const char *path,\n"
34799 " const char *content,\n"
34800 " size_t content_size);\n"
34805 #: ../src/guestfs-actions.pod:8415
34806 msgid "See also C<guestfs_write_append>."
34810 #: ../src/guestfs-actions.pod:8424
34811 msgid "guestfs_write_append"
34815 #: ../src/guestfs-actions.pod:8426
34819 " guestfs_write_append (guestfs_h *g,\n"
34820 " const char *path,\n"
34821 " const char *content,\n"
34822 " size_t content_size);\n"
34827 #: ../src/guestfs-actions.pod:8435
34828 msgid "See also C<guestfs_write>."
34832 #: ../src/guestfs-actions.pod:8444
34833 msgid "guestfs_write_file"
34837 #: ../src/guestfs-actions.pod:8446
34841 " guestfs_write_file (guestfs_h *g,\n"
34842 " const char *path,\n"
34843 " const char *content,\n"
34849 #: ../src/guestfs-actions.pod:8452
34851 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
34856 #: ../src/guestfs-actions.pod:8477
34857 msgid "guestfs_zegrep"
34861 #: ../src/guestfs-actions.pod:8479
34865 " guestfs_zegrep (guestfs_h *g,\n"
34866 " const char *regex,\n"
34867 " const char *path);\n"
34872 #: ../src/guestfs-actions.pod:8496
34873 msgid "guestfs_zegrepi"
34877 #: ../src/guestfs-actions.pod:8498
34881 " guestfs_zegrepi (guestfs_h *g,\n"
34882 " const char *regex,\n"
34883 " const char *path);\n"
34888 #: ../src/guestfs-actions.pod:8515
34889 msgid "guestfs_zero"
34893 #: ../src/guestfs-actions.pod:8517
34897 " guestfs_zero (guestfs_h *g,\n"
34898 " const char *device);\n"
34903 #: ../src/guestfs-actions.pod:8531
34905 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
34906 "C<guestfs_is_zero_device>"
34910 #: ../src/guestfs-actions.pod:8543
34911 msgid "guestfs_zero_device"
34915 #: ../src/guestfs-actions.pod:8545
34919 " guestfs_zero_device (guestfs_h *g,\n"
34920 " const char *device);\n"
34925 #: ../src/guestfs-actions.pod:8549
34927 "This command writes zeroes over the entire C<device>. Compare with "
34928 "C<guestfs_zero> which just zeroes the first few blocks of a device."
34932 #: ../src/guestfs-actions.pod:8564
34933 msgid "(Added in 1.3.1)"
34937 #: ../src/guestfs-actions.pod:8566
34938 msgid "guestfs_zerofree"
34942 #: ../src/guestfs-actions.pod:8568
34946 " guestfs_zerofree (guestfs_h *g,\n"
34947 " const char *device);\n"
34952 #: ../src/guestfs-actions.pod:8587
34953 msgid "guestfs_zfgrep"
34957 #: ../src/guestfs-actions.pod:8589
34961 " guestfs_zfgrep (guestfs_h *g,\n"
34962 " const char *pattern,\n"
34963 " const char *path);\n"
34968 #: ../src/guestfs-actions.pod:8606
34969 msgid "guestfs_zfgrepi"
34973 #: ../src/guestfs-actions.pod:8608
34977 " guestfs_zfgrepi (guestfs_h *g,\n"
34978 " const char *pattern,\n"
34979 " const char *path);\n"
34984 #: ../src/guestfs-actions.pod:8625
34985 msgid "guestfs_zfile"
34989 #: ../src/guestfs-actions.pod:8627
34993 " guestfs_zfile (guestfs_h *g,\n"
34994 " const char *meth,\n"
34995 " const char *path);\n"
35000 #: ../src/guestfs-actions.pod:8632
35002 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
35007 #: ../src/guestfs-actions.pod:8644
35009 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
35014 #: ../src/guestfs-actions.pod:8652
35015 msgid "guestfs_zgrep"
35019 #: ../src/guestfs-actions.pod:8654
35023 " guestfs_zgrep (guestfs_h *g,\n"
35024 " const char *regex,\n"
35025 " const char *path);\n"
35030 #: ../src/guestfs-actions.pod:8671
35031 msgid "guestfs_zgrepi"
35035 #: ../src/guestfs-actions.pod:8673
35039 " guestfs_zgrepi (guestfs_h *g,\n"
35040 " const char *regex,\n"
35041 " const char *path);\n"
35046 #: ../src/guestfs-availability.pod:3
35051 #: ../src/guestfs-availability.pod:5
35053 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
35054 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
35055 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
35056 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
35057 "L</guestfs_aug_save> L</guestfs_aug_set>"
35061 #: ../src/guestfs-availability.pod:21
35066 #: ../src/guestfs-availability.pod:23
35067 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
35071 #: ../src/guestfs-availability.pod:26
35076 #: ../src/guestfs-availability.pod:28
35077 msgid "The following functions: L</guestfs_grub_install>"
35081 #: ../src/guestfs-availability.pod:31
35086 #: ../src/guestfs-availability.pod:33
35088 "The following functions: L</guestfs_inotify_add_watch> L</"
35089 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
35090 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
35094 #: ../src/guestfs-availability.pod:41
35095 msgid "B<linuxfsuuid>"
35099 #: ../src/guestfs-availability.pod:43
35101 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
35102 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
35106 #: ../src/guestfs-availability.pod:50
35107 msgid "B<linuxmodules>"
35111 #: ../src/guestfs-availability.pod:52
35112 msgid "The following functions: L</guestfs_modprobe>"
35116 #: ../src/guestfs-availability.pod:55
35117 msgid "B<linuxxattrs>"
35121 #: ../src/guestfs-availability.pod:57
35123 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
35124 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
35125 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
35126 "guestfs_setxattr>"
35130 #: ../src/guestfs-availability.pod:68
35135 #: ../src/guestfs-availability.pod:70
35137 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
35138 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
35139 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
35143 #: ../src/guestfs-availability.pod:79
35148 #: ../src/guestfs-availability.pod:81
35150 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
35151 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
35152 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
35153 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
35154 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
35155 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
35156 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
35160 #: ../src/guestfs-availability.pod:104
35165 #: ../src/guestfs-availability.pod:106
35167 "The following functions: L</guestfs_md_create> L</guestfs_md_detail> L</"
35172 #: ../src/guestfs-availability.pod:111
35177 #: ../src/guestfs-availability.pod:113
35179 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
35180 "guestfs_mknod_b> L</guestfs_mknod_c>"
35184 #: ../src/guestfs-availability.pod:119
35189 #: ../src/guestfs-availability.pod:121
35190 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
35194 #: ../src/guestfs-availability.pod:124
35195 msgid "B<ntfsprogs>"
35199 #: ../src/guestfs-availability.pod:126
35201 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
35202 "L</guestfs_ntfsresize_size>"
35206 #: ../src/guestfs-availability.pod:131
35207 msgid "B<realpath>"
35211 #: ../src/guestfs-availability.pod:133
35212 msgid "The following functions: L</guestfs_realpath>"
35216 #: ../src/guestfs-availability.pod:136
35221 #: ../src/guestfs-availability.pod:138
35223 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
35224 "guestfs_scrub_freespace>"
35228 #: ../src/guestfs-availability.pod:143
35233 #: ../src/guestfs-availability.pod:145
35234 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
35238 #: ../src/guestfs-availability.pod:149
35243 #: ../src/guestfs-availability.pod:151
35244 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
35248 #: ../src/guestfs-availability.pod:155
35249 msgid "B<zerofree>"
35253 #: ../src/guestfs-availability.pod:157
35254 msgid "The following functions: L</guestfs_zerofree>"
35258 #: ../src/guestfs-structs.pod:1
35259 msgid "guestfs_int_bool"
35263 #: ../src/guestfs-structs.pod:3
35266 " struct guestfs_int_bool {\n"
35274 #: ../src/guestfs-structs.pod:8
35277 " struct guestfs_int_bool_list {\n"
35278 " uint32_t len; /* Number of elements in list. */\n"
35279 " struct guestfs_int_bool *val; /* Elements. */\n"
35285 #: ../src/guestfs-structs.pod:13
35288 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
35289 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
35294 #: ../src/guestfs-structs.pod:16
35295 msgid "guestfs_lvm_pv"
35299 #: ../src/guestfs-structs.pod:18
35302 " struct guestfs_lvm_pv {\n"
35303 " char *pv_name;\n"
35304 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
35305 " char pv_uuid[32];\n"
35307 " uint64_t pv_size;\n"
35308 " uint64_t dev_size;\n"
35309 " uint64_t pv_free;\n"
35310 " uint64_t pv_used;\n"
35311 " char *pv_attr;\n"
35312 " int64_t pv_pe_count;\n"
35313 " int64_t pv_pe_alloc_count;\n"
35314 " char *pv_tags;\n"
35315 " uint64_t pe_start;\n"
35316 " int64_t pv_mda_count;\n"
35317 " uint64_t pv_mda_free;\n"
35323 #: ../src/guestfs-structs.pod:36
35326 " struct guestfs_lvm_pv_list {\n"
35327 " uint32_t len; /* Number of elements in list. */\n"
35328 " struct guestfs_lvm_pv *val; /* Elements. */\n"
35334 #: ../src/guestfs-structs.pod:41
35337 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
35338 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
35343 #: ../src/guestfs-structs.pod:44
35344 msgid "guestfs_lvm_vg"
35348 #: ../src/guestfs-structs.pod:46
35351 " struct guestfs_lvm_vg {\n"
35352 " char *vg_name;\n"
35353 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
35354 " char vg_uuid[32];\n"
35356 " char *vg_attr;\n"
35357 " uint64_t vg_size;\n"
35358 " uint64_t vg_free;\n"
35359 " char *vg_sysid;\n"
35360 " uint64_t vg_extent_size;\n"
35361 " int64_t vg_extent_count;\n"
35362 " int64_t vg_free_count;\n"
35363 " int64_t max_lv;\n"
35364 " int64_t max_pv;\n"
35365 " int64_t pv_count;\n"
35366 " int64_t lv_count;\n"
35367 " int64_t snap_count;\n"
35368 " int64_t vg_seqno;\n"
35369 " char *vg_tags;\n"
35370 " int64_t vg_mda_count;\n"
35371 " uint64_t vg_mda_free;\n"
35377 #: ../src/guestfs-structs.pod:69
35380 " struct guestfs_lvm_vg_list {\n"
35381 " uint32_t len; /* Number of elements in list. */\n"
35382 " struct guestfs_lvm_vg *val; /* Elements. */\n"
35388 #: ../src/guestfs-structs.pod:74
35391 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
35392 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
35397 #: ../src/guestfs-structs.pod:77
35398 msgid "guestfs_lvm_lv"
35402 #: ../src/guestfs-structs.pod:79
35405 " struct guestfs_lvm_lv {\n"
35406 " char *lv_name;\n"
35407 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
35408 " char lv_uuid[32];\n"
35409 " char *lv_attr;\n"
35410 " int64_t lv_major;\n"
35411 " int64_t lv_minor;\n"
35412 " int64_t lv_kernel_major;\n"
35413 " int64_t lv_kernel_minor;\n"
35414 " uint64_t lv_size;\n"
35415 " int64_t seg_count;\n"
35417 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
35418 " float snap_percent;\n"
35419 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
35420 " float copy_percent;\n"
35421 " char *move_pv;\n"
35422 " char *lv_tags;\n"
35423 " char *mirror_log;\n"
35424 " char *modules;\n"
35430 #: ../src/guestfs-structs.pod:101
35433 " struct guestfs_lvm_lv_list {\n"
35434 " uint32_t len; /* Number of elements in list. */\n"
35435 " struct guestfs_lvm_lv *val; /* Elements. */\n"
35441 #: ../src/guestfs-structs.pod:106
35444 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
35445 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
35450 #: ../src/guestfs-structs.pod:111
35453 " struct guestfs_stat {\n"
35457 " int64_t nlink;\n"
35462 " int64_t blksize;\n"
35463 " int64_t blocks;\n"
35464 " int64_t atime;\n"
35465 " int64_t mtime;\n"
35466 " int64_t ctime;\n"
35472 #: ../src/guestfs-structs.pod:127
35475 " struct guestfs_stat_list {\n"
35476 " uint32_t len; /* Number of elements in list. */\n"
35477 " struct guestfs_stat *val; /* Elements. */\n"
35483 #: ../src/guestfs-structs.pod:132
35486 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
35487 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
35492 #: ../src/guestfs-structs.pod:137
35495 " struct guestfs_statvfs {\n"
35496 " int64_t bsize;\n"
35497 " int64_t frsize;\n"
35498 " int64_t blocks;\n"
35499 " int64_t bfree;\n"
35500 " int64_t bavail;\n"
35501 " int64_t files;\n"
35502 " int64_t ffree;\n"
35503 " int64_t favail;\n"
35506 " int64_t namemax;\n"
35512 #: ../src/guestfs-structs.pod:151
35515 " struct guestfs_statvfs_list {\n"
35516 " uint32_t len; /* Number of elements in list. */\n"
35517 " struct guestfs_statvfs *val; /* Elements. */\n"
35523 #: ../src/guestfs-structs.pod:156
35526 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
35527 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
35532 #: ../src/guestfs-structs.pod:159
35533 msgid "guestfs_dirent"
35537 #: ../src/guestfs-structs.pod:161
35540 " struct guestfs_dirent {\n"
35549 #: ../src/guestfs-structs.pod:167
35552 " struct guestfs_dirent_list {\n"
35553 " uint32_t len; /* Number of elements in list. */\n"
35554 " struct guestfs_dirent *val; /* Elements. */\n"
35560 #: ../src/guestfs-structs.pod:172
35563 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
35564 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
35569 #: ../src/guestfs-structs.pod:177
35572 " struct guestfs_version {\n"
35573 " int64_t major;\n"
35574 " int64_t minor;\n"
35575 " int64_t release;\n"
35582 #: ../src/guestfs-structs.pod:184
35585 " struct guestfs_version_list {\n"
35586 " uint32_t len; /* Number of elements in list. */\n"
35587 " struct guestfs_version *val; /* Elements. */\n"
35593 #: ../src/guestfs-structs.pod:189
35596 " void guestfs_free_version (struct guestfs_free_version *);\n"
35597 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
35602 #: ../src/guestfs-structs.pod:192
35603 msgid "guestfs_xattr"
35607 #: ../src/guestfs-structs.pod:194
35610 " struct guestfs_xattr {\n"
35611 " char *attrname;\n"
35612 " /* The next two fields describe a byte array. */\n"
35613 " uint32_t attrval_len;\n"
35614 " char *attrval;\n"
35620 #: ../src/guestfs-structs.pod:201
35623 " struct guestfs_xattr_list {\n"
35624 " uint32_t len; /* Number of elements in list. */\n"
35625 " struct guestfs_xattr *val; /* Elements. */\n"
35631 #: ../src/guestfs-structs.pod:206
35634 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
35635 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
35640 #: ../src/guestfs-structs.pod:209
35641 msgid "guestfs_inotify_event"
35645 #: ../src/guestfs-structs.pod:211
35648 " struct guestfs_inotify_event {\n"
35649 " int64_t in_wd;\n"
35650 " uint32_t in_mask;\n"
35651 " uint32_t in_cookie;\n"
35652 " char *in_name;\n"
35658 #: ../src/guestfs-structs.pod:218
35661 " struct guestfs_inotify_event_list {\n"
35662 " uint32_t len; /* Number of elements in list. */\n"
35663 " struct guestfs_inotify_event *val; /* Elements. */\n"
35669 #: ../src/guestfs-structs.pod:223
35672 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
35673 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
35678 #: ../src/guestfs-structs.pod:226
35679 msgid "guestfs_partition"
35683 #: ../src/guestfs-structs.pod:228
35686 " struct guestfs_partition {\n"
35687 " int32_t part_num;\n"
35688 " uint64_t part_start;\n"
35689 " uint64_t part_end;\n"
35690 " uint64_t part_size;\n"
35696 #: ../src/guestfs-structs.pod:235
35699 " struct guestfs_partition_list {\n"
35700 " uint32_t len; /* Number of elements in list. */\n"
35701 " struct guestfs_partition *val; /* Elements. */\n"
35707 #: ../src/guestfs-structs.pod:240
35710 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
35711 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
35716 #: ../src/guestfs-structs.pod:243
35717 msgid "guestfs_application"
35721 #: ../src/guestfs-structs.pod:245
35724 " struct guestfs_application {\n"
35725 " char *app_name;\n"
35726 " char *app_display_name;\n"
35727 " int32_t app_epoch;\n"
35728 " char *app_version;\n"
35729 " char *app_release;\n"
35730 " char *app_install_path;\n"
35731 " char *app_trans_path;\n"
35732 " char *app_publisher;\n"
35733 " char *app_url;\n"
35734 " char *app_source_package;\n"
35735 " char *app_summary;\n"
35736 " char *app_description;\n"
35742 #: ../src/guestfs-structs.pod:260
35745 " struct guestfs_application_list {\n"
35746 " uint32_t len; /* Number of elements in list. */\n"
35747 " struct guestfs_application *val; /* Elements. */\n"
35753 #: ../src/guestfs-structs.pod:265
35756 " void guestfs_free_application (struct guestfs_free_application *);\n"
35757 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
35762 #: ../src/guestfs.pod:5
35763 msgid "guestfs - Library for accessing and modifying virtual machine images"
35767 #: ../src/guestfs.pod:11
35770 " guestfs_h *g = guestfs_create ();\n"
35771 " guestfs_add_drive (g, \"guest.img\");\n"
35772 " guestfs_launch (g);\n"
35773 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
35774 " guestfs_touch (g, \"/hello\");\n"
35775 " guestfs_umount (g, \"/\");\n"
35776 " guestfs_close (g);\n"
35779 " guestfs_h *g = guestfs_create ();\n"
35780 " guestfs_add_drive (g, \"guest.img\");\n"
35781 " guestfs_launch (g);\n"
35782 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
35783 " guestfs_touch (g, \"/hello\");\n"
35784 " guestfs_umount (g, \"/\");\n"
35785 " guestfs_close (g);\n"
35789 #: ../src/guestfs.pod:25
35791 "Libguestfs is a library for accessing and modifying guest disk images. "
35792 "Amongst the things this is good for: making batch configuration changes to "
35793 "guests, getting disk used/free statistics (see also: virt-df), migrating "
35794 "between virtualization systems (see also: virt-p2v), performing partial "
35795 "backups, performing partial guest clones, cloning guests and changing "
35796 "registry/UUID/hostname info, and much else besides."
35800 #: ../src/guestfs.pod:33
35802 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
35803 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
35804 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
35809 #: ../src/guestfs.pod:38
35811 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
35812 "what filesystem is in each LV, etc.). It can also run commands in the "
35813 "context of the guest. Also you can access filesystems over FUSE."
35817 #: ../src/guestfs.pod:43
35819 "Libguestfs is a library that can be linked with C and C++ management "
35820 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
35821 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
35826 #: ../src/guestfs.pod:48
35828 "You don't need to be root to use libguestfs, although obviously you do need "
35829 "enough permissions to access the disk images."
35833 #: ../src/guestfs.pod:51
35835 "Libguestfs is a large API because it can do many things. For a gentle "
35836 "introduction, please read the L</API OVERVIEW> section next."
35840 #: ../src/guestfs.pod:54
35842 "There are also some example programs in the L<guestfs-examples(3)> manual "
35847 #: ../src/guestfs.pod:57
35848 msgid "API OVERVIEW"
35852 #: ../src/guestfs.pod:59
35854 "This section provides a gentler overview of the libguestfs API. We also try "
35855 "to group API calls together, where that may not be obvious from reading "
35856 "about the individual calls in the main section of this manual."
35860 #: ../src/guestfs.pod:64
35865 #: ../src/guestfs.pod:66
35867 "Before you can use libguestfs calls, you have to create a handle. Then you "
35868 "must add at least one disk image to the handle, followed by launching the "
35869 "handle, then performing whatever operations you want, and finally closing "
35870 "the handle. By convention we use the single letter C<g> for the name of the "
35871 "handle variable, although of course you can use any name you want."
35875 #: ../src/guestfs.pod:73
35876 msgid "The general structure of all libguestfs-using programs looks like this:"
35880 #: ../src/guestfs.pod:76
35883 " guestfs_h *g = guestfs_create ();\n"
35888 #: ../src/guestfs.pod:78
35891 " /* Call guestfs_add_drive additional times if there are\n"
35892 " * multiple disk images.\n"
35894 " guestfs_add_drive (g, \"guest.img\");\n"
35899 #: ../src/guestfs.pod:83
35902 " /* Most manipulation calls won't work until you've launched\n"
35903 " * the handle 'g'. You have to do this _after_ adding drives\n"
35904 " * and _before_ other commands.\n"
35906 " guestfs_launch (g);\n"
35911 #: ../src/guestfs.pod:89
35914 " /* Now you can examine what partitions, LVs etc are available.\n"
35916 " char **partitions = guestfs_list_partitions (g);\n"
35917 " char **logvols = guestfs_lvs (g);\n"
35922 #: ../src/guestfs.pod:94
35925 " /* To access a filesystem in the image, you must mount it.\n"
35927 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
35932 #: ../src/guestfs.pod:98
35935 " /* Now you can perform filesystem actions on the guest\n"
35938 " guestfs_touch (g, \"/hello\");\n"
35943 #: ../src/guestfs.pod:103
35946 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
35947 " * it is done automatically when you close the handle. See\n"
35948 " * discussion of autosync in this page.\n"
35950 " guestfs_sync (g);\n"
35955 #: ../src/guestfs.pod:109
35958 " /* Close the handle 'g'. */\n"
35959 " guestfs_close (g);\n"
35964 #: ../src/guestfs.pod:112
35966 "The code above doesn't include any error checking. In real code you should "
35967 "check return values carefully for errors. In general all functions that "
35968 "return integers return C<-1> on error, and all functions that return "
35969 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
35970 "how to handle errors, and consult the documentation for each function call "
35971 "below to see precisely how they return error indications. See L<guestfs-"
35972 "examples(3)> for fully worked examples."
35976 #: ../src/guestfs.pod:121
35977 msgid "DISK IMAGES"
35981 #: ../src/guestfs.pod:123
35983 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
35984 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
35985 "actual block device, or simply an empty file of zeroes that you have created "
35986 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
35991 #: ../src/guestfs.pod:129
35993 "The call you should use in modern code for adding drives is L</"
35994 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
35995 "specifying that the format is raw, do:"
35999 #: ../src/guestfs.pod:133
36002 " guestfs_add_drive_opts (g, filename,\n"
36003 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
36009 #: ../src/guestfs.pod:137
36010 msgid "You can add a disk read-only using:"
36014 #: ../src/guestfs.pod:139
36017 " guestfs_add_drive_opts (g, filename,\n"
36018 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
36019 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
36025 #: ../src/guestfs.pod:144
36027 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
36028 "libguestfs won't modify the file."
36032 #: ../src/guestfs.pod:147
36034 "Be extremely cautious if the disk image is in use, eg. if it is being used "
36035 "by a virtual machine. Adding it read-write will almost certainly cause disk "
36036 "corruption, but adding it read-only is safe."
36040 #: ../src/guestfs.pod:151
36042 "You must add at least one disk image, and you may add multiple disk images. "
36043 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
36044 "first one you added), C</dev/sdb> (for the second one you added), etc."
36048 #: ../src/guestfs.pod:156
36050 "Once L</guestfs_launch> has been called you cannot add any more images. You "
36051 "can call L</guestfs_list_devices> to get a list of the device names, in the "
36052 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
36056 #: ../src/guestfs.pod:161
36061 #: ../src/guestfs.pod:163
36063 "Before you can read or write files, create directories and so on in a disk "
36064 "image that contains filesystems, you have to mount those filesystems using "
36065 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
36066 "a disk image contains (for example) one partition with a filesystem on that "
36067 "partition, then you can mount it directly:"
36071 #: ../src/guestfs.pod:170
36074 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
36079 #: ../src/guestfs.pod:172
36081 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
36082 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
36083 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
36084 "that these are libguestfs virtual devices, and are nothing to do with host "
36089 #: ../src/guestfs.pod:178
36091 "If you are given a disk image and you don't know what it contains then you "
36092 "have to find out. Libguestfs can do that too: use L</"
36093 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
36094 "LVs, and either try mounting each to see what is mountable, or else examine "
36095 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
36096 "filesystems, use L</guestfs_list_filesystems>."
36100 #: ../src/guestfs.pod:186
36102 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
36103 "L</INSPECTION> below). But you might find it easier to look at higher level "
36104 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
36108 #: ../src/guestfs.pod:191
36110 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
36111 "several other variations of the C<guestfs_mount_*> call."
36115 #: ../src/guestfs.pod:194
36116 msgid "FILESYSTEM ACCESS AND MODIFICATION"
36120 #: ../src/guestfs.pod:196
36122 "The majority of the libguestfs API consists of fairly low-level calls for "
36123 "accessing and modifying the files, directories, symlinks etc on mounted "
36124 "filesystems. There are over a hundred such calls which you can find listed "
36125 "in detail below in this man page, and we don't even pretend to cover them "
36126 "all in this overview."
36130 #: ../src/guestfs.pod:202
36132 "Specify filenames as full paths, starting with C<\"/\"> and including the "
36137 #: ../src/guestfs.pod:205
36139 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
36140 "the file called C<\"etc/passwd\"> then you could do:"
36144 #: ../src/guestfs.pod:208
36147 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
36152 #: ../src/guestfs.pod:210
36154 "This would return C<data> as a newly allocated buffer containing the full "
36155 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
36156 "or C<NULL> if there was an error."
36160 #: ../src/guestfs.pod:214
36162 "As another example, to create a top-level directory on that filesystem "
36163 "called C<\"var\"> you would do:"
36167 #: ../src/guestfs.pod:217
36170 " guestfs_mkdir (g, \"/var\");\n"
36175 #: ../src/guestfs.pod:219
36176 msgid "To create a symlink you could do:"
36180 #: ../src/guestfs.pod:221
36183 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
36184 " \"/etc/rc3.d/S30portmap\");\n"
36189 #: ../src/guestfs.pod:224
36191 "Libguestfs will reject attempts to use relative paths and there is no "
36192 "concept of a current working directory."
36196 #: ../src/guestfs.pod:227
36198 "Libguestfs can return errors in many situations: for example if the "
36199 "filesystem isn't writable, or if a file or directory that you requested "
36200 "doesn't exist. If you are using the C API (documented here) you have to "
36201 "check for those error conditions after each call. (Other language bindings "
36202 "turn these errors into exceptions)."
36206 #: ../src/guestfs.pod:233
36208 "File writes are affected by the per-handle umask, set by calling L</"
36209 "guestfs_umask> and defaulting to 022. See L</UMASK>."
36213 #: ../src/guestfs.pod:236
36214 msgid "PARTITIONING"
36218 #: ../src/guestfs.pod:238
36220 "Libguestfs contains API calls to read, create and modify partition tables on "
36225 #: ../src/guestfs.pod:241
36227 "In the common case where you want to create a single partition covering the "
36228 "whole disk, you should use the L</guestfs_part_disk> call:"
36232 #: ../src/guestfs.pod:245
36235 " const char *parttype = \"mbr\";\n"
36236 " if (disk_is_larger_than_2TB)\n"
36237 " parttype = \"gpt\";\n"
36238 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
36243 #: ../src/guestfs.pod:250
36245 "Obviously this effectively wipes anything that was on that disk image before."
36249 #: ../src/guestfs.pod:253
36254 #: ../src/guestfs.pod:255
36256 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
36257 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
36258 "you familiarize yourself with the concepts of physical volumes, volume "
36259 "groups and logical volumes."
36263 #: ../src/guestfs.pod:260
36265 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
36266 "tldp.org/HOWTO/LVM-HOWTO/>."
36270 #: ../src/guestfs.pod:263
36271 msgid "DOWNLOADING"
36275 #: ../src/guestfs.pod:265
36277 "Use L</guestfs_cat> to download small, text only files. This call is "
36278 "limited to files which are less than 2 MB and which cannot contain any ASCII "
36279 "NUL (C<\\0>) characters. However the API is very simple to use."
36283 #: ../src/guestfs.pod:269
36285 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
36286 "bit data, since it returns a (pointer, size) pair. However it is still "
36287 "limited to \"small\" files, less than 2 MB."
36291 #: ../src/guestfs.pod:273
36293 "L</guestfs_download> can be used to download any file, with no limits on "
36294 "content or size (even files larger than 4 GB)."
36298 #: ../src/guestfs.pod:276
36300 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
36304 #: ../src/guestfs.pod:279
36309 #: ../src/guestfs.pod:281
36311 "It's often the case that you want to write a file or files to the disk image."
36315 #: ../src/guestfs.pod:284
36317 "To write a small file with fixed content, use L</guestfs_write>. To create "
36318 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
36319 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
36320 "of other functions for creating test files, for example L</guestfs_fill> and "
36321 "L</guestfs_fill_pattern>."
36325 #: ../src/guestfs.pod:290
36327 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
36328 "file content or size (even files larger than 4 GB)."
36332 #: ../src/guestfs.pod:293
36334 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
36338 #: ../src/guestfs.pod:295
36340 "However the fastest way to upload I<large numbers of arbitrary files> is to "
36341 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
36342 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
36343 "in a predictable way (eg. adding it last after all other drives) then you "
36344 "can get the device name from L</guestfs_list_devices> and mount it directly "
36345 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
36346 "portable between kernel versions, and they don't support labels or UUIDs. "
36347 "If you want to pre-build an image or you need to mount it using a label or "
36348 "UUID, use an ISO image instead."
36352 #: ../src/guestfs.pod:306
36357 #: ../src/guestfs.pod:308
36359 "There are various different commands for copying between files and devices "
36360 "and in and out of the guest filesystem. These are summarised in the table "
36365 #: ../src/guestfs.pod:314
36366 msgid "B<file> to B<file>"
36370 #: ../src/guestfs.pod:316
36372 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
36373 "directories recursively."
36377 #: ../src/guestfs.pod:319
36379 "To copy part of a file (offset and size) use L</guestfs_copy_file_to_file>."
36383 #: ../src/guestfs.pod:322
36384 msgid "B<file> to B<device>"
36388 #: ../src/guestfs.pod:324
36389 msgid "B<device> to B<file>"
36393 #: ../src/guestfs.pod:326
36394 msgid "B<device> to B<device>"
36398 #: ../src/guestfs.pod:328
36400 "Use L</guestfs_copy_file_to_device>, L</guestfs_copy_device_to_file>, or L</"
36401 "guestfs_copy_device_to_device>."
36405 #: ../src/guestfs.pod:331
36406 msgid "Example: duplicate the contents of an LV:"
36410 #: ../src/guestfs.pod:333
36413 " guestfs_copy_device_to_device (g,\n"
36414 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
36415 " /* -1 marks the end of the list of optional parameters */\n"
36421 #: ../src/guestfs.pod:338
36423 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
36424 "(C</dev/VG/Original>). To copy less than the whole source device, use the "
36425 "optional C<size> parameter:"
36429 #: ../src/guestfs.pod:342
36432 " guestfs_copy_device_to_device (g,\n"
36433 " \"/dev/VG/Original\", \"/dev/VG/Copy\",\n"
36434 " GUESTFS_COPY_DEVICE_TO_DEVICE_SIZE, 10000,\n"
36440 #: ../src/guestfs.pod:347
36441 msgid "B<file on the host> to B<file or device>"
36445 #: ../src/guestfs.pod:349
36446 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
36450 #: ../src/guestfs.pod:351
36451 msgid "B<file or device> to B<file on the host>"
36455 #: ../src/guestfs.pod:353
36456 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
36460 #: ../src/guestfs.pod:357
36461 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
36465 #: ../src/guestfs.pod:359
36467 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
36468 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
36469 "appears you can only upload and download to files. However many Un*x-like "
36470 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
36471 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
36472 "and arbitrary file descriptor N."
36476 #: ../src/guestfs.pod:367
36477 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
36481 #: ../src/guestfs.pod:370
36484 " guestfs_download (g, filename, \"/dev/stdout\");\n"
36489 #: ../src/guestfs.pod:372
36490 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
36494 #: ../src/guestfs.pod:374
36497 " char devfd[64];\n"
36498 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
36499 " guestfs_tar_out (g, \"/\", devfd);\n"
36504 #: ../src/guestfs.pod:378
36505 msgid "LISTING FILES"
36509 #: ../src/guestfs.pod:380
36511 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
36512 "L<guestfish(1)>-equivalent command C<ll>)."
36516 #: ../src/guestfs.pod:383
36518 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
36519 "programs, as a flat list of strings."
36523 #: ../src/guestfs.pod:386
36525 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
36526 "directory, plus additional information about each one. It is more "
36527 "equivalent to using the L<readdir(3)> call on a local filesystem."
36531 #: ../src/guestfs.pod:390
36533 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
36537 #: ../src/guestfs.pod:393
36538 msgid "RUNNING COMMANDS"
36542 #: ../src/guestfs.pod:395
36544 "Although libguestfs is primarily an API for manipulating files inside guest "
36545 "images, we also provide some limited facilities for running commands inside "
36550 #: ../src/guestfs.pod:399
36551 msgid "There are many limitations to this:"
36555 #: ../src/guestfs.pod:405
36557 "The kernel version that the command runs under will be different from what "
36562 #: ../src/guestfs.pod:410
36564 "If the command needs to communicate with daemons, then most likely they "
36565 "won't be running."
36569 #: ../src/guestfs.pod:415
36570 msgid "The command will be running in limited memory."
36574 #: ../src/guestfs.pod:419
36576 "The network may not be available unless you enable it (see L</"
36577 "guestfs_set_network>)."
36581 #: ../src/guestfs.pod:424
36582 msgid "Only supports Linux guests (not Windows, BSD, etc)."
36586 #: ../src/guestfs.pod:428
36588 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
36592 #: ../src/guestfs.pod:433
36594 "For SELinux guests, you may need to enable SELinux and load policy first. "
36595 "See L</SELINUX> in this manpage."
36599 #: ../src/guestfs.pod:438
36601 "I<Security:> It is not safe to run commands from untrusted, possibly "
36602 "malicious guests. These commands may attempt to exploit your program by "
36603 "sending unexpected output. They could also try to exploit the Linux kernel "
36604 "or qemu provided by the libguestfs appliance. They could use the network "
36605 "provided by the libguestfs appliance to bypass ordinary network partitions "
36606 "and firewalls. They could use the elevated privileges or different SELinux "
36607 "context of your program to their advantage."
36611 #: ../src/guestfs.pod:447
36613 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
36614 "(a script which runs when the guest next boots normally), and to have this "
36615 "script run the commands you want in the normal context of the running guest, "
36616 "network security and so on. For information about other security issues, "
36617 "see L</SECURITY>."
36621 #: ../src/guestfs.pod:455
36623 "The two main API calls to run commands are L</guestfs_command> and L</"
36624 "guestfs_sh> (there are also variations)."
36628 #: ../src/guestfs.pod:458
36630 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
36631 "shell globs, redirections, etc will work."
36635 #: ../src/guestfs.pod:461
36636 msgid "CONFIGURATION FILES"
36640 #: ../src/guestfs.pod:463
36642 "To read and write configuration files in Linux guest filesystems, we "
36643 "strongly recommend using Augeas. For example, Augeas understands how to "
36644 "read and write, say, a Linux shadow password file or X.org configuration "
36645 "file, and so avoids you having to write that code."
36649 #: ../src/guestfs.pod:468
36651 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
36652 "document Augeas itself here because there is excellent documentation on the "
36653 "L<http://augeas.net/> website."
36657 #: ../src/guestfs.pod:472
36659 "If you don't want to use Augeas (you fool!) then try calling L</"
36660 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
36665 #: ../src/guestfs.pod:476
36670 #: ../src/guestfs.pod:478
36672 "We support SELinux guests. To ensure that labeling happens correctly in "
36673 "SELinux guests, you need to enable SELinux and load the guest's policy:"
36677 #: ../src/guestfs.pod:486
36678 msgid "Before launching, do:"
36682 #: ../src/guestfs.pod:488
36685 " guestfs_set_selinux (g, 1);\n"
36690 #: ../src/guestfs.pod:492
36692 "After mounting the guest's filesystem(s), load the policy. This is best "
36693 "done by running the L<load_policy(8)> command in the guest itself:"
36697 #: ../src/guestfs.pod:496
36700 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
36705 #: ../src/guestfs.pod:498
36707 "(Older versions of C<load_policy> require you to specify the name of the "
36712 #: ../src/guestfs.pod:503
36714 "Optionally, set the security context for the API. The correct security "
36715 "context to use can only be known by inspecting the guest. As an example:"
36719 #: ../src/guestfs.pod:507
36722 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
36727 #: ../src/guestfs.pod:511
36728 msgid "This will work for running commands and editing existing files."
36732 #: ../src/guestfs.pod:513
36734 "When new files are created, you may need to label them explicitly, for "
36735 "example by running the external command C<restorecon pathname>."
36739 #: ../src/guestfs.pod:517
36744 #: ../src/guestfs.pod:519
36746 "Certain calls are affected by the current file mode creation mask (the "
36747 "\"umask\"). In particular ones which create files or directories, such as "
36748 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
36749 "either the default mode that the file is created with or modifies the mode "
36754 #: ../src/guestfs.pod:525
36756 "The default umask is C<022>, so files are created with modes such as C<0644> "
36757 "and directories with C<0755>."
36761 #: ../src/guestfs.pod:528
36763 "There are two ways to avoid being affected by umask. Either set umask to 0 "
36764 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
36765 "guestfs_chmod> after creating each file or directory."
36769 #: ../src/guestfs.pod:532
36770 msgid "For more information about umask, see L<umask(2)>."
36774 #: ../src/guestfs.pod:536
36776 "Libguestfs allows you to access Linux guests which have been encrypted using "
36777 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
36778 "standard. This includes nearly all whole disk encryption systems used by "
36779 "modern Linux guests."
36783 #: ../src/guestfs.pod:542
36785 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
36786 "returns the string C<crypto_LUKS>)."
36790 #: ../src/guestfs.pod:545
36792 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
36793 "will require the passphrase!"
36797 #: ../src/guestfs.pod:548
36799 "Opening a LUKS device creates a new device mapper device called C</dev/"
36800 "mapper/mapname> (where C<mapname> is the string you supply to L</"
36801 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
36802 "from and encrypted to the underlying block device respectively."
36806 #: ../src/guestfs.pod:554
36808 "LVM volume groups on the device can be made visible by calling L</"
36809 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
36810 "(s) can now be mounted in the usual way."
36814 #: ../src/guestfs.pod:558
36816 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
36817 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
36818 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
36819 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
36820 "underlying encrypted block device)."
36824 #: ../src/guestfs.pod:565
36829 #: ../src/guestfs.pod:567
36831 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
36832 "contains operating systems, an install CD or a live CD. (These APIs used to "
36833 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
36834 "version 1.5.3 the most frequently used part of this library has been "
36835 "rewritten in C and moved into the core code)."
36839 #: ../src/guestfs.pod:574
36841 "Add all disks belonging to the unknown virtual machine and call L</"
36842 "guestfs_launch> in the usual way."
36846 #: ../src/guestfs.pod:577
36848 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
36849 "and certain heuristics, and returns a list of operating systems that were "
36850 "found. An empty list means none were found. A single element is the root "
36851 "filesystem of the operating system. For dual- or multi-boot guests, "
36852 "multiple roots can be returned, each one corresponding to a separate "
36853 "operating system. (Multi-boot virtual machines are extremely rare in the "
36854 "world of virtualization, but since this scenario can happen, we have built "
36855 "libguestfs to deal with it.)"
36859 #: ../src/guestfs.pod:586
36861 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
36862 "to get additional details about that operating system. For example, call L</"
36863 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
36864 "Windows and Linux-based operating systems respectively."
36868 #: ../src/guestfs.pod:592
36870 "Un*x-like and Linux-based operating systems usually consist of several "
36871 "filesystems which are mounted at boot time (for example, a separate boot "
36872 "partition mounted on C</boot>). The inspection rules are able to detect how "
36873 "filesystems correspond to mount points. Call "
36874 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
36875 "hash table like this example:"
36879 #: ../src/guestfs.pod:599
36882 " /boot => /dev/sda1\n"
36883 " / => /dev/vg_guest/lv_root\n"
36884 " /usr => /dev/vg_guest/lv_usr\n"
36889 #: ../src/guestfs.pod:603
36891 "The caller can then make calls to L</guestfs_mount_options> to mount the "
36892 "filesystems as suggested."
36896 #: ../src/guestfs.pod:606
36898 "Be careful to mount filesystems in the right order (eg. C</> before C</"
36899 "usr>). Sorting the keys of the hash by length, shortest first, should work."
36903 #: ../src/guestfs.pod:610
36905 "Inspection currently only works for some common operating systems. "
36906 "Contributors are welcome to send patches for other operating systems that we "
36907 "currently cannot detect."
36911 #: ../src/guestfs.pod:614
36913 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
36914 "for more details. The L</guestfs_inspect_os> function just ignores any "
36915 "encrypted devices."
36919 #: ../src/guestfs.pod:618
36921 "A note on the implementation: The call L</guestfs_inspect_os> performs "
36922 "inspection and caches the results in the guest handle. Subsequent calls to "
36923 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
36924 "read the disks. If you change the content of the guest disks, you can redo "
36925 "inspection by calling L</guestfs_inspect_os> again. (L</"
36926 "guestfs_inspect_list_applications> works a little differently from the other "
36927 "calls and does read the disks. See documentation for that function for "
36932 #: ../src/guestfs.pod:627
36933 msgid "INSPECTING INSTALL DISKS"
36937 #: ../src/guestfs.pod:629
36939 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
36944 #: ../src/guestfs.pod:632
36946 "Call L</guestfs_inspect_get_format> to return the format of the operating "
36947 "system, which currently can be C<installed> (a regular operating system) or "
36948 "C<installer> (some sort of install disk)."
36952 #: ../src/guestfs.pod:636
36954 "Further information is available about the operating system that can be "
36955 "installed using the regular inspection APIs like L</"
36956 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
36960 #: ../src/guestfs.pod:641
36962 "Some additional information specific to installer disks is also available "
36963 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
36964 "guestfs_inspect_is_multipart> calls."
36968 #: ../src/guestfs.pod:646
36969 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
36973 #: ../src/guestfs.pod:648
36975 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
36976 "ntfs-3g.org/> driver."
36980 #: ../src/guestfs.pod:651
36981 msgid "DRIVE LETTERS AND PATHS"
36985 #: ../src/guestfs.pod:653
36987 "DOS and Windows still use drive letters, and the filesystems are always "
36988 "treated as case insensitive by Windows itself, and therefore you might find "
36989 "a Windows configuration file referring to a path like C<c:\\windows"
36990 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
36991 "might be referred to as C</WINDOWS/System32>."
36995 #: ../src/guestfs.pod:659
36997 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
36998 "L</guestfs_inspect_get_drive_mappings>)"
37002 #: ../src/guestfs.pod:662
37004 "Dealing with separator characters (backslash vs forward slash) is outside "
37005 "the scope of libguestfs, but usually a simple character replacement will "
37010 #: ../src/guestfs.pod:666
37012 "To resolve the case insensitivity of paths, call L</"
37013 "guestfs_case_sensitive_path>."
37017 #: ../src/guestfs.pod:669
37018 msgid "ACCESSING THE WINDOWS REGISTRY"
37022 #: ../src/guestfs.pod:671
37024 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
37025 "files, through the library C<hivex> which is part of the libguestfs project "
37026 "although ships as a separate tarball. You have to locate and download the "
37027 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
37028 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
37029 "reg(1)> for more help on this issue."
37033 #: ../src/guestfs.pod:679
37034 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
37038 #: ../src/guestfs.pod:681
37040 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
37041 "provide something which looks like a Linux symlink. The way it tries to do "
37042 "the rewriting is described here:"
37046 #: ../src/guestfs.pod:685
37048 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
37053 #: ../src/guestfs.pod:687
37055 "The essential problem is that ntfs-3g simply does not have enough "
37056 "information to do a correct job. NTFS links can contain drive letters and "
37057 "references to external device GUIDs that ntfs-3g has no way of resolving. "
37058 "It is almost certainly the case that libguestfs callers should ignore what "
37059 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
37063 #: ../src/guestfs.pod:694
37065 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
37066 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
37067 "attribute, and read the raw reparse data from that (you can find the format "
37068 "documented in various places around the web)."
37072 #: ../src/guestfs.pod:699
37073 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
37077 #: ../src/guestfs.pod:701
37079 "There are other useful extended attributes that can be read from ntfs-3g "
37080 "filesystems (using L</guestfs_getxattr>). See:"
37084 #: ../src/guestfs.pod:704
37086 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
37090 #: ../src/guestfs.pod:706
37091 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
37095 #: ../src/guestfs.pod:708
37097 "Although we don't want to discourage you from using the C API, we will "
37098 "mention here that the same API is also available in other languages."
37102 #: ../src/guestfs.pod:711
37104 "The API is broadly identical in all supported languages. This means that "
37105 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
37106 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
37107 "OCaml. In other words, a straightforward, predictable isomorphism between "
37112 #: ../src/guestfs.pod:717
37114 "Error messages are automatically transformed into exceptions if the language "
37119 #: ../src/guestfs.pod:720
37121 "We don't try to \"object orientify\" parts of the API in OO languages, "
37122 "although contributors are welcome to write higher level APIs above what we "
37123 "provide in their favourite languages if they wish."
37127 #: ../src/guestfs.pod:726
37132 #: ../src/guestfs.pod:728
37134 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
37135 "identical to the C API. C++ classes and exceptions are not used."
37139 #: ../src/guestfs.pod:732
37144 #: ../src/guestfs.pod:734
37146 "The C# bindings are highly experimental. Please read the warnings at the "
37147 "top of C<csharp/Libguestfs.cs>."
37151 #: ../src/guestfs.pod:737
37156 #: ../src/guestfs.pod:739
37157 msgid "See L<guestfs-erlang(3)>."
37161 #: ../src/guestfs.pod:741
37166 #: ../src/guestfs.pod:743
37168 "This is the only language binding that is working but incomplete. Only "
37169 "calls which return simple integers have been bound in Haskell, and we are "
37170 "looking for help to complete this binding."
37174 #: ../src/guestfs.pod:747
37179 #: ../src/guestfs.pod:749
37181 "Full documentation is contained in the Javadoc which is distributed with "
37182 "libguestfs. For examples, see L<guestfs-java(3)>."
37186 #: ../src/guestfs.pod:752
37191 #: ../src/guestfs.pod:754
37192 msgid "See L<guestfs-ocaml(3)>."
37196 #: ../src/guestfs.pod:756
37201 #: ../src/guestfs.pod:758
37202 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
37206 #: ../src/guestfs.pod:760
37211 #: ../src/guestfs.pod:762
37213 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
37214 "the php-libguestfs package for your distribution."
37218 #: ../src/guestfs.pod:765
37219 msgid "The PHP binding only works correctly on 64 bit machines."
37223 #: ../src/guestfs.pod:767
37228 #: ../src/guestfs.pod:769
37229 msgid "See L<guestfs-python(3)>."
37233 #: ../src/guestfs.pod:771
37238 #: ../src/guestfs.pod:773
37239 msgid "See L<guestfs-ruby(3)>."
37243 #: ../src/guestfs.pod:775
37244 msgid "B<shell scripts>"
37248 #: ../src/guestfs.pod:777
37249 msgid "See L<guestfish(1)>."
37253 #: ../src/guestfs.pod:781
37254 msgid "LIBGUESTFS GOTCHAS"
37258 #: ../src/guestfs.pod:783
37260 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
37261 "system [...] that works in the way it is documented but is counterintuitive "
37262 "and almost invites mistakes.\""
37266 #: ../src/guestfs.pod:787
37268 "Since we developed libguestfs and the associated tools, there are several "
37269 "things we would have designed differently, but are now stuck with for "
37270 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
37271 "release, you can expect these to change. Beware of them."
37275 #: ../src/guestfs.pod:795
37276 msgid "Autosync / forgetting to sync."
37280 #: ../src/guestfs.pod:797
37282 "I<Update:> Autosync is enabled by default for all API users starting from "
37283 "libguestfs 1.5.24. This section only applies to older versions."
37287 #: ../src/guestfs.pod:800
37289 "When modifying a filesystem from C or another language, you B<must> unmount "
37290 "all filesystems and call L</guestfs_sync> explicitly before you close the "
37291 "libguestfs handle. You can also call:"
37295 #: ../src/guestfs.pod:804
37298 " guestfs_set_autosync (g, 1);\n"
37303 #: ../src/guestfs.pod:806
37305 "to have the unmount/sync done automatically for you when the handle 'g' is "
37306 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
37310 #: ../src/guestfs.pod:810
37312 "If you forget to do this, then it is entirely possible that your changes "
37313 "won't be written out, or will be partially written, or (very rarely) that "
37314 "you'll get disk corruption."
37318 #: ../src/guestfs.pod:814
37320 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
37321 "guestfish scripts that forget to sync will work just fine, which can make "
37322 "this very puzzling if you are trying to debug a problem."
37326 #: ../src/guestfs.pod:818
37327 msgid "Mount option C<-o sync> should not be the default."
37331 #: ../src/guestfs.pod:820
37333 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
37334 "libguestfs 1.13.16. This section only applies to older versions."
37338 #: ../src/guestfs.pod:823
37340 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
37341 "However C<-o sync> does not add any reliability benefit, but does have a "
37342 "very large performance impact."
37346 #: ../src/guestfs.pod:827
37348 "The work around is to use L</guestfs_mount_options> and set the mount "
37349 "options that you actually want to use."
37353 #: ../src/guestfs.pod:830
37354 msgid "Read-only should be the default."
37358 #: ../src/guestfs.pod:832
37360 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
37361 "specify I<--rw> if you want to make changes to the image."
37365 #: ../src/guestfs.pod:835
37366 msgid "This would reduce the potential to corrupt live VM images."
37370 #: ../src/guestfs.pod:837
37372 "Note that many filesystems change the disk when you just mount and unmount, "
37373 "even if you didn't perform any writes. You need to use L</"
37374 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
37378 #: ../src/guestfs.pod:841
37379 msgid "guestfish command line is hard to use."
37383 #: ../src/guestfs.pod:843
37385 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
37386 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
37387 "exist, so it fails. In earlier versions of guestfish the error message was "
37388 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
37389 "we should have used C<guestfish -c command> to run commands."
37393 #: ../src/guestfs.pod:850
37394 msgid "guestfish megabyte modifiers don't work right on all commands"
37398 #: ../src/guestfs.pod:852
37400 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
37401 "other modifiers). What guestfish actually does is to multiply the number "
37402 "part by the modifier part and pass the result to the C API. However this "
37403 "doesn't work for a few APIs which aren't expecting bytes, but are already "
37404 "expecting some other unit (eg. megabytes)."
37408 #: ../src/guestfs.pod:859
37409 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
37413 #: ../src/guestfs.pod:861
37416 " lvcreate LV VG 100M\n"
37421 #: ../src/guestfs.pod:863
37423 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
37424 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
37425 "megabytes * megabytes) logical volume. The error message you get from this "
37426 "is also a little obscure."
37430 #: ../src/guestfs.pod:868
37432 "This could be fixed in the generator by specially marking parameters and "
37433 "return values which take bytes or other units."
37437 #: ../src/guestfs.pod:871
37438 msgid "Ambiguity between devices and paths"
37442 #: ../src/guestfs.pod:873
37444 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
37445 "sdb2>) and a similar pathname. A file might just happen to be called "
37446 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
37450 #: ../src/guestfs.pod:878
37452 "In the current API we usually resolve this ambiguity by having two separate "
37453 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
37454 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
37455 "detecting if the path supplied begins with C</dev/>."
37459 #: ../src/guestfs.pod:884
37461 "To avoid both the ambiguity and the need to duplicate some calls, we could "
37462 "make paths/devices into structured names. One way to do this would be to "
37463 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
37464 "aspect of grub. Another way would be to use a structured type, equivalent "
37465 "to this OCaml type:"
37469 #: ../src/guestfs.pod:890
37472 " type path = Path of string | Device of int | Partition of int * int\n"
37477 #: ../src/guestfs.pod:892
37478 msgid "which would allow you to pass arguments like:"
37482 #: ../src/guestfs.pod:894
37485 " Path \"/foo/bar\"\n"
37486 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
37487 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
37488 " Path \"/dev/sdb2\" (* not a device *)\n"
37493 #: ../src/guestfs.pod:899
37495 "As you can see there are still problems to resolve even with this "
37496 "representation. Also consider how it might work in guestfish."
37500 #: ../src/guestfs.pod:904
37501 msgid "KEYS AND PASSPHRASES"
37505 #: ../src/guestfs.pod:906
37507 "Certain libguestfs calls take a parameter that contains sensitive key "
37508 "material, passed in as a C string."
37512 #: ../src/guestfs.pod:909
37514 "In the future we would hope to change the libguestfs implementation so that "
37515 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
37516 "swap. However this is I<not> done at the moment, because of the complexity "
37517 "of such an implementation."
37521 #: ../src/guestfs.pod:914
37523 "Therefore you should be aware that any key parameter you pass to libguestfs "
37524 "might end up being written out to the swap partition. If this is a concern, "
37525 "scrub the swap partition or don't use libguestfs on encrypted devices."
37529 #: ../src/guestfs.pod:919
37530 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
37534 #: ../src/guestfs.pod:921
37536 "All high-level libguestfs actions are synchronous. If you want to use "
37537 "libguestfs asynchronously then you must create a thread."
37541 #: ../src/guestfs.pod:924
37543 "Only use the handle from a single thread. Either use the handle exclusively "
37544 "from one thread, or provide your own mutex so that two threads cannot issue "
37545 "calls on the same handle at the same time."
37549 #: ../src/guestfs.pod:928
37551 "See the graphical program guestfs-browser for one possible architecture for "
37552 "multithreaded programs using libvirt and libguestfs."
37556 #: ../src/guestfs.pod:931
37561 #: ../src/guestfs.pod:933
37563 "Libguestfs needs a supermin appliance, which it finds by looking along an "
37568 #: ../src/guestfs.pod:936
37570 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
37571 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
37575 #: ../src/guestfs.pod:939
37577 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
37578 "to change the directories that libguestfs will search in. The value is a "
37579 "colon-separated list of paths. The current directory is I<not> searched "
37580 "unless the path contains an empty element or C<.>. For example "
37581 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
37582 "then C</usr/lib/guestfs>."
37586 #: ../src/guestfs.pod:946
37587 msgid "QEMU WRAPPERS"
37591 #: ../src/guestfs.pod:948
37593 "If you want to compile your own qemu, run qemu from a non-standard location, "
37594 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
37599 #: ../src/guestfs.pod:952
37601 "There is one important rule to remember: you I<must C<exec qemu>> as the "
37602 "last command in the shell script (so that qemu replaces the shell and "
37603 "becomes the direct child of the libguestfs-using program). If you don't do "
37604 "this, then the qemu process won't be cleaned up correctly."
37608 #: ../src/guestfs.pod:957
37610 "Here is an example of a wrapper, where I have built my own copy of qemu from "
37615 #: ../src/guestfs.pod:960
37619 " qemudir=/home/rjones/d/qemu\n"
37620 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
37625 #: ../src/guestfs.pod:964
37627 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
37628 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
37633 #: ../src/guestfs.pod:968
37636 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
37641 #: ../src/guestfs.pod:970
37643 "Note that libguestfs also calls qemu with the -help and -version options in "
37644 "order to determine features."
37648 #: ../src/guestfs.pod:973
37650 "Wrappers can also be used to edit the options passed to qemu. In the "
37651 "following example, the C<-machine ...> option (C<-machine> and the following "
37652 "argument) are removed from the command line and replaced with C<-machine pc,"
37653 "accel=tcg>. The while loop iterates over the options until it finds the "
37654 "right one to remove, putting the remaining options into the C<args> array."
37658 #: ../src/guestfs.pod:982
37662 " while [ $# -gt 0 ]; do\n"
37663 " case \"$1\" in\n"
37667 " args[i]=\"$1\"\n"
37676 #: ../src/guestfs.pod:994
37679 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
37684 #: ../src/guestfs.pod:996
37685 msgid "ATTACHING TO RUNNING DAEMONS"
37689 #: ../src/guestfs.pod:998
37691 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
37692 "babies. Use with caution."
37696 #: ../src/guestfs.pod:1001
37698 "I<Note (2):> This section explains how to attach to a running daemon from a "
37699 "low level perspective. For most users, simply using virt tools such as "
37700 "L<guestfish(1)> with the I<--live> option will \"just work\"."
37704 #: ../src/guestfs.pod:1005
37705 msgid "Using guestfs_set_attach_method"
37709 #: ../src/guestfs.pod:1007
37711 "By calling L</guestfs_set_attach_method> you can change how the library "
37712 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
37713 "ARCHITECTURE> for some background)."
37717 #: ../src/guestfs.pod:1011
37719 "The normal attach method is C<appliance>, where a small appliance is created "
37720 "containing the daemon, and then the library connects to this."
37724 #: ../src/guestfs.pod:1014
37726 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
37727 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
37728 "daemon over the Unix domain socket."
37732 #: ../src/guestfs.pod:1018
37734 "The normal use for this is to connect to a running virtual machine that "
37735 "contains a C<guestfsd> daemon, and send commands so you can read and write "
37736 "files inside the live virtual machine."
37740 #: ../src/guestfs.pod:1022
37741 msgid "Using guestfs_add_domain with live flag"
37745 #: ../src/guestfs.pod:1024
37747 "L</guestfs_add_domain> provides some help for getting the correct attach "
37748 "method. If you pass the C<live> option to this function, then (if the "
37749 "virtual machine is running) it will examine the libvirt XML looking for a "
37750 "virtio-serial channel to connect to:"
37754 #: ../src/guestfs.pod:1030
37761 " <channel type='unix'>\n"
37762 " <source mode='bind' path='/path/to/socket'/>\n"
37763 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
37772 #: ../src/guestfs.pod:1042
37774 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
37775 "method to C<unix:/path/to/socket>."
37779 #: ../src/guestfs.pod:1045
37781 "Some of the libguestfs tools (including guestfish) support a I<--live> "
37782 "option which is passed through to L</guestfs_add_domain> thus allowing you "
37783 "to attach to and modify live virtual machines."
37787 #: ../src/guestfs.pod:1049
37789 "The virtual machine needs to have been set up beforehand so that it has the "
37790 "virtio-serial channel and so that guestfsd is running inside it."
37794 #: ../src/guestfs.pod:1053
37795 msgid "ABI GUARANTEE"
37799 #: ../src/guestfs.pod:1055
37801 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
37802 "actions as outlined in this section. Although we will deprecate some "
37803 "actions, for example if they get replaced by newer calls, we will keep the "
37804 "old actions forever. This allows you the developer to program in confidence "
37805 "against the libguestfs API."
37809 #: ../src/guestfs.pod:1061
37810 msgid "BLOCK DEVICE NAMING"
37814 #: ../src/guestfs.pod:1063
37816 "In the kernel there is now quite a profusion of schemata for naming block "
37817 "devices (in this context, by I<block device> I mean a physical or virtual "
37818 "hard drive). The original Linux IDE driver used names starting with C</dev/"
37819 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
37820 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
37821 "for the old IDE driver (particularly for SATA devices) those devices also "
37822 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
37823 "paravirtualized drivers. This has created several different naming systems, "
37824 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
37828 #: ../src/guestfs.pod:1075
37830 "As discussed above, libguestfs uses a qemu appliance running an embedded "
37831 "Linux kernel to access block devices. We can run a variety of appliances "
37832 "based on a variety of Linux kernels."
37836 #: ../src/guestfs.pod:1079
37838 "This causes a problem for libguestfs because many API calls use device or "
37839 "partition names. Working scripts and the recipe (example) scripts that we "
37840 "make available over the internet could fail if the naming scheme changes."
37844 #: ../src/guestfs.pod:1084
37846 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
37847 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
37848 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
37849 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
37853 #: ../src/guestfs.pod:1090
37855 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
37856 "L</guestfs_list_partitions> and similar calls return the true names of the "
37857 "devices and partitions as known to the appliance."
37861 #: ../src/guestfs.pod:1095
37862 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
37866 #: ../src/guestfs.pod:1097
37868 "Usually this translation is transparent. However in some (very rare) cases "
37869 "you may need to know the exact algorithm. Such cases include where you use "
37870 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
37871 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
37875 #: ../src/guestfs.pod:1103
37877 "The algorithm is applied only to I<parameters> which are known to be either "
37878 "device or partition names. Return values from functions such as L</"
37879 "guestfs_list_devices> are never changed."
37883 #: ../src/guestfs.pod:1111
37884 msgid "Is the string a parameter which is a device or partition name?"
37888 #: ../src/guestfs.pod:1115
37889 msgid "Does the string begin with C</dev/sd>?"
37893 #: ../src/guestfs.pod:1119
37895 "Does the named device exist? If so, we use that device. However if I<not> "
37896 "then we continue with this algorithm."
37900 #: ../src/guestfs.pod:1124
37901 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
37905 #: ../src/guestfs.pod:1126
37906 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
37910 #: ../src/guestfs.pod:1128
37911 msgid "If that named device exists, use it. If not, continue."
37915 #: ../src/guestfs.pod:1132
37916 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
37920 #: ../src/guestfs.pod:1134
37921 msgid "If that named device exists, use it. If not, return an error."
37925 #: ../src/guestfs.pod:1138
37926 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
37930 #: ../src/guestfs.pod:1140
37932 "Although the standard naming scheme and automatic translation is useful for "
37933 "simple programs and guestfish scripts, for larger programs it is best not to "
37934 "rely on this mechanism."
37938 #: ../src/guestfs.pod:1144
37940 "Where possible for maximum future portability programs using libguestfs "
37941 "should use these future-proof techniques:"
37945 #: ../src/guestfs.pod:1151
37947 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
37948 "device names, and then use those names directly."
37952 #: ../src/guestfs.pod:1154
37954 "Since those device names exist by definition, they will never be translated."
37958 #: ../src/guestfs.pod:1159
37960 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
37961 "filesystem labels."
37965 #: ../src/guestfs.pod:1166
37967 "This section discusses security implications of using libguestfs, "
37968 "particularly with untrusted or malicious guests or disk images."
37972 #: ../src/guestfs.pod:1169
37973 msgid "GENERAL SECURITY CONSIDERATIONS"
37977 #: ../src/guestfs.pod:1171
37979 "Be careful with any files or data that you download from a guest (by "
37980 "\"download\" we mean not just the L</guestfs_download> command but any "
37981 "command that reads files, filenames, directories or anything else from a "
37982 "disk image). An attacker could manipulate the data to fool your program "
37983 "into doing the wrong thing. Consider cases such as:"
37987 #: ../src/guestfs.pod:1181
37988 msgid "the data (file etc) not being present"
37992 #: ../src/guestfs.pod:1185
37993 msgid "being present but empty"
37997 #: ../src/guestfs.pod:1189
37998 msgid "being much larger than normal"
38002 #: ../src/guestfs.pod:1193
38003 msgid "containing arbitrary 8 bit data"
38007 #: ../src/guestfs.pod:1197
38008 msgid "being in an unexpected character encoding"
38012 #: ../src/guestfs.pod:1201
38013 msgid "containing homoglyphs."
38017 #: ../src/guestfs.pod:1205
38018 msgid "SECURITY OF MOUNTING FILESYSTEMS"
38022 #: ../src/guestfs.pod:1207
38024 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
38025 "(VFS) module can sometimes be escalated into exploits by deliberately "
38026 "creating a malicious, malformed filesystem. These exploits are very severe "
38027 "for two reasons. Firstly there are very many filesystem drivers in the "
38028 "kernel, and many of them are infrequently used and not much developer "
38029 "attention has been paid to the code. Linux userspace helps potential "
38030 "crackers by detecting the filesystem type and automatically choosing the "
38031 "right VFS driver, even if that filesystem type is obscure or unexpected for "
38032 "the administrator. Secondly, a kernel-level exploit is like a local root "
38033 "exploit (worse in some ways), giving immediate and total access to the "
38034 "system right down to the hardware level."
38038 #: ../src/guestfs.pod:1220
38040 "That explains why you should never mount a filesystem from an untrusted "
38041 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
38042 "inside a qemu virtual machine, usually running as a non-root user. The "
38043 "attacker would need to write a filesystem which first exploited the kernel, "
38044 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
38045 "the libguestfs protocol, and finally to be as serious as the host kernel "
38046 "exploit it would need to escalate its privileges to root. This multi-step "
38047 "escalation, performed by a static piece of data, is thought to be extremely "
38048 "hard to do, although we never say 'never' about security issues."
38052 #: ../src/guestfs.pod:1231
38054 "In any case callers can reduce the attack surface by forcing the filesystem "
38055 "type when mounting (use L</guestfs_mount_vfs>)."
38059 #: ../src/guestfs.pod:1234
38060 msgid "PROTOCOL SECURITY"
38064 #: ../src/guestfs.pod:1236
38066 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
38067 "defined upper message size. However a program that uses libguestfs must "
38068 "also take care - for example you can write a program that downloads a binary "
38069 "from a disk image and executes it locally, and no amount of protocol "
38070 "security will save you from the consequences."
38074 #: ../src/guestfs.pod:1242
38075 msgid "INSPECTION SECURITY"
38079 #: ../src/guestfs.pod:1244
38081 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
38082 "directly from the guest, and these could contain any 8 bit data. Callers "
38083 "should be careful to escape these before printing them to a structured file "
38084 "(for example, use HTML escaping if creating a web page)."
38088 #: ../src/guestfs.pod:1250
38090 "Guest configuration may be altered in unusual ways by the administrator of "
38091 "the virtual machine, and may not reflect reality (particularly for untrusted "
38092 "or actively malicious guests). For example we parse the hostname from "
38093 "configuration files like C</etc/sysconfig/network> that we find in the "
38094 "guest, but the guest administrator can easily manipulate these files to "
38095 "provide the wrong hostname."
38099 #: ../src/guestfs.pod:1258
38101 "The inspection API parses guest configuration using two external libraries: "
38102 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
38103 "designed to be robust in the face of malicious data, although denial of "
38104 "service attacks are still possible, for example with oversized configuration "
38109 #: ../src/guestfs.pod:1264
38110 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
38114 #: ../src/guestfs.pod:1266
38116 "Be very cautious about running commands from the guest. By running a "
38117 "command in the guest, you are giving CPU time to a binary that you do not "
38118 "control, under the same user account as the library, albeit wrapped in qemu "
38119 "virtualization. More information and alternatives can be found in the "
38120 "section L</RUNNING COMMANDS>."
38124 #: ../src/guestfs.pod:1272
38125 msgid "CVE-2010-3851"
38129 #: ../src/guestfs.pod:1274
38130 msgid "https://bugzilla.redhat.com/642934"
38134 #: ../src/guestfs.pod:1276
38136 "This security bug concerns the automatic disk format detection that qemu "
38137 "does on disk images."
38141 #: ../src/guestfs.pod:1279
38143 "A raw disk image is just the raw bytes, there is no header. Other disk "
38144 "images like qcow2 contain a special header. Qemu deals with this by looking "
38145 "for one of the known headers, and if none is found then assuming the disk "
38146 "image must be raw."
38150 #: ../src/guestfs.pod:1284
38152 "This allows a guest which has been given a raw disk image to write some "
38153 "other header. At next boot (or when the disk image is accessed by "
38154 "libguestfs) qemu would do autodetection and think the disk image format was, "
38155 "say, qcow2 based on the header written by the guest."
38159 #: ../src/guestfs.pod:1289
38161 "This in itself would not be a problem, but qcow2 offers many features, one "
38162 "of which is to allow a disk image to refer to another image (called the "
38163 "\"backing disk\"). It does this by placing the path to the backing disk "
38164 "into the qcow2 header. This path is not validated and could point to any "
38165 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
38166 "\"holes\" in the qcow2 disk image, which of course is completely under the "
38167 "control of the attacker."
38171 #: ../src/guestfs.pod:1297
38173 "In libguestfs this is rather hard to exploit except under two circumstances:"
38177 #: ../src/guestfs.pod:1304
38178 msgid "You have enabled the network or have opened the disk in write mode."
38182 #: ../src/guestfs.pod:1308
38184 "You are also running untrusted code from the guest (see L</RUNNING "
38189 #: ../src/guestfs.pod:1313
38191 "The way to avoid this is to specify the expected disk format when adding "
38192 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
38193 "should always do this if the disk is raw format, and it's a good idea for "
38198 #: ../src/guestfs.pod:1318
38200 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
38201 "format is fetched from libvirt and passed through."
38205 #: ../src/guestfs.pod:1321
38207 "For libguestfs tools, use the I<--format> command line parameter as "
38212 #: ../src/guestfs.pod:1324
38213 msgid "CONNECTION MANAGEMENT"
38217 #: ../src/guestfs.pod:1326
38218 msgid "guestfs_h *"
38222 #: ../src/guestfs.pod:1328
38224 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
38225 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
38226 "handle and release all resources used."
38230 #: ../src/guestfs.pod:1332
38232 "For information on using multiple handles and threads, see the section L</"
38233 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
38237 #: ../src/guestfs.pod:1335
38238 msgid "guestfs_create"
38242 #: ../src/guestfs.pod:1337
38245 " guestfs_h *guestfs_create (void);\n"
38250 #: ../src/guestfs.pod:1339
38251 msgid "Create a connection handle."
38255 #: ../src/guestfs.pod:1341
38257 "On success this returns a non-NULL pointer to a handle. On error it returns "
38262 #: ../src/guestfs.pod:1344
38264 "You have to \"configure\" the handle after creating it. This includes "
38265 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
38266 "handle at least once."
38270 #: ../src/guestfs.pod:1348
38271 msgid "After configuring the handle, you have to call L</guestfs_launch>."
38275 #: ../src/guestfs.pod:1350
38277 "You may also want to configure error handling for the handle. See the L</"
38278 "ERROR HANDLING> section below."
38282 #: ../src/guestfs.pod:1353
38283 msgid "guestfs_close"
38287 #: ../src/guestfs.pod:1355
38290 " void guestfs_close (guestfs_h *g);\n"
38295 #: ../src/guestfs.pod:1357
38296 msgid "This closes the connection handle and frees up all resources used."
38300 #: ../src/guestfs.pod:1359
38302 "If autosync was set on the handle and the handle was launched, then this "
38303 "implicitly calls various functions to unmount filesystems and sync the "
38304 "disk. See L</guestfs_set_autosync> for more details."
38308 #: ../src/guestfs.pod:1363
38309 msgid "If a close callback was set on the handle, then it is called."
38313 #: ../src/guestfs.pod:1365
38314 msgid "ERROR HANDLING"
38318 #: ../src/guestfs.pod:1367
38320 "API functions can return errors. For example, almost all functions that "
38321 "return C<int> will return C<-1> to indicate an error."
38325 #: ../src/guestfs.pod:1370
38327 "Additional information is available for errors: an error message string and "
38328 "optionally an error number (errno) if the thing that failed was a system "
38333 #: ../src/guestfs.pod:1374
38335 "You can get at the additional information about the last error on the handle "
38336 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
38337 "up an error handler with L</guestfs_set_error_handler>."
38341 #: ../src/guestfs.pod:1379
38343 "When the handle is created, a default error handler is installed which "
38344 "prints the error message string to C<stderr>. For small short-running "
38345 "command line programs it is sufficient to do:"
38349 #: ../src/guestfs.pod:1383
38352 " if (guestfs_launch (g) == -1)\n"
38353 " exit (EXIT_FAILURE);\n"
38358 #: ../src/guestfs.pod:1386
38360 "since the default error handler will ensure that an error message has been "
38361 "printed to C<stderr> before the program exits."
38365 #: ../src/guestfs.pod:1389
38367 "For other programs the caller will almost certainly want to install an "
38368 "alternate error handler or do error handling in-line like this:"
38372 #: ../src/guestfs.pod:1392
38375 " /* This disables the default behaviour of printing errors\n"
38377 " guestfs_set_error_handler (g, NULL, NULL);\n"
38382 #: ../src/guestfs.pod:1396
38385 " if (guestfs_launch (g) == -1) {\n"
38386 " /* Examine the error message and print it etc. */\n"
38387 " char *msg = guestfs_last_error (g);\n"
38388 " int errnum = guestfs_last_errno (g);\n"
38389 " fprintf (stderr, \"%s\", msg);\n"
38390 " if (errnum != 0)\n"
38391 " fprintf (stderr, \": %s\", strerror (errnum));\n"
38392 " fprintf (stderr, \"\\n\");\n"
38399 #: ../src/guestfs.pod:1407
38401 "Out of memory errors are handled differently. The default action is to call "
38402 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
38403 "guestfs_set_out_of_memory_handler>."
38407 #: ../src/guestfs.pod:1411
38409 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
38410 "because there is no handle if this happens there is no way to get additional "
38411 "error information. However L</guestfs_create> is supposed to be a "
38412 "lightweight operation which can only fail because of insufficient memory (it "
38413 "returns NULL in this case)."
38417 #: ../src/guestfs.pod:1417
38418 msgid "guestfs_last_error"
38422 #: ../src/guestfs.pod:1419
38425 " const char *guestfs_last_error (guestfs_h *g);\n"
38430 #: ../src/guestfs.pod:1421
38432 "This returns the last error message that happened on C<g>. If there has not "
38433 "been an error since the handle was created, then this returns C<NULL>."
38437 #: ../src/guestfs.pod:1425
38439 "The lifetime of the returned string is until the next error occurs, or L</"
38440 "guestfs_close> is called."
38444 #: ../src/guestfs.pod:1428
38445 msgid "guestfs_last_errno"
38449 #: ../src/guestfs.pod:1430
38452 " int guestfs_last_errno (guestfs_h *g);\n"
38457 #: ../src/guestfs.pod:1432
38458 msgid "This returns the last error number (errno) that happened on C<g>."
38462 #: ../src/guestfs.pod:1434
38463 msgid "If successful, an errno integer not equal to zero is returned."
38467 #: ../src/guestfs.pod:1436
38469 "If no error, this returns 0. This call can return 0 in three situations:"
38473 #: ../src/guestfs.pod:1443
38474 msgid "There has not been any error on the handle."
38478 #: ../src/guestfs.pod:1447
38480 "There has been an error but the errno was meaningless. This corresponds to "
38481 "the case where the error did not come from a failed system call, but for "
38482 "some other reason."
38486 #: ../src/guestfs.pod:1453
38488 "There was an error from a failed system call, but for some reason the errno "
38489 "was not captured and returned. This usually indicates a bug in libguestfs."
38493 #: ../src/guestfs.pod:1459
38495 "Libguestfs tries to convert the errno from inside the applicance into a "
38496 "corresponding errno for the caller (not entirely trivial: the appliance "
38497 "might be running a completely different operating system from the library "
38498 "and error numbers are not standardized across Un*xen). If this could not be "
38499 "done, then the error is translated to C<EINVAL>. In practice this should "
38500 "only happen in very rare circumstances."
38504 #: ../src/guestfs.pod:1467
38505 msgid "guestfs_set_error_handler"
38509 #: ../src/guestfs.pod:1469
38512 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
38514 " const char *msg);\n"
38515 " void guestfs_set_error_handler (guestfs_h *g,\n"
38516 " guestfs_error_handler_cb cb,\n"
38517 " void *opaque);\n"
38522 #: ../src/guestfs.pod:1476
38524 "The callback C<cb> will be called if there is an error. The parameters "
38525 "passed to the callback are an opaque data pointer and the error message "
38530 #: ../src/guestfs.pod:1480
38532 "C<errno> is not passed to the callback. To get that the callback must call "
38533 "L</guestfs_last_errno>."
38537 #: ../src/guestfs.pod:1483
38539 "Note that the message string C<msg> is freed as soon as the callback "
38540 "function returns, so if you want to stash it somewhere you must make your "
38545 #: ../src/guestfs.pod:1487
38546 msgid "The default handler prints messages on C<stderr>."
38550 #: ../src/guestfs.pod:1489
38551 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
38555 #: ../src/guestfs.pod:1491
38556 msgid "guestfs_get_error_handler"
38560 #: ../src/guestfs.pod:1493
38563 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
38564 " void **opaque_rtn);\n"
38569 #: ../src/guestfs.pod:1496
38570 msgid "Returns the current error handler callback."
38574 #: ../src/guestfs.pod:1498
38575 msgid "guestfs_set_out_of_memory_handler"
38579 #: ../src/guestfs.pod:1500
38582 " typedef void (*guestfs_abort_cb) (void);\n"
38583 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
38584 " guestfs_abort_cb);\n"
38589 #: ../src/guestfs.pod:1504
38591 "The callback C<cb> will be called if there is an out of memory situation. "
38592 "I<Note this callback must not return>."
38596 #: ../src/guestfs.pod:1507
38597 msgid "The default is to call L<abort(3)>."
38601 #: ../src/guestfs.pod:1509
38603 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
38607 #: ../src/guestfs.pod:1512
38608 msgid "guestfs_get_out_of_memory_handler"
38612 #: ../src/guestfs.pod:1514
38615 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
38620 #: ../src/guestfs.pod:1516
38621 msgid "This returns the current out of memory handler."
38625 #: ../src/guestfs.pod:1518
38630 #: ../src/guestfs.pod:1522
38635 #: ../src/guestfs.pod:1524
38640 #: ../src/guestfs.pod:1526
38641 msgid "AVAILABILITY"
38645 #: ../src/guestfs.pod:1528
38646 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
38650 #: ../src/guestfs.pod:1530
38652 "Using L</guestfs_available> you can test availability of the following "
38653 "groups of functions. This test queries the appliance to see if the "
38654 "appliance you are currently using supports the functionality."
38658 #: ../src/guestfs.pod:1535
38659 msgid "@AVAILABILITY@"
38663 #: ../src/guestfs.pod:1537
38664 msgid "GUESTFISH supported COMMAND"
38668 #: ../src/guestfs.pod:1539
38670 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
38671 "prints out the available groups and whether they are supported by this build "
38672 "of libguestfs. Note however that you have to do C<run> first."
38676 #: ../src/guestfs.pod:1544
38677 msgid "SINGLE CALLS AT COMPILE TIME"
38681 #: ../src/guestfs.pod:1546
38683 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
38684 "function, such as:"
38688 #: ../src/guestfs.pod:1549
38691 " #define LIBGUESTFS_HAVE_DD 1\n"
38696 #: ../src/guestfs.pod:1551
38697 msgid "if L</guestfs_dd> is available."
38701 #: ../src/guestfs.pod:1553
38703 "Before version 1.5.8, if you needed to test whether a single libguestfs "
38704 "function is available at compile time, we recommended using build tools such "
38705 "as autoconf or cmake. For example in autotools you could use:"
38709 #: ../src/guestfs.pod:1558
38712 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
38713 " AC_CHECK_FUNCS([guestfs_dd])\n"
38718 #: ../src/guestfs.pod:1561
38720 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
38725 #: ../src/guestfs.pod:1564
38726 msgid "SINGLE CALLS AT RUN TIME"
38730 #: ../src/guestfs.pod:1566
38732 "Testing at compile time doesn't guarantee that a function really exists in "
38733 "the library. The reason is that you might be dynamically linked against a "
38734 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
38735 "This situation unfortunately results in a segmentation fault, which is a "
38736 "shortcoming of the C dynamic linking system itself."
38740 #: ../src/guestfs.pod:1573
38742 "You can use L<dlopen(3)> to test if a function is available at run time, as "
38743 "in this example program (note that you still need the compile time check as "
38748 #: ../src/guestfs.pod:1577
38751 " #include <stdio.h>\n"
38752 " #include <stdlib.h>\n"
38753 " #include <unistd.h>\n"
38754 " #include <dlfcn.h>\n"
38755 " #include <guestfs.h>\n"
38760 #: ../src/guestfs.pod:1583
38765 " #ifdef LIBGUESTFS_HAVE_DD\n"
38767 " int has_function;\n"
38772 #: ../src/guestfs.pod:1589
38775 " /* Test if the function guestfs_dd is really available. */\n"
38776 " dl = dlopen (NULL, RTLD_LAZY);\n"
38778 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
38779 " exit (EXIT_FAILURE);\n"
38781 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
38787 #: ../src/guestfs.pod:1598
38790 " if (!has_function)\n"
38791 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
38793 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
38794 " /* Now it's safe to call\n"
38795 " guestfs_dd (g, \"foo\", \"bar\");\n"
38799 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
38806 #: ../src/guestfs.pod:1611
38808 "You may think the above is an awful lot of hassle, and it is. There are "
38809 "other ways outside of the C linking system to ensure that this kind of "
38810 "incompatibility never arises, such as using package versioning:"
38814 #: ../src/guestfs.pod:1616
38817 " Requires: libguestfs >= 1.0.80\n"
38822 #: ../src/guestfs.pod:1618
38823 msgid "CALLS WITH OPTIONAL ARGUMENTS"
38827 #: ../src/guestfs.pod:1620
38829 "A recent feature of the API is the introduction of calls which take optional "
38830 "arguments. In C these are declared 3 ways. The main way is as a call which "
38831 "takes variable arguments (ie. C<...>), as in this example:"
38835 #: ../src/guestfs.pod:1625
38838 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
38843 #: ../src/guestfs.pod:1627
38845 "Call this with a list of optional arguments, terminated by C<-1>. So to "
38846 "call with no optional arguments specified:"
38850 #: ../src/guestfs.pod:1630
38853 " guestfs_add_drive_opts (g, filename, -1);\n"
38858 #: ../src/guestfs.pod:1632
38859 msgid "With a single optional argument:"
38863 #: ../src/guestfs.pod:1634
38866 " guestfs_add_drive_opts (g, filename,\n"
38867 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
38873 #: ../src/guestfs.pod:1638
38878 #: ../src/guestfs.pod:1640
38881 " guestfs_add_drive_opts (g, filename,\n"
38882 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
38883 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
38889 #: ../src/guestfs.pod:1645
38891 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
38896 #: ../src/guestfs.pod:1648
38897 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
38901 #: ../src/guestfs.pod:1650
38903 "The second variant has the same name with the suffix C<_va>, which works the "
38904 "same way but takes a C<va_list>. See the C manual for details. For the "
38905 "example function, this is declared:"
38909 #: ../src/guestfs.pod:1654
38912 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
38913 " va_list args);\n"
38918 #: ../src/guestfs.pod:1657
38919 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
38923 #: ../src/guestfs.pod:1659
38925 "The third variant is useful where you need to construct these calls. You "
38926 "pass in a structure where you fill in the optional fields. The structure "
38927 "has a bitmask as the first element which you must set to indicate which "
38928 "fields you have filled in. For our example function the structure and call "
38933 #: ../src/guestfs.pod:1665
38936 " struct guestfs_add_drive_opts_argv {\n"
38937 " uint64_t bitmask;\n"
38939 " const char *format;\n"
38942 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
38943 " const struct guestfs_add_drive_opts_argv *optargs);\n"
38948 #: ../src/guestfs.pod:1674
38949 msgid "You could call it like this:"
38953 #: ../src/guestfs.pod:1676
38956 " struct guestfs_add_drive_opts_argv optargs = {\n"
38957 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
38958 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
38959 " .readonly = 1,\n"
38960 " .format = \"qcow2\"\n"
38966 #: ../src/guestfs.pod:1683
38969 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
38974 #: ../src/guestfs.pod:1691
38975 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
38979 #: ../src/guestfs.pod:1696
38980 msgid "You do not need to fill in all fields of the structure."
38984 #: ../src/guestfs.pod:1700
38986 "There must be a one-to-one correspondence between fields of the structure "
38987 "that are filled in, and bits set in the bitmask."
38991 #: ../src/guestfs.pod:1705
38992 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
38996 #: ../src/guestfs.pod:1707
38998 "In other languages, optional arguments are expressed in the way that is "
38999 "natural for that language. We refer you to the language-specific "
39000 "documentation for more details on that."
39004 #: ../src/guestfs.pod:1711
39005 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
39009 #: ../src/guestfs.pod:1713
39010 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
39014 #: ../src/guestfs.pod:1715
39016 "B<Note:> This section documents the generic event mechanism introduced in "
39017 "libguestfs 1.10, which you should use in new code if possible. The old "
39018 "functions C<guestfs_set_log_message_callback>, "
39019 "C<guestfs_set_subprocess_quit_callback>, "
39020 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
39021 "C<guestfs_set_progress_callback> are no longer documented in this manual "
39022 "page. Because of the ABI guarantee, the old functions continue to work."
39026 #: ../src/guestfs.pod:1724
39028 "Handles generate events when certain things happen, such as log messages "
39029 "being generated, progress messages during long-running operations, or the "
39030 "handle being closed. The API calls described below let you register a "
39031 "callback to be called when events happen. You can register multiple "
39032 "callbacks (for the same, different or overlapping sets of events), and "
39033 "individually remove callbacks. If callbacks are not removed, then they "
39034 "remain in force until the handle is closed."
39038 #: ../src/guestfs.pod:1732
39040 "In the current implementation, events are only generated synchronously: that "
39041 "means that events (and hence callbacks) can only happen while you are in the "
39042 "middle of making another libguestfs call. The callback is called in the "
39047 #: ../src/guestfs.pod:1737
39049 "Events may contain a payload, usually nothing (void), an array of 64 bit "
39050 "unsigned integers, or a message buffer. Payloads are discussed later on."
39054 #: ../src/guestfs.pod:1741
39055 msgid "CLASSES OF EVENTS"
39059 #: ../src/guestfs.pod:1745
39060 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
39064 #: ../src/guestfs.pod:1748
39066 "The callback function will be called while the handle is being closed "
39067 "(synchronously from L</guestfs_close>)."
39071 #: ../src/guestfs.pod:1751
39073 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
39074 "handles that are open when the program exits. This means that this callback "
39075 "might be called indirectly from L<exit(3)>, which can cause unexpected "
39076 "problems in higher-level languages (eg. if your HLL interpreter has already "
39077 "been cleaned up by the time this is called, and if your callback then jumps "
39078 "into some HLL function)."
39082 #: ../src/guestfs.pod:1758
39084 "If no callback is registered: the handle is closed without any callback "
39089 #: ../src/guestfs.pod:1761
39090 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
39094 #: ../src/guestfs.pod:1764
39096 "The callback function will be called when the child process quits, either "
39097 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
39098 "corresponds to a transition from any state to the CONFIG state)."
39102 #: ../src/guestfs.pod:1768 ../src/guestfs.pod:1777 ../src/guestfs.pod:1894
39103 msgid "If no callback is registered: the event is ignored."
39107 #: ../src/guestfs.pod:1770
39108 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
39112 #: ../src/guestfs.pod:1773
39114 "The callback function will be called when the child process becomes ready "
39115 "first time after it has been launched. (This corresponds to a transition "
39116 "from LAUNCHING to the READY state)."
39120 #: ../src/guestfs.pod:1779
39121 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
39125 #: ../src/guestfs.pod:1782
39127 "Some long-running operations can generate progress messages. If this "
39128 "callback is registered, then it will be called each time a progress message "
39129 "is generated (usually two seconds after the operation started, and three "
39130 "times per second thereafter until it completes, although the frequency may "
39131 "change in future versions)."
39135 #: ../src/guestfs.pod:1788
39137 "The callback receives in the payload four unsigned 64 bit numbers which are "
39138 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
39142 #: ../src/guestfs.pod:1791
39144 "The units of C<total> are not defined, although for some operations C<total> "
39145 "may relate in some way to the amount of data to be transferred (eg. in bytes "
39146 "or megabytes), and C<position> may be the portion which has been transferred."
39150 #: ../src/guestfs.pod:1796
39151 msgid "The only defined and stable parts of the API are:"
39155 #: ../src/guestfs.pod:1802
39157 "The callback can display to the user some type of progress bar or indicator "
39158 "which shows the ratio of C<position>:C<total>."
39162 #: ../src/guestfs.pod:1807
39163 msgid "0 E<lt>= C<position> E<lt>= C<total>"
39167 #: ../src/guestfs.pod:1811
39169 "If any progress notification is sent during a call, then a final progress "
39170 "notification is always sent when C<position> = C<total> (I<unless> the call "
39171 "fails with an error)."
39175 #: ../src/guestfs.pod:1815
39177 "This is to simplify caller code, so callers can easily set the progress "
39178 "indicator to \"100%\" at the end of the operation, without requiring special "
39179 "code to detect this case."
39183 #: ../src/guestfs.pod:1821
39185 "For some calls we are unable to estimate the progress of the call, but we "
39186 "can still generate progress messages to indicate activity. This is known as "
39187 "\"pulse mode\", and is directly supported by certain progress bar "
39188 "implementations (eg. GtkProgressBar)."
39192 #: ../src/guestfs.pod:1826
39194 "For these calls, zero or more progress messages are generated with "
39195 "C<position = 0> and C<total = 1>, followed by a final message with "
39196 "C<position = total = 1>."
39200 #: ../src/guestfs.pod:1830
39202 "As noted above, if the call fails with an error then the final message may "
39203 "not be generated."
39207 #: ../src/guestfs.pod:1835
39209 "The callback also receives the procedure number (C<proc_nr>) and serial "
39210 "number (C<serial>) of the call. These are only useful for debugging "
39211 "protocol issues, and the callback can normally ignore them. The callback "
39212 "may want to print these numbers in error messages or debugging messages."
39216 #: ../src/guestfs.pod:1841
39217 msgid "If no callback is registered: progress messages are discarded."
39221 #: ../src/guestfs.pod:1843
39222 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
39226 #: ../src/guestfs.pod:1846
39228 "The callback function is called whenever a log message is generated by qemu, "
39229 "the appliance kernel, guestfsd (daemon), or utility programs."
39233 #: ../src/guestfs.pod:1849
39235 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
39236 "guestfs_launch>) then additional debug messages are generated."
39240 #: ../src/guestfs.pod:1852 ../src/guestfs.pod:1866
39242 "If no callback is registered: the messages are discarded unless the verbose "
39243 "flag is set in which case they are sent to stderr. You can override the "
39244 "printing of verbose messages to stderr by setting up a callback."
39248 #: ../src/guestfs.pod:1857
39249 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
39253 #: ../src/guestfs.pod:1860
39255 "The callback function is called whenever a log message is generated by the "
39256 "library part of libguestfs."
39260 #: ../src/guestfs.pod:1863
39262 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
39263 "messages are generated."
39267 #: ../src/guestfs.pod:1871
39268 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
39272 #: ../src/guestfs.pod:1874
39274 "The callback function is called whenever a trace message is generated. This "
39275 "only applies if the trace flag (L</guestfs_set_trace>) is set."
39279 #: ../src/guestfs.pod:1877
39281 "If no callback is registered: the messages are sent to stderr. You can "
39282 "override the printing of trace messages to stderr by setting up a callback."
39286 #: ../src/guestfs.pod:1881
39287 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
39291 #: ../src/guestfs.pod:1884
39293 "The callback function is called whenever a libguestfs function is entered."
39297 #: ../src/guestfs.pod:1887
39299 "The payload is a string which contains the name of the function that we are "
39300 "entering (not including C<guestfs_> prefix)."
39304 #: ../src/guestfs.pod:1890
39306 "Note that libguestfs functions can call themselves, so you may see many "
39307 "events from a single call. A few libguestfs functions do not generate this "
39312 #: ../src/guestfs.pod:1898
39313 msgid "guestfs_set_event_callback"
39317 #: ../src/guestfs.pod:1900
39320 " int guestfs_set_event_callback (guestfs_h *g,\n"
39321 " guestfs_event_callback cb,\n"
39322 " uint64_t event_bitmask,\n"
39324 " void *opaque);\n"
39329 #: ../src/guestfs.pod:1906
39331 "This function registers a callback (C<cb>) for all event classes in the "
39332 "C<event_bitmask>."
39336 #: ../src/guestfs.pod:1909
39338 "For example, to register for all log message events, you could call this "
39339 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
39340 "To register a single callback for all possible classes of events, use "
39341 "C<GUESTFS_EVENT_ALL>."
39345 #: ../src/guestfs.pod:1915
39346 msgid "C<flags> should always be passed as 0."
39350 #: ../src/guestfs.pod:1917
39352 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
39353 "it for any purpose."
39357 #: ../src/guestfs.pod:1920
39359 "The return value is the event handle (an integer) which you can use to "
39360 "delete the callback (see below)."
39364 #: ../src/guestfs.pod:1923
39366 "If there is an error, this function returns C<-1>, and sets the error in the "
39367 "handle in the usual way (see L</guestfs_last_error> etc.)"
39371 #: ../src/guestfs.pod:1926
39373 "Callbacks remain in effect until they are deleted, or until the handle is "
39378 #: ../src/guestfs.pod:1929
39380 "In the case where multiple callbacks are registered for a particular event "
39381 "class, all of the callbacks are called. The order in which multiple "
39382 "callbacks are called is not defined."
39386 #: ../src/guestfs.pod:1933
39387 msgid "guestfs_delete_event_callback"
39391 #: ../src/guestfs.pod:1935
39394 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
39399 #: ../src/guestfs.pod:1937
39401 "Delete a callback that was previously registered. C<event_handle> should be "
39402 "the integer that was returned by a previous call to "
39403 "C<guestfs_set_event_callback> on the same handle."
39407 #: ../src/guestfs.pod:1941
39408 msgid "guestfs_event_callback"
39412 #: ../src/guestfs.pod:1943
39415 " typedef void (*guestfs_event_callback) (\n"
39418 " uint64_t event,\n"
39419 " int event_handle,\n"
39421 " const char *buf, size_t buf_len,\n"
39422 " const uint64_t *array, size_t array_len);\n"
39427 #: ../src/guestfs.pod:1952
39429 "This is the type of the event callback function that you have to provide."
39433 #: ../src/guestfs.pod:1955
39435 "The basic parameters are: the handle (C<g>), the opaque user pointer "
39436 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
39437 "handle, and C<flags> which in the current API you should ignore."
39441 #: ../src/guestfs.pod:1959
39443 "The remaining parameters contain the event payload (if any). Each event may "
39444 "contain a payload, which usually relates to the event class, but for future "
39445 "proofing your code should be written to handle any payload for any event "
39450 #: ../src/guestfs.pod:1964
39452 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
39453 "there is no message buffer). Note that this message buffer can contain "
39454 "arbitrary 8 bit data, including NUL bytes."
39458 #: ../src/guestfs.pod:1968
39460 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
39461 "moment this is only used for progress messages."
39465 #: ../src/guestfs.pod:1971
39466 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
39470 #: ../src/guestfs.pod:1973
39472 "One motivation for the generic event API was to allow GUI programs to "
39473 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
39474 "unconditionally to C<stderr>."
39478 #: ../src/guestfs.pod:1977
39480 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
39481 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
39482 "messages are not events; you must capture error messages separately)."
39486 #: ../src/guestfs.pod:1982
39488 "Programs have to set up a callback to capture the classes of events of "
39493 #: ../src/guestfs.pod:1985
39497 " guestfs_set_event_callback\n"
39498 " (g, message_callback,\n"
39499 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
39500 " GUESTFS_EVENT_TRACE,\n"
39501 " 0, NULL) == -1)\n"
39502 " if (eh == -1) {\n"
39503 " // handle error in the usual way\n"
39509 #: ../src/guestfs.pod:1995
39511 "The callback can then direct messages to the appropriate place. In this "
39512 "example, messages are directed to syslog:"
39516 #: ../src/guestfs.pod:1998
39520 " message_callback (\n"
39523 " uint64_t event,\n"
39524 " int event_handle,\n"
39526 " const char *buf, size_t buf_len,\n"
39527 " const uint64_t *array, size_t array_len)\n"
39529 " const int priority = LOG_USER|LOG_INFO;\n"
39530 " if (buf_len > 0)\n"
39531 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
39537 #: ../src/guestfs.pod:2013
39538 msgid "CANCELLING LONG TRANSFERS"
39542 #: ../src/guestfs.pod:2015
39544 "Some operations can be cancelled by the caller while they are in progress. "
39545 "Currently only operations that involve uploading or downloading data can be "
39546 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
39547 "parameters in the generator)."
39551 #: ../src/guestfs.pod:2020
39552 msgid "guestfs_user_cancel"
39556 #: ../src/guestfs.pod:2022
39559 " void guestfs_user_cancel (guestfs_h *g);\n"
39564 #: ../src/guestfs.pod:2024
39566 "C<guestfs_user_cancel> cancels the current upload or download operation."
39570 #: ../src/guestfs.pod:2027
39572 "Unlike most other libguestfs calls, this function is signal safe and thread "
39573 "safe. You can call it from a signal handler or from another thread, without "
39574 "needing to do any locking."
39578 #: ../src/guestfs.pod:2031
39580 "The transfer that was in progress (if there is one) will stop shortly "
39581 "afterwards, and will return an error. The errno (see L</"
39582 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
39583 "out if the operation was cancelled or failed because of another error."
39587 #: ../src/guestfs.pod:2037
39589 "No cleanup is performed: for example, if a file was being uploaded then "
39590 "after cancellation there may be a partially uploaded file. It is the "
39591 "caller's responsibility to clean up if necessary."
39595 #: ../src/guestfs.pod:2041
39596 msgid "There are two common places that you might call C<guestfs_user_cancel>."
39600 #: ../src/guestfs.pod:2043
39602 "In an interactive text-based program, you might call it from a C<SIGINT> "
39603 "signal handler so that pressing C<^C> cancels the current operation. (You "
39604 "also need to call L</guestfs_set_pgroup> so that child processes don't "
39605 "receive the C<^C> signal)."
39609 #: ../src/guestfs.pod:2048
39611 "In a graphical program, when the main thread is displaying a progress bar "
39612 "with a cancel button, wire up the cancel button to call this function."
39616 #: ../src/guestfs.pod:2052
39617 msgid "PRIVATE DATA AREA"
39621 #: ../src/guestfs.pod:2054
39623 "You can attach named pieces of private data to the libguestfs handle, fetch "
39624 "them by name, and walk over them, for the lifetime of the handle. This is "
39625 "called the private data area and is only available from the C API."
39629 #: ../src/guestfs.pod:2059
39630 msgid "To attach a named piece of data, use the following call:"
39634 #: ../src/guestfs.pod:2061
39637 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
39642 #: ../src/guestfs.pod:2063
39644 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
39645 "pointer (which can be C<NULL>). Any previous item with the same key is "
39650 #: ../src/guestfs.pod:2067
39652 "You can use any C<key> you want, but your key should I<not> start with an "
39653 "underscore character. Keys beginning with an underscore character are "
39654 "reserved for internal libguestfs purposes (eg. for implementing language "
39655 "bindings). It is recommended that you prefix the key with some unique "
39656 "string to avoid collisions with other users."
39660 #: ../src/guestfs.pod:2073
39661 msgid "To retrieve the pointer, use:"
39665 #: ../src/guestfs.pod:2075
39668 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
39673 #: ../src/guestfs.pod:2077
39675 "This function returns C<NULL> if either no data is found associated with "
39676 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
39681 #: ../src/guestfs.pod:2081
39683 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
39684 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
39685 "all. In particular, libguestfs does I<not> try to free the data when the "
39686 "handle is closed. If the data must be freed, then the caller must either "
39687 "free it before calling L</guestfs_close> or must set up a close callback to "
39688 "do it (see L</GUESTFS_EVENT_CLOSE>)."
39692 #: ../src/guestfs.pod:2088
39693 msgid "To walk over all entries, use these two functions:"
39697 #: ../src/guestfs.pod:2090
39700 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
39705 #: ../src/guestfs.pod:2092
39708 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
39713 #: ../src/guestfs.pod:2094
39715 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
39716 "not have any particular meaning -- keys are not returned in any defined "
39717 "order). A pointer to the key is returned in C<*key_rtn> and the "
39718 "corresponding data pointer is returned from the function. C<NULL> is "
39719 "returned if there are no keys stored in the handle."
39723 #: ../src/guestfs.pod:2100
39725 "C<guestfs_next_private> returns the next key, pointer pair. The return "
39726 "value of this function is also C<NULL> is there are no further entries to "
39731 #: ../src/guestfs.pod:2104
39732 msgid "Notes about walking over entries:"
39736 #: ../src/guestfs.pod:2110
39738 "You must not call C<guestfs_set_private> while walking over the entries."
39742 #: ../src/guestfs.pod:2115
39744 "The handle maintains an internal iterator which is reset when you call "
39745 "C<guestfs_first_private>. This internal iterator is invalidated when you "
39746 "call C<guestfs_set_private>."
39750 #: ../src/guestfs.pod:2121
39751 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
39755 #: ../src/guestfs.pod:2123
39758 " guestfs_set_private (g, key, NULL);\n"
39763 #: ../src/guestfs.pod:2125
39764 msgid "then that C<key> is not returned when walking."
39768 #: ../src/guestfs.pod:2129
39770 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
39771 "C<guestfs_next_private> or C<guestfs_set_private>."
39775 #: ../src/guestfs.pod:2135
39777 "The following example code shows how to print all keys and data pointers "
39778 "that are associated with the handle C<g>:"
39782 #: ../src/guestfs.pod:2138
39785 " const char *key;\n"
39786 " void *data = guestfs_first_private (g, &key);\n"
39787 " while (data != NULL)\n"
39789 " printf (\"key = %s, data = %p\\n\", key, data);\n"
39790 " data = guestfs_next_private (g, &key);\n"
39796 #: ../src/guestfs.pod:2146
39798 "More commonly you are only interested in keys that begin with an application-"
39799 "specific prefix C<foo_>. Modify the loop like so:"
39803 #: ../src/guestfs.pod:2149
39806 " const char *key;\n"
39807 " void *data = guestfs_first_private (g, &key);\n"
39808 " while (data != NULL)\n"
39810 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
39811 " printf (\"key = %s, data = %p\\n\", key, data);\n"
39812 " data = guestfs_next_private (g, &key);\n"
39818 #: ../src/guestfs.pod:2158
39820 "If you need to modify keys while walking, then you have to jump back to the "
39821 "beginning of the loop. For example, to delete all keys prefixed with "
39826 #: ../src/guestfs.pod:2162
39829 " const char *key;\n"
39832 " data = guestfs_first_private (g, &key);\n"
39833 " while (data != NULL)\n"
39835 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
39837 " guestfs_set_private (g, key, NULL);\n"
39838 " /* note that 'key' pointer is now invalid, and so is\n"
39839 " the internal iterator */\n"
39842 " data = guestfs_next_private (g, &key);\n"
39848 #: ../src/guestfs.pod:2178
39850 "Note that the above loop is guaranteed to terminate because the keys are "
39851 "being deleted, but other manipulations of keys within the loop might not "
39852 "terminate unless you also maintain an indication of which keys have been "
39857 #: ../src/guestfs.pod:2183
39862 #: ../src/guestfs.pod:2185
39864 "The libguestfs C library can be probed using systemtap or DTrace. This is "
39865 "true of any library, not just libguestfs. However libguestfs also contains "
39866 "static markers to help in probing internal operations."
39870 #: ../src/guestfs.pod:2189
39871 msgid "You can list all the static markers by doing:"
39875 #: ../src/guestfs.pod:2191
39878 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
39879 " .provider(\"guestfs\").mark(\"*\")'\n"
39884 #: ../src/guestfs.pod:2194
39886 "B<Note:> These static markers are I<not> part of the stable API and may "
39887 "change in future versions."
39891 #: ../src/guestfs.pod:2197
39892 msgid "SYSTEMTAP SCRIPT EXAMPLE"
39896 #: ../src/guestfs.pod:2199
39898 "This script contains examples of displaying both the static markers and some "
39899 "ordinary C entry points:"
39903 #: ../src/guestfs.pod:2202
39911 #: ../src/guestfs.pod:2204
39914 " function display_time () {\n"
39915 " now = gettimeofday_us ();\n"
39918 " delta = now - last;\n"
39924 #: ../src/guestfs.pod:2211
39927 " printf (\"%d (+%d):\", now, delta);\n"
39933 #: ../src/guestfs.pod:2214
39938 " printf (\"ready\\n\");\n"
39944 #: ../src/guestfs.pod:2219
39947 " /* Display all calls to static markers. */\n"
39948 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
39949 " .provider(\"guestfs\").mark(\"*\") ? {\n"
39950 " display_time();\n"
39951 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
39957 #: ../src/guestfs.pod:2226
39960 " /* Display all calls to guestfs_mkfs* functions. */\n"
39961 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
39962 " .function(\"guestfs_mkfs*\") ? {\n"
39963 " display_time();\n"
39964 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
39970 #: ../src/guestfs.pod:2233
39972 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
39973 "program. Note that you either have to be root, or you have to add yourself "
39974 "to several special stap groups. Consult the systemtap documentation for "
39975 "more information."
39979 #: ../src/guestfs.pod:2238
39982 " # stap /tmp/test.stap\n"
39988 #: ../src/guestfs.pod:2241
39989 msgid "In another terminal, run a guestfish command such as this:"
39993 #: ../src/guestfs.pod:2245
39994 msgid "In the first terminal, stap trace output similar to this is shown:"
39998 #: ../src/guestfs.pod:2247
40001 " 1318248056692655 (+0):\tlaunch_start\n"
40002 " 1318248056692850 (+195): launch_build_appliance_start\n"
40003 " 1318248056818285 (+125435): launch_build_appliance_end\n"
40004 " 1318248056838059 (+19774): launch_run_qemu\n"
40005 " 1318248061071167 (+4233108): launch_end\n"
40006 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
40011 #: ../src/guestfs.pod:2254 ../src/guestfs.pod:2259
40016 #: ../src/guestfs.pod:2256
40018 "<!-- old anchor for the next section --> <a name="
40019 "\"state_machine_and_low_level_event_api\"/>"
40023 #: ../src/guestfs.pod:2261
40024 msgid "ARCHITECTURE"
40028 #: ../src/guestfs.pod:2263
40030 "Internally, libguestfs is implemented by running an appliance (a special "
40031 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
40032 "process of the main program."
40036 #: ../src/guestfs.pod:2267
40039 " ___________________\n"
40041 " | main program |\n"
40043 " | | child process / appliance\n"
40044 " | | __________________________\n"
40046 " +-------------------+ RPC | +-----------------+ |\n"
40047 " | libguestfs <--------------------> guestfsd | |\n"
40048 " | | | +-----------------+ |\n"
40049 " \\___________________/ | | Linux kernel | |\n"
40050 " | +--^--------------+ |\n"
40051 " \\_________|________________/\n"
40053 " _______v______\n"
40056 " | disk image |\n"
40057 " \\______________/\n"
40062 #: ../src/guestfs.pod:2287
40064 "The library, linked to the main program, creates the child process and hence "
40065 "the appliance in the L</guestfs_launch> function."
40069 #: ../src/guestfs.pod:2290
40071 "Inside the appliance is a Linux kernel and a complete stack of userspace "
40072 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
40073 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
40074 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
40075 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
40076 "attached to the qemu process which translates device access by the "
40077 "appliance's Linux kernel into accesses to the image."
40081 #: ../src/guestfs.pod:2299
40083 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
40084 "Although the disk image you are attached to might also be used by some "
40085 "virtual machine, libguestfs doesn't know or care about this. (But you will "
40086 "care if both libguestfs's qemu process and your virtual machine are trying "
40087 "to update the disk image at the same time, since these usually results in "
40088 "massive disk corruption)."
40092 #: ../src/guestfs.pod:2306
40093 msgid "STATE MACHINE"
40097 #: ../src/guestfs.pod:2308
40098 msgid "libguestfs uses a state machine to model the child process:"
40102 #: ../src/guestfs.pod:2310
40106 " guestfs_create\n"
40114 " / | \\ \\ guestfs_launch\n"
40115 " / | _\\__V______\n"
40117 " / | | LAUNCHING |\n"
40118 " / | \\___________/\n"
40120 " / | guestfs_launch\n"
40122 " ______ / __|____V\n"
40123 " / \\ ------> / \\\n"
40124 " | BUSY | | READY |\n"
40125 " \\______/ <------ \\________/\n"
40130 #: ../src/guestfs.pod:2332
40132 "The normal transitions are (1) CONFIG (when the handle is created, but there "
40133 "is no child process), (2) LAUNCHING (when the child process is booting up), "
40134 "(3) alternating between READY and BUSY as commands are issued to, and "
40135 "carried out by, the child process."
40139 #: ../src/guestfs.pod:2337
40141 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
40142 "asynchronously at any time (eg. due to some internal error), and that causes "
40143 "the state to transition back to CONFIG."
40147 #: ../src/guestfs.pod:2341
40149 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
40150 "issued when in the CONFIG state."
40154 #: ../src/guestfs.pod:2344
40156 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
40157 "L</guestfs_launch> blocks until the child process is READY to accept "
40158 "commands (or until some failure or timeout). L</guestfs_launch> internally "
40159 "moves the state from CONFIG to LAUNCHING while it is running."
40163 #: ../src/guestfs.pod:2350
40165 "API actions such as L</guestfs_mount> can only be issued when in the READY "
40166 "state. These API calls block waiting for the command to be carried out (ie. "
40167 "the state to transition to BUSY and then back to READY). There are no non-"
40168 "blocking versions, and no way to issue more than one command per handle at "
40173 #: ../src/guestfs.pod:2356
40175 "Finally, the child process sends asynchronous messages back to the main "
40176 "program, such as kernel log messages. You can register a callback to "
40177 "receive these messages."
40181 #: ../src/guestfs.pod:2360
40186 #: ../src/guestfs.pod:2362
40187 msgid "APPLIANCE BOOT PROCESS"
40191 #: ../src/guestfs.pod:2364
40193 "This process has evolved and continues to evolve. The description here "
40194 "corresponds only to the current version of libguestfs and is provided for "
40195 "information only."
40199 #: ../src/guestfs.pod:2368
40201 "In order to follow the stages involved below, enable libguestfs debugging "
40202 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
40206 #: ../src/guestfs.pod:2373
40207 msgid "Create the appliance"
40211 #: ../src/guestfs.pod:2375
40213 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
40214 "initrd and the appliance."
40218 #: ../src/guestfs.pod:2378
40220 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
40221 "directory if C<TMPDIR> is set)."
40225 #: ../src/guestfs.pod:2381
40227 "For a complete description of how the appliance is created and cached, read "
40228 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
40232 #: ../src/guestfs.pod:2385
40233 msgid "Start qemu and boot the kernel"
40237 #: ../src/guestfs.pod:2387
40238 msgid "qemu is invoked to boot the kernel."
40242 #: ../src/guestfs.pod:2389
40243 msgid "Run the initrd"
40247 #: ../src/guestfs.pod:2391
40249 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
40250 "appliance. The purpose of the initrd is to load enough kernel modules in "
40251 "order that the appliance itself can be mounted and started."
40255 #: ../src/guestfs.pod:2395
40257 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
40262 #: ../src/guestfs.pod:2398
40264 "When the initrd has started you will see messages showing that kernel "
40265 "modules are being loaded, similar to this:"
40269 #: ../src/guestfs.pod:2401
40272 " febootstrap: ext2 mini initrd starting up\n"
40273 " febootstrap: mounting /sys\n"
40274 " febootstrap: internal insmod libcrc32c.ko\n"
40275 " febootstrap: internal insmod crc32c-intel.ko\n"
40280 #: ../src/guestfs.pod:2406
40281 msgid "Find and mount the appliance device"
40285 #: ../src/guestfs.pod:2408
40287 "The appliance is a sparse file containing an ext2 filesystem which contains "
40288 "a familiar (although reduced in size) Linux operating system. It would "
40289 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
40293 #: ../src/guestfs.pod:2412
40295 "The regular disks being inspected by libguestfs are the first devices "
40296 "exposed by qemu (eg. as C</dev/vda>)."
40300 #: ../src/guestfs.pod:2415
40302 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
40303 "there was only one regular disk)."
40307 #: ../src/guestfs.pod:2418
40309 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
40310 "and switch root into the appliance, and run C</init> from the appliance."
40314 #: ../src/guestfs.pod:2422
40315 msgid "If this works successfully you will see messages such as:"
40319 #: ../src/guestfs.pod:2424
40322 " febootstrap: picked /sys/block/vdb/dev as root device\n"
40323 " febootstrap: creating /dev/root as block special 252:16\n"
40324 " febootstrap: mounting new root on /root\n"
40325 " febootstrap: chroot\n"
40326 " Starting /init script ...\n"
40331 #: ../src/guestfs.pod:2430
40333 "Note that C<Starting /init script ...> indicates that the appliance's init "
40334 "script is now running."
40338 #: ../src/guestfs.pod:2433
40339 msgid "Initialize the appliance"
40343 #: ../src/guestfs.pod:2435
40345 "The appliance itself now initializes itself. This involves starting certain "
40346 "processes like C<udev>, possibly printing some debug information, and "
40347 "finally running the daemon (C<guestfsd>)."
40351 #: ../src/guestfs.pod:2439
40356 #: ../src/guestfs.pod:2441
40358 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
40363 #: ../src/guestfs.pod:2444
40366 " verbose daemon enabled\n"
40371 #: ../src/guestfs.pod:2446
40373 "The daemon expects to see a named virtio-serial port exposed by qemu and "
40374 "connected on the other end to the library."
40378 #: ../src/guestfs.pod:2449
40380 "The daemon connects to this port (and hence to the library) and sends a four "
40381 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
40382 "protocol (see below)."
40386 #: ../src/guestfs.pod:2455
40387 msgid "COMMUNICATION PROTOCOL"
40391 #: ../src/guestfs.pod:2457
40393 "Don't rely on using this protocol directly. This section documents how it "
40394 "currently works, but it may change at any time."
40398 #: ../src/guestfs.pod:2460
40400 "The protocol used to talk between the library and the daemon running inside "
40401 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
40402 "1014, RFC 1832, RFC 4506)."
40406 #: ../src/guestfs.pod:2464
40408 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
40409 "this file is automatically generated)."
40413 #: ../src/guestfs.pod:2467
40415 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
40416 "and C<FileOut> parameters, which are handled with very simple request/reply "
40417 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
40418 "parameters, which use the same request and reply messages, but they may also "
40419 "be followed by files sent using a chunked encoding."
40423 #: ../src/guestfs.pod:2474
40424 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
40428 #: ../src/guestfs.pod:2476
40429 msgid "For ordinary functions, the request message is:"
40433 #: ../src/guestfs.pod:2478
40436 " total length (header + arguments,\n"
40437 " but not including the length word itself)\n"
40438 " struct guestfs_message_header (encoded as XDR)\n"
40439 " struct guestfs_<foo>_args (encoded as XDR)\n"
40444 #: ../src/guestfs.pod:2483
40446 "The total length field allows the daemon to allocate a fixed size buffer "
40447 "into which it slurps the rest of the message. As a result, the total length "
40448 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
40449 "effective size of any request is limited to somewhere under this size."
40453 #: ../src/guestfs.pod:2489
40455 "Note also that many functions don't take any arguments, in which case the "
40456 "C<guestfs_I<foo>_args> is completely omitted."
40460 #: ../src/guestfs.pod:2492
40462 "The header contains the procedure number (C<guestfs_proc>) which is how the "
40463 "receiver knows what type of args structure to expect, or none at all."
40467 #: ../src/guestfs.pod:2496
40469 "For functions that take optional arguments, the optional arguments are "
40470 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
40471 "arguments. A bitmask in the header indicates which optional arguments are "
40472 "meaningful. The bitmask is also checked to see if it contains bits set "
40473 "which the daemon does not know about (eg. if more optional arguments were "
40474 "added in a later version of the library), and this causes the call to be "
40479 #: ../src/guestfs.pod:2504
40480 msgid "The reply message for ordinary functions is:"
40484 #: ../src/guestfs.pod:2506
40487 " total length (header + ret,\n"
40488 " but not including the length word itself)\n"
40489 " struct guestfs_message_header (encoded as XDR)\n"
40490 " struct guestfs_<foo>_ret (encoded as XDR)\n"
40495 #: ../src/guestfs.pod:2511
40497 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
40498 "functions that return no formal return values."
40502 #: ../src/guestfs.pod:2514
40504 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
40508 #: ../src/guestfs.pod:2517
40510 "In the case of an error, a flag is set in the header, and the reply message "
40511 "is slightly changed:"
40515 #: ../src/guestfs.pod:2520
40518 " total length (header + error,\n"
40519 " but not including the length word itself)\n"
40520 " struct guestfs_message_header (encoded as XDR)\n"
40521 " struct guestfs_message_error (encoded as XDR)\n"
40526 #: ../src/guestfs.pod:2525
40528 "The C<guestfs_message_error> structure contains the error message as a "
40533 #: ../src/guestfs.pod:2528
40534 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
40538 #: ../src/guestfs.pod:2530
40540 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
40541 "The normal request message is sent (see above). However this is followed by "
40542 "a sequence of file chunks."
40546 #: ../src/guestfs.pod:2534
40549 " total length (header + arguments,\n"
40550 " but not including the length word itself,\n"
40551 " and not including the chunks)\n"
40552 " struct guestfs_message_header (encoded as XDR)\n"
40553 " struct guestfs_<foo>_args (encoded as XDR)\n"
40554 " sequence of chunks for FileIn param #0\n"
40555 " sequence of chunks for FileIn param #1 etc.\n"
40560 #: ../src/guestfs.pod:2542
40561 msgid "The \"sequence of chunks\" is:"
40565 #: ../src/guestfs.pod:2544
40568 " length of chunk (not including length word itself)\n"
40569 " struct guestfs_chunk (encoded as XDR)\n"
40570 " length of chunk\n"
40571 " struct guestfs_chunk (encoded as XDR)\n"
40573 " length of chunk\n"
40574 " struct guestfs_chunk (with data.data_len == 0)\n"
40579 #: ../src/guestfs.pod:2552
40581 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
40582 "is set in the final chunk to indicate either successful completion or early "
40587 #: ../src/guestfs.pod:2556
40589 "At time of writing there are no functions that have more than one FileIn "
40590 "parameter. However this is (theoretically) supported, by sending the "
40591 "sequence of chunks for each FileIn parameter one after another (from left to "
40596 #: ../src/guestfs.pod:2561
40598 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
40599 "transfer. The library does this by sending a chunk with a special flag set "
40600 "to indicate cancellation. When the daemon sees this, it cancels the whole "
40601 "RPC, does I<not> send any reply, and goes back to reading the next request."
40605 #: ../src/guestfs.pod:2567
40607 "The daemon may also cancel. It does this by writing a special word "
40608 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
40609 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
40610 "cancel chunk). The special word is chosen so that even if cancellation "
40611 "happens right at the end of the transfer (after the library has finished "
40612 "writing and has started listening for the reply), the \"spurious\" cancel "
40613 "flag will not be confused with the reply message."
40617 #: ../src/guestfs.pod:2576
40619 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
40620 "limit), and also files where the size is not known in advance (eg. from "
40621 "pipes or sockets). However the chunks are rather small "
40622 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
40623 "to keep much in memory."
40627 #: ../src/guestfs.pod:2582
40628 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
40632 #: ../src/guestfs.pod:2584
40634 "The protocol for FileOut parameters is exactly the same as for FileIn "
40635 "parameters, but with the roles of daemon and library reversed."
40639 #: ../src/guestfs.pod:2587
40642 " total length (header + ret,\n"
40643 " but not including the length word itself,\n"
40644 " and not including the chunks)\n"
40645 " struct guestfs_message_header (encoded as XDR)\n"
40646 " struct guestfs_<foo>_ret (encoded as XDR)\n"
40647 " sequence of chunks for FileOut param #0\n"
40648 " sequence of chunks for FileOut param #1 etc.\n"
40653 #: ../src/guestfs.pod:2595
40654 msgid "INITIAL MESSAGE"
40658 #: ../src/guestfs.pod:2597
40660 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
40661 "which indicates that the guest and daemon is alive. This is what L</"
40662 "guestfs_launch> waits for."
40666 #: ../src/guestfs.pod:2601
40667 msgid "PROGRESS NOTIFICATION MESSAGES"
40671 #: ../src/guestfs.pod:2603
40673 "The daemon may send progress notification messages at any time. These are "
40674 "distinguished by the normal length word being replaced by "
40675 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
40679 #: ../src/guestfs.pod:2607
40681 "The library turns them into progress callbacks (see L</"
40682 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
40687 #: ../src/guestfs.pod:2611
40689 "The daemon self-limits the frequency of progress messages it sends (see "
40690 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
40695 #: ../src/guestfs.pod:2615
40696 msgid "LIBGUESTFS VERSION NUMBERS"
40700 #: ../src/guestfs.pod:2617
40702 "Since April 2010, libguestfs has started to make separate development and "
40703 "stable releases, along with corresponding branches in our git repository. "
40704 "These separate releases can be identified by version number:"
40708 #: ../src/guestfs.pod:2622
40711 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
40712 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
40718 " | `-------- sub-version\n"
40720 " `------ always '1' because we don't change the ABI\n"
40725 #: ../src/guestfs.pod:2633
40726 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
40730 #: ../src/guestfs.pod:2635
40732 "As time passes we cherry pick fixes from the development branch and backport "
40733 "those into the stable branch, the effect being that the stable branch should "
40734 "get more stable and less buggy over time. So the stable releases are ideal "
40735 "for people who don't need new features but would just like the software to "
40740 #: ../src/guestfs.pod:2641
40741 msgid "Our criteria for backporting changes are:"
40745 #: ../src/guestfs.pod:2647
40747 "Documentation changes which don't affect any code are backported unless the "
40748 "documentation refers to a future feature which is not in stable."
40752 #: ../src/guestfs.pod:2653
40754 "Bug fixes which are not controversial, fix obvious problems, and have been "
40755 "well tested are backported."
40759 #: ../src/guestfs.pod:2658
40761 "Simple rearrangements of code which shouldn't affect how it works get "
40762 "backported. This is so that the code in the two branches doesn't get too "
40763 "far out of step, allowing us to backport future fixes more easily."
40767 #: ../src/guestfs.pod:2664
40769 "We I<don't> backport new features, new APIs, new tools etc, except in one "
40770 "exceptional case: the new feature is required in order to implement an "
40771 "important bug fix."
40775 #: ../src/guestfs.pod:2670
40777 "A new stable branch starts when we think the new features in development are "
40778 "substantial and compelling enough over the current stable branch to warrant "
40779 "it. When that happens we create new stable and development versions 1.N.0 "
40780 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
40781 "stable at this point, but by backporting fixes from development, that branch "
40782 "will stabilize over time."
40786 #: ../src/guestfs.pod:2678
40787 msgid "EXTENDING LIBGUESTFS"
40791 #: ../src/guestfs.pod:2680
40792 msgid "ADDING A NEW API ACTION"
40796 #: ../src/guestfs.pod:2682
40798 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
40799 "documentation) are generated, and this makes it easy to extend the "
40804 #: ../src/guestfs.pod:2686
40805 msgid "To add a new API action there are two changes:"
40809 #: ../src/guestfs.pod:2692
40811 "You need to add a description of the call (name, parameters, return type, "
40812 "tests, documentation) to C<generator/generator_actions.ml>."
40816 #: ../src/guestfs.pod:2695
40818 "There are two sorts of API action, depending on whether the call goes "
40819 "through to the daemon in the appliance, or is serviced entirely by the "
40820 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
40821 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
40822 "an example of the latter, since a trace flag is maintained in the handle and "
40823 "all tracing is done on the library side."
40827 #: ../src/guestfs.pod:2703
40829 "Most new actions are of the first type, and get added to the "
40830 "C<daemon_functions> list. Each function has a unique procedure number used "
40831 "in the RPC protocol which is assigned to that action when we publish "
40832 "libguestfs and cannot be reused. Take the latest procedure number and "
40837 #: ../src/guestfs.pod:2709
40839 "For library-only actions of the second type, add to the "
40840 "C<non_daemon_functions> list. Since these functions are serviced by the "
40841 "library and do not travel over the RPC mechanism to the daemon, these "
40842 "functions do not need a procedure number, and so the procedure number is set "
40847 #: ../src/guestfs.pod:2717
40848 msgid "Implement the action (in C):"
40852 #: ../src/guestfs.pod:2719
40854 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
40855 "C<daemon/> directory."
40859 #: ../src/guestfs.pod:2722
40861 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
40862 "(note: double underscore) in the C<src/> directory."
40866 #: ../src/guestfs.pod:2725
40867 msgid "In either case, use another function as an example of what to do."
40871 #: ../src/guestfs.pod:2729
40872 msgid "After making these changes, use C<make> to compile."
40876 #: ../src/guestfs.pod:2731
40878 "Note that you don't need to implement the RPC, language bindings, manual "
40879 "pages or anything else. It's all automatically generated from the OCaml "
40884 #: ../src/guestfs.pod:2735
40885 msgid "ADDING TESTS FOR AN API ACTION"
40889 #: ../src/guestfs.pod:2737
40891 "You can supply zero or as many tests as you want per API call. The tests "
40892 "can either be added as part of the API description (C<generator/"
40893 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
40894 "into C<regressions/>. Note that adding a script to C<regressions/> is "
40895 "slower, so if possible use the first method."
40899 #: ../src/guestfs.pod:2743
40901 "The following describes the test environment used when you add an API test "
40902 "in C<generator_actions.ml>."
40906 #: ../src/guestfs.pod:2746
40907 msgid "The test environment has 4 block devices:"
40911 #: ../src/guestfs.pod:2750
40912 msgid "C</dev/sda> 500MB"
40916 #: ../src/guestfs.pod:2752
40917 msgid "General block device for testing."
40921 #: ../src/guestfs.pod:2754
40922 msgid "C</dev/sdb> 50MB"
40926 #: ../src/guestfs.pod:2756
40928 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
40933 #: ../src/guestfs.pod:2759
40934 msgid "C</dev/sdc> 10MB"
40938 #: ../src/guestfs.pod:2761
40939 msgid "Used in a few tests where two block devices are needed."
40943 #: ../src/guestfs.pod:2763
40944 msgid "C</dev/sdd>"
40948 #: ../src/guestfs.pod:2765
40949 msgid "ISO with fixed content (see C<images/test.iso>)."
40953 #: ../src/guestfs.pod:2769
40955 "To be able to run the tests in a reasonable amount of time, the libguestfs "
40956 "appliance and block devices are reused between tests. So don't try testing "
40957 "L</guestfs_kill_subprocess> :-x"
40961 #: ../src/guestfs.pod:2773
40963 "Each test starts with an initial scenario, selected using one of the "
40964 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
40965 "initialize the disks mentioned above in a particular way as documented in "
40966 "C<generator_types.ml>. You should not assume anything about the previous "
40967 "contents of other disks that are not initialized."
40971 #: ../src/guestfs.pod:2779
40973 "You can add a prerequisite clause to any individual test. This is a run-"
40974 "time check, which, if it fails, causes the test to be skipped. Useful if "
40975 "testing a command which might not work on all variations of libguestfs "
40976 "builds. A test that has prerequisite of C<Always> means to run "
40981 #: ../src/guestfs.pod:2785
40983 "In addition, packagers can skip individual tests by setting environment "
40984 "variables before running C<make check>."
40988 #: ../src/guestfs.pod:2788
40991 " SKIP_TEST_<CMD>_<NUM>=1\n"
40996 #: ../src/guestfs.pod:2790
40997 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
41001 #: ../src/guestfs.pod:2794
41004 " SKIP_TEST_<CMD>=1\n"
41009 #: ../src/guestfs.pod:2796
41010 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
41014 #: ../src/guestfs.pod:2798
41015 msgid "Packagers can run only certain tests by setting for example:"
41019 #: ../src/guestfs.pod:2800
41022 " TEST_ONLY=\"vfs_type zerofree\"\n"
41027 #: ../src/guestfs.pod:2802
41029 "See C<capitests/tests.c> for more details of how these environment variables "
41034 #: ../src/guestfs.pod:2805
41035 msgid "DEBUGGING NEW API ACTIONS"
41039 #: ../src/guestfs.pod:2807
41040 msgid "Test new actions work before submitting them."
41044 #: ../src/guestfs.pod:2809
41045 msgid "You can use guestfish to try out new commands."
41049 #: ../src/guestfs.pod:2811
41051 "Debugging the daemon is a problem because it runs inside a minimal "
41052 "environment. However you can fprintf messages in the daemon to stderr, and "
41053 "they will show up if you use C<guestfish -v>."
41057 #: ../src/guestfs.pod:2815
41058 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
41062 #: ../src/guestfs.pod:2817
41064 "Our C source code generally adheres to some basic code-formatting "
41065 "conventions. The existing code base is not totally consistent on this "
41066 "front, but we do prefer that contributed code be formatted similarly. In "
41067 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
41068 "indentation level, and other than that, follow the K&R style."
41072 #: ../src/guestfs.pod:2823
41074 "If you use Emacs, add the following to one of one of your start-up files (e."
41075 "g., ~/.emacs), to help ensure that you get indentation right:"
41079 #: ../src/guestfs.pod:2826
41082 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
41083 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
41084 " (add-hook 'find-file-hook\n"
41085 " '(lambda () (if (and buffer-file-name\n"
41086 " (string-match \"/libguestfs\\\\>\"\n"
41087 " (buffer-file-name))\n"
41088 " (not (string-equal mode-name \"Change Log\"))\n"
41089 " (not (string-equal mode-name \"Makefile\")))\n"
41090 " (setq indent-tabs-mode nil))))\n"
41095 #: ../src/guestfs.pod:2836
41098 " ;;; When editing C sources in libguestfs, use this style.\n"
41099 " (defun libguestfs-c-mode ()\n"
41100 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
41102 " (c-set-style \"K&R\")\n"
41103 " (setq c-indent-level 2)\n"
41104 " (setq c-basic-offset 2))\n"
41105 " (add-hook 'c-mode-hook\n"
41106 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
41107 " (buffer-file-name))\n"
41108 " (libguestfs-c-mode))))\n"
41113 #: ../src/guestfs.pod:2848
41114 msgid "Enable warnings when compiling (and fix any problems this finds):"
41118 #: ../src/guestfs.pod:2851
41121 " ./configure --enable-gcc-warnings\n"
41126 #: ../src/guestfs.pod:2853
41127 msgid "Useful targets are:"
41131 #: ../src/guestfs.pod:2855
41134 " make syntax-check # checks the syntax of the C code\n"
41135 " make check # runs the test suite\n"
41140 #: ../src/guestfs.pod:2858
41141 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
41145 #: ../src/guestfs.pod:2860
41147 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
41148 "which are used to do shell quoting."
41152 #: ../src/guestfs.pod:2865
41157 #: ../src/guestfs.pod:2867
41159 "Simple shell quoted string. Any spaces or other shell characters are "
41164 #: ../src/guestfs.pod:2870
41169 #: ../src/guestfs.pod:2872
41171 "Same as C<%Q> except the string is treated as a path which is prefixed by "
41176 #: ../src/guestfs.pod:2879
41179 " asprintf (&cmd, \"cat %R\", path);\n"
41184 #: ../src/guestfs.pod:2881
41185 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
41189 #: ../src/guestfs.pod:2883
41191 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
41192 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
41193 "they are not passed via the shell (instead, straight to exec). You probably "
41194 "want to use the C<sysroot_path()> function however."
41198 #: ../src/guestfs.pod:2889
41199 msgid "SUBMITTING YOUR NEW API ACTIONS"
41203 #: ../src/guestfs.pod:2891
41205 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
41206 "libguestfs> and CC to L<rjones@redhat.com>."
41210 #: ../src/guestfs.pod:2895
41211 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
41215 #: ../src/guestfs.pod:2897
41216 msgid "We support i18n (gettext anyhow) in the library."
41220 #: ../src/guestfs.pod:2899
41222 "However many messages come from the daemon, and we don't translate those at "
41223 "the moment. One reason is that the appliance generally has all locale files "
41224 "removed from it, because they take up a lot of space. So we'd have to readd "
41225 "some of those, as well as copying our PO files into the appliance."
41229 #: ../src/guestfs.pod:2905
41231 "Debugging messages are never translated, since they are intended for the "
41236 #: ../src/guestfs.pod:2908
41237 msgid "SOURCE CODE SUBDIRECTORIES"
41241 #: ../src/guestfs.pod:2912
41246 #: ../src/guestfs.pod:2914
41247 msgid "L<virt-alignment-scan(1)> command and documentation."
41251 #: ../src/guestfs.pod:2918
41252 msgid "The libguestfs appliance, build scripts and so on."
41256 #: ../src/guestfs.pod:2920
41257 msgid "C<capitests>"
41261 #: ../src/guestfs.pod:2922
41262 msgid "Automated tests of the C API."
41266 #: ../src/guestfs.pod:2924
41271 #: ../src/guestfs.pod:2926
41273 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
41278 #: ../src/guestfs.pod:2929
41283 #: ../src/guestfs.pod:2931
41285 "Safety and liveness tests of components that libguestfs depends upon (not of "
41286 "libguestfs itself). Mainly this is for qemu and the kernel."
41290 #: ../src/guestfs.pod:2934
41295 #: ../src/guestfs.pod:2936
41297 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
41298 "command and documentation."
41302 #: ../src/guestfs.pod:2939
41307 #: ../src/guestfs.pod:2941
41308 msgid "Outside contributions, experimental parts."
41312 #: ../src/guestfs.pod:2943
41317 #: ../src/guestfs.pod:2945
41319 "The daemon that runs inside the libguestfs appliance and carries out actions."
41323 #: ../src/guestfs.pod:2948
41328 #: ../src/guestfs.pod:2950
41329 msgid "L<virt-df(1)> command and documentation."
41333 #: ../src/guestfs.pod:2952
41338 #: ../src/guestfs.pod:2954
41339 msgid "L<virt-edit(1)> command and documentation."
41343 #: ../src/guestfs.pod:2956
41344 msgid "C<examples>"
41348 #: ../src/guestfs.pod:2958
41349 msgid "C API example code."
41353 #: ../src/guestfs.pod:2960
41354 msgid "C<extratests>"
41358 #: ../src/guestfs.pod:2962
41360 "Extra tests. These are not run by default because they require special "
41361 "tools or configuration."
41365 #: ../src/guestfs.pod:2965
41370 #: ../src/guestfs.pod:2967
41372 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
41373 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
41374 "L<virt-tar-out(1)>."
41378 #: ../src/guestfs.pod:2971
41383 #: ../src/guestfs.pod:2973
41385 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
41389 #: ../src/guestfs.pod:2975
41390 msgid "C<generator>"
41394 #: ../src/guestfs.pod:2977
41396 "The crucially important generator, used to automatically generate large "
41397 "amounts of boilerplate C code for things like RPC and bindings."
41401 #: ../src/guestfs.pod:2980
41406 #: ../src/guestfs.pod:2982
41407 msgid "Files used by the test suite."
41411 #: ../src/guestfs.pod:2984
41412 msgid "Some \"phony\" guest images which we test against."
41416 #: ../src/guestfs.pod:2986
41417 msgid "C<inspector>"
41421 #: ../src/guestfs.pod:2988
41422 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
41426 #: ../src/guestfs.pod:2990
41431 #: ../src/guestfs.pod:2992
41432 msgid "Logo used on the website. The fish is called Arthur by the way."
41436 #: ../src/guestfs.pod:2994
41441 #: ../src/guestfs.pod:2996
41442 msgid "M4 macros used by autoconf."
41446 #: ../src/guestfs.pod:2998
41451 #: ../src/guestfs.pod:3000
41452 msgid "Translations of simple gettext strings."
41456 #: ../src/guestfs.pod:3002
41461 #: ../src/guestfs.pod:3004
41463 "The build infrastructure and PO files for translations of manpages and POD "
41464 "files. Eventually this will be combined with the C<po> directory, but that "
41465 "is rather complicated."
41469 #: ../src/guestfs.pod:3008
41470 msgid "C<regressions>"
41474 #: ../src/guestfs.pod:3010
41475 msgid "Regression tests."
41479 #: ../src/guestfs.pod:3012
41484 #: ../src/guestfs.pod:3014
41485 msgid "L<virt-rescue(1)> command and documentation."
41489 #: ../src/guestfs.pod:3016
41494 #: ../src/guestfs.pod:3018
41495 msgid "L<virt-resize(1)> command and documentation."
41499 #: ../src/guestfs.pod:3020
41500 msgid "C<sparsify>"
41504 #: ../src/guestfs.pod:3022
41505 msgid "L<virt-sparsify(1)> command and documentation."
41509 #: ../src/guestfs.pod:3024
41514 #: ../src/guestfs.pod:3026
41515 msgid "Source code to the C library."
41519 #: ../src/guestfs.pod:3028
41524 #: ../src/guestfs.pod:3030
41526 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
41530 #: ../src/guestfs.pod:3032
41531 msgid "C<test-tool>"
41535 #: ../src/guestfs.pod:3034
41537 "Test tool for end users to test if their qemu/kernel combination will work "
41542 #: ../src/guestfs.pod:3037
41547 #: ../src/guestfs.pod:3039
41552 #: ../src/guestfs.pod:3041
41557 #: ../src/guestfs.pod:3043
41562 #: ../src/guestfs.pod:3045
41567 #: ../src/guestfs.pod:3047
41572 #: ../src/guestfs.pod:3049
41577 #: ../src/guestfs.pod:3051
41582 #: ../src/guestfs.pod:3053
41587 #: ../src/guestfs.pod:3055
41588 msgid "Language bindings."
41592 #: ../src/guestfs.pod:3059
41593 msgid "MAKING A STABLE RELEASE"
41597 #: ../src/guestfs.pod:3061
41599 "When we make a stable release, there are several steps documented here. See "
41600 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
41605 #: ../src/guestfs.pod:3069
41607 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
41611 #: ../src/guestfs.pod:3074
41612 msgid "Finalize RELEASE-NOTES."
41616 #: ../src/guestfs.pod:3078
41617 msgid "Update ROADMAP."
41621 #: ../src/guestfs.pod:3082
41622 msgid "Run C<src/api-support/update-from-tarballs.sh>."
41626 #: ../src/guestfs.pod:3086
41627 msgid "Push and pull from Transifex."
41631 #: ../src/guestfs.pod:3090
41639 #: ../src/guestfs.pod:3092
41640 msgid "to push the latest POT files to Transifex. Then run:"
41644 #: ../src/guestfs.pod:3094
41652 #: ../src/guestfs.pod:3096
41653 msgid "which is a wrapper to pull the latest translated C<*.po> files."
41657 #: ../src/guestfs.pod:3100
41659 "Create new stable and development directories under L<http://libguestfs.org/"
41664 #: ../src/guestfs.pod:3105
41665 msgid "Create the branch in git:"
41669 #: ../src/guestfs.pod:3107
41672 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
41673 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
41674 " git branch stable-1.XX\n"
41675 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
41680 #: ../src/guestfs.pod:3114
41685 #: ../src/guestfs.pod:3116
41686 msgid "PROTOCOL LIMITS"
41690 #: ../src/guestfs.pod:3118
41692 "Internally libguestfs uses a message-based protocol to pass API calls and "
41693 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
41694 "plenty more detail about this). The maximum message size used by the "
41695 "protocol is slightly less than 4 MB. For some API calls you may need to be "
41696 "aware of this limit. The API calls which may be affected are individually "
41697 "documented, with a link back to this section of the documentation."
41701 #: ../src/guestfs.pod:3126
41703 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
41704 "a simple string. Because this string is at some point internally encoded as "
41705 "a message, the maximum size that it can return is slightly under 4 MB. If "
41706 "the requested file is larger than this then you will get an error."
41710 #: ../src/guestfs.pod:3132
41712 "In order to transfer large files into and out of the guest filesystem, you "
41713 "need to use particular calls that support this. The sections L</UPLOADING> "
41714 "and L</DOWNLOADING> document how to do this."
41718 #: ../src/guestfs.pod:3136
41720 "You might also consider mounting the disk image using our FUSE filesystem "
41721 "support (L<guestmount(1)>)."
41725 #: ../src/guestfs.pod:3139
41726 msgid "MAXIMUM NUMBER OF DISKS"
41730 #: ../src/guestfs.pod:3141
41731 msgid "When using virtio disks (the default) the current limit is B<25> disks."
41735 #: ../src/guestfs.pod:3144
41737 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
41738 "slots. However febootstrap only understands disks with names C</dev/vda> "
41739 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
41744 #: ../src/guestfs.pod:3149
41746 "We are working to substantially raise this limit in future versions but it "
41747 "requires complex changes to qemu."
41751 #: ../src/guestfs.pod:3152
41753 "In future versions of libguestfs it should also be possible to \"hot plug\" "
41754 "disks (add and remove disks after calling L</guestfs_launch>). This also "
41755 "requires changes to qemu."
41759 #: ../src/guestfs.pod:3156
41760 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
41764 #: ../src/guestfs.pod:3158
41765 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
41769 #: ../src/guestfs.pod:3160
41771 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
41772 "vda>, and C</dev/vda1> through C</dev/vda15>)."
41776 #: ../src/guestfs.pod:3163
41778 "If you attach a disk with more than 15 partitions, the extra partitions are "
41779 "ignored by libguestfs."
41783 #: ../src/guestfs.pod:3166
41784 msgid "MAXIMUM SIZE OF A DISK"
41788 #: ../src/guestfs.pod:3168
41789 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
41793 #: ../src/guestfs.pod:3170
41795 "We have tested block devices up to 1 exabyte (2**60 or "
41796 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
41801 #: ../src/guestfs.pod:3174
41803 "Although libguestfs probably does not impose any limit, the underlying host "
41804 "storage will. If you store disk images on a host ext4 filesystem, then the "
41805 "maximum size will be limited by the maximum ext4 file size (currently 16 "
41806 "TB). If you store disk images as host logical volumes then you are limited "
41807 "by the maximum size of an LV."
41811 #: ../src/guestfs.pod:3180
41813 "For the hugest disk image files, we recommend using XFS on the host for "
41818 #: ../src/guestfs.pod:3183
41819 msgid "MAXIMUM SIZE OF A PARTITION"
41823 #: ../src/guestfs.pod:3185
41825 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
41826 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
41827 "address a partition located beyond 2 TB on the disk."
41831 #: ../src/guestfs.pod:3189
41833 "It is recommended that you use GPT partitions on disks which are larger than "
41834 "this size. GPT uses 64 bit sector numbers and so can address partitions "
41835 "which are theoretically larger than the largest disk we could support."
41839 #: ../src/guestfs.pod:3194
41840 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
41844 #: ../src/guestfs.pod:3196
41846 "This depends on the filesystem type. libguestfs itself does not impose any "
41847 "known limit. Consult Wikipedia or the filesystem documentation to find out "
41848 "what these limits are."
41852 #: ../src/guestfs.pod:3200
41853 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
41857 #: ../src/guestfs.pod:3202
41859 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
41860 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
41861 "uploads and downloads."
41865 #: ../src/guestfs.pod:3206
41866 msgid "INSPECTION LIMITS"
41870 #: ../src/guestfs.pod:3208
41872 "The inspection code has several arbitrary limits on things like the size of "
41873 "Windows Registry hive it will read, and the length of product name. These "
41874 "are intended to stop a malicious guest from consuming arbitrary amounts of "
41875 "memory and disk space on the host, and should not be reached in practice. "
41876 "See the source code for more information."
41880 #: ../src/guestfs.pod:3234
41882 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
41883 "effect as calling C<guestfs_set_verbose (g, 1)>."
41887 #: ../src/guestfs.pod:3246
41889 "Set the path that libguestfs uses to search for a supermin appliance. See "
41890 "the discussion of paths in section L</PATH> above."
41894 #: ../src/guestfs.pod:3255
41895 msgid "See also L</QEMU WRAPPERS> above."
41899 #: ../src/guestfs.pod:3259
41901 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
41902 "effect as calling C<guestfs_set_trace (g, 1)>."
41906 #: ../src/guestfs.pod:3277
41908 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
41909 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
41910 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-cat(1)"
41911 ">, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
41912 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
41913 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue"
41914 "(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar"
41915 "(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<guestfs-"
41916 "testing(1)>, L<qemu(1)>, L<febootstrap(1)>, L<febootstrap-supermin-helper(8)"
41917 ">, L<hivex(3)>, L<stap(1)>, L<http://libguestfs.org/>."
41921 #: ../src/guestfs.pod:3314
41923 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
41924 "(8)>, L<disktype(1)>."
41928 #: ../src/guestfs.pod:3321 ../tools/virt-make-fs.pl:571
41929 #: ../tools/virt-win-reg.pl:772
41934 #: ../src/guestfs.pod:3323
41935 msgid "To get a list of bugs against libguestfs use this link:"
41939 #: ../src/guestfs.pod:3325
41941 "L<https://bugzilla.redhat.com/buglist.cgi?"
41942 "component=libguestfs&product=Virtualization+Tools>"
41946 #: ../src/guestfs.pod:3327
41947 msgid "To report a new bug against libguestfs use this link:"
41951 #: ../src/guestfs.pod:3329
41953 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
41954 "component=libguestfs&product=Virtualization+Tools>"
41958 #: ../src/guestfs.pod:3331
41959 msgid "When reporting a bug, please check:"
41963 #: ../src/guestfs.pod:3337
41964 msgid "That the bug hasn't been reported already."
41968 #: ../src/guestfs.pod:3341
41969 msgid "That you are testing a recent version."
41973 #: ../src/guestfs.pod:3345
41974 msgid "Describe the bug accurately, and give a way to reproduce it."
41978 #: ../src/guestfs.pod:3349
41980 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
41985 #: ../test-tool/libguestfs-test-tool.pod:5
41986 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
41990 #: ../test-tool/libguestfs-test-tool.pod:9
41993 " libguestfs-test-tool [--options]\n"
41998 #: ../test-tool/libguestfs-test-tool.pod:13
42000 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
42001 "to check basic libguestfs functionality is working. This is needed because "
42002 "libguestfs occasionally breaks for reasons beyond our control: usually "
42003 "because of changes in the underlying qemu or kernel packages, or the host "
42008 #: ../test-tool/libguestfs-test-tool.pod:19
42009 msgid "If you suspect a problem in libguestfs, then just run:"
42013 #: ../test-tool/libguestfs-test-tool.pod:21
42016 " libguestfs-test-tool\n"
42021 #: ../test-tool/libguestfs-test-tool.pod:23
42022 msgid "It will print lots of diagnostic messages."
42026 #: ../test-tool/libguestfs-test-tool.pod:25
42027 msgid "If it runs to completion successfully, you will see this near the end:"
42031 #: ../test-tool/libguestfs-test-tool.pod:27
42034 " ===== TEST FINISHED OK =====\n"
42039 #: ../test-tool/libguestfs-test-tool.pod:29
42040 msgid "and the test tool will exit with code 0."
42044 #: ../test-tool/libguestfs-test-tool.pod:31
42046 "If it fails (and/or exits with non-zero error code), please paste the "
42047 "I<complete, unedited> output of the test tool into a bug report. More "
42048 "information about reporting bugs can be found on the L<http://libguestfs.org/"
42053 #: ../test-tool/libguestfs-test-tool.pod:42
42054 msgid "Display short usage information and exit."
42058 #: ../test-tool/libguestfs-test-tool.pod:44
42059 msgid "B<--qemu qemu_binary>"
42063 #: ../test-tool/libguestfs-test-tool.pod:46
42065 "If you have downloaded another qemu binary, point this option at the full "
42066 "path of the binary to try it."
42070 #: ../test-tool/libguestfs-test-tool.pod:49
42071 msgid "B<--qemudir qemu_source_dir>"
42075 #: ../test-tool/libguestfs-test-tool.pod:51
42077 "If you have compiled qemu from source, point this option at the source "
42078 "directory to try it."
42082 #: ../test-tool/libguestfs-test-tool.pod:54
42087 #: ../test-tool/libguestfs-test-tool.pod:56
42088 msgid "B<--timeout N>"
42092 #: ../test-tool/libguestfs-test-tool.pod:58
42094 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
42095 "minutes) which does not usually need to be adjusted."
42099 #: ../test-tool/libguestfs-test-tool.pod:63
42100 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
42104 #: ../test-tool/libguestfs-test-tool.pod:65
42106 "If you have compiled another version of qemu from source and would like to "
42107 "try that, then you can use the I<--qemudir> option to point to the qemu "
42108 "source directory."
42112 #: ../test-tool/libguestfs-test-tool.pod:69
42114 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
42115 "option to point to the binary."
42119 #: ../test-tool/libguestfs-test-tool.pod:72
42121 "Note when using these options, you can ignore the business of qemu wrapper "
42122 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
42123 "wrapper script for you if one is needed."
42127 #: ../test-tool/libguestfs-test-tool.pod:76
42128 msgid "TRYING OUT A DIFFERENT KERNEL"
42132 #: ../test-tool/libguestfs-test-tool.pod:78
42134 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
42135 "libguestfs tries. You do this by setting the environment variables "
42136 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
42140 #: ../test-tool/libguestfs-test-tool.pod:82
42142 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
42147 #: ../test-tool/libguestfs-test-tool.pod:85
42148 msgid "SELF-DIAGNOSIS"
42152 #: ../test-tool/libguestfs-test-tool.pod:87
42154 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
42155 "produced by libguestfs-test-tool and/or possible errors."
42159 #: ../test-tool/libguestfs-test-tool.pod:92
42161 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
42162 "I<1> if there was an error."
42166 #: ../test-tool/libguestfs-test-tool.pod:97
42168 "For the full list of environment variables which may affect libguestfs, "
42169 "please see the L<guestfs(3)> manual page."
42173 #: ../test-tool/libguestfs-test-tool.pod:102
42174 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
42178 #: ../tools/virt-list-filesystems.pl:32
42180 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
42184 #: ../tools/virt-list-filesystems.pl:36
42187 " virt-list-filesystems [--options] domname\n"
42192 #: ../tools/virt-list-filesystems.pl:38
42195 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
42200 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
42202 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
42207 #: ../tools/virt-list-filesystems.pl:45
42209 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
42210 "are contained in a virtual machine or disk image."
42214 #: ../tools/virt-list-filesystems.pl:49
42216 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
42217 "functionality. For more complex cases you should look at the L<guestfish(1)"
42222 #: ../tools/virt-list-filesystems.pl:112
42224 "With this option, C<virt-list-filesystems> displays the type of each "
42225 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
42229 #: ../tools/virt-list-filesystems.pl:119
42234 #: ../tools/virt-list-filesystems.pl:123
42236 "Normally we only show mountable filesystems. If this option is given then "
42237 "swap devices are shown too."
42241 #: ../tools/virt-list-filesystems.pl:197
42243 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
42244 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
42245 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42249 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
42250 msgid "Copyright (C) 2009 Red Hat Inc."
42254 #: ../tools/virt-list-partitions.pl:32
42256 "virt-list-partitions - List partitions in a virtual machine or disk image"
42260 #: ../tools/virt-list-partitions.pl:36
42263 " virt-list-partitions [--options] domname\n"
42268 #: ../tools/virt-list-partitions.pl:38
42271 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
42276 #: ../tools/virt-list-partitions.pl:45
42278 "C<virt-list-partitions> is a command line tool to list the partitions that "
42279 "are contained in a virtual machine or disk image. It is mainly useful as a "
42280 "first step to using L<virt-resize(1)>."
42284 #: ../tools/virt-list-partitions.pl:50
42286 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
42287 "functionality. For more complex cases you should look at the L<guestfish(1)"
42292 #: ../tools/virt-list-partitions.pl:113
42293 msgid "Show sizes in human-readable form (eg. \"1G\")."
42297 #: ../tools/virt-list-partitions.pl:123
42299 "With this option, C<virt-list-partitions> displays the type and size of each "
42300 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
42304 #: ../tools/virt-list-partitions.pl:130
42309 #: ../tools/virt-list-partitions.pl:132
42314 #: ../tools/virt-list-partitions.pl:134
42316 "Display the total size of each block device (as a separate row or rows)."
42320 #: ../tools/virt-list-partitions.pl:267
42322 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
42323 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
42324 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
42328 #: ../tools/virt-list-partitions.pl:283
42329 msgid "Copyright (C) 2009-2010 Red Hat Inc."
42333 #: ../tools/virt-make-fs.pl:37
42334 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
42338 #: ../tools/virt-make-fs.pl:41
42341 " virt-make-fs [--options] input.tar output.img\n"
42346 #: ../tools/virt-make-fs.pl:43
42349 " virt-make-fs [--options] input.tar.gz output.img\n"
42354 #: ../tools/virt-make-fs.pl:45
42357 " virt-make-fs [--options] directory output.img\n"
42362 #: ../tools/virt-make-fs.pl:49
42364 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
42365 "archive or some files in a directory. It is similar to tools like L<mkisofs"
42366 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
42367 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
42368 "you want to attach these filesystems to existing virtual machines (eg. to "
42369 "import large amounts of read-only data to a VM)."
42373 #: ../tools/virt-make-fs.pl:57
42374 msgid "Basic usage is:"
42378 #: ../tools/virt-make-fs.pl:59
42381 " virt-make-fs input output.img\n"
42386 #: ../tools/virt-make-fs.pl:61
42388 "where C<input> is either a directory containing files that you want to add, "
42389 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
42390 "C<output.img> is a disk image. The input type is detected automatically. "
42391 "The output disk image defaults to a raw ext2 sparse image unless you specify "
42392 "extra flags (see L</OPTIONS> below)."
42396 #: ../tools/virt-make-fs.pl:67
42397 msgid "FILESYSTEM TYPE"
42401 #: ../tools/virt-make-fs.pl:69
42403 "The default filesystem type is C<ext2>. Just about any filesystem type that "
42404 "libguestfs supports can be used (but I<not> read-only formats like "
42405 "ISO9660). Here are some of the more common choices:"
42409 #: ../tools/virt-make-fs.pl:75
42414 #: ../tools/virt-make-fs.pl:77
42416 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
42417 "you are not going to use the filesystem in a way that requires the journal, "
42418 "then this is just wasted overhead."
42422 #: ../tools/virt-make-fs.pl:81
42423 msgid "I<ntfs> or I<vfat>"
42427 #: ../tools/virt-make-fs.pl:83
42428 msgid "Useful if exporting data to a Windows guest."
42432 #: ../tools/virt-make-fs.pl:85
42434 "I<Note for vfat>: The tar archive or local directory must only contain files "
42435 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
42436 "program running within libguestfs is unable to change the ownership of non-"
42437 "root files, since vfat itself does not support this."
42441 #: ../tools/virt-make-fs.pl:90
42446 #: ../tools/virt-make-fs.pl:92
42448 "Lower overhead than C<ext2>, but certain limitations on filename length and "
42449 "total filesystem size."
42453 #: ../tools/virt-make-fs.pl:97 ../tools/virt-make-fs.pl:116
42454 #: ../tools/virt-make-fs.pl:149
42459 #: ../tools/virt-make-fs.pl:99
42462 " virt-make-fs --type=minix input minixfs.img\n"
42467 #: ../tools/virt-make-fs.pl:101
42468 msgid "TO PARTITION OR NOT TO PARTITION"
42472 #: ../tools/virt-make-fs.pl:103
42473 msgid "Optionally virt-make-fs can add a partition table to the output disk."
42477 #: ../tools/virt-make-fs.pl:105
42479 "Adding a partition can make the disk image more compatible with certain "
42480 "virtualized operating systems which don't expect to see a filesystem "
42481 "directly located on a block device (Linux doesn't care and will happily "
42482 "handle both types)."
42486 #: ../tools/virt-make-fs.pl:110
42488 "On the other hand, if you have a partition table then the output image is no "
42489 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
42490 "directly on a partitioned disk image. (However libguestfs tools such as "
42491 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
42495 #: ../tools/virt-make-fs.pl:118
42496 msgid "Add an MBR partition:"
42500 #: ../tools/virt-make-fs.pl:120
42503 " virt-make-fs --partition -- input disk.img\n"
42508 #: ../tools/virt-make-fs.pl:122
42510 "If the output disk image could be terabyte-sized or larger, it's better to "
42511 "use an EFI/GPT-compatible partition table:"
42515 #: ../tools/virt-make-fs.pl:125
42518 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
42523 #: ../tools/virt-make-fs.pl:127
42524 msgid "EXTRA SPACE"
42528 #: ../tools/virt-make-fs.pl:129
42530 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
42531 "the files that it contains, but might have extra space. Depending on how "
42532 "you are going to use the output, you might think this extra space is wasted "
42533 "and want to minimize it, or you might want to leave space so that more files "
42534 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
42535 "but you can use the I<--size> flag to leave space in the filesystem if you "
42540 #: ../tools/virt-make-fs.pl:137
42542 "An alternative way to leave extra space but not make the output image any "
42543 "bigger is to use an alternative disk image format (instead of the default "
42544 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
42545 "image format (check your hypervisor supports this before using it). This "
42546 "allows you to choose a large I<--size> but the extra space won't actually be "
42547 "allocated in the image until you try to store something in it."
42551 #: ../tools/virt-make-fs.pl:145
42553 "Don't forget that you can also use local commands including L<resize2fs(8)> "
42554 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
42555 "to build another image from scratch."
42559 #: ../tools/virt-make-fs.pl:151
42562 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
42567 #: ../tools/virt-make-fs.pl:179
42568 msgid "Enable debugging information."
42572 #: ../tools/virt-make-fs.pl:185
42573 msgid "B<--size=E<lt>NE<gt>>"
42577 #: ../tools/virt-make-fs.pl:187
42578 msgid "B<--size=+E<lt>NE<gt>>"
42582 #: ../tools/virt-make-fs.pl:189
42583 msgid "B<-s E<lt>NE<gt>>"
42587 #: ../tools/virt-make-fs.pl:191
42588 msgid "B<-s +E<lt>NE<gt>>"
42592 #: ../tools/virt-make-fs.pl:193
42594 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
42598 #: ../tools/virt-make-fs.pl:196
42600 "If this option is I<not> given, then the output image will be just large "
42601 "enough to contain all the files, with not much wasted space."
42605 #: ../tools/virt-make-fs.pl:199
42607 "To choose a fixed size output disk, specify an absolute number followed by b/"
42608 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
42609 "Petabytes or Exabytes. This must be large enough to contain all the input "
42610 "files, else you will get an error."
42614 #: ../tools/virt-make-fs.pl:204
42616 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
42617 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
42618 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
42619 "the input files, and (approximately) an extra 200 MB free space."
42623 #: ../tools/virt-make-fs.pl:210
42625 "Note that virt-make-fs estimates free space, and therefore will not produce "
42626 "filesystems containing precisely the free space requested. (It is much more "
42627 "expensive and time-consuming to produce a filesystem which has precisely the "
42628 "desired free space)."
42632 #: ../tools/virt-make-fs.pl:219
42633 msgid "B<--format=E<lt>fmtE<gt>>"
42637 #: ../tools/virt-make-fs.pl:221
42638 msgid "B<-F E<lt>fmtE<gt>>"
42642 #: ../tools/virt-make-fs.pl:223
42643 msgid "Choose the output disk image format."
42647 #: ../tools/virt-make-fs.pl:225
42648 msgid "The default is C<raw> (raw sparse disk image)."
42652 #: ../tools/virt-make-fs.pl:227
42654 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
42655 "that would really make sense here is C<qcow2>."
42659 #: ../tools/virt-make-fs.pl:234
42660 msgid "B<--type=E<lt>fsE<gt>>"
42664 #: ../tools/virt-make-fs.pl:236
42665 msgid "B<-t E<lt>fsE<gt>>"
42669 #: ../tools/virt-make-fs.pl:238
42670 msgid "Choose the output filesystem type."
42674 #: ../tools/virt-make-fs.pl:240
42675 msgid "The default is C<ext2>."
42679 #: ../tools/virt-make-fs.pl:242
42681 "Any filesystem which is supported read-write by libguestfs can be used here."
42685 #: ../tools/virt-make-fs.pl:249
42686 msgid "B<--partition>"
42690 #: ../tools/virt-make-fs.pl:251
42691 msgid "B<--partition=E<lt>parttypeE<gt>>"
42695 #: ../tools/virt-make-fs.pl:253
42697 "If specified, this flag adds an MBR partition table to the output disk image."
42701 #: ../tools/virt-make-fs.pl:256
42703 "You can change the partition table type, eg. I<--partition=gpt> for large "
42708 #: ../tools/virt-make-fs.pl:259
42710 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
42711 "might consider the next parameter to be the partition type. For example:"
42715 #: ../tools/virt-make-fs.pl:263
42718 " virt-make-fs --partition input.tar output.img\n"
42723 #: ../tools/virt-make-fs.pl:265
42725 "would cause virt-make-fs to think you wanted to use a partition type of "
42726 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
42727 "dash) between options and the input and output arguments:"
42731 #: ../tools/virt-make-fs.pl:269
42734 " virt-make-fs --partition -- input.tar output.img\n"
42739 #: ../tools/virt-make-fs.pl:271
42740 msgid "For MBR, virt-make-fs sets the partition type byte automatically."
42744 #: ../tools/virt-make-fs.pl:559
42746 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
42747 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
42748 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
42752 #: ../tools/virt-make-fs.pl:573 ../tools/virt-win-reg.pl:774
42754 "When reporting bugs, please enable debugging and capture the I<complete> "
42759 #: ../tools/virt-make-fs.pl:576
42762 " export LIBGUESTFS_DEBUG=1\n"
42763 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
42768 #: ../tools/virt-make-fs.pl:579
42770 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
42775 #: ../tools/virt-tar.pl:33
42776 msgid "virt-tar - Extract or upload files to a virtual machine"
42780 #: ../tools/virt-tar.pl:37
42783 " virt-tar [--options] -x domname directory tarball\n"
42788 #: ../tools/virt-tar.pl:39
42791 " virt-tar [--options] -u domname tarball directory\n"
42796 #: ../tools/virt-tar.pl:41
42799 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
42804 #: ../tools/virt-tar.pl:43
42807 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
42812 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
42817 #: ../tools/virt-tar.pl:47
42819 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
42820 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
42824 #: ../tools/virt-tar.pl:52
42825 msgid "Download C</home> from the VM into a local tarball:"
42829 #: ../tools/virt-tar.pl:54
42832 " virt-tar -x domname /home home.tar\n"
42837 #: ../tools/virt-tar.pl:56
42840 " virt-tar -zx domname /home home.tar.gz\n"
42845 #: ../tools/virt-tar.pl:58
42846 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
42850 #: ../tools/virt-tar.pl:60
42853 " virt-tar -u domname uploadstuff.tar /tmp\n"
42858 #: ../tools/virt-tar.pl:62
42861 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
42866 #: ../tools/virt-tar.pl:66
42868 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
42869 "virtual machines. If you do this, you risk disk corruption in the VM. "
42870 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
42874 #: ../tools/virt-tar.pl:71
42876 "You can use I<-x> (extract) on live virtual machines, but you might get "
42877 "inconsistent results or errors if there is filesystem activity inside the "
42878 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
42879 "work, but the only way to guarantee consistent results is if the virtual "
42880 "machine is shut down."
42884 #: ../tools/virt-tar.pl:79
42886 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
42887 "parts of a guest filesystem. There are many possibilities: making backups, "
42888 "uploading data files, snooping on guest activity, fixing or customizing "
42893 #: ../tools/virt-tar.pl:84
42895 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
42896 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
42897 "should look at the L<guestfish(1)> tool."
42901 #: ../tools/virt-tar.pl:88
42903 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
42904 "its contents (recursively) from the virtual machine into a local tarball. "
42905 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
42906 "virtual machine. You cannot use these two options together."
42910 #: ../tools/virt-tar.pl:94
42912 "In addition, you may need to use the I<-z> (gZip) option to enable "
42913 "compression. When uploading, you have to specify I<-z> if the upload file "
42914 "is compressed because virt-tar won't detect this on its own."
42918 #: ../tools/virt-tar.pl:98
42920 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
42921 "example it cannot do PKZip files or bzip2 compression. If you want that "
42922 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
42923 "the L<libguestfs(3)> API)."
42927 #: ../tools/virt-tar.pl:160
42928 msgid "B<--extract>"
42932 #: ../tools/virt-tar.pl:162
42933 msgid "B<--download>"
42937 #: ../tools/virt-tar.pl:164
42942 #: ../tools/virt-tar.pl:166
42943 msgid "B<--upload>"
42947 #: ../tools/virt-tar.pl:168
42949 "Use I<-x> to extract (download) a directory from a virtual machine to a "
42954 #: ../tools/virt-tar.pl:171
42956 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
42957 "Please read the L</WARNING> section above before using this option."
42961 #: ../tools/virt-tar.pl:175
42962 msgid "You must specify exactly one of these options."
42966 #: ../tools/virt-tar.pl:181
42971 #: ../tools/virt-tar.pl:183
42976 #: ../tools/virt-tar.pl:185
42977 msgid "Specify that the input or output tarball is gzip-compressed."
42981 #: ../tools/virt-tar.pl:298
42983 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
42984 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
42985 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
42990 #: ../tools/virt-win-reg.pl:37
42992 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
42996 #: ../tools/virt-win-reg.pl:41
42999 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
43004 #: ../tools/virt-win-reg.pl:43
43007 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
43012 #: ../tools/virt-win-reg.pl:45
43015 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
43020 #: ../tools/virt-win-reg.pl:47
43023 " virt-win-reg --merge domname [input.reg ...]\n"
43028 #: ../tools/virt-win-reg.pl:49
43031 " virt-win-reg [--options] disk.img ... # instead of domname\n"
43036 #: ../tools/virt-win-reg.pl:53
43038 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
43039 "virtual machines. If you do this, you I<will> get irreversible disk "
43040 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
43041 "but doesn't catch all cases."
43045 #: ../tools/virt-win-reg.pl:58
43047 "Modifying the Windows Registry is an inherently risky operation. The format "
43048 "is deliberately obscure and undocumented, and Registry changes can leave the "
43049 "system unbootable. Therefore when using the I<--merge> option, make sure "
43050 "you have a reliable backup first."
43054 #: ../tools/virt-win-reg.pl:65
43056 "This program can export and merge Windows Registry entries from a Windows "
43061 #: ../tools/virt-win-reg.pl:68
43063 "The first parameter is the libvirt guest name or the raw disk image of a "
43068 #: ../tools/virt-win-reg.pl:71
43070 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
43071 "exported (recursively). For example:"
43075 #: ../tools/virt-win-reg.pl:74
43078 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
43083 #: ../tools/virt-win-reg.pl:76
43085 "You can also display single values from within registry keys, for example:"
43089 #: ../tools/virt-win-reg.pl:79
43092 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
43093 " $ virt-win-reg Windows7 $cvkey ProductName\n"
43094 " Windows 7 Enterprise\n"
43099 #: ../tools/virt-win-reg.pl:83
43101 "With I<--merge>, you can merge a textual regedit file into the Windows "
43106 #: ../tools/virt-win-reg.pl:86
43109 " $ virt-win-reg --merge Windows7 changes.reg\n"
43114 #: ../tools/virt-win-reg.pl:90
43116 "This program is only meant for simple access to the registry. If you want "
43117 "to do complicated things with the registry, we suggest you download the "
43118 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
43119 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
43120 "L<hivexregedit(1)>."
43124 #: ../tools/virt-win-reg.pl:159
43129 #: ../tools/virt-win-reg.pl:161
43131 "In merge mode, this merges a textual regedit file into the Windows Registry "
43132 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
43133 "displays or exports Registry entries instead."
43137 #: ../tools/virt-win-reg.pl:165
43139 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
43140 "result in disk corruption. However exporting (without this flag) is always "
43145 #: ../tools/virt-win-reg.pl:173
43146 msgid "B<--encoding> UTF-16LE|ASCII"
43150 #: ../tools/virt-win-reg.pl:175
43152 "When merging (only), you may need to specify the encoding for strings to be "
43153 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
43154 "(3)/ENCODING STRINGS>."
43158 #: ../tools/virt-win-reg.pl:179
43160 "The default is to use UTF-16LE, which should work with recent versions of "
43165 #: ../tools/virt-win-reg.pl:186
43166 msgid "B<--unsafe-printable-strings>"
43170 #: ../tools/virt-win-reg.pl:188
43172 "When exporting (only), assume strings are UTF-16LE and print them as strings "
43173 "instead of hex sequences. Remove the final zero codepoint from strings if "
43178 #: ../tools/virt-win-reg.pl:192
43180 "This is unsafe and does not preserve the fidelity of strings in the original "
43181 "Registry for various reasons:"
43185 #: ../tools/virt-win-reg.pl:199
43187 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
43188 "other encodings will be corrupted by this transformation."
43192 #: ../tools/virt-win-reg.pl:204
43194 "Assumes that everything which has type 1 or 2 is really a string and that "
43195 "everything else is not a string, but the type field in real Registries is "
43200 #: ../tools/virt-win-reg.pl:210
43202 "Loses information about whether a zero codepoint followed the string in the "
43207 #: ../tools/virt-win-reg.pl:215
43209 "This all happens because the Registry itself contains no information about "
43210 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
43214 #: ../tools/virt-win-reg.pl:219
43216 "You should only use this option for quick hacking and debugging of the "
43217 "Registry contents, and I<never> use it if the output is going to be passed "
43218 "into another program or stored in another Registry."
43222 #: ../tools/virt-win-reg.pl:556
43223 msgid "SUPPORTED SYSTEMS"
43227 #: ../tools/virt-win-reg.pl:558
43229 "The program currently supports Windows NT-derived guests starting with "
43230 "Windows XP through to at least Windows 7."
43234 #: ../tools/virt-win-reg.pl:561
43235 msgid "The following Registry keys are supported:"
43239 #: ../tools/virt-win-reg.pl:565
43240 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
43244 #: ../tools/virt-win-reg.pl:567
43245 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
43249 #: ../tools/virt-win-reg.pl:569
43250 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
43254 #: ../tools/virt-win-reg.pl:571
43255 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
43259 #: ../tools/virt-win-reg.pl:573
43260 msgid "C<HKEY_USERS\\.DEFAULT>"
43264 #: ../tools/virt-win-reg.pl:575
43265 msgid "C<HKEY_USERS\\I<SID>>"
43269 #: ../tools/virt-win-reg.pl:577
43270 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
43274 #: ../tools/virt-win-reg.pl:579
43275 msgid "C<HKEY_USERS\\I<username>>"
43279 #: ../tools/virt-win-reg.pl:581
43281 "where I<username> is a local user name (this is a libguestfs extension)."
43285 #: ../tools/virt-win-reg.pl:585
43287 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
43292 #: ../tools/virt-win-reg.pl:588
43294 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
43295 "supported (there is no \"current user\")."
43299 #: ../tools/virt-win-reg.pl:591
43304 #: ../tools/virt-win-reg.pl:593
43306 "C<virt-win-reg> expects that regedit files have already been reencoded in "
43307 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
43308 "style line endings. Since Windows regedit files are often in UTF-16LE with "
43309 "Windows-style line endings, you may need to reencode the whole file before "
43310 "or after processing."
43314 #: ../tools/virt-win-reg.pl:599
43316 "To reencode a file from Windows format to Linux (before processing it with "
43317 "the I<--merge> option), you would do something like this:"
43321 #: ../tools/virt-win-reg.pl:602
43324 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
43329 #: ../tools/virt-win-reg.pl:604
43331 "To go in the opposite direction, after exporting and before sending the file "
43332 "to a Windows user, do something like this:"
43336 #: ../tools/virt-win-reg.pl:607
43339 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
43344 #: ../tools/virt-win-reg.pl:609
43345 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
43349 #: ../tools/virt-win-reg.pl:611
43351 "If you are unsure about the current encoding, use the L<file(1)> command. "
43352 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
43353 "style (CRLF) line endings, like this:"
43357 #: ../tools/virt-win-reg.pl:615
43360 " $ file software.reg\n"
43361 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
43362 " with CRLF line terminators\n"
43367 #: ../tools/virt-win-reg.pl:619
43368 msgid "This file would need conversion before you could I<--merge> it."
43372 #: ../tools/virt-win-reg.pl:621
43373 msgid "CurrentControlSet etc."
43377 #: ../tools/virt-win-reg.pl:623
43379 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
43380 "Registry at the level of the hive file, and therefore you cannot modify "
43385 #: ../tools/virt-win-reg.pl:627
43387 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
43388 "circumstances it might refer to another control set. The way to find out is "
43389 "to look at the C<HKLM\\SYSTEM\\Select> key:"
43393 #: ../tools/virt-win-reg.pl:631
43396 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
43397 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
43398 " \"Current\"=dword:00000001\n"
43399 " \"Default\"=dword:00000001\n"
43400 " \"Failed\"=dword:00000000\n"
43401 " \"LastKnownGood\"=dword:00000002\n"
43406 #: ../tools/virt-win-reg.pl:638
43407 msgid "\"Current\" is the one which Windows will choose when it boots."
43411 #: ../tools/virt-win-reg.pl:640
43413 "Similarly, other C<Current...> keys in the path may need to be replaced."
43417 #: ../tools/virt-win-reg.pl:643
43418 msgid "DELETING REGISTRY KEYS AND VALUES"
43422 #: ../tools/virt-win-reg.pl:645
43423 msgid "To delete a whole registry key, use the syntax:"
43427 #: ../tools/virt-win-reg.pl:647
43430 " [-HKEY_LOCAL_MACHINE\\Foo]\n"
43435 #: ../tools/virt-win-reg.pl:649
43436 msgid "To delete a single value within a key, use the syntax:"
43440 #: ../tools/virt-win-reg.pl:651
43443 " [HKEY_LOCAL_MACHINE\\Foo]\n"
43449 #: ../tools/virt-win-reg.pl:654
43450 msgid "WINDOWS TIPS"
43454 #: ../tools/virt-win-reg.pl:656
43456 "Note that some of these tips modify the guest disk image. The guest I<must> "
43457 "be shut off, else you will get disk corruption."
43461 #: ../tools/virt-win-reg.pl:659
43462 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
43466 #: ../tools/virt-win-reg.pl:661
43468 "Prepare a DOS batch script, VBScript or executable. Upload this using "
43469 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
43470 "is uploaded into C<C:\\>:"
43474 #: ../tools/virt-win-reg.pl:665
43477 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
43482 #: ../tools/virt-win-reg.pl:667
43483 msgid "Prepare a regedit file containing the registry change:"
43487 #: ../tools/virt-win-reg.pl:669
43490 " cat > test.reg <<'EOF'\n"
43491 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
43492 " \"Test\"=\"c:\\\\test.bat\"\n"
43498 #: ../tools/virt-win-reg.pl:674
43500 "In this example we use the key C<RunOnce> which means that the script will "
43501 "run precisely once when the first user logs in. If you want it to run every "
43502 "time a user logs in, replace C<RunOnce> with C<Run>."
43506 #: ../tools/virt-win-reg.pl:678
43507 msgid "Now update the registry:"
43511 #: ../tools/virt-win-reg.pl:680
43514 " virt-win-reg --merge WindowsGuest test.reg\n"
43519 #: ../tools/virt-win-reg.pl:682
43520 msgid "INSTALLING A SERVICE"
43524 #: ../tools/virt-win-reg.pl:684
43526 "This section assumes you are familiar with Windows services, and you either "
43527 "have a program which handles the Windows Service Control Protocol directly "
43528 "or you want to run any program using a service wrapper like SrvAny or the "
43533 #: ../tools/virt-win-reg.pl:689
43535 "First upload the program and optionally the service wrapper. In this case "
43536 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
43540 #: ../tools/virt-win-reg.pl:693
43543 " guestfish -i -d WindowsGuest <<EOF\n"
43544 " upload rhsrvany.exe /rhsrvany.exe\n"
43545 " upload test.exe /test.exe\n"
43551 #: ../tools/virt-win-reg.pl:698
43553 "Prepare a regedit file containing the registry changes. In this example, "
43554 "the first registry change is needed for the service itself or the service "
43555 "wrapper (if used). The second registry change is only needed because I am "
43556 "using the RHSrvAny service wrapper."
43560 #: ../tools/virt-win-reg.pl:703
43563 " cat > service.reg <<'EOF'\n"
43564 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
43565 " \"Type\"=dword:00000010\n"
43566 " \"Start\"=dword:00000002\n"
43567 " \"ErrorControl\"=dword:00000001\n"
43568 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
43569 " \"DisplayName\"=\"RHSrvAny\"\n"
43570 " \"ObjectName\"=\"NetworkService\"\n"
43575 #: ../tools/virt-win-reg.pl:712
43578 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
43579 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
43580 " \"PWD\"=\"c:\\\\Temp\"\n"
43586 #: ../tools/virt-win-reg.pl:723
43588 "For use of C<ControlSet001> see the section above in this manual page. You "
43589 "may need to adjust this according to the control set that is in use by the "
43594 #: ../tools/virt-win-reg.pl:729
43596 "C<\"ObjectName\"> controls the privileges that the service will have. An "
43597 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
43598 "privileged account."
43602 #: ../tools/virt-win-reg.pl:735
43604 "For the meaning of the magic numbers, see this Microsoft KB article: "
43605 "L<http://support.microsoft.com/kb/103000>."
43609 #: ../tools/virt-win-reg.pl:740
43610 msgid "Update the registry:"
43614 #: ../tools/virt-win-reg.pl:742
43617 " virt-win-reg --merge WindowsGuest service.reg\n"
43622 #: ../tools/virt-win-reg.pl:746
43624 "Be careful when passing parameters containing C<\\> (backslash) in the "
43625 "shell. Usually you will have to use 'single quotes' or double backslashes "
43626 "(but not both) to protect them from the shell."
43630 #: ../tools/virt-win-reg.pl:750
43631 msgid "Paths and value names are case-insensitive."
43635 #: ../tools/virt-win-reg.pl:759
43637 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
43638 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
43639 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
43643 #: ../tools/virt-win-reg.pl:777
43646 " export LIBGUESTFS_DEBUG=1\n"
43647 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
43652 #: ../tools/virt-win-reg.pl:780
43654 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."