1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
5 # rjones <rjones@redhat.com>, 2011.
8 "Project-Id-Version: libguestfs\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-10-14 15:06+0200\n"
11 "PO-Revision-Date: 2011-07-17 20:50+0000\n"
12 "Last-Translator: rjones <rjones@redhat.com>\n"
13 "Language-Team: Japanese (http://www.transifex.net/projects/p/fedora/team/"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=1; plural=0\n"
22 #: ../align/virt-alignment-scan.pod:3 ../cat/virt-cat.pod:3
23 #: ../cat/virt-filesystems.pod:3 ../cat/virt-ls.pod:3
24 #: ../clone/virt-sysprep.pod:3 ../df/virt-df.pod:3 ../edit/virt-edit.pod:3
25 #: ../erlang/examples/guestfs-erlang.pod:3 ../examples/guestfs-examples.pod:3
26 #: ../examples/guestfs-recipes.pod:14 ../fish/guestfish.pod:3
27 #: ../fish/virt-copy-in.pod:3 ../fish/virt-copy-out.pod:3
28 #: ../fish/virt-tar-in.pod:3 ../fish/virt-tar-out.pod:3
29 #: ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pod:3
30 #: ../java/examples/guestfs-java.pod:3 ../ocaml/examples/guestfs-ocaml.pod:3
31 #: ../perl/examples/guestfs-perl.pod:3 ../python/examples/guestfs-python.pod:3
32 #: ../rescue/virt-rescue.pod:3 ../resize/virt-resize.pod:3
33 #: ../ruby/examples/guestfs-ruby.pod:3 ../sparsify/virt-sparsify.pod:3
34 #: ../src/guestfs.pod:3 ../test-tool/libguestfs-test-tool.pod:3
35 #: ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30
36 #: ../tools/virt-make-fs.pl:35 ../tools/virt-tar.pl:31
37 #: ../tools/virt-win-reg.pl:35
42 #: ../align/virt-alignment-scan.pod:5
43 msgid "virt-alignment-scan - Check alignment of virtual machine partitions"
47 #: ../align/virt-alignment-scan.pod:7 ../cat/virt-cat.pod:7
48 #: ../cat/virt-filesystems.pod:7 ../cat/virt-ls.pod:7
49 #: ../clone/virt-sysprep.pod:7 ../df/virt-df.pod:7 ../edit/virt-edit.pod:7
50 #: ../erlang/examples/guestfs-erlang.pod:7 ../examples/guestfs-examples.pod:7
51 #: ../fish/guestfish.pod:7 ../fish/virt-copy-in.pod:7
52 #: ../fish/virt-copy-out.pod:7 ../fish/virt-tar-in.pod:7
53 #: ../fish/virt-tar-out.pod:7 ../fuse/guestmount.pod:7
54 #: ../inspector/virt-inspector.pod:7 ../java/examples/guestfs-java.pod:7
55 #: ../ocaml/examples/guestfs-ocaml.pod:7 ../perl/examples/guestfs-perl.pod:7
56 #: ../python/examples/guestfs-python.pod:7 ../rescue/virt-rescue.pod:7
57 #: ../resize/virt-resize.pod:7 ../ruby/examples/guestfs-ruby.pod:7
58 #: ../sparsify/virt-sparsify.pod:7 ../src/guestfs.pod:7
59 #: ../test-tool/libguestfs-test-tool.pod:7
60 #: ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34
61 #: ../tools/virt-make-fs.pl:39 ../tools/virt-tar.pl:35
62 #: ../tools/virt-win-reg.pl:39
67 #: ../align/virt-alignment-scan.pod:9
70 " virt-alignment-scan [--options] -d domname\n"
75 #: ../align/virt-alignment-scan.pod:11
78 " virt-alignment-scan [--options] -a disk.img [-a disk.img ...]\n"
83 #: ../align/virt-alignment-scan.pod:13 ../cat/virt-cat.pod:19
84 #: ../cat/virt-filesystems.pod:13 ../cat/virt-ls.pod:19
85 #: ../clone/virt-sysprep.pod:13 ../df/virt-df.pod:21 ../edit/virt-edit.pod:27
86 #: ../erlang/examples/guestfs-erlang.pod:16
87 #: ../examples/guestfs-examples.pod:19 ../examples/guestfs-recipes.pod:18
88 #: ../fish/guestfish.pod:30 ../fish/virt-copy-in.pod:19
89 #: ../fish/virt-copy-out.pod:13 ../fish/virt-tar-in.pod:21
90 #: ../fish/virt-tar-out.pod:15 ../fuse/guestmount.pod:20
91 #: ../inspector/virt-inspector.pod:19 ../java/examples/guestfs-java.pod:15
92 #: ../ocaml/examples/guestfs-ocaml.pod:25 ../perl/examples/guestfs-perl.pod:18
93 #: ../python/examples/guestfs-python.pod:14 ../rescue/virt-rescue.pod:29
94 #: ../resize/virt-resize.pod:13 ../ruby/examples/guestfs-ruby.pod:15
95 #: ../sparsify/virt-sparsify.pod:11 ../src/guestfs.pod:23
96 #: ../test-tool/libguestfs-test-tool.pod:11
97 #: ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40
98 #: ../tools/virt-make-fs.pl:47 ../tools/virt-tar.pl:77
99 #: ../tools/virt-win-reg.pl:63
104 #: ../align/virt-alignment-scan.pod:15
106 "When older operating systems install themselves, the partitioning tools "
107 "place partitions at a sector misaligned with the underlying storage "
108 "(commonly the first partition starts on sector C<63>). Misaligned "
109 "partitions can result in an operating system issuing more I/O than should be "
114 #: ../align/virt-alignment-scan.pod:21
116 "The virt-alignment-scan tool checks the alignment of partitions in virtual "
117 "machines and disk images and warns you if there are alignment problems."
121 #: ../align/virt-alignment-scan.pod:25
123 "Currently there is no virt tool for fixing alignment problems. You can only "
124 "reinstall the guest operating system. The following NetApp document "
125 "summarises the problem and possible solutions: L<http://media.netapp.com/"
126 "documents/tr-3747.pdf>"
130 #: ../align/virt-alignment-scan.pod:30
135 #: ../align/virt-alignment-scan.pod:32
136 msgid "To run this tool on a disk image directly, use the I<-a> option:"
140 #: ../align/virt-alignment-scan.pod:34
143 " $ virt-alignment-scan -a winxp.img\n"
144 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
149 #: ../align/virt-alignment-scan.pod:37
152 " $ virt-alignment-scan -a fedora16.img\n"
153 " /dev/sda1 1048576 1024K ok\n"
154 " /dev/sda2 2097152 2048K ok\n"
155 " /dev/sda3 526385152 2048K ok\n"
160 #: ../align/virt-alignment-scan.pod:42
162 "To run the tool on a guest known to libvirt, use the I<-d> option and "
163 "possibly the I<-c> option:"
167 #: ../align/virt-alignment-scan.pod:45
170 " # virt-alignment-scan -d RHEL5\n"
171 " /dev/sda1 32256 512 bad (alignment < 4K)\n"
172 " /dev/sda2 106928640 512 bad (alignment < 4K)\n"
177 #: ../align/virt-alignment-scan.pod:49
180 " $ virt-alignment-scan -c qemu:///system -d Win7TwoDisks\n"
181 " /dev/sda1 1048576 1024K ok\n"
182 " /dev/sda2 105906176 1024K ok\n"
183 " /dev/sdb1 65536 64K ok\n"
188 #: ../align/virt-alignment-scan.pod:54
190 "The output consists of 4 or more whitespace-separated columns. Only the "
191 "first 4 columns are signficant if you want to parse this from a program. "
196 #: ../align/virt-alignment-scan.pod:60
201 #: ../align/virt-alignment-scan.pod:62
203 "the device and partition name (eg. C</dev/sda1> meaning the first partition "
204 "on the first block device)"
208 #: ../align/virt-alignment-scan.pod:65
213 #: ../align/virt-alignment-scan.pod:67
214 msgid "the start of the partition in bytes"
218 #: ../align/virt-alignment-scan.pod:69
223 #: ../align/virt-alignment-scan.pod:71
224 msgid "the alignment in bytes or Kbytes (eg. C<512> or C<4K>)"
228 #: ../align/virt-alignment-scan.pod:73
233 #: ../align/virt-alignment-scan.pod:75
235 "C<ok> if the alignment is best for performance, or C<bad> if the alignment "
236 "can cause performance problems"
240 #: ../align/virt-alignment-scan.pod:78
245 #: ../align/virt-alignment-scan.pod:80
246 msgid "optional free-text explanation."
250 #: ../align/virt-alignment-scan.pod:84
252 "The exit code from the program changes depending on whether poorly aligned "
253 "partitions were found. See L</EXIT STATUS> below."
257 #: ../align/virt-alignment-scan.pod:87
258 msgid "If you just want the exit code with no output, use the I<-q> option."
262 #: ../align/virt-alignment-scan.pod:89 ../cat/virt-cat.pod:62
263 #: ../cat/virt-filesystems.pod:91 ../cat/virt-ls.pod:261
264 #: ../clone/virt-sysprep.pod:42 ../df/virt-df.pod:59 ../edit/virt-edit.pod:62
265 #: ../fish/guestfish.pod:148 ../fish/virt-copy-in.pod:45
266 #: ../fish/virt-copy-out.pod:34 ../fish/virt-tar-in.pod:42
267 #: ../fish/virt-tar-out.pod:36 ../fuse/guestmount.pod:92
268 #: ../inspector/virt-inspector.pod:55 ../rescue/virt-rescue.pod:84
269 #: ../resize/virt-resize.pod:241 ../sparsify/virt-sparsify.pod:99
270 #: ../test-tool/libguestfs-test-tool.pod:36
271 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-list-partitions.pl:54
272 #: ../tools/virt-make-fs.pl:153 ../tools/virt-tar.pl:103
273 #: ../tools/virt-win-reg.pl:96
278 #: ../align/virt-alignment-scan.pod:93 ../cat/virt-cat.pod:66
279 #: ../cat/virt-filesystems.pod:95 ../cat/virt-ls.pod:265
280 #: ../clone/virt-sysprep.pod:46 ../df/virt-df.pod:63 ../edit/virt-edit.pod:66
281 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:160
282 #: ../inspector/virt-inspector.pod:59 ../rescue/virt-rescue.pod:88
283 #: ../resize/virt-resize.pod:245 ../sparsify/virt-sparsify.pod:103
284 #: ../test-tool/libguestfs-test-tool.pod:40
285 #: ../tools/virt-list-filesystems.pl:61 ../tools/virt-list-partitions.pl:62
286 #: ../tools/virt-make-fs.pl:161 ../tools/virt-tar.pl:111
287 #: ../tools/virt-win-reg.pl:104
292 #: ../align/virt-alignment-scan.pod:95 ../cat/virt-cat.pod:68
293 #: ../cat/virt-filesystems.pod:97 ../cat/virt-ls.pod:267
294 #: ../clone/virt-sysprep.pod:48 ../df/virt-df.pod:65 ../edit/virt-edit.pod:68
295 #: ../inspector/virt-inspector.pod:61 ../rescue/virt-rescue.pod:90
296 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-list-partitions.pl:64
297 #: ../tools/virt-make-fs.pl:163 ../tools/virt-tar.pl:113
298 #: ../tools/virt-win-reg.pl:106
299 msgid "Display brief help."
303 #: ../align/virt-alignment-scan.pod:97 ../cat/virt-cat.pod:70
304 #: ../cat/virt-filesystems.pod:99 ../cat/virt-ls.pod:269
305 #: ../clone/virt-sysprep.pod:50 ../df/virt-df.pod:67 ../edit/virt-edit.pod:70
306 #: ../inspector/virt-inspector.pod:63 ../rescue/virt-rescue.pod:92
311 #: ../align/virt-alignment-scan.pod:99 ../cat/virt-cat.pod:72
312 #: ../cat/virt-filesystems.pod:101 ../cat/virt-ls.pod:271
313 #: ../clone/virt-sysprep.pod:52 ../df/virt-df.pod:69 ../edit/virt-edit.pod:72
314 #: ../inspector/virt-inspector.pod:65 ../rescue/virt-rescue.pod:94
315 msgid "B<--add> file"
319 #: ../align/virt-alignment-scan.pod:101 ../clone/virt-sysprep.pod:54
320 msgid "Add I<file> which should be a disk image from a virtual machine."
324 #: ../align/virt-alignment-scan.pod:103 ../cat/virt-cat.pod:78
325 #: ../cat/virt-filesystems.pod:107 ../cat/virt-ls.pod:277
326 #: ../clone/virt-sysprep.pod:56 ../df/virt-df.pod:75 ../edit/virt-edit.pod:78
327 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:102
328 #: ../inspector/virt-inspector.pod:71 ../rescue/virt-rescue.pod:100
330 "The format of the disk image is auto-detected. To override this and force a "
331 "particular format use the I<--format=..> option."
335 #: ../align/virt-alignment-scan.pod:106 ../cat/virt-cat.pod:81
336 #: ../cat/virt-filesystems.pod:125 ../cat/virt-ls.pod:291
337 #: ../clone/virt-sysprep.pod:59 ../df/virt-df.pod:78
338 #: ../rescue/virt-rescue.pod:107
343 #: ../align/virt-alignment-scan.pod:108 ../cat/virt-cat.pod:83
344 #: ../cat/virt-filesystems.pod:127 ../cat/virt-ls.pod:293
345 #: ../clone/virt-sysprep.pod:61 ../df/virt-df.pod:80
346 #: ../rescue/virt-rescue.pod:109
347 msgid "B<--connect> URI"
351 #: ../align/virt-alignment-scan.pod:110 ../cat/virt-cat.pod:85
352 #: ../cat/virt-filesystems.pod:129 ../cat/virt-ls.pod:295
353 #: ../clone/virt-sysprep.pod:63 ../df/virt-df.pod:82 ../edit/virt-edit.pod:99
354 #: ../inspector/virt-inspector.pod:78 ../rescue/virt-rescue.pod:111
355 #: ../tools/virt-list-filesystems.pl:81 ../tools/virt-list-partitions.pl:82
356 #: ../tools/virt-tar.pl:131 ../tools/virt-win-reg.pl:132
358 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
359 "to the default libvirt hypervisor."
363 #: ../align/virt-alignment-scan.pod:113 ../cat/virt-cat.pod:88
364 #: ../cat/virt-filesystems.pod:132 ../cat/virt-ls.pod:298
365 #: ../clone/virt-sysprep.pod:66 ../df/virt-df.pod:85
366 #: ../rescue/virt-rescue.pod:114
368 "If you specify guest block devices directly (I<-a>), then libvirt is not "
373 #: ../align/virt-alignment-scan.pod:116 ../cat/virt-cat.pod:91
374 #: ../cat/virt-filesystems.pod:141 ../cat/virt-ls.pod:307
375 #: ../clone/virt-sysprep.pod:69 ../df/virt-df.pod:94 ../edit/virt-edit.pod:105
376 #: ../inspector/virt-inspector.pod:85 ../rescue/virt-rescue.pod:117
381 #: ../align/virt-alignment-scan.pod:118 ../cat/virt-cat.pod:93
382 #: ../cat/virt-filesystems.pod:143 ../cat/virt-ls.pod:309
383 #: ../clone/virt-sysprep.pod:71 ../df/virt-df.pod:96 ../edit/virt-edit.pod:107
384 #: ../inspector/virt-inspector.pod:87 ../rescue/virt-rescue.pod:119
385 msgid "B<--domain> guest"
389 #: ../align/virt-alignment-scan.pod:120 ../cat/virt-cat.pod:95
390 #: ../cat/virt-filesystems.pod:145 ../cat/virt-ls.pod:311
391 #: ../clone/virt-sysprep.pod:73 ../df/virt-df.pod:98 ../edit/virt-edit.pod:109
392 #: ../inspector/virt-inspector.pod:89 ../rescue/virt-rescue.pod:121
394 "Add all the disks from the named libvirt guest. Domain UUIDs can be used "
399 #: ../align/virt-alignment-scan.pod:123 ../cat/virt-cat.pod:105
400 #: ../cat/virt-filesystems.pod:170 ../cat/virt-ls.pod:328
401 #: ../clone/virt-sysprep.pod:95 ../df/virt-df.pod:101
402 #: ../fish/guestfish.pod:233 ../fuse/guestmount.pod:142
403 #: ../inspector/virt-inspector.pod:99 ../rescue/virt-rescue.pod:124
404 msgid "B<--format=raw|qcow2|..>"
408 #: ../align/virt-alignment-scan.pod:125 ../cat/virt-cat.pod:107
409 #: ../cat/virt-filesystems.pod:172 ../cat/virt-ls.pod:330
410 #: ../clone/virt-sysprep.pod:97 ../df/virt-df.pod:103
411 #: ../edit/virt-edit.pod:134 ../fish/guestfish.pod:235
412 #: ../fuse/guestmount.pod:144 ../inspector/virt-inspector.pod:101
413 #: ../rescue/virt-rescue.pod:126
418 #: ../align/virt-alignment-scan.pod:127 ../cat/virt-cat.pod:109
419 #: ../cat/virt-filesystems.pod:174 ../cat/virt-ls.pod:332
420 #: ../clone/virt-sysprep.pod:99 ../df/virt-df.pod:105
421 #: ../edit/virt-edit.pod:136 ../fish/guestfish.pod:237
422 #: ../fuse/guestmount.pod:146 ../rescue/virt-rescue.pod:128
424 "The default for the I<-a> option is to auto-detect the format of the disk "
425 "image. Using this forces the disk format for I<-a> options which follow on "
426 "the command line. Using I<--format> with no argument switches back to auto-"
427 "detection for subsequent I<-a> options."
431 #: ../align/virt-alignment-scan.pod:132 ../cat/virt-cat.pod:114
432 #: ../cat/virt-filesystems.pod:179 ../cat/virt-ls.pod:337
433 #: ../clone/virt-sysprep.pod:104 ../df/virt-df.pod:110
434 #: ../edit/virt-edit.pod:141 ../fish/guestfish.pod:242
435 #: ../fish/guestfish.pod:673 ../inspector/virt-inspector.pod:336
436 #: ../rescue/virt-rescue.pod:133 ../src/guestfs.pod:2862
441 #: ../align/virt-alignment-scan.pod:134
444 " virt-alignment-scan --format=raw -a disk.img\n"
449 #: ../align/virt-alignment-scan.pod:136 ../cat/virt-cat.pod:118
450 #: ../cat/virt-filesystems.pod:183 ../cat/virt-ls.pod:341
451 #: ../clone/virt-sysprep.pod:108 ../df/virt-df.pod:114
452 #: ../edit/virt-edit.pod:145 ../fish/guestfish.pod:246
453 #: ../rescue/virt-rescue.pod:137
454 msgid "forces raw format (no auto-detection) for C<disk.img>."
458 #: ../align/virt-alignment-scan.pod:138
461 " virt-alignment-scan --format=raw -a disk.img --format -a another.img\n"
466 #: ../align/virt-alignment-scan.pod:140 ../cat/virt-cat.pod:122
467 #: ../cat/virt-filesystems.pod:187 ../cat/virt-ls.pod:345
468 #: ../clone/virt-sysprep.pod:112 ../df/virt-df.pod:118
469 #: ../edit/virt-edit.pod:149 ../fish/guestfish.pod:250
470 #: ../rescue/virt-rescue.pod:141
472 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
473 "detection for C<another.img>."
477 #: ../align/virt-alignment-scan.pod:143 ../cat/virt-cat.pod:125
478 #: ../cat/virt-filesystems.pod:190 ../cat/virt-ls.pod:348
479 #: ../clone/virt-sysprep.pod:115 ../df/virt-df.pod:121
480 #: ../edit/virt-edit.pod:152 ../rescue/virt-rescue.pod:144
482 "If you have untrusted raw-format guest disk images, you should use this "
483 "option to specify the disk format. This avoids a possible security problem "
484 "with malicious guests (CVE-2010-3851)."
488 #: ../align/virt-alignment-scan.pod:147 ../resize/virt-resize.pod:414
489 #: ../sparsify/virt-sparsify.pod:153
494 #: ../align/virt-alignment-scan.pod:149 ../resize/virt-resize.pod:416
495 #: ../sparsify/virt-sparsify.pod:155
500 #: ../align/virt-alignment-scan.pod:151
502 "Don't produce any output. Just set the exit code (see L</EXIT STATUS> "
507 #: ../align/virt-alignment-scan.pod:154 ../cat/virt-cat.pod:134
508 #: ../cat/virt-filesystems.pod:261 ../cat/virt-ls.pod:425
509 #: ../clone/virt-sysprep.pod:138 ../df/virt-df.pod:173
510 #: ../edit/virt-edit.pod:161 ../fish/guestfish.pod:390
511 #: ../fuse/guestmount.pod:266 ../inspector/virt-inspector.pod:119
512 #: ../rescue/virt-rescue.pod:182 ../sparsify/virt-sparsify.pod:159
517 #: ../align/virt-alignment-scan.pod:156 ../cat/virt-cat.pod:136
518 #: ../cat/virt-filesystems.pod:263 ../cat/virt-ls.pod:427
519 #: ../clone/virt-sysprep.pod:140 ../df/virt-df.pod:175
520 #: ../edit/virt-edit.pod:163 ../fish/guestfish.pod:392
521 #: ../fuse/guestmount.pod:268 ../inspector/virt-inspector.pod:121
522 #: ../rescue/virt-rescue.pod:184 ../sparsify/virt-sparsify.pod:161
527 #: ../align/virt-alignment-scan.pod:158 ../cat/virt-cat.pod:138
528 #: ../cat/virt-filesystems.pod:265 ../cat/virt-ls.pod:429
529 #: ../clone/virt-sysprep.pod:142 ../df/virt-df.pod:177
530 #: ../edit/virt-edit.pod:165 ../inspector/virt-inspector.pod:123
531 #: ../rescue/virt-rescue.pod:186 ../sparsify/virt-sparsify.pod:163
532 msgid "Enable verbose messages for debugging."
536 #: ../align/virt-alignment-scan.pod:160 ../cat/virt-cat.pod:140
537 #: ../cat/virt-filesystems.pod:267 ../cat/virt-ls.pod:431
538 #: ../clone/virt-sysprep.pod:144 ../df/virt-df.pod:179
539 #: ../edit/virt-edit.pod:167 ../fish/guestfish.pod:397
540 #: ../fuse/guestmount.pod:272 ../inspector/virt-inspector.pod:125
541 #: ../rescue/virt-rescue.pod:188 ../resize/virt-resize.pod:484
542 #: ../sparsify/virt-sparsify.pod:165
547 #: ../align/virt-alignment-scan.pod:162 ../cat/virt-cat.pod:142
548 #: ../cat/virt-filesystems.pod:269 ../cat/virt-ls.pod:433
549 #: ../clone/virt-sysprep.pod:146 ../df/virt-df.pod:181
550 #: ../edit/virt-edit.pod:169 ../fish/guestfish.pod:399
551 #: ../fuse/guestmount.pod:274 ../inspector/virt-inspector.pod:127
552 #: ../rescue/virt-rescue.pod:190 ../resize/virt-resize.pod:486
553 #: ../sparsify/virt-sparsify.pod:167 ../tools/virt-list-filesystems.pl:69
554 #: ../tools/virt-list-partitions.pl:70 ../tools/virt-make-fs.pl:169
555 #: ../tools/virt-tar.pl:119 ../tools/virt-win-reg.pl:112
560 #: ../align/virt-alignment-scan.pod:164 ../cat/virt-cat.pod:144
561 #: ../cat/virt-filesystems.pod:271 ../cat/virt-ls.pod:435
562 #: ../clone/virt-sysprep.pod:148 ../df/virt-df.pod:183
563 #: ../edit/virt-edit.pod:171 ../inspector/virt-inspector.pod:129
564 #: ../rescue/virt-rescue.pod:192 ../resize/virt-resize.pod:488
565 #: ../sparsify/virt-sparsify.pod:169 ../tools/virt-list-filesystems.pl:71
566 #: ../tools/virt-list-partitions.pl:72 ../tools/virt-make-fs.pl:171
567 #: ../tools/virt-tar.pl:121 ../tools/virt-win-reg.pl:114
568 msgid "Display version number and exit."
572 #: ../align/virt-alignment-scan.pod:166 ../cat/virt-cat.pod:146
573 #: ../cat/virt-filesystems.pod:281 ../cat/virt-ls.pod:437
574 #: ../clone/virt-sysprep.pod:150 ../df/virt-df.pod:185
575 #: ../edit/virt-edit.pod:173 ../fish/guestfish.pod:412
576 #: ../fuse/guestmount.pod:287 ../inspector/virt-inspector.pod:131
577 #: ../rescue/virt-rescue.pod:203 ../sparsify/virt-sparsify.pod:171
578 #: ../tools/virt-tar.pl:158
583 #: ../align/virt-alignment-scan.pod:168 ../cat/virt-cat.pod:148
584 #: ../cat/virt-filesystems.pod:283 ../cat/virt-ls.pod:439
585 #: ../clone/virt-sysprep.pod:152 ../df/virt-df.pod:187
586 #: ../edit/virt-edit.pod:175 ../inspector/virt-inspector.pod:133
587 #: ../rescue/virt-rescue.pod:205 ../sparsify/virt-sparsify.pod:173
588 msgid "Enable tracing of libguestfs API calls."
592 #: ../align/virt-alignment-scan.pod:172
593 msgid "RECOMMENDED ALIGNMENT"
597 #: ../align/virt-alignment-scan.pod:174
599 "Operating systems older than Windows 2008 and Linux before ca.2010 place the "
600 "first sector of the first partition at sector 63, with a 512 byte sector "
601 "size. This happens because of a historical accident. Drives have to report "
602 "a cylinder / head / sector (CHS) geometry to the BIOS. The geometry is "
603 "completely meaningless on modern drives, but it happens that the geometry "
604 "reported always has 63 sectors per track. The operating system therefore "
605 "places the first partition at the start of the second \"track\", at sector "
610 #: ../align/virt-alignment-scan.pod:183
612 "When the guest OS is virtualized, the host operating system and hypervisor "
613 "may prefer accesses aligned to one of:"
617 #: ../align/virt-alignment-scan.pod:188
622 #: ../align/virt-alignment-scan.pod:190
624 "if the host OS uses local storage directly on hard drive partitions, and the "
625 "hard drive has 512 byte physical sectors."
629 #: ../align/virt-alignment-scan.pod:193
634 #: ../align/virt-alignment-scan.pod:195
636 "for local storage on new hard drives with 4Kbyte physical sectors; for file-"
637 "backed storage on filesystems with 4Kbyte block size; or for some types of "
638 "network-attached storage."
642 #: ../align/virt-alignment-scan.pod:199
647 #: ../align/virt-alignment-scan.pod:201
649 "for high-end network-attached storage. This is the optimal block size for "
650 "some NetApp hardware."
654 #: ../align/virt-alignment-scan.pod:204
659 #: ../align/virt-alignment-scan.pod:206
660 msgid "see L</1 MB PARTITION ALIGNMENT> below."
664 #: ../align/virt-alignment-scan.pod:210
666 "Partitions which are not aligned correctly to the underlying storage cause "
667 "extra I/O. For example:"
671 #: ../align/virt-alignment-scan.pod:213
675 " +--------------------------+------\n"
677 " | filesystem block |\n"
678 " ---+------------------+------+-------------------+-----+---\n"
679 " | host block | host block |\n"
681 " ---+-------------------------+-------------------------+---\n"
686 #: ../align/virt-alignment-scan.pod:222
688 "In this example, each time a 4K guest block is read, two blocks on the host "
689 "must be accessed (so twice as much I/O is done). When a 4K guest block is "
690 "written, two host blocks must first be read, the old and new data combined, "
691 "and the two blocks written back (4x I/O)."
695 #: ../align/virt-alignment-scan.pod:227
696 msgid "LINUX HOST BLOCK AND I/O SIZE"
700 #: ../align/virt-alignment-scan.pod:229
702 "New versions of the Linux kernel expose the physical and logical block size, "
703 "and minimum and recommended I/O size."
707 #: ../align/virt-alignment-scan.pod:232
708 msgid "For a typical hard drive with 512 byte sectors:"
712 #: ../align/virt-alignment-scan.pod:234
715 " $ cat /sys/block/sda/queue/physical_block_size\n"
717 " $ cat /sys/block/sda/queue/logical_block_size\n"
719 " $ cat /sys/block/sda/queue/minimum_io_size\n"
721 " $ cat /sys/block/sda/queue/optimal_io_size\n"
727 #: ../align/virt-alignment-scan.pod:243
728 msgid "For a NetApp LUN:"
732 #: ../align/virt-alignment-scan.pod:245
735 " $ cat /sys/block/sdc/queue/logical_block_size\n"
737 " $ cat /sys/block/sdc/queue/physical_block_size\n"
739 " $ cat /sys/block/sdc/queue/minimum_io_size\n"
741 " $ cat /sys/block/sdc/queue/optimal_io_size\n"
747 #: ../align/virt-alignment-scan.pod:254
749 "The NetApp allows 512 byte accesses (but they will be very inefficient), "
750 "prefers a minimum 4K I/O size, but the optimal I/O size is 64K."
754 #: ../align/virt-alignment-scan.pod:258
756 "For detailed information about what these numbers mean, see L<http://docs."
757 "redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/"
758 "Storage_Administration_Guide/newstorage-iolimits.html>"
762 #: ../align/virt-alignment-scan.pod:261
764 "[Thanks to Mike Snitzer for providing NetApp data and additional "
769 #: ../align/virt-alignment-scan.pod:264
770 msgid "1 MB PARTITION ALIGNMENT"
774 #: ../align/virt-alignment-scan.pod:266
776 "Microsoft picked 1 MB as the default alignment for all partitions starting "
777 "with Windows 2008 Server, and Linux has followed this."
781 #: ../align/virt-alignment-scan.pod:269
783 "Assuming 512 byte sectors in the guest, you will now see the first partition "
784 "starting at sector 2048, and subsequent partitions (if any) will start at a "
785 "multiple of 2048 sectors."
789 #: ../align/virt-alignment-scan.pod:273
791 "1 MB alignment is compatible with all current alignment requirements (4K, "
792 "64K) and provides room for future growth in physical block sizes."
796 #: ../align/virt-alignment-scan.pod:276
797 msgid "SETTING ALIGNMENT"
801 #: ../align/virt-alignment-scan.pod:278
803 "Currently there is no virt tool for fixing alignment problems in guests. "
804 "This is a difficult problem to fix because simply moving partitions around "
805 "breaks the bootloader, necessitating either manual reinstallation of the "
806 "bootloader using a rescue disk, or complex and error-prone hacks."
810 #: ../align/virt-alignment-scan.pod:284
812 "L<virt-resize(1)> does not change the alignment of the first partition, but "
813 "it does align the second and subsequent partitions to a multiple of 64 or "
814 "128 sectors (depending on the version of virt-resize, 128 in virt-resize "
815 "E<ge> 1.13.19). For operating systems that have a separate boot partition, "
816 "virt-resize could be used to align the main OS partition, so that the "
817 "majority of OS accesses except at boot will be aligned."
821 #: ../align/virt-alignment-scan.pod:292
823 "The easiest way to correct partition alignment problems is to reinstall your "
824 "guest operating systems. If you install operating systems from templates, "
825 "ensure these have correct partition alignment too."
829 #: ../align/virt-alignment-scan.pod:297
831 "For older versions of Windows, the following NetApp document contains useful "
832 "information: L<http://media.netapp.com/documents/tr-3747.pdf>"
836 #: ../align/virt-alignment-scan.pod:300
838 "For Red Hat Enterprise Linux E<le> 5, use a Kickstart script that contains "
839 "an explicit C<%pre> section that creates aligned partitions using L<parted(8)"
840 ">. Do not use the Kickstart C<part> command. The NetApp document above "
841 "contains an example."
845 #: ../align/virt-alignment-scan.pod:305 ../cat/virt-cat.pod:191
846 #: ../cat/virt-filesystems.pod:365 ../cat/virt-ls.pod:483
847 #: ../clone/virt-sysprep.pod:475 ../df/virt-df.pod:215
848 #: ../edit/virt-edit.pod:342 ../inspector/virt-inspector.pod:352
849 #: ../rescue/virt-rescue.pod:266 ../resize/virt-resize.pod:601
850 #: ../tools/virt-list-filesystems.pl:188 ../tools/virt-list-partitions.pl:258
851 #: ../tools/virt-make-fs.pl:532 ../tools/virt-tar.pl:289
852 #: ../tools/virt-win-reg.pl:733
853 msgid "SHELL QUOTING"
857 #: ../align/virt-alignment-scan.pod:307 ../cat/virt-cat.pod:193
858 #: ../cat/virt-filesystems.pod:367 ../cat/virt-ls.pod:485
859 #: ../clone/virt-sysprep.pod:477 ../df/virt-df.pod:217
860 #: ../edit/virt-edit.pod:344 ../inspector/virt-inspector.pod:354
861 #: ../rescue/virt-rescue.pod:268 ../resize/virt-resize.pod:603
862 #: ../tools/virt-list-filesystems.pl:190 ../tools/virt-list-partitions.pl:260
863 #: ../tools/virt-make-fs.pl:534 ../tools/virt-tar.pl:291
864 #: ../tools/virt-win-reg.pl:741
866 "Libvirt guest names can contain arbitrary characters, some of which have "
867 "meaning to the shell such as C<#> and space. You may need to quote or "
868 "escape these characters on the command line. See the shell manual page L<sh"
873 #: ../align/virt-alignment-scan.pod:312 ../cat/virt-cat.pod:198
874 #: ../cat/virt-filesystems.pod:372 ../cat/virt-ls.pod:490
875 #: ../clone/virt-sysprep.pod:482 ../df/virt-df.pod:222
876 #: ../edit/virt-edit.pod:349 ../fish/guestfish.pod:1114
877 #: ../fuse/guestmount.pod:312 ../inspector/virt-inspector.pod:375
878 #: ../resize/virt-resize.pod:608 ../sparsify/virt-sparsify.pod:227
879 #: ../test-tool/libguestfs-test-tool.pod:90
884 #: ../align/virt-alignment-scan.pod:314
885 msgid "This program returns:"
889 #: ../align/virt-alignment-scan.pod:318 ../align/virt-alignment-scan.pod:324
890 #: ../align/virt-alignment-scan.pod:330 ../align/virt-alignment-scan.pod:337
891 #: ../clone/virt-sysprep.pod:283 ../clone/virt-sysprep.pod:287
892 #: ../clone/virt-sysprep.pod:291 ../clone/virt-sysprep.pod:295
893 #: ../clone/virt-sysprep.pod:310 ../clone/virt-sysprep.pod:314
894 #: ../clone/virt-sysprep.pod:318 ../clone/virt-sysprep.pod:322
895 #: ../clone/virt-sysprep.pod:326 ../clone/virt-sysprep.pod:362
896 #: ../clone/virt-sysprep.pod:384 ../clone/virt-sysprep.pod:388
897 #: ../df/virt-df.pod:148 ../df/virt-df.pod:154 ../edit/virt-edit.pod:266
898 #: ../edit/virt-edit.pod:271 ../edit/virt-edit.pod:276
899 #: ../edit/virt-edit.pod:287 ../edit/virt-edit.pod:291
900 #: ../examples/guestfs-recipes.pod:98 ../examples/guestfs-recipes.pod:102
901 #: ../examples/guestfs-recipes.pod:106 ../examples/guestfs-recipes.pod:132
902 #: ../examples/guestfs-recipes.pod:137 ../examples/guestfs-recipes.pod:227
903 #: ../examples/guestfs-recipes.pod:231 ../examples/guestfs-recipes.pod:235
904 #: ../examples/guestfs-recipes.pod:239 ../examples/guestfs-recipes.pod:243
905 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
906 #: ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:398
907 #: ../fish/guestfish-actions.pod:405 ../fish/guestfish-actions.pod:412
908 #: ../fish/guestfish-actions.pod:1139 ../fish/guestfish-actions.pod:1143
909 #: ../fish/guestfish-actions.pod:1147 ../fish/guestfish-actions.pod:1151
910 #: ../fish/guestfish-actions.pod:1159 ../fish/guestfish-actions.pod:1163
911 #: ../fish/guestfish-actions.pod:1167 ../fish/guestfish-actions.pod:1177
912 #: ../fish/guestfish-actions.pod:1181 ../fish/guestfish-actions.pod:1185
913 #: ../fish/guestfish-actions.pod:1275 ../fish/guestfish-actions.pod:1279
914 #: ../fish/guestfish-actions.pod:1284 ../fish/guestfish-actions.pod:1289
915 #: ../fish/guestfish-actions.pod:1331 ../fish/guestfish-actions.pod:1335
916 #: ../fish/guestfish-actions.pod:1340 ../fish/guestfish-actions.pod:1596
917 #: ../fish/guestfish-actions.pod:1603 ../fish/guestfish-actions.pod:1610
918 #: ../fish/guestfish-actions.pod:2013 ../fish/guestfish-actions.pod:2019
919 #: ../fish/guestfish-actions.pod:2027 ../fish/guestfish-actions.pod:2034
920 #: ../fish/guestfish-actions.pod:2041 ../fish/guestfish.pod:445
921 #: ../fish/guestfish.pod:449 ../fish/guestfish.pod:453
922 #: ../fish/guestfish.pod:457 ../inspector/virt-inspector.pod:393
923 #: ../inspector/virt-inspector.pod:397 ../resize/virt-resize.pod:282
924 #: ../resize/virt-resize.pod:286 ../resize/virt-resize.pod:295
925 #: ../resize/virt-resize.pod:301 ../sparsify/virt-sparsify.pod:32
926 #: ../sparsify/virt-sparsify.pod:39 ../sparsify/virt-sparsify.pod:43
927 #: ../sparsify/virt-sparsify.pod:49 ../sparsify/virt-sparsify.pod:54
928 #: ../sparsify/virt-sparsify.pod:58 ../sparsify/virt-sparsify.pod:64
929 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:29
930 #: ../src/guestfs-actions.pod:588 ../src/guestfs-actions.pod:596
931 #: ../src/guestfs-actions.pod:603 ../src/guestfs-actions.pod:610
932 #: ../src/guestfs-actions.pod:1778 ../src/guestfs-actions.pod:1782
933 #: ../src/guestfs-actions.pod:1786 ../src/guestfs-actions.pod:1790
934 #: ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:1802
935 #: ../src/guestfs-actions.pod:1806 ../src/guestfs-actions.pod:1816
936 #: ../src/guestfs-actions.pod:1820 ../src/guestfs-actions.pod:1824
937 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:1966
938 #: ../src/guestfs-actions.pod:1971 ../src/guestfs-actions.pod:1976
939 #: ../src/guestfs-actions.pod:2037 ../src/guestfs-actions.pod:2041
940 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2461
941 #: ../src/guestfs-actions.pod:2468 ../src/guestfs-actions.pod:2475
942 #: ../src/guestfs-actions.pod:3020 ../src/guestfs-actions.pod:3026
943 #: ../src/guestfs-actions.pod:3034 ../src/guestfs-actions.pod:3041
944 #: ../src/guestfs-actions.pod:3048 ../src/guestfs.pod:388
945 #: ../src/guestfs.pod:393 ../src/guestfs.pod:398 ../src/guestfs.pod:402
946 #: ../src/guestfs.pod:407 ../src/guestfs.pod:411 ../src/guestfs.pod:416
947 #: ../src/guestfs.pod:421 ../src/guestfs.pod:1094 ../src/guestfs.pod:1098
948 #: ../src/guestfs.pod:1102 ../src/guestfs.pod:1107 ../src/guestfs.pod:1115
949 #: ../src/guestfs.pod:1134 ../src/guestfs.pod:1142 ../src/guestfs.pod:1164
950 #: ../src/guestfs.pod:1168 ../src/guestfs.pod:1172 ../src/guestfs.pod:1176
951 #: ../src/guestfs.pod:1180 ../src/guestfs.pod:1184 ../src/guestfs.pod:1674
952 #: ../src/guestfs.pod:1679 ../src/guestfs.pod:1683 ../src/guestfs.pod:1785
953 #: ../src/guestfs.pod:1790 ../src/guestfs.pod:1794 ../src/guestfs.pod:1804
954 #: ../src/guestfs.pod:2093 ../src/guestfs.pod:2098 ../src/guestfs.pod:2104
955 #: ../src/guestfs.pod:2112 ../src/guestfs.pod:2630 ../src/guestfs.pod:2636
956 #: ../src/guestfs.pod:2641 ../src/guestfs.pod:2647 ../src/guestfs.pod:3047
957 #: ../src/guestfs.pod:3052 ../src/guestfs.pod:3056 ../src/guestfs.pod:3060
958 #: ../src/guestfs.pod:3064 ../src/guestfs.pod:3078 ../src/guestfs.pod:3083
959 #: ../src/guestfs.pod:3314 ../src/guestfs.pod:3318 ../src/guestfs.pod:3322
960 #: ../src/guestfs.pod:3326 ../tools/virt-win-reg.pl:197
961 #: ../tools/virt-win-reg.pl:202 ../tools/virt-win-reg.pl:208
962 #: ../tools/virt-win-reg.pl:710 ../tools/virt-win-reg.pl:716
963 #: ../tools/virt-win-reg.pl:722
968 #: ../align/virt-alignment-scan.pod:320
973 #: ../align/virt-alignment-scan.pod:322
975 "successful exit, all partitions are aligned E<ge> 64K for best performance"
979 #: ../align/virt-alignment-scan.pod:326
984 #: ../align/virt-alignment-scan.pod:328
985 msgid "an error scanning the disk image or guest"
989 #: ../align/virt-alignment-scan.pod:332
994 #: ../align/virt-alignment-scan.pod:334
996 "successful exit, some partitions have alignment E<lt> 64K which can result "
997 "in poor performance on high end network storage"
1001 #: ../align/virt-alignment-scan.pod:339
1006 #: ../align/virt-alignment-scan.pod:341
1008 "successful exit, some partitions have alignment E<lt> 4K which can result in "
1009 "poor performance on most hypervisors"
1013 #: ../align/virt-alignment-scan.pod:346 ../cat/virt-cat.pod:203
1014 #: ../cat/virt-filesystems.pod:377 ../cat/virt-ls.pod:495
1015 #: ../clone/virt-sysprep.pod:486 ../df/virt-df.pod:227
1016 #: ../edit/virt-edit.pod:354 ../erlang/examples/guestfs-erlang.pod:97
1017 #: ../examples/guestfs-examples.pod:33 ../examples/guestfs-recipes.pod:384
1018 #: ../fish/guestfish.pod:1268 ../fish/virt-copy-in.pod:50
1019 #: ../fish/virt-copy-out.pod:39 ../fish/virt-tar-in.pod:47
1020 #: ../fish/virt-tar-out.pod:41 ../fuse/guestmount.pod:317
1021 #: ../inspector/virt-inspector.pod:380 ../java/examples/guestfs-java.pod:45
1022 #: ../ocaml/examples/guestfs-ocaml.pod:78 ../perl/examples/guestfs-perl.pod:39
1023 #: ../python/examples/guestfs-python.pod:42 ../rescue/virt-rescue.pod:288
1024 #: ../resize/virt-resize.pod:613 ../ruby/examples/guestfs-ruby.pod:36
1025 #: ../sparsify/virt-sparsify.pod:251 ../src/guestfs.pod:3255
1026 #: ../test-tool/libguestfs-test-tool.pod:100
1027 #: ../tools/virt-list-filesystems.pl:195 ../tools/virt-list-partitions.pl:265
1028 #: ../tools/virt-make-fs.pl:539 ../tools/virt-tar.pl:296
1029 #: ../tools/virt-win-reg.pl:746
1034 #: ../align/virt-alignment-scan.pod:348
1036 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-rescue(1)>, "
1037 "L<virt-resize(1)>, L<http://libguestfs.org/>."
1041 #: ../align/virt-alignment-scan.pod:355 ../cat/virt-cat.pod:212
1042 #: ../cat/virt-filesystems.pod:388 ../cat/virt-ls.pod:507
1043 #: ../clone/virt-sysprep.pod:501 ../df/virt-df.pod:235
1044 #: ../edit/virt-edit.pod:368 ../rescue/virt-rescue.pod:296
1045 #: ../resize/virt-resize.pod:635 ../sparsify/virt-sparsify.pod:264
1046 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-list-partitions.pl:277
1047 #: ../tools/virt-make-fs.pl:564 ../tools/virt-tar.pl:311
1048 #: ../tools/virt-win-reg.pl:772
1053 #: ../align/virt-alignment-scan.pod:357 ../cat/virt-cat.pod:214
1054 #: ../cat/virt-filesystems.pod:390 ../cat/virt-ls.pod:509
1055 #: ../clone/virt-sysprep.pod:503 ../df/virt-df.pod:237
1056 #: ../edit/virt-edit.pod:370 ../inspector/virt-inspector.pod:395
1057 #: ../rescue/virt-rescue.pod:298 ../resize/virt-resize.pod:637
1058 #: ../sparsify/virt-sparsify.pod:266 ../tools/virt-list-filesystems.pl:210
1059 #: ../tools/virt-list-partitions.pl:279 ../tools/virt-make-fs.pl:566
1060 #: ../tools/virt-tar.pl:313 ../tools/virt-win-reg.pl:774
1061 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
1065 #: ../align/virt-alignment-scan.pod:359 ../cat/virt-cat.pod:216
1066 #: ../cat/virt-filesystems.pod:392 ../cat/virt-ls.pod:511
1067 #: ../clone/virt-sysprep.pod:505 ../df/virt-df.pod:239
1068 #: ../edit/virt-edit.pod:372 ../erlang/examples/guestfs-erlang.pod:114
1069 #: ../examples/guestfs-examples.pod:49 ../examples/guestfs-recipes.pod:401
1070 #: ../fish/guestfish.pod:1300 ../fish/virt-copy-in.pod:64
1071 #: ../fish/virt-copy-out.pod:53 ../fish/virt-tar-in.pod:62
1072 #: ../fish/virt-tar-out.pod:55 ../fuse/guestmount.pod:332
1073 #: ../inspector/virt-inspector.pod:403 ../java/examples/guestfs-java.pod:62
1074 #: ../ocaml/examples/guestfs-ocaml.pod:95 ../perl/examples/guestfs-perl.pod:56
1075 #: ../python/examples/guestfs-python.pod:58 ../rescue/virt-rescue.pod:300
1076 #: ../resize/virt-resize.pod:639 ../ruby/examples/guestfs-ruby.pod:52
1077 #: ../sparsify/virt-sparsify.pod:268 ../src/guestfs.pod:3337
1078 #: ../test-tool/libguestfs-test-tool.pod:110
1079 #: ../tools/virt-list-filesystems.pl:212 ../tools/virt-list-partitions.pl:281
1080 #: ../tools/virt-make-fs.pl:568 ../tools/virt-tar.pl:315
1081 #: ../tools/virt-win-reg.pl:776
1086 #: ../align/virt-alignment-scan.pod:361 ../clone/virt-sysprep.pod:507
1087 #: ../sparsify/virt-sparsify.pod:270
1088 msgid "Copyright (C) 2011 Red Hat Inc."
1092 #: ../align/virt-alignment-scan.pod:363 ../cat/virt-cat.pod:220
1093 #: ../cat/virt-filesystems.pod:396 ../cat/virt-ls.pod:515
1094 #: ../clone/virt-sysprep.pod:509 ../df/virt-df.pod:243
1095 #: ../edit/virt-edit.pod:376 ../fish/guestfish.pod:1305
1096 #: ../fish/virt-copy-in.pod:69 ../fish/virt-copy-out.pod:58
1097 #: ../fish/virt-tar-in.pod:67 ../fish/virt-tar-out.pod:60
1098 #: ../fuse/guestmount.pod:337 ../inspector/virt-inspector.pod:407
1099 #: ../rescue/virt-rescue.pod:304 ../resize/virt-resize.pod:643
1100 #: ../sparsify/virt-sparsify.pod:272 ../test-tool/libguestfs-test-tool.pod:115
1101 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:285
1102 #: ../tools/virt-make-fs.pl:572 ../tools/virt-tar.pl:319
1103 #: ../tools/virt-win-reg.pl:780
1105 "This program is free software; you can redistribute it and/or modify it "
1106 "under the terms of the GNU General Public License as published by the Free "
1107 "Software Foundation; either version 2 of the License, or (at your option) "
1108 "any later version."
1112 #: ../align/virt-alignment-scan.pod:368 ../cat/virt-cat.pod:225
1113 #: ../cat/virt-filesystems.pod:401 ../cat/virt-ls.pod:520
1114 #: ../clone/virt-sysprep.pod:514 ../df/virt-df.pod:248
1115 #: ../edit/virt-edit.pod:381 ../fish/guestfish.pod:1310
1116 #: ../fish/virt-copy-in.pod:74 ../fish/virt-copy-out.pod:63
1117 #: ../fish/virt-tar-in.pod:72 ../fish/virt-tar-out.pod:65
1118 #: ../fuse/guestmount.pod:342 ../inspector/virt-inspector.pod:412
1119 #: ../rescue/virt-rescue.pod:309 ../resize/virt-resize.pod:648
1120 #: ../sparsify/virt-sparsify.pod:277 ../test-tool/libguestfs-test-tool.pod:120
1121 #: ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:290
1122 #: ../tools/virt-make-fs.pl:577 ../tools/virt-tar.pl:324
1123 #: ../tools/virt-win-reg.pl:785
1125 "This program is distributed in the hope that it will be useful, but WITHOUT "
1126 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
1127 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
1132 #: ../align/virt-alignment-scan.pod:373 ../cat/virt-cat.pod:230
1133 #: ../cat/virt-filesystems.pod:406 ../cat/virt-ls.pod:525
1134 #: ../clone/virt-sysprep.pod:519 ../df/virt-df.pod:253
1135 #: ../edit/virt-edit.pod:386 ../fish/guestfish.pod:1315
1136 #: ../fish/virt-copy-in.pod:79 ../fish/virt-copy-out.pod:68
1137 #: ../fish/virt-tar-in.pod:77 ../fish/virt-tar-out.pod:70
1138 #: ../fuse/guestmount.pod:347 ../inspector/virt-inspector.pod:417
1139 #: ../rescue/virt-rescue.pod:314 ../resize/virt-resize.pod:653
1140 #: ../sparsify/virt-sparsify.pod:282 ../test-tool/libguestfs-test-tool.pod:125
1141 #: ../tools/virt-list-filesystems.pl:226 ../tools/virt-list-partitions.pl:295
1142 #: ../tools/virt-make-fs.pl:582 ../tools/virt-tar.pl:329
1143 #: ../tools/virt-win-reg.pl:790
1145 "You should have received a copy of the GNU General Public License along with "
1146 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
1147 "Ave, Cambridge, MA 02139, USA."
1151 #: ../cat/virt-cat.pod:5
1152 msgid "virt-cat - Display files in a virtual machine"
1156 #: ../cat/virt-cat.pod:9
1159 " virt-cat [--options] -d domname file [file ...]\n"
1164 #: ../cat/virt-cat.pod:11
1167 " virt-cat [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
1172 #: ../cat/virt-cat.pod:13 ../edit/virt-edit.pod:15
1173 #: ../inspector/virt-inspector.pod:13
1178 #: ../cat/virt-cat.pod:15
1181 " virt-cat domname file\n"
1186 #: ../cat/virt-cat.pod:17
1189 " virt-cat disk.img file\n"
1194 #: ../cat/virt-cat.pod:21
1196 "C<virt-cat> is a command line tool to display the contents of C<file> where "
1197 "C<file> exists in the named virtual machine (or disk image)."
1201 #: ../cat/virt-cat.pod:24
1203 "Multiple filenames can be given, in which case they are concatenated "
1204 "together. Each filename must be a full path, starting at the root directory "
1205 "(starting with '/')."
1209 #: ../cat/virt-cat.pod:28
1211 "C<virt-cat> can be used to quickly view a file. To edit a file, use C<virt-"
1212 "edit>. For more complex cases you should look at the L<guestfish(1)> tool "
1213 "(see L</USING GUESTFISH> below)."
1217 #: ../cat/virt-cat.pod:32 ../cat/virt-ls.pod:35 ../df/virt-df.pod:43
1218 #: ../edit/virt-edit.pod:44 ../fish/guestfish.pod:41
1219 #: ../fish/guestfish.pod:1051 ../fish/virt-copy-in.pod:29
1220 #: ../fish/virt-copy-out.pod:21 ../fish/virt-tar-in.pod:30
1221 #: ../fish/virt-tar-out.pod:24 ../fuse/guestmount.pod:39
1222 #: ../resize/virt-resize.pod:27 ../sparsify/virt-sparsify.pod:75
1223 #: ../tools/virt-tar.pl:50
1228 #: ../cat/virt-cat.pod:34
1230 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
1234 #: ../cat/virt-cat.pod:37
1237 " virt-cat -d mydomain /etc/fstab\n"
1242 #: ../cat/virt-cat.pod:39
1243 msgid "List syslog messages from a VM disk image file:"
1247 #: ../cat/virt-cat.pod:41
1250 " virt-cat -a disk.img /var/log/messages | tail\n"
1255 #: ../cat/virt-cat.pod:43
1256 msgid "Find out what DHCP IP address a VM acquired:"
1260 #: ../cat/virt-cat.pod:45
1263 " virt-cat -d mydomain /var/log/messages | \\\n"
1264 " grep 'dhclient: bound to' | tail\n"
1269 #: ../cat/virt-cat.pod:48
1270 msgid "Find out what packages were recently installed:"
1274 #: ../cat/virt-cat.pod:50
1277 " virt-cat -d mydomain /var/log/yum.log | tail\n"
1282 #: ../cat/virt-cat.pod:52
1283 msgid "Find out who is logged on inside a virtual machine:"
1287 #: ../cat/virt-cat.pod:54
1290 " virt-cat -d mydomain /var/run/utmp > /tmp/utmp\n"
1296 #: ../cat/virt-cat.pod:57
1297 msgid "or who was logged on:"
1301 #: ../cat/virt-cat.pod:59
1304 " virt-cat -d mydomain /var/log/wtmp > /tmp/wtmp\n"
1305 " last -f /tmp/wtmp\n"
1310 #: ../cat/virt-cat.pod:74 ../cat/virt-filesystems.pod:103
1311 #: ../cat/virt-ls.pod:273 ../df/virt-df.pod:71 ../edit/virt-edit.pod:74
1312 #: ../inspector/virt-inspector.pod:67 ../rescue/virt-rescue.pod:96
1314 "Add I<file> which should be a disk image from a virtual machine. If the "
1315 "virtual machine has multiple block devices, you must supply all of them with "
1316 "separate I<-a> options."
1320 #: ../cat/virt-cat.pod:98 ../cat/virt-filesystems.pod:148
1321 #: ../cat/virt-ls.pod:314 ../edit/virt-edit.pod:112 ../fish/guestfish.pod:217
1322 #: ../fuse/guestmount.pod:135 ../inspector/virt-inspector.pod:92
1323 msgid "B<--echo-keys>"
1327 #: ../cat/virt-cat.pod:100
1329 "When prompting for keys and passphrases, virt-cat normally turns echoing off "
1330 "so you cannot see what you are typing. If you are not worried about Tempest "
1331 "attacks and there is no one else in the room you can specify this flag to "
1332 "see what you are typing."
1336 #: ../cat/virt-cat.pod:116
1339 " virt-cat --format=raw -a disk.img file\n"
1344 #: ../cat/virt-cat.pod:120
1347 " virt-cat --format=raw -a disk.img --format -a another.img file\n"
1352 #: ../cat/virt-cat.pod:129 ../cat/virt-filesystems.pod:200
1353 #: ../cat/virt-ls.pod:361 ../edit/virt-edit.pod:156 ../fish/guestfish.pod:289
1354 #: ../fuse/guestmount.pod:172 ../inspector/virt-inspector.pod:114
1355 msgid "B<--keys-from-stdin>"
1359 #: ../cat/virt-cat.pod:131 ../cat/virt-filesystems.pod:202
1360 #: ../cat/virt-ls.pod:363 ../edit/virt-edit.pod:158 ../fish/guestfish.pod:291
1361 #: ../fuse/guestmount.pod:174 ../inspector/virt-inspector.pod:116
1363 "Read key or passphrase parameters from stdin. The default is to try to read "
1364 "passphrases from the user by opening C</dev/tty>."
1368 #: ../cat/virt-cat.pod:152 ../cat/virt-ls.pod:443 ../edit/virt-edit.pod:179
1369 #: ../inspector/virt-inspector.pod:137 ../rescue/virt-rescue.pod:209
1370 msgid "OLD-STYLE COMMAND LINE ARGUMENTS"
1374 #: ../cat/virt-cat.pod:154
1375 msgid "Previous versions of virt-cat allowed you to write either:"
1379 #: ../cat/virt-cat.pod:156
1382 " virt-cat disk.img [disk.img ...] file\n"
1387 #: ../cat/virt-cat.pod:158 ../cat/virt-ls.pod:449 ../edit/virt-edit.pod:185
1388 #: ../inspector/virt-inspector.pod:143 ../rescue/virt-rescue.pod:215
1393 #: ../cat/virt-cat.pod:160
1396 " virt-cat guestname file\n"
1401 #: ../cat/virt-cat.pod:162 ../cat/virt-ls.pod:453 ../edit/virt-edit.pod:189
1402 #: ../inspector/virt-inspector.pod:147 ../rescue/virt-rescue.pod:219
1404 "whereas in this version you should use I<-a> or I<-d> respectively to avoid "
1405 "the confusing case where a disk image might have the same name as a guest."
1409 #: ../cat/virt-cat.pod:166 ../cat/virt-ls.pod:457 ../edit/virt-edit.pod:193
1410 #: ../inspector/virt-inspector.pod:151 ../rescue/virt-rescue.pod:223
1411 msgid "For compatibility the old style is still supported."
1415 #: ../cat/virt-cat.pod:168 ../edit/virt-edit.pod:297
1416 msgid "USING GUESTFISH"
1420 #: ../cat/virt-cat.pod:170
1422 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
1423 "C<virt-cat> doesn't work."
1427 #: ../cat/virt-cat.pod:173
1428 msgid "Using C<virt-cat> is approximately equivalent to doing:"
1432 #: ../cat/virt-cat.pod:175
1435 " guestfish --ro -i -d domname download file -\n"
1440 #: ../cat/virt-cat.pod:177
1442 "where C<domname> is the name of the libvirt guest, and C<file> is the full "
1443 "path to the file. Note the final C<-> (meaning \"output to stdout\")."
1447 #: ../cat/virt-cat.pod:181
1449 "The command above uses libguestfs's guest inspection feature and so does not "
1450 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
1451 "disk images that don't contain guests. To display a file from a disk image "
1456 #: ../cat/virt-cat.pod:186
1459 " guestfish --ro -a disk.img -m /dev/sda1 download file -\n"
1464 #: ../cat/virt-cat.pod:188
1466 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
1467 "the disk image, and C<file> is the full path to the file."
1471 #: ../cat/virt-cat.pod:200 ../cat/virt-filesystems.pod:374
1472 #: ../cat/virt-ls.pod:492 ../df/virt-df.pod:224 ../edit/virt-edit.pod:351
1473 #: ../fuse/guestmount.pod:314 ../inspector/virt-inspector.pod:377
1474 #: ../resize/virt-resize.pod:610 ../sparsify/virt-sparsify.pod:229
1476 "This program returns 0 if successful, or non-zero if there was an error."
1480 #: ../cat/virt-cat.pod:205
1482 "L<guestfs(3)>, L<guestfish(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, L<virt-"
1483 "tar-out(1)>, L<http://libguestfs.org/>."
1487 #: ../cat/virt-cat.pod:218 ../inspector/virt-inspector.pod:405
1488 #: ../resize/virt-resize.pod:641
1489 msgid "Copyright (C) 2010-2011 Red Hat Inc."
1493 #: ../cat/virt-filesystems.pod:5
1495 "virt-filesystems - List filesystems, partitions, block devices, LVM in a "
1496 "virtual machine or disk image"
1500 #: ../cat/virt-filesystems.pod:9
1503 " virt-filesystems [--options] -d domname\n"
1508 #: ../cat/virt-filesystems.pod:11
1511 " virt-filesystems [--options] -a disk.img [-a disk.img ...]\n"
1516 #: ../cat/virt-filesystems.pod:15
1518 "This tool allows you to discover filesystems, partitions, logical volumes, "
1519 "and their sizes in a disk image or virtual machine. It is a replacement for "
1520 "L<virt-list-filesystems(1)> and L<virt-list-partitions(1)>."
1524 #: ../cat/virt-filesystems.pod:20
1526 "One use for this tool is from shell scripts to iterate over all filesystems "
1527 "from a disk image:"
1531 #: ../cat/virt-filesystems.pod:23
1534 " for fs in $(virt-filesystems -a disk.img); do\n"
1541 #: ../cat/virt-filesystems.pod:27
1543 "Another use is to list partitions before using another tool to modify those "
1544 "partitions (such as L<virt-resize(1)>). If you are curious about what an "
1545 "unknown disk image contains, use this tool along with L<virt-inspector(1)>."
1549 #: ../cat/virt-filesystems.pod:32
1551 "Various command line options control what this program displays. You need "
1552 "to give either I<-a> or I<-d> options to specify the disk image or libvirt "
1553 "guest respectively. If you just specify that then the program shows "
1554 "filesystems found, one per line, like this:"
1558 #: ../cat/virt-filesystems.pod:37
1561 " $ virt-filesystems -a disk.img\n"
1563 " /dev/vg_guest/lv_root\n"
1568 #: ../cat/virt-filesystems.pod:41
1570 "If you add I<-l> or I<--long> then the output includes extra information:"
1574 #: ../cat/virt-filesystems.pod:44
1577 " $ virt-filesystems -a disk.img -l\n"
1578 " Name Type VFS Label Size\n"
1579 " /dev/sda1 filesystem ext4 boot 524288000\n"
1580 " /dev/vg_guest/lv_root filesystem ext4 root 10212081664\n"
1585 #: ../cat/virt-filesystems.pod:49
1587 "If you add I<--extra> then non-mountable (swap, unknown) filesystems are "
1592 #: ../cat/virt-filesystems.pod:52
1595 " $ virt-filesystems -a disk.img --extra\n"
1597 " /dev/vg_guest/lv_root\n"
1598 " /dev/vg_guest/lv_swap\n"
1599 " /dev/vg_guest/lv_data\n"
1604 #: ../cat/virt-filesystems.pod:58
1606 "If you add I<--partitions> then partitions are shown instead of filesystems:"
1610 #: ../cat/virt-filesystems.pod:60
1613 " $ virt-filesystems -a disk.img --partitions\n"
1620 #: ../cat/virt-filesystems.pod:64
1622 "Similarly you can use I<--logical-volumes>, I<--volume-groups>, I<--physical-"
1623 "volumes>, I<--block-devices> to list those items."
1627 #: ../cat/virt-filesystems.pod:67
1629 "You can use these options in combination as well (if you want a combination "
1630 "including filesystems, you have to add I<--filesystems>). Notice that some "
1631 "items fall into several categories (eg. C</dev/sda1> might be both a "
1632 "partition and a filesystem). These items are listed several times. To get "
1633 "a list which includes absolutely everything that virt-filesystems knows "
1634 "about, use the I<--all> option."
1638 #: ../cat/virt-filesystems.pod:74
1640 "UUIDs (because they are quite long) are not shown by default. Add the I<--"
1641 "uuid> option to display device and filesystem UUIDs in the long output."
1645 #: ../cat/virt-filesystems.pod:78
1647 "I<--all --long --uuid> is a useful combination to display all possible "
1648 "information about everything."
1652 #: ../cat/virt-filesystems.pod:81
1655 " $ virt-filesystems -a win.img --all --long --uuid -h\n"
1656 " Name Type VFS Label Size Parent UUID\n"
1657 " /dev/sda1 filesystem ntfs System Reserved 100M - F81C92571C92112C\n"
1658 " /dev/sda2 filesystem ntfs - 20G - F2E8996AE8992E3B\n"
1659 " /dev/sda1 partition - - 100M /dev/sda -\n"
1660 " /dev/sda2 partition - - 20G /dev/sda -\n"
1661 " /dev/sda device - - 20G - -\n"
1666 #: ../cat/virt-filesystems.pod:89
1668 "For machine-readable output, use I<--csv> to get Comma-Separated Values."
1672 #: ../cat/virt-filesystems.pod:110 ../tools/virt-list-filesystems.pl:121
1677 #: ../cat/virt-filesystems.pod:112
1679 "Display everything. This is currently the same as specifying these options: "
1680 "I<--filesystems>, I<--extra>, I<--partitions>, I<--block-devices>, I<--"
1681 "logical-volumes>, I<--volume-groups>, I<--physical-volumes>. (More may be "
1682 "added to this list in future)."
1686 #: ../cat/virt-filesystems.pod:117
1687 msgid "See also I<--long>."
1691 #: ../cat/virt-filesystems.pod:119
1692 msgid "B<--blkdevs>"
1696 #: ../cat/virt-filesystems.pod:121
1697 msgid "B<--block-devices>"
1701 #: ../cat/virt-filesystems.pod:123
1702 msgid "Display block devices."
1706 #: ../cat/virt-filesystems.pod:135 ../cat/virt-ls.pod:301 ../df/virt-df.pod:88
1711 #: ../cat/virt-filesystems.pod:137 ../cat/virt-ls.pod:303 ../df/virt-df.pod:90
1713 "Write out the results in CSV format (comma-separated values). This format "
1714 "can be imported easily into databases and spreadsheets, but read L</NOTE "
1715 "ABOUT CSV FORMAT> below."
1719 #: ../cat/virt-filesystems.pod:150
1721 "When prompting for keys and passphrases, virt-filesystems normally turns "
1722 "echoing off so you cannot see what you are typing. If you are not worried "
1723 "about Tempest attacks and there is no one else in the room you can specify "
1724 "this flag to see what you are typing."
1728 #: ../cat/virt-filesystems.pod:155
1733 #: ../cat/virt-filesystems.pod:157
1735 "This causes filesystems that are not ordinary, mountable filesystems to be "
1736 "displayed. This category includes swapspace, and filesystems that are empty "
1737 "or contain unknown data."
1741 #: ../cat/virt-filesystems.pod:161
1742 msgid "This option implies I<--filesystems>."
1746 #: ../cat/virt-filesystems.pod:163
1747 msgid "B<--filesystems>"
1751 #: ../cat/virt-filesystems.pod:165
1753 "Display mountable filesystems. If no display option was selected then this "
1754 "option is implied."
1758 #: ../cat/virt-filesystems.pod:168
1759 msgid "With I<--extra>, non-mountable filesystems are shown too."
1763 #: ../cat/virt-filesystems.pod:181
1766 " virt-filesystems --format=raw -a disk.img\n"
1771 #: ../cat/virt-filesystems.pod:185
1774 " virt-filesystems --format=raw -a disk.img --format -a another.img\n"
1779 #: ../cat/virt-filesystems.pod:194 ../cat/virt-ls.pod:352
1780 #: ../df/virt-df.pod:125 ../fish/guestfish.pod:156
1781 #: ../tools/virt-list-partitions.pl:109
1786 #: ../cat/virt-filesystems.pod:196 ../cat/virt-ls.pod:354
1787 #: ../df/virt-df.pod:127 ../tools/virt-list-partitions.pl:111
1788 msgid "B<--human-readable>"
1792 #: ../cat/virt-filesystems.pod:198
1793 msgid "In I<--long> mode, display sizes in human-readable format."
1797 #: ../cat/virt-filesystems.pod:205 ../cat/virt-ls.pod:366
1798 #: ../tools/virt-list-filesystems.pl:108 ../tools/virt-list-partitions.pl:119
1803 #: ../cat/virt-filesystems.pod:207 ../cat/virt-ls.pod:368
1804 #: ../tools/virt-list-filesystems.pl:110 ../tools/virt-list-partitions.pl:121
1809 #: ../cat/virt-filesystems.pod:209
1810 msgid "Display extra columns of data (\"long format\")."
1814 #: ../cat/virt-filesystems.pod:211
1815 msgid "A title row is added unless you also specify I<--no-title>."
1819 #: ../cat/virt-filesystems.pod:213
1821 "The extra columns displayed depend on what output you select, and the "
1822 "ordering of columns may change in future versions. Use the title row, I<--"
1823 "csv> output and/or L<csvtool(1)> to match columns to data in external "
1828 #: ../cat/virt-filesystems.pod:218
1830 "Use I<-h> if you want sizes to be displayed in human-readable format. The "
1831 "default is to show raw numbers of I<bytes>."
1835 #: ../cat/virt-filesystems.pod:221
1836 msgid "Use I<--uuid> to display UUIDs too."
1840 #: ../cat/virt-filesystems.pod:223
1845 #: ../cat/virt-filesystems.pod:225
1846 msgid "B<--logvols>"
1850 #: ../cat/virt-filesystems.pod:227
1851 msgid "B<--logical-volumes>"
1855 #: ../cat/virt-filesystems.pod:229
1857 "Display LVM logical volumes. In this mode, these are displayed irrespective "
1858 "of whether the LVs contain filesystems."
1862 #: ../cat/virt-filesystems.pod:232
1863 msgid "B<--no-title>"
1867 #: ../cat/virt-filesystems.pod:234
1868 msgid "In I<--long> mode, don't add a title row."
1872 #: ../cat/virt-filesystems.pod:236
1874 "Note that the order of the columns is not fixed, and may change in future "
1875 "versions of virt-filesystems, so using this option may give you unexpected "
1880 #: ../cat/virt-filesystems.pod:240
1885 #: ../cat/virt-filesystems.pod:242
1886 msgid "B<--partitions>"
1890 #: ../cat/virt-filesystems.pod:244
1892 "Display partitions. In this mode, these are displayed irrespective of "
1893 "whether the partitions contain filesystems."
1897 #: ../cat/virt-filesystems.pod:247
1902 #: ../cat/virt-filesystems.pod:249
1903 msgid "B<--physvols>"
1907 #: ../cat/virt-filesystems.pod:251
1908 msgid "B<--physical-volumes>"
1912 #: ../cat/virt-filesystems.pod:253
1913 msgid "Display LVM physical volumes."
1917 #: ../cat/virt-filesystems.pod:255 ../df/virt-df.pod:163
1922 #: ../cat/virt-filesystems.pod:257
1927 #: ../cat/virt-filesystems.pod:259
1928 msgid "In I<--long> mode, display UUIDs as well."
1932 #: ../cat/virt-filesystems.pod:273
1937 #: ../cat/virt-filesystems.pod:275
1938 msgid "B<--volgroups>"
1942 #: ../cat/virt-filesystems.pod:277
1943 msgid "B<--volume-groups>"
1947 #: ../cat/virt-filesystems.pod:279
1948 msgid "Display LVM volume groups."
1952 #: ../cat/virt-filesystems.pod:287
1957 #: ../cat/virt-filesystems.pod:289
1959 "Note that columns in the output are subject to reordering and change in "
1960 "future versions of this tool."
1964 #: ../cat/virt-filesystems.pod:294
1969 #: ../cat/virt-filesystems.pod:296
1970 msgid "The filesystem, partition, block device or LVM name."
1974 #: ../cat/virt-filesystems.pod:298
1976 "For device and partition names these are displayed as canonical libguestfs "
1977 "names, so that for example C</dev/sda2> is the second partition on the first "
1982 #: ../cat/virt-filesystems.pod:302
1984 "If the I<--long> option is B<not> specified, then only the name column is "
1985 "shown in the output."
1989 #: ../cat/virt-filesystems.pod:305
1994 #: ../cat/virt-filesystems.pod:307
1995 msgid "The object type, for example C<filesystem>, C<lv>, C<device> etc."
1999 #: ../cat/virt-filesystems.pod:309
2004 #: ../cat/virt-filesystems.pod:311
2006 "If there is a filesystem, then this column displays the filesystem type if "
2007 "one could be detected, eg. C<ext4>."
2011 #: ../cat/virt-filesystems.pod:314
2016 #: ../cat/virt-filesystems.pod:316
2018 "If the object has a label (used for identifying and mounting filesystems) "
2019 "then this column contains the label."
2023 #: ../cat/virt-filesystems.pod:319
2028 #: ../cat/virt-filesystems.pod:321
2030 "The size of the object in bytes. If the I<--human> option is used then the "
2031 "size is displayed in a human-readable form."
2035 #: ../cat/virt-filesystems.pod:324
2040 #: ../cat/virt-filesystems.pod:326
2042 "The parent column records the parent relationship between objects. For "
2043 "example, if the object is a partition, then this column contains the name of "
2044 "the containing device. If the object is a logical volume, then this column "
2045 "is the name of the volume group."
2049 #: ../cat/virt-filesystems.pod:331
2054 #: ../cat/virt-filesystems.pod:333
2056 "If the object has a UUID (used for identifying and mounting filesystems and "
2057 "block devices) then this column contains the UUID as a string."
2061 #: ../cat/virt-filesystems.pod:337
2062 msgid "The UUID is only displayed if the I<--uuid> option is given."
2066 #: ../cat/virt-filesystems.pod:341 ../cat/virt-ls.pod:459
2067 #: ../df/virt-df.pod:191
2068 msgid "NOTE ABOUT CSV FORMAT"
2072 #: ../cat/virt-filesystems.pod:343 ../cat/virt-ls.pod:461
2073 #: ../df/virt-df.pod:193
2075 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
2076 "should be easy to parse, but it is definitely not easy to parse."
2080 #: ../cat/virt-filesystems.pod:346 ../cat/virt-ls.pod:464
2081 #: ../df/virt-df.pod:196
2083 "Myth: Just split fields at commas. Reality: This does I<not> work "
2084 "reliably. This example has two columns:"
2088 #: ../cat/virt-filesystems.pod:349 ../cat/virt-ls.pod:467
2089 #: ../df/virt-df.pod:199
2092 " \"foo,bar\",baz\n"
2097 #: ../cat/virt-filesystems.pod:351 ../cat/virt-ls.pod:469
2098 #: ../df/virt-df.pod:201
2100 "Myth: Read the file one line at a time. Reality: This does I<not> work "
2101 "reliably. This example has one row:"
2105 #: ../cat/virt-filesystems.pod:354 ../cat/virt-ls.pod:472
2106 #: ../df/virt-df.pod:204
2115 #: ../cat/virt-filesystems.pod:357 ../cat/virt-ls.pod:475
2116 #: ../df/virt-df.pod:207
2118 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
2119 "packaged in major Linux distributions)."
2123 #: ../cat/virt-filesystems.pod:360 ../cat/virt-ls.pod:478
2124 #: ../df/virt-df.pod:210
2126 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
2127 "or Python's built-in csv library)."
2131 #: ../cat/virt-filesystems.pod:363 ../cat/virt-ls.pod:481
2132 #: ../df/virt-df.pod:213
2133 msgid "Most spreadsheets and databases can import CSV directly."
2137 #: ../cat/virt-filesystems.pod:379
2139 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-list-"
2140 "filesystems(1)>, L<virt-list-partitions(1)>, L<csvtool(1)>, L<http://"
2145 #: ../cat/virt-filesystems.pod:394 ../tools/virt-make-fs.pl:570
2146 #: ../tools/virt-win-reg.pl:778
2147 msgid "Copyright (C) 2010 Red Hat Inc."
2151 #: ../cat/virt-ls.pod:5
2152 msgid "virt-ls - List files in a virtual machine"
2156 #: ../cat/virt-ls.pod:9
2159 " virt-ls [--options] -d domname directory [directory ...]\n"
2164 #: ../cat/virt-ls.pod:11
2167 " virt-ls [--options] -a disk.img [-a disk.img ...] directory [directory ...]\n"
2172 #: ../cat/virt-ls.pod:13 ../df/virt-df.pod:15 ../rescue/virt-rescue.pod:13
2177 #: ../cat/virt-ls.pod:15
2180 " virt-ls [--options] domname directory\n"
2185 #: ../cat/virt-ls.pod:17
2188 " virt-ls [--options] disk.img [disk.img ...] directory\n"
2193 #: ../cat/virt-ls.pod:21
2195 "C<virt-ls> lists filenames, file sizes, checksums, extended attributes and "
2196 "more from a virtual machine or disk image."
2200 #: ../cat/virt-ls.pod:24
2202 "Multiple directory names can be given, in which case the output from each is "
2207 #: ../cat/virt-ls.pod:27
2209 "To list directories from a libvirt guest use the I<-d> option to specify the "
2210 "name of the guest. For a disk image, use the I<-a> option."
2214 #: ../cat/virt-ls.pod:31
2216 "C<virt-ls> can do many simple file listings. For more complicated cases you "
2217 "may need to use L<guestfish(1)>, or write a program directly to the L<guestfs"
2222 #: ../cat/virt-ls.pod:37
2223 msgid "Get a list of all files and directories in a virtual machine:"
2227 #: ../cat/virt-ls.pod:39
2230 " virt-ls -R -d guest /\n"
2235 #: ../cat/virt-ls.pod:41
2236 msgid "List all setuid or setgid programs in a Linux virtual machine:"
2240 #: ../cat/virt-ls.pod:43
2243 " virt-ls -lR -d guest / | grep '^- [42]'\n"
2248 #: ../cat/virt-ls.pod:45
2249 msgid "List all public-writable directories in a Linux virtual machine:"
2253 #: ../cat/virt-ls.pod:47
2256 " virt-ls -lR -d guest / | grep '^d ...7'\n"
2261 #: ../cat/virt-ls.pod:49
2262 msgid "List all Unix domain sockets in a Linux virtual machine:"
2266 #: ../cat/virt-ls.pod:51
2269 " virt-ls -lR -d guest / | grep '^s'\n"
2274 #: ../cat/virt-ls.pod:53
2275 msgid "List all regular files with filenames ending in '.png':"
2279 #: ../cat/virt-ls.pod:55
2282 " virt-ls -lR -d guest / | grep -i '^-.*\\.png$'\n"
2287 #: ../cat/virt-ls.pod:57
2288 msgid "To display files larger than 10MB in home directories:"
2292 #: ../cat/virt-ls.pod:59
2295 " virt-ls -lR -d guest /home | awk '$3 > 10*1024*1024'\n"
2300 #: ../cat/virt-ls.pod:61
2301 msgid "Find everything modified in the last 7 days:"
2305 #: ../cat/virt-ls.pod:63
2308 " virt-ls -lR -d guest --time-days / | awk '$6 <= 7'\n"
2313 #: ../cat/virt-ls.pod:65
2314 msgid "Find regular files modified in the last 24 hours:"
2318 #: ../cat/virt-ls.pod:67
2321 " virt-ls -lR -d guest --time-days / | grep '^-' | awk '$6 < 1'\n"
2326 #: ../cat/virt-ls.pod:69
2327 msgid "DIFFERENCES IN SNAPSHOTS AND BACKING FILES"
2331 #: ../cat/virt-ls.pod:71
2333 "Find the differences between files in a guest and an earlier snapshot of the "
2338 #: ../cat/virt-ls.pod:74
2341 " virt-ls -lR -a snapshot.img / --uids --time-t > old\n"
2342 " virt-ls -lR -a current.img / --uids --time-t > new\n"
2343 " diff -u old new | less\n"
2348 #: ../cat/virt-ls.pod:78
2350 "The commands above won't find files where the content has changed but the "
2351 "metadata (eg. file size and modification date) is the same. To do that, you "
2352 "need to add the I<--checksum> parameter to both C<virt-ls> commands. I<--"
2353 "checksum> can be quite slow since it has to read and compute a checksum of "
2354 "every regular file in the virtual machine."
2358 #: ../cat/virt-ls.pod:84
2359 msgid "OUTPUT MODES"
2363 #: ../cat/virt-ls.pod:86
2365 "C<virt-ls> has four output modes, controlled by different combinations of "
2366 "the I<-l> and I<-R> options."
2370 #: ../cat/virt-ls.pod:89
2371 msgid "SIMPLE LISTING"
2375 #: ../cat/virt-ls.pod:91
2376 msgid "A simple listing is like the ordinary L<ls(1)> command:"
2380 #: ../cat/virt-ls.pod:93
2383 " $ virt-ls -d guest /\n"
2391 #: ../cat/virt-ls.pod:98
2392 msgid "LONG LISTING"
2396 #: ../cat/virt-ls.pod:100
2398 "With the I<-l> (I<--long>) option, the output is like the C<ls -l> command "
2399 "(more specifically, like the C<guestfs_ll> function)."
2403 #: ../cat/virt-ls.pod:103
2406 " $ virt-ls -l -d guest /\n"
2408 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
2409 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
2415 #: ../cat/virt-ls.pod:109
2417 "Note that while this is useful for displaying a directory, do not try "
2418 "parsing this output in another program. Use L</RECURSIVE LONG LISTING> "
2423 #: ../cat/virt-ls.pod:113
2424 msgid "RECURSIVE LISTING"
2428 #: ../cat/virt-ls.pod:115
2430 "With the I<-R> (I<--recursive>) option, C<virt-ls> lists the names of files "
2431 "and directories recursively:"
2435 #: ../cat/virt-ls.pod:118
2438 " $ virt-ls -R -d guest /tmp\n"
2446 #: ../cat/virt-ls.pod:123
2448 "To generate this output, C<virt-ls> runs the C<guestfs_find0> function and "
2449 "converts C<\\0> characters to C<\\n>."
2453 #: ../cat/virt-ls.pod:126
2454 msgid "RECURSIVE LONG LISTING"
2458 #: ../cat/virt-ls.pod:128
2460 "Using I<-lR> options together changes the output to display directories "
2461 "recursively, with file stats, and optionally other features such as "
2462 "checksums and extended attributes."
2466 #: ../cat/virt-ls.pod:132
2468 "Most of the interesting features of C<virt-ls> are only available when using "
2473 #: ../cat/virt-ls.pod:135
2475 "The fields are normally space-separated. Filenames are B<not> quoted, so "
2476 "you cannot use the output in another program (because filenames can contain "
2477 "spaces and other unsafe characters). If the guest was untrusted and someone "
2478 "knew you were using C<virt-ls> to analyze the guest, they could play tricks "
2479 "on you by creating filenames with embedded newline characters. To B<safely> "
2480 "parse the output in another program, use the I<--csv> (Comma-Separated "
2485 #: ../cat/virt-ls.pod:143
2487 "Note that this output format is completely unrelated to the C<ls -lR> "
2492 #: ../cat/virt-ls.pod:146
2495 " $ virt-ls -lR -d guest /bin\n"
2496 " d 0555 4096 /bin\n"
2497 " - 0755 123 /bin/alsaunmute\n"
2498 " - 0755 28328 /bin/arch\n"
2499 " l 0777 4 /bin/awk -> gawk\n"
2500 " - 0755 27216 /bin/basename\n"
2501 " - 0755 943360 /bin/bash\n"
2507 #: ../cat/virt-ls.pod:155
2508 msgid "These basic fields are always shown:"
2512 #: ../cat/virt-ls.pod:159
2517 #: ../cat/virt-ls.pod:161
2519 "The file type, one of: C<-> (regular file), C<d> (directory), C<c> "
2520 "(character device), C<b> (block device), C<p> (named pipe), C<l> (symbolic "
2521 "link), C<s> (socket) or C<u> (unknown)."
2525 #: ../cat/virt-ls.pod:171
2530 #: ../cat/virt-ls.pod:173
2531 msgid "The Unix permissions, displayed as a 4 digit octal number."
2535 #: ../cat/virt-ls.pod:175
2540 #: ../cat/virt-ls.pod:177
2542 "The size of the file. This is shown in bytes unless I<-h> or I<--human-"
2543 "readable> option is given, in which case this is shown as a human-readable "
2548 #: ../cat/virt-ls.pod:181 ../fish/guestfish-actions.pod:4258
2553 #: ../cat/virt-ls.pod:183
2554 msgid "The full path of the file or directory."
2558 #: ../cat/virt-ls.pod:185
2563 #: ../cat/virt-ls.pod:187
2564 msgid "For symbolic links only, the link target."
2568 #: ../cat/virt-ls.pod:191
2570 "In I<-lR> mode, additional command line options enable the display of more "
2575 #: ../cat/virt-ls.pod:194
2577 "With the I<--uids> flag, these additional fields are displayed before the "
2582 #: ../cat/virt-ls.pod:199
2587 #: ../cat/virt-ls.pod:201
2592 #: ../cat/virt-ls.pod:203
2594 "The UID and GID of the owner of the file (displayed numerically). Note "
2595 "these only make sense in the context of a Unix-like guest."
2599 #: ../cat/virt-ls.pod:208
2600 msgid "With the I<--times> flag, these additional fields are displayed:"
2604 #: ../cat/virt-ls.pod:212
2609 #: ../cat/virt-ls.pod:214
2610 msgid "The time of last access."
2614 #: ../cat/virt-ls.pod:216
2619 #: ../cat/virt-ls.pod:218
2620 msgid "The time of last modification."
2624 #: ../cat/virt-ls.pod:220
2629 #: ../cat/virt-ls.pod:222
2630 msgid "The time of last status change."
2634 #: ../cat/virt-ls.pod:226
2636 "The time fields are displayed as string dates and times, unless one of the "
2637 "I<--time-t>, I<--time-relative> or I<--time-days> flags is given."
2641 #: ../cat/virt-ls.pod:229
2642 msgid "With the I<--extra-stats> flag, these additional fields are displayed:"
2646 #: ../cat/virt-ls.pod:233
2651 #: ../cat/virt-ls.pod:235
2653 "The device containing the file (displayed as major:minor). This may not "
2654 "match devices as known to the guest."
2658 #: ../cat/virt-ls.pod:238
2663 #: ../cat/virt-ls.pod:240
2664 msgid "The inode number."
2668 #: ../cat/virt-ls.pod:242
2673 #: ../cat/virt-ls.pod:244
2674 msgid "The number of hard links."
2678 #: ../cat/virt-ls.pod:246
2683 #: ../cat/virt-ls.pod:248
2685 "For block and char special files, the device (displayed as major:minor)."
2689 #: ../cat/virt-ls.pod:251
2694 #: ../cat/virt-ls.pod:253
2695 msgid "The number of 512 byte blocks allocated to the file."
2699 #: ../cat/virt-ls.pod:257
2701 "With the I<--checksum> flag, the checksum of the file contents is shown "
2702 "(only for regular files). Computing file checksums can take a considerable "
2707 #: ../cat/virt-ls.pod:280
2708 msgid "B<--checksum>"
2712 #: ../cat/virt-ls.pod:282
2713 msgid "B<--checksum=crc|md5|sha1|sha224|sha256|sha384|sha512>"
2717 #: ../cat/virt-ls.pod:284
2719 "Display checksum over file contents for regular files. With no argument, "
2720 "this defaults to using I<md5>. Using an argument, you can select the "
2721 "checksum type to use."
2725 #: ../cat/virt-ls.pod:288 ../cat/virt-ls.pod:325 ../cat/virt-ls.pod:358
2726 #: ../cat/virt-ls.pod:391 ../cat/virt-ls.pod:401 ../cat/virt-ls.pod:408
2727 #: ../cat/virt-ls.pod:415 ../cat/virt-ls.pod:422
2729 "This option only has effect in I<-lR> output mode. See L</RECURSIVE LONG "
2734 #: ../cat/virt-ls.pod:316
2736 "When prompting for keys and passphrases, virt-ls normally turns echoing off "
2737 "so you cannot see what you are typing. If you are not worried about Tempest "
2738 "attacks and there is no one else in the room you can specify this flag to "
2739 "see what you are typing."
2743 #: ../cat/virt-ls.pod:321
2744 msgid "B<--extra-stats>"
2748 #: ../cat/virt-ls.pod:323
2749 msgid "Display extra stats."
2753 #: ../cat/virt-ls.pod:339
2756 " virt-ls --format=raw -a disk.img /dir\n"
2761 #: ../cat/virt-ls.pod:343
2764 " virt-ls --format=raw -a disk.img --format -a another.img /dir\n"
2769 #: ../cat/virt-ls.pod:356
2770 msgid "Display file sizes in human-readable format."
2774 #: ../cat/virt-ls.pod:370
2779 #: ../cat/virt-ls.pod:372
2780 msgid "B<--recursive>"
2784 #: ../cat/virt-ls.pod:374
2786 "Select the mode. With neither of these options, C<virt-ls> produces a "
2787 "simple, flat list of the files in the named directory. See L</SIMPLE "
2792 #: ../cat/virt-ls.pod:378
2794 "C<virt-ls -l> produces a \"long listing\", which shows more detail. See L</"
2799 #: ../cat/virt-ls.pod:381
2801 "C<virt-ls -R> produces a recursive list of files starting at the named "
2802 "directory. See L</RECURSIVE LISTING>."
2806 #: ../cat/virt-ls.pod:384
2808 "C<virt-ls -lR> produces a recursive long listing which can be more easily "
2809 "parsed. See L</RECURSIVE LONG LISTING>."
2813 #: ../cat/virt-ls.pod:387
2818 #: ../cat/virt-ls.pod:389
2819 msgid "Display time fields."
2823 #: ../cat/virt-ls.pod:394
2824 msgid "B<--time-days>"
2828 #: ../cat/virt-ls.pod:396
2829 msgid "Display time fields as days before now (negative if in the future)."
2833 #: ../cat/virt-ls.pod:398
2835 "Note that C<0> in output means \"up to 1 day before now\", or that the age "
2836 "of the file is between 0 and 86399 seconds."
2840 #: ../cat/virt-ls.pod:404
2841 msgid "B<--time-relative>"
2845 #: ../cat/virt-ls.pod:406
2846 msgid "Display time fields as seconds before now (negative if in the future)."
2850 #: ../cat/virt-ls.pod:411
2855 #: ../cat/virt-ls.pod:413
2856 msgid "Display time fields as seconds since the Unix epoch."
2860 #: ../cat/virt-ls.pod:418
2865 #: ../cat/virt-ls.pod:420
2866 msgid "Display UID and GID fields."
2870 #: ../cat/virt-ls.pod:445
2871 msgid "Previous versions of virt-ls allowed you to write either:"
2875 #: ../cat/virt-ls.pod:447
2878 " virt-ls disk.img [disk.img ...] /dir\n"
2883 #: ../cat/virt-ls.pod:451
2886 " virt-ls guestname /dir\n"
2891 #: ../cat/virt-ls.pod:497
2893 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-"
2894 "tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
2895 "L<http://libguestfs.org/>."
2899 #: ../cat/virt-ls.pod:513 ../df/virt-df.pod:241 ../edit/virt-edit.pod:374
2900 #: ../rescue/virt-rescue.pod:302
2901 msgid "Copyright (C) 2009-2011 Red Hat Inc."
2905 #: ../clone/virt-sysprep.pod:5
2907 "virt-sysprep - Reset or unconfigure a virtual machine so clones can be made"
2911 #: ../clone/virt-sysprep.pod:9
2914 " virt-sysprep [--options] -d domname\n"
2919 #: ../clone/virt-sysprep.pod:11
2922 " virt-sysprep [--options] -a disk.img [-a disk.img ...]\n"
2927 #: ../clone/virt-sysprep.pod:15
2929 "Virt-sysprep \"resets\" or \"unconfigures\" a virtual machine so that clones "
2930 "can be made from it. Steps in this process include removing SSH host keys, "
2931 "removing persistent network MAC configuration, and removing user accounts. "
2932 "Each step can be enabled or disabled as required."
2936 #: ../clone/virt-sysprep.pod:21
2938 "Virt-sysprep is a simple shell script, allowing easy inspection or "
2939 "customization by the system administrator."
2943 #: ../clone/virt-sysprep.pod:24
2945 "Virt-sysprep modifies the guest or disk image I<in place>. The guest must "
2946 "be shut down. If you want to preserve the existing contents of the guest, "
2947 "you I<must copy or clone the disk first>. See L</COPYING AND CLONING> below."
2951 #: ../clone/virt-sysprep.pod:29
2953 "You do I<not> need to run virt-sysprep as root. In fact we'd generally "
2954 "recommend that you don't. The time you might want to run it as root is when "
2955 "you need root in order to access the disk image, but even in this case it "
2956 "would be better to change the permissions on the disk image to be writable "
2957 "as the non-root user running virt-sysprep."
2961 #: ../clone/virt-sysprep.pod:35
2963 "\"Sysprep\" stands for \"system preparation\" tool. The name comes from the "
2964 "Microsoft program C<sysprep.exe> which is used to unconfigure Windows "
2965 "machines in preparation for cloning them. Having said that, virt-sysprep "
2966 "does I<not> currently work on Microsoft Windows guests. We plan to support "
2967 "Windows sysprepping in a future version, and we already have code to do it."
2971 #: ../clone/virt-sysprep.pod:76
2972 msgid "B<--enable=...>"
2976 #: ../clone/virt-sysprep.pod:78
2978 "Choose which sysprep operations to perform. Give a comma-separated list of "
2979 "operations, for example:"
2983 #: ../clone/virt-sysprep.pod:81
2986 " --enable=ssh-hostkeys,udev-persistent-net\n"
2991 #: ../clone/virt-sysprep.pod:83
2993 "would enable ONLY C<ssh-hostkeys> and C<udev-persistent-net> operations."
2997 #: ../clone/virt-sysprep.pod:85
2999 "If the I<--enable> option is not given, then we default to trying all "
3000 "possible sysprep operations. But some sysprep operations are skipped for "
3005 #: ../clone/virt-sysprep.pod:89
3007 "Use I<--list-operations> to list operations supported by a particular "
3008 "version of virt-sysprep."
3012 #: ../clone/virt-sysprep.pod:92
3014 "See L</OPERATIONS> below for a list and an explanation of each operation."
3018 #: ../clone/virt-sysprep.pod:106
3021 " virt-sysprep --format=raw -a disk.img\n"
3026 #: ../clone/virt-sysprep.pod:110
3029 " virt-sysprep --format=raw -a disk.img --format -a another.img\n"
3034 #: ../clone/virt-sysprep.pod:119
3035 msgid "B<--hostname> newhostname"
3039 #: ../clone/virt-sysprep.pod:121
3041 "Change the hostname. See the L</hostname> operation below. If not given, "
3042 "defaults to C<localhost.localdomain>."
3046 #: ../clone/virt-sysprep.pod:124
3047 msgid "B<--list-operations>"
3051 #: ../clone/virt-sysprep.pod:126
3052 msgid "List the operations supported by the virt-sysprep program."
3056 #: ../clone/virt-sysprep.pod:128
3057 msgid "B<--selinux-relabel>"
3061 #: ../clone/virt-sysprep.pod:130
3062 msgid "B<--no-selinux-relabel>"
3066 #: ../clone/virt-sysprep.pod:132
3068 "I<--selinux-relabel> forces SELinux relabelling next time the guest boots. "
3069 "I<--no-selinux-relabel> disables relabelling."
3073 #: ../clone/virt-sysprep.pod:135
3075 "The default is to try to detect if SELinux relabelling is required. See L</"
3076 "SELINUX RELABELLING> below for more details."
3080 #: ../clone/virt-sysprep.pod:156
3085 #: ../clone/virt-sysprep.pod:158
3087 "If the I<--enable> option is I<not> given, then I<all sysprep operations are "
3088 "enabled>, although some are skipped depending on the type of guest."
3092 #: ../clone/virt-sysprep.pod:162
3094 "Operations can be individually enabled using the I<--enable> option. Use a "
3095 "comma-separated list, for example:"
3099 #: ../clone/virt-sysprep.pod:165
3102 " virt-sysprep --enable=ssh-hostkeys,udev-persistent-net [etc..]\n"
3107 #: ../clone/virt-sysprep.pod:167
3109 "To list the operations supported by the current version of virt-sysprep, use "
3110 "I<--list-operations>."
3114 #: ../clone/virt-sysprep.pod:170
3116 "Future versions of virt-sysprep may add more operations. If you are using "
3117 "virt-sysprep and want predictable behaviour, specify only the operations "
3118 "that you want to have enabled."
3122 #: ../clone/virt-sysprep.pod:174
3127 #: ../clone/virt-sysprep.pod:176
3128 msgid "Remove user at-jobs and cron-jobs."
3132 #: ../clone/virt-sysprep.pod:178
3133 msgid "dhcp-client-state"
3137 #: ../clone/virt-sysprep.pod:180
3138 msgid "Remove DHCP client leases."
3142 #: ../clone/virt-sysprep.pod:182
3143 msgid "dhcp-server-state"
3147 #: ../clone/virt-sysprep.pod:184
3148 msgid "Remove DHCP server leases."
3152 #: ../clone/virt-sysprep.pod:186
3157 #: ../clone/virt-sysprep.pod:188
3159 "Changes the hostname of the guest to the value given in the I<--hostname> "
3164 #: ../clone/virt-sysprep.pod:191
3166 "If the I<--hostname> parameter is not given, then the hostname is changed to "
3167 "C<localhost.localdomain>."
3171 #: ../clone/virt-sysprep.pod:194
3176 #: ../clone/virt-sysprep.pod:196
3177 msgid "Remove many log files."
3181 #: ../clone/virt-sysprep.pod:198
3186 #: ../clone/virt-sysprep.pod:200
3187 msgid "Remove email from the local mail spool directory."
3191 #: ../clone/virt-sysprep.pod:202
3196 #: ../clone/virt-sysprep.pod:204
3198 "Remove HWADDR (hard-coded MAC address) configuration. For Fedora and Red "
3199 "Hat Enterprise Linux, this is removed from C<ifcfg-*> files."
3203 #: ../clone/virt-sysprep.pod:207
3208 #: ../clone/virt-sysprep.pod:209
3210 "Write some random bytes from the host into the random seed file of the guest."
3214 #: ../clone/virt-sysprep.pod:212
3215 msgid "See C</RANDOM SEED> below."
3219 #: ../clone/virt-sysprep.pod:214
3220 msgid "rhn-systemid"
3224 #: ../clone/virt-sysprep.pod:216
3225 msgid "Remove the RHN system ID."
3229 #: ../clone/virt-sysprep.pod:218
3234 #: ../clone/virt-sysprep.pod:220
3235 msgid "Remove the Smolt hardware UUID."
3239 #: ../clone/virt-sysprep.pod:222
3240 msgid "ssh-hostkeys"
3244 #: ../clone/virt-sysprep.pod:224
3245 msgid "Remove the SSH host keys in the guest."
3249 #: ../clone/virt-sysprep.pod:226
3251 "The SSH host keys are regenerated (differently) next time the guest is "
3256 #: ../clone/virt-sysprep.pod:229
3258 "If, after cloning, the guest gets the same IP address, ssh will give you a "
3259 "stark warning about the host key changing:"
3263 #: ../clone/virt-sysprep.pod:232
3266 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3267 " @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @\n"
3268 " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
3269 " IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\n"
3274 #: ../clone/virt-sysprep.pod:237
3275 msgid "udev-persistent-net"
3279 #: ../clone/virt-sysprep.pod:239
3281 "Remove udev persistent net rules which map the guest's existing MAC address "
3282 "to a fixed ethernet device (eg. eth0)."
3286 #: ../clone/virt-sysprep.pod:242
3288 "After a guest is cloned, the MAC address usually changes. Since the old MAC "
3289 "address occupies the old name (eg. eth0), this means the fresh MAC address "
3290 "is assigned to a new name (eg. eth1) and this is usually undesirable. "
3291 "Erasing the udev persistent net rules avoids this."
3295 #: ../clone/virt-sysprep.pod:247
3300 #: ../clone/virt-sysprep.pod:249
3301 msgid "Remove the utmp file."
3305 #: ../clone/virt-sysprep.pod:251
3307 "This records who is currently logged in on a machine. In modern Linux "
3308 "distros it is stored in a ramdisk and hence not part of the virtual "
3309 "machine's disk, but it was stored on disk in older distros."
3313 #: ../clone/virt-sysprep.pod:255
3318 #: ../clone/virt-sysprep.pod:257
3319 msgid "Remove the yum UUID."
3323 #: ../clone/virt-sysprep.pod:259
3325 "Yum creates a fresh UUID the next time it runs when it notices that the "
3326 "original UUID has been erased."
3330 #: ../clone/virt-sysprep.pod:262
3331 msgid "COPYING AND CLONING"
3335 #: ../clone/virt-sysprep.pod:264
3337 "Virt-sysprep can be used as part of a process of cloning guests, or to "
3338 "prepare a template from which guests can be cloned. There are many "
3339 "different ways to achieve this using the virt tools, and this section is "
3340 "just an introduction."
3344 #: ../clone/virt-sysprep.pod:269
3345 msgid "A virtual machine (when switched off) consists of two parts:"
3349 #: ../clone/virt-sysprep.pod:273
3350 msgid "I<configuration>"
3354 #: ../clone/virt-sysprep.pod:275
3356 "The configuration or description of the guest. eg. The libvirt XML (see "
3357 "C<virsh dumpxml>), the running configuration of the guest, or another "
3358 "external format like OVF."
3362 #: ../clone/virt-sysprep.pod:279
3363 msgid "Some configuration items that might need to be changed:"
3367 #: ../clone/virt-sysprep.pod:285
3372 #: ../clone/virt-sysprep.pod:289 ../clone/virt-sysprep.pod:316
3377 #: ../clone/virt-sysprep.pod:293
3378 msgid "path to block device(s)"
3382 #: ../clone/virt-sysprep.pod:297
3383 msgid "network card MAC address"
3387 #: ../clone/virt-sysprep.pod:301
3388 msgid "I<block device(s)>"
3392 #: ../clone/virt-sysprep.pod:303
3394 "One or more hard disk images, themselves containing files, directories, "
3395 "applications, kernels, configuration, etc."
3399 #: ../clone/virt-sysprep.pod:306
3400 msgid "Some things inside the block devices that might need to be changed:"
3404 #: ../clone/virt-sysprep.pod:312
3405 msgid "hostname and other net configuration"
3409 #: ../clone/virt-sysprep.pod:320
3410 msgid "SSH host keys"
3414 #: ../clone/virt-sysprep.pod:324
3415 msgid "Windows unique security ID (SID)"
3419 #: ../clone/virt-sysprep.pod:328
3420 msgid "Puppet registration"
3424 #: ../clone/virt-sysprep.pod:334
3425 msgid "COPYING THE BLOCK DEVICE"
3429 #: ../clone/virt-sysprep.pod:336
3431 "Starting with an original guest, you probably wish to copy the guest block "
3432 "device and its configuration to make a template. Then once you are happy "
3433 "with the template, you will want to make many clones from it."
3437 #: ../clone/virt-sysprep.pod:341
3443 " original guest --------> template ---------->\n"
3444 " \\------> cloned\n"
3445 " \\-----> guests\n"
3451 #: ../clone/virt-sysprep.pod:349
3453 "You can, of course, just copy the block device on the host using L<cp(1)> or "
3458 #: ../clone/virt-sysprep.pod:352
3462 " original guest --------> template ---------->\n"
3463 " \\------> cloned\n"
3464 " \\-----> guests\n"
3470 #: ../clone/virt-sysprep.pod:358
3471 msgid "There are some smarter (and faster) ways too:"
3475 #: ../clone/virt-sysprep.pod:364
3479 " template ---------->\n"
3480 " \\------> cloned\n"
3481 " \\-----> guests\n"
3487 #: ../clone/virt-sysprep.pod:370
3489 "Use the block device as a backing file and create a snapshot on top for each "
3490 "guest. The advantage is that you don't need to copy the block device (very "
3491 "fast) and only changes are stored (less storage required)."
3495 #: ../clone/virt-sysprep.pod:375
3497 "Note that writing to the backing file once you have created guests on top of "
3498 "it is not possible: you will corrupt the guests."
3502 #: ../clone/virt-sysprep.pod:378
3504 "Tools that can do this include: L<qemu-img(1)> (with the I<create -f qcow2 -"
3505 "o backing_file> option), L<lvcreate(8)> (I<--snapshot> option). Some "
3506 "filesystems (such as btrfs) and most Network Attached Storage devices can "
3507 "also create cheap snapshots from files or LUNs."
3511 #: ../clone/virt-sysprep.pod:386
3512 msgid "Get your NAS to snapshot and/or duplicate the LUN."
3516 #: ../clone/virt-sysprep.pod:390
3517 msgid "Prepare your template using L<virt-sparsify(1)>. See below."
3521 #: ../clone/virt-sysprep.pod:394
3526 #: ../clone/virt-sysprep.pod:396
3528 "A separate tool, L<virt-clone(1)>, can be used to duplicate the block device "
3529 "and/or modify the external libvirt configuration of a guest. It will reset "
3530 "the name, UUID and MAC address of the guest in the libvirt XML."
3534 #: ../clone/virt-sysprep.pod:401
3536 "L<virt-clone(1)> does not use libguestfs and cannot look inside the disk "
3537 "image. This was the original motivation to write virt-sysprep."
3541 #: ../clone/virt-sysprep.pod:404
3546 #: ../clone/virt-sysprep.pod:406
3550 " original guest --------> template\n"
3555 #: ../clone/virt-sysprep.pod:409
3557 "L<virt-sparsify(1)> can be used to make the cloning template smaller, making "
3558 "it easier to compress and/or faster to copy."
3562 #: ../clone/virt-sysprep.pod:412
3564 "Notice that since virt-sparsify also copies the image, you can use it to "
3565 "make the initial copy (instead of C<dd>)."
3569 #: ../clone/virt-sysprep.pod:415
3574 #: ../clone/virt-sysprep.pod:417
3578 " template ---------->\n"
3579 " \\------> cloned\n"
3580 " \\-----> guests\n"
3586 #: ../clone/virt-sysprep.pod:423
3588 "If you want to give people cloned guests, but let them pick the size of the "
3589 "guest themselves (eg. depending on how much they are prepared to pay for "
3590 "disk space), then instead of copying the template, you can run L<virt-resize"
3591 "(1)>. Virt-resize performs a copy and resize, and thus is ideal for cloning "
3592 "guests from a template."
3596 #: ../clone/virt-sysprep.pod:429 ../src/guestfs.pod:1149
3601 #: ../clone/virt-sysprep.pod:431
3603 "Although virt-sysprep removes some sensitive information from the guest, it "
3604 "does not pretend to remove all of it. You should examine the L</OPERATIONS> "
3605 "above, and the implementation of the operations in the shell script. You "
3606 "should also examine the guest afterwards."
3610 #: ../clone/virt-sysprep.pod:436
3612 "Sensitive files are simply removed. The data they contained may still exist "
3613 "on the disk, easily recovered with a hex editor or undelete tool. Use "
3614 "L<virt-sparsify(1)> as one way to remove this content. See also the L<scrub"
3615 "(1)> command to get rid of deleted content in directory entries and inodes."
3619 #: ../clone/virt-sysprep.pod:442
3624 #: ../clone/virt-sysprep.pod:444
3625 msgid "I<(This section applies to Linux guests only)>"
3629 #: ../clone/virt-sysprep.pod:446
3631 "The virt-sysprep C<random-seed> operation writes a few bytes of randomness "
3632 "from the host into the guest's random seed file."
3636 #: ../clone/virt-sysprep.pod:449
3638 "If this is just done once and the guest is cloned from the same template, "
3639 "then each guest will start with the same entropy, and things like SSH host "
3640 "keys and TCP sequence numbers may be predictable."
3644 #: ../clone/virt-sysprep.pod:453
3646 "Therefore you should arrange to add more randomness I<after> cloning from a "
3647 "template too, which can be done by just enabling the C<random-seed> "
3652 #: ../clone/virt-sysprep.pod:457
3655 " cp template.img newguest.img\n"
3656 " virt-sysprep --enable=random-seed -a newguest.img\n"
3661 #: ../clone/virt-sysprep.pod:460
3662 msgid "SELINUX RELABELLING"
3666 #: ../clone/virt-sysprep.pod:462
3667 msgid "I<(This section applies to Linux guests using SELinux only)>"
3671 #: ../clone/virt-sysprep.pod:464
3673 "If any new files are created by virt-sysprep, then virt-sysprep touches C</."
3674 "autorelabel> so that these will be correctly labelled by SELinux the next "
3675 "time the guest is booted. This process interrupts boot and can take some "
3680 #: ../clone/virt-sysprep.pod:469
3682 "You can force relabelling for all guests by supplying the I<--selinux-"
3687 #: ../clone/virt-sysprep.pod:472
3689 "You can disable relabelling entirely by supplying the I<--no-selinux-"
3694 #: ../clone/virt-sysprep.pod:484
3695 msgid "This program returns 0 on success, or 1 if there was an error."
3699 #: ../clone/virt-sysprep.pod:488
3701 "L<guestfs(3)>, L<guestfish(1)>, L<virt-clone(1)>, L<virt-rescue(1)>, L<virt-"
3702 "resize(1)>, L<virt-sparsify(1)>, L<virsh(1)>, L<lvcreate(8)>, L<qemu-img(1)"
3703 ">, L<scrub(1)>, L<http://libguestfs.org/>, L<http://libvirt.org/>."
3707 #: ../df/virt-df.pod:5
3708 msgid "virt-df - Display free space on virtual filesystems"
3712 #: ../df/virt-df.pod:9
3715 " virt-df [--options]\n"
3720 #: ../df/virt-df.pod:11
3723 " virt-df [--options] -d domname\n"
3728 #: ../df/virt-df.pod:13
3731 " virt-df [--options] -a disk.img [-a disk.img ...]\n"
3736 #: ../df/virt-df.pod:17
3739 " virt-df [--options] domname\n"
3744 #: ../df/virt-df.pod:19
3747 " virt-df [--options] disk.img [disk.img ...]\n"
3752 #: ../df/virt-df.pod:23
3754 "C<virt-df> is a command line tool to display free space on virtual machine "
3755 "filesystems. Unlike other tools, it doesn't just display the size of disk "
3756 "allocated to a virtual machine, but can look inside disk images to see how "
3757 "much space is really being used."
3761 #: ../df/virt-df.pod:28
3763 "If used without any I<-a> or I<-d> arguments, C<virt-df> checks with libvirt "
3764 "to get a list of all active and inactive guests, and performs a C<df>-type "
3765 "operation on each one in turn, printing out the results."
3769 #: ../df/virt-df.pod:32
3771 "If any I<-a> or I<-d> arguments are specified, C<virt-df> performs a C<df>-"
3772 "type operation on either the single named libvirt domain, or on the disk "
3773 "image(s) listed on the command line (which must all belong to a single VM). "
3774 "In this mode (with arguments), C<virt-df> will I<only work for a single "
3775 "guest>. If you want to run on multiple guests, then you have to invoke "
3776 "C<virt-df> multiple times."
3780 #: ../df/virt-df.pod:39
3782 "Use the I<--csv> option to get a format which can be easily parsed by other "
3783 "programs. Other options are similar to the standard L<df(1)> command."
3787 #: ../df/virt-df.pod:45
3789 "Show disk usage for a single libvirt guest called C<F14x64>. Make the "
3790 "output human-readable:"
3794 #: ../df/virt-df.pod:48
3797 " # virt-df -d F14x64 -h\n"
3798 " Filesystem Size Used Available Use%\n"
3799 " F14x64:/dev/sda1 484M 66M 393M 14%\n"
3800 " F14x64:/dev/vg_f13x64/lv_root 7.4G 3.4G 4.0G 46%\n"
3805 #: ../df/virt-df.pod:53
3806 msgid "Show disk usage for a disk image file called C<test.img>:"
3810 #: ../df/virt-df.pod:55
3813 " $ virt-df -a test1.img\n"
3814 " Filesystem 1K-blocks Used Available Use%\n"
3815 " test1.img:/dev/sda1 99099 1551 92432 2%\n"
3820 #: ../df/virt-df.pod:112
3823 " virt-df --format=raw -a disk.img\n"
3828 #: ../df/virt-df.pod:116
3831 " virt-df --format=raw -a disk.img --format -a another.img\n"
3836 #: ../df/virt-df.pod:129
3837 msgid "Print sizes in human-readable format."
3841 #: ../df/virt-df.pod:131
3842 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
3846 #: ../df/virt-df.pod:133 ../fish/guestfish.pod:258 ../fuse/guestmount.pod:164
3851 #: ../df/virt-df.pod:135
3856 #: ../df/virt-df.pod:137
3857 msgid "Print inodes instead of blocks."
3861 #: ../df/virt-df.pod:139
3862 msgid "B<--one-per-guest>"
3866 #: ../df/virt-df.pod:141
3868 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
3869 "disks from several guests to a single libguestfs appliance."
3873 #: ../df/virt-df.pod:144
3874 msgid "You might use this option in the following circumstances:"
3878 #: ../df/virt-df.pod:150
3880 "If you think an untrusted guest might actively try to exploit the libguestfs "
3881 "appliance kernel, then this prevents one guest from interfering with the "
3882 "stats printed for another guest."
3886 #: ../df/virt-df.pod:156
3888 "If the kernel has a bug which stops it from accessing a filesystem in one "
3889 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
3890 "and report stats for further guests."
3894 #: ../df/virt-df.pod:165
3896 "Print UUIDs instead of names. This is useful for following a guest even "
3897 "when the guest is migrated or renamed, or when two guests happen to have the "
3902 #: ../df/virt-df.pod:169
3904 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
3905 "images, we still print the disk image name even when this option is "
3910 #: ../df/virt-df.pod:229
3912 "L<df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<http://"
3917 #: ../edit/virt-edit.pod:5
3918 msgid "virt-edit - Edit a file in a virtual machine"
3922 #: ../edit/virt-edit.pod:9
3925 " virt-edit [--options] -d domname file [file ...]\n"
3930 #: ../edit/virt-edit.pod:11
3933 " virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]\n"
3938 #: ../edit/virt-edit.pod:13
3941 " virt-edit [-d domname|-a disk.img] file -e 'expr'\n"
3946 #: ../edit/virt-edit.pod:17
3949 " virt-edit domname file\n"
3954 #: ../edit/virt-edit.pod:19 ../edit/virt-edit.pod:183
3957 " virt-edit disk.img [disk.img ...] file\n"
3962 #: ../edit/virt-edit.pod:21 ../fish/guestfish.pod:23
3963 #: ../fish/virt-copy-in.pod:13 ../fish/virt-tar-in.pod:15
3964 #: ../fuse/guestmount.pod:15 ../rescue/virt-rescue.pod:19
3965 #: ../tools/virt-tar.pl:64 ../tools/virt-win-reg.pl:51
3970 #: ../edit/virt-edit.pod:23
3972 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
3973 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
3974 "doing this, but doesn't catch all cases."
3978 #: ../edit/virt-edit.pod:29
3980 "C<virt-edit> is a command line tool to edit C<file> where each C<file> "
3981 "exists in the named virtual machine (or disk image)."
3985 #: ../edit/virt-edit.pod:32
3987 "Multiple filenames can be given, in which case they are each edited in "
3988 "turn. Each filename must be a full path, starting at the root directory "
3989 "(starting with '/')."
3993 #: ../edit/virt-edit.pod:36
3994 msgid "If you want to just view a file, use L<virt-cat(1)>."
3998 #: ../edit/virt-edit.pod:38
4000 "For more complex cases you should look at the L<guestfish(1)> tool (see L</"
4001 "USING GUESTFISH> below)."
4005 #: ../edit/virt-edit.pod:41
4007 "C<virt-edit> cannot be used to create a new file. L<guestfish(1)> can do "
4008 "that and much more."
4012 #: ../edit/virt-edit.pod:46
4013 msgid "Edit the named files interactively:"
4017 #: ../edit/virt-edit.pod:48
4020 " virt-edit -d mydomain /boot/grub/grub.conf\n"
4025 #: ../edit/virt-edit.pod:50
4028 " virt-edit -d mydomain /etc/passwd\n"
4033 #: ../edit/virt-edit.pod:52
4034 msgid "For Windows guests, some Windows paths are understood:"
4038 #: ../edit/virt-edit.pod:54
4041 " virt-edit -d mywindomain 'c:\\autoexec.bat'\n"
4046 #: ../edit/virt-edit.pod:56
4048 "If Perl is installed, you can also edit files non-interactively (see L</NON-"
4049 "INTERACTIVE EDITING> below). To change the init default level to 5:"
4053 #: ../edit/virt-edit.pod:60
4056 " virt-edit -d mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
4061 #: ../edit/virt-edit.pod:81
4062 msgid "B<-b> extension"
4066 #: ../edit/virt-edit.pod:83
4067 msgid "B<--backup> extension"
4071 #: ../edit/virt-edit.pod:85
4073 "Create a backup of the original file I<in the guest disk image>. The backup "
4074 "has the original filename with C<extension> added."
4078 #: ../edit/virt-edit.pod:88
4080 "Usually the first character of C<extension> would be a dot C<.> so you would "
4085 #: ../edit/virt-edit.pod:91
4088 " virt-edit -b .orig [etc]\n"
4093 #: ../edit/virt-edit.pod:93
4094 msgid "By default, no backup file is made."
4098 #: ../edit/virt-edit.pod:95 ../fish/guestfish.pod:181
4099 #: ../fuse/guestmount.pod:105 ../inspector/virt-inspector.pod:74
4100 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-list-partitions.pl:78
4101 #: ../tools/virt-tar.pl:127 ../tools/virt-win-reg.pl:128
4106 #: ../edit/virt-edit.pod:97 ../fish/guestfish.pod:183
4107 #: ../fuse/guestmount.pod:107 ../inspector/virt-inspector.pod:76
4108 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80
4109 #: ../tools/virt-tar.pl:129 ../tools/virt-win-reg.pl:130
4110 msgid "B<--connect URI>"
4114 #: ../edit/virt-edit.pod:102 ../tools/virt-list-filesystems.pl:84
4115 #: ../tools/virt-list-partitions.pl:85 ../tools/virt-tar.pl:134
4116 #: ../tools/virt-win-reg.pl:135
4118 "If you specify guest block devices directly, then libvirt is not used at all."
4122 #: ../edit/virt-edit.pod:114
4124 "When prompting for keys and passphrases, virt-edit normally turns echoing "
4125 "off so you cannot see what you are typing. If you are not worried about "
4126 "Tempest attacks and there is no one else in the room you can specify this "
4127 "flag to see what you are typing."
4131 #: ../edit/virt-edit.pod:119
4136 #: ../edit/virt-edit.pod:121
4137 msgid "B<--expr> EXPR"
4141 #: ../edit/virt-edit.pod:123
4143 "Instead of launching the external editor, non-interactively apply the Perl "
4144 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
4149 #: ../edit/virt-edit.pod:127
4151 "Be careful to properly quote the expression to prevent it from being altered "
4156 #: ../edit/virt-edit.pod:130
4157 msgid "Note that this option is only available when Perl 5 is installed."
4161 #: ../edit/virt-edit.pod:132
4162 msgid "B<--format> raw|qcow2|..."
4166 #: ../edit/virt-edit.pod:143
4169 " virt-edit --format=raw -a disk.img file\n"
4174 #: ../edit/virt-edit.pod:147
4177 " virt-edit --format=raw -a disk.img --format -a another.img file\n"
4182 #: ../edit/virt-edit.pod:181
4183 msgid "Previous versions of virt-edit allowed you to write either:"
4187 #: ../edit/virt-edit.pod:187
4190 " virt-edit guestname file\n"
4195 #: ../edit/virt-edit.pod:195
4196 msgid "NON-INTERACTIVE EDITING"
4200 #: ../edit/virt-edit.pod:197
4202 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
4203 "administrator can interactively edit the file."
4207 #: ../edit/virt-edit.pod:200
4209 "There are two ways also to use C<virt-edit> from scripts in order to make "
4210 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
4211 "like this, it's less error-prone to write scripts directly using the "
4212 "libguestfs API and Augeas for configuration file editing.)"
4216 #: ../edit/virt-edit.pod:206
4218 "The first method is to temporarily set C<$EDITOR> to any script or program "
4219 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
4220 "update C<tmpfile> in place however it likes."
4224 #: ../edit/virt-edit.pod:210
4226 "The second method is to use the I<-e> parameter of C<virt-edit> to run a "
4227 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
4228 "instances of C<foo> with C<bar> in a file:"
4232 #: ../edit/virt-edit.pod:214
4235 " virt-edit -d domname filename -e 's/foo/bar/'\n"
4240 #: ../edit/virt-edit.pod:216
4242 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
4243 "For example to delete root's password you could do:"
4247 #: ../edit/virt-edit.pod:219
4250 " virt-edit -d domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
4255 #: ../edit/virt-edit.pod:221
4257 "What really happens is that the snippet is evaluated as a Perl expression "
4258 "for each line of the file. The line, including the final C<\\n>, is passed "
4259 "in C<$_> and the expression should update C<$_> or leave it unchanged."
4263 #: ../edit/virt-edit.pod:226
4265 "To delete a line, set C<$_> to the empty string. For example, to delete the "
4266 "C<apache> user account from the password file you can do:"
4270 #: ../edit/virt-edit.pod:229
4273 " virt-edit -d mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
4278 #: ../edit/virt-edit.pod:231
4280 "To insert a line, prepend or append it to C<$_>. However appending lines to "
4281 "the end of the file is rather difficult this way since there is no concept "
4282 "of \"last line of the file\" - your expression just doesn't get called "
4283 "again. You might want to use the first method (setting C<$EDITOR>) if you "
4288 #: ../edit/virt-edit.pod:237
4290 "The variable C<$lineno> contains the current line number. As is "
4291 "traditional, the first line in the file is number C<1>."
4295 #: ../edit/virt-edit.pod:240
4297 "The return value from the expression is ignored, but the expression may call "
4298 "C<die> in order to abort the whole program, leaving the original file "
4303 #: ../edit/virt-edit.pod:244
4305 "Remember when matching the end of a line that C<$_> may contain the final C<"
4306 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
4307 "newline then neither of these. Thus to match or substitute some text at the "
4308 "end of a line, use this regular expression:"
4312 #: ../edit/virt-edit.pod:249
4315 " /some text(\\r?\\n)?$/\n"
4320 #: ../edit/virt-edit.pod:251
4322 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
4323 "$_> itself (since that would remove all newlines from the file):"
4327 #: ../edit/virt-edit.pod:255
4330 " my $m = $_; chomp $m; $m =~ /some text$/\n"
4335 #: ../edit/virt-edit.pod:257 ../fish/guestfish.pod:858
4336 msgid "WINDOWS PATHS"
4340 #: ../edit/virt-edit.pod:259
4342 "C<virt-edit> has a limited ability to understand Windows drive letters and "
4343 "paths (eg. C<E:\\foo\\bar.txt>)."
4347 #: ../edit/virt-edit.pod:262
4348 msgid "If and only if the guest is running Windows then:"
4352 #: ../edit/virt-edit.pod:268
4354 "Drive letter prefixes like C<C:> are resolved against the Windows Registry "
4355 "to the correct filesystem."
4359 #: ../edit/virt-edit.pod:273
4361 "Any backslash (C<\\>) characters in the path are replaced with forward "
4362 "slashes so that libguestfs can process it."
4366 #: ../edit/virt-edit.pod:278
4368 "The path is resolved case insensitively to locate the file that should be "
4373 #: ../edit/virt-edit.pod:283
4374 msgid "There are some known shortcomings:"
4378 #: ../edit/virt-edit.pod:289
4379 msgid "Some NTFS symbolic links may not be followed correctly."
4383 #: ../edit/virt-edit.pod:293
4384 msgid "NTFS junction points that cross filesystems are not followed."
4388 #: ../edit/virt-edit.pod:299
4390 "L<guestfish(1)> is a more powerful, lower level tool which you can use when "
4391 "C<virt-edit> doesn't work."
4395 #: ../edit/virt-edit.pod:302
4396 msgid "Using C<virt-edit> is approximately equivalent to doing:"
4400 #: ../edit/virt-edit.pod:304
4403 " guestfish --rw -i -d domname edit /file\n"
4408 #: ../edit/virt-edit.pod:306
4410 "where C<domname> is the name of the libvirt guest, and C</file> is the full "
4415 #: ../edit/virt-edit.pod:309
4417 "The command above uses libguestfs's guest inspection feature and so does not "
4418 "work on guests that libguestfs cannot inspect, or on things like arbitrary "
4419 "disk images that don't contain guests. To edit a file on a disk image "
4424 #: ../edit/virt-edit.pod:314
4427 " guestfish --rw -a disk.img -m /dev/sda1 edit /file\n"
4432 #: ../edit/virt-edit.pod:316
4434 "where C<disk.img> is the disk image, C</dev/sda1> is the filesystem within "
4435 "the disk image to edit, and C</file> is the full path to the file."
4439 #: ../edit/virt-edit.pod:320
4441 "C<virt-edit> cannot create new files. Use the guestfish commands C<touch>, "
4442 "C<write> or C<upload> instead:"
4446 #: ../edit/virt-edit.pod:323
4449 " guestfish --rw -i -d domname touch /newfile\n"
4454 #: ../edit/virt-edit.pod:325
4457 " guestfish --rw -i -d domname write /newfile \"new content\"\n"
4462 #: ../edit/virt-edit.pod:327
4465 " guestfish --rw -i -d domname upload localfile /newfile\n"
4470 #: ../edit/virt-edit.pod:329 ../fish/guestfish.pod:1119
4471 #: ../rescue/virt-rescue.pod:261 ../sparsify/virt-sparsify.pod:232
4472 #: ../src/guestfs.pod:3194 ../test-tool/libguestfs-test-tool.pod:95
4473 msgid "ENVIRONMENT VARIABLES"
4477 #: ../edit/virt-edit.pod:333
4482 #: ../edit/virt-edit.pod:335
4484 "If set, this string is used as the editor. It may contain arguments, eg. C<"
4489 #: ../edit/virt-edit.pod:338
4490 msgid "If not set, C<vi> is used."
4494 #: ../edit/virt-edit.pod:356
4496 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
4497 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
4498 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
4502 #: ../erlang/examples/guestfs-erlang.pod:5
4503 msgid "guestfs-erlang - How to use libguestfs from Erlang"
4507 #: ../erlang/examples/guestfs-erlang.pod:9
4510 " {ok, G} = guestfs:create(),\n"
4511 " ok = guestfs:add_drive_opts(G, Disk,\n"
4512 " [{format, \"raw\"}, {readonly, true}]),\n"
4513 " ok = guestfs:launch(G),\n"
4514 " [Device] = guestfs:list_devices(G),\n"
4515 " ok = guestfs:close(G).\n"
4520 #: ../erlang/examples/guestfs-erlang.pod:18
4522 "This manual page documents how to call libguestfs from the Erlang "
4523 "programming language. This page just documents the differences from the C "
4524 "API and gives some examples. If you are not familiar with using libguestfs, "
4525 "you also need to read L<guestfs(3)>."
4529 #: ../erlang/examples/guestfs-erlang.pod:23
4530 msgid "OPENING AND CLOSING THE HANDLE"
4534 #: ../erlang/examples/guestfs-erlang.pod:25
4536 "The Erlang bindings are implemented using an external program called C<erl-"
4537 "guestfs>. This program must be on the current PATH, or else you should "
4538 "specify the full path to the program:"
4542 #: ../erlang/examples/guestfs-erlang.pod:29
4545 " {ok, G} = guestfs:create().\n"
4550 #: ../erlang/examples/guestfs-erlang.pod:31
4553 " {ok, G} = guestfs:create(\"/path/to/erl-guestfs\").\n"
4558 #: ../erlang/examples/guestfs-erlang.pod:33
4559 msgid "C<G> is the libguestfs handle which you should pass to other functions."
4563 #: ../erlang/examples/guestfs-erlang.pod:36
4564 msgid "To close the handle:"
4568 #: ../erlang/examples/guestfs-erlang.pod:38
4571 " ok = guestfs:close(G).\n"
4576 #: ../erlang/examples/guestfs-erlang.pod:40
4577 msgid "FUNCTIONS WITH OPTIONAL ARGUMENTS"
4581 #: ../erlang/examples/guestfs-erlang.pod:42
4583 "For functions that take optional arguments, the first arguments are the non-"
4584 "optional ones. The last argument is a list of tuples supplying the "
4585 "remaining optional arguments."
4589 #: ../erlang/examples/guestfs-erlang.pod:46
4592 " ok = guestfs:add_drive_opts(G, Disk,\n"
4593 " [{format, \"raw\"}, {readonly, true}]).\n"
4598 #: ../erlang/examples/guestfs-erlang.pod:49
4599 msgid "If the last argument would be an empty list, you can also omit it:"
4603 #: ../erlang/examples/guestfs-erlang.pod:51
4606 " ok = guestfs:add_drive_opts(G, Disk).\n"
4611 #: ../erlang/examples/guestfs-erlang.pod:53
4612 msgid "RETURN VALUES AND ERRORS"
4616 #: ../erlang/examples/guestfs-erlang.pod:55
4618 "On success, most functions return a C<Result> term (which could be a list, "
4619 "string, tuple etc.). If there is nothing for the function to return, then "
4620 "the atom C<ok> is returned."
4624 #: ../erlang/examples/guestfs-erlang.pod:59
4625 msgid "On error, you would see one of the following tuples:"
4629 #: ../erlang/examples/guestfs-erlang.pod:63
4630 msgid "C<{error, Msg, Errno}>"
4634 #: ../erlang/examples/guestfs-erlang.pod:65
4635 msgid "This indicates an ordinary error from the function."
4639 #: ../erlang/examples/guestfs-erlang.pod:67
4641 "C<Msg> is the error message (string) and C<Errno> is the Unix error "
4646 #: ../erlang/examples/guestfs-erlang.pod:70
4647 msgid "C<Errno> can be zero. See L<guestfs(3)/guestfs_last_errno>."
4651 #: ../erlang/examples/guestfs-erlang.pod:72
4652 msgid "C<{unknown, Function}>"
4656 #: ../erlang/examples/guestfs-erlang.pod:74
4658 "This indicates that the function you called is not known. Generally this "
4659 "means you are mixing C<erl-guestfs> from another version of libguestfs, "
4660 "which you should not do."
4664 #: ../erlang/examples/guestfs-erlang.pod:78
4665 msgid "C<Function> is the name of the unknown function."
4669 #: ../erlang/examples/guestfs-erlang.pod:80
4670 msgid "C<{unknownarg, Arg}>"
4674 #: ../erlang/examples/guestfs-erlang.pod:82
4676 "This indicates that you called a function with optional arguments, with an "
4677 "unknown argument name."
4681 #: ../erlang/examples/guestfs-erlang.pod:85
4682 msgid "C<Arg> is the name of the unknown argument."
4686 #: ../erlang/examples/guestfs-erlang.pod:89
4687 #: ../examples/guestfs-examples.pod:25 ../java/examples/guestfs-java.pod:37
4688 #: ../ocaml/examples/guestfs-ocaml.pod:70 ../perl/examples/guestfs-perl.pod:31
4689 #: ../python/examples/guestfs-python.pod:34
4690 #: ../ruby/examples/guestfs-ruby.pod:28
4691 msgid "EXAMPLE 1: CREATE A DISK IMAGE"
4695 #: ../erlang/examples/guestfs-erlang.pod:91
4696 #: ../examples/guestfs-examples.pod:27 ../java/examples/guestfs-java.pod:39
4697 #: ../ocaml/examples/guestfs-ocaml.pod:72 ../perl/examples/guestfs-perl.pod:33
4698 #: ../python/examples/guestfs-python.pod:36
4699 #: ../ruby/examples/guestfs-ruby.pod:30
4704 #: ../erlang/examples/guestfs-erlang.pod:93
4705 #: ../examples/guestfs-examples.pod:29 ../java/examples/guestfs-java.pod:41
4706 #: ../ocaml/examples/guestfs-ocaml.pod:74 ../perl/examples/guestfs-perl.pod:35
4707 #: ../python/examples/guestfs-python.pod:38
4708 #: ../ruby/examples/guestfs-ruby.pod:32
4709 msgid "EXAMPLE 2: INSPECT A VIRTUAL MACHINE DISK IMAGE"
4713 #: ../erlang/examples/guestfs-erlang.pod:95
4714 #: ../examples/guestfs-examples.pod:31 ../java/examples/guestfs-java.pod:43
4715 #: ../ocaml/examples/guestfs-ocaml.pod:76 ../perl/examples/guestfs-perl.pod:37
4716 #: ../python/examples/guestfs-python.pod:40
4717 #: ../ruby/examples/guestfs-ruby.pod:34
4722 #: ../erlang/examples/guestfs-erlang.pod:99
4724 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4725 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4726 "L<guestfs-ruby(3)>, L<http://www.erlang.org/>. L<http://libguestfs.org/>."
4730 #: ../erlang/examples/guestfs-erlang.pod:110
4731 #: ../examples/guestfs-examples.pod:45 ../examples/guestfs-recipes.pod:397
4732 #: ../fish/guestfish.pod:1296 ../fish/virt-copy-in.pod:60
4733 #: ../fish/virt-copy-out.pod:49 ../fish/virt-tar-in.pod:58
4734 #: ../fish/virt-tar-out.pod:51 ../fuse/guestmount.pod:328
4735 #: ../inspector/virt-inspector.pod:389 ../java/examples/guestfs-java.pod:58
4736 #: ../ocaml/examples/guestfs-ocaml.pod:91 ../perl/examples/guestfs-perl.pod:52
4737 #: ../python/examples/guestfs-python.pod:54
4738 #: ../ruby/examples/guestfs-ruby.pod:48 ../src/guestfs.pod:3333
4739 #: ../test-tool/libguestfs-test-tool.pod:106
4744 #: ../erlang/examples/guestfs-erlang.pod:112
4745 #: ../examples/guestfs-examples.pod:47 ../examples/guestfs-recipes.pod:399
4746 #: ../fish/guestfish.pod:1298 ../fish/virt-copy-in.pod:62
4747 #: ../fish/virt-copy-out.pod:51 ../fish/virt-tar-in.pod:60
4748 #: ../fish/virt-tar-out.pod:53 ../fuse/guestmount.pod:330
4749 #: ../java/examples/guestfs-java.pod:60 ../ocaml/examples/guestfs-ocaml.pod:93
4750 #: ../perl/examples/guestfs-perl.pod:54
4751 #: ../python/examples/guestfs-python.pod:56
4752 #: ../ruby/examples/guestfs-ruby.pod:50 ../src/guestfs.pod:3335
4753 #: ../test-tool/libguestfs-test-tool.pod:108
4754 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4758 #: ../erlang/examples/guestfs-erlang.pod:116
4759 #: ../java/examples/guestfs-java.pod:64 ../perl/examples/guestfs-perl.pod:58
4760 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
4764 #: ../erlang/examples/guestfs-erlang.pod:118
4765 #: ../examples/guestfs-examples.pod:53 ../examples/guestfs-recipes.pod:405
4766 #: ../java/examples/guestfs-java.pod:66 ../ocaml/examples/guestfs-ocaml.pod:99
4767 #: ../perl/examples/guestfs-perl.pod:60
4768 #: ../python/examples/guestfs-python.pod:62
4769 #: ../ruby/examples/guestfs-ruby.pod:56
4771 "The examples in this manual page may be freely copied, modified and "
4772 "distributed without any restrictions."
4776 #: ../erlang/examples/guestfs-erlang.pod:121
4777 #: ../examples/guestfs-examples.pod:56 ../examples/guestfs-recipes.pod:408
4778 #: ../java/examples/guestfs-java.pod:69
4779 #: ../ocaml/examples/guestfs-ocaml.pod:102
4780 #: ../perl/examples/guestfs-perl.pod:63
4781 #: ../python/examples/guestfs-python.pod:65
4782 #: ../ruby/examples/guestfs-ruby.pod:59 ../src/guestfs.pod:3342
4784 "This library is free software; you can redistribute it and/or modify it "
4785 "under the terms of the GNU Lesser General Public License as published by the "
4786 "Free Software Foundation; either version 2 of the License, or (at your "
4787 "option) any later version."
4791 #: ../erlang/examples/guestfs-erlang.pod:126
4792 #: ../examples/guestfs-examples.pod:61 ../examples/guestfs-recipes.pod:413
4793 #: ../java/examples/guestfs-java.pod:74
4794 #: ../ocaml/examples/guestfs-ocaml.pod:107
4795 #: ../perl/examples/guestfs-perl.pod:68
4796 #: ../python/examples/guestfs-python.pod:70
4797 #: ../ruby/examples/guestfs-ruby.pod:64 ../src/guestfs.pod:3347
4799 "This library is distributed in the hope that it will be useful, but WITHOUT "
4800 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4801 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4806 #: ../erlang/examples/guestfs-erlang.pod:131
4807 #: ../examples/guestfs-examples.pod:66 ../examples/guestfs-recipes.pod:418
4808 #: ../java/examples/guestfs-java.pod:79
4809 #: ../ocaml/examples/guestfs-ocaml.pod:112
4810 #: ../perl/examples/guestfs-perl.pod:73
4811 #: ../python/examples/guestfs-python.pod:75
4812 #: ../ruby/examples/guestfs-ruby.pod:69 ../src/guestfs.pod:3352
4814 "You should have received a copy of the GNU Lesser General Public License "
4815 "along with this library; if not, write to the Free Software Foundation, "
4816 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4820 #: ../examples/guestfs-examples.pod:5
4821 msgid "guestfs-examples - Examples of using libguestfs from C"
4825 #: ../examples/guestfs-examples.pod:9 ../src/guestfs.pod:9
4828 " #include <guestfs.h>\n"
4833 #: ../examples/guestfs-examples.pod:11
4836 " guestfs_h *g = guestfs_create ();\n"
4837 " guestfs_add_drive_ro (g, \"disk.img\");\n"
4838 " guestfs_launch (g);\n"
4843 #: ../examples/guestfs-examples.pod:15 ../src/guestfs.pod:19
4846 " cc prog.c -o prog -lguestfs\n"
4848 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
4853 #: ../examples/guestfs-examples.pod:21
4855 "This manual page contains examples of calling libguestfs from the C "
4856 "programming language. If you are not familiar with using libguestfs, you "
4857 "also need to read L<guestfs(3)>."
4861 #: ../examples/guestfs-examples.pod:35
4863 "L<guestfs(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)"
4864 ">, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
4865 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
4869 #: ../examples/guestfs-examples.pod:51 ../ocaml/examples/guestfs-ocaml.pod:97
4870 #: ../python/examples/guestfs-python.pod:60
4871 #: ../ruby/examples/guestfs-ruby.pod:54
4872 msgid "Copyright (C) 2010 Red Hat Inc. L<http://libguestfs.org/>"
4876 #: ../examples/guestfs-recipes.pod:3 ../examples/guestfs-recipes.pod:12
4881 #: ../examples/guestfs-recipes.pod:5
4883 "pod2man and pod2html have differing bugs which makes it hard to write URLs "
4884 "here. The only way which works for both sorts of output is to just write "
4885 "the URL directly. Do NOT use L<...> for URLs."
4889 #: ../examples/guestfs-recipes.pod:9
4891 "We break with tradition here and don't use ALL CAPS for the section "
4892 "headings, as this makes them much easier to read."
4896 #: ../examples/guestfs-recipes.pod:16
4897 msgid "guestfs-recipes - libguestfs, guestfish and virt tools recipes"
4901 #: ../examples/guestfs-recipes.pod:20
4903 "This page contains recipes for and links to things you can do using "
4904 "libguestfs, L<guestfish(1)> and the virt tools."
4908 #: ../examples/guestfs-recipes.pod:23
4909 msgid "Audit a virtual machine for setuid files"
4913 #: ../examples/guestfs-recipes.pod:25
4915 "The link below contains a small program which can be used to audit a Linux "
4916 "virtual machine to see what setuid and setgid files it contains."
4920 #: ../examples/guestfs-recipes.pod:28
4922 "https://rwmj.wordpress.com/2010/12/15/tip-audit-virtual-machine-for-setuid-"
4927 #: ../examples/guestfs-recipes.pod:30
4928 msgid "Change the background image in a Windows XP VM"
4932 #: ../examples/guestfs-recipes.pod:32
4934 "The links below explain how to use L<guestfish(1)> to change the background "
4935 "image for a user of a Windows XP VM. Unfortunately the technique appears to "
4936 "be substantially different for each version of Windows."
4940 #: ../examples/guestfs-recipes.pod:37
4942 "https://lists.fedoraproject.org/pipermail/virt/2011-May/002655.html https://"
4943 "lists.fedoraproject.org/pipermail/virt/2011-May/002658.html"
4947 #: ../examples/guestfs-recipes.pod:40
4948 msgid "Cloning a virtual machine (Linux)"
4952 #: ../examples/guestfs-recipes.pod:42
4954 "The guestfish technique described in the link below works well for most "
4955 "Linux VMs. Depending on the Linux distro you may need to change the paths "
4960 #: ../examples/guestfs-recipes.pod:46
4962 "https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-"
4967 #: ../examples/guestfs-recipes.pod:48
4969 "Avoid L<virt-clone(1)>. Currently what to do about virt-clone is under "
4974 #: ../examples/guestfs-recipes.pod:51
4975 msgid "https://www.redhat.com/archives/virt-tools-list/2011-May/msg00019.html"
4979 #: ../examples/guestfs-recipes.pod:53
4980 msgid "Cloning a virtual machine (Windows)"
4984 #: ../examples/guestfs-recipes.pod:55
4986 "It is possible to do a \"sysprep\" using libguestfs alone, although not "
4987 "straightforward. Currently there is code in the Aeolus Oz project which "
4988 "does this (using libguestfs). As part of our review of the virt-clone tool, "
4989 "we may add sysprepping ability."
4993 #: ../examples/guestfs-recipes.pod:60
4995 "https://github.com/clalancette/oz https://www.redhat.com/archives/virt-tools-"
4996 "list/2011-May/msg00019.html"
5000 #: ../examples/guestfs-recipes.pod:63
5001 msgid "Convert a CD-ROM / DVD / ISO to a tarball"
5005 #: ../examples/guestfs-recipes.pod:65
5006 msgid "This converts input C<cd.iso> to output C<cd.tar.gz>:"
5010 #: ../examples/guestfs-recipes.pod:67
5013 " guestfish --ro -a cd.iso -m /dev/sda tgz-out / cd.tar.gz\n"
5018 #: ../examples/guestfs-recipes.pod:69
5019 msgid "To export just a subdirectory, eg. C</files>, do:"
5023 #: ../examples/guestfs-recipes.pod:71
5026 " guestfish --ro -a cd.iso -m /dev/sda tgz-out /files cd.tar.gz\n"
5031 #: ../examples/guestfs-recipes.pod:73
5032 msgid "Create empty disk images"
5036 #: ../examples/guestfs-recipes.pod:75
5038 "You can use the L<guestfish(1)> I<-N> option to create empty disk images. "
5039 "The useful guide below explains the options available."
5043 #: ../examples/guestfs-recipes.pod:78
5045 "https://rwmj.wordpress.com/2010/09/08/new-guestfish-n-options-in-1-5-9/"
5050 #: ../examples/guestfs-recipes.pod:80
5051 msgid "Dump raw filesystem content from inside a disk image or VM"
5055 #: ../examples/guestfs-recipes.pod:82
5057 "You can use the L<guestfish(1)> C<download> command to extract the raw "
5058 "filesystem content from any filesystem in a disk image or a VM (even one "
5059 "which is encrypted or buried inside an LV):"
5063 #: ../examples/guestfs-recipes.pod:86
5066 " guestfish --ro -a disk.img run : download /dev/sda1 sda1.img\n"
5071 #: ../examples/guestfs-recipes.pod:88
5074 " guestfish --ro -d Guest run : download /dev/vg_guest/lv_root lv.img\n"
5079 #: ../examples/guestfs-recipes.pod:90
5080 msgid "To list the filesystems in a disk image, use L<virt-filesystems(1)>."
5084 #: ../examples/guestfs-recipes.pod:92
5085 msgid "Edit grub configuration in a VM"
5089 #: ../examples/guestfs-recipes.pod:94
5090 msgid "You can use this to:"
5094 #: ../examples/guestfs-recipes.pod:100
5095 msgid "Fix a virtual machine that does not boot."
5099 #: ../examples/guestfs-recipes.pod:104
5100 msgid "Change which kernel is used to boot the VM."
5104 #: ../examples/guestfs-recipes.pod:108
5105 msgid "Change kernel command line options."
5109 #: ../examples/guestfs-recipes.pod:112
5110 msgid "Use L<virt-edit(1)> to edit the grub configuration:"
5114 #: ../examples/guestfs-recipes.pod:114
5117 " virt-edit -d BrokenGuest /boot/grub/grub.conf\n"
5122 #: ../examples/guestfs-recipes.pod:116
5124 "or for general tinkering inside an unbootable VM use L<virt-rescue(1)> like "
5129 #: ../examples/guestfs-recipes.pod:119
5132 " virt-rescue -d BrokenGuest\n"
5137 #: ../examples/guestfs-recipes.pod:121
5138 msgid "Export any directory from a VM"
5142 #: ../examples/guestfs-recipes.pod:123
5144 "To export C</home> from a VM into a local directory use L<virt-copy-out(1)>:"
5148 #: ../examples/guestfs-recipes.pod:126
5151 " virt-copy-out -d Guest /home .\n"
5156 #: ../examples/guestfs-recipes.pod:128 ../fish/guestfish-actions.pod:9
5157 #: ../fish/guestfish-actions.pod:1327 ../fish/guestfish-actions.pod:1592
5158 #: ../fish/guestfish-actions.pod:2009 ../src/guestfs-actions.pod:18
5159 #: ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:2457
5160 #: ../src/guestfs-actions.pod:3016 ../src/guestfs.pod:1670
5161 #: ../tools/virt-win-reg.pl:706
5166 #: ../examples/guestfs-recipes.pod:134
5168 "The final dot of the command is not a printing error. It means we want to "
5169 "copy out to the current directory."
5173 #: ../examples/guestfs-recipes.pod:139
5174 msgid "This creates a directory called C<home> under the current directory."
5178 #: ../examples/guestfs-recipes.pod:143
5180 "If the guest is a Windows guest then you can use drive letters and "
5181 "backslashes, but you must prefix the path with C<win:> and quote it to "
5182 "protect it from the shell, like this:"
5186 #: ../examples/guestfs-recipes.pod:147
5189 " virt-copy-out -d WinGuest 'win:c:\\windows\\system32\\config' .\n"
5194 #: ../examples/guestfs-recipes.pod:149
5195 msgid "To get the output as a compressed tarball, do:"
5199 #: ../examples/guestfs-recipes.pod:151
5202 " virt-tar-out -d Guest /home - | gzip --best > home.tar.gz\n"
5207 #: ../examples/guestfs-recipes.pod:153
5209 "Although it sounds tempting, this is usually not a reliable way to get a "
5210 "backup from a running guest. See the entry in the FAQ: http://libguestfs."
5211 "org/FAQ.html#backup"
5215 #: ../examples/guestfs-recipes.pod:157
5216 msgid "Find out which user is using the most space"
5220 #: ../examples/guestfs-recipes.pod:159
5222 "This simple script examines a Linux guest to find out which user is using "
5223 "the most space in their home directory:"
5227 #: ../examples/guestfs-recipes.pod:162
5235 #: ../examples/guestfs-recipes.pod:164 ../fish/guestfish.pod:984
5243 #: ../examples/guestfs-recipes.pod:166
5252 #: ../examples/guestfs-recipes.pod:169
5255 " eval $(guestfish --ro -d \"$vm\" -i --listen)\n"
5260 #: ../examples/guestfs-recipes.pod:171
5263 " for d in $(guestfish --remote ls \"$dir\"); do\n"
5264 " echo -n \"$dir/$d\"\n"
5266 " guestfish --remote du \"$dir/$d\";\n"
5267 " done | sort -nr -k 2\n"
5272 #: ../examples/guestfs-recipes.pod:177 ../fish/guestfish.pod:941
5275 " guestfish --remote exit\n"
5280 #: ../examples/guestfs-recipes.pod:179
5281 msgid "Get DHCP address from a VM"
5285 #: ../examples/guestfs-recipes.pod:181
5287 "The link below explains the many different possible techniques for getting "
5288 "the last assigned DHCP address of a virtual machine."
5292 #: ../examples/guestfs-recipes.pod:184
5294 "https://rwmj.wordpress.com/2011/03/31/tip-code-for-getting-dhcp-address-from-"
5295 "a-virtual-machine-disk-image/#content"
5299 #: ../examples/guestfs-recipes.pod:186
5301 "In the libguestfs source examples directory you will find the latest version "
5302 "of the C<virt-dhcp-address.c> program."
5306 #: ../examples/guestfs-recipes.pod:189
5307 msgid "Get the operating system product name string"
5311 #: ../examples/guestfs-recipes.pod:191
5312 msgid "Save the following script into a file called C<product-name.sh>:"
5316 #: ../examples/guestfs-recipes.pod:193
5321 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5322 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5323 " guestfish --remote inspect-get-product-name \"$root\"\n"
5324 " guestfish --remote exit\n"
5329 #: ../examples/guestfs-recipes.pod:200
5330 msgid "Make the script executable and run it on a named guest:"
5334 #: ../examples/guestfs-recipes.pod:202
5337 " # product-name.sh RHEL60x64\n"
5338 " Red Hat Enterprise Linux Server release 6.0 (Santiago)\n"
5343 #: ../examples/guestfs-recipes.pod:205
5345 "You can also use an XPath query on the L<virt-inspector(1)> XML using the "
5346 "C<xpath> command line tool or from your favourite programming language:"
5350 #: ../examples/guestfs-recipes.pod:209
5353 " # virt-inspector RHEL60x64 > xml\n"
5354 " # xpath '//product_name' < xml\n"
5357 " <product_name>Red Hat Enterprise Linux Server release 6.0 (Santiago)</product_name>\n"
5362 #: ../examples/guestfs-recipes.pod:215
5363 msgid "Get the default boot kernel for a Linux VM"
5367 #: ../examples/guestfs-recipes.pod:217
5369 "The link below contains a program to print the default boot kernel for a "
5374 #: ../examples/guestfs-recipes.pod:220
5376 "https://rwmj.wordpress.com/2010/10/30/tip-use-augeas-to-get-the-default-boot-"
5377 "kernel-for-a-vm/#content"
5381 #: ../examples/guestfs-recipes.pod:222
5383 "It uses Augeas, and the technique is generally applicable for many different "
5388 #: ../examples/guestfs-recipes.pod:229
5389 msgid "listing the user accounts in the guest"
5393 #: ../examples/guestfs-recipes.pod:233
5394 msgid "what repositories is it configured to use"
5398 #: ../examples/guestfs-recipes.pod:237
5399 msgid "what NTP servers does it connect to"
5403 #: ../examples/guestfs-recipes.pod:241
5404 msgid "what were the boot messages last time it booted"
5408 #: ../examples/guestfs-recipes.pod:245
5409 msgid "listing who was logged in recently"
5413 #: ../examples/guestfs-recipes.pod:249
5414 msgid "http://augeas.net/"
5418 #: ../examples/guestfs-recipes.pod:251
5419 msgid "Install RPMs in a guest"
5423 #: ../examples/guestfs-recipes.pod:253
5425 "The link below contains a method to install RPMs in a guest. In fact the "
5426 "RPMs are just uploaded to the guest along with a \"firstboot\" script that "
5427 "installs them next time the guest is booted. You could use this technique "
5428 "to install vital security updates in an offline guest."
5432 #: ../examples/guestfs-recipes.pod:259
5434 "https://rwmj.wordpress.com/2010/12/01/tip-install-rpms-in-a-guest/#content"
5438 #: ../examples/guestfs-recipes.pod:261
5439 msgid "List applications installed in a VM"
5443 #: ../examples/guestfs-recipes.pod:263
5444 msgid "Save the following to a file C<list-apps.sh>:"
5448 #: ../examples/guestfs-recipes.pod:265
5453 " eval \"$(guestfish --ro -d \"$1\" --i --listen)\"\n"
5454 " root=\"$(guestfish --remote inspect-get-roots)\"\n"
5455 " guestfish --remote inspect-list-applications \"$root\"\n"
5456 " guestfish --remote exit\n"
5461 #: ../examples/guestfs-recipes.pod:272
5463 "Make the file executable and then you can run it on any named virtual "
5468 #: ../examples/guestfs-recipes.pod:275
5471 " # list-apps.sh WinGuest\n"
5473 " app_name: Mozilla Firefox (3.6.12)\n"
5474 " app_display_name: Mozilla Firefox (3.6.12)\n"
5476 " app_version: 3.6.12 (en-GB)\n"
5478 " app_install_path: C:\\Program Files\\Mozilla Firefox\n"
5479 " app_trans_path:\n"
5480 " app_publisher: Mozilla\n"
5481 " app_url: http://www.mozilla.com/en-GB/\n"
5482 " app_source_package:\n"
5484 " app_description: Mozilla Firefox\n"
5487 " app_name: VLC media player\n"
5488 " app_display_name: VLC media player 1.1.5\n"
5490 " app_version: 1.1.5\n"
5492 " app_install_path: C:\\Program Files\\VideoLAN\\VLC\n"
5493 " app_trans_path:\n"
5494 " app_publisher: VideoLAN\n"
5495 " app_url: http://www.videolan.org/\n"
5496 " app_source_package:\n"
5498 " app_description:\n"
5504 #: ../examples/guestfs-recipes.pod:305
5506 "If you want to run the script on disk images (instead of libvirt virtual "
5507 "machines), change C<-d \"$1\"> to C<-a \"$1\">. See also L<virt-inspector(1)"
5512 #: ../examples/guestfs-recipes.pod:309
5513 msgid "List files and directories in a VM"
5517 #: ../examples/guestfs-recipes.pod:311
5518 msgid "This involves using the L<guestfish(1)> C<find0> command like this:"
5522 #: ../examples/guestfs-recipes.pod:313
5525 " guestfish --ro -d Guest -i find0 / - | tr '\\0' '\\n' | sort\n"
5530 #: ../examples/guestfs-recipes.pod:315
5531 msgid "List services in a Windows VM"
5535 #: ../examples/guestfs-recipes.pod:317
5537 "The link below contains a script that can be used to list out the services "
5538 "from a Windows VM, and whether those services run at boot time or are loaded "
5543 #: ../examples/guestfs-recipes.pod:321
5545 "https://rwmj.wordpress.com/2010/12/10/tip-list-services-in-a-windows-guest/"
5550 #: ../examples/guestfs-recipes.pod:323
5551 msgid "Make a disk image sparse"
5555 #: ../examples/guestfs-recipes.pod:325
5557 "The link below contains some guides for making a disk image sparse (or "
5558 "reintroducing sparseness)."
5562 #: ../examples/guestfs-recipes.pod:328
5564 "https://rwmj.wordpress.com/2010/10/19/tip-making-a-disk-image-sparse/#content"
5568 #: ../examples/guestfs-recipes.pod:330
5569 msgid "Monitor disk usage over time"
5573 #: ../examples/guestfs-recipes.pod:332
5575 "You can use L<virt-df(1)> to monitor disk usage of your guests over time. "
5576 "The link below contains a guide."
5580 #: ../examples/guestfs-recipes.pod:335
5581 msgid "http://virt-tools.org/learning/advanced-virt-df/"
5585 #: ../examples/guestfs-recipes.pod:337
5586 msgid "Reading the Windows Event Log from Windows Vista (or later)"
5590 #: ../examples/guestfs-recipes.pod:339
5592 "L<guestfish(1)> plus the tools described in the link below can be used to "
5593 "read out the Windows Event Log from any virtual machine running Windows "
5594 "Vista or a later version."
5598 #: ../examples/guestfs-recipes.pod:343
5600 "https://rwmj.wordpress.com/2011/04/17/decoding-the-windows-event-log-using-"
5601 "guestfish/#content"
5605 #: ../examples/guestfs-recipes.pod:345
5606 msgid "Remove root password (Linux)"
5610 #: ../examples/guestfs-recipes.pod:347
5612 "Using the L<virt-edit(1)> I<-e> option you can do simple replacements on "
5613 "files. One use is to remove the root password from a Linux guest:"
5617 #: ../examples/guestfs-recipes.pod:350
5620 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
5625 #: ../examples/guestfs-recipes.pod:352
5626 msgid "Remove Administrator password (Windows)"
5630 #: ../examples/guestfs-recipes.pod:354
5632 "The link below contains one technique for removing the Administrator "
5633 "password from a Windows VM, or to be more precise, it gives you a command "
5634 "prompt the next time you log in which you can use to bypass any security:"
5638 #: ../examples/guestfs-recipes.pod:359
5640 "https://mdbooth.wordpress.com/2010/10/18/resetting-a-windows-guests-"
5641 "administrator-password-with-guestfish/"
5645 #: ../examples/guestfs-recipes.pod:361
5646 msgid "Unpack a live CD"
5650 #: ../examples/guestfs-recipes.pod:363
5652 "Linux live CDs often contain multiple layers of disk images wrapped like a "
5653 "Russian doll. You can use L<guestfish(1)> to look inside these multiple "
5654 "layers, as outlined in the guide below."
5658 #: ../examples/guestfs-recipes.pod:367
5660 "https://rwmj.wordpress.com/2009/07/15/unpack-the-russian-doll-of-a-f11-live-"
5665 #: ../examples/guestfs-recipes.pod:369
5666 msgid "Uploading and downloading files"
5670 #: ../examples/guestfs-recipes.pod:371
5672 "The link below contains general tips on uploading (copying in) and "
5673 "downloading (copying out) files from VMs."
5677 #: ../examples/guestfs-recipes.pod:374
5679 "https://rwmj.wordpress.com/2010/12/02/tip-uploading-and-downloading/#content"
5683 #: ../examples/guestfs-recipes.pod:376
5684 msgid "Use libguestfs tools on VMware ESX guests"
5688 #: ../examples/guestfs-recipes.pod:378
5690 "The link below explains how to use libguestfs, L<guestfish(1)> and the virt "
5691 "tools on any VMware ESX guests, by first sharing the VMware VMFS over sshfs."
5695 #: ../examples/guestfs-recipes.pod:382
5697 "https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-"
5702 #: ../examples/guestfs-recipes.pod:386
5704 "L<guestfs(3)>, L<guestfish(1)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)"
5705 ">, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-"
5706 "python(3)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
5710 #: ../examples/guestfs-recipes.pod:403
5711 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5715 #: ../fish/guestfish-actions.pod:1
5720 #: ../fish/guestfish-actions.pod:3
5723 " add-cdrom filename\n"
5728 #: ../fish/guestfish-actions.pod:5 ../src/guestfs-actions.pod:14
5729 msgid "This function adds a virtual CD-ROM disk image to the guest."
5733 #: ../fish/guestfish-actions.pod:7 ../src/guestfs-actions.pod:16
5734 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5738 #: ../fish/guestfish-actions.pod:15
5740 "This call checks for the existence of C<filename>. This stops you from "
5741 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5742 "and C<http:> URLs. To specify those, use the general L</config> call "
5747 #: ../fish/guestfish-actions.pod:22
5749 "If you just want to add an ISO file (often you use this as an efficient way "
5750 "to transfer large files into the guest), then you should probably use L</add-"
5751 "drive-ro> instead."
5755 #: ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:163
5756 #: ../fish/guestfish-actions.pod:177
5758 "I<This function is deprecated.> In new code, use the L</add_drive_opts> call "
5763 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:166
5764 #: ../fish/guestfish-actions.pod:180 ../fish/guestfish-actions.pod:1026
5765 #: ../fish/guestfish-actions.pod:1386 ../fish/guestfish-actions.pod:1400
5766 #: ../fish/guestfish-actions.pod:3170 ../fish/guestfish-actions.pod:3481
5767 #: ../fish/guestfish-actions.pod:3529 ../fish/guestfish-actions.pod:4442
5768 #: ../fish/guestfish-actions.pod:4465 ../fish/guestfish-actions.pod:4487
5769 #: ../fish/guestfish-actions.pod:4525 ../fish/guestfish-actions.pod:5174
5770 #: ../fish/guestfish-actions.pod:5280 ../src/guestfs-actions.pod:10
5771 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
5772 #: ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:2118
5773 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:4784
5774 #: ../src/guestfs-actions.pod:5306 ../src/guestfs-actions.pod:5406
5775 #: ../src/guestfs-actions.pod:6688 ../src/guestfs-actions.pod:6732
5776 #: ../src/guestfs-actions.pod:6766 ../src/guestfs-actions.pod:6829
5777 #: ../src/guestfs-actions.pod:7761 ../src/guestfs-actions.pod:7870
5778 #: ../src/guestfs-actions.pod:8053
5780 "Deprecated functions will not be removed from the API, but the fact that "
5781 "they are deprecated indicates that there are problems with correct use of "
5786 #: ../fish/guestfish-actions.pod:35
5791 #: ../fish/guestfish-actions.pod:37
5796 #: ../fish/guestfish-actions.pod:39
5799 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
5804 #: ../fish/guestfish-actions.pod:41
5806 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5807 "It works by connecting to libvirt, requesting the domain and domain XML from "
5808 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
5812 #: ../fish/guestfish-actions.pod:46 ../src/guestfs-actions.pod:64
5814 "The number of disks added is returned. This operation is atomic: if an "
5815 "error is returned, then no disks are added."
5819 #: ../fish/guestfish-actions.pod:49 ../src/guestfs-actions.pod:67
5821 "This function does some minimal checks to make sure the libvirt domain is "
5822 "not running (unless C<readonly> is true). In a future version we will try "
5823 "to acquire the libvirt lock on each disk."
5827 #: ../fish/guestfish-actions.pod:53 ../src/guestfs-actions.pod:71
5829 "Disks must be accessible locally. This often means that adding disks from a "
5830 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5831 "unless those disks are accessible via the same device path locally too."
5835 #: ../fish/guestfish-actions.pod:58 ../src/guestfs-actions.pod:76
5837 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
5838 "libvirt.org/uri.html>). If this is not set then we connect to the default "
5839 "libvirt URI (or one set through an environment variable, see the libvirt "
5840 "documentation for full details)."
5844 #: ../fish/guestfish-actions.pod:64 ../src/guestfs-actions.pod:82
5846 "The optional C<live> flag controls whether this call will try to connect to "
5847 "a running virtual machine C<guestfsd> process if it sees a suitable "
5848 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
5849 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
5850 "DAEMONS> for more information."
5854 #: ../fish/guestfish-actions.pod:71 ../src/guestfs-actions.pod:89
5856 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
5857 "passed instead of the domain name. The C<dom> string is treated as a UUID "
5858 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
5863 #: ../fish/guestfish-actions.pod:76
5865 "The other optional parameters are passed directly through to L</add-drive-"
5870 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
5871 #: ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:784
5872 #: ../fish/guestfish-actions.pod:805 ../fish/guestfish-actions.pod:2048
5873 #: ../fish/guestfish-actions.pod:3219 ../fish/guestfish-actions.pod:3382
5874 #: ../fish/guestfish-actions.pod:3517
5876 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
5880 #: ../fish/guestfish-actions.pod:81
5885 #: ../fish/guestfish-actions.pod:83
5888 " add-drive filename\n"
5893 #: ../fish/guestfish-actions.pod:85
5895 "This function is the equivalent of calling L</add-drive-opts> with no "
5896 "optional parameters, so the disk is added writable, with the format being "
5897 "detected automatically."
5901 #: ../fish/guestfish-actions.pod:89
5903 "Automatic detection of the format opens you up to a potential security hole "
5904 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5905 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
5906 "you should think about replacing calls to this function with calls to L</add-"
5907 "drive-opts>, and specifying the format."
5911 #: ../fish/guestfish-actions.pod:96
5912 msgid "add-drive-opts"
5916 #: ../fish/guestfish-actions.pod:98
5921 #: ../fish/guestfish-actions.pod:100
5924 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
5929 #: ../fish/guestfish-actions.pod:102 ../src/guestfs-actions.pod:160
5931 "This function adds a virtual machine disk image C<filename> to libguestfs. "
5932 "The first time you call this function, the disk appears as C</dev/sda>, the "
5933 "second time as C</dev/sdb>, and so on."
5937 #: ../fish/guestfish-actions.pod:107 ../src/guestfs-actions.pod:165
5939 "You don't necessarily need to be root when using libguestfs. However you "
5940 "obviously do need sufficient permissions to access the filename for whatever "
5941 "operations you want to perform (ie. read access if you just want to read the "
5942 "image or write access if you want to modify the image)."
5946 #: ../fish/guestfish-actions.pod:113 ../src/guestfs-actions.pod:171
5947 msgid "This call checks that C<filename> exists."
5951 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3181
5952 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4821
5953 msgid "The optional arguments are:"
5957 #: ../fish/guestfish-actions.pod:119 ../src/guestfs-actions.pod:177
5962 #: ../fish/guestfish-actions.pod:121 ../src/guestfs-actions.pod:179
5964 "If true then the image is treated as read-only. Writes are still allowed, "
5965 "but they are stored in a temporary snapshot overlay which is discarded at "
5966 "the end. The disk that you add is not modified."
5970 #: ../fish/guestfish-actions.pod:125 ../src/guestfs-actions.pod:183
5975 #: ../fish/guestfish-actions.pod:127
5977 "This forces the image format. If you omit this (or use L</add-drive> or L</"
5978 "add-drive-ro>) then the format is automatically detected. Possible formats "
5979 "include C<raw> and C<qcow2>."
5983 #: ../fish/guestfish-actions.pod:131 ../src/guestfs-actions.pod:189
5985 "Automatic detection of the format opens you up to a potential security hole "
5986 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5987 "RHBZ#642934. Specifying the format closes this security hole."
5991 #: ../fish/guestfish-actions.pod:136 ../src/guestfs-actions.pod:194
5996 #: ../fish/guestfish-actions.pod:138
5998 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
5999 "add-drive-with-if> call (q.v.)"
6003 #: ../fish/guestfish-actions.pod:145
6004 msgid "add-drive-ro"
6008 #: ../fish/guestfish-actions.pod:147
6013 #: ../fish/guestfish-actions.pod:149
6016 " add-drive-ro filename\n"
6021 #: ../fish/guestfish-actions.pod:151
6023 "This function is the equivalent of calling L</add-drive-opts> with the "
6024 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
6025 "is added read-only, with the format being detected automatically."
6029 #: ../fish/guestfish-actions.pod:156
6030 msgid "add-drive-ro-with-if"
6034 #: ../fish/guestfish-actions.pod:158
6037 " add-drive-ro-with-if filename iface\n"
6042 #: ../fish/guestfish-actions.pod:160
6044 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
6045 "interface emulation to use at run time."
6049 #: ../fish/guestfish-actions.pod:170
6050 msgid "add-drive-with-if"
6054 #: ../fish/guestfish-actions.pod:172
6057 " add-drive-with-if filename iface\n"
6062 #: ../fish/guestfish-actions.pod:174
6064 "This is the same as L</add-drive> but it allows you to specify the QEMU "
6065 "interface emulation to use at run time."
6069 #: ../fish/guestfish-actions.pod:184
6074 #: ../fish/guestfish-actions.pod:186
6077 " aug-clear augpath\n"
6082 #: ../fish/guestfish-actions.pod:188 ../src/guestfs-actions.pod:290
6084 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6085 "L<augtool(1)> C<clear> command."
6089 #: ../fish/guestfish-actions.pod:191
6094 #: ../fish/guestfish-actions.pod:193
6102 #: ../fish/guestfish-actions.pod:195
6104 "Close the current Augeas handle and free up any resources used by it. After "
6105 "calling this, you have to call L</aug-init> again before you can use any "
6106 "other Augeas functions."
6110 #: ../fish/guestfish-actions.pod:200
6115 #: ../fish/guestfish-actions.pod:202
6118 " aug-defnode name expr val\n"
6123 #: ../fish/guestfish-actions.pod:204 ../src/guestfs-actions.pod:319
6125 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6129 #: ../fish/guestfish-actions.pod:207
6131 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6132 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
6133 "containing that single node."
6137 #: ../fish/guestfish-actions.pod:211 ../src/guestfs-actions.pod:326
6139 "On success this returns a pair containing the number of nodes in the "
6140 "nodeset, and a boolean flag if a node was created."
6144 #: ../fish/guestfish-actions.pod:215
6149 #: ../fish/guestfish-actions.pod:217
6152 " aug-defvar name expr\n"
6157 #: ../fish/guestfish-actions.pod:219 ../src/guestfs-actions.pod:343
6159 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6160 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6164 #: ../fish/guestfish-actions.pod:223 ../src/guestfs-actions.pod:347
6166 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6167 "evaluates to something which is not a nodeset."
6171 #: ../fish/guestfish-actions.pod:226
6176 #: ../fish/guestfish-actions.pod:228
6179 " aug-get augpath\n"
6184 #: ../fish/guestfish-actions.pod:230 ../src/guestfs-actions.pod:360
6186 "Look up the value associated with C<path>. If C<path> matches exactly one "
6187 "node, the C<value> is returned."
6191 #: ../fish/guestfish-actions.pod:233
6196 #: ../fish/guestfish-actions.pod:235
6199 " aug-init root flags\n"
6204 #: ../fish/guestfish-actions.pod:237 ../src/guestfs-actions.pod:375
6206 "Create a new Augeas handle for editing configuration files. If there was "
6207 "any previous Augeas handle associated with this guestfs session, then it is "
6212 #: ../fish/guestfish-actions.pod:241
6213 msgid "You must call this before using any other L</aug-*> commands."
6217 #: ../fish/guestfish-actions.pod:244 ../src/guestfs-actions.pod:382
6219 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6223 #: ../fish/guestfish-actions.pod:247 ../src/guestfs-actions.pod:385
6225 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6226 "logical I<or> of the following integers:"
6230 #: ../fish/guestfish-actions.pod:253 ../src/guestfs-actions.pod:391
6231 msgid "C<AUG_SAVE_BACKUP> = 1"
6235 #: ../fish/guestfish-actions.pod:255 ../src/guestfs-actions.pod:393
6236 msgid "Keep the original file with a C<.augsave> extension."
6240 #: ../fish/guestfish-actions.pod:257 ../src/guestfs-actions.pod:395
6241 msgid "C<AUG_SAVE_NEWFILE> = 2"
6245 #: ../fish/guestfish-actions.pod:259 ../src/guestfs-actions.pod:397
6247 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6248 "original. Overrides C<AUG_SAVE_BACKUP>."
6252 #: ../fish/guestfish-actions.pod:262 ../src/guestfs-actions.pod:400
6253 msgid "C<AUG_TYPE_CHECK> = 4"
6257 #: ../fish/guestfish-actions.pod:264 ../src/guestfs-actions.pod:402
6258 msgid "Typecheck lenses."
6262 #: ../fish/guestfish-actions.pod:266
6264 "This option is only useful when debugging Augeas lenses. Use of this option "
6265 "may require additional memory for the libguestfs appliance. You may need to "
6266 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call L</set-memsize>."
6270 #: ../fish/guestfish-actions.pod:271 ../src/guestfs-actions.pod:409
6271 msgid "C<AUG_NO_STDINC> = 8"
6275 #: ../fish/guestfish-actions.pod:273 ../src/guestfs-actions.pod:411
6276 msgid "Do not use standard load path for modules."
6280 #: ../fish/guestfish-actions.pod:275 ../src/guestfs-actions.pod:413
6281 msgid "C<AUG_SAVE_NOOP> = 16"
6285 #: ../fish/guestfish-actions.pod:277 ../src/guestfs-actions.pod:415
6286 msgid "Make save a no-op, just record what would have been changed."
6290 #: ../fish/guestfish-actions.pod:279 ../src/guestfs-actions.pod:417
6291 msgid "C<AUG_NO_LOAD> = 32"
6295 #: ../fish/guestfish-actions.pod:281
6296 msgid "Do not load the tree in L</aug-init>."
6300 #: ../fish/guestfish-actions.pod:285
6301 msgid "To close the handle, you can call L</aug-close>."
6305 #: ../fish/guestfish-actions.pod:287 ../src/guestfs-actions.pod:425
6306 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6310 #: ../fish/guestfish-actions.pod:289
6315 #: ../fish/guestfish-actions.pod:291
6318 " aug-insert augpath label true|false\n"
6323 #: ../fish/guestfish-actions.pod:293 ../src/guestfs-actions.pod:439
6325 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6326 "or after C<path> (depending on the boolean flag C<before>)."
6330 #: ../fish/guestfish-actions.pod:297 ../src/guestfs-actions.pod:443
6332 "C<path> must match exactly one existing node in the tree, and C<label> must "
6333 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6337 #: ../fish/guestfish-actions.pod:301
6342 #: ../fish/guestfish-actions.pod:303
6350 #: ../fish/guestfish-actions.pod:305 ../src/guestfs-actions.pod:456
6351 msgid "Load files into the tree."
6355 #: ../fish/guestfish-actions.pod:307 ../src/guestfs-actions.pod:458
6356 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6360 #: ../fish/guestfish-actions.pod:310
6365 #: ../fish/guestfish-actions.pod:312
6373 #: ../fish/guestfish-actions.pod:314
6375 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
6376 "resulting nodes into alphabetical order."
6380 #: ../fish/guestfish-actions.pod:317
6385 #: ../fish/guestfish-actions.pod:319
6388 " aug-match augpath\n"
6393 #: ../fish/guestfish-actions.pod:321 ../src/guestfs-actions.pod:486
6395 "Returns a list of paths which match the path expression C<path>. The "
6396 "returned paths are sufficiently qualified so that they match exactly one "
6397 "node in the current tree."
6401 #: ../fish/guestfish-actions.pod:325
6406 #: ../fish/guestfish-actions.pod:327
6409 " aug-mv src dest\n"
6414 #: ../fish/guestfish-actions.pod:329 ../src/guestfs-actions.pod:503
6416 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6417 "C<dest> is overwritten if it exists."
6421 #: ../fish/guestfish-actions.pod:332
6426 #: ../fish/guestfish-actions.pod:334
6434 #: ../fish/guestfish-actions.pod:336 ../src/guestfs-actions.pod:516
6435 msgid "Remove C<path> and all of its children."
6439 #: ../fish/guestfish-actions.pod:338 ../src/guestfs-actions.pod:518
6440 msgid "On success this returns the number of entries which were removed."
6444 #: ../fish/guestfish-actions.pod:340
6449 #: ../fish/guestfish-actions.pod:342
6457 #: ../fish/guestfish-actions.pod:344 ../src/guestfs-actions.pod:529
6458 msgid "This writes all pending changes to disk."
6462 #: ../fish/guestfish-actions.pod:346
6464 "The flags which were passed to L</aug-init> affect exactly how files are "
6469 #: ../fish/guestfish-actions.pod:349
6474 #: ../fish/guestfish-actions.pod:351
6477 " aug-set augpath val\n"
6482 #: ../fish/guestfish-actions.pod:353 ../src/guestfs-actions.pod:545
6483 msgid "Set the value associated with C<path> to C<val>."
6487 #: ../fish/guestfish-actions.pod:355
6489 "In the Augeas API, it is possible to clear a node by setting the value to "
6490 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6491 "this call. Instead you must use the L</aug-clear> call."
6495 #: ../fish/guestfish-actions.pod:360
6500 #: ../fish/guestfish-actions.pod:362
6503 " available 'groups ...'\n"
6508 #: ../fish/guestfish-actions.pod:364 ../src/guestfs-actions.pod:562
6510 "This command is used to check the availability of some groups of "
6511 "functionality in the appliance, which not all builds of the libguestfs "
6512 "appliance will be able to provide."
6516 #: ../fish/guestfish-actions.pod:368
6518 "The libguestfs groups, and the functions that those groups correspond to, "
6519 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6520 "runtime by calling L</available-all-groups>."
6524 #: ../fish/guestfish-actions.pod:373 ../src/guestfs-actions.pod:571
6526 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
6527 "\"]> would check for the availability of the Linux inotify functions and "
6528 "Augeas (configuration file editing) functions."
6532 #: ../fish/guestfish-actions.pod:378 ../src/guestfs-actions.pod:576
6533 msgid "The command returns no error if I<all> requested groups are available."
6537 #: ../fish/guestfish-actions.pod:380 ../src/guestfs-actions.pod:578
6539 "It fails with an error if one or more of the requested groups is unavailable "
6544 #: ../fish/guestfish-actions.pod:383 ../src/guestfs-actions.pod:581
6546 "If an unknown group name is included in the list of groups then an error is "
6551 #: ../fish/guestfish-actions.pod:386 ../src/guestfs-actions.pod:584
6556 #: ../fish/guestfish-actions.pod:392
6557 msgid "You must call L</launch> before calling this function."
6561 #: ../fish/guestfish-actions.pod:394 ../src/guestfs-actions.pod:592
6563 "The reason is because we don't know what groups are supported by the "
6564 "appliance/daemon until it is running and can be queried."
6568 #: ../fish/guestfish-actions.pod:400 ../src/guestfs-actions.pod:598
6570 "If a group of functions is available, this does not necessarily mean that "
6571 "they will work. You still have to check for errors when calling individual "
6572 "API functions even if they are available."
6576 #: ../fish/guestfish-actions.pod:407 ../src/guestfs-actions.pod:605
6578 "It is usually the job of distro packagers to build complete functionality "
6579 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6580 "with all requirements satisfied, will support everything."
6584 #: ../fish/guestfish-actions.pod:414
6586 "This call was added in version C<1.0.80>. In previous versions of "
6587 "libguestfs all you could do would be to speculatively execute a command to "
6588 "find out if the daemon implemented it. See also L</version>."
6592 #: ../fish/guestfish-actions.pod:421
6593 msgid "available-all-groups"
6597 #: ../fish/guestfish-actions.pod:423
6600 " available-all-groups\n"
6605 #: ../fish/guestfish-actions.pod:425
6607 "This command returns a list of all optional groups that this daemon knows "
6608 "about. Note this returns both supported and unsupported groups. To find "
6609 "out which ones the daemon can actually support you have to call L</"
6610 "available> on each member of the returned list."
6614 #: ../fish/guestfish-actions.pod:431
6615 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
6619 #: ../fish/guestfish-actions.pod:433
6624 #: ../fish/guestfish-actions.pod:435
6627 " base64-in (base64file|-) filename\n"
6632 #: ../fish/guestfish-actions.pod:437 ../src/guestfs-actions.pod:649
6634 "This command uploads base64-encoded data from C<base64file> to C<filename>."
6638 #: ../fish/guestfish-actions.pod:440 ../fish/guestfish-actions.pod:449
6639 #: ../fish/guestfish-actions.pod:698 ../fish/guestfish-actions.pod:782
6640 #: ../fish/guestfish-actions.pod:803 ../fish/guestfish-actions.pod:902
6641 #: ../fish/guestfish-actions.pod:921 ../fish/guestfish-actions.pod:1295
6642 #: ../fish/guestfish-actions.pod:4745 ../fish/guestfish-actions.pod:4757
6643 #: ../fish/guestfish-actions.pod:4768 ../fish/guestfish-actions.pod:4779
6644 #: ../fish/guestfish-actions.pod:4831 ../fish/guestfish-actions.pod:4840
6645 #: ../fish/guestfish-actions.pod:4894 ../fish/guestfish-actions.pod:4917
6646 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
6650 #: ../fish/guestfish-actions.pod:442
6655 #: ../fish/guestfish-actions.pod:444
6658 " base64-out filename (base64file|-)\n"
6663 #: ../fish/guestfish-actions.pod:446 ../src/guestfs-actions.pod:663
6665 "This command downloads the contents of C<filename>, writing it out to local "
6666 "file C<base64file> encoded as base64."
6670 #: ../fish/guestfish-actions.pod:451
6671 msgid "blockdev-flushbufs"
6675 #: ../fish/guestfish-actions.pod:453
6678 " blockdev-flushbufs device\n"
6683 #: ../fish/guestfish-actions.pod:455 ../src/guestfs-actions.pod:676
6685 "This tells the kernel to flush internal buffers associated with C<device>."
6689 #: ../fish/guestfish-actions.pod:458 ../fish/guestfish-actions.pod:469
6690 #: ../fish/guestfish-actions.pod:478 ../fish/guestfish-actions.pod:488
6691 #: ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:513
6692 #: ../fish/guestfish-actions.pod:521 ../fish/guestfish-actions.pod:532
6693 #: ../fish/guestfish-actions.pod:540 ../fish/guestfish-actions.pod:548
6694 #: ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:696
6695 #: ../src/guestfs-actions.pod:711 ../src/guestfs-actions.pod:727
6696 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:764
6697 #: ../src/guestfs-actions.pod:778 ../src/guestfs-actions.pod:796
6698 #: ../src/guestfs-actions.pod:810 ../src/guestfs-actions.pod:824
6699 msgid "This uses the L<blockdev(8)> command."
6703 #: ../fish/guestfish-actions.pod:460
6704 msgid "blockdev-getbsz"
6708 #: ../fish/guestfish-actions.pod:462
6711 " blockdev-getbsz device\n"
6716 #: ../fish/guestfish-actions.pod:464 ../src/guestfs-actions.pod:691
6717 msgid "This returns the block size of a device."
6721 #: ../fish/guestfish-actions.pod:466 ../fish/guestfish-actions.pod:529
6722 #: ../src/guestfs-actions.pod:693 ../src/guestfs-actions.pod:793
6724 "(Note this is different from both I<size in blocks> and I<filesystem block "
6729 #: ../fish/guestfish-actions.pod:471
6730 msgid "blockdev-getro"
6734 #: ../fish/guestfish-actions.pod:473
6737 " blockdev-getro device\n"
6742 #: ../fish/guestfish-actions.pod:475 ../src/guestfs-actions.pod:708
6744 "Returns a boolean indicating if the block device is read-only (true if read-"
6745 "only, false if not)."
6749 #: ../fish/guestfish-actions.pod:480
6750 msgid "blockdev-getsize64"
6754 #: ../fish/guestfish-actions.pod:482
6757 " blockdev-getsize64 device\n"
6762 #: ../fish/guestfish-actions.pod:484 ../src/guestfs-actions.pod:723
6763 msgid "This returns the size of the device in bytes."
6767 #: ../fish/guestfish-actions.pod:486
6768 msgid "See also L</blockdev-getsz>."
6772 #: ../fish/guestfish-actions.pod:490
6773 msgid "blockdev-getss"
6777 #: ../fish/guestfish-actions.pod:492
6780 " blockdev-getss device\n"
6785 #: ../fish/guestfish-actions.pod:494 ../src/guestfs-actions.pod:739
6787 "This returns the size of sectors on a block device. Usually 512, but can be "
6788 "larger for modern devices."
6792 #: ../fish/guestfish-actions.pod:497
6794 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
6798 #: ../fish/guestfish-actions.pod:502
6799 msgid "blockdev-getsz"
6803 #: ../fish/guestfish-actions.pod:504
6806 " blockdev-getsz device\n"
6811 #: ../fish/guestfish-actions.pod:506 ../src/guestfs-actions.pod:757
6813 "This returns the size of the device in units of 512-byte sectors (even if "
6814 "the sectorsize isn't 512 bytes ... weird)."
6818 #: ../fish/guestfish-actions.pod:509
6820 "See also L</blockdev-getss> for the real sector size of the device, and L</"
6821 "blockdev-getsize64> for the more useful I<size in bytes>."
6825 #: ../fish/guestfish-actions.pod:515
6826 msgid "blockdev-rereadpt"
6830 #: ../fish/guestfish-actions.pod:517
6833 " blockdev-rereadpt device\n"
6838 #: ../fish/guestfish-actions.pod:519 ../src/guestfs-actions.pod:776
6839 msgid "Reread the partition table on C<device>."
6843 #: ../fish/guestfish-actions.pod:523
6844 msgid "blockdev-setbsz"
6848 #: ../fish/guestfish-actions.pod:525
6851 " blockdev-setbsz device blocksize\n"
6856 #: ../fish/guestfish-actions.pod:527 ../src/guestfs-actions.pod:791
6857 msgid "This sets the block size of a device."
6861 #: ../fish/guestfish-actions.pod:534
6862 msgid "blockdev-setro"
6866 #: ../fish/guestfish-actions.pod:536
6869 " blockdev-setro device\n"
6874 #: ../fish/guestfish-actions.pod:538 ../src/guestfs-actions.pod:808
6875 msgid "Sets the block device named C<device> to read-only."
6879 #: ../fish/guestfish-actions.pod:542
6880 msgid "blockdev-setrw"
6884 #: ../fish/guestfish-actions.pod:544
6887 " blockdev-setrw device\n"
6892 #: ../fish/guestfish-actions.pod:546 ../src/guestfs-actions.pod:822
6893 msgid "Sets the block device named C<device> to read-write."
6897 #: ../fish/guestfish-actions.pod:550
6898 msgid "btrfs-filesystem-resize"
6902 #: ../fish/guestfish-actions.pod:552
6905 " btrfs-filesystem-resize mountpoint [size:..]\n"
6910 #: ../fish/guestfish-actions.pod:554 ../src/guestfs-actions.pod:844
6911 msgid "This command resizes a btrfs filesystem."
6915 #: ../fish/guestfish-actions.pod:556 ../src/guestfs-actions.pod:846
6917 "Note that unlike other resize calls, the filesystem has to be mounted and "
6918 "the parameter is the mountpoint not the device (this is a requirement of "
6923 #: ../fish/guestfish-actions.pod:560 ../fish/guestfish-actions.pod:3492
6924 #: ../src/guestfs-actions.pod:850 ../src/guestfs-actions.pod:5345
6925 msgid "The optional parameters are:"
6929 #: ../fish/guestfish-actions.pod:564 ../fish/guestfish-actions.pod:3496
6930 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:5349
6935 #: ../fish/guestfish-actions.pod:566 ../src/guestfs-actions.pod:856
6937 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
6938 "resized to the maximum size."
6942 #: ../fish/guestfish-actions.pod:571 ../src/guestfs-actions.pod:861
6943 msgid "See also L<btrfs(8)>."
6947 #: ../fish/guestfish-actions.pod:575
6948 msgid "case-sensitive-path"
6952 #: ../fish/guestfish-actions.pod:577
6955 " case-sensitive-path path\n"
6960 #: ../fish/guestfish-actions.pod:579 ../src/guestfs-actions.pod:895
6962 "This can be used to resolve case insensitive paths on a filesystem which is "
6963 "case sensitive. The use case is to resolve paths which you have read from "
6964 "Windows configuration files or the Windows Registry, to the true path."
6968 #: ../fish/guestfish-actions.pod:584 ../src/guestfs-actions.pod:900
6970 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
6971 "(and probably others), which is that although the underlying filesystem is "
6972 "case-insensitive, the driver exports the filesystem to Linux as case-"
6977 #: ../fish/guestfish-actions.pod:589 ../src/guestfs-actions.pod:905
6979 "One consequence of this is that special directories such as C<c:\\windows> "
6980 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
6981 "precise details of how they were created. In Windows itself this would not "
6986 #: ../fish/guestfish-actions.pod:595 ../src/guestfs-actions.pod:911
6988 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
6993 #: ../fish/guestfish-actions.pod:598 ../src/guestfs-actions.pod:914
6995 "This function resolves the true case of each element in the path and returns "
6996 "the case-sensitive path."
7000 #: ../fish/guestfish-actions.pod:601
7002 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
7003 "WINDOWS/system32\"> (the exact return value would depend on details of how "
7004 "the directories were originally created under Windows)."
7008 #: ../fish/guestfish-actions.pod:606 ../src/guestfs-actions.pod:922
7009 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7013 #: ../fish/guestfish-actions.pod:609
7014 msgid "See also L</realpath>."
7018 #: ../fish/guestfish-actions.pod:611
7023 #: ../fish/guestfish-actions.pod:613
7031 #: ../fish/guestfish-actions.pod:615 ../fish/guestfish-actions.pod:3912
7032 #: ../src/guestfs-actions.pod:938 ../src/guestfs-actions.pod:5988
7033 msgid "Return the contents of the file named C<path>."
7037 #: ../fish/guestfish-actions.pod:617
7039 "Note that this function cannot correctly handle binary files (specifically, "
7040 "files containing C<\\0> character which is treated as end of string). For "
7041 "those you need to use the L</read-file> or L</download> functions which have "
7042 "a more complex interface."
7046 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:757
7047 #: ../fish/guestfish-actions.pod:769 ../fish/guestfish-actions.pod:980
7048 #: ../fish/guestfish-actions.pod:990 ../fish/guestfish-actions.pod:1057
7049 #: ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1259
7050 #: ../fish/guestfish-actions.pod:1572 ../fish/guestfish-actions.pod:1582
7051 #: ../fish/guestfish-actions.pod:1632 ../fish/guestfish-actions.pod:1647
7052 #: ../fish/guestfish-actions.pod:1657 ../fish/guestfish-actions.pod:1676
7053 #: ../fish/guestfish-actions.pod:3782 ../fish/guestfish-actions.pod:3797
7054 #: ../fish/guestfish-actions.pod:3873 ../fish/guestfish-actions.pod:3890
7055 #: ../fish/guestfish-actions.pod:3905 ../fish/guestfish-actions.pod:4586
7056 #: ../fish/guestfish-actions.pod:4632 ../fish/guestfish-actions.pod:4717
7057 #: ../fish/guestfish-actions.pod:4732 ../fish/guestfish-actions.pod:5138
7058 #: ../fish/guestfish-actions.pod:5150 ../fish/guestfish-actions.pod:5168
7059 #: ../fish/guestfish-actions.pod:5185 ../fish/guestfish-actions.pod:5195
7060 #: ../fish/guestfish-actions.pod:5252 ../fish/guestfish-actions.pod:5262
7061 #: ../fish/guestfish-actions.pod:5291 ../fish/guestfish-actions.pod:5301
7062 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:1127
7063 #: ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1554
7064 #: ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:1676
7065 #: ../src/guestfs-actions.pod:1695 ../src/guestfs-actions.pod:1941
7066 #: ../src/guestfs-actions.pod:2423 ../src/guestfs-actions.pod:2442
7067 #: ../src/guestfs-actions.pod:2507 ../src/guestfs-actions.pod:2531
7068 #: ../src/guestfs-actions.pod:2548 ../src/guestfs-actions.pod:2577
7069 #: ../src/guestfs-actions.pod:5770 ../src/guestfs-actions.pod:5796
7070 #: ../src/guestfs-actions.pod:5927 ../src/guestfs-actions.pod:5953
7071 #: ../src/guestfs-actions.pod:5977 ../src/guestfs-actions.pod:6944
7072 #: ../src/guestfs-actions.pod:6999 ../src/guestfs-actions.pod:7145
7073 #: ../src/guestfs-actions.pod:7169 ../src/guestfs-actions.pod:7834
7074 #: ../src/guestfs-actions.pod:7854 ../src/guestfs-actions.pod:7887
7075 #: ../src/guestfs-actions.pod:7906 ../src/guestfs-actions.pod:7925
7076 #: ../src/guestfs-actions.pod:8019 ../src/guestfs-actions.pod:8038
7077 #: ../src/guestfs-actions.pod:8084 ../src/guestfs-actions.pod:8103
7079 "Because of the message protocol, there is a transfer limit of somewhere "
7080 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7084 #: ../fish/guestfish-actions.pod:625
7089 #: ../fish/guestfish-actions.pod:627
7092 " checksum csumtype path\n"
7097 #: ../fish/guestfish-actions.pod:629 ../src/guestfs-actions.pod:960
7099 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7103 #: ../fish/guestfish-actions.pod:632 ../src/guestfs-actions.pod:963
7105 "The type of checksum to compute is given by the C<csumtype> parameter which "
7106 "must have one of the following values:"
7110 #: ../fish/guestfish-actions.pod:637 ../src/guestfs-actions.pod:968
7115 #: ../fish/guestfish-actions.pod:639 ../src/guestfs-actions.pod:970
7117 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7122 #: ../fish/guestfish-actions.pod:642 ../src/guestfs-actions.pod:973
7127 #: ../fish/guestfish-actions.pod:644 ../src/guestfs-actions.pod:975
7128 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7132 #: ../fish/guestfish-actions.pod:646 ../src/guestfs-actions.pod:977
7137 #: ../fish/guestfish-actions.pod:648 ../src/guestfs-actions.pod:979
7138 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7142 #: ../fish/guestfish-actions.pod:650 ../src/guestfs-actions.pod:981
7147 #: ../fish/guestfish-actions.pod:652 ../src/guestfs-actions.pod:983
7148 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7152 #: ../fish/guestfish-actions.pod:654 ../src/guestfs-actions.pod:985
7157 #: ../fish/guestfish-actions.pod:656 ../src/guestfs-actions.pod:987
7158 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7162 #: ../fish/guestfish-actions.pod:658 ../src/guestfs-actions.pod:989
7167 #: ../fish/guestfish-actions.pod:660 ../src/guestfs-actions.pod:991
7168 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7172 #: ../fish/guestfish-actions.pod:662 ../src/guestfs-actions.pod:993
7177 #: ../fish/guestfish-actions.pod:664 ../src/guestfs-actions.pod:995
7178 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7182 #: ../fish/guestfish-actions.pod:668 ../src/guestfs-actions.pod:999
7183 msgid "The checksum is returned as a printable string."
7187 #: ../fish/guestfish-actions.pod:670
7188 msgid "To get the checksum for a device, use L</checksum-device>."
7192 #: ../fish/guestfish-actions.pod:672
7193 msgid "To get the checksums for many files, use L</checksums-out>."
7197 #: ../fish/guestfish-actions.pod:674
7198 msgid "checksum-device"
7202 #: ../fish/guestfish-actions.pod:676
7205 " checksum-device csumtype device\n"
7210 #: ../fish/guestfish-actions.pod:678
7212 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7213 "device named C<device>. For the types of checksums supported see the L</"
7214 "checksum> command."
7218 #: ../fish/guestfish-actions.pod:682
7219 msgid "checksums-out"
7223 #: ../fish/guestfish-actions.pod:684
7226 " checksums-out csumtype directory (sumsfile|-)\n"
7231 #: ../fish/guestfish-actions.pod:686 ../src/guestfs-actions.pod:1034
7233 "This command computes the checksums of all regular files in C<directory> and "
7234 "then emits a list of those checksums to the local output file C<sumsfile>."
7238 #: ../fish/guestfish-actions.pod:690 ../src/guestfs-actions.pod:1038
7240 "This can be used for verifying the integrity of a virtual machine. However "
7241 "to be properly secure you should pay attention to the output of the checksum "
7242 "command (it uses the ones from GNU coreutils). In particular when the "
7243 "filename is not printable, coreutils uses a special backslash syntax. For "
7244 "more information, see the GNU coreutils info file."
7248 #: ../fish/guestfish-actions.pod:700
7253 #: ../fish/guestfish-actions.pod:702
7256 " chmod mode path\n"
7261 #: ../fish/guestfish-actions.pod:704 ../src/guestfs-actions.pod:1057
7263 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7268 #: ../fish/guestfish-actions.pod:707 ../src/guestfs-actions.pod:1060
7270 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7271 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7276 #: ../fish/guestfish-actions.pod:711 ../fish/guestfish-actions.pod:3145
7277 #: ../fish/guestfish-actions.pod:3284 ../fish/guestfish-actions.pod:3294
7278 #: ../fish/guestfish-actions.pod:3304 ../src/guestfs-actions.pod:1064
7279 #: ../src/guestfs-actions.pod:4752 ../src/guestfs-actions.pod:4961
7280 #: ../src/guestfs-actions.pod:4980 ../src/guestfs-actions.pod:4999
7281 msgid "The mode actually set is affected by the umask."
7285 #: ../fish/guestfish-actions.pod:713
7290 #: ../fish/guestfish-actions.pod:715
7293 " chown owner group path\n"
7298 #: ../fish/guestfish-actions.pod:717 ../src/guestfs-actions.pod:1078
7299 msgid "Change the file owner to C<owner> and group to C<group>."
7303 #: ../fish/guestfish-actions.pod:719 ../fish/guestfish-actions.pod:2580
7304 #: ../src/guestfs-actions.pod:1080 ../src/guestfs-actions.pod:3823
7306 "Only numeric uid and gid are supported. If you want to use names, you will "
7307 "need to locate and parse the password file yourself (Augeas support makes "
7308 "this relatively easy)."
7312 #: ../fish/guestfish-actions.pod:723
7317 #: ../fish/guestfish-actions.pod:725
7320 " command 'arguments ...'\n"
7325 #: ../fish/guestfish-actions.pod:727 ../src/guestfs-actions.pod:1094
7327 "This call runs a command from the guest filesystem. The filesystem must be "
7328 "mounted, and must contain a compatible operating system (ie. something "
7329 "Linux, with the same or compatible processor architecture)."
7333 #: ../fish/guestfish-actions.pod:732
7335 "The single parameter is an argv-style list of arguments. The first element "
7336 "is the name of the program to run. Subsequent elements are parameters. The "
7337 "list must be non-empty (ie. must contain a program name). Note that the "
7338 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
7342 #: ../fish/guestfish-actions.pod:739 ../src/guestfs-actions.pod:1106
7343 msgid "The return value is anything printed to I<stdout> by the command."
7347 #: ../fish/guestfish-actions.pod:742 ../src/guestfs-actions.pod:1109
7349 "If the command returns a non-zero exit status, then this function returns an "
7350 "error message. The error message string is the content of I<stderr> from "
7355 #: ../fish/guestfish-actions.pod:746 ../src/guestfs-actions.pod:1113
7357 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7358 "bin>. If you require a program from another location, you should provide "
7359 "the full path in the first parameter."
7363 #: ../fish/guestfish-actions.pod:751 ../src/guestfs-actions.pod:1118
7365 "Shared libraries and data files required by the program must be available on "
7366 "filesystems which are mounted in the correct places. It is the caller's "
7367 "responsibility to ensure all filesystems that are needed are mounted at the "
7372 #: ../fish/guestfish-actions.pod:760
7373 msgid "command-lines"
7377 #: ../fish/guestfish-actions.pod:762
7380 " command-lines 'arguments ...'\n"
7385 #: ../fish/guestfish-actions.pod:764
7387 "This is the same as L</command>, but splits the result into a list of lines."
7391 #: ../fish/guestfish-actions.pod:767
7392 msgid "See also: L</sh-lines>"
7396 #: ../fish/guestfish-actions.pod:772
7397 msgid "compress-device-out"
7401 #: ../fish/guestfish-actions.pod:774
7404 " compress-device-out ctype device (zdevice|-) [level:..]\n"
7409 #: ../fish/guestfish-actions.pod:776 ../src/guestfs-actions.pod:1168
7411 "This command compresses C<device> and writes it out to the local file "
7416 #: ../fish/guestfish-actions.pod:779
7418 "The C<ctype> and optional C<level> parameters have the same meaning as in L</"
7423 #: ../fish/guestfish-actions.pod:786
7424 msgid "compress-out"
7428 #: ../fish/guestfish-actions.pod:788
7431 " compress-out ctype file (zfile|-) [level:..]\n"
7436 #: ../fish/guestfish-actions.pod:790 ../src/guestfs-actions.pod:1220
7438 "This command compresses C<file> and writes it out to the local file C<zfile>."
7442 #: ../fish/guestfish-actions.pod:793 ../src/guestfs-actions.pod:1223
7444 "The compression program used is controlled by the C<ctype> parameter. "
7445 "Currently this includes: C<compress>, C<gzip>, C<bzip2>, C<xz> or C<lzop>. "
7446 "Some compression types may not be supported by particular builds of "
7447 "libguestfs, in which case you will get an error containing the substring "
7448 "\"not supported\"."
7452 #: ../fish/guestfish-actions.pod:799 ../src/guestfs-actions.pod:1229
7454 "The optional C<level> parameter controls compression level. The meaning and "
7455 "default for this parameter depends on the compression program being used."
7459 #: ../fish/guestfish-actions.pod:807
7464 #: ../fish/guestfish-actions.pod:809
7467 " config qemuparam qemuvalue\n"
7472 #: ../fish/guestfish-actions.pod:811 ../src/guestfs-actions.pod:1270
7474 "This can be used to add arbitrary qemu command line parameters of the form "
7475 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
7476 "setting some parameters which would interfere with parameters that we use."
7480 #: ../fish/guestfish-actions.pod:816 ../src/guestfs-actions.pod:1275
7481 msgid "The first character of C<param> string must be a C<-> (dash)."
7485 #: ../fish/guestfish-actions.pod:818 ../src/guestfs-actions.pod:1277
7486 msgid "C<value> can be NULL."
7490 #: ../fish/guestfish-actions.pod:820
7495 #: ../fish/guestfish-actions.pod:822
7498 " copy-size src dest size\n"
7503 #: ../fish/guestfish-actions.pod:824 ../src/guestfs-actions.pod:1291
7505 "This command copies exactly C<size> bytes from one source device or file "
7506 "C<src> to another destination device or file C<dest>."
7510 #: ../fish/guestfish-actions.pod:827 ../src/guestfs-actions.pod:1294
7512 "Note this will fail if the source is too short or if the destination is not "
7517 #: ../fish/guestfish-actions.pod:830
7522 #: ../fish/guestfish-actions.pod:832
7530 #: ../fish/guestfish-actions.pod:834 ../src/guestfs-actions.pod:1313
7532 "This copies a file from C<src> to C<dest> where C<dest> is either a "
7533 "destination filename or destination directory."
7537 #: ../fish/guestfish-actions.pod:837
7542 #: ../fish/guestfish-actions.pod:839
7550 #: ../fish/guestfish-actions.pod:841 ../src/guestfs-actions.pod:1327
7552 "This copies a file or directory from C<src> to C<dest> recursively using the "
7557 #: ../fish/guestfish-actions.pod:844
7562 #: ../fish/guestfish-actions.pod:846
7570 #: ../fish/guestfish-actions.pod:848 ../src/guestfs-actions.pod:1341
7572 "This command copies from one source device or file C<src> to another "
7573 "destination device or file C<dest>. Normally you would use this to copy to "
7574 "or from a device or partition, for example to duplicate a filesystem."
7578 #: ../fish/guestfish-actions.pod:853
7580 "If the destination is a device, it must be as large or larger than the "
7581 "source file or device, otherwise the copy will fail. This command cannot do "
7582 "partial copies (see L</copy-size>)."
7586 #: ../fish/guestfish-actions.pod:857
7591 #: ../fish/guestfish-actions.pod:859
7599 #: ../fish/guestfish-actions.pod:861 ../src/guestfs-actions.pod:1359
7600 msgid "This command runs the C<df> command to report disk space used."
7604 #: ../fish/guestfish-actions.pod:863 ../fish/guestfish-actions.pod:874
7606 "This command is mostly useful for interactive sessions. It is I<not> "
7607 "intended that you try to parse the output string. Use L</statvfs> from "
7612 #: ../fish/guestfish-actions.pod:867
7617 #: ../fish/guestfish-actions.pod:869
7625 #: ../fish/guestfish-actions.pod:871 ../src/guestfs-actions.pod:1375
7627 "This command runs the C<df -h> command to report disk space used in human-"
7632 #: ../fish/guestfish-actions.pod:878
7637 #: ../fish/guestfish-actions.pod:880
7645 #: ../fish/guestfish-actions.pod:882 ../src/guestfs-actions.pod:1392
7647 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7648 "This is sometimes useful for extended debugging of problems."
7652 #: ../fish/guestfish-actions.pod:886
7654 "Another way to get the same information is to enable verbose messages with "
7655 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
7656 "before running the program."
7660 #: ../fish/guestfish-actions.pod:891
7665 #: ../fish/guestfish-actions.pod:893
7668 " download remotefilename (filename|-)\n"
7673 #: ../fish/guestfish-actions.pod:895 ../fish/guestfish-actions.pod:908
7674 #: ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1438
7676 "Download file C<remotefilename> and save it as C<filename> on the local "
7681 #: ../fish/guestfish-actions.pod:898 ../fish/guestfish-actions.pod:4890
7682 #: ../src/guestfs-actions.pod:1416 ../src/guestfs-actions.pod:7404
7683 msgid "C<filename> can also be a named pipe."
7687 #: ../fish/guestfish-actions.pod:900
7688 msgid "See also L</upload>, L</cat>."
7692 #: ../fish/guestfish-actions.pod:904
7693 msgid "download-offset"
7697 #: ../fish/guestfish-actions.pod:906
7700 " download-offset remotefilename (filename|-) offset size\n"
7705 #: ../fish/guestfish-actions.pod:911 ../src/guestfs-actions.pod:1441
7707 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7708 "region must be within the file or device)."
7712 #: ../fish/guestfish-actions.pod:914
7714 "Note that there is no limit on the amount of data that can be downloaded "
7715 "with this call, unlike with L</pread>, and this call always reads the full "
7716 "amount unless an error occurs."
7720 #: ../fish/guestfish-actions.pod:919
7721 msgid "See also L</download>, L</pread>."
7725 #: ../fish/guestfish-actions.pod:923
7730 #: ../fish/guestfish-actions.pod:925
7733 " drop-caches whattodrop\n"
7738 #: ../fish/guestfish-actions.pod:927 ../src/guestfs-actions.pod:1466
7740 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7741 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7742 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7746 #: ../fish/guestfish-actions.pod:932 ../src/guestfs-actions.pod:1471
7747 msgid "Setting C<whattodrop> to 3 should drop everything."
7751 #: ../fish/guestfish-actions.pod:934 ../src/guestfs-actions.pod:1473
7753 "This automatically calls L<sync(2)> before the operation, so that the "
7754 "maximum guest memory is freed."
7758 #: ../fish/guestfish-actions.pod:937
7763 #: ../fish/guestfish-actions.pod:939
7771 #: ../fish/guestfish-actions.pod:941 ../src/guestfs-actions.pod:1486
7773 "This command runs the C<du -s> command to estimate file space usage for "
7778 #: ../fish/guestfish-actions.pod:944 ../src/guestfs-actions.pod:1489
7780 "C<path> can be a file or a directory. If C<path> is a directory then the "
7781 "estimate includes the contents of the directory and all subdirectories "
7786 #: ../fish/guestfish-actions.pod:948 ../src/guestfs-actions.pod:1493
7788 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
7792 #: ../fish/guestfish-actions.pod:951
7797 #: ../fish/guestfish-actions.pod:953
7800 " e2fsck-f device\n"
7805 #: ../fish/guestfish-actions.pod:955 ../src/guestfs-actions.pod:1511
7807 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
7808 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
7813 #: ../fish/guestfish-actions.pod:959
7815 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
7816 "should use L</fsck>."
7820 #: ../fish/guestfish-actions.pod:962
7825 #: ../fish/guestfish-actions.pod:964
7828 " echo-daemon 'words ...'\n"
7833 #: ../fish/guestfish-actions.pod:966 ../src/guestfs-actions.pod:1528
7835 "This command concatenates the list of C<words> passed with single spaces "
7836 "between them and returns the resulting string."
7840 #: ../fish/guestfish-actions.pod:969 ../src/guestfs-actions.pod:1531
7841 msgid "You can use this command to test the connection through to the daemon."
7845 #: ../fish/guestfish-actions.pod:971
7846 msgid "See also L</ping-daemon>."
7850 #: ../fish/guestfish-actions.pod:973
7855 #: ../fish/guestfish-actions.pod:975
7858 " egrep regex path\n"
7863 #: ../fish/guestfish-actions.pod:977 ../src/guestfs-actions.pod:1547
7865 "This calls the external C<egrep> program and returns the matching lines."
7869 #: ../fish/guestfish-actions.pod:983
7874 #: ../fish/guestfish-actions.pod:985
7877 " egrepi regex path\n"
7882 #: ../fish/guestfish-actions.pod:987 ../src/guestfs-actions.pod:1566
7884 "This calls the external C<egrep -i> program and returns the matching lines."
7888 #: ../fish/guestfish-actions.pod:993
7893 #: ../fish/guestfish-actions.pod:995
7896 " equal file1 file2\n"
7901 #: ../fish/guestfish-actions.pod:997 ../src/guestfs-actions.pod:1585
7903 "This compares the two files C<file1> and C<file2> and returns true if their "
7904 "content is exactly equal, or false otherwise."
7908 #: ../fish/guestfish-actions.pod:1000 ../src/guestfs-actions.pod:1588
7909 msgid "The external L<cmp(1)> program is used for the comparison."
7913 #: ../fish/guestfish-actions.pod:1002
7918 #: ../fish/guestfish-actions.pod:1004
7926 #: ../fish/guestfish-actions.pod:1006 ../src/guestfs-actions.pod:1600
7928 "This returns C<true> if and only if there is a file, directory (or anything) "
7929 "with the given C<path> name."
7933 #: ../fish/guestfish-actions.pod:1009
7934 msgid "See also L</is-file>, L</is-dir>, L</stat>."
7938 #: ../fish/guestfish-actions.pod:1011
7943 #: ../fish/guestfish-actions.pod:1013
7946 " fallocate path len\n"
7951 #: ../fish/guestfish-actions.pod:1015 ../fish/guestfish-actions.pod:1034
7952 #: ../src/guestfs-actions.pod:1623 ../src/guestfs-actions.pod:1642
7954 "This command preallocates a file (containing zero bytes) named C<path> of "
7955 "size C<len> bytes. If the file exists already, it is overwritten."
7959 #: ../fish/guestfish-actions.pod:1019 ../src/guestfs-actions.pod:1627
7961 "Do not confuse this with the guestfish-specific C<alloc> command which "
7962 "allocates a file in the host and attaches it as a device."
7966 #: ../fish/guestfish-actions.pod:1023
7968 "I<This function is deprecated.> In new code, use the L</fallocate64> call "
7973 #: ../fish/guestfish-actions.pod:1030
7978 #: ../fish/guestfish-actions.pod:1032
7981 " fallocate64 path len\n"
7986 #: ../fish/guestfish-actions.pod:1038
7988 "Note that this call allocates disk blocks for the file. To create a sparse "
7989 "file use L</truncate-size> instead."
7993 #: ../fish/guestfish-actions.pod:1041
7995 "The deprecated call L</fallocate> does the same, but owing to an oversight "
7996 "it only allowed 30 bit lengths to be specified, effectively limiting the "
7997 "maximum size of files created through that call to 1GB."
8001 #: ../fish/guestfish-actions.pod:1046 ../src/guestfs-actions.pod:1654
8003 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8004 "commands which create a file in the host and attach it as a device."
8008 #: ../fish/guestfish-actions.pod:1050
8013 #: ../fish/guestfish-actions.pod:1052
8016 " fgrep pattern path\n"
8021 #: ../fish/guestfish-actions.pod:1054 ../src/guestfs-actions.pod:1669
8023 "This calls the external C<fgrep> program and returns the matching lines."
8027 #: ../fish/guestfish-actions.pod:1060
8032 #: ../fish/guestfish-actions.pod:1062
8035 " fgrepi pattern path\n"
8040 #: ../fish/guestfish-actions.pod:1064 ../src/guestfs-actions.pod:1688
8042 "This calls the external C<fgrep -i> program and returns the matching lines."
8046 #: ../fish/guestfish-actions.pod:1070
8051 #: ../fish/guestfish-actions.pod:1072
8059 #: ../fish/guestfish-actions.pod:1074 ../src/guestfs-actions.pod:1706
8061 "This call uses the standard L<file(1)> command to determine the type or "
8062 "contents of the file."
8066 #: ../fish/guestfish-actions.pod:1077 ../src/guestfs-actions.pod:1709
8068 "This call will also transparently look inside various types of compressed "
8073 #: ../fish/guestfish-actions.pod:1080 ../src/guestfs-actions.pod:1712
8075 "The exact command which runs is C<file -zb path>. Note in particular that "
8076 "the filename is not prepended to the output (the I<-b> option)."
8080 #: ../fish/guestfish-actions.pod:1084 ../src/guestfs-actions.pod:1716
8082 "The output depends on the output of the underlying L<file(1)> command and it "
8083 "can change in future in ways beyond our control. In other words, the output "
8084 "is not guaranteed by the ABI."
8088 #: ../fish/guestfish-actions.pod:1088
8090 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
8091 "(etc), L</is-zero>."
8095 #: ../fish/guestfish-actions.pod:1091
8096 msgid "file-architecture"
8100 #: ../fish/guestfish-actions.pod:1093
8103 " file-architecture filename\n"
8108 #: ../fish/guestfish-actions.pod:1095 ../src/guestfs-actions.pod:1734
8110 "This detects the architecture of the binary C<filename>, and returns it if "
8115 #: ../fish/guestfish-actions.pod:1098 ../src/guestfs-actions.pod:1737
8116 msgid "Currently defined architectures are:"
8120 #: ../fish/guestfish-actions.pod:1102 ../src/guestfs-actions.pod:1741
8125 #: ../fish/guestfish-actions.pod:1104 ../src/guestfs-actions.pod:1743
8127 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8128 "irrespective of the precise processor requirements of the binary."
8132 #: ../fish/guestfish-actions.pod:1107 ../src/guestfs-actions.pod:1746
8137 #: ../fish/guestfish-actions.pod:1109 ../src/guestfs-actions.pod:1748
8138 msgid "64 bit x86-64."
8142 #: ../fish/guestfish-actions.pod:1111 ../src/guestfs-actions.pod:1750
8147 #: ../fish/guestfish-actions.pod:1113 ../src/guestfs-actions.pod:1752
8148 msgid "32 bit SPARC."
8152 #: ../fish/guestfish-actions.pod:1115 ../src/guestfs-actions.pod:1754
8157 #: ../fish/guestfish-actions.pod:1117 ../src/guestfs-actions.pod:1756
8158 msgid "64 bit SPARC V9 and above."
8162 #: ../fish/guestfish-actions.pod:1119 ../src/guestfs-actions.pod:1758
8167 #: ../fish/guestfish-actions.pod:1121 ../src/guestfs-actions.pod:1760
8168 msgid "Intel Itanium."
8172 #: ../fish/guestfish-actions.pod:1123 ../src/guestfs-actions.pod:1762
8177 #: ../fish/guestfish-actions.pod:1125 ../src/guestfs-actions.pod:1764
8178 msgid "32 bit Power PC."
8182 #: ../fish/guestfish-actions.pod:1127 ../src/guestfs-actions.pod:1766
8187 #: ../fish/guestfish-actions.pod:1129 ../src/guestfs-actions.pod:1768
8188 msgid "64 bit Power PC."
8192 #: ../fish/guestfish-actions.pod:1133 ../src/guestfs-actions.pod:1772
8193 msgid "Libguestfs may return other architecture strings in future."
8197 #: ../fish/guestfish-actions.pod:1135 ../src/guestfs-actions.pod:1774
8198 msgid "The function works on at least the following types of files:"
8202 #: ../fish/guestfish-actions.pod:1141 ../src/guestfs-actions.pod:1780
8203 msgid "many types of Un*x and Linux binary"
8207 #: ../fish/guestfish-actions.pod:1145 ../src/guestfs-actions.pod:1784
8208 msgid "many types of Un*x and Linux shared library"
8212 #: ../fish/guestfish-actions.pod:1149 ../src/guestfs-actions.pod:1788
8213 msgid "Windows Win32 and Win64 binaries"
8217 #: ../fish/guestfish-actions.pod:1153 ../src/guestfs-actions.pod:1792
8218 msgid "Windows Win32 and Win64 DLLs"
8222 #: ../fish/guestfish-actions.pod:1155 ../src/guestfs-actions.pod:1794
8223 msgid "Win32 binaries and DLLs return C<i386>."
8227 #: ../fish/guestfish-actions.pod:1157 ../src/guestfs-actions.pod:1796
8228 msgid "Win64 binaries and DLLs return C<x86_64>."
8232 #: ../fish/guestfish-actions.pod:1161 ../src/guestfs-actions.pod:1800
8233 msgid "Linux kernel modules"
8237 #: ../fish/guestfish-actions.pod:1165 ../src/guestfs-actions.pod:1804
8238 msgid "Linux new-style initrd images"
8242 #: ../fish/guestfish-actions.pod:1169 ../src/guestfs-actions.pod:1808
8243 msgid "some non-x86 Linux vmlinuz kernels"
8247 #: ../fish/guestfish-actions.pod:1173 ../src/guestfs-actions.pod:1812
8248 msgid "What it can't do currently:"
8252 #: ../fish/guestfish-actions.pod:1179 ../src/guestfs-actions.pod:1818
8253 msgid "static libraries (libfoo.a)"
8257 #: ../fish/guestfish-actions.pod:1183 ../src/guestfs-actions.pod:1822
8258 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8262 #: ../fish/guestfish-actions.pod:1187 ../src/guestfs-actions.pod:1826
8263 msgid "x86 Linux vmlinuz kernels"
8267 #: ../fish/guestfish-actions.pod:1189 ../src/guestfs-actions.pod:1828
8269 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8270 "compressed code, and are horribly hard to unpack. If you want to find the "
8271 "architecture of a kernel, use the architecture of the associated initrd or "
8272 "kernel module(s) instead."
8276 #: ../fish/guestfish-actions.pod:1196
8281 #: ../fish/guestfish-actions.pod:1198
8289 #: ../fish/guestfish-actions.pod:1200 ../src/guestfs-actions.pod:1846
8290 msgid "This command returns the size of C<file> in bytes."
8294 #: ../fish/guestfish-actions.pod:1202
8296 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
8297 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
8301 #: ../fish/guestfish-actions.pod:1206
8306 #: ../fish/guestfish-actions.pod:1208
8309 " fill c len path\n"
8314 #: ../fish/guestfish-actions.pod:1210 ../src/guestfs-actions.pod:1864
8316 "This command creates a new file called C<path>. The initial content of the "
8317 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
8322 #: ../fish/guestfish-actions.pod:1214
8324 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
8325 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
8330 #: ../fish/guestfish-actions.pod:1219
8331 msgid "fill-pattern"
8335 #: ../fish/guestfish-actions.pod:1221
8338 " fill-pattern pattern len path\n"
8343 #: ../fish/guestfish-actions.pod:1223
8345 "This function is like L</fill> except that it creates a new file of length "
8346 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
8347 "is truncated if necessary to ensure the length of the file is exactly C<len> "
8352 #: ../fish/guestfish-actions.pod:1228
8357 #: ../fish/guestfish-actions.pod:1230
8365 #: ../fish/guestfish-actions.pod:1232 ../src/guestfs-actions.pod:1910
8367 "This command lists out all files and directories, recursively, starting at "
8368 "C<directory>. It is essentially equivalent to running the shell command "
8369 "C<find directory -print> but some post-processing happens on the output, "
8374 #: ../fish/guestfish-actions.pod:1237 ../src/guestfs-actions.pod:1915
8376 "This returns a list of strings I<without any prefix>. Thus if the directory "
8381 #: ../fish/guestfish-actions.pod:1240 ../src/guestfs-actions.pod:1918
8391 #: ../fish/guestfish-actions.pod:1244
8392 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
8396 #: ../fish/guestfish-actions.pod:1247 ../src/guestfs-actions.pod:1925
8407 #: ../fish/guestfish-actions.pod:1252 ../src/guestfs-actions.pod:1930
8408 msgid "If C<directory> is not a directory, then this command returns an error."
8412 #: ../fish/guestfish-actions.pod:1255 ../src/guestfs-actions.pod:1933
8413 msgid "The returned list is sorted."
8417 #: ../fish/guestfish-actions.pod:1257
8418 msgid "See also L</find0>."
8422 #: ../fish/guestfish-actions.pod:1262
8427 #: ../fish/guestfish-actions.pod:1264
8430 " find0 directory (files|-)\n"
8435 #: ../fish/guestfish-actions.pod:1266 ../src/guestfs-actions.pod:1953
8437 "This command lists out all files and directories, recursively, starting at "
8438 "C<directory>, placing the resulting list in the external file called "
8443 #: ../fish/guestfish-actions.pod:1270
8445 "This command works the same way as L</find> with the following exceptions:"
8449 #: ../fish/guestfish-actions.pod:1277 ../src/guestfs-actions.pod:1964
8450 msgid "The resulting list is written to an external file."
8454 #: ../fish/guestfish-actions.pod:1281 ../src/guestfs-actions.pod:1968
8456 "Items (filenames) in the result are separated by C<\\0> characters. See "
8457 "L<find(1)> option I<-print0>."
8461 #: ../fish/guestfish-actions.pod:1286 ../src/guestfs-actions.pod:1973
8462 msgid "This command is not limited in the number of names that it can return."
8466 #: ../fish/guestfish-actions.pod:1291 ../src/guestfs-actions.pod:1978
8467 msgid "The result list is not sorted."
8471 #: ../fish/guestfish-actions.pod:1297
8472 msgid "findfs-label"
8476 #: ../fish/guestfish-actions.pod:1299
8479 " findfs-label label\n"
8484 #: ../fish/guestfish-actions.pod:1301 ../src/guestfs-actions.pod:1992
8486 "This command searches the filesystems and returns the one which has the "
8487 "given label. An error is returned if no such filesystem can be found."
8491 #: ../fish/guestfish-actions.pod:1305
8492 msgid "To find the label of a filesystem, use L</vfs-label>."
8496 #: ../fish/guestfish-actions.pod:1307
8501 #: ../fish/guestfish-actions.pod:1309
8504 " findfs-uuid uuid\n"
8509 #: ../fish/guestfish-actions.pod:1311 ../src/guestfs-actions.pod:2009
8511 "This command searches the filesystems and returns the one which has the "
8512 "given UUID. An error is returned if no such filesystem can be found."
8516 #: ../fish/guestfish-actions.pod:1315
8517 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
8521 #: ../fish/guestfish-actions.pod:1317
8526 #: ../fish/guestfish-actions.pod:1319
8529 " fsck fstype device\n"
8534 #: ../fish/guestfish-actions.pod:1321 ../src/guestfs-actions.pod:2027
8536 "This runs the filesystem checker (fsck) on C<device> which should have "
8537 "filesystem type C<fstype>."
8541 #: ../fish/guestfish-actions.pod:1324 ../src/guestfs-actions.pod:2030
8543 "The returned integer is the status. See L<fsck(8)> for the list of status "
8544 "codes from C<fsck>."
8548 #: ../fish/guestfish-actions.pod:1333 ../src/guestfs-actions.pod:2039
8549 msgid "Multiple status codes can be summed together."
8553 #: ../fish/guestfish-actions.pod:1337 ../src/guestfs-actions.pod:2043
8555 "A non-zero return code can mean \"success\", for example if errors have been "
8556 "corrected on the filesystem."
8560 #: ../fish/guestfish-actions.pod:1342 ../src/guestfs-actions.pod:2048
8561 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8565 #: ../fish/guestfish-actions.pod:1347 ../src/guestfs-actions.pod:2053
8567 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8571 #: ../fish/guestfish-actions.pod:1349
8576 #: ../fish/guestfish-actions.pod:1351
8584 #: ../fish/guestfish-actions.pod:1353 ../src/guestfs-actions.pod:2064
8586 "Return the additional kernel options which are added to the guest kernel "
8591 #: ../fish/guestfish-actions.pod:1356 ../src/guestfs-actions.pod:2067
8592 msgid "If C<NULL> then no options are added."
8596 #: ../fish/guestfish-actions.pod:1358
8597 msgid "get-attach-method"
8601 #: ../fish/guestfish-actions.pod:1360
8604 " get-attach-method\n"
8609 #: ../fish/guestfish-actions.pod:1362
8610 msgid "Return the current attach method. See L</set-attach-method>."
8614 #: ../fish/guestfish-actions.pod:1364
8615 msgid "get-autosync"
8619 #: ../fish/guestfish-actions.pod:1366
8627 #: ../fish/guestfish-actions.pod:1368 ../src/guestfs-actions.pod:2092
8628 msgid "Get the autosync flag."
8632 #: ../fish/guestfish-actions.pod:1370
8637 #: ../fish/guestfish-actions.pod:1372
8645 #: ../fish/guestfish-actions.pod:1374 ../src/guestfs-actions.pod:2103
8646 msgid "Return the direct appliance mode flag."
8650 #: ../fish/guestfish-actions.pod:1376
8655 #: ../fish/guestfish-actions.pod:1378
8658 " get-e2label device\n"
8663 #: ../fish/guestfish-actions.pod:1380 ../src/guestfs-actions.pod:2122
8665 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8669 #: ../fish/guestfish-actions.pod:1383
8671 "I<This function is deprecated.> In new code, use the L</vfs_label> call "
8676 #: ../fish/guestfish-actions.pod:1390
8681 #: ../fish/guestfish-actions.pod:1392
8684 " get-e2uuid device\n"
8689 #: ../fish/guestfish-actions.pod:1394 ../src/guestfs-actions.pod:2143
8691 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8695 #: ../fish/guestfish-actions.pod:1397
8697 "I<This function is deprecated.> In new code, use the L</vfs_uuid> call "
8702 #: ../fish/guestfish-actions.pod:1404
8707 #: ../fish/guestfish-actions.pod:1406
8715 #: ../fish/guestfish-actions.pod:1408 ../src/guestfs-actions.pod:2156
8717 "This gets the memory size in megabytes allocated to the qemu subprocess."
8721 #: ../fish/guestfish-actions.pod:1411
8723 "If L</set-memsize> was not called on this handle, and if "
8724 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
8725 "value for memsize."
8729 #: ../fish/guestfish-actions.pod:1415 ../fish/guestfish-actions.pod:1472
8730 #: ../fish/guestfish-actions.pod:4238 ../fish/guestfish-actions.pod:4340
8731 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:2255
8732 #: ../src/guestfs-actions.pod:6449 ../src/guestfs-actions.pod:6575
8734 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8738 #: ../fish/guestfish-actions.pod:1418
8743 #: ../fish/guestfish-actions.pod:1420
8751 #: ../fish/guestfish-actions.pod:1422 ../src/guestfs-actions.pod:2175
8752 msgid "This returns the enable network flag."
8756 #: ../fish/guestfish-actions.pod:1424
8761 #: ../fish/guestfish-actions.pod:1426
8769 #: ../fish/guestfish-actions.pod:1428 ../src/guestfs-actions.pod:2186
8770 msgid "Return the current search path."
8774 #: ../fish/guestfish-actions.pod:1430 ../src/guestfs-actions.pod:2188
8776 "This is always non-NULL. If it wasn't set already, then this will return "
8781 #: ../fish/guestfish-actions.pod:1433
8786 #: ../fish/guestfish-actions.pod:1435
8794 #: ../fish/guestfish-actions.pod:1437 ../src/guestfs-actions.pod:2201
8795 msgid "This returns the process group flag."
8799 #: ../fish/guestfish-actions.pod:1439
8804 #: ../fish/guestfish-actions.pod:1441
8809 #: ../fish/guestfish-actions.pod:1443
8817 #: ../fish/guestfish-actions.pod:1445 ../src/guestfs-actions.pod:2212
8819 "Return the process ID of the qemu subprocess. If there is no qemu "
8820 "subprocess, then this will return an error."
8824 #: ../fish/guestfish-actions.pod:1448 ../src/guestfs-actions.pod:2215
8825 msgid "This is an internal call used for debugging and testing."
8829 #: ../fish/guestfish-actions.pod:1450
8834 #: ../fish/guestfish-actions.pod:1452
8842 #: ../fish/guestfish-actions.pod:1454 ../src/guestfs-actions.pod:2226
8843 msgid "Return the current qemu binary."
8847 #: ../fish/guestfish-actions.pod:1456 ../src/guestfs-actions.pod:2228
8849 "This is always non-NULL. If it wasn't set already, then this will return "
8850 "the default qemu binary name."
8854 #: ../fish/guestfish-actions.pod:1459
8855 msgid "get-recovery-proc"
8859 #: ../fish/guestfish-actions.pod:1461
8862 " get-recovery-proc\n"
8867 #: ../fish/guestfish-actions.pod:1463 ../src/guestfs-actions.pod:2241
8868 msgid "Return the recovery process enabled flag."
8872 #: ../fish/guestfish-actions.pod:1465
8877 #: ../fish/guestfish-actions.pod:1467
8885 #: ../fish/guestfish-actions.pod:1469
8887 "This returns the current setting of the selinux flag which is passed to the "
8888 "appliance at boot time. See L</set-selinux>."
8892 #: ../fish/guestfish-actions.pod:1475
8897 #: ../fish/guestfish-actions.pod:1477
8905 #: ../fish/guestfish-actions.pod:1479 ../src/guestfs-actions.pod:2267
8906 msgid "This returns the number of virtual CPUs assigned to the appliance."
8910 #: ../fish/guestfish-actions.pod:1481
8915 #: ../fish/guestfish-actions.pod:1483
8923 #: ../fish/guestfish-actions.pod:1485 ../src/guestfs-actions.pod:2278
8925 "This returns the current state as an opaque integer. This is only useful "
8926 "for printing debug and internal error messages."
8930 #: ../fish/guestfish-actions.pod:1488 ../fish/guestfish-actions.pod:2447
8931 #: ../fish/guestfish-actions.pod:2465 ../fish/guestfish-actions.pod:2503
8932 #: ../fish/guestfish-actions.pod:2519 ../src/guestfs-actions.pod:2281
8933 #: ../src/guestfs-actions.pod:3600 ../src/guestfs-actions.pod:3629
8934 #: ../src/guestfs-actions.pod:3690 ../src/guestfs-actions.pod:3717
8935 msgid "For more information on states, see L<guestfs(3)>."
8939 #: ../fish/guestfish-actions.pod:1490
8944 #: ../fish/guestfish-actions.pod:1492
8952 #: ../fish/guestfish-actions.pod:1494 ../src/guestfs-actions.pod:2292
8953 msgid "Return the command trace flag."
8957 #: ../fish/guestfish-actions.pod:1496
8962 #: ../fish/guestfish-actions.pod:1498
8970 #: ../fish/guestfish-actions.pod:1500
8972 "Return the current umask. By default the umask is C<022> unless it has been "
8973 "set by calling L</umask>."
8977 #: ../fish/guestfish-actions.pod:1503
8982 #: ../fish/guestfish-actions.pod:1505
8990 #: ../fish/guestfish-actions.pod:1507 ../src/guestfs-actions.pod:2315
8991 msgid "This returns the verbose messages flag."
8995 #: ../fish/guestfish-actions.pod:1509
9000 #: ../fish/guestfish-actions.pod:1511
9008 #: ../fish/guestfish-actions.pod:1513 ../src/guestfs-actions.pod:2326
9009 msgid "This gets the SELinux security context of the daemon."
9013 #: ../fish/guestfish-actions.pod:1515
9014 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
9018 #: ../fish/guestfish-actions.pod:1518
9023 #: ../fish/guestfish-actions.pod:1520
9026 " getxattr path name\n"
9031 #: ../fish/guestfish-actions.pod:1522
9033 "Get a single extended attribute from file C<path> named C<name>. This call "
9034 "follows symlinks. If you want to lookup an extended attribute for the "
9035 "symlink itself, use L</lgetxattr>."
9039 #: ../fish/guestfish-actions.pod:1526 ../fish/guestfish-actions.pod:2592
9041 "Normally it is better to get all extended attributes from a file in one go "
9042 "by calling L</getxattrs>. However some Linux filesystem implementations are "
9043 "buggy and do not provide a way to list out attributes. For these "
9044 "filesystems (notably ntfs-3g) you have to know the names of the extended "
9045 "attributes you want in advance and call this function."
9049 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:2599
9050 #: ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:3850
9052 "Extended attribute values are blobs of binary data. If there is no extended "
9053 "attribute named C<name>, this returns an error."
9057 #: ../fish/guestfish-actions.pod:1536
9058 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
9062 #: ../fish/guestfish-actions.pod:1538
9067 #: ../fish/guestfish-actions.pod:1540
9075 #: ../fish/guestfish-actions.pod:1542 ../src/guestfs-actions.pod:2372
9077 "This call lists the extended attributes of the file or directory C<path>."
9081 #: ../fish/guestfish-actions.pod:1545 ../src/guestfs-actions.pod:2375
9083 "At the system call level, this is a combination of the L<listxattr(2)> and "
9084 "L<getxattr(2)> calls."
9088 #: ../fish/guestfish-actions.pod:1548
9089 msgid "See also: L</lgetxattrs>, L<attr(5)>."
9093 #: ../fish/guestfish-actions.pod:1550
9098 #: ../fish/guestfish-actions.pod:1552
9101 " glob-expand pattern\n"
9106 #: ../fish/guestfish-actions.pod:1554 ../src/guestfs-actions.pod:2392
9108 "This command searches for all the pathnames matching C<pattern> according to "
9109 "the wildcard expansion rules used by the shell."
9113 #: ../fish/guestfish-actions.pod:1558 ../src/guestfs-actions.pod:2396
9115 "If no paths match, then this returns an empty list (note: not an error)."
9119 #: ../fish/guestfish-actions.pod:1561 ../src/guestfs-actions.pod:2399
9121 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
9122 "GLOB_BRACE>. See that manual page for more details."
9126 #: ../fish/guestfish-actions.pod:1565
9131 #: ../fish/guestfish-actions.pod:1567
9134 " grep regex path\n"
9139 #: ../fish/guestfish-actions.pod:1569 ../src/guestfs-actions.pod:2416
9140 msgid "This calls the external C<grep> program and returns the matching lines."
9144 #: ../fish/guestfish-actions.pod:1575
9149 #: ../fish/guestfish-actions.pod:1577
9152 " grepi regex path\n"
9157 #: ../fish/guestfish-actions.pod:1579 ../src/guestfs-actions.pod:2435
9159 "This calls the external C<grep -i> program and returns the matching lines."
9163 #: ../fish/guestfish-actions.pod:1585
9164 msgid "grub-install"
9168 #: ../fish/guestfish-actions.pod:1587
9171 " grub-install root device\n"
9176 #: ../fish/guestfish-actions.pod:1589 ../src/guestfs-actions.pod:2454
9178 "This command installs GRUB 1 (the Grand Unified Bootloader) on C<device>, "
9179 "with the root directory being C<root>."
9183 #: ../fish/guestfish-actions.pod:1598 ../src/guestfs-actions.pod:2463
9185 "There is currently no way in the API to install grub2, which is used by most "
9186 "modern Linux guests. It is possible to run the grub2 command from the "
9187 "guest, although see the caveats in L<guestfs(3)/RUNNING COMMANDS>."
9191 #: ../fish/guestfish-actions.pod:1605 ../src/guestfs-actions.pod:2470
9193 "This uses C<grub-install> from the host. Unfortunately grub is not always "
9194 "compatible with itself, so this only works in rather narrow circumstances. "
9195 "Careful testing with each guest version is advisable."
9199 #: ../fish/guestfish-actions.pod:1612 ../src/guestfs-actions.pod:2477
9201 "If grub-install reports the error \"No suitable drive was found in the "
9202 "generated device map.\" it may be that you need to create a C</boot/grub/"
9203 "device.map> file first that contains the mapping between grub device names "
9204 "and Linux device names. It is usually sufficient to create a file "
9209 #: ../fish/guestfish-actions.pod:1619 ../src/guestfs-actions.pod:2484
9217 #: ../fish/guestfish-actions.pod:1621 ../src/guestfs-actions.pod:2486
9218 msgid "replacing C</dev/vda> with the name of the installation device."
9222 #: ../fish/guestfish-actions.pod:1625
9227 #: ../fish/guestfish-actions.pod:1627
9235 #: ../fish/guestfish-actions.pod:1629 ../src/guestfs-actions.pod:2500
9237 "This command returns up to the first 10 lines of a file as a list of strings."
9241 #: ../fish/guestfish-actions.pod:1635
9246 #: ../fish/guestfish-actions.pod:1637
9249 " head-n nrlines path\n"
9254 #: ../fish/guestfish-actions.pod:1639 ../src/guestfs-actions.pod:2519
9256 "If the parameter C<nrlines> is a positive number, this returns the first "
9257 "C<nrlines> lines of the file C<path>."
9261 #: ../fish/guestfish-actions.pod:1642 ../src/guestfs-actions.pod:2522
9263 "If the parameter C<nrlines> is a negative number, this returns lines from "
9264 "the file C<path>, excluding the last C<nrlines> lines."
9268 #: ../fish/guestfish-actions.pod:1645 ../fish/guestfish-actions.pod:4730
9269 #: ../src/guestfs-actions.pod:2525 ../src/guestfs-actions.pod:7163
9270 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
9274 #: ../fish/guestfish-actions.pod:1650
9279 #: ../fish/guestfish-actions.pod:1652
9287 #: ../fish/guestfish-actions.pod:1654 ../src/guestfs-actions.pod:2542
9289 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
9290 "readable, canonical hex dump of the file."
9294 #: ../fish/guestfish-actions.pod:1660
9299 #: ../fish/guestfish-actions.pod:1662
9302 " initrd-cat initrdpath filename\n"
9307 #: ../fish/guestfish-actions.pod:1664 ../src/guestfs-actions.pod:2561
9309 "This command unpacks the file C<filename> from the initrd file called "
9310 "C<initrdpath>. The filename must be given I<without> the initial C</> "
9315 #: ../fish/guestfish-actions.pod:1668 ../src/guestfs-actions.pod:2565
9317 "For example, in guestfish you could use the following command to examine the "
9318 "boot script (usually called C</init>) contained in a Linux initrd or "
9323 #: ../fish/guestfish-actions.pod:1672 ../src/guestfs-actions.pod:2569
9326 " initrd-cat /boot/initrd-<version>.img init\n"
9331 #: ../fish/guestfish-actions.pod:1674
9332 msgid "See also L</initrd-list>."
9336 #: ../fish/guestfish-actions.pod:1679
9341 #: ../fish/guestfish-actions.pod:1681
9344 " initrd-list path\n"
9349 #: ../fish/guestfish-actions.pod:1683 ../src/guestfs-actions.pod:2588
9350 msgid "This command lists out files contained in an initrd."
9354 #: ../fish/guestfish-actions.pod:1685 ../src/guestfs-actions.pod:2590
9356 "The files are listed without any initial C</> character. The files are "
9357 "listed in the order they appear (not necessarily alphabetical). Directory "
9358 "names are listed as separate items."
9362 #: ../fish/guestfish-actions.pod:1689 ../src/guestfs-actions.pod:2594
9364 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
9365 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9370 #: ../fish/guestfish-actions.pod:1693
9371 msgid "inotify-add-watch"
9375 #: ../fish/guestfish-actions.pod:1695
9378 " inotify-add-watch path mask\n"
9383 #: ../fish/guestfish-actions.pod:1697 ../src/guestfs-actions.pod:2611
9384 msgid "Watch C<path> for the events listed in C<mask>."
9388 #: ../fish/guestfish-actions.pod:1699 ../src/guestfs-actions.pod:2613
9390 "Note that if C<path> is a directory then events within that directory are "
9391 "watched, but this does I<not> happen recursively (in subdirectories)."
9395 #: ../fish/guestfish-actions.pod:1703 ../src/guestfs-actions.pod:2617
9397 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9398 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9402 #: ../fish/guestfish-actions.pod:1707
9403 msgid "inotify-close"
9407 #: ../fish/guestfish-actions.pod:1709
9415 #: ../fish/guestfish-actions.pod:1711 ../src/guestfs-actions.pod:2630
9417 "This closes the inotify handle which was previously opened by inotify_init. "
9418 "It removes all watches, throws away any pending events, and deallocates all "
9423 #: ../fish/guestfish-actions.pod:1715
9424 msgid "inotify-files"
9428 #: ../fish/guestfish-actions.pod:1717
9436 #: ../fish/guestfish-actions.pod:1719
9438 "This function is a helpful wrapper around L</inotify-read> which just "
9439 "returns a list of pathnames of objects that were touched. The returned "
9440 "pathnames are sorted and deduplicated."
9444 #: ../fish/guestfish-actions.pod:1723
9445 msgid "inotify-init"
9449 #: ../fish/guestfish-actions.pod:1725
9452 " inotify-init maxevents\n"
9457 #: ../fish/guestfish-actions.pod:1727 ../src/guestfs-actions.pod:2659
9459 "This command creates a new inotify handle. The inotify subsystem can be "
9460 "used to notify events which happen to objects in the guest filesystem."
9464 #: ../fish/guestfish-actions.pod:1731
9466 "C<maxevents> is the maximum number of events which will be queued up between "
9467 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
9468 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
9469 "default was 16384 events. Beyond this limit, the kernel throws away events, "
9470 "but records the fact that it threw them away by setting a flag "
9471 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
9475 #: ../fish/guestfish-actions.pod:1741
9477 "Before any events are generated, you have to add some watches to the "
9478 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
9479 "L</inotify-watch-all>."
9483 #: ../fish/guestfish-actions.pod:1747
9485 "Queued up events should be read periodically by calling L</inotify-read> (or "
9486 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
9487 "If you don't read the events out often enough then you risk the internal "
9488 "queue overflowing."
9492 #: ../fish/guestfish-actions.pod:1754
9494 "The handle should be closed after use by calling L</inotify-close>. This "
9495 "also removes any watches automatically."
9499 #: ../fish/guestfish-actions.pod:1758 ../src/guestfs-actions.pod:2690
9501 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9502 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9503 "that there is one global inotify handle per libguestfs instance."
9507 #: ../fish/guestfish-actions.pod:1763
9508 msgid "inotify-read"
9512 #: ../fish/guestfish-actions.pod:1765
9520 #: ../fish/guestfish-actions.pod:1767 ../src/guestfs-actions.pod:2704
9522 "Return the complete queue of events that have happened since the previous "
9527 #: ../fish/guestfish-actions.pod:1770 ../src/guestfs-actions.pod:2707
9528 msgid "If no events have happened, this returns an empty list."
9532 #: ../fish/guestfish-actions.pod:1772 ../src/guestfs-actions.pod:2709
9534 "I<Note>: In order to make sure that all events have been read, you must call "
9535 "this function repeatedly until it returns an empty list. The reason is that "
9536 "the call will read events up to the maximum appliance-to-host message size "
9537 "and leave remaining events in the queue."
9541 #: ../fish/guestfish-actions.pod:1778
9542 msgid "inotify-rm-watch"
9546 #: ../fish/guestfish-actions.pod:1780
9549 " inotify-rm-watch wd\n"
9554 #: ../fish/guestfish-actions.pod:1782
9555 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
9559 #: ../fish/guestfish-actions.pod:1785
9560 msgid "inspect-get-arch"
9564 #: ../fish/guestfish-actions.pod:1787
9567 " inspect-get-arch root\n"
9572 #: ../fish/guestfish-actions.pod:1789
9574 "This returns the architecture of the inspected operating system. The "
9575 "possible return values are listed under L</file-architecture>."
9579 #: ../fish/guestfish-actions.pod:1793 ../src/guestfs-actions.pod:2744
9581 "If the architecture could not be determined, then the string C<unknown> is "
9586 #: ../fish/guestfish-actions.pod:1796 ../fish/guestfish-actions.pod:1891
9587 #: ../fish/guestfish-actions.pod:1970 ../fish/guestfish-actions.pod:1982
9588 #: ../fish/guestfish-actions.pod:2066 ../fish/guestfish-actions.pod:2128
9589 #: ../fish/guestfish-actions.pod:2149 ../fish/guestfish-actions.pod:2163
9590 #: ../fish/guestfish-actions.pod:2203 ../fish/guestfish-actions.pod:2239
9591 #: ../fish/guestfish-actions.pod:2252 ../fish/guestfish-actions.pod:2265
9592 #: ../fish/guestfish-actions.pod:2275 ../fish/guestfish-actions.pod:2285
9593 #: ../fish/guestfish-actions.pod:2297 ../fish/guestfish-actions.pod:2393
9594 #: ../fish/guestfish-actions.pod:2427 ../src/guestfs-actions.pod:2747
9595 #: ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2953
9596 #: ../src/guestfs-actions.pod:2972 ../src/guestfs-actions.pod:3103
9597 #: ../src/guestfs-actions.pod:3187 ../src/guestfs-actions.pod:3215
9598 #: ../src/guestfs-actions.pod:3236 ../src/guestfs-actions.pod:3289
9599 #: ../src/guestfs-actions.pod:3333 ../src/guestfs-actions.pod:3353
9600 #: ../src/guestfs-actions.pod:3373 ../src/guestfs-actions.pod:3390
9601 #: ../src/guestfs-actions.pod:3406 ../src/guestfs-actions.pod:3424
9602 #: ../src/guestfs-actions.pod:3526 ../src/guestfs-actions.pod:3567
9603 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9607 #: ../fish/guestfish-actions.pod:1798
9608 msgid "inspect-get-distro"
9612 #: ../fish/guestfish-actions.pod:1800
9615 " inspect-get-distro root\n"
9620 #: ../fish/guestfish-actions.pod:1802 ../src/guestfs-actions.pod:2760
9622 "This returns the distro (distribution) of the inspected operating system."
9626 #: ../fish/guestfish-actions.pod:1805 ../src/guestfs-actions.pod:2763
9627 msgid "Currently defined distros are:"
9631 #: ../fish/guestfish-actions.pod:1809 ../src/guestfs-actions.pod:2767
9632 msgid "\"archlinux\""
9636 #: ../fish/guestfish-actions.pod:1811 ../src/guestfs-actions.pod:2769
9641 #: ../fish/guestfish-actions.pod:1813 ../src/guestfs-actions.pod:2771
9646 #: ../fish/guestfish-actions.pod:1815 ../src/guestfs-actions.pod:2773
9651 #: ../fish/guestfish-actions.pod:1817 ../src/guestfs-actions.pod:2775
9656 #: ../fish/guestfish-actions.pod:1819 ../src/guestfs-actions.pod:2777
9661 #: ../fish/guestfish-actions.pod:1821 ../src/guestfs-actions.pod:2779
9666 #: ../fish/guestfish-actions.pod:1823 ../src/guestfs-actions.pod:2781
9671 #: ../fish/guestfish-actions.pod:1825 ../src/guestfs-actions.pod:2783
9676 #: ../fish/guestfish-actions.pod:1827 ../src/guestfs-actions.pod:2785
9681 #: ../fish/guestfish-actions.pod:1829 ../src/guestfs-actions.pod:2787
9682 msgid "\"linuxmint\""
9686 #: ../fish/guestfish-actions.pod:1831 ../src/guestfs-actions.pod:2789
9691 #: ../fish/guestfish-actions.pod:1833 ../src/guestfs-actions.pod:2791
9696 #: ../fish/guestfish-actions.pod:1835 ../src/guestfs-actions.pod:2793
9701 #: ../fish/guestfish-actions.pod:1837 ../src/guestfs-actions.pod:2795
9702 msgid "\"mandriva\""
9706 #: ../fish/guestfish-actions.pod:1839 ../src/guestfs-actions.pod:2797
9711 #: ../fish/guestfish-actions.pod:1841 ../src/guestfs-actions.pod:2799
9716 #: ../fish/guestfish-actions.pod:1843 ../src/guestfs-actions.pod:2801
9721 #: ../fish/guestfish-actions.pod:1845 ../src/guestfs-actions.pod:2803
9722 msgid "\"opensuse\""
9726 #: ../fish/guestfish-actions.pod:1847 ../src/guestfs-actions.pod:2805
9731 #: ../fish/guestfish-actions.pod:1849 ../src/guestfs-actions.pod:2807
9736 #: ../fish/guestfish-actions.pod:1851 ../src/guestfs-actions.pod:2809
9741 #: ../fish/guestfish-actions.pod:1853 ../src/guestfs-actions.pod:2811
9742 msgid "\"redhat-based\""
9746 #: ../fish/guestfish-actions.pod:1855 ../src/guestfs-actions.pod:2813
9747 msgid "Some Red Hat-derived distro."
9751 #: ../fish/guestfish-actions.pod:1857 ../src/guestfs-actions.pod:2815
9756 #: ../fish/guestfish-actions.pod:1859 ../src/guestfs-actions.pod:2817
9757 msgid "Red Hat Enterprise Linux."
9761 #: ../fish/guestfish-actions.pod:1861 ../src/guestfs-actions.pod:2819
9762 msgid "\"scientificlinux\""
9766 #: ../fish/guestfish-actions.pod:1863 ../src/guestfs-actions.pod:2821
9767 msgid "Scientific Linux."
9771 #: ../fish/guestfish-actions.pod:1865 ../src/guestfs-actions.pod:2823
9772 msgid "\"slackware\""
9776 #: ../fish/guestfish-actions.pod:1867 ../src/guestfs-actions.pod:2825
9781 #: ../fish/guestfish-actions.pod:1869 ../src/guestfs-actions.pod:2827
9782 msgid "\"ttylinux\""
9786 #: ../fish/guestfish-actions.pod:1871 ../src/guestfs-actions.pod:2829
9791 #: ../fish/guestfish-actions.pod:1873 ../src/guestfs-actions.pod:2831
9796 #: ../fish/guestfish-actions.pod:1875 ../src/guestfs-actions.pod:2833
9801 #: ../fish/guestfish-actions.pod:1877 ../fish/guestfish-actions.pod:1961
9802 #: ../fish/guestfish-actions.pod:2230 ../src/guestfs-actions.pod:2835
9803 #: ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:3324
9808 #: ../fish/guestfish-actions.pod:1879 ../src/guestfs-actions.pod:2837
9809 msgid "The distro could not be determined."
9813 #: ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:2218
9814 #: ../src/guestfs-actions.pod:2839 ../src/guestfs-actions.pod:3312
9819 #: ../fish/guestfish-actions.pod:1883 ../src/guestfs-actions.pod:2841
9821 "Windows does not have distributions. This string is returned if the OS type "
9826 #: ../fish/guestfish-actions.pod:1888 ../fish/guestfish-actions.pod:1967
9827 #: ../fish/guestfish-actions.pod:2236 ../src/guestfs-actions.pod:2846
9828 #: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:3330
9830 "Future versions of libguestfs may return other strings here. The caller "
9831 "should be prepared to handle any string."
9835 #: ../fish/guestfish-actions.pod:1893
9836 msgid "inspect-get-drive-mappings"
9840 #: ../fish/guestfish-actions.pod:1895
9843 " inspect-get-drive-mappings root\n"
9848 #: ../fish/guestfish-actions.pod:1897 ../src/guestfs-actions.pod:2862
9850 "This call is useful for Windows which uses a primitive system of assigning "
9851 "drive letters (like \"C:\") to partitions. This inspection API examines the "
9852 "Windows Registry to find out how disks/partitions are mapped to drive "
9853 "letters, and returns a hash table as in the example below:"
9857 #: ../fish/guestfish-actions.pod:1903 ../src/guestfs-actions.pod:2868
9867 #: ../fish/guestfish-actions.pod:1907 ../src/guestfs-actions.pod:2872
9869 "Note that keys are drive letters. For Windows, the key is case insensitive "
9870 "and just contains the drive letter, without the customary colon separator "
9875 #: ../fish/guestfish-actions.pod:1911 ../src/guestfs-actions.pod:2876
9877 "In future we may support other operating systems that also used drive "
9878 "letters, but the keys for those might not be case insensitive and might be "
9879 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
9884 #: ../fish/guestfish-actions.pod:1916 ../src/guestfs-actions.pod:2881
9886 "For Windows guests, currently only hard drive mappings are returned. "
9887 "Removable disks (eg. DVD-ROMs) are ignored."
9891 #: ../fish/guestfish-actions.pod:1919 ../src/guestfs-actions.pod:2884
9893 "For guests that do not use drive mappings, or if the drive mappings could "
9894 "not be determined, this returns an empty hash table."
9898 #: ../fish/guestfish-actions.pod:1922
9900 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
9901 "get-mountpoints>, L</inspect-get-filesystems>."
9905 #: ../fish/guestfish-actions.pod:1926
9906 msgid "inspect-get-filesystems"
9910 #: ../fish/guestfish-actions.pod:1928
9913 " inspect-get-filesystems root\n"
9918 #: ../fish/guestfish-actions.pod:1930 ../src/guestfs-actions.pod:2905
9920 "This returns a list of all the filesystems that we think are associated with "
9921 "this operating system. This includes the root filesystem, other ordinary "
9922 "filesystems, and non-mounted devices like swap partitions."
9926 #: ../fish/guestfish-actions.pod:1935 ../src/guestfs-actions.pod:2910
9928 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
9929 "to be shared between operating systems."
9933 #: ../fish/guestfish-actions.pod:1938
9935 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
9940 #: ../fish/guestfish-actions.pod:1941
9941 msgid "inspect-get-format"
9945 #: ../fish/guestfish-actions.pod:1943
9948 " inspect-get-format root\n"
9953 #: ../fish/guestfish-actions.pod:1945 ../src/guestfs-actions.pod:2928
9955 "This returns the format of the inspected operating system. You can use it "
9956 "to detect install images, live CDs and similar."
9960 #: ../fish/guestfish-actions.pod:1948 ../src/guestfs-actions.pod:2931
9961 msgid "Currently defined formats are:"
9965 #: ../fish/guestfish-actions.pod:1952 ../src/guestfs-actions.pod:2935
9966 msgid "\"installed\""
9970 #: ../fish/guestfish-actions.pod:1954 ../src/guestfs-actions.pod:2937
9971 msgid "This is an installed operating system."
9975 #: ../fish/guestfish-actions.pod:1956 ../src/guestfs-actions.pod:2939
9976 msgid "\"installer\""
9980 #: ../fish/guestfish-actions.pod:1958 ../src/guestfs-actions.pod:2941
9982 "The disk image being inspected is not an installed operating system, but a "
9983 "I<bootable> install disk, live CD, or similar."
9987 #: ../fish/guestfish-actions.pod:1963 ../src/guestfs-actions.pod:2946
9988 msgid "The format of this disk image is not known."
9992 #: ../fish/guestfish-actions.pod:1972
9993 msgid "inspect-get-hostname"
9997 #: ../fish/guestfish-actions.pod:1974
10000 " inspect-get-hostname root\n"
10005 #: ../fish/guestfish-actions.pod:1976 ../src/guestfs-actions.pod:2966
10007 "This function returns the hostname of the operating system as found by "
10008 "inspection of the guest's configuration files."
10012 #: ../fish/guestfish-actions.pod:1979 ../src/guestfs-actions.pod:2969
10014 "If the hostname could not be determined, then the string C<unknown> is "
10019 #: ../fish/guestfish-actions.pod:1984
10020 msgid "inspect-get-icon"
10024 #: ../fish/guestfish-actions.pod:1986
10027 " inspect-get-icon root [favicon:..] [highquality:..]\n"
10032 #: ../fish/guestfish-actions.pod:1988 ../src/guestfs-actions.pod:2995
10034 "This function returns an icon corresponding to the inspected operating "
10035 "system. The icon is returned as a buffer containing a PNG image (re-encoded "
10036 "to PNG if necessary)."
10040 #: ../fish/guestfish-actions.pod:1992 ../src/guestfs-actions.pod:2999
10042 "If it was not possible to get an icon this function returns a zero-length "
10043 "(non-NULL) buffer. I<Callers must check for this case>."
10047 #: ../fish/guestfish-actions.pod:1995 ../src/guestfs-actions.pod:3002
10049 "Libguestfs will start by looking for a file called C</etc/favicon.png> or "
10050 "C<C:\\etc\\favicon.png> and if it has the correct format, the contents of "
10051 "this file will be returned. You can disable favicons by passing the "
10052 "optional C<favicon> boolean as false (default is true)."
10056 #: ../fish/guestfish-actions.pod:2001 ../src/guestfs-actions.pod:3008
10058 "If finding the favicon fails, then we look in other places in the guest for "
10063 #: ../fish/guestfish-actions.pod:2004 ../src/guestfs-actions.pod:3011
10065 "If the optional C<highquality> boolean is true then only high quality icons "
10066 "are returned, which means only icons of high resolution with an alpha "
10067 "channel. The default (false) is to return any icon we can, even if it is of "
10068 "substandard quality."
10072 #: ../fish/guestfish-actions.pod:2015 ../src/guestfs-actions.pod:3022
10074 "Unlike most other inspection API calls, the guest's disks must be mounted up "
10075 "before you call this, since it needs to read information from the guest "
10076 "filesystem during the call."
10080 #: ../fish/guestfish-actions.pod:2021 ../src/guestfs-actions.pod:3028
10082 "B<Security:> The icon data comes from the untrusted guest, and should be "
10083 "treated with caution. PNG files have been known to contain exploits. "
10084 "Ensure that libpng (or other relevant libraries) are fully up to date before "
10085 "trying to process or display the icon."
10089 #: ../fish/guestfish-actions.pod:2029 ../src/guestfs-actions.pod:3036
10091 "The PNG image returned can be any size. It might not be square. Libguestfs "
10092 "tries to return the largest, highest quality icon available. The "
10093 "application must scale the icon to the required size."
10097 #: ../fish/guestfish-actions.pod:2036 ../src/guestfs-actions.pod:3043
10099 "Extracting icons from Windows guests requires the external C<wrestool> "
10100 "program from the C<icoutils> package, and several programs (C<bmptopnm>, "
10101 "C<pnmtopng>, C<pamcut>) from the C<netpbm> package. These must be "
10102 "installed separately."
10106 #: ../fish/guestfish-actions.pod:2043 ../src/guestfs-actions.pod:3050
10108 "Operating system icons are usually trademarks. Seek legal advice before "
10109 "using trademarks in applications."
10113 #: ../fish/guestfish-actions.pod:2050
10114 msgid "inspect-get-major-version"
10118 #: ../fish/guestfish-actions.pod:2052
10121 " inspect-get-major-version root\n"
10126 #: ../fish/guestfish-actions.pod:2054 ../src/guestfs-actions.pod:3091
10128 "This returns the major version number of the inspected operating system."
10132 #: ../fish/guestfish-actions.pod:2057 ../src/guestfs-actions.pod:3094
10134 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10135 "popular public names used by the operating system. Notably the operating "
10136 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10137 "1). You can find out the real versions corresponding to releases of Windows "
10138 "by consulting Wikipedia or MSDN."
10142 #: ../fish/guestfish-actions.pod:2064 ../fish/guestfish-actions.pod:2075
10143 #: ../src/guestfs-actions.pod:3101 ../src/guestfs-actions.pod:3118
10144 msgid "If the version could not be determined, then C<0> is returned."
10148 #: ../fish/guestfish-actions.pod:2068
10149 msgid "inspect-get-minor-version"
10153 #: ../fish/guestfish-actions.pod:2070
10156 " inspect-get-minor-version root\n"
10161 #: ../fish/guestfish-actions.pod:2072 ../src/guestfs-actions.pod:3115
10163 "This returns the minor version number of the inspected operating system."
10167 #: ../fish/guestfish-actions.pod:2077
10169 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10170 "get-major-version>."
10174 #: ../fish/guestfish-actions.pod:2080
10175 msgid "inspect-get-mountpoints"
10179 #: ../fish/guestfish-actions.pod:2082
10182 " inspect-get-mountpoints root\n"
10187 #: ../fish/guestfish-actions.pod:2084 ../src/guestfs-actions.pod:3133
10189 "This returns a hash of where we think the filesystems associated with this "
10190 "operating system should be mounted. Callers should note that this is at "
10191 "best an educated guess made by reading configuration files such as C</etc/"
10192 "fstab>. I<In particular note> that this may return filesystems which are "
10193 "non-existent or not mountable and callers should be prepared to handle or "
10194 "ignore failures if they try to mount them."
10198 #: ../fish/guestfish-actions.pod:2093 ../src/guestfs-actions.pod:3142
10200 "Each element in the returned hashtable has a key which is the path of the "
10201 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
10202 "mounted there (eg. C</dev/sda1>)."
10206 #: ../fish/guestfish-actions.pod:2098 ../src/guestfs-actions.pod:3147
10208 "Non-mounted devices such as swap devices are I<not> returned in this list."
10212 #: ../fish/guestfish-actions.pod:2101
10214 "For operating systems like Windows which still use drive letters, this call "
10215 "will only return an entry for the first drive \"mounted on\" C</>. For "
10216 "information about the mapping of drive letters to partitions, see L</inspect-"
10217 "get-drive-mappings>."
10221 #: ../fish/guestfish-actions.pod:2107
10223 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10224 "get-filesystems>."
10228 #: ../fish/guestfish-actions.pod:2110
10229 msgid "inspect-get-package-format"
10233 #: ../fish/guestfish-actions.pod:2112
10236 " inspect-get-package-format root\n"
10241 #: ../fish/guestfish-actions.pod:2114
10243 "This function and L</inspect-get-package-management> return the package "
10244 "format and package management tool used by the inspected operating system. "
10245 "For example for Fedora these functions would return C<rpm> (package format) "
10246 "and C<yum> (package management)."
10250 #: ../fish/guestfish-actions.pod:2120 ../src/guestfs-actions.pod:3179
10252 "This returns the string C<unknown> if we could not determine the package "
10253 "format I<or> if the operating system does not have a real packaging system "
10258 #: ../fish/guestfish-actions.pod:2124 ../src/guestfs-actions.pod:3183
10260 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>, "
10261 "C<pkgsrc>. Future versions of libguestfs may return other strings."
10265 #: ../fish/guestfish-actions.pod:2130
10266 msgid "inspect-get-package-management"
10270 #: ../fish/guestfish-actions.pod:2132
10273 " inspect-get-package-management root\n"
10278 #: ../fish/guestfish-actions.pod:2134
10280 "L</inspect-get-package-format> and this function return the package format "
10281 "and package management tool used by the inspected operating system. For "
10282 "example for Fedora these functions would return C<rpm> (package format) and "
10283 "C<yum> (package management)."
10287 #: ../fish/guestfish-actions.pod:2140 ../src/guestfs-actions.pod:3206
10289 "This returns the string C<unknown> if we could not determine the package "
10290 "management tool I<or> if the operating system does not have a real packaging "
10291 "system (eg. Windows)."
10295 #: ../fish/guestfish-actions.pod:2144 ../src/guestfs-actions.pod:3210
10297 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
10298 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>, C<zypper>. Future "
10299 "versions of libguestfs may return other strings."
10303 #: ../fish/guestfish-actions.pod:2151
10304 msgid "inspect-get-product-name"
10308 #: ../fish/guestfish-actions.pod:2153
10311 " inspect-get-product-name root\n"
10316 #: ../fish/guestfish-actions.pod:2155 ../src/guestfs-actions.pod:3228
10318 "This returns the product name of the inspected operating system. The "
10319 "product name is generally some freeform string which can be displayed to the "
10320 "user, but should not be parsed by programs."
10324 #: ../fish/guestfish-actions.pod:2160 ../src/guestfs-actions.pod:3233
10326 "If the product name could not be determined, then the string C<unknown> is "
10331 #: ../fish/guestfish-actions.pod:2165
10332 msgid "inspect-get-product-variant"
10336 #: ../fish/guestfish-actions.pod:2167
10339 " inspect-get-product-variant root\n"
10344 #: ../fish/guestfish-actions.pod:2169 ../src/guestfs-actions.pod:3249
10345 msgid "This returns the product variant of the inspected operating system."
10349 #: ../fish/guestfish-actions.pod:2172 ../src/guestfs-actions.pod:3252
10351 "For Windows guests, this returns the contents of the Registry key C<HKLM"
10352 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
10353 "is usually a string such as C<Client> or C<Server> (other values are "
10354 "possible). This can be used to distinguish consumer and enterprise versions "
10355 "of Windows that have the same version number (for example, Windows 7 and "
10356 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
10357 "the latter is C<Server>)."
10361 #: ../fish/guestfish-actions.pod:2181 ../src/guestfs-actions.pod:3261
10363 "For enterprise Linux guests, in future we intend this to return the product "
10364 "variant such as C<Desktop>, C<Server> and so on. But this is not "
10365 "implemented at present."
10369 #: ../fish/guestfish-actions.pod:2185 ../src/guestfs-actions.pod:3265
10371 "If the product variant could not be determined, then the string C<unknown> "
10376 #: ../fish/guestfish-actions.pod:2188
10378 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
10379 "get-product-name>, L</inspect-get-major-version>."
10383 #: ../fish/guestfish-actions.pod:2192
10384 msgid "inspect-get-roots"
10388 #: ../fish/guestfish-actions.pod:2194
10391 " inspect-get-roots\n"
10396 #: ../fish/guestfish-actions.pod:2196
10398 "This function is a convenient way to get the list of root devices, as "
10399 "returned from a previous call to L</inspect-os>, but without redoing the "
10400 "whole inspection process."
10404 #: ../fish/guestfish-actions.pod:2200
10406 "This returns an empty list if either no root devices were found or the "
10407 "caller has not called L</inspect-os>."
10411 #: ../fish/guestfish-actions.pod:2205
10412 msgid "inspect-get-type"
10416 #: ../fish/guestfish-actions.pod:2207
10419 " inspect-get-type root\n"
10424 #: ../fish/guestfish-actions.pod:2209 ../src/guestfs-actions.pod:3303
10426 "This returns the type of the inspected operating system. Currently defined "
10431 #: ../fish/guestfish-actions.pod:2214 ../src/guestfs-actions.pod:3308
10436 #: ../fish/guestfish-actions.pod:2216 ../src/guestfs-actions.pod:3310
10437 msgid "Any Linux-based operating system."
10441 #: ../fish/guestfish-actions.pod:2220 ../src/guestfs-actions.pod:3314
10442 msgid "Any Microsoft Windows operating system."
10446 #: ../fish/guestfish-actions.pod:2222 ../src/guestfs-actions.pod:3316
10447 msgid "\"freebsd\""
10451 #: ../fish/guestfish-actions.pod:2224 ../src/guestfs-actions.pod:3318
10456 #: ../fish/guestfish-actions.pod:2226 ../src/guestfs-actions.pod:3320
10461 #: ../fish/guestfish-actions.pod:2228 ../src/guestfs-actions.pod:3322
10466 #: ../fish/guestfish-actions.pod:2232 ../src/guestfs-actions.pod:3326
10467 msgid "The operating system type could not be determined."
10471 #: ../fish/guestfish-actions.pod:2241
10472 msgid "inspect-get-windows-current-control-set"
10476 #: ../fish/guestfish-actions.pod:2243
10479 " inspect-get-windows-current-control-set root\n"
10484 #: ../fish/guestfish-actions.pod:2245 ../src/guestfs-actions.pod:3346
10486 "This returns the Windows CurrentControlSet of the inspected guest. The "
10487 "CurrentControlSet is a registry key name such as C<ControlSet001>."
10491 #: ../fish/guestfish-actions.pod:2248 ../src/guestfs-actions.pod:3349
10493 "This call assumes that the guest is Windows and that the Registry could be "
10494 "examined by inspection. If this is not the case then an error is returned."
10498 #: ../fish/guestfish-actions.pod:2254
10499 msgid "inspect-get-windows-systemroot"
10503 #: ../fish/guestfish-actions.pod:2256
10506 " inspect-get-windows-systemroot root\n"
10511 #: ../fish/guestfish-actions.pod:2258 ../src/guestfs-actions.pod:3366
10513 "This returns the Windows systemroot of the inspected guest. The systemroot "
10514 "is a directory path such as C</WINDOWS>."
10518 #: ../fish/guestfish-actions.pod:2261 ../src/guestfs-actions.pod:3369
10520 "This call assumes that the guest is Windows and that the systemroot could be "
10521 "determined by inspection. If this is not the case then an error is returned."
10525 #: ../fish/guestfish-actions.pod:2267
10526 msgid "inspect-is-live"
10530 #: ../fish/guestfish-actions.pod:2269
10533 " inspect-is-live root\n"
10538 #: ../fish/guestfish-actions.pod:2271
10540 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10541 "then this returns true if a live image was detected on the disk."
10545 #: ../fish/guestfish-actions.pod:2277
10546 msgid "inspect-is-multipart"
10550 #: ../fish/guestfish-actions.pod:2279
10553 " inspect-is-multipart root\n"
10558 #: ../fish/guestfish-actions.pod:2281
10560 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10561 "then this returns true if the disk is part of a set."
10565 #: ../fish/guestfish-actions.pod:2287
10566 msgid "inspect-is-netinst"
10570 #: ../fish/guestfish-actions.pod:2289
10573 " inspect-is-netinst root\n"
10578 #: ../fish/guestfish-actions.pod:2291
10580 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
10581 "then this returns true if the disk is a network installer, ie. not a self-"
10582 "contained install CD but one which is likely to require network access to "
10583 "complete the install."
10587 #: ../fish/guestfish-actions.pod:2299
10588 msgid "inspect-list-applications"
10592 #: ../fish/guestfish-actions.pod:2301
10595 " inspect-list-applications root\n"
10600 #: ../fish/guestfish-actions.pod:2303 ../src/guestfs-actions.pod:3436
10601 msgid "Return the list of applications installed in the operating system."
10605 #: ../fish/guestfish-actions.pod:2305
10607 "I<Note:> This call works differently from other parts of the inspection "
10608 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
10609 "then mount up the disks, before calling this. Listing applications is a "
10610 "significantly more difficult operation which requires access to the full "
10611 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
10612 "are just returning data cached in the libguestfs handle, this call actually "
10613 "reads parts of the mounted filesystems during the call."
10617 #: ../fish/guestfish-actions.pod:2315 ../src/guestfs-actions.pod:3448
10619 "This returns an empty list if the inspection code was not able to determine "
10620 "the list of applications."
10624 #: ../fish/guestfish-actions.pod:2318 ../src/guestfs-actions.pod:3451
10625 msgid "The application structure contains the following fields:"
10629 #: ../fish/guestfish-actions.pod:2322 ../src/guestfs-actions.pod:3455
10630 msgid "C<app_name>"
10634 #: ../fish/guestfish-actions.pod:2324 ../src/guestfs-actions.pod:3457
10636 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10637 "guests, this is the package name."
10641 #: ../fish/guestfish-actions.pod:2327 ../src/guestfs-actions.pod:3460
10642 msgid "C<app_display_name>"
10646 #: ../fish/guestfish-actions.pod:2329 ../src/guestfs-actions.pod:3462
10648 "The display name of the application, sometimes localized to the install "
10649 "language of the guest operating system."
10653 #: ../fish/guestfish-actions.pod:2332 ../src/guestfs-actions.pod:3465
10655 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10656 "to display something can use C<app_name> instead."
10660 #: ../fish/guestfish-actions.pod:2335 ../src/guestfs-actions.pod:3468
10661 msgid "C<app_epoch>"
10665 #: ../fish/guestfish-actions.pod:2337 ../src/guestfs-actions.pod:3470
10667 "For package managers which use epochs, this contains the epoch of the "
10668 "package (an integer). If unavailable, this is returned as C<0>."
10672 #: ../fish/guestfish-actions.pod:2340 ../src/guestfs-actions.pod:3473
10673 msgid "C<app_version>"
10677 #: ../fish/guestfish-actions.pod:2342 ../src/guestfs-actions.pod:3475
10679 "The version string of the application or package. If unavailable this is "
10680 "returned as an empty string C<\"\">."
10684 #: ../fish/guestfish-actions.pod:2345 ../src/guestfs-actions.pod:3478
10685 msgid "C<app_release>"
10689 #: ../fish/guestfish-actions.pod:2347 ../src/guestfs-actions.pod:3480
10691 "The release string of the application or package, for package managers that "
10692 "use this. If unavailable this is returned as an empty string C<\"\">."
10696 #: ../fish/guestfish-actions.pod:2351 ../src/guestfs-actions.pod:3484
10697 msgid "C<app_install_path>"
10701 #: ../fish/guestfish-actions.pod:2353 ../src/guestfs-actions.pod:3486
10703 "The installation path of the application (on operating systems such as "
10704 "Windows which use installation paths). This path is in the format used by "
10705 "the guest operating system, it is not a libguestfs path."
10709 #: ../fish/guestfish-actions.pod:2358 ../src/guestfs-actions.pod:3491
10710 msgid "If unavailable this is returned as an empty string C<\"\">."
10714 #: ../fish/guestfish-actions.pod:2360 ../src/guestfs-actions.pod:3493
10715 msgid "C<app_trans_path>"
10719 #: ../fish/guestfish-actions.pod:2362 ../src/guestfs-actions.pod:3495
10721 "The install path translated into a libguestfs path. If unavailable this is "
10722 "returned as an empty string C<\"\">."
10726 #: ../fish/guestfish-actions.pod:2365 ../src/guestfs-actions.pod:3498
10727 msgid "C<app_publisher>"
10731 #: ../fish/guestfish-actions.pod:2367 ../src/guestfs-actions.pod:3500
10733 "The name of the publisher of the application, for package managers that use "
10734 "this. If unavailable this is returned as an empty string C<\"\">."
10738 #: ../fish/guestfish-actions.pod:2371 ../src/guestfs-actions.pod:3504
10743 #: ../fish/guestfish-actions.pod:2373 ../src/guestfs-actions.pod:3506
10745 "The URL (eg. upstream URL) of the application. If unavailable this is "
10746 "returned as an empty string C<\"\">."
10750 #: ../fish/guestfish-actions.pod:2376 ../src/guestfs-actions.pod:3509
10751 msgid "C<app_source_package>"
10755 #: ../fish/guestfish-actions.pod:2378 ../src/guestfs-actions.pod:3511
10757 "For packaging systems which support this, the name of the source package. "
10758 "If unavailable this is returned as an empty string C<\"\">."
10762 #: ../fish/guestfish-actions.pod:2381 ../src/guestfs-actions.pod:3514
10763 msgid "C<app_summary>"
10767 #: ../fish/guestfish-actions.pod:2383 ../src/guestfs-actions.pod:3516
10769 "A short (usually one line) description of the application or package. If "
10770 "unavailable this is returned as an empty string C<\"\">."
10774 #: ../fish/guestfish-actions.pod:2386 ../src/guestfs-actions.pod:3519
10775 msgid "C<app_description>"
10779 #: ../fish/guestfish-actions.pod:2388 ../src/guestfs-actions.pod:3521
10781 "A longer description of the application or package. If unavailable this is "
10782 "returned as an empty string C<\"\">."
10786 #: ../fish/guestfish-actions.pod:2395
10791 #: ../fish/guestfish-actions.pod:2397
10799 #: ../fish/guestfish-actions.pod:2399 ../src/guestfs-actions.pod:3539
10801 "This function uses other libguestfs functions and certain heuristics to "
10802 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
10803 "for operating systems."
10807 #: ../fish/guestfish-actions.pod:2403 ../src/guestfs-actions.pod:3543
10808 msgid "The list returned is empty if no operating systems were found."
10812 #: ../fish/guestfish-actions.pod:2405 ../src/guestfs-actions.pod:3545
10814 "If one operating system was found, then this returns a list with a single "
10815 "element, which is the name of the root filesystem of this operating system. "
10816 "It is also possible for this function to return a list containing more than "
10817 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
10818 "element being the root filesystem of one of the operating systems."
10822 #: ../fish/guestfish-actions.pod:2412
10824 "You can pass the root string(s) returned to other L</inspect-get-*> "
10825 "functions in order to query further information about each operating system, "
10826 "such as the name and version."
10830 #: ../fish/guestfish-actions.pod:2417
10832 "This function uses other libguestfs features such as L</mount-ro> and L</"
10833 "umount-all> in order to mount and unmount filesystems and look at the "
10834 "contents. This should be called with no disks currently mounted. The "
10835 "function may also use Augeas, so any existing Augeas handle will be closed."
10839 #: ../fish/guestfish-actions.pod:2423 ../src/guestfs-actions.pod:3563
10841 "This function cannot decrypt encrypted disks. The caller must do that first "
10842 "(supplying the necessary keys) if the disk is encrypted."
10846 #: ../fish/guestfish-actions.pod:2429 ../fish/guestfish-actions.pod:2627
10847 #: ../fish/guestfish-actions.pod:2686
10848 msgid "See also L</list-filesystems>."
10852 #: ../fish/guestfish-actions.pod:2431
10853 msgid "is-blockdev"
10857 #: ../fish/guestfish-actions.pod:2433
10860 " is-blockdev path\n"
10865 #: ../fish/guestfish-actions.pod:2435 ../src/guestfs-actions.pod:3583
10867 "This returns C<true> if and only if there is a block device with the given "
10872 #: ../fish/guestfish-actions.pod:2438 ../fish/guestfish-actions.pod:2456
10873 #: ../fish/guestfish-actions.pod:2475 ../fish/guestfish-actions.pod:2484
10874 #: ../fish/guestfish-actions.pod:2494 ../fish/guestfish-actions.pod:2528
10875 #: ../fish/guestfish-actions.pod:2537
10876 msgid "See also L</stat>."
10880 #: ../fish/guestfish-actions.pod:2440
10885 #: ../fish/guestfish-actions.pod:2442
10893 #: ../fish/guestfish-actions.pod:2444 ../src/guestfs-actions.pod:3597
10895 "This returns true iff this handle is busy processing a command (in the "
10900 #: ../fish/guestfish-actions.pod:2449
10905 #: ../fish/guestfish-actions.pod:2451
10908 " is-chardev path\n"
10913 #: ../fish/guestfish-actions.pod:2453 ../src/guestfs-actions.pod:3612
10915 "This returns C<true> if and only if there is a character device with the "
10916 "given C<path> name."
10920 #: ../fish/guestfish-actions.pod:2458
10925 #: ../fish/guestfish-actions.pod:2460
10933 #: ../fish/guestfish-actions.pod:2462 ../src/guestfs-actions.pod:3626
10935 "This returns true iff this handle is being configured (in the C<CONFIG> "
10940 #: ../fish/guestfish-actions.pod:2467
10945 #: ../fish/guestfish-actions.pod:2469
10953 #: ../fish/guestfish-actions.pod:2471 ../src/guestfs-actions.pod:3641
10955 "This returns C<true> if and only if there is a directory with the given "
10956 "C<path> name. Note that it returns false for other objects like files."
10960 #: ../fish/guestfish-actions.pod:2477
10965 #: ../fish/guestfish-actions.pod:2479
10973 #: ../fish/guestfish-actions.pod:2481 ../src/guestfs-actions.pod:3657
10975 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
10976 "given C<path> name."
10980 #: ../fish/guestfish-actions.pod:2486
10985 #: ../fish/guestfish-actions.pod:2488
10993 #: ../fish/guestfish-actions.pod:2490 ../src/guestfs-actions.pod:3672
10995 "This returns C<true> if and only if there is a regular file with the given "
10996 "C<path> name. Note that it returns false for other objects like directories."
11000 #: ../fish/guestfish-actions.pod:2496
11001 msgid "is-launching"
11005 #: ../fish/guestfish-actions.pod:2498
11013 #: ../fish/guestfish-actions.pod:2500 ../src/guestfs-actions.pod:3687
11015 "This returns true iff this handle is launching the subprocess (in the "
11016 "C<LAUNCHING> state)."
11020 #: ../fish/guestfish-actions.pod:2505
11025 #: ../fish/guestfish-actions.pod:2507
11033 #: ../fish/guestfish-actions.pod:2509 ../src/guestfs-actions.pod:3702
11035 "This command tests whether C<device> is a logical volume, and returns true "
11036 "iff this is the case."
11040 #: ../fish/guestfish-actions.pod:2512
11045 #: ../fish/guestfish-actions.pod:2514
11053 #: ../fish/guestfish-actions.pod:2516 ../src/guestfs-actions.pod:3714
11055 "This returns true iff this handle is ready to accept commands (in the "
11060 #: ../fish/guestfish-actions.pod:2521
11065 #: ../fish/guestfish-actions.pod:2523
11068 " is-socket path\n"
11073 #: ../fish/guestfish-actions.pod:2525 ../src/guestfs-actions.pod:3729
11075 "This returns C<true> if and only if there is a Unix domain socket with the "
11076 "given C<path> name."
11080 #: ../fish/guestfish-actions.pod:2530
11085 #: ../fish/guestfish-actions.pod:2532
11088 " is-symlink path\n"
11093 #: ../fish/guestfish-actions.pod:2534 ../src/guestfs-actions.pod:3744
11095 "This returns C<true> if and only if there is a symbolic link with the given "
11100 #: ../fish/guestfish-actions.pod:2539
11105 #: ../fish/guestfish-actions.pod:2541
11113 #: ../fish/guestfish-actions.pod:2543 ../src/guestfs-actions.pod:3759
11115 "This returns true iff the file exists and the file is empty or it contains "
11120 #: ../fish/guestfish-actions.pod:2546
11121 msgid "is-zero-device"
11125 #: ../fish/guestfish-actions.pod:2548
11128 " is-zero-device device\n"
11133 #: ../fish/guestfish-actions.pod:2550 ../src/guestfs-actions.pod:3772
11134 msgid "This returns true iff the device exists and contains all zero bytes."
11138 #: ../fish/guestfish-actions.pod:2552 ../src/guestfs-actions.pod:3774
11139 msgid "Note that for large devices this can take a long time to run."
11143 #: ../fish/guestfish-actions.pod:2554
11144 msgid "kill-subprocess"
11148 #: ../fish/guestfish-actions.pod:2556
11151 " kill-subprocess\n"
11156 #: ../fish/guestfish-actions.pod:2558 ../src/guestfs-actions.pod:3785
11157 msgid "This kills the qemu subprocess. You should never need to call this."
11161 #: ../fish/guestfish-actions.pod:2560
11166 #: ../fish/guestfish-actions.pod:2562
11171 #: ../fish/guestfish-actions.pod:2564
11179 #: ../fish/guestfish-actions.pod:2566 ../src/guestfs-actions.pod:3796
11181 "Internally libguestfs is implemented by running a virtual machine using "
11186 #: ../fish/guestfish-actions.pod:2569 ../src/guestfs-actions.pod:3799
11188 "You should call this after configuring the handle (eg. adding drives) but "
11189 "before performing any actions."
11193 #: ../fish/guestfish-actions.pod:2572
11198 #: ../fish/guestfish-actions.pod:2574
11201 " lchown owner group path\n"
11206 #: ../fish/guestfish-actions.pod:2576
11208 "Change the file owner to C<owner> and group to C<group>. This is like L</"
11209 "chown> but if C<path> is a symlink then the link itself is changed, not the "
11214 #: ../fish/guestfish-actions.pod:2584
11219 #: ../fish/guestfish-actions.pod:2586
11222 " lgetxattr path name\n"
11227 #: ../fish/guestfish-actions.pod:2588 ../src/guestfs-actions.pod:3839
11229 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
11230 "is a symlink, then this call returns an extended attribute from the symlink."
11234 #: ../fish/guestfish-actions.pod:2602
11235 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
11239 #: ../fish/guestfish-actions.pod:2604
11244 #: ../fish/guestfish-actions.pod:2606
11247 " lgetxattrs path\n"
11252 #: ../fish/guestfish-actions.pod:2608
11254 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
11255 "it returns the extended attributes of the link itself."
11259 #: ../fish/guestfish-actions.pod:2612
11264 #: ../fish/guestfish-actions.pod:2614
11272 #: ../fish/guestfish-actions.pod:2616 ../src/guestfs-actions.pod:3882
11274 "List all 9p filesystems attached to the guest. A list of mount tags is "
11279 #: ../fish/guestfish-actions.pod:2619
11280 msgid "list-devices"
11284 #: ../fish/guestfish-actions.pod:2621
11292 #: ../fish/guestfish-actions.pod:2623 ../src/guestfs-actions.pod:3896
11293 msgid "List all the block devices."
11297 #: ../fish/guestfish-actions.pod:2625 ../src/guestfs-actions.pod:3898
11298 msgid "The full block device names are returned, eg. C</dev/sda>."
11302 #: ../fish/guestfish-actions.pod:2629
11303 msgid "list-dm-devices"
11307 #: ../fish/guestfish-actions.pod:2631
11310 " list-dm-devices\n"
11315 #: ../fish/guestfish-actions.pod:2633 ../src/guestfs-actions.pod:3913
11316 msgid "List all device mapper devices."
11320 #: ../fish/guestfish-actions.pod:2635
11322 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
11323 "previous call to L</luks-open>."
11327 #: ../fish/guestfish-actions.pod:2638
11329 "Device mapper devices which correspond to logical volumes are I<not> "
11330 "returned in this list. Call L</lvs> if you want to list logical volumes."
11334 #: ../fish/guestfish-actions.pod:2642
11335 msgid "list-filesystems"
11339 #: ../fish/guestfish-actions.pod:2644
11342 " list-filesystems\n"
11347 #: ../fish/guestfish-actions.pod:2646 ../src/guestfs-actions.pod:3933
11349 "This inspection command looks for filesystems on partitions, block devices "
11350 "and logical volumes, returning a list of devices containing filesystems and "
11355 #: ../fish/guestfish-actions.pod:2650 ../src/guestfs-actions.pod:3937
11357 "The return value is a hash, where the keys are the devices containing "
11358 "filesystems, and the values are the filesystem types. For example:"
11362 #: ../fish/guestfish-actions.pod:2654 ../src/guestfs-actions.pod:3941
11365 " \"/dev/sda1\" => \"ntfs\"\n"
11366 " \"/dev/sda2\" => \"ext2\"\n"
11367 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
11368 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
11373 #: ../fish/guestfish-actions.pod:2659 ../src/guestfs-actions.pod:3946
11375 "The value can have the special value \"unknown\", meaning the content of the "
11376 "device is undetermined or empty. \"swap\" means a Linux swap partition."
11380 #: ../fish/guestfish-actions.pod:2663
11382 "This command runs other libguestfs commands, which might include L</mount> "
11383 "and L</umount>, and therefore you should use this soon after launch and only "
11384 "when nothing is mounted."
11388 #: ../fish/guestfish-actions.pod:2667
11390 "Not all of the filesystems returned will be mountable. In particular, swap "
11391 "partitions are returned in the list. Also this command does not check that "
11392 "each filesystem found is valid and mountable, and some filesystems might be "
11393 "mountable but require special options. Filesystems may not all belong to a "
11394 "single logical operating system (use L</inspect-os> to look for OSes)."
11398 #: ../fish/guestfish-actions.pod:2675
11399 msgid "list-partitions"
11403 #: ../fish/guestfish-actions.pod:2677
11406 " list-partitions\n"
11411 #: ../fish/guestfish-actions.pod:2679 ../src/guestfs-actions.pod:3975
11412 msgid "List all the partitions detected on all block devices."
11416 #: ../fish/guestfish-actions.pod:2681 ../src/guestfs-actions.pod:3977
11417 msgid "The full partition device names are returned, eg. C</dev/sda1>"
11421 #: ../fish/guestfish-actions.pod:2683
11423 "This does not return logical volumes. For that you will need to call L</"
11428 #: ../fish/guestfish-actions.pod:2688
11433 #: ../fish/guestfish-actions.pod:2690
11441 #: ../fish/guestfish-actions.pod:2692 ../src/guestfs-actions.pod:3996
11443 "List the files in C<directory> (relative to the root directory, there is no "
11444 "cwd) in the format of 'ls -la'."
11448 #: ../fish/guestfish-actions.pod:2695 ../src/guestfs-actions.pod:3999
11450 "This command is mostly useful for interactive sessions. It is I<not> "
11451 "intended that you try to parse the output string."
11455 #: ../fish/guestfish-actions.pod:2698
11460 #: ../fish/guestfish-actions.pod:2700
11463 " ln target linkname\n"
11468 #: ../fish/guestfish-actions.pod:2702 ../src/guestfs-actions.pod:4014
11469 msgid "This command creates a hard link using the C<ln> command."
11473 #: ../fish/guestfish-actions.pod:2704
11478 #: ../fish/guestfish-actions.pod:2706
11481 " ln-f target linkname\n"
11486 #: ../fish/guestfish-actions.pod:2708 ../src/guestfs-actions.pod:4027
11488 "This command creates a hard link using the C<ln -f> command. The I<-f> "
11489 "option removes the link (C<linkname>) if it exists already."
11493 #: ../fish/guestfish-actions.pod:2711
11498 #: ../fish/guestfish-actions.pod:2713
11501 " ln-s target linkname\n"
11506 #: ../fish/guestfish-actions.pod:2715 ../src/guestfs-actions.pod:4041
11507 msgid "This command creates a symbolic link using the C<ln -s> command."
11511 #: ../fish/guestfish-actions.pod:2717
11516 #: ../fish/guestfish-actions.pod:2719
11519 " ln-sf target linkname\n"
11524 #: ../fish/guestfish-actions.pod:2721 ../src/guestfs-actions.pod:4054
11526 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
11527 "option removes the link (C<linkname>) if it exists already."
11531 #: ../fish/guestfish-actions.pod:2724
11532 msgid "lremovexattr"
11536 #: ../fish/guestfish-actions.pod:2726
11539 " lremovexattr xattr path\n"
11544 #: ../fish/guestfish-actions.pod:2728
11546 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
11547 "it removes an extended attribute of the link itself."
11551 #: ../fish/guestfish-actions.pod:2732
11556 #: ../fish/guestfish-actions.pod:2734
11564 #: ../fish/guestfish-actions.pod:2736 ../src/guestfs-actions.pod:4082
11566 "List the files in C<directory> (relative to the root directory, there is no "
11567 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
11571 #: ../fish/guestfish-actions.pod:2740
11573 "This command is mostly useful for interactive sessions. Programs should "
11574 "probably use L</readdir> instead."
11578 #: ../fish/guestfish-actions.pod:2743
11583 #: ../fish/guestfish-actions.pod:2745
11586 " lsetxattr xattr val vallen path\n"
11591 #: ../fish/guestfish-actions.pod:2747
11593 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
11594 "sets an extended attribute of the link itself."
11598 #: ../fish/guestfish-actions.pod:2751
11603 #: ../fish/guestfish-actions.pod:2753
11611 #: ../fish/guestfish-actions.pod:2755 ../fish/guestfish-actions.pod:4565
11612 #: ../src/guestfs-actions.pod:4118 ../src/guestfs-actions.pod:6903
11613 msgid "Returns file information for the given C<path>."
11617 #: ../fish/guestfish-actions.pod:2757
11619 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
11620 "the link is stat-ed, not the file it refers to."
11624 #: ../fish/guestfish-actions.pod:2761 ../src/guestfs-actions.pod:4124
11625 msgid "This is the same as the C<lstat(2)> system call."
11629 #: ../fish/guestfish-actions.pod:2763
11634 #: ../fish/guestfish-actions.pod:2765
11637 " lstatlist path 'names ...'\n"
11642 #: ../fish/guestfish-actions.pod:2767
11644 "This call allows you to perform the L</lstat> operation on multiple files, "
11645 "where all files are in the directory C<path>. C<names> is the list of files "
11646 "from this directory."
11650 #: ../fish/guestfish-actions.pod:2771 ../src/guestfs-actions.pod:4143
11652 "On return you get a list of stat structs, with a one-to-one correspondence "
11653 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11654 "then the C<ino> field of that structure is set to C<-1>."
11658 #: ../fish/guestfish-actions.pod:2776
11660 "This call is intended for programs that want to efficiently list a directory "
11661 "contents without making many round-trips. See also L</lxattrlist> for a "
11662 "similarly efficient call for getting extended attributes. Very long "
11663 "directory listings might cause the protocol message size to be exceeded, "
11664 "causing this call to fail. The caller must split up such requests into "
11665 "smaller groups of names."
11669 #: ../fish/guestfish-actions.pod:2784
11670 msgid "luks-add-key"
11674 #: ../fish/guestfish-actions.pod:2786
11677 " luks-add-key device keyslot\n"
11682 #: ../fish/guestfish-actions.pod:2788 ../src/guestfs-actions.pod:4171
11684 "This command adds a new key on LUKS device C<device>. C<key> is any "
11685 "existing key, and is used to access the device. C<newkey> is the new key to "
11686 "add. C<keyslot> is the key slot that will be replaced."
11690 #: ../fish/guestfish-actions.pod:2793
11692 "Note that if C<keyslot> already contains a key, then this command will "
11693 "fail. You have to use L</luks-kill-slot> first to remove that key."
11697 #: ../fish/guestfish-actions.pod:2797 ../fish/guestfish-actions.pod:2819
11698 #: ../fish/guestfish-actions.pod:2832 ../fish/guestfish-actions.pod:2846
11699 #: ../fish/guestfish-actions.pod:2872 ../fish/guestfish-actions.pod:2882
11701 "This command has one or more key or passphrase parameters. Guestfish will "
11702 "prompt for these separately."
11706 #: ../fish/guestfish-actions.pod:2800
11711 #: ../fish/guestfish-actions.pod:2802
11714 " luks-close device\n"
11719 #: ../fish/guestfish-actions.pod:2804
11721 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
11722 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
11723 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
11728 #: ../fish/guestfish-actions.pod:2810
11729 msgid "luks-format"
11733 #: ../fish/guestfish-actions.pod:2812
11736 " luks-format device keyslot\n"
11741 #: ../fish/guestfish-actions.pod:2814 ../src/guestfs-actions.pod:4212
11743 "This command erases existing data on C<device> and formats the device as a "
11744 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11745 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11749 #: ../fish/guestfish-actions.pod:2822 ../fish/guestfish-actions.pod:2835
11750 #: ../fish/guestfish-actions.pod:2922 ../fish/guestfish-actions.pod:3573
11751 #: ../fish/guestfish-actions.pod:4099 ../fish/guestfish-actions.pod:4436
11752 #: ../fish/guestfish-actions.pod:4459 ../fish/guestfish-actions.pod:4481
11753 #: ../fish/guestfish-actions.pod:5227 ../src/guestfs-actions.pod:4219
11754 #: ../src/guestfs-actions.pod:4242 ../src/guestfs-actions.pod:4385
11755 #: ../src/guestfs-actions.pod:5478 ../src/guestfs-actions.pod:6266
11756 #: ../src/guestfs-actions.pod:6717 ../src/guestfs-actions.pod:6747
11757 #: ../src/guestfs-actions.pod:6780 ../src/guestfs-actions.pod:7979
11759 "B<This command is dangerous. Without careful use you can easily destroy all "
11764 #: ../fish/guestfish-actions.pod:2825
11765 msgid "luks-format-cipher"
11769 #: ../fish/guestfish-actions.pod:2827
11772 " luks-format-cipher device keyslot cipher\n"
11777 #: ../fish/guestfish-actions.pod:2829
11779 "This command is the same as L</luks-format> but it also allows you to set "
11780 "the C<cipher> used."
11784 #: ../fish/guestfish-actions.pod:2838
11785 msgid "luks-kill-slot"
11789 #: ../fish/guestfish-actions.pod:2840
11792 " luks-kill-slot device keyslot\n"
11797 #: ../fish/guestfish-actions.pod:2842 ../src/guestfs-actions.pod:4259
11799 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
11800 "device C<device>. C<key> must be one of the I<other> keys."
11804 #: ../fish/guestfish-actions.pod:2849
11809 #: ../fish/guestfish-actions.pod:2851
11812 " luks-open device mapname\n"
11817 #: ../fish/guestfish-actions.pod:2853 ../src/guestfs-actions.pod:4279
11819 "This command opens a block device which has been encrypted according to the "
11820 "Linux Unified Key Setup (LUKS) standard."
11824 #: ../fish/guestfish-actions.pod:2856 ../src/guestfs-actions.pod:4282
11825 msgid "C<device> is the encrypted block device or partition."
11829 #: ../fish/guestfish-actions.pod:2858 ../src/guestfs-actions.pod:4284
11831 "The caller must supply one of the keys associated with the LUKS block "
11832 "device, in the C<key> parameter."
11836 #: ../fish/guestfish-actions.pod:2861 ../src/guestfs-actions.pod:4287
11838 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
11839 "writes to this block device are decrypted from and encrypted to the "
11840 "underlying C<device> respectively."
11844 #: ../fish/guestfish-actions.pod:2865
11846 "If this block device contains LVM volume groups, then calling L</vgscan> "
11847 "followed by L</vg-activate-all> will make them visible."
11851 #: ../fish/guestfish-actions.pod:2869
11852 msgid "Use L</list-dm-devices> to list all device mapper devices."
11856 #: ../fish/guestfish-actions.pod:2875
11857 msgid "luks-open-ro"
11861 #: ../fish/guestfish-actions.pod:2877
11864 " luks-open-ro device mapname\n"
11869 #: ../fish/guestfish-actions.pod:2879
11871 "This is the same as L</luks-open> except that a read-only mapping is created."
11875 #: ../fish/guestfish-actions.pod:2885
11880 #: ../fish/guestfish-actions.pod:2887
11883 " lvcreate logvol volgroup mbytes\n"
11888 #: ../fish/guestfish-actions.pod:2889 ../src/guestfs-actions.pod:4333
11890 "This creates an LVM logical volume called C<logvol> on the volume group "
11891 "C<volgroup>, with C<size> megabytes."
11895 #: ../fish/guestfish-actions.pod:2892
11896 msgid "lvm-canonical-lv-name"
11900 #: ../fish/guestfish-actions.pod:2894
11903 " lvm-canonical-lv-name lvname\n"
11908 #: ../fish/guestfish-actions.pod:2896 ../src/guestfs-actions.pod:4346
11910 "This converts alternative naming schemes for LVs that you might find to the "
11911 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
11916 #: ../fish/guestfish-actions.pod:2900 ../src/guestfs-actions.pod:4350
11918 "This command returns an error if the C<lvname> parameter does not refer to a "
11923 #: ../fish/guestfish-actions.pod:2903
11924 msgid "See also L</is-lv>."
11928 #: ../fish/guestfish-actions.pod:2905
11929 msgid "lvm-clear-filter"
11933 #: ../fish/guestfish-actions.pod:2907
11936 " lvm-clear-filter\n"
11941 #: ../fish/guestfish-actions.pod:2909
11943 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
11948 #: ../fish/guestfish-actions.pod:2912 ../fish/guestfish-actions.pod:2943
11949 #: ../src/guestfs-actions.pod:4368 ../src/guestfs-actions.pod:4410
11951 "This command also clears the LVM cache and performs a volume group scan."
11955 #: ../fish/guestfish-actions.pod:2915
11956 msgid "lvm-remove-all"
11960 #: ../fish/guestfish-actions.pod:2917
11963 " lvm-remove-all\n"
11968 #: ../fish/guestfish-actions.pod:2919 ../src/guestfs-actions.pod:4380
11970 "This command removes all LVM logical volumes, volume groups and physical "
11975 #: ../fish/guestfish-actions.pod:2925
11976 msgid "lvm-set-filter"
11980 #: ../fish/guestfish-actions.pod:2927
11983 " lvm-set-filter 'devices ...'\n"
11988 #: ../fish/guestfish-actions.pod:2929 ../src/guestfs-actions.pod:4396
11990 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
11991 "block devices in the list C<devices>, and will ignore all other attached "
11996 #: ../fish/guestfish-actions.pod:2933 ../src/guestfs-actions.pod:4400
11998 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
11999 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12000 "there are two types of duplication possible: either cloned PVs/VGs which "
12001 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12002 "same name. In normal operation you cannot create this situation, but you "
12003 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12004 "inside the LVM metadata."
12008 #: ../fish/guestfish-actions.pod:2946 ../src/guestfs-actions.pod:4413
12009 msgid "You can filter whole block devices or individual partitions."
12013 #: ../fish/guestfish-actions.pod:2948 ../src/guestfs-actions.pod:4415
12015 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12016 "filesystem), even if you are not filtering out that VG."
12020 #: ../fish/guestfish-actions.pod:2952
12025 #: ../fish/guestfish-actions.pod:2954
12028 " lvremove device\n"
12033 #: ../fish/guestfish-actions.pod:2956 ../src/guestfs-actions.pod:4429
12035 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12036 "LV, such as C</dev/VG/LV>."
12040 #: ../fish/guestfish-actions.pod:2959 ../src/guestfs-actions.pod:4432
12042 "You can also remove all LVs in a volume group by specifying the VG name, C</"
12047 #: ../fish/guestfish-actions.pod:2962
12052 #: ../fish/guestfish-actions.pod:2964
12055 " lvrename logvol newlogvol\n"
12060 #: ../fish/guestfish-actions.pod:2966 ../src/guestfs-actions.pod:4446
12061 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
12065 #: ../fish/guestfish-actions.pod:2968
12070 #: ../fish/guestfish-actions.pod:2970
12073 " lvresize device mbytes\n"
12078 #: ../fish/guestfish-actions.pod:2972 ../src/guestfs-actions.pod:4459
12080 "This resizes (expands or shrinks) an existing LVM logical volume to "
12081 "C<mbytes>. When reducing, data in the reduced part is lost."
12085 #: ../fish/guestfish-actions.pod:2976
12086 msgid "lvresize-free"
12090 #: ../fish/guestfish-actions.pod:2978
12093 " lvresize-free lv percent\n"
12098 #: ../fish/guestfish-actions.pod:2980 ../src/guestfs-actions.pod:4474
12100 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
12101 "remaining free space in the volume group. Commonly you would call this with "
12102 "pc = 100 which expands the logical volume as much as possible, using all "
12103 "remaining free space in the volume group."
12107 #: ../fish/guestfish-actions.pod:2986
12112 #: ../fish/guestfish-actions.pod:2988
12120 #: ../fish/guestfish-actions.pod:2990 ../src/guestfs-actions.pod:4489
12122 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12127 #: ../fish/guestfish-actions.pod:2993 ../src/guestfs-actions.pod:4492
12129 "This returns a list of the logical volume device names (eg. C</dev/"
12130 "VolGroup00/LogVol00>)."
12134 #: ../fish/guestfish-actions.pod:2996
12135 msgid "See also L</lvs-full>, L</list-filesystems>."
12139 #: ../fish/guestfish-actions.pod:2998
12144 #: ../fish/guestfish-actions.pod:3000
12152 #: ../fish/guestfish-actions.pod:3002 ../src/guestfs-actions.pod:4508
12154 "List all the logical volumes detected. This is the equivalent of the L<lvs"
12155 "(8)> command. The \"full\" version includes all fields."
12159 #: ../fish/guestfish-actions.pod:3005
12164 #: ../fish/guestfish-actions.pod:3007
12172 #: ../fish/guestfish-actions.pod:3009 ../src/guestfs-actions.pod:4523
12173 msgid "This command returns the UUID of the LVM LV C<device>."
12177 #: ../fish/guestfish-actions.pod:3011
12182 #: ../fish/guestfish-actions.pod:3013
12185 " lxattrlist path 'names ...'\n"
12190 #: ../fish/guestfish-actions.pod:3015 ../src/guestfs-actions.pod:4537
12192 "This call allows you to get the extended attributes of multiple files, where "
12193 "all files are in the directory C<path>. C<names> is the list of files from "
12198 #: ../fish/guestfish-actions.pod:3019 ../src/guestfs-actions.pod:4541
12200 "On return you get a flat list of xattr structs which must be interpreted "
12201 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
12202 "C<attrval> in this struct is zero-length to indicate there was an error "
12203 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
12204 "number (the number of following attributes for this file, which could be C<"
12205 "\"0\">). Then after the first xattr struct are the zero or more attributes "
12206 "for the first named file. This repeats for the second and subsequent files."
12210 #: ../fish/guestfish-actions.pod:3029
12212 "This call is intended for programs that want to efficiently list a directory "
12213 "contents without making many round-trips. See also L</lstatlist> for a "
12214 "similarly efficient call for getting standard stats. Very long directory "
12215 "listings might cause the protocol message size to be exceeded, causing this "
12216 "call to fail. The caller must split up such requests into smaller groups of "
12221 #: ../fish/guestfish-actions.pod:3037
12226 #: ../fish/guestfish-actions.pod:3039
12234 #: ../fish/guestfish-actions.pod:3041 ../src/guestfs-actions.pod:4571
12235 msgid "Create a directory named C<path>."
12239 #: ../fish/guestfish-actions.pod:3043
12244 #: ../fish/guestfish-actions.pod:3045
12247 " mkdir-mode path mode\n"
12252 #: ../fish/guestfish-actions.pod:3047 ../src/guestfs-actions.pod:4584
12254 "This command creates a directory, setting the initial permissions of the "
12255 "directory to C<mode>."
12259 #: ../fish/guestfish-actions.pod:3050 ../src/guestfs-actions.pod:4587
12261 "For common Linux filesystems, the actual mode which is set will be C<mode & "
12262 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
12267 #: ../fish/guestfish-actions.pod:3054
12268 msgid "See also L</mkdir>, L</umask>"
12272 #: ../fish/guestfish-actions.pod:3056
12277 #: ../fish/guestfish-actions.pod:3058
12285 #: ../fish/guestfish-actions.pod:3060 ../src/guestfs-actions.pod:4603
12287 "Create a directory named C<path>, creating any parent directories as "
12288 "necessary. This is like the C<mkdir -p> shell command."
12292 #: ../fish/guestfish-actions.pod:3063
12297 #: ../fish/guestfish-actions.pod:3065
12300 " mkdtemp template\n"
12305 #: ../fish/guestfish-actions.pod:3067 ../src/guestfs-actions.pod:4616
12307 "This command creates a temporary directory. The C<template> parameter "
12308 "should be a full pathname for the temporary directory name with the final "
12309 "six characters being \"XXXXXX\"."
12313 #: ../fish/guestfish-actions.pod:3072 ../src/guestfs-actions.pod:4621
12315 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
12316 "being suitable for Windows filesystems."
12320 #: ../fish/guestfish-actions.pod:3075 ../src/guestfs-actions.pod:4624
12321 msgid "The name of the temporary directory that was created is returned."
12325 #: ../fish/guestfish-actions.pod:3078 ../src/guestfs-actions.pod:4627
12326 msgid "The temporary directory is created with mode 0700 and is owned by root."
12330 #: ../fish/guestfish-actions.pod:3081 ../src/guestfs-actions.pod:4630
12332 "The caller is responsible for deleting the temporary directory and its "
12333 "contents after use."
12337 #: ../fish/guestfish-actions.pod:3084 ../src/guestfs-actions.pod:4633
12338 msgid "See also: L<mkdtemp(3)>"
12342 #: ../fish/guestfish-actions.pod:3086
12347 #: ../fish/guestfish-actions.pod:3088
12350 " mke2fs-J fstype blocksize device journal\n"
12355 #: ../fish/guestfish-actions.pod:3090 ../src/guestfs-actions.pod:4649
12357 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12358 "C<journal>. It is equivalent to the command:"
12362 #: ../fish/guestfish-actions.pod:3094 ../src/guestfs-actions.pod:4653
12365 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
12370 #: ../fish/guestfish-actions.pod:3096
12371 msgid "See also L</mke2journal>."
12375 #: ../fish/guestfish-actions.pod:3098
12380 #: ../fish/guestfish-actions.pod:3100
12383 " mke2fs-JL fstype blocksize device label\n"
12388 #: ../fish/guestfish-actions.pod:3102 ../src/guestfs-actions.pod:4670
12390 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12391 "the journal labeled C<label>."
12395 #: ../fish/guestfish-actions.pod:3105
12396 msgid "See also L</mke2journal-L>."
12400 #: ../fish/guestfish-actions.pod:3107
12405 #: ../fish/guestfish-actions.pod:3109
12408 " mke2fs-JU fstype blocksize device uuid\n"
12413 #: ../fish/guestfish-actions.pod:3111 ../src/guestfs-actions.pod:4688
12415 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
12416 "the journal with UUID C<uuid>."
12420 #: ../fish/guestfish-actions.pod:3114
12421 msgid "See also L</mke2journal-U>."
12425 #: ../fish/guestfish-actions.pod:3116
12426 msgid "mke2journal"
12430 #: ../fish/guestfish-actions.pod:3118
12433 " mke2journal blocksize device\n"
12438 #: ../fish/guestfish-actions.pod:3120 ../src/guestfs-actions.pod:4704
12440 "This creates an ext2 external journal on C<device>. It is equivalent to the "
12445 #: ../fish/guestfish-actions.pod:3123 ../src/guestfs-actions.pod:4707
12448 " mke2fs -O journal_dev -b blocksize device\n"
12453 #: ../fish/guestfish-actions.pod:3125
12454 msgid "mke2journal-L"
12458 #: ../fish/guestfish-actions.pod:3127
12461 " mke2journal-L blocksize label device\n"
12466 #: ../fish/guestfish-actions.pod:3129 ../src/guestfs-actions.pod:4721
12467 msgid "This creates an ext2 external journal on C<device> with label C<label>."
12471 #: ../fish/guestfish-actions.pod:3131
12472 msgid "mke2journal-U"
12476 #: ../fish/guestfish-actions.pod:3133
12479 " mke2journal-U blocksize uuid device\n"
12484 #: ../fish/guestfish-actions.pod:3135 ../src/guestfs-actions.pod:4735
12485 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
12489 #: ../fish/guestfish-actions.pod:3137
12494 #: ../fish/guestfish-actions.pod:3139
12497 " mkfifo mode path\n"
12502 #: ../fish/guestfish-actions.pod:3141
12504 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12505 "is just a convenient wrapper around L</mknod>."
12509 #: ../fish/guestfish-actions.pod:3147
12514 #: ../fish/guestfish-actions.pod:3149
12517 " mkfs fstype device\n"
12522 #: ../fish/guestfish-actions.pod:3151 ../src/guestfs-actions.pod:4765
12524 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12525 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12529 #: ../fish/guestfish-actions.pod:3155
12534 #: ../fish/guestfish-actions.pod:3157
12537 " mkfs-b fstype blocksize device\n"
12542 #: ../fish/guestfish-actions.pod:3159
12544 "This call is similar to L</mkfs>, but it allows you to control the block "
12545 "size of the resulting filesystem. Supported block sizes depend on the "
12546 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12550 #: ../fish/guestfish-actions.pod:3164 ../fish/guestfish-actions.pod:3191
12551 #: ../src/guestfs-actions.pod:4793 ../src/guestfs-actions.pod:4831
12553 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12558 #: ../fish/guestfish-actions.pod:3167
12560 "I<This function is deprecated.> In new code, use the L</mkfs_opts> call "
12565 #: ../fish/guestfish-actions.pod:3174
12570 #: ../fish/guestfish-actions.pod:3176
12573 " mkfs-opts fstype device [blocksize:..] [features:..] [inode:..] [sectorsize:..]\n"
12578 #: ../fish/guestfish-actions.pod:3178 ../src/guestfs-actions.pod:4818
12580 "This function creates a filesystem on C<device>. The filesystem type is "
12581 "C<fstype>, for example C<ext3>."
12585 #: ../fish/guestfish-actions.pod:3185 ../src/guestfs-actions.pod:4825
12586 msgid "C<blocksize>"
12590 #: ../fish/guestfish-actions.pod:3187 ../src/guestfs-actions.pod:4827
12592 "The filesystem block size. Supported block sizes depend on the filesystem "
12593 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12598 #: ../fish/guestfish-actions.pod:3194 ../src/guestfs-actions.pod:4834
12599 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
12603 #: ../fish/guestfish-actions.pod:3196 ../src/guestfs-actions.pod:4836
12604 msgid "C<features>"
12608 #: ../fish/guestfish-actions.pod:3198 ../src/guestfs-actions.pod:4838
12609 msgid "This passes the I<-O> parameter to the external mkfs program."
12613 #: ../fish/guestfish-actions.pod:3200 ../src/guestfs-actions.pod:4840
12615 "For certain filesystem types, this allows extra filesystem features to be "
12616 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
12620 #: ../fish/guestfish-actions.pod:3204 ../src/guestfs-actions.pod:4844
12622 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
12627 #: ../fish/guestfish-actions.pod:3207 ../src/guestfs-actions.pod:4847
12632 #: ../fish/guestfish-actions.pod:3209 ../src/guestfs-actions.pod:4849
12634 "This passes the I<-I> parameter to the external L<mke2fs(8)> program which "
12635 "sets the inode size (only for ext2/3/4 filesystems at present)."
12639 #: ../fish/guestfish-actions.pod:3212 ../src/guestfs-actions.pod:4852
12640 msgid "C<sectorsize>"
12644 #: ../fish/guestfish-actions.pod:3214 ../src/guestfs-actions.pod:4854
12646 "This passes the I<-S> parameter to external L<mkfs.ufs(8)> program, which "
12647 "sets sector size for ufs filesystem."
12651 #: ../fish/guestfish-actions.pod:3221
12652 msgid "mkmountpoint"
12656 #: ../fish/guestfish-actions.pod:3223
12659 " mkmountpoint exemptpath\n"
12664 #: ../fish/guestfish-actions.pod:3225
12666 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
12667 "to create extra mountpoints before mounting the first filesystem."
12671 #: ../fish/guestfish-actions.pod:3229 ../src/guestfs-actions.pod:4897
12673 "These calls are I<only> necessary in some very limited circumstances, mainly "
12674 "the case where you want to mount a mix of unrelated and/or read-only "
12675 "filesystems together."
12679 #: ../fish/guestfish-actions.pod:3233 ../src/guestfs-actions.pod:4901
12681 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12682 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12683 "inside that. You can unpack this as follows in guestfish:"
12687 #: ../fish/guestfish-actions.pod:3238 ../src/guestfs-actions.pod:4906
12690 " add-ro Fedora-11-i686-Live.iso\n"
12692 " mkmountpoint /cd\n"
12693 " mkmountpoint /sqsh\n"
12694 " mkmountpoint /ext3fs\n"
12695 " mount /dev/sda /cd\n"
12696 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12697 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12702 #: ../fish/guestfish-actions.pod:3247 ../src/guestfs-actions.pod:4915
12703 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12707 #: ../fish/guestfish-actions.pod:3249
12709 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
12710 "unexpected errors if you try to mix these calls. It is safest to manually "
12711 "unmount filesystems and remove mountpoints after use."
12715 #: ../fish/guestfish-actions.pod:3253
12717 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
12718 "for this to work for manual mountpoints, you must ensure that the innermost "
12719 "mountpoints have the longest pathnames, as in the example code above."
12723 #: ../fish/guestfish-actions.pod:3258 ../src/guestfs-actions.pod:4926
12725 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12729 #: ../fish/guestfish-actions.pod:3260
12731 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
12732 "L</umount-all> to be called when the handle is closed which can also trigger "
12737 #: ../fish/guestfish-actions.pod:3264
12742 #: ../fish/guestfish-actions.pod:3266
12745 " mknod mode devmajor devminor path\n"
12750 #: ../fish/guestfish-actions.pod:3268 ../src/guestfs-actions.pod:4945
12752 "This call creates block or character special devices, or named pipes (FIFOs)."
12756 #: ../fish/guestfish-actions.pod:3271 ../src/guestfs-actions.pod:4948
12758 "The C<mode> parameter should be the mode, using the standard constants. "
12759 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
12760 "used when creating block and character special devices."
12764 #: ../fish/guestfish-actions.pod:3276
12766 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
12767 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
12768 "regular file). These constants are available in the standard Linux header "
12769 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
12770 "wrappers around this command which bitwise OR in the appropriate constant "
12775 #: ../fish/guestfish-actions.pod:3286
12780 #: ../fish/guestfish-actions.pod:3288
12783 " mknod-b mode devmajor devminor path\n"
12788 #: ../fish/guestfish-actions.pod:3290
12790 "This call creates a block device node called C<path> with mode C<mode> and "
12791 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12792 "wrapper around L</mknod>."
12796 #: ../fish/guestfish-actions.pod:3296
12801 #: ../fish/guestfish-actions.pod:3298
12804 " mknod-c mode devmajor devminor path\n"
12809 #: ../fish/guestfish-actions.pod:3300
12811 "This call creates a char device node called C<path> with mode C<mode> and "
12812 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12813 "wrapper around L</mknod>."
12817 #: ../fish/guestfish-actions.pod:3306
12822 #: ../fish/guestfish-actions.pod:3308
12830 #: ../fish/guestfish-actions.pod:3310 ../src/guestfs-actions.pod:5011
12831 msgid "Create a swap partition on C<device>."
12835 #: ../fish/guestfish-actions.pod:3312
12840 #: ../fish/guestfish-actions.pod:3314
12843 " mkswap-L label device\n"
12848 #: ../fish/guestfish-actions.pod:3316 ../src/guestfs-actions.pod:5024
12849 msgid "Create a swap partition on C<device> with label C<label>."
12853 #: ../fish/guestfish-actions.pod:3318 ../src/guestfs-actions.pod:5026
12855 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
12856 "sda>), just to a partition. This appears to be a limitation of the kernel "
12861 #: ../fish/guestfish-actions.pod:3322
12866 #: ../fish/guestfish-actions.pod:3324
12869 " mkswap-U uuid device\n"
12874 #: ../fish/guestfish-actions.pod:3326 ../src/guestfs-actions.pod:5041
12875 msgid "Create a swap partition on C<device> with UUID C<uuid>."
12879 #: ../fish/guestfish-actions.pod:3328
12880 msgid "mkswap-file"
12884 #: ../fish/guestfish-actions.pod:3330
12887 " mkswap-file path\n"
12892 #: ../fish/guestfish-actions.pod:3332 ../src/guestfs-actions.pod:5053
12893 msgid "Create a swap file."
12897 #: ../fish/guestfish-actions.pod:3334
12899 "This command just writes a swap file signature to an existing file. To "
12900 "create the file itself, use something like L</fallocate>."
12904 #: ../fish/guestfish-actions.pod:3337
12909 #: ../fish/guestfish-actions.pod:3339
12912 " modprobe modulename\n"
12917 #: ../fish/guestfish-actions.pod:3341 ../src/guestfs-actions.pod:5068
12918 msgid "This loads a kernel module in the appliance."
12922 #: ../fish/guestfish-actions.pod:3343 ../src/guestfs-actions.pod:5070
12924 "The kernel module must have been whitelisted when libguestfs was built (see "
12925 "C<appliance/kmod.whitelist.in> in the source)."
12929 #: ../fish/guestfish-actions.pod:3346
12934 #: ../fish/guestfish-actions.pod:3348
12937 " mount device mountpoint\n"
12942 #: ../fish/guestfish-actions.pod:3350 ../src/guestfs-actions.pod:5084
12944 "Mount a guest disk at a position in the filesystem. Block devices are named "
12945 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
12946 "those block devices contain partitions, they will have the usual names (eg. "
12947 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
12951 #: ../fish/guestfish-actions.pod:3356 ../src/guestfs-actions.pod:5090
12953 "The rules are the same as for L<mount(2)>: A filesystem must first be "
12954 "mounted on C</> before others can be mounted. Other filesystems can only be "
12955 "mounted on directories which already exist."
12959 #: ../fish/guestfish-actions.pod:3361 ../src/guestfs-actions.pod:5095
12961 "The mounted filesystem is writable, if we have sufficient permissions on the "
12962 "underlying device."
12966 #: ../fish/guestfish-actions.pod:3364
12968 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
12969 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
12970 "problems for users. If your program might need to work with older versions "
12971 "of libguestfs, use L</mount-options> instead (using an empty string for the "
12972 "first parameter if you don't want any options)."
12976 #: ../fish/guestfish-actions.pod:3371
12981 #: ../fish/guestfish-actions.pod:3373
12984 " mount-9p mounttag mountpoint [options:..]\n"
12989 #: ../fish/guestfish-actions.pod:3375 ../src/guestfs-actions.pod:5124
12991 "Mount the virtio-9p filesystem with the tag C<mounttag> on the directory "
12996 #: ../fish/guestfish-actions.pod:3378 ../src/guestfs-actions.pod:5127
12998 "If required, C<trans=virtio> will be automatically added to the options. "
12999 "Any other options required can be passed in the optional C<options> "
13004 #: ../fish/guestfish-actions.pod:3384
13009 #: ../fish/guestfish-actions.pod:3386
13012 " mount-loop file mountpoint\n"
13017 #: ../fish/guestfish-actions.pod:3388 ../src/guestfs-actions.pod:5166
13019 "This command lets you mount C<file> (a filesystem image in a file) on a "
13020 "mount point. It is entirely equivalent to the command C<mount -o loop file "
13025 #: ../fish/guestfish-actions.pod:3392
13026 msgid "mount-options"
13030 #: ../fish/guestfish-actions.pod:3394
13033 " mount-options options device mountpoint\n"
13038 #: ../fish/guestfish-actions.pod:3396
13040 "This is the same as the L</mount> command, but it allows you to set the "
13041 "mount options as for the L<mount(8)> I<-o> flag."
13045 #: ../fish/guestfish-actions.pod:3400 ../src/guestfs-actions.pod:5186
13047 "If the C<options> parameter is an empty string, then no options are passed "
13048 "(all options default to whatever the filesystem uses)."
13052 #: ../fish/guestfish-actions.pod:3404
13057 #: ../fish/guestfish-actions.pod:3406
13060 " mount-ro device mountpoint\n"
13065 #: ../fish/guestfish-actions.pod:3408
13067 "This is the same as the L</mount> command, but it mounts the filesystem with "
13068 "the read-only (I<-o ro>) flag."
13072 #: ../fish/guestfish-actions.pod:3411
13077 #: ../fish/guestfish-actions.pod:3413
13080 " mount-vfs options vfstype device mountpoint\n"
13085 #: ../fish/guestfish-actions.pod:3415
13087 "This is the same as the L</mount> command, but it allows you to set both the "
13088 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
13092 #: ../fish/guestfish-actions.pod:3419
13093 msgid "mountpoints"
13097 #: ../fish/guestfish-actions.pod:3421
13105 #: ../fish/guestfish-actions.pod:3423
13107 "This call is similar to L</mounts>. That call returns a list of devices. "
13108 "This one returns a hash table (map) of device name to directory where the "
13109 "device is mounted."
13113 #: ../fish/guestfish-actions.pod:3427
13118 #: ../fish/guestfish-actions.pod:3429
13126 #: ../fish/guestfish-actions.pod:3431 ../src/guestfs-actions.pod:5247
13128 "This returns the list of currently mounted filesystems. It returns the list "
13129 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
13133 #: ../fish/guestfish-actions.pod:3434 ../src/guestfs-actions.pod:5250
13134 msgid "Some internal mounts are not shown."
13138 #: ../fish/guestfish-actions.pod:3436
13139 msgid "See also: L</mountpoints>"
13143 #: ../fish/guestfish-actions.pod:3438
13148 #: ../fish/guestfish-actions.pod:3440
13156 #: ../fish/guestfish-actions.pod:3442 ../src/guestfs-actions.pod:5267
13158 "This moves a file from C<src> to C<dest> where C<dest> is either a "
13159 "destination filename or destination directory."
13163 #: ../fish/guestfish-actions.pod:3445
13164 msgid "ntfs-3g-probe"
13168 #: ../fish/guestfish-actions.pod:3447
13171 " ntfs-3g-probe true|false device\n"
13176 #: ../fish/guestfish-actions.pod:3449 ../src/guestfs-actions.pod:5281
13178 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
13179 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
13180 "write, and some cannot be mounted at all)."
13184 #: ../fish/guestfish-actions.pod:3453 ../src/guestfs-actions.pod:5285
13186 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
13187 "can be mounted read-write. Set it to false if you want to test if the "
13188 "volume can be mounted read-only."
13192 #: ../fish/guestfish-actions.pod:3457 ../src/guestfs-actions.pod:5289
13194 "The return value is an integer which C<0> if the operation would succeed, or "
13195 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
13199 #: ../fish/guestfish-actions.pod:3461
13204 #: ../fish/guestfish-actions.pod:3463
13207 " ntfsresize device\n"
13212 #: ../fish/guestfish-actions.pod:3465 ../fish/guestfish-actions.pod:3489
13213 #: ../src/guestfs-actions.pod:5310 ../src/guestfs-actions.pod:5342
13215 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
13216 "size of the underlying device."
13220 #: ../fish/guestfish-actions.pod:3468 ../src/guestfs-actions.pod:5313
13222 "I<Note:> After the resize operation, the filesystem is marked as requiring a "
13223 "consistency check (for safety). You have to boot into Windows to perform "
13224 "this check and clear this condition. Furthermore, ntfsresize refuses to "
13225 "resize filesystems which have been marked in this way. So in effect it is "
13226 "not possible to call ntfsresize multiple times on a single filesystem "
13227 "without booting into Windows between each resize."
13231 #: ../fish/guestfish-actions.pod:3476 ../fish/guestfish-actions.pod:3515
13232 #: ../src/guestfs-actions.pod:5321 ../src/guestfs-actions.pod:5368
13233 msgid "See also L<ntfsresize(8)>."
13237 #: ../fish/guestfish-actions.pod:3478 ../fish/guestfish-actions.pod:3526
13239 "I<This function is deprecated.> In new code, use the L</ntfsresize_opts> "
13244 #: ../fish/guestfish-actions.pod:3485
13245 msgid "ntfsresize-opts"
13249 #: ../fish/guestfish-actions.pod:3487
13252 " ntfsresize-opts device [size:..] [force:..]\n"
13257 #: ../fish/guestfish-actions.pod:3498 ../src/guestfs-actions.pod:5351
13259 "The new size (in bytes) of the filesystem. If omitted, the filesystem is "
13260 "resized to fit the container (eg. partition)."
13264 #: ../fish/guestfish-actions.pod:3501 ../src/guestfs-actions.pod:5354
13269 #: ../fish/guestfish-actions.pod:3503 ../src/guestfs-actions.pod:5356
13271 "If this option is true, then force the resize of the filesystem even if the "
13272 "filesystem is marked as requiring a consistency check."
13276 #: ../fish/guestfish-actions.pod:3506
13278 "After the resize operation, the filesystem is always marked as requiring a "
13279 "consistency check (for safety). You have to boot into Windows to perform "
13280 "this check and clear this condition. If you I<don't> set the C<force> "
13281 "option then it is not possible to call L</ntfsresize-opts> multiple times on "
13282 "a single filesystem without booting into Windows between each resize."
13286 #: ../fish/guestfish-actions.pod:3519
13287 msgid "ntfsresize-size"
13291 #: ../fish/guestfish-actions.pod:3521
13294 " ntfsresize-size device size\n"
13299 #: ../fish/guestfish-actions.pod:3523
13301 "This command is the same as L</ntfsresize> except that it allows you to "
13302 "specify the new size (in bytes) explicitly."
13306 #: ../fish/guestfish-actions.pod:3533
13311 #: ../fish/guestfish-actions.pod:3535
13314 " part-add device prlogex startsect endsect\n"
13319 #: ../fish/guestfish-actions.pod:3537
13321 "This command adds a partition to C<device>. If there is no partition table "
13322 "on the device, call L</part-init> first."
13326 #: ../fish/guestfish-actions.pod:3540 ../src/guestfs-actions.pod:5429
13328 "The C<prlogex> parameter is the type of partition. Normally you should pass "
13329 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
13330 "C<logical>) and C<e> (or C<extended>) partition types."
13334 #: ../fish/guestfish-actions.pod:3545 ../src/guestfs-actions.pod:5434
13336 "C<startsect> and C<endsect> are the start and end of the partition in "
13337 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
13338 "from the end of the disk (C<-1> is the last sector)."
13342 #: ../fish/guestfish-actions.pod:3549
13344 "Creating a partition which covers the whole disk is not so easy. Use L</"
13345 "part-disk> to do that."
13349 #: ../fish/guestfish-actions.pod:3552
13354 #: ../fish/guestfish-actions.pod:3554
13357 " part-del device partnum\n"
13362 #: ../fish/guestfish-actions.pod:3556 ../src/guestfs-actions.pod:5452
13363 msgid "This command deletes the partition numbered C<partnum> on C<device>."
13367 #: ../fish/guestfish-actions.pod:3558 ../src/guestfs-actions.pod:5454
13369 "Note that in the case of MBR partitioning, deleting an extended partition "
13370 "also deletes any logical partitions it contains."
13374 #: ../fish/guestfish-actions.pod:3562
13379 #: ../fish/guestfish-actions.pod:3564
13382 " part-disk device parttype\n"
13387 #: ../fish/guestfish-actions.pod:3566
13389 "This command is simply a combination of L</part-init> followed by L</part-"
13390 "add> to create a single primary partition covering the whole disk."
13394 #: ../fish/guestfish-actions.pod:3570
13396 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
13397 "possible values are described in L</part-init>."
13401 #: ../fish/guestfish-actions.pod:3576
13402 msgid "part-get-bootable"
13406 #: ../fish/guestfish-actions.pod:3578
13409 " part-get-bootable device partnum\n"
13414 #: ../fish/guestfish-actions.pod:3580 ../src/guestfs-actions.pod:5490
13416 "This command returns true if the partition C<partnum> on C<device> has the "
13417 "bootable flag set."
13421 #: ../fish/guestfish-actions.pod:3583
13422 msgid "See also L</part-set-bootable>."
13426 #: ../fish/guestfish-actions.pod:3585
13427 msgid "part-get-mbr-id"
13431 #: ../fish/guestfish-actions.pod:3587
13434 " part-get-mbr-id device partnum\n"
13439 #: ../fish/guestfish-actions.pod:3589 ../src/guestfs-actions.pod:5506
13441 "Returns the MBR type byte (also known as the ID byte) from the numbered "
13442 "partition C<partnum>."
13446 #: ../fish/guestfish-actions.pod:3592 ../fish/guestfish-actions.pod:3736
13448 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
13449 "undefined results for other partition table types (see L</part-get-"
13454 #: ../fish/guestfish-actions.pod:3596
13455 msgid "part-get-parttype"
13459 #: ../fish/guestfish-actions.pod:3598
13462 " part-get-parttype device\n"
13467 #: ../fish/guestfish-actions.pod:3600 ../src/guestfs-actions.pod:5523
13469 "This command examines the partition table on C<device> and returns the "
13470 "partition table type (format) being used."
13474 #: ../fish/guestfish-actions.pod:3603
13476 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13477 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13478 "possible, although unusual. See L</part-init> for a full list."
13482 #: ../fish/guestfish-actions.pod:3608
13487 #: ../fish/guestfish-actions.pod:3610
13490 " part-init device parttype\n"
13495 #: ../fish/guestfish-actions.pod:3612 ../src/guestfs-actions.pod:5543
13497 "This creates an empty partition table on C<device> of one of the partition "
13498 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13499 "(for large disks)."
13503 #: ../fish/guestfish-actions.pod:3616
13505 "Initially there are no partitions. Following this, you should call L</part-"
13506 "add> for each partition required."
13510 #: ../fish/guestfish-actions.pod:3619 ../src/guestfs-actions.pod:5550
13511 msgid "Possible values for C<parttype> are:"
13515 #: ../fish/guestfish-actions.pod:3623 ../src/guestfs-actions.pod:5554
13520 #: ../fish/guestfish-actions.pod:3625 ../src/guestfs-actions.pod:5556
13525 #: ../fish/guestfish-actions.pod:3627 ../src/guestfs-actions.pod:5558
13526 msgid "Intel EFI / GPT partition table."
13530 #: ../fish/guestfish-actions.pod:3629 ../src/guestfs-actions.pod:5560
13532 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13533 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13534 "the C<mbr> format."
13538 #: ../fish/guestfish-actions.pod:3633 ../src/guestfs-actions.pod:5564
13543 #: ../fish/guestfish-actions.pod:3635 ../src/guestfs-actions.pod:5566
13548 #: ../fish/guestfish-actions.pod:3637 ../src/guestfs-actions.pod:5568
13550 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13551 "Windows. This partition type will B<only> work for device sizes up to 2 "
13552 "TB. For large disks we recommend using C<gpt>."
13556 #: ../fish/guestfish-actions.pod:3644 ../src/guestfs-actions.pod:5575
13558 "Other partition table types that may work but are not supported include:"
13562 #: ../fish/guestfish-actions.pod:3649 ../src/guestfs-actions.pod:5580
13567 #: ../fish/guestfish-actions.pod:3651 ../src/guestfs-actions.pod:5582
13568 msgid "AIX disk labels."
13572 #: ../fish/guestfish-actions.pod:3653 ../src/guestfs-actions.pod:5584
13577 #: ../fish/guestfish-actions.pod:3655 ../src/guestfs-actions.pod:5586
13582 #: ../fish/guestfish-actions.pod:3657 ../src/guestfs-actions.pod:5588
13583 msgid "Amiga \"Rigid Disk Block\" format."
13587 #: ../fish/guestfish-actions.pod:3659 ../src/guestfs-actions.pod:5590
13592 #: ../fish/guestfish-actions.pod:3661 ../src/guestfs-actions.pod:5592
13593 msgid "BSD disk labels."
13597 #: ../fish/guestfish-actions.pod:3663 ../src/guestfs-actions.pod:5594
13602 #: ../fish/guestfish-actions.pod:3665 ../src/guestfs-actions.pod:5596
13603 msgid "DASD, used on IBM mainframes."
13607 #: ../fish/guestfish-actions.pod:3667 ../src/guestfs-actions.pod:5598
13612 #: ../fish/guestfish-actions.pod:3669 ../src/guestfs-actions.pod:5600
13613 msgid "MIPS/SGI volumes."
13617 #: ../fish/guestfish-actions.pod:3671 ../src/guestfs-actions.pod:5602
13622 #: ../fish/guestfish-actions.pod:3673 ../src/guestfs-actions.pod:5604
13623 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13627 #: ../fish/guestfish-actions.pod:3675 ../src/guestfs-actions.pod:5606
13632 #: ../fish/guestfish-actions.pod:3677 ../src/guestfs-actions.pod:5608
13633 msgid "NEC PC-98 format, common in Japan apparently."
13637 #: ../fish/guestfish-actions.pod:3679 ../src/guestfs-actions.pod:5610
13642 #: ../fish/guestfish-actions.pod:3681 ../src/guestfs-actions.pod:5612
13643 msgid "Sun disk labels."
13647 #: ../fish/guestfish-actions.pod:3685
13652 #: ../fish/guestfish-actions.pod:3687
13655 " part-list device\n"
13660 #: ../fish/guestfish-actions.pod:3689 ../src/guestfs-actions.pod:5626
13662 "This command parses the partition table on C<device> and returns the list of "
13663 "partitions found."
13667 #: ../fish/guestfish-actions.pod:3692 ../src/guestfs-actions.pod:5629
13668 msgid "The fields in the returned structure are:"
13672 #: ../fish/guestfish-actions.pod:3696 ../src/guestfs-actions.pod:5633
13673 msgid "B<part_num>"
13677 #: ../fish/guestfish-actions.pod:3698 ../src/guestfs-actions.pod:5635
13678 msgid "Partition number, counting from 1."
13682 #: ../fish/guestfish-actions.pod:3700 ../src/guestfs-actions.pod:5637
13683 msgid "B<part_start>"
13687 #: ../fish/guestfish-actions.pod:3702
13689 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13690 "the device's sector size, see L</blockdev-getss>."
13694 #: ../fish/guestfish-actions.pod:3705 ../src/guestfs-actions.pod:5642
13695 msgid "B<part_end>"
13699 #: ../fish/guestfish-actions.pod:3707 ../src/guestfs-actions.pod:5644
13700 msgid "End of the partition in bytes."
13704 #: ../fish/guestfish-actions.pod:3709 ../src/guestfs-actions.pod:5646
13705 msgid "B<part_size>"
13709 #: ../fish/guestfish-actions.pod:3711 ../src/guestfs-actions.pod:5648
13710 msgid "Size of the partition in bytes."
13714 #: ../fish/guestfish-actions.pod:3715
13715 msgid "part-set-bootable"
13719 #: ../fish/guestfish-actions.pod:3717
13722 " part-set-bootable device partnum true|false\n"
13727 #: ../fish/guestfish-actions.pod:3719 ../src/guestfs-actions.pod:5666
13729 "This sets the bootable flag on partition numbered C<partnum> on device "
13730 "C<device>. Note that partitions are numbered from 1."
13734 #: ../fish/guestfish-actions.pod:3722 ../src/guestfs-actions.pod:5669
13736 "The bootable flag is used by some operating systems (notably Windows) to "
13737 "determine which partition to boot from. It is by no means universally "
13742 #: ../fish/guestfish-actions.pod:3726
13743 msgid "part-set-mbr-id"
13747 #: ../fish/guestfish-actions.pod:3728
13750 " part-set-mbr-id device partnum idbyte\n"
13755 #: ../fish/guestfish-actions.pod:3730 ../src/guestfs-actions.pod:5685
13757 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
13758 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
13759 "documentation are in fact hexadecimal numbers, but usually documented "
13760 "without any leading \"0x\" which might be confusing."
13764 #: ../fish/guestfish-actions.pod:3740
13765 msgid "part-set-name"
13769 #: ../fish/guestfish-actions.pod:3742
13772 " part-set-name device partnum name\n"
13777 #: ../fish/guestfish-actions.pod:3744 ../src/guestfs-actions.pod:5707
13779 "This sets the partition name on partition numbered C<partnum> on device "
13780 "C<device>. Note that partitions are numbered from 1."
13784 #: ../fish/guestfish-actions.pod:3747 ../src/guestfs-actions.pod:5710
13786 "The partition name can only be set on certain types of partition table. "
13787 "This works on C<gpt> but not on C<mbr> partitions."
13791 #: ../fish/guestfish-actions.pod:3750
13792 msgid "part-to-dev"
13796 #: ../fish/guestfish-actions.pod:3752
13799 " part-to-dev partition\n"
13804 #: ../fish/guestfish-actions.pod:3754 ../src/guestfs-actions.pod:5723
13806 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
13807 "partition number, returning the device name (eg. \"/dev/sdb\")."
13811 #: ../fish/guestfish-actions.pod:3758
13813 "The named partition must exist, for example as a string returned from L</"
13814 "list-partitions>."
13818 #: ../fish/guestfish-actions.pod:3761
13819 msgid "ping-daemon"
13823 #: ../fish/guestfish-actions.pod:3763
13831 #: ../fish/guestfish-actions.pod:3765 ../src/guestfs-actions.pod:5740
13833 "This is a test probe into the guestfs daemon running inside the qemu "
13834 "subprocess. Calling this function checks that the daemon responds to the "
13835 "ping message, without affecting the daemon or attached block device(s) in "
13840 #: ../fish/guestfish-actions.pod:3770
13845 #: ../fish/guestfish-actions.pod:3772
13848 " pread path count offset\n"
13853 #: ../fish/guestfish-actions.pod:3774 ../src/guestfs-actions.pod:5758
13855 "This command lets you read part of a file. It reads C<count> bytes of the "
13856 "file, starting at C<offset>, from file C<path>."
13860 #: ../fish/guestfish-actions.pod:3777 ../fish/guestfish-actions.pod:3792
13861 #: ../src/guestfs-actions.pod:5761 ../src/guestfs-actions.pod:5787
13863 "This may read fewer bytes than requested. For further details see the "
13864 "L<pread(2)> system call."
13868 #: ../fish/guestfish-actions.pod:3780
13869 msgid "See also L</pwrite>, L</pread-device>."
13873 #: ../fish/guestfish-actions.pod:3785
13874 msgid "pread-device"
13878 #: ../fish/guestfish-actions.pod:3787
13881 " pread-device device count offset\n"
13886 #: ../fish/guestfish-actions.pod:3789 ../src/guestfs-actions.pod:5784
13888 "This command lets you read part of a file. It reads C<count> bytes of "
13889 "C<device>, starting at C<offset>."
13893 #: ../fish/guestfish-actions.pod:3795
13894 msgid "See also L</pread>."
13898 #: ../fish/guestfish-actions.pod:3800
13903 #: ../fish/guestfish-actions.pod:3802
13906 " pvcreate device\n"
13911 #: ../fish/guestfish-actions.pod:3804 ../src/guestfs-actions.pod:5807
13913 "This creates an LVM physical volume on the named C<device>, where C<device> "
13914 "should usually be a partition name such as C</dev/sda1>."
13918 #: ../fish/guestfish-actions.pod:3808
13923 #: ../fish/guestfish-actions.pod:3810
13926 " pvremove device\n"
13931 #: ../fish/guestfish-actions.pod:3812 ../src/guestfs-actions.pod:5821
13933 "This wipes a physical volume C<device> so that LVM will no longer recognise "
13938 #: ../fish/guestfish-actions.pod:3815 ../src/guestfs-actions.pod:5824
13940 "The implementation uses the C<pvremove> command which refuses to wipe "
13941 "physical volumes that contain any volume groups, so you have to remove those "
13946 #: ../fish/guestfish-actions.pod:3819
13951 #: ../fish/guestfish-actions.pod:3821
13954 " pvresize device\n"
13959 #: ../fish/guestfish-actions.pod:3823 ../src/guestfs-actions.pod:5838
13961 "This resizes (expands or shrinks) an existing LVM physical volume to match "
13962 "the new size of the underlying device."
13966 #: ../fish/guestfish-actions.pod:3826
13967 msgid "pvresize-size"
13971 #: ../fish/guestfish-actions.pod:3828
13974 " pvresize-size device size\n"
13979 #: ../fish/guestfish-actions.pod:3830
13981 "This command is the same as L</pvresize> except that it allows you to "
13982 "specify the new size (in bytes) explicitly."
13986 #: ../fish/guestfish-actions.pod:3833
13991 #: ../fish/guestfish-actions.pod:3835
13999 #: ../fish/guestfish-actions.pod:3837 ../src/guestfs-actions.pod:5864
14001 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14006 #: ../fish/guestfish-actions.pod:3840 ../src/guestfs-actions.pod:5867
14008 "This returns a list of just the device names that contain PVs (eg. C</dev/"
14013 #: ../fish/guestfish-actions.pod:3843
14014 msgid "See also L</pvs-full>."
14018 #: ../fish/guestfish-actions.pod:3845
14023 #: ../fish/guestfish-actions.pod:3847
14031 #: ../fish/guestfish-actions.pod:3849 ../src/guestfs-actions.pod:5883
14033 "List all the physical volumes detected. This is the equivalent of the L<pvs"
14034 "(8)> command. The \"full\" version includes all fields."
14038 #: ../fish/guestfish-actions.pod:3852
14043 #: ../fish/guestfish-actions.pod:3854
14051 #: ../fish/guestfish-actions.pod:3856 ../src/guestfs-actions.pod:5898
14052 msgid "This command returns the UUID of the LVM PV C<device>."
14056 #: ../fish/guestfish-actions.pod:3858
14061 #: ../fish/guestfish-actions.pod:3860
14064 " pwrite path content offset\n"
14069 #: ../fish/guestfish-actions.pod:3862 ../src/guestfs-actions.pod:5914
14071 "This command writes to part of a file. It writes the data buffer C<content> "
14072 "to the file C<path> starting at offset C<offset>."
14076 #: ../fish/guestfish-actions.pod:3865 ../src/guestfs-actions.pod:5917
14078 "This command implements the L<pwrite(2)> system call, and like that system "
14079 "call it may not write the full data requested. The return value is the "
14080 "number of bytes that were actually written to the file. This could even be "
14081 "0, although short writes are unlikely for regular files in ordinary "
14086 #: ../fish/guestfish-actions.pod:3871
14087 msgid "See also L</pread>, L</pwrite-device>."
14091 #: ../fish/guestfish-actions.pod:3876
14092 msgid "pwrite-device"
14096 #: ../fish/guestfish-actions.pod:3878
14099 " pwrite-device device content offset\n"
14104 #: ../fish/guestfish-actions.pod:3880 ../src/guestfs-actions.pod:5941
14106 "This command writes to part of a device. It writes the data buffer "
14107 "C<content> to C<device> starting at offset C<offset>."
14111 #: ../fish/guestfish-actions.pod:3883 ../src/guestfs-actions.pod:5944
14113 "This command implements the L<pwrite(2)> system call, and like that system "
14114 "call it may not write the full data requested (although short writes to disk "
14115 "devices and partitions are probably impossible with standard Linux kernels)."
14119 #: ../fish/guestfish-actions.pod:3888
14120 msgid "See also L</pwrite>."
14124 #: ../fish/guestfish-actions.pod:3893
14129 #: ../fish/guestfish-actions.pod:3895
14132 " read-file path\n"
14137 #: ../fish/guestfish-actions.pod:3897 ../src/guestfs-actions.pod:5965
14138 msgid "This calls returns the contents of the file C<path> as a buffer."
14142 #: ../fish/guestfish-actions.pod:3900
14144 "Unlike L</cat>, this function can correctly handle files that contain "
14145 "embedded ASCII NUL characters. However unlike L</download>, this function "
14146 "is limited in the total size of file that can be handled."
14150 #: ../fish/guestfish-actions.pod:3908
14155 #: ../fish/guestfish-actions.pod:3910
14158 " read-lines path\n"
14163 #: ../fish/guestfish-actions.pod:3914 ../src/guestfs-actions.pod:5990
14165 "The file contents are returned as a list of lines. Trailing C<LF> and "
14166 "C<CRLF> character sequences are I<not> returned."
14170 #: ../fish/guestfish-actions.pod:3917
14172 "Note that this function cannot correctly handle binary files (specifically, "
14173 "files containing C<\\0> character which is treated as end of line). For "
14174 "those you need to use the L</read-file> function which has a more complex "
14179 #: ../fish/guestfish-actions.pod:3922
14184 #: ../fish/guestfish-actions.pod:3924
14192 #: ../fish/guestfish-actions.pod:3926 ../src/guestfs-actions.pod:6010
14193 msgid "This returns the list of directory entries in directory C<dir>."
14197 #: ../fish/guestfish-actions.pod:3928 ../src/guestfs-actions.pod:6012
14199 "All entries in the directory are returned, including C<.> and C<..>. The "
14200 "entries are I<not> sorted, but returned in the same order as the underlying "
14205 #: ../fish/guestfish-actions.pod:3932 ../src/guestfs-actions.pod:6016
14207 "Also this call returns basic file type information about each file. The "
14208 "C<ftyp> field will contain one of the following characters:"
14212 #: ../fish/guestfish-actions.pod:3937 ../src/guestfs-actions.pod:6021
14217 #: ../fish/guestfish-actions.pod:3939 ../src/guestfs-actions.pod:6023
14218 msgid "Block special"
14222 #: ../fish/guestfish-actions.pod:3941 ../src/guestfs-actions.pod:6025
14227 #: ../fish/guestfish-actions.pod:3943 ../src/guestfs-actions.pod:6027
14228 msgid "Char special"
14232 #: ../fish/guestfish-actions.pod:3945 ../src/guestfs-actions.pod:6029
14237 #: ../fish/guestfish-actions.pod:3947 ../src/guestfs-actions.pod:6031
14242 #: ../fish/guestfish-actions.pod:3949 ../src/guestfs-actions.pod:6033
14247 #: ../fish/guestfish-actions.pod:3951 ../src/guestfs-actions.pod:6035
14248 msgid "FIFO (named pipe)"
14252 #: ../fish/guestfish-actions.pod:3953 ../src/guestfs-actions.pod:6037
14257 #: ../fish/guestfish-actions.pod:3955 ../src/guestfs-actions.pod:6039
14258 msgid "Symbolic link"
14262 #: ../fish/guestfish-actions.pod:3957 ../src/guestfs-actions.pod:6041
14267 #: ../fish/guestfish-actions.pod:3959 ../src/guestfs-actions.pod:6043
14268 msgid "Regular file"
14272 #: ../fish/guestfish-actions.pod:3961 ../src/guestfs-actions.pod:6045
14277 #: ../fish/guestfish-actions.pod:3963 ../src/guestfs-actions.pod:6047
14282 #: ../fish/guestfish-actions.pod:3965 ../src/guestfs-actions.pod:6049
14287 #: ../fish/guestfish-actions.pod:3967 ../src/guestfs-actions.pod:6051
14288 msgid "Unknown file type"
14292 #: ../fish/guestfish-actions.pod:3969 ../src/guestfs-actions.pod:6053
14297 #: ../fish/guestfish-actions.pod:3971 ../src/guestfs-actions.pod:6055
14299 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
14303 #: ../fish/guestfish-actions.pod:3976
14305 "This function is primarily intended for use by programs. To get a simple "
14306 "list of names, use L</ls>. To get a printable directory for human "
14307 "consumption, use L</ll>."
14311 #: ../fish/guestfish-actions.pod:3980
14316 #: ../fish/guestfish-actions.pod:3982
14324 #: ../fish/guestfish-actions.pod:3984 ../src/guestfs-actions.pod:6076
14325 msgid "This command reads the target of a symbolic link."
14329 #: ../fish/guestfish-actions.pod:3986
14330 msgid "readlinklist"
14334 #: ../fish/guestfish-actions.pod:3988
14337 " readlinklist path 'names ...'\n"
14342 #: ../fish/guestfish-actions.pod:3990 ../src/guestfs-actions.pod:6090
14344 "This call allows you to do a C<readlink> operation on multiple files, where "
14345 "all files are in the directory C<path>. C<names> is the list of files from "
14350 #: ../fish/guestfish-actions.pod:3994 ../src/guestfs-actions.pod:6094
14352 "On return you get a list of strings, with a one-to-one correspondence to the "
14353 "C<names> list. Each string is the value of the symbolic link."
14357 #: ../fish/guestfish-actions.pod:3998 ../src/guestfs-actions.pod:6098
14359 "If the C<readlink(2)> operation fails on any name, then the corresponding "
14360 "result string is the empty string C<\"\">. However the whole operation is "
14361 "completed even if there were C<readlink(2)> errors, and so you can call this "
14362 "function with names where you don't know if they are symbolic links already "
14363 "(albeit slightly less efficient)."
14367 #: ../fish/guestfish-actions.pod:4005 ../src/guestfs-actions.pod:6105
14369 "This call is intended for programs that want to efficiently list a directory "
14370 "contents without making many round-trips. Very long directory listings "
14371 "might cause the protocol message size to be exceeded, causing this call to "
14372 "fail. The caller must split up such requests into smaller groups of names."
14376 #: ../fish/guestfish-actions.pod:4012
14381 #: ../fish/guestfish-actions.pod:4014
14389 #: ../fish/guestfish-actions.pod:4016 ../src/guestfs-actions.pod:6124
14391 "Return the canonicalized absolute pathname of C<path>. The returned path "
14392 "has no C<.>, C<..> or symbolic link path elements."
14396 #: ../fish/guestfish-actions.pod:4019
14397 msgid "removexattr"
14401 #: ../fish/guestfish-actions.pod:4021
14404 " removexattr xattr path\n"
14409 #: ../fish/guestfish-actions.pod:4023 ../src/guestfs-actions.pod:6139
14411 "This call removes the extended attribute named C<xattr> of the file C<path>."
14415 #: ../fish/guestfish-actions.pod:4026
14416 msgid "See also: L</lremovexattr>, L<attr(5)>."
14420 #: ../fish/guestfish-actions.pod:4028
14425 #: ../fish/guestfish-actions.pod:4030
14428 " resize2fs device\n"
14433 #: ../fish/guestfish-actions.pod:4032 ../src/guestfs-actions.pod:6154
14435 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14436 "underlying device."
14440 #: ../fish/guestfish-actions.pod:4035
14442 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
14443 "before calling this command. For unknown reasons C<resize2fs> sometimes "
14444 "gives an error about this and sometimes not. In any case, it is always safe "
14445 "to call L</e2fsck-f> before calling this function."
14449 #: ../fish/guestfish-actions.pod:4041
14450 msgid "resize2fs-M"
14454 #: ../fish/guestfish-actions.pod:4043
14457 " resize2fs-M device\n"
14462 #: ../fish/guestfish-actions.pod:4045
14464 "This command is the same as L</resize2fs>, but the filesystem is resized to "
14465 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
14470 #: ../fish/guestfish-actions.pod:4049
14472 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
14473 "and read the C<Block size> and C<Block count> values. These two numbers, "
14474 "multiplied together, give the resulting size of the minimal filesystem in "
14479 #: ../fish/guestfish-actions.pod:4054
14480 msgid "resize2fs-size"
14484 #: ../fish/guestfish-actions.pod:4056
14487 " resize2fs-size device size\n"
14492 #: ../fish/guestfish-actions.pod:4058
14494 "This command is the same as L</resize2fs> except that it allows you to "
14495 "specify the new size (in bytes) explicitly."
14499 #: ../fish/guestfish-actions.pod:4061
14504 #: ../fish/guestfish-actions.pod:4063
14512 #: ../fish/guestfish-actions.pod:4065 ../src/guestfs-actions.pod:6206
14513 msgid "Remove the single file C<path>."
14517 #: ../fish/guestfish-actions.pod:4067
14522 #: ../fish/guestfish-actions.pod:4069
14530 #: ../fish/guestfish-actions.pod:4071 ../src/guestfs-actions.pod:6218
14532 "Remove the file or directory C<path>, recursively removing the contents if "
14533 "its a directory. This is like the C<rm -rf> shell command."
14537 #: ../fish/guestfish-actions.pod:4075
14542 #: ../fish/guestfish-actions.pod:4077
14550 #: ../fish/guestfish-actions.pod:4079 ../src/guestfs-actions.pod:6232
14551 msgid "Remove the single directory C<path>."
14555 #: ../fish/guestfish-actions.pod:4081
14556 msgid "rmmountpoint"
14560 #: ../fish/guestfish-actions.pod:4083
14563 " rmmountpoint exemptpath\n"
14568 #: ../fish/guestfish-actions.pod:4085
14570 "This calls removes a mountpoint that was previously created with L</"
14571 "mkmountpoint>. See L</mkmountpoint> for full details."
14575 #: ../fish/guestfish-actions.pod:4089
14576 msgid "scrub-device"
14580 #: ../fish/guestfish-actions.pod:4091
14583 " scrub-device device\n"
14588 #: ../fish/guestfish-actions.pod:4093 ../src/guestfs-actions.pod:6258
14590 "This command writes patterns over C<device> to make data retrieval more "
14595 #: ../fish/guestfish-actions.pod:4096 ../fish/guestfish-actions.pod:4111
14596 #: ../fish/guestfish-actions.pod:4124 ../src/guestfs-actions.pod:6261
14597 #: ../src/guestfs-actions.pod:6282 ../src/guestfs-actions.pod:6301
14599 "It is an interface to the L<scrub(1)> program. See that manual page for "
14604 #: ../fish/guestfish-actions.pod:4102
14609 #: ../fish/guestfish-actions.pod:4104
14612 " scrub-file file\n"
14617 #: ../fish/guestfish-actions.pod:4106 ../src/guestfs-actions.pod:6277
14619 "This command writes patterns over a file to make data retrieval more "
14624 #: ../fish/guestfish-actions.pod:4109 ../src/guestfs-actions.pod:6280
14625 msgid "The file is I<removed> after scrubbing."
14629 #: ../fish/guestfish-actions.pod:4114
14630 msgid "scrub-freespace"
14634 #: ../fish/guestfish-actions.pod:4116
14637 " scrub-freespace dir\n"
14642 #: ../fish/guestfish-actions.pod:4118
14644 "This command creates the directory C<dir> and then fills it with files until "
14645 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
14646 "deletes them. The intention is to scrub any free space on the partition "
14647 "containing C<dir>."
14651 #: ../fish/guestfish-actions.pod:4127
14656 #: ../fish/guestfish-actions.pod:4129
14661 #: ../fish/guestfish-actions.pod:4131
14664 " set-append append\n"
14669 #: ../fish/guestfish-actions.pod:4133 ../src/guestfs-actions.pod:6314
14671 "This function is used to add additional options to the guest kernel command "
14676 #: ../fish/guestfish-actions.pod:4136 ../src/guestfs-actions.pod:6317
14678 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14679 "environment variable."
14683 #: ../fish/guestfish-actions.pod:4139 ../src/guestfs-actions.pod:6320
14685 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14686 "(libguestfs always adds a few of its own)."
14690 #: ../fish/guestfish-actions.pod:4142
14691 msgid "set-attach-method"
14695 #: ../fish/guestfish-actions.pod:4144
14696 msgid "attach-method"
14700 #: ../fish/guestfish-actions.pod:4146
14703 " set-attach-method attachmethod\n"
14708 #: ../fish/guestfish-actions.pod:4148 ../src/guestfs-actions.pod:6333
14710 "Set the method that libguestfs uses to connect to the back end guestfsd "
14711 "daemon. Possible methods are:"
14715 #: ../fish/guestfish-actions.pod:4153 ../src/guestfs-actions.pod:6338
14716 #: ../src/guestfs.pod:2901
14717 msgid "C<appliance>"
14721 #: ../fish/guestfish-actions.pod:4155 ../src/guestfs-actions.pod:6340
14723 "Launch an appliance and connect to it. This is the ordinary method and the "
14728 #: ../fish/guestfish-actions.pod:4158 ../src/guestfs-actions.pod:6343
14729 msgid "C<unix:I<path>>"
14733 #: ../fish/guestfish-actions.pod:4160 ../src/guestfs-actions.pod:6345
14734 msgid "Connect to the Unix domain socket I<path>."
14738 #: ../fish/guestfish-actions.pod:4162 ../src/guestfs-actions.pod:6347
14740 "This method lets you connect to an existing daemon or (using virtio-serial) "
14741 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
14742 "RUNNING DAEMONS>."
14746 #: ../fish/guestfish-actions.pod:4168
14747 msgid "set-autosync"
14751 #: ../fish/guestfish-actions.pod:4170
14756 #: ../fish/guestfish-actions.pod:4172
14759 " set-autosync true|false\n"
14764 #: ../fish/guestfish-actions.pod:4174 ../src/guestfs-actions.pod:6363
14766 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
14767 "effort attempt to make filesystems consistent and synchronized when the "
14768 "handle is closed (also if the program exits without closing handles)."
14772 #: ../fish/guestfish-actions.pod:4179 ../src/guestfs-actions.pod:6368
14774 "This is enabled by default (since libguestfs 1.5.24, previously it was "
14775 "disabled by default)."
14779 #: ../fish/guestfish-actions.pod:4182
14784 #: ../fish/guestfish-actions.pod:4184
14789 #: ../fish/guestfish-actions.pod:4186
14792 " set-direct true|false\n"
14797 #: ../fish/guestfish-actions.pod:4188 ../src/guestfs-actions.pod:6381
14799 "If the direct appliance mode flag is enabled, then stdin and stdout are "
14800 "passed directly through to the appliance once it is launched."
14804 #: ../fish/guestfish-actions.pod:4192
14806 "One consequence of this is that log messages aren't caught by the library "
14807 "and handled by L</set-log-message-callback>, but go straight to stdout."
14811 #: ../fish/guestfish-actions.pod:4196 ../src/guestfs-actions.pod:6389
14812 msgid "You probably don't want to use this unless you know what you are doing."
14816 #: ../fish/guestfish-actions.pod:4199 ../src/guestfs-actions.pod:6392
14817 msgid "The default is disabled."
14821 #: ../fish/guestfish-actions.pod:4201
14822 msgid "set-e2label"
14826 #: ../fish/guestfish-actions.pod:4203
14829 " set-e2label device label\n"
14834 #: ../fish/guestfish-actions.pod:4205 ../src/guestfs-actions.pod:6405
14836 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
14837 "C<label>. Filesystem labels are limited to 16 characters."
14841 #: ../fish/guestfish-actions.pod:4209
14843 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
14844 "label on a filesystem."
14848 #: ../fish/guestfish-actions.pod:4212
14853 #: ../fish/guestfish-actions.pod:4214
14856 " set-e2uuid device uuid\n"
14861 #: ../fish/guestfish-actions.pod:4216 ../src/guestfs-actions.pod:6423
14863 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
14864 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
14865 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
14869 #: ../fish/guestfish-actions.pod:4221
14871 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
14872 "UUID of a filesystem."
14876 #: ../fish/guestfish-actions.pod:4224
14877 msgid "set-memsize"
14881 #: ../fish/guestfish-actions.pod:4226
14886 #: ../fish/guestfish-actions.pod:4228
14889 " set-memsize memsize\n"
14894 #: ../fish/guestfish-actions.pod:4230
14896 "This sets the memory size in megabytes allocated to the qemu subprocess. "
14897 "This only has any effect if called before L</launch>."
14901 #: ../fish/guestfish-actions.pod:4234 ../src/guestfs-actions.pod:6445
14903 "You can also change this by setting the environment variable "
14904 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
14908 #: ../fish/guestfish-actions.pod:4241
14909 msgid "set-network"
14913 #: ../fish/guestfish-actions.pod:4243
14918 #: ../fish/guestfish-actions.pod:4245
14921 " set-network true|false\n"
14926 #: ../fish/guestfish-actions.pod:4247 ../src/guestfs-actions.pod:6462
14928 "If C<network> is true, then the network is enabled in the libguestfs "
14929 "appliance. The default is false."
14933 #: ../fish/guestfish-actions.pod:4250 ../src/guestfs-actions.pod:6465
14935 "This affects whether commands are able to access the network (see L<guestfs"
14936 "(3)/RUNNING COMMANDS>)."
14940 #: ../fish/guestfish-actions.pod:4253
14942 "You must call this before calling L</launch>, otherwise it has no effect."
14946 #: ../fish/guestfish-actions.pod:4256
14951 #: ../fish/guestfish-actions.pod:4260
14954 " set-path searchpath\n"
14959 #: ../fish/guestfish-actions.pod:4262 ../src/guestfs-actions.pod:6481
14960 msgid "Set the path that libguestfs searches for kernel and initrd.img."
14964 #: ../fish/guestfish-actions.pod:4264 ../src/guestfs-actions.pod:6483
14966 "The default is C<$libdir/guestfs> unless overridden by setting "
14967 "C<LIBGUESTFS_PATH> environment variable."
14971 #: ../fish/guestfish-actions.pod:4267 ../src/guestfs-actions.pod:6486
14972 msgid "Setting C<path> to C<NULL> restores the default path."
14976 #: ../fish/guestfish-actions.pod:4269
14981 #: ../fish/guestfish-actions.pod:4271
14986 #: ../fish/guestfish-actions.pod:4273
14989 " set-pgroup true|false\n"
14994 #: ../fish/guestfish-actions.pod:4275 ../src/guestfs-actions.pod:6498
14996 "If C<pgroup> is true, child processes are placed into their own process "
15001 #: ../fish/guestfish-actions.pod:4278 ../src/guestfs-actions.pod:6501
15003 "The practical upshot of this is that signals like C<SIGINT> (from users "
15004 "pressing C<^C>) won't be received by the child process."
15008 #: ../fish/guestfish-actions.pod:4281 ../src/guestfs-actions.pod:6504
15010 "The default for this flag is false, because usually you want C<^C> to kill "
15015 #: ../fish/guestfish-actions.pod:4284
15020 #: ../fish/guestfish-actions.pod:4286
15025 #: ../fish/guestfish-actions.pod:4288
15033 #: ../fish/guestfish-actions.pod:4290 ../src/guestfs-actions.pod:6517
15034 msgid "Set the qemu binary that we will use."
15038 #: ../fish/guestfish-actions.pod:4292 ../src/guestfs-actions.pod:6519
15040 "The default is chosen when the library was compiled by the configure script."
15044 #: ../fish/guestfish-actions.pod:4295 ../src/guestfs-actions.pod:6522
15046 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
15051 #: ../fish/guestfish-actions.pod:4298 ../src/guestfs-actions.pod:6525
15052 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
15056 #: ../fish/guestfish-actions.pod:4300 ../src/guestfs-actions.pod:6527
15058 "Note that you should call this function as early as possible after creating "
15059 "the handle. This is because some pre-launch operations depend on testing "
15060 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
15061 "don't retest features, and so you might see inconsistent results. Using the "
15062 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
15063 "the qemu binary at the same time as the handle is created."
15067 #: ../fish/guestfish-actions.pod:4308
15068 msgid "set-recovery-proc"
15072 #: ../fish/guestfish-actions.pod:4310
15073 msgid "recovery-proc"
15077 #: ../fish/guestfish-actions.pod:4312
15080 " set-recovery-proc true|false\n"
15085 #: ../fish/guestfish-actions.pod:4314
15087 "If this is called with the parameter C<false> then L</launch> does not "
15088 "create a recovery process. The purpose of the recovery process is to stop "
15089 "runaway qemu processes in the case where the main program aborts abruptly."
15093 #: ../fish/guestfish-actions.pod:4319
15095 "This only has any effect if called before L</launch>, and the default is "
15100 #: ../fish/guestfish-actions.pod:4322 ../src/guestfs-actions.pod:6553
15102 "About the only time when you would want to disable this is if the main "
15103 "process will fork itself into the background (\"daemonize\" itself). In "
15104 "this case the recovery process thinks that the main program has disappeared "
15105 "and so kills qemu, which is not very helpful."
15109 #: ../fish/guestfish-actions.pod:4328
15110 msgid "set-selinux"
15114 #: ../fish/guestfish-actions.pod:4330
15119 #: ../fish/guestfish-actions.pod:4332
15122 " set-selinux true|false\n"
15127 #: ../fish/guestfish-actions.pod:4334 ../src/guestfs-actions.pod:6569
15129 "This sets the selinux flag that is passed to the appliance at boot time. "
15130 "The default is C<selinux=0> (disabled)."
15134 #: ../fish/guestfish-actions.pod:4337 ../src/guestfs-actions.pod:6572
15136 "Note that if SELinux is enabled, it is always in Permissive mode "
15137 "(C<enforcing=0>)."
15141 #: ../fish/guestfish-actions.pod:4343
15146 #: ../fish/guestfish-actions.pod:4345
15151 #: ../fish/guestfish-actions.pod:4347
15159 #: ../fish/guestfish-actions.pod:4349 ../src/guestfs-actions.pod:6588
15161 "Change the number of virtual CPUs assigned to the appliance. The default is "
15162 "C<1>. Increasing this may improve performance, though often it has no "
15167 #: ../fish/guestfish-actions.pod:4353
15168 msgid "This function must be called before L</launch>."
15172 #: ../fish/guestfish-actions.pod:4355
15177 #: ../fish/guestfish-actions.pod:4357
15182 #: ../fish/guestfish-actions.pod:4359
15185 " set-trace true|false\n"
15190 #: ../fish/guestfish-actions.pod:4361 ../src/guestfs-actions.pod:6604
15192 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
15193 "return values are traced."
15197 #: ../fish/guestfish-actions.pod:4364 ../src/guestfs-actions.pod:6607
15199 "If you want to trace C API calls into libguestfs (and other libraries) then "
15200 "possibly a better way is to use the external ltrace(1) command."
15204 #: ../fish/guestfish-actions.pod:4368 ../src/guestfs-actions.pod:6611
15206 "Command traces are disabled unless the environment variable "
15207 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
15211 #: ../fish/guestfish-actions.pod:4371
15213 "Trace messages are normally sent to C<stderr>, unless you register a "
15214 "callback to send them somewhere else (see L</set-event-callback>)."
15218 #: ../fish/guestfish-actions.pod:4375
15219 msgid "set-verbose"
15223 #: ../fish/guestfish-actions.pod:4377
15228 #: ../fish/guestfish-actions.pod:4379
15231 " set-verbose true|false\n"
15236 #: ../fish/guestfish-actions.pod:4381 ../src/guestfs-actions.pod:6628
15237 msgid "If C<verbose> is true, this turns on verbose messages."
15241 #: ../fish/guestfish-actions.pod:4383 ../src/guestfs-actions.pod:6630
15243 "Verbose messages are disabled unless the environment variable "
15244 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
15248 #: ../fish/guestfish-actions.pod:4386
15250 "Verbose messages are normally sent to C<stderr>, unless you register a "
15251 "callback to send them somewhere else (see L</set-event-callback>)."
15255 #: ../fish/guestfish-actions.pod:4390
15260 #: ../fish/guestfish-actions.pod:4392
15263 " setcon context\n"
15268 #: ../fish/guestfish-actions.pod:4394 ../src/guestfs-actions.pod:6647
15270 "This sets the SELinux security context of the daemon to the string "
15275 #: ../fish/guestfish-actions.pod:4397 ../src/guestfs-actions.pod:6650
15276 msgid "See the documentation about SELINUX in L<guestfs(3)>."
15280 #: ../fish/guestfish-actions.pod:4399
15285 #: ../fish/guestfish-actions.pod:4401
15288 " setxattr xattr val vallen path\n"
15293 #: ../fish/guestfish-actions.pod:4403 ../src/guestfs-actions.pod:6665
15295 "This call sets the extended attribute named C<xattr> of the file C<path> to "
15296 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
15300 #: ../fish/guestfish-actions.pod:4407
15301 msgid "See also: L</lsetxattr>, L<attr(5)>."
15305 #: ../fish/guestfish-actions.pod:4409
15310 #: ../fish/guestfish-actions.pod:4411
15313 " sfdisk device cyls heads sectors 'lines ...'\n"
15318 #: ../fish/guestfish-actions.pod:4413 ../src/guestfs-actions.pod:6692
15320 "This is a direct interface to the L<sfdisk(8)> program for creating "
15321 "partitions on block devices."
15325 #: ../fish/guestfish-actions.pod:4416 ../src/guestfs-actions.pod:6695
15326 msgid "C<device> should be a block device, for example C</dev/sda>."
15330 #: ../fish/guestfish-actions.pod:4418 ../src/guestfs-actions.pod:6697
15332 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
15333 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
15334 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
15335 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
15336 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
15337 "the kernel) cannot work out the right geometry and you will need to tell it."
15341 #: ../fish/guestfish-actions.pod:4426 ../src/guestfs-actions.pod:6705
15343 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
15344 "refer to the L<sfdisk(8)> manpage."
15348 #: ../fish/guestfish-actions.pod:4429 ../src/guestfs-actions.pod:6708
15350 "To create a single partition occupying the whole disk, you would pass "
15351 "C<lines> as a single element list, when the single element being the string "
15356 #: ../fish/guestfish-actions.pod:4433
15357 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
15361 #: ../fish/guestfish-actions.pod:4439 ../fish/guestfish-actions.pod:4462
15362 #: ../fish/guestfish-actions.pod:4484
15364 "I<This function is deprecated.> In new code, use the L</part_add> call "
15369 #: ../fish/guestfish-actions.pod:4446
15374 #: ../fish/guestfish-actions.pod:4448
15377 " sfdiskM device 'lines ...'\n"
15382 #: ../fish/guestfish-actions.pod:4450
15384 "This is a simplified interface to the L</sfdisk> command, where partition "
15385 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
15386 "you don't need to specify the cyls, heads and sectors parameters which were "
15387 "rarely if ever used anyway."
15391 #: ../fish/guestfish-actions.pod:4456
15392 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
15396 #: ../fish/guestfish-actions.pod:4469
15401 #: ../fish/guestfish-actions.pod:4471
15404 " sfdisk-N device partnum cyls heads sectors line\n"
15409 #: ../fish/guestfish-actions.pod:4473 ../src/guestfs-actions.pod:6770
15411 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
15412 "(note: C<n> counts from 1)."
15416 #: ../fish/guestfish-actions.pod:4476
15418 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
15419 "cyls/heads/sectors parameters."
15423 #: ../fish/guestfish-actions.pod:4479
15424 msgid "See also: L</part-add>"
15428 #: ../fish/guestfish-actions.pod:4491
15429 msgid "sfdisk-disk-geometry"
15433 #: ../fish/guestfish-actions.pod:4493
15436 " sfdisk-disk-geometry device\n"
15441 #: ../fish/guestfish-actions.pod:4495
15443 "This displays the disk geometry of C<device> read from the partition table. "
15444 "Especially in the case where the underlying block device has been resized, "
15445 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
15446 "kernel-geometry>)."
15450 #: ../fish/guestfish-actions.pod:4500 ../fish/guestfish-actions.pod:4509
15451 #: ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6812
15452 msgid "The result is in human-readable format, and not designed to be parsed."
15456 #: ../fish/guestfish-actions.pod:4503
15457 msgid "sfdisk-kernel-geometry"
15461 #: ../fish/guestfish-actions.pod:4505
15464 " sfdisk-kernel-geometry device\n"
15469 #: ../fish/guestfish-actions.pod:4507 ../src/guestfs-actions.pod:6810
15470 msgid "This displays the kernel's idea of the geometry of C<device>."
15474 #: ../fish/guestfish-actions.pod:4512
15479 #: ../fish/guestfish-actions.pod:4514
15482 " sfdisk-l device\n"
15487 #: ../fish/guestfish-actions.pod:4516 ../src/guestfs-actions.pod:6833
15489 "This displays the partition table on C<device>, in the human-readable output "
15490 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15494 #: ../fish/guestfish-actions.pod:4520
15495 msgid "See also: L</part-list>"
15499 #: ../fish/guestfish-actions.pod:4522
15501 "I<This function is deprecated.> In new code, use the L</part_list> call "
15506 #: ../fish/guestfish-actions.pod:4529
15511 #: ../fish/guestfish-actions.pod:4531
15519 #: ../fish/guestfish-actions.pod:4533 ../src/guestfs-actions.pod:6850
15521 "This call runs a command from the guest filesystem via the guest's C</bin/"
15526 #: ../fish/guestfish-actions.pod:4536
15527 msgid "This is like L</command>, but passes the command to:"
15531 #: ../fish/guestfish-actions.pod:4538 ../src/guestfs-actions.pod:6855
15534 " /bin/sh -c \"command\"\n"
15539 #: ../fish/guestfish-actions.pod:4540 ../src/guestfs-actions.pod:6857
15541 "Depending on the guest's shell, this usually results in wildcards being "
15542 "expanded, shell expressions being interpolated and so on."
15546 #: ../fish/guestfish-actions.pod:4544
15547 msgid "All the provisos about L</command> apply to this call."
15551 #: ../fish/guestfish-actions.pod:4546
15556 #: ../fish/guestfish-actions.pod:4548
15559 " sh-lines command\n"
15564 #: ../fish/guestfish-actions.pod:4550
15565 msgid "This is the same as L</sh>, but splits the result into a list of lines."
15569 #: ../fish/guestfish-actions.pod:4553
15570 msgid "See also: L</command-lines>"
15574 #: ../fish/guestfish-actions.pod:4555
15579 #: ../fish/guestfish-actions.pod:4557
15587 #: ../fish/guestfish-actions.pod:4559 ../src/guestfs-actions.pod:6891
15588 msgid "Sleep for C<secs> seconds."
15592 #: ../fish/guestfish-actions.pod:4561
15597 #: ../fish/guestfish-actions.pod:4563
15605 #: ../fish/guestfish-actions.pod:4567 ../src/guestfs-actions.pod:6905
15606 msgid "This is the same as the C<stat(2)> system call."
15610 #: ../fish/guestfish-actions.pod:4569
15615 #: ../fish/guestfish-actions.pod:4571
15623 #: ../fish/guestfish-actions.pod:4573 ../src/guestfs-actions.pod:6919
15625 "Returns file system statistics for any mounted file system. C<path> should "
15626 "be a file or directory in the mounted file system (typically it is the mount "
15627 "point itself, but it doesn't need to be)."
15631 #: ../fish/guestfish-actions.pod:4577 ../src/guestfs-actions.pod:6923
15632 msgid "This is the same as the C<statvfs(2)> system call."
15636 #: ../fish/guestfish-actions.pod:4579
15641 #: ../fish/guestfish-actions.pod:4581
15649 #: ../fish/guestfish-actions.pod:4583 ../src/guestfs-actions.pod:6937
15651 "This runs the L<strings(1)> command on a file and returns the list of "
15652 "printable strings found."
15656 #: ../fish/guestfish-actions.pod:4589
15661 #: ../fish/guestfish-actions.pod:4591
15664 " strings-e encoding path\n"
15669 #: ../fish/guestfish-actions.pod:4593
15671 "This is like the L</strings> command, but allows you to specify the encoding "
15672 "of strings that are looked for in the source file C<path>."
15676 #: ../fish/guestfish-actions.pod:4597 ../src/guestfs-actions.pod:6960
15677 msgid "Allowed encodings are:"
15681 #: ../fish/guestfish-actions.pod:4601 ../src/guestfs-actions.pod:6964
15686 #: ../fish/guestfish-actions.pod:4603
15688 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15689 "ISO-8859-X (this is what L</strings> uses)."
15693 #: ../fish/guestfish-actions.pod:4606 ../src/guestfs-actions.pod:6969
15698 #: ../fish/guestfish-actions.pod:4608 ../src/guestfs-actions.pod:6971
15699 msgid "Single 8-bit-byte characters."
15703 #: ../fish/guestfish-actions.pod:4610 ../src/guestfs-actions.pod:6973
15708 #: ../fish/guestfish-actions.pod:4612 ../src/guestfs-actions.pod:6975
15709 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15713 #: ../fish/guestfish-actions.pod:4615 ../src/guestfs-actions.pod:6978
15714 msgid "l (lower case letter L)"
15718 #: ../fish/guestfish-actions.pod:4617 ../src/guestfs-actions.pod:6980
15720 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
15721 "examining binaries in Windows guests."
15725 #: ../fish/guestfish-actions.pod:4620 ../src/guestfs-actions.pod:6983
15730 #: ../fish/guestfish-actions.pod:4622 ../src/guestfs-actions.pod:6985
15731 msgid "32-bit big endian such as UCS-4BE."
15735 #: ../fish/guestfish-actions.pod:4624 ../src/guestfs-actions.pod:6987
15740 #: ../fish/guestfish-actions.pod:4626 ../src/guestfs-actions.pod:6989
15741 msgid "32-bit little endian such as UCS-4LE."
15745 #: ../fish/guestfish-actions.pod:4630 ../src/guestfs-actions.pod:6993
15746 msgid "The returned strings are transcoded to UTF-8."
15750 #: ../fish/guestfish-actions.pod:4635
15751 msgid "swapoff-device"
15755 #: ../fish/guestfish-actions.pod:4637
15758 " swapoff-device device\n"
15763 #: ../fish/guestfish-actions.pod:4639
15765 "This command disables the libguestfs appliance swap device or partition "
15766 "named C<device>. See L</swapon-device>."
15770 #: ../fish/guestfish-actions.pod:4643
15771 msgid "swapoff-file"
15775 #: ../fish/guestfish-actions.pod:4645
15778 " swapoff-file file\n"
15783 #: ../fish/guestfish-actions.pod:4647 ../src/guestfs-actions.pod:7024
15784 msgid "This command disables the libguestfs appliance swap on file."
15788 #: ../fish/guestfish-actions.pod:4649
15789 msgid "swapoff-label"
15793 #: ../fish/guestfish-actions.pod:4651
15796 " swapoff-label label\n"
15801 #: ../fish/guestfish-actions.pod:4653 ../src/guestfs-actions.pod:7036
15803 "This command disables the libguestfs appliance swap on labeled swap "
15808 #: ../fish/guestfish-actions.pod:4656
15809 msgid "swapoff-uuid"
15813 #: ../fish/guestfish-actions.pod:4658
15816 " swapoff-uuid uuid\n"
15821 #: ../fish/guestfish-actions.pod:4660 ../src/guestfs-actions.pod:7049
15823 "This command disables the libguestfs appliance swap partition with the given "
15828 #: ../fish/guestfish-actions.pod:4663
15829 msgid "swapon-device"
15833 #: ../fish/guestfish-actions.pod:4665
15836 " swapon-device device\n"
15841 #: ../fish/guestfish-actions.pod:4667
15843 "This command enables the libguestfs appliance to use the swap device or "
15844 "partition named C<device>. The increased memory is made available for all "
15845 "commands, for example those run using L</command> or L</sh>."
15849 #: ../fish/guestfish-actions.pod:4672 ../src/guestfs-actions.pod:7067
15851 "Note that you should not swap to existing guest swap partitions unless you "
15852 "know what you are doing. They may contain hibernation information, or other "
15853 "information that the guest doesn't want you to trash. You also risk leaking "
15854 "information about the host to the guest this way. Instead, attach a new "
15855 "host device to the guest and swap on that."
15859 #: ../fish/guestfish-actions.pod:4679
15860 msgid "swapon-file"
15864 #: ../fish/guestfish-actions.pod:4681
15867 " swapon-file file\n"
15872 #: ../fish/guestfish-actions.pod:4683
15874 "This command enables swap to a file. See L</swapon-device> for other notes."
15878 #: ../fish/guestfish-actions.pod:4686
15879 msgid "swapon-label"
15883 #: ../fish/guestfish-actions.pod:4688
15886 " swapon-label label\n"
15891 #: ../fish/guestfish-actions.pod:4690
15893 "This command enables swap to a labeled swap partition. See L</swapon-"
15894 "device> for other notes."
15898 #: ../fish/guestfish-actions.pod:4693
15899 msgid "swapon-uuid"
15903 #: ../fish/guestfish-actions.pod:4695
15906 " swapon-uuid uuid\n"
15911 #: ../fish/guestfish-actions.pod:4697
15913 "This command enables swap to a swap partition with the given UUID. See L</"
15914 "swapon-device> for other notes."
15918 #: ../fish/guestfish-actions.pod:4700
15923 #: ../fish/guestfish-actions.pod:4702
15931 #: ../fish/guestfish-actions.pod:4704 ../src/guestfs-actions.pod:7122
15933 "This syncs the disk, so that any writes are flushed through to the "
15934 "underlying disk image."
15938 #: ../fish/guestfish-actions.pod:4707 ../src/guestfs-actions.pod:7125
15940 "You should always call this if you have modified a disk image, before "
15941 "closing the handle."
15945 #: ../fish/guestfish-actions.pod:4710
15950 #: ../fish/guestfish-actions.pod:4712
15958 #: ../fish/guestfish-actions.pod:4714 ../src/guestfs-actions.pod:7138
15960 "This command returns up to the last 10 lines of a file as a list of strings."
15964 #: ../fish/guestfish-actions.pod:4720
15969 #: ../fish/guestfish-actions.pod:4722
15972 " tail-n nrlines path\n"
15977 #: ../fish/guestfish-actions.pod:4724 ../src/guestfs-actions.pod:7157
15979 "If the parameter C<nrlines> is a positive number, this returns the last "
15980 "C<nrlines> lines of the file C<path>."
15984 #: ../fish/guestfish-actions.pod:4727 ../src/guestfs-actions.pod:7160
15986 "If the parameter C<nrlines> is a negative number, this returns lines from "
15987 "the file C<path>, starting with the C<-nrlines>th line."
15991 #: ../fish/guestfish-actions.pod:4735
15996 #: ../fish/guestfish-actions.pod:4737
15999 " tar-in (tarfile|-) directory\n"
16004 #: ../fish/guestfish-actions.pod:4739 ../src/guestfs-actions.pod:7181
16006 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
16007 "tar file) into C<directory>."
16011 #: ../fish/guestfish-actions.pod:4742
16012 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
16016 #: ../fish/guestfish-actions.pod:4747
16021 #: ../fish/guestfish-actions.pod:4749
16024 " tar-out directory (tarfile|-)\n"
16029 #: ../fish/guestfish-actions.pod:4751 ../src/guestfs-actions.pod:7198
16031 "This command packs the contents of C<directory> and downloads it to local "
16036 #: ../fish/guestfish-actions.pod:4754
16037 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
16041 #: ../fish/guestfish-actions.pod:4759
16046 #: ../fish/guestfish-actions.pod:4761
16049 " tgz-in (tarball|-) directory\n"
16054 #: ../fish/guestfish-actions.pod:4763 ../src/guestfs-actions.pod:7215
16056 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
16057 "tar file) into C<directory>."
16061 #: ../fish/guestfish-actions.pod:4766
16062 msgid "To upload an uncompressed tarball, use L</tar-in>."
16066 #: ../fish/guestfish-actions.pod:4770
16071 #: ../fish/guestfish-actions.pod:4772
16074 " tgz-out directory (tarball|-)\n"
16079 #: ../fish/guestfish-actions.pod:4774 ../src/guestfs-actions.pod:7231
16081 "This command packs the contents of C<directory> and downloads it to local "
16086 #: ../fish/guestfish-actions.pod:4777
16087 msgid "To download an uncompressed tarball, use L</tar-out>."
16091 #: ../fish/guestfish-actions.pod:4781
16096 #: ../fish/guestfish-actions.pod:4783
16104 #: ../fish/guestfish-actions.pod:4785 ../src/guestfs-actions.pod:7246
16106 "Touch acts like the L<touch(1)> command. It can be used to update the "
16107 "timestamps on a file, or, if the file does not exist, to create a new zero-"
16112 #: ../fish/guestfish-actions.pod:4789 ../src/guestfs-actions.pod:7250
16114 "This command only works on regular files, and will fail on other file types "
16115 "such as directories, symbolic links, block special etc."
16119 #: ../fish/guestfish-actions.pod:4792
16124 #: ../fish/guestfish-actions.pod:4794
16132 #: ../fish/guestfish-actions.pod:4796 ../src/guestfs-actions.pod:7263
16134 "This command truncates C<path> to a zero-length file. The file must exist "
16139 #: ../fish/guestfish-actions.pod:4799
16140 msgid "truncate-size"
16144 #: ../fish/guestfish-actions.pod:4801
16147 " truncate-size path size\n"
16152 #: ../fish/guestfish-actions.pod:4803 ../src/guestfs-actions.pod:7277
16154 "This command truncates C<path> to size C<size> bytes. The file must exist "
16159 #: ../fish/guestfish-actions.pod:4806
16161 "If the current file size is less than C<size> then the file is extended to "
16162 "the required size with zero bytes. This creates a sparse file (ie. disk "
16163 "blocks are not allocated for the file until you write to it). To create a "
16164 "non-sparse file of zeroes, use L</fallocate64> instead."
16168 #: ../fish/guestfish-actions.pod:4812
16173 #: ../fish/guestfish-actions.pod:4814
16176 " tune2fs-l device\n"
16181 #: ../fish/guestfish-actions.pod:4816 ../src/guestfs-actions.pod:7296
16183 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
16188 #: ../fish/guestfish-actions.pod:4819 ../src/guestfs-actions.pod:7299
16190 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
16191 "for more details. The list of fields returned isn't clearly defined, and "
16192 "depends on both the version of C<tune2fs> that libguestfs was built against, "
16193 "and the filesystem itself."
16197 #: ../fish/guestfish-actions.pod:4824
16202 #: ../fish/guestfish-actions.pod:4826
16205 " txz-in (tarball|-) directory\n"
16210 #: ../fish/guestfish-actions.pod:4828 ../src/guestfs-actions.pod:7319
16212 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
16213 "tar file) into C<directory>."
16217 #: ../fish/guestfish-actions.pod:4833
16222 #: ../fish/guestfish-actions.pod:4835
16225 " txz-out directory (tarball|-)\n"
16230 #: ../fish/guestfish-actions.pod:4837 ../src/guestfs-actions.pod:7333
16232 "This command packs the contents of C<directory> and downloads it to local "
16233 "file C<tarball> (as an xz compressed tar archive)."
16237 #: ../fish/guestfish-actions.pod:4842
16242 #: ../fish/guestfish-actions.pod:4844
16250 #: ../fish/guestfish-actions.pod:4846 ../src/guestfs-actions.pod:7346
16252 "This function sets the mask used for creating new files and device nodes to "
16257 #: ../fish/guestfish-actions.pod:4849 ../src/guestfs-actions.pod:7349
16259 "Typical umask values would be C<022> which creates new files with "
16260 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
16261 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
16265 #: ../fish/guestfish-actions.pod:4854 ../src/guestfs-actions.pod:7354
16267 "The default umask is C<022>. This is important because it means that "
16268 "directories and device nodes will be created with C<0644> or C<0755> mode "
16269 "even if you specify C<0777>."
16273 #: ../fish/guestfish-actions.pod:4858
16274 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
16278 #: ../fish/guestfish-actions.pod:4861 ../src/guestfs-actions.pod:7361
16279 msgid "This call returns the previous umask."
16283 #: ../fish/guestfish-actions.pod:4863
16288 #: ../fish/guestfish-actions.pod:4865
16293 #: ../fish/guestfish-actions.pod:4867
16296 " umount pathordevice\n"
16301 #: ../fish/guestfish-actions.pod:4869 ../src/guestfs-actions.pod:7373
16303 "This unmounts the given filesystem. The filesystem may be specified either "
16304 "by its mountpoint (path) or the device which contains the filesystem."
16308 #: ../fish/guestfish-actions.pod:4873
16313 #: ../fish/guestfish-actions.pod:4875
16314 msgid "unmount-all"
16318 #: ../fish/guestfish-actions.pod:4877
16326 #: ../fish/guestfish-actions.pod:4879 ../src/guestfs-actions.pod:7386
16327 msgid "This unmounts all mounted filesystems."
16331 #: ../fish/guestfish-actions.pod:4881 ../src/guestfs-actions.pod:7388
16332 msgid "Some internal mounts are not unmounted by this call."
16336 #: ../fish/guestfish-actions.pod:4883
16341 #: ../fish/guestfish-actions.pod:4885
16344 " upload (filename|-) remotefilename\n"
16349 #: ../fish/guestfish-actions.pod:4887 ../fish/guestfish-actions.pod:4900
16350 #: ../src/guestfs-actions.pod:7401 ../src/guestfs-actions.pod:7425
16351 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
16355 #: ../fish/guestfish-actions.pod:4892
16356 msgid "See also L</download>."
16360 #: ../fish/guestfish-actions.pod:4896
16361 msgid "upload-offset"
16365 #: ../fish/guestfish-actions.pod:4898
16368 " upload-offset (filename|-) remotefilename offset\n"
16373 #: ../fish/guestfish-actions.pod:4903 ../src/guestfs-actions.pod:7428
16375 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
16376 "The intention is to overwrite parts of existing files or devices, although "
16377 "if a non-existant file is specified then it is created with a \"hole\" "
16378 "before C<offset>. The size of the data written is implicit in the size of "
16379 "the source C<filename>."
16383 #: ../fish/guestfish-actions.pod:4910
16385 "Note that there is no limit on the amount of data that can be uploaded with "
16386 "this call, unlike with L</pwrite>, and this call always writes the full "
16387 "amount unless an error occurs."
16391 #: ../fish/guestfish-actions.pod:4915
16392 msgid "See also L</upload>, L</pwrite>."
16396 #: ../fish/guestfish-actions.pod:4919
16401 #: ../fish/guestfish-actions.pod:4921
16404 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
16409 #: ../fish/guestfish-actions.pod:4923 ../src/guestfs-actions.pod:7461
16410 msgid "This command sets the timestamps of a file with nanosecond precision."
16414 #: ../fish/guestfish-actions.pod:4926 ../src/guestfs-actions.pod:7464
16416 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16421 #: ../fish/guestfish-actions.pod:4929 ../src/guestfs-actions.pod:7467
16423 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16424 "nanoseconds from the epoch."
16428 #: ../fish/guestfish-actions.pod:4932 ../src/guestfs-actions.pod:7470
16430 "If the C<*nsecs> field contains the special value C<-1> then the "
16431 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16432 "ignored in this case)."
16436 #: ../fish/guestfish-actions.pod:4936 ../src/guestfs-actions.pod:7474
16438 "If the C<*nsecs> field contains the special value C<-2> then the "
16439 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16444 #: ../fish/guestfish-actions.pod:4940
16449 #: ../fish/guestfish-actions.pod:4942
16457 #: ../fish/guestfish-actions.pod:4944 ../src/guestfs-actions.pod:7487
16459 "Return the libguestfs version number that the program is linked against."
16463 #: ../fish/guestfish-actions.pod:4947 ../src/guestfs-actions.pod:7490
16465 "Note that because of dynamic linking this is not necessarily the version of "
16466 "libguestfs that you compiled against. You can compile the program, and then "
16467 "at runtime dynamically link against a completely different C<libguestfs.so> "
16472 #: ../fish/guestfish-actions.pod:4952 ../src/guestfs-actions.pod:7495
16474 "This call was added in version C<1.0.58>. In previous versions of "
16475 "libguestfs there was no way to get the version number. From C code you can "
16476 "use dynamic linker functions to find out if this symbol exists (if it "
16477 "doesn't, then it's an earlier version)."
16481 #: ../fish/guestfish-actions.pod:4958 ../src/guestfs-actions.pod:7501
16483 "The call returns a structure with four elements. The first three (C<major>, "
16484 "C<minor> and C<release>) are numbers and correspond to the usual version "
16485 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16486 "but may be used for distro-specific information."
16490 #: ../fish/guestfish-actions.pod:4964 ../src/guestfs-actions.pod:7507
16492 "To construct the original version string: C<$major.$minor.$release$extra>"
16496 #: ../fish/guestfish-actions.pod:4967 ../src/guestfs-actions.pod:7510
16497 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16501 #: ../fish/guestfish-actions.pod:4969
16503 "I<Note:> Don't use this call to test for availability of features. In "
16504 "enterprise distributions we backport features from later versions into "
16505 "earlier versions, making this an unreliable way to test for features. Use "
16506 "L</available> instead."
16510 #: ../fish/guestfish-actions.pod:4975
16515 #: ../fish/guestfish-actions.pod:4977
16518 " vfs-label device\n"
16523 #: ../fish/guestfish-actions.pod:4979 ../src/guestfs-actions.pod:7530
16524 msgid "This returns the filesystem label of the filesystem on C<device>."
16528 #: ../fish/guestfish-actions.pod:4982 ../src/guestfs-actions.pod:7533
16529 msgid "If the filesystem is unlabeled, this returns the empty string."
16533 #: ../fish/guestfish-actions.pod:4984
16534 msgid "To find a filesystem from the label, use L</findfs-label>."
16538 #: ../fish/guestfish-actions.pod:4986
16543 #: ../fish/guestfish-actions.pod:4988
16546 " vfs-type device\n"
16551 #: ../fish/guestfish-actions.pod:4990 ../src/guestfs-actions.pod:7548
16553 "This command gets the filesystem type corresponding to the filesystem on "
16558 #: ../fish/guestfish-actions.pod:4993 ../src/guestfs-actions.pod:7551
16560 "For most filesystems, the result is the name of the Linux VFS module which "
16561 "would be used to mount this filesystem if you mounted it without specifying "
16562 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16566 #: ../fish/guestfish-actions.pod:4998
16571 #: ../fish/guestfish-actions.pod:5000
16574 " vfs-uuid device\n"
16579 #: ../fish/guestfish-actions.pod:5002 ../src/guestfs-actions.pod:7567
16580 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16584 #: ../fish/guestfish-actions.pod:5005 ../src/guestfs-actions.pod:7570
16585 msgid "If the filesystem does not have a UUID, this returns the empty string."
16589 #: ../fish/guestfish-actions.pod:5007
16590 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
16594 #: ../fish/guestfish-actions.pod:5009
16595 msgid "vg-activate"
16599 #: ../fish/guestfish-actions.pod:5011
16602 " vg-activate true|false 'volgroups ...'\n"
16607 #: ../fish/guestfish-actions.pod:5013 ../src/guestfs-actions.pod:7586
16609 "This command activates or (if C<activate> is false) deactivates all logical "
16610 "volumes in the listed volume groups C<volgroups>."
16614 #: ../fish/guestfish-actions.pod:5016 ../src/guestfs-actions.pod:7589
16615 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16619 #: ../fish/guestfish-actions.pod:5018 ../src/guestfs-actions.pod:7591
16621 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16622 "activated or deactivated."
16626 #: ../fish/guestfish-actions.pod:5021
16627 msgid "vg-activate-all"
16631 #: ../fish/guestfish-actions.pod:5023
16634 " vg-activate-all true|false\n"
16639 #: ../fish/guestfish-actions.pod:5025 ../src/guestfs-actions.pod:7604
16641 "This command activates or (if C<activate> is false) deactivates all logical "
16642 "volumes in all volume groups."
16646 #: ../fish/guestfish-actions.pod:5028 ../src/guestfs-actions.pod:7607
16647 msgid "This command is the same as running C<vgchange -a y|n>"
16651 #: ../fish/guestfish-actions.pod:5030
16656 #: ../fish/guestfish-actions.pod:5032
16659 " vgcreate volgroup 'physvols ...'\n"
16664 #: ../fish/guestfish-actions.pod:5034 ../src/guestfs-actions.pod:7620
16666 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16667 "of physical volumes C<physvols>."
16671 #: ../fish/guestfish-actions.pod:5037
16676 #: ../fish/guestfish-actions.pod:5039
16679 " vglvuuids vgname\n"
16684 #: ../fish/guestfish-actions.pod:5041 ../src/guestfs-actions.pod:7633
16686 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16687 "volumes created in this volume group."
16691 #: ../fish/guestfish-actions.pod:5044
16693 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
16694 "logical volumes and volume groups."
16698 #: ../fish/guestfish-actions.pod:5047
16699 msgid "See also L</vgpvuuids>."
16703 #: ../fish/guestfish-actions.pod:5049
16708 #: ../fish/guestfish-actions.pod:5051
16711 " vgpvuuids vgname\n"
16716 #: ../fish/guestfish-actions.pod:5053 ../src/guestfs-actions.pod:7653
16718 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
16719 "volumes that this volume group resides on."
16723 #: ../fish/guestfish-actions.pod:5056
16725 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
16726 "physical volumes and volume groups."
16730 #: ../fish/guestfish-actions.pod:5059
16731 msgid "See also L</vglvuuids>."
16735 #: ../fish/guestfish-actions.pod:5061
16740 #: ../fish/guestfish-actions.pod:5063
16743 " vgremove vgname\n"
16748 #: ../fish/guestfish-actions.pod:5065 ../src/guestfs-actions.pod:7673
16749 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
16753 #: ../fish/guestfish-actions.pod:5067 ../src/guestfs-actions.pod:7675
16755 "This also forcibly removes all logical volumes in the volume group (if any)."
16759 #: ../fish/guestfish-actions.pod:5070
16764 #: ../fish/guestfish-actions.pod:5072
16767 " vgrename volgroup newvolgroup\n"
16772 #: ../fish/guestfish-actions.pod:5074 ../src/guestfs-actions.pod:7689
16773 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
16777 #: ../fish/guestfish-actions.pod:5076
16782 #: ../fish/guestfish-actions.pod:5078
16790 #: ../fish/guestfish-actions.pod:5080 ../src/guestfs-actions.pod:7700
16792 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
16797 #: ../fish/guestfish-actions.pod:5083 ../src/guestfs-actions.pod:7703
16799 "This returns a list of just the volume group names that were detected (eg. "
16804 #: ../fish/guestfish-actions.pod:5086
16805 msgid "See also L</vgs-full>."
16809 #: ../fish/guestfish-actions.pod:5088
16814 #: ../fish/guestfish-actions.pod:5090
16822 #: ../fish/guestfish-actions.pod:5092 ../src/guestfs-actions.pod:7719
16824 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
16825 "> command. The \"full\" version includes all fields."
16829 #: ../fish/guestfish-actions.pod:5095
16834 #: ../fish/guestfish-actions.pod:5097
16842 #: ../fish/guestfish-actions.pod:5099 ../src/guestfs-actions.pod:7733
16844 "This rescans all block devices and rebuilds the list of LVM physical "
16845 "volumes, volume groups and logical volumes."
16849 #: ../fish/guestfish-actions.pod:5102
16854 #: ../fish/guestfish-actions.pod:5104
16862 #: ../fish/guestfish-actions.pod:5106 ../src/guestfs-actions.pod:7746
16863 msgid "This command returns the UUID of the LVM VG named C<vgname>."
16867 #: ../fish/guestfish-actions.pod:5108
16872 #: ../fish/guestfish-actions.pod:5110
16880 #: ../fish/guestfish-actions.pod:5112 ../src/guestfs-actions.pod:7786
16882 "This command counts the characters in a file, using the C<wc -c> external "
16887 #: ../fish/guestfish-actions.pod:5115
16892 #: ../fish/guestfish-actions.pod:5117
16900 #: ../fish/guestfish-actions.pod:5119 ../src/guestfs-actions.pod:7799
16902 "This command counts the lines in a file, using the C<wc -l> external command."
16906 #: ../fish/guestfish-actions.pod:5122
16911 #: ../fish/guestfish-actions.pod:5124
16919 #: ../fish/guestfish-actions.pod:5126 ../src/guestfs-actions.pod:7812
16921 "This command counts the words in a file, using the C<wc -w> external command."
16925 #: ../fish/guestfish-actions.pod:5129
16930 #: ../fish/guestfish-actions.pod:5131
16933 " write path content\n"
16938 #: ../fish/guestfish-actions.pod:5133 ../src/guestfs-actions.pod:7827
16940 "This call creates a file called C<path>. The content of the file is the "
16941 "string C<content> (which can contain any 8 bit data)."
16945 #: ../fish/guestfish-actions.pod:5136
16946 msgid "See also L</write-append>."
16950 #: ../fish/guestfish-actions.pod:5141
16951 msgid "write-append"
16955 #: ../fish/guestfish-actions.pod:5143
16958 " write-append path content\n"
16963 #: ../fish/guestfish-actions.pod:5145 ../src/guestfs-actions.pod:7847
16965 "This call appends C<content> to the end of file C<path>. If C<path> does "
16966 "not exist, then a new file is created."
16970 #: ../fish/guestfish-actions.pod:5148
16971 msgid "See also L</write>."
16975 #: ../fish/guestfish-actions.pod:5153
16980 #: ../fish/guestfish-actions.pod:5155
16983 " write-file path content size\n"
16988 #: ../fish/guestfish-actions.pod:5157 ../src/guestfs-actions.pod:7874
16990 "This call creates a file called C<path>. The contents of the file is the "
16991 "string C<content> (which can contain any 8 bit data), with length C<size>."
16995 #: ../fish/guestfish-actions.pod:5161 ../src/guestfs-actions.pod:7878
16997 "As a special case, if C<size> is C<0> then the length is calculated using "
16998 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
17002 #: ../fish/guestfish-actions.pod:5165 ../src/guestfs-actions.pod:7882
17004 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
17005 "I<not> work, even if the length is specified."
17009 #: ../fish/guestfish-actions.pod:5171
17011 "I<This function is deprecated.> In new code, use the L</write> call instead."
17015 #: ../fish/guestfish-actions.pod:5178
17020 #: ../fish/guestfish-actions.pod:5180
17023 " zegrep regex path\n"
17028 #: ../fish/guestfish-actions.pod:5182 ../src/guestfs-actions.pod:7899
17030 "This calls the external C<zegrep> program and returns the matching lines."
17034 #: ../fish/guestfish-actions.pod:5188
17039 #: ../fish/guestfish-actions.pod:5190
17042 " zegrepi regex path\n"
17047 #: ../fish/guestfish-actions.pod:5192 ../src/guestfs-actions.pod:7918
17049 "This calls the external C<zegrep -i> program and returns the matching lines."
17053 #: ../fish/guestfish-actions.pod:5198
17058 #: ../fish/guestfish-actions.pod:5200
17066 #: ../fish/guestfish-actions.pod:5202 ../src/guestfs-actions.pod:7936
17067 msgid "This command writes zeroes over the first few blocks of C<device>."
17071 #: ../fish/guestfish-actions.pod:5204 ../src/guestfs-actions.pod:7938
17073 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
17074 "securely wipe the device). It should be sufficient to remove any partition "
17075 "tables, filesystem superblocks and so on."
17079 #: ../fish/guestfish-actions.pod:5208 ../fish/guestfish-actions.pod:5223
17080 #: ../src/guestfs-actions.pod:7942 ../src/guestfs-actions.pod:7968
17082 "If blocks are already zero, then this command avoids writing zeroes. This "
17083 "prevents the underlying device from becoming non-sparse or growing "
17088 #: ../fish/guestfish-actions.pod:5212
17089 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
17093 #: ../fish/guestfish-actions.pod:5215
17094 msgid "zero-device"
17098 #: ../fish/guestfish-actions.pod:5217
17101 " zero-device device\n"
17106 #: ../fish/guestfish-actions.pod:5219
17108 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
17109 "which just zeroes the first few blocks of a device."
17113 #: ../fish/guestfish-actions.pod:5230
17118 #: ../fish/guestfish-actions.pod:5232
17121 " zerofree device\n"
17126 #: ../fish/guestfish-actions.pod:5234 ../src/guestfs-actions.pod:7990
17128 "This runs the I<zerofree> program on C<device>. This program claims to zero "
17129 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
17130 "possible to compress the filesystem more effectively."
17134 #: ../fish/guestfish-actions.pod:5239 ../src/guestfs-actions.pod:7995
17135 msgid "You should B<not> run this program if the filesystem is mounted."
17139 #: ../fish/guestfish-actions.pod:5242 ../src/guestfs-actions.pod:7998
17141 "It is possible that using this program can damage the filesystem or data on "
17146 #: ../fish/guestfish-actions.pod:5245
17151 #: ../fish/guestfish-actions.pod:5247
17154 " zfgrep pattern path\n"
17159 #: ../fish/guestfish-actions.pod:5249 ../src/guestfs-actions.pod:8012
17161 "This calls the external C<zfgrep> program and returns the matching lines."
17165 #: ../fish/guestfish-actions.pod:5255
17170 #: ../fish/guestfish-actions.pod:5257
17173 " zfgrepi pattern path\n"
17178 #: ../fish/guestfish-actions.pod:5259 ../src/guestfs-actions.pod:8031
17180 "This calls the external C<zfgrep -i> program and returns the matching lines."
17184 #: ../fish/guestfish-actions.pod:5265
17189 #: ../fish/guestfish-actions.pod:5267
17192 " zfile meth path\n"
17197 #: ../fish/guestfish-actions.pod:5269 ../src/guestfs-actions.pod:8057
17199 "This command runs C<file> after first decompressing C<path> using C<method>."
17203 #: ../fish/guestfish-actions.pod:5272 ../src/guestfs-actions.pod:8060
17204 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
17208 #: ../fish/guestfish-actions.pod:5274
17210 "Since 1.0.63, use L</file> instead which can now process compressed files."
17214 #: ../fish/guestfish-actions.pod:5277
17216 "I<This function is deprecated.> In new code, use the L</file> call instead."
17220 #: ../fish/guestfish-actions.pod:5284
17225 #: ../fish/guestfish-actions.pod:5286
17228 " zgrep regex path\n"
17233 #: ../fish/guestfish-actions.pod:5288 ../src/guestfs-actions.pod:8077
17235 "This calls the external C<zgrep> program and returns the matching lines."
17239 #: ../fish/guestfish-actions.pod:5294
17244 #: ../fish/guestfish-actions.pod:5296
17247 " zgrepi regex path\n"
17252 #: ../fish/guestfish-actions.pod:5298 ../src/guestfs-actions.pod:8096
17254 "This calls the external C<zgrep -i> program and returns the matching lines."
17258 #: ../fish/guestfish-commands.pod:1
17263 #: ../fish/guestfish-commands.pod:3
17268 #: ../fish/guestfish-commands.pod:5
17271 " alloc filename size\n"
17276 #: ../fish/guestfish-commands.pod:7
17278 "This creates an empty (zeroed) file of the given size, and then adds so it "
17279 "can be further examined."
17283 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:193
17284 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
17288 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:195
17289 msgid "Size can be specified using standard suffixes, eg. C<1M>."
17293 #: ../fish/guestfish-commands.pod:14
17295 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
17296 "image, see L</PREPARED DISK IMAGES>."
17300 #: ../fish/guestfish-commands.pod:17
17305 #: ../fish/guestfish-commands.pod:19
17308 " copy-in local [local ...] /remotedir\n"
17313 #: ../fish/guestfish-commands.pod:21
17315 "C<copy-in> copies local files or directories recursively into the disk "
17316 "image, placing them in the directory called C</remotedir> (which must "
17317 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
17318 "other commands as necessary."
17322 #: ../fish/guestfish-commands.pod:26
17324 "Multiple local files and directories can be specified, but the last "
17325 "parameter must always be a remote directory. Wildcards cannot be used."
17329 #: ../fish/guestfish-commands.pod:30
17334 #: ../fish/guestfish-commands.pod:32
17337 " copy-out remote [remote ...] localdir\n"
17342 #: ../fish/guestfish-commands.pod:34
17344 "C<copy-out> copies remote files or directories recursively out of the disk "
17345 "image, placing them on the host disk in a local directory called C<localdir> "
17346 "(which must exist). This guestfish meta-command turns into a sequence of L</"
17347 "download>, L</tar-out> and other commands as necessary."
17351 #: ../fish/guestfish-commands.pod:40
17353 "Multiple remote files and directories can be specified, but the last "
17354 "parameter must always be a local directory. To download to the current "
17355 "directory, use C<.> as in:"
17359 #: ../fish/guestfish-commands.pod:44
17362 " copy-out /home .\n"
17367 #: ../fish/guestfish-commands.pod:46
17369 "Wildcards cannot be used in the ordinary command, but you can use them with "
17370 "the help of L</glob> like this:"
17374 #: ../fish/guestfish-commands.pod:49
17377 " glob copy-out /home/* .\n"
17382 #: ../fish/guestfish-commands.pod:51
17387 #: ../fish/guestfish-commands.pod:53
17390 " display filename\n"
17395 #: ../fish/guestfish-commands.pod:55
17397 "Use C<display> (a graphical display program) to display an image file. It "
17398 "downloads the file, and runs C<display> on it."
17402 #: ../fish/guestfish-commands.pod:58
17404 "To use an alternative program, set the C<GUESTFISH_DISPLAY_IMAGE> "
17405 "environment variable. For example to use the GNOME display program:"
17409 #: ../fish/guestfish-commands.pod:61
17412 " export GUESTFISH_DISPLAY_IMAGE=eog\n"
17417 #: ../fish/guestfish-commands.pod:63
17418 msgid "See also L<display(1)>."
17422 #: ../fish/guestfish-commands.pod:65
17427 #: ../fish/guestfish-commands.pod:67
17430 " echo [params ...]\n"
17435 #: ../fish/guestfish-commands.pod:69
17436 msgid "This echos the parameters to the terminal."
17440 #: ../fish/guestfish-commands.pod:71
17445 #: ../fish/guestfish-commands.pod:73
17450 #: ../fish/guestfish-commands.pod:75
17455 #: ../fish/guestfish-commands.pod:77
17463 #: ../fish/guestfish-commands.pod:79
17465 "This is used to edit a file. It downloads the file, edits it locally using "
17466 "your editor, then uploads the result."
17470 #: ../fish/guestfish-commands.pod:82
17472 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
17473 "or C<emacs> you will get those corresponding editors."
17477 #: ../fish/guestfish-commands.pod:86
17482 #: ../fish/guestfish-commands.pod:88
17485 " glob command args...\n"
17490 #: ../fish/guestfish-commands.pod:90
17492 "Expand wildcards in any paths in the args list, and run C<command> "
17493 "repeatedly on each matching path."
17497 #: ../fish/guestfish-commands.pod:93
17498 msgid "See L</WILDCARDS AND GLOBBING>."
17502 #: ../fish/guestfish-commands.pod:95
17507 #: ../fish/guestfish-commands.pod:97
17510 " hexedit <filename|device>\n"
17511 " hexedit <filename|device> <max>\n"
17512 " hexedit <filename|device> <start> <max>\n"
17517 #: ../fish/guestfish-commands.pod:101
17519 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
17524 #: ../fish/guestfish-commands.pod:104
17526 "This command works by downloading potentially the whole file or device, "
17527 "editing it locally, then uploading it. If the file or device is large, you "
17528 "have to specify which part you wish to edit by using C<max> and/or C<start> "
17529 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
17530 "usual modifiers allowed such as C<1M> (1 megabyte)."
17534 #: ../fish/guestfish-commands.pod:111
17535 msgid "For example to edit the first few sectors of a disk you might do:"
17539 #: ../fish/guestfish-commands.pod:114
17542 " hexedit /dev/sda 1M\n"
17547 #: ../fish/guestfish-commands.pod:116
17549 "which would allow you to edit anywhere within the first megabyte of the disk."
17553 #: ../fish/guestfish-commands.pod:119
17554 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
17558 #: ../fish/guestfish-commands.pod:121
17561 " hexedit /dev/sda1 0x400 0x400\n"
17566 #: ../fish/guestfish-commands.pod:123
17567 msgid "(assuming the superblock is in the standard location)."
17571 #: ../fish/guestfish-commands.pod:125
17573 "This command requires the external L<hexedit(1)> program. You can specify "
17574 "another program to use by setting the C<HEXEDITOR> environment variable."
17578 #: ../fish/guestfish-commands.pod:129
17579 msgid "See also L</hexdump>."
17583 #: ../fish/guestfish-commands.pod:131
17588 #: ../fish/guestfish-commands.pod:133
17596 #: ../fish/guestfish-commands.pod:135
17598 "Change the local directory, ie. the current directory of guestfish itself."
17602 #: ../fish/guestfish-commands.pod:138
17603 msgid "Note that C<!cd> won't do what you might expect."
17607 #: ../fish/guestfish-commands.pod:140
17612 #: ../fish/guestfish-commands.pod:142
17617 #: ../fish/guestfish-commands.pod:144
17625 #: ../fish/guestfish-commands.pod:146
17626 msgid "Opens the manual page for guestfish."
17630 #: ../fish/guestfish-commands.pod:148
17635 #: ../fish/guestfish-commands.pod:150
17640 #: ../fish/guestfish-commands.pod:152
17648 #: ../fish/guestfish-commands.pod:154
17656 #: ../fish/guestfish-commands.pod:156
17657 msgid "This is used to view a file."
17661 #: ../fish/guestfish-commands.pod:158
17663 "The default viewer is C<$PAGER>. However if you use the alternate command "
17664 "C<less> you will get the C<less> command specifically."
17668 #: ../fish/guestfish-commands.pod:161
17673 #: ../fish/guestfish-commands.pod:163
17681 #: ../fish/guestfish-commands.pod:165
17683 "Close and reopen the libguestfs handle. It is not necessary to use this "
17684 "normally, because the handle is closed properly when guestfish exits. "
17685 "However this is occasionally useful for testing."
17689 #: ../fish/guestfish-commands.pod:169
17694 #: ../fish/guestfish-commands.pod:171
17697 " setenv VAR value\n"
17702 #: ../fish/guestfish-commands.pod:173
17703 msgid "Set the environment variable C<VAR> to the string C<value>."
17707 #: ../fish/guestfish-commands.pod:175
17709 "To print the value of an environment variable use a shell command such as:"
17713 #: ../fish/guestfish-commands.pod:178
17721 #: ../fish/guestfish-commands.pod:180
17726 #: ../fish/guestfish-commands.pod:182
17729 " sparse filename size\n"
17734 #: ../fish/guestfish-commands.pod:184
17736 "This creates an empty sparse file of the given size, and then adds so it can "
17737 "be further examined."
17741 #: ../fish/guestfish-commands.pod:187
17743 "In all respects it works the same as the L</alloc> command, except that the "
17744 "image file is allocated sparsely, which means that disk blocks are not "
17745 "assigned to the file until they are needed. Sparse disk files only use "
17746 "space when written to, but they are slower and there is a danger you could "
17747 "run out of real disk space during a write operation."
17751 #: ../fish/guestfish-commands.pod:197
17756 #: ../fish/guestfish-commands.pod:199
17764 #: ../fish/guestfish-commands.pod:201
17766 "This command returns a list of the optional groups known to the daemon, and "
17767 "indicates which ones are supported by this build of the libguestfs appliance."
17771 #: ../fish/guestfish-commands.pod:205
17772 msgid "See also L<guestfs(3)/AVAILABILITY>."
17776 #: ../fish/guestfish-commands.pod:207
17781 #: ../fish/guestfish-commands.pod:209
17784 " time command args...\n"
17789 #: ../fish/guestfish-commands.pod:211
17791 "Run the command as usual, but print the elapsed time afterwards. This can "
17792 "be useful for benchmarking operations."
17796 #: ../fish/guestfish-commands.pod:214
17801 #: ../fish/guestfish-commands.pod:216
17809 #: ../fish/guestfish-commands.pod:218
17810 msgid "Remove C<VAR> from the environment."
17814 #: ../fish/guestfish.pod:5
17815 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
17819 #: ../fish/guestfish.pod:9
17822 " guestfish [--options] [commands]\n"
17827 #: ../fish/guestfish.pod:11
17835 #: ../fish/guestfish.pod:13
17838 " guestfish [--ro|--rw] -a disk.img\n"
17843 #: ../fish/guestfish.pod:15
17846 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
17851 #: ../fish/guestfish.pod:17
17854 " guestfish -d libvirt-domain\n"
17859 #: ../fish/guestfish.pod:19
17862 " guestfish [--ro|--rw] -a disk.img -i\n"
17867 #: ../fish/guestfish.pod:21
17870 " guestfish -d libvirt-domain -i\n"
17875 #: ../fish/guestfish.pod:25
17877 "Using guestfish in read/write mode on live virtual machines can be "
17878 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
17879 "option to use guestfish safely if the disk image or virtual machine might be "
17884 #: ../fish/guestfish.pod:32
17886 "Guestfish is a shell and command-line tool for examining and modifying "
17887 "virtual machine filesystems. It uses libguestfs and exposes all of the "
17888 "functionality of the guestfs API, see L<guestfs(3)>."
17892 #: ../fish/guestfish.pod:36
17894 "Guestfish gives you structured access to the libguestfs API, from shell "
17895 "scripts or the command line or interactively. If you want to rescue a "
17896 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
17901 #: ../fish/guestfish.pod:43
17902 msgid "As an interactive shell"
17906 #: ../fish/guestfish.pod:45
17914 #: ../fish/guestfish.pod:47
17917 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
17918 " editing virtual machine filesystems.\n"
17923 #: ../fish/guestfish.pod:50
17926 " Type: 'help' for a list of commands\n"
17927 " 'man' to read the manual\n"
17928 " 'quit' to quit the shell\n"
17933 #: ../fish/guestfish.pod:54
17936 " ><fs> add-ro disk.img\n"
17938 " ><fs> list-filesystems\n"
17939 " /dev/sda1: ext4\n"
17940 " /dev/vg_guest/lv_root: ext4\n"
17941 " /dev/vg_guest/lv_swap: swap\n"
17942 " ><fs> mount /dev/vg_guest/lv_root /\n"
17943 " ><fs> cat /etc/fstab\n"
17945 " # Created by anaconda\n"
17952 #: ../fish/guestfish.pod:67
17953 msgid "From shell scripts"
17957 #: ../fish/guestfish.pod:69
17958 msgid "Create a new C</etc/motd> file in a guest or disk image:"
17962 #: ../fish/guestfish.pod:71
17965 " guestfish <<_EOF_\n"
17968 " mount /dev/vg_guest/lv_root /\n"
17969 " write /etc/motd \"Welcome, new users\"\n"
17975 #: ../fish/guestfish.pod:78
17976 msgid "List the LVM logical volumes in a disk image:"
17980 #: ../fish/guestfish.pod:80
17983 " guestfish -a disk.img --ro <<_EOF_\n"
17991 #: ../fish/guestfish.pod:85
17992 msgid "List all the filesystems in a disk image:"
17996 #: ../fish/guestfish.pod:87
17999 " guestfish -a disk.img --ro <<_EOF_\n"
18001 " list-filesystems\n"
18007 #: ../fish/guestfish.pod:92
18008 msgid "On one command line"
18012 #: ../fish/guestfish.pod:94 ../fish/virt-copy-in.pod:31
18013 msgid "Update C</etc/resolv.conf> in a guest:"
18017 #: ../fish/guestfish.pod:96
18021 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
18022 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
18027 #: ../fish/guestfish.pod:100
18028 msgid "Edit C</boot/grub/grub.conf> interactively:"
18032 #: ../fish/guestfish.pod:102
18035 " guestfish --rw --add disk.img \\\n"
18036 " --mount /dev/vg_guest/lv_root \\\n"
18037 " --mount /dev/sda1:/boot \\\n"
18038 " edit /boot/grub/grub.conf\n"
18043 #: ../fish/guestfish.pod:107
18044 msgid "Mount disks automatically"
18048 #: ../fish/guestfish.pod:109
18050 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
18054 #: ../fish/guestfish.pod:112
18057 " guestfish --ro -a disk.img -i cat /etc/group\n"
18062 #: ../fish/guestfish.pod:114
18065 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
18070 #: ../fish/guestfish.pod:116
18071 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
18075 #: ../fish/guestfish.pod:118
18078 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
18083 #: ../fish/guestfish.pod:120
18084 msgid "As a script interpreter"
18088 #: ../fish/guestfish.pod:122
18089 msgid "Create a 100MB disk containing an ext2-formatted partition:"
18093 #: ../fish/guestfish.pod:124
18096 " #!/usr/bin/guestfish -f\n"
18097 " sparse test1.img 100M\n"
18099 " part-disk /dev/sda mbr\n"
18100 " mkfs ext2 /dev/sda1\n"
18105 #: ../fish/guestfish.pod:130
18106 msgid "Start with a prepared disk"
18110 #: ../fish/guestfish.pod:132
18112 "An alternate way to create a 100MB disk called C<test1.img> containing a "
18113 "single ext2-formatted partition:"
18117 #: ../fish/guestfish.pod:135 ../src/guestfs.pod:2228
18120 " guestfish -N fs\n"
18125 #: ../fish/guestfish.pod:137
18126 msgid "To list what is available do:"
18130 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:1042
18133 " guestfish -N help | less\n"
18138 #: ../fish/guestfish.pod:141
18139 msgid "Remote control"
18143 #: ../fish/guestfish.pod:143
18146 " eval \"`guestfish --listen`\"\n"
18147 " guestfish --remote add-ro disk.img\n"
18148 " guestfish --remote run\n"
18149 " guestfish --remote lvs\n"
18154 #: ../fish/guestfish.pod:154
18155 msgid "Displays general help on options."
18159 #: ../fish/guestfish.pod:158
18160 msgid "B<--cmd-help>"
18164 #: ../fish/guestfish.pod:160
18165 msgid "Lists all available guestfish commands."
18169 #: ../fish/guestfish.pod:162
18174 #: ../fish/guestfish.pod:164
18175 msgid "B<--cmd-help cmd>"
18179 #: ../fish/guestfish.pod:166
18180 msgid "Displays detailed help on a single command C<cmd>."
18184 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:96
18185 msgid "B<-a image>"
18189 #: ../fish/guestfish.pod:170 ../fuse/guestmount.pod:98
18190 msgid "B<--add image>"
18194 #: ../fish/guestfish.pod:172
18195 msgid "Add a block device or virtual machine image to the shell."
18199 #: ../fish/guestfish.pod:177
18201 "Using this flag is mostly equivalent to using the C<add> command, with "
18202 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18203 "the I<--format=...> flag was given."
18207 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:109
18209 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18210 "URI to use. The default is to use the default libvirt connection."
18214 #: ../fish/guestfish.pod:189
18219 #: ../fish/guestfish.pod:191
18221 "If using the I<--listen> option and a csh-like shell, use this option. See "
18222 "section L</REMOTE CONTROL AND CSH> below."
18226 #: ../fish/guestfish.pod:194 ../fuse/guestmount.pod:113
18227 msgid "B<-d libvirt-domain>"
18231 #: ../fish/guestfish.pod:196 ../fuse/guestmount.pod:115
18232 msgid "B<--domain libvirt-domain>"
18236 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:117
18238 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18239 "used, then any libvirt domain can be used. However in write mode, only "
18240 "libvirt domains which are shut down can be named here."
18244 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:121
18245 msgid "Domain UUIDs can be used instead of names."
18249 #: ../fish/guestfish.pod:204
18251 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18252 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18253 "if the I<--format:...> flag was given."
18257 #: ../fish/guestfish.pod:208
18262 #: ../fish/guestfish.pod:210
18263 msgid "B<--no-dest-paths>"
18267 #: ../fish/guestfish.pod:212
18269 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18270 "to hit the tab key to complete paths on the guest filesystem, but this "
18271 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18272 "allow this feature to be disabled."
18276 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:137
18278 "When prompting for keys and passphrases, guestfish normally turns echoing "
18279 "off so you cannot see what you are typing. If you are not worried about "
18280 "Tempest attacks and there is no one else in the room you can specify this "
18281 "flag to see what you are typing."
18285 #: ../fish/guestfish.pod:224
18290 #: ../fish/guestfish.pod:226
18291 msgid "B<--file file>"
18295 #: ../fish/guestfish.pod:228
18296 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18300 #: ../fish/guestfish.pod:231
18303 " #!/usr/bin/guestfish -f\n"
18308 #: ../fish/guestfish.pod:244
18311 " guestfish --format=raw -a disk.img\n"
18316 #: ../fish/guestfish.pod:248
18319 " guestfish --format=raw -a disk.img --format -a another.img\n"
18324 #: ../fish/guestfish.pod:253
18326 "If you have untrusted raw-format guest disk images, you should use this "
18327 "option to specify the disk format. This avoids a possible security problem "
18328 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18332 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:166
18333 msgid "B<--inspector>"
18337 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:168
18339 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18340 "system and mount filesystems as they would be mounted on the real virtual "
18345 #: ../fish/guestfish.pod:266
18346 msgid "Typical usage is either:"
18350 #: ../fish/guestfish.pod:268
18353 " guestfish -d myguest -i\n"
18358 #: ../fish/guestfish.pod:270
18359 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18363 #: ../fish/guestfish.pod:272
18366 " guestfish --ro -d myguest -i\n"
18371 #: ../fish/guestfish.pod:274
18372 msgid "(for active domains, readonly), or specify the block device directly:"
18376 #: ../fish/guestfish.pod:276
18379 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18384 #: ../fish/guestfish.pod:278
18386 "Note that the command line syntax changed slightly over older versions of "
18387 "guestfish. You can still use the old syntax:"
18391 #: ../fish/guestfish.pod:281
18394 " guestfish [--ro] -i disk.img\n"
18399 #: ../fish/guestfish.pod:283
18402 " guestfish [--ro] -i libvirt-domain\n"
18407 #: ../fish/guestfish.pod:285
18409 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18410 "then using other commands to mount the filesystems that were found."
18414 #: ../fish/guestfish.pod:294
18415 msgid "B<--listen>"
18419 #: ../fish/guestfish.pod:296
18421 "Fork into the background and listen for remote commands. See section L</"
18422 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18426 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:177
18431 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:179
18433 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
18434 "ATTACHING TO RUNNING DAEMONS>)."
18438 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:182
18439 msgid "B<-m dev[:mountpoint[:options]]>"
18443 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
18444 msgid "B<--mount dev[:mountpoint[:options]]>"
18448 #: ../fish/guestfish.pod:308
18449 msgid "Mount the named partition or logical volume on the given mountpoint."
18453 #: ../fish/guestfish.pod:310
18454 msgid "If the mountpoint is omitted, it defaults to C</>."
18458 #: ../fish/guestfish.pod:312
18459 msgid "You have to mount something on C</> before most commands will work."
18463 #: ../fish/guestfish.pod:314
18465 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18470 #: ../fish/guestfish.pod:317
18472 "If you don't know what filesystems a disk image contains, you can either run "
18473 "guestfish without this option, then list the partitions, filesystems and LVs "
18474 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18475 "commands), or you can use the L<virt-filesystems(1)> program."
18479 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:192
18481 "The third (and rarely used) part of the mount parameter is the list of mount "
18482 "options used to mount the underlying filesystem. If this is not given, then "
18483 "the mount options are either the empty string or C<ro> (the latter if the "
18484 "I<--ro> flag is used). By specifying the mount options, you override this "
18485 "default choice. Probably the only time you would use this is to enable ACLs "
18486 "and/or extended attributes if the filesystem can support them:"
18490 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:200
18493 " -m /dev/sda1:/:acl,user_xattr\n"
18498 #: ../fish/guestfish.pod:333
18499 msgid "Using this flag is equivalent to using the C<mount-options> command."
18503 #: ../fish/guestfish.pod:335 ../fuse/guestmount.pod:202
18504 #: ../resize/virt-resize.pod:358
18509 #: ../fish/guestfish.pod:337 ../fuse/guestmount.pod:204
18510 msgid "B<--no-sync>"
18514 #: ../fish/guestfish.pod:339
18516 "Disable autosync. This is enabled by default. See the discussion of "
18517 "autosync in the L<guestfs(3)> manpage."
18521 #: ../fish/guestfish.pod:342
18526 #: ../fish/guestfish.pod:344
18527 msgid "B<--new type>"
18531 #: ../fish/guestfish.pod:346
18536 #: ../fish/guestfish.pod:348
18538 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18539 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18540 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18545 #: ../fish/guestfish.pod:353
18546 msgid "B<--progress-bars>"
18550 #: ../fish/guestfish.pod:355
18551 msgid "Enable progress bars, even when guestfish is used non-interactively."
18555 #: ../fish/guestfish.pod:357
18557 "Progress bars are enabled by default when guestfish is used as an "
18558 "interactive shell."
18562 #: ../fish/guestfish.pod:360
18563 msgid "B<--no-progress-bars>"
18567 #: ../fish/guestfish.pod:362
18568 msgid "Disable progress bars."
18572 #: ../fish/guestfish.pod:364
18573 msgid "B<--remote[=pid]>"
18577 #: ../fish/guestfish.pod:366
18579 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18580 "CONTROL GUESTFISH OVER A SOCKET> below."
18584 #: ../fish/guestfish.pod:369 ../fuse/guestmount.pod:248
18585 #: ../rescue/virt-rescue.pod:161
18590 #: ../fish/guestfish.pod:371 ../fuse/guestmount.pod:250
18591 #: ../rescue/virt-rescue.pod:163
18596 #: ../fish/guestfish.pod:373
18598 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18599 "mounts are done read-only."
18603 #: ../fish/guestfish.pod:376 ../rescue/virt-rescue.pod:167
18605 "The option must always be used if the disk image or virtual machine might be "
18606 "running, and is generally recommended in cases where you don't need write "
18607 "access to the disk."
18611 #: ../fish/guestfish.pod:380
18613 "Note that prepared disk images created with I<-N> are not affected by this "
18614 "option. Also commands like C<add> are not affected - you have to specify "
18615 "the C<readonly:true> option explicitly if you need it."
18619 #: ../fish/guestfish.pod:384
18620 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18624 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:262
18625 #: ../rescue/virt-rescue.pod:173
18626 msgid "B<--selinux>"
18630 #: ../fish/guestfish.pod:388
18631 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18635 #: ../fish/guestfish.pod:394
18637 "Enable very verbose messages. This is particularly useful if you find a bug."
18641 #: ../fish/guestfish.pod:401
18642 msgid "Display the guestfish / libguestfs version number and exit."
18646 #: ../fish/guestfish.pod:403 ../fuse/guestmount.pod:278
18647 #: ../rescue/virt-rescue.pod:194
18652 #: ../fish/guestfish.pod:405 ../fuse/guestmount.pod:280
18653 #: ../rescue/virt-rescue.pod:196
18658 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:282
18660 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18661 "mounts are done read-write."
18665 #: ../fish/guestfish.pod:410
18666 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
18670 #: ../fish/guestfish.pod:414
18671 msgid "Echo each command before executing it."
18675 #: ../fish/guestfish.pod:418
18676 msgid "COMMANDS ON COMMAND LINE"
18680 #: ../fish/guestfish.pod:420
18682 "Any additional (non-option) arguments are treated as commands to execute."
18686 #: ../fish/guestfish.pod:423
18688 "Commands to execute should be separated by a colon (C<:>), where the colon "
18689 "is a separate parameter. Thus:"
18693 #: ../fish/guestfish.pod:426
18696 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18701 #: ../fish/guestfish.pod:428
18703 "If there are no additional arguments, then we enter a shell, either an "
18704 "interactive shell with a prompt (if the input is a terminal) or a non-"
18705 "interactive shell."
18709 #: ../fish/guestfish.pod:432
18711 "In either command line mode or non-interactive shell, the first command that "
18712 "gives an error causes the whole shell to exit. In interactive mode (with a "
18713 "prompt) if a command fails, you can continue to enter commands."
18717 #: ../fish/guestfish.pod:437
18718 msgid "USING launch (OR run)"
18722 #: ../fish/guestfish.pod:439
18724 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18725 "then launch it, then mount any disks you need, and finally issue actions/"
18726 "commands. So the general order of the day is:"
18730 #: ../fish/guestfish.pod:447
18731 msgid "add or -a/--add"
18735 #: ../fish/guestfish.pod:451
18736 msgid "launch (aka run)"
18740 #: ../fish/guestfish.pod:455
18741 msgid "mount or -m/--mount"
18745 #: ../fish/guestfish.pod:459
18746 msgid "any other commands"
18750 #: ../fish/guestfish.pod:463
18752 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
18753 "guest before mounting or performing any other commands."
18757 #: ../fish/guestfish.pod:466
18759 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
18760 "I<--new> options were given then C<run> is done automatically, simply "
18761 "because guestfish can't perform the action you asked for without doing this."
18765 #: ../fish/guestfish.pod:471
18766 msgid "OPENING DISKS FOR READ AND WRITE"
18770 #: ../fish/guestfish.pod:473
18772 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
18773 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
18774 "I<-i> and I<-m> open disk images read-only or for writing."
18778 #: ../fish/guestfish.pod:478
18780 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
18781 "opening disk images supplied on the command line for write. To open a disk "
18782 "image read-only you have to do I<-a image --ro>."
18786 #: ../fish/guestfish.pod:482
18788 "This matters: If you accidentally open a live VM disk image writable then "
18789 "you will cause irreversible disk corruption."
18793 #: ../fish/guestfish.pod:485
18795 "In a future libguestfs we intend to change the default the other way. Disk "
18796 "images will be opened read-only. You will have to either specify "
18797 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
18798 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
18799 "access for disk images specified by those other command line options."
18803 #: ../fish/guestfish.pod:492
18805 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
18806 "which does nothing (it is already the default). However it is highly "
18807 "recommended that you use this option to indicate that you need write access, "
18808 "and prepare your scripts for the day when this option will be required for "
18813 #: ../fish/guestfish.pod:498
18815 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
18816 "other libguestfs program apart from guestfish and guestmount."
18820 #: ../fish/guestfish.pod:501
18825 #: ../fish/guestfish.pod:503
18827 "You can quote ordinary parameters using either single or double quotes. For "
18832 #: ../fish/guestfish.pod:506
18835 " add \"file with a space.img\"\n"
18840 #: ../fish/guestfish.pod:508
18843 " rm '/file name'\n"
18848 #: ../fish/guestfish.pod:510
18856 #: ../fish/guestfish.pod:512
18858 "A few commands require a list of strings to be passed. For these, use a "
18859 "whitespace-separated list, enclosed in quotes. Strings containing "
18860 "whitespace to be passed through must be enclosed in single quotes. A "
18861 "literal single quote must be escaped with a backslash."
18865 #: ../fish/guestfish.pod:517
18868 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
18869 " command \"/bin/echo 'foo bar'\"\n"
18870 " command \"/bin/echo \\'foo\\'\"\n"
18875 #: ../fish/guestfish.pod:521
18876 msgid "ESCAPE SEQUENCES IN DOUBLE QUOTED ARGUMENTS"
18880 #: ../fish/guestfish.pod:523
18882 "In double-quoted arguments (only) use backslash to insert special characters:"
18886 #: ../fish/guestfish.pod:528
18891 #: ../fish/guestfish.pod:530
18892 msgid "Alert (bell) character."
18896 #: ../fish/guestfish.pod:532
18901 #: ../fish/guestfish.pod:534
18902 msgid "Backspace character."
18906 #: ../fish/guestfish.pod:536
18911 #: ../fish/guestfish.pod:538
18912 msgid "Form feed character."
18916 #: ../fish/guestfish.pod:540
18921 #: ../fish/guestfish.pod:542
18922 msgid "Newline character."
18926 #: ../fish/guestfish.pod:544
18931 #: ../fish/guestfish.pod:546
18932 msgid "Carriage return character."
18936 #: ../fish/guestfish.pod:548
18941 #: ../fish/guestfish.pod:550
18942 msgid "Horizontal tab character."
18946 #: ../fish/guestfish.pod:552
18951 #: ../fish/guestfish.pod:554
18952 msgid "Vertical tab character."
18956 #: ../fish/guestfish.pod:556
18961 #: ../fish/guestfish.pod:558
18962 msgid "A literal double quote character."
18966 #: ../fish/guestfish.pod:560
18971 #: ../fish/guestfish.pod:562
18973 "A character with octal value I<ooo>. There must be precisely 3 octal digits "
18978 #: ../fish/guestfish.pod:565
18983 #: ../fish/guestfish.pod:567
18985 "A character with hex value I<hh>. There must be precisely 2 hex digits."
18989 #: ../fish/guestfish.pod:570
18991 "In the current implementation C<\\000> and C<\\x00> cannot be used in "
18996 #: ../fish/guestfish.pod:573
19001 #: ../fish/guestfish.pod:575
19002 msgid "A literal backslash character."
19006 #: ../fish/guestfish.pod:579
19007 msgid "OPTIONAL ARGUMENTS"
19011 #: ../fish/guestfish.pod:581
19013 "Some commands take optional arguments. These arguments appear in this "
19014 "documentation as C<[argname:..]>. You can use them as in these examples:"
19018 #: ../fish/guestfish.pod:585
19021 " add-drive-opts filename\n"
19026 #: ../fish/guestfish.pod:587
19029 " add-drive-opts filename readonly:true\n"
19034 #: ../fish/guestfish.pod:589
19037 " add-drive-opts filename format:qcow2 readonly:false\n"
19042 #: ../fish/guestfish.pod:591
19044 "Each optional argument can appear at most once. All optional arguments must "
19045 "appear after the required ones."
19049 #: ../fish/guestfish.pod:594
19054 #: ../fish/guestfish.pod:596
19056 "This section applies to all commands which can take integers as parameters."
19060 #: ../fish/guestfish.pod:599
19061 msgid "SIZE SUFFIX"
19065 #: ../fish/guestfish.pod:601
19067 "When the command takes a parameter measured in bytes, you can use one of the "
19068 "following suffixes to specify kilobytes, megabytes and larger sizes:"
19072 #: ../fish/guestfish.pod:607
19073 msgid "B<k> or B<K> or B<KiB>"
19077 #: ../fish/guestfish.pod:609
19078 msgid "The size in kilobytes (multiplied by 1024)."
19082 #: ../fish/guestfish.pod:611
19087 #: ../fish/guestfish.pod:613
19088 msgid "The size in SI 1000 byte units."
19092 #: ../fish/guestfish.pod:615
19093 msgid "B<M> or B<MiB>"
19097 #: ../fish/guestfish.pod:617
19098 msgid "The size in megabytes (multiplied by 1048576)."
19102 #: ../fish/guestfish.pod:619
19107 #: ../fish/guestfish.pod:621
19108 msgid "The size in SI 1000000 byte units."
19112 #: ../fish/guestfish.pod:623
19113 msgid "B<G> or B<GiB>"
19117 #: ../fish/guestfish.pod:625
19118 msgid "The size in gigabytes (multiplied by 2**30)."
19122 #: ../fish/guestfish.pod:627
19127 #: ../fish/guestfish.pod:629
19128 msgid "The size in SI 10**9 byte units."
19132 #: ../fish/guestfish.pod:631
19133 msgid "B<T> or B<TiB>"
19137 #: ../fish/guestfish.pod:633
19138 msgid "The size in terabytes (multiplied by 2**40)."
19142 #: ../fish/guestfish.pod:635
19147 #: ../fish/guestfish.pod:637
19148 msgid "The size in SI 10**12 byte units."
19152 #: ../fish/guestfish.pod:639
19153 msgid "B<P> or B<PiB>"
19157 #: ../fish/guestfish.pod:641
19158 msgid "The size in petabytes (multiplied by 2**50)."
19162 #: ../fish/guestfish.pod:643
19167 #: ../fish/guestfish.pod:645
19168 msgid "The size in SI 10**15 byte units."
19172 #: ../fish/guestfish.pod:647
19173 msgid "B<E> or B<EiB>"
19177 #: ../fish/guestfish.pod:649
19178 msgid "The size in exabytes (multiplied by 2**60)."
19182 #: ../fish/guestfish.pod:651
19187 #: ../fish/guestfish.pod:653
19188 msgid "The size in SI 10**18 byte units."
19192 #: ../fish/guestfish.pod:655
19193 msgid "B<Z> or B<ZiB>"
19197 #: ../fish/guestfish.pod:657
19198 msgid "The size in zettabytes (multiplied by 2**70)."
19202 #: ../fish/guestfish.pod:659
19207 #: ../fish/guestfish.pod:661
19208 msgid "The size in SI 10**21 byte units."
19212 #: ../fish/guestfish.pod:663
19213 msgid "B<Y> or B<YiB>"
19217 #: ../fish/guestfish.pod:665
19218 msgid "The size in yottabytes (multiplied by 2**80)."
19222 #: ../fish/guestfish.pod:667
19227 #: ../fish/guestfish.pod:669
19228 msgid "The size in SI 10**24 byte units."
19232 #: ../fish/guestfish.pod:675
19235 " truncate-size /file 1G\n"
19240 #: ../fish/guestfish.pod:677
19241 msgid "would truncate the file to 1 gigabyte."
19245 #: ../fish/guestfish.pod:679
19247 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
19248 "the parameter to L</memsize> is specified in megabytes already). Adding a "
19249 "suffix will probably not do what you expect."
19253 #: ../fish/guestfish.pod:683
19254 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19258 #: ../fish/guestfish.pod:685
19260 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19261 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19265 #: ../fish/guestfish.pod:688
19268 " 1234 decimal number 1234\n"
19269 " 02322 octal number, equivalent to decimal 1234\n"
19270 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19275 #: ../fish/guestfish.pod:692
19277 "When using the C<chmod> command, you almost always want to specify an octal "
19278 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19279 "L<chmod(1)> program):"
19283 #: ../fish/guestfish.pod:696
19286 " chmod 0777 /public # OK\n"
19287 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19292 #: ../fish/guestfish.pod:699
19294 "Commands that return numbers usually print them in decimal, but some "
19295 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19296 "octal, preceeded by C<0>)."
19300 #: ../fish/guestfish.pod:703
19301 msgid "WILDCARDS AND GLOBBING"
19305 #: ../fish/guestfish.pod:705
19307 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19308 "(globbing) by default. So for example the following will not do what you "
19313 #: ../fish/guestfish.pod:709
19321 #: ../fish/guestfish.pod:711
19323 "Assuming you don't have a directory called literally C</home/*> then the "
19324 "above command will return an error."
19328 #: ../fish/guestfish.pod:714
19329 msgid "To perform wildcard expansion, use the C<glob> command."
19333 #: ../fish/guestfish.pod:716
19336 " glob rm-rf /home/*\n"
19341 #: ../fish/guestfish.pod:718
19343 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19344 "many times), equivalent to:"
19348 #: ../fish/guestfish.pod:721
19351 " rm-rf /home/jim\n"
19352 " rm-rf /home/joe\n"
19353 " rm-rf /home/mary\n"
19358 #: ../fish/guestfish.pod:725
19359 msgid "C<glob> only works on simple guest paths and not on device names."
19363 #: ../fish/guestfish.pod:727
19365 "If you have several parameters, each containing a wildcard, then glob will "
19366 "perform a Cartesian product."
19370 #: ../fish/guestfish.pod:730
19375 #: ../fish/guestfish.pod:732
19377 "Any line which starts with a I<#> character is treated as a comment and "
19378 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19379 "a command. For example:"
19383 #: ../fish/guestfish.pod:736
19386 " # this is a comment\n"
19387 " # this is a comment\n"
19388 " foo # NOT a comment\n"
19393 #: ../fish/guestfish.pod:740
19394 msgid "Blank lines are also ignored."
19398 #: ../fish/guestfish.pod:742
19399 msgid "RUNNING COMMANDS LOCALLY"
19403 #: ../fish/guestfish.pod:744
19405 "Any line which starts with a I<!> character is treated as a command sent to "
19406 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19410 #: ../fish/guestfish.pod:748
19414 " tgz-out /remote local/remote-data.tar.gz\n"
19419 #: ../fish/guestfish.pod:751
19421 "will create a directory C<local> on the host, and then export the contents "
19422 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19423 "(See C<tgz-out>)."
19427 #: ../fish/guestfish.pod:755
19429 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19430 "effect, due to the way that subprocesses work in Unix."
19434 #: ../fish/guestfish.pod:758
19435 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19439 #: ../fish/guestfish.pod:760
19441 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19442 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19443 "and executed as guestfish commands."
19447 #: ../fish/guestfish.pod:764
19449 "Thus you can use shell script to construct arbitrary guestfish commands "
19450 "which are then parsed by guestfish."
19454 #: ../fish/guestfish.pod:767
19456 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19457 "through C</foo.100>) using guestfish commands alone. However this is simple "
19458 "if we use a shell script to create the guestfish commands for us:"
19462 #: ../fish/guestfish.pod:772
19465 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19470 #: ../fish/guestfish.pod:774
19471 msgid "or with names like C</foo.001>:"
19475 #: ../fish/guestfish.pod:776
19478 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19483 #: ../fish/guestfish.pod:778
19485 "When using guestfish interactively it can be helpful to just run the shell "
19486 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19487 "ordinary I<!> local command), see what guestfish commands it would run, and "
19488 "when you are happy with those prepend the C<E<lt>> character to run the "
19489 "guestfish commands for real."
19493 #: ../fish/guestfish.pod:784
19498 #: ../fish/guestfish.pod:786
19500 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19501 "command (a guestfish command) to the second command (any host command). For "
19506 #: ../fish/guestfish.pod:790
19509 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19514 #: ../fish/guestfish.pod:792
19516 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19517 "program). The above command would list all accounts in the guest filesystem "
19518 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19522 #: ../fish/guestfish.pod:797
19525 " hexdump /bin/ls | head\n"
19526 " list-devices | tail -1\n"
19527 " tgz-out / - | tar ztf -\n"
19532 #: ../fish/guestfish.pod:801
19534 "The space before the pipe symbol is required, any space after the pipe "
19535 "symbol is optional. Everything after the pipe symbol is just passed "
19536 "straight to the host shell, so it can contain redirections, globs and "
19537 "anything else that makes sense on the host side."
19541 #: ../fish/guestfish.pod:806
19543 "To use a literal argument which begins with a pipe symbol, you have to quote "
19548 #: ../fish/guestfish.pod:809
19556 #: ../fish/guestfish.pod:811
19557 msgid "HOME DIRECTORIES"
19561 #: ../fish/guestfish.pod:813
19563 "If a parameter starts with the character C<~> then the tilde may be expanded "
19564 "as a home directory path (either C<~> for the current user's home directory, "
19565 "or C<~user> for another user)."
19569 #: ../fish/guestfish.pod:817
19571 "Note that home directory expansion happens for users known I<on the host>, "
19572 "not in the guest filesystem."
19576 #: ../fish/guestfish.pod:820
19578 "To use a literal argument which begins with a tilde, you have to quote it, "
19583 #: ../fish/guestfish.pod:823
19591 #: ../fish/guestfish.pod:825 ../src/guestfs.pod:519
19592 msgid "ENCRYPTED DISKS"
19596 #: ../fish/guestfish.pod:827
19598 "Libguestfs has some support for Linux guests encrypted according to the "
19599 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19600 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
19601 "LUKS is supported."
19605 #: ../fish/guestfish.pod:832
19606 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19610 #: ../fish/guestfish.pod:834
19613 " ><fs> vfs-type /dev/sda2\n"
19619 #: ../fish/guestfish.pod:837
19621 "Then open those devices using L</luks-open>. This creates a device-mapper "
19622 "device called C</dev/mapper/luksdev>."
19626 #: ../fish/guestfish.pod:840
19629 " ><fs> luks-open /dev/sda2 luksdev\n"
19630 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19635 #: ../fish/guestfish.pod:843
19637 "Finally you have to tell LVM to scan for volume groups on the newly created "
19642 #: ../fish/guestfish.pod:846
19646 " vg-activate-all true\n"
19651 #: ../fish/guestfish.pod:849
19652 msgid "The logical volume(s) can now be mounted in the usual way."
19656 #: ../fish/guestfish.pod:851
19658 "Before closing a LUKS device you must unmount any logical volumes on it and "
19659 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19660 "one. Then you can close the mapper device:"
19664 #: ../fish/guestfish.pod:855
19667 " vg-activate false /dev/VG\n"
19668 " luks-close /dev/mapper/luksdev\n"
19673 #: ../fish/guestfish.pod:860
19675 "If a path is prefixed with C<win:> then you can use Windows-style drive "
19676 "letters and paths (with some limitations). The following commands are "
19681 #: ../fish/guestfish.pod:864
19684 " file /WINDOWS/system32/config/system.LOG\n"
19689 #: ../fish/guestfish.pod:866
19692 " file win:\\windows\\system32\\config\\system.log\n"
19697 #: ../fish/guestfish.pod:868
19700 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
19705 #: ../fish/guestfish.pod:870
19707 "The parameter is rewritten \"behind the scenes\" by looking up the position "
19708 "where the drive is mounted, prepending that to the path, changing all "
19709 "backslash characters to forward slash, then resolving the result using L</"
19710 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
19711 "the parameter might be rewritten like this:"
19715 #: ../fish/guestfish.pod:876
19718 " win:e:\\foo\\bar => /e/FOO/bar\n"
19723 #: ../fish/guestfish.pod:878
19724 msgid "This only works in argument positions that expect a path."
19728 #: ../fish/guestfish.pod:880
19729 msgid "UPLOADING AND DOWNLOADING FILES"
19733 #: ../fish/guestfish.pod:882
19735 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
19736 "others which upload from or download to a local file, you can use the "
19737 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
19741 #: ../fish/guestfish.pod:886
19749 #: ../fish/guestfish.pod:888
19751 "reads stdin and creates from that a file C</foo> in the disk image, and:"
19755 #: ../fish/guestfish.pod:891
19758 " tar-out /etc - | tar tf -\n"
19763 #: ../fish/guestfish.pod:893
19765 "writes the tarball to stdout and then pipes that into the external \"tar\" "
19766 "command (see L</PIPES>)."
19770 #: ../fish/guestfish.pod:896
19772 "When using C<-> to read from stdin, the input is read up to the end of "
19773 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
19774 "some arbitrary end marker:"
19778 #: ../fish/guestfish.pod:900
19781 " upload -<<END /foo\n"
19790 #: ../fish/guestfish.pod:906
19792 "Any string of characters can be used instead of C<END>. The end marker must "
19793 "appear on a line of its own, without any preceeding or following characters "
19794 "(not even spaces)."
19798 #: ../fish/guestfish.pod:910
19800 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
19801 "upload local files (so-called \"FileIn\" parameters in the generator)."
19805 #: ../fish/guestfish.pod:913
19806 msgid "EXIT ON ERROR BEHAVIOUR"
19810 #: ../fish/guestfish.pod:915
19812 "By default, guestfish will ignore any errors when in interactive mode (ie. "
19813 "taking commands from a human over a tty), and will exit on the first error "
19814 "in non-interactive mode (scripts, commands given on the command line)."
19818 #: ../fish/guestfish.pod:920
19820 "If you prefix a command with a I<-> character, then that command will not "
19821 "cause guestfish to exit, even if that (one) command returns an error."
19825 #: ../fish/guestfish.pod:924
19826 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
19830 #: ../fish/guestfish.pod:926
19832 "Guestfish can be remote-controlled over a socket. This is useful "
19833 "particularly in shell scripts where you want to make several different "
19834 "changes to a filesystem, but you don't want the overhead of starting up a "
19835 "guestfish process each time."
19839 #: ../fish/guestfish.pod:931
19840 msgid "Start a guestfish server process using:"
19844 #: ../fish/guestfish.pod:933
19847 " eval \"`guestfish --listen`\"\n"
19852 #: ../fish/guestfish.pod:935
19853 msgid "and then send it commands by doing:"
19857 #: ../fish/guestfish.pod:937
19860 " guestfish --remote cmd [...]\n"
19865 #: ../fish/guestfish.pod:939
19866 msgid "To cause the server to exit, send it the exit command:"
19870 #: ../fish/guestfish.pod:943
19872 "Note that the server will normally exit if there is an error in a command. "
19873 "You can change this in the usual way. See section L</EXIT ON ERROR "
19878 #: ../fish/guestfish.pod:947
19879 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
19883 #: ../fish/guestfish.pod:949
19885 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
19886 "is how the I<--remote> option knows where to send the commands. You can "
19887 "have several guestfish listener processes running using:"
19891 #: ../fish/guestfish.pod:953
19894 " eval \"`guestfish --listen`\"\n"
19895 " pid1=$GUESTFISH_PID\n"
19896 " eval \"`guestfish --listen`\"\n"
19897 " pid2=$GUESTFISH_PID\n"
19899 " guestfish --remote=$pid1 cmd\n"
19900 " guestfish --remote=$pid2 cmd\n"
19905 #: ../fish/guestfish.pod:961
19906 msgid "REMOTE CONTROL AND CSH"
19910 #: ../fish/guestfish.pod:963
19912 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
19917 #: ../fish/guestfish.pod:966
19920 " eval \"`guestfish --listen --csh`\"\n"
19925 #: ../fish/guestfish.pod:968
19926 msgid "REMOTE CONTROL DETAILS"
19930 #: ../fish/guestfish.pod:970
19932 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
19933 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
19934 "and C<$PID> is the process ID of the server."
19938 #: ../fish/guestfish.pod:974
19939 msgid "Guestfish client and server versions must match exactly."
19943 #: ../fish/guestfish.pod:976
19944 msgid "USING REMOTE CONTROL ROBUSTLY FROM SHELL SCRIPTS"
19948 #: ../fish/guestfish.pod:978
19950 "From Bash, you can use the following code which creates a guestfish "
19951 "instance, correctly quotes the command line, handles failure to start, and "
19952 "cleans up guestfish when the script exits:"
19956 #: ../fish/guestfish.pod:982 ../src/guestfs.pod:965
19964 #: ../fish/guestfish.pod:986
19967 " guestfish[0]=\"guestfish\"\n"
19968 " guestfish[1]=\"--listen\"\n"
19969 " guestfish[2]=\"--ro\"\n"
19970 " guestfish[3]=\"-a\"\n"
19971 " guestfish[4]=\"disk.img\"\n"
19976 #: ../fish/guestfish.pod:992
19979 " GUESTFISH_PID=\n"
19980 " eval $(\"${guestfish[@]}\")\n"
19981 " if [ -z \"$GUESTFISH_PID\" ]; then\n"
19982 " echo \"error: guestfish didn't start up, see error messages above\"\n"
19989 #: ../fish/guestfish.pod:999
19992 " cleanup_guestfish ()\n"
19994 " guestfish --remote -- exit >/dev/null 2>&1 ||:\n"
19996 " trap cleanup_guestfish EXIT ERR\n"
20001 #: ../fish/guestfish.pod:1005
20004 " guestfish --remote -- run\n"
20009 #: ../fish/guestfish.pod:1007
20017 #: ../fish/guestfish.pod:1009
20018 msgid "REMOTE CONTROL RUN COMMAND HANGING"
20022 #: ../fish/guestfish.pod:1011
20024 "Using the C<run> (or C<launch>) command remotely in a command substitution "
20025 "context hangs, ie. don't do (note the backquotes):"
20029 #: ../fish/guestfish.pod:1014
20032 " a=`guestfish --remote run`\n"
20037 #: ../fish/guestfish.pod:1016
20039 "Since the C<run> command produces no output on stdout, this is not useful "
20040 "anyway. For further information see L<https://bugzilla.redhat.com/show_bug."
20045 #: ../fish/guestfish.pod:1020
20046 msgid "PREPARED DISK IMAGES"
20050 #: ../fish/guestfish.pod:1022
20052 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
20053 "preformatted disk images that guestfish can make for you to save typing. "
20054 "This is particularly useful for testing purposes. This option is used "
20055 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
20056 "can be mixed with I<-a>)."
20060 #: ../fish/guestfish.pod:1028
20062 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
20063 "the second and so on. Existing files in the current directory are "
20068 #: ../fish/guestfish.pod:1032
20070 "The type briefly describes how the disk should be sized, partitioned, how "
20071 "filesystem(s) should be created, and how content should be added. "
20072 "Optionally the type can be followed by extra parameters, separated by C<:> "
20073 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
20074 "allocated disk, containing a single partition, with the partition formatted "
20075 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
20080 #: ../fish/guestfish.pod:1040
20081 msgid "To list the available types and any extra parameters they take, run:"
20085 #: ../fish/guestfish.pod:1044
20087 "Note that the prepared filesystem is not mounted. You would usually have to "
20088 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
20092 #: ../fish/guestfish.pod:1048
20094 "If any I<-N> or I<--new> options are given, the guest is automatically "
20099 #: ../fish/guestfish.pod:1053
20100 msgid "Create a 100MB disk with an ext4-formatted partition:"
20104 #: ../fish/guestfish.pod:1055
20107 " guestfish -N fs:ext4\n"
20112 #: ../fish/guestfish.pod:1057
20113 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
20117 #: ../fish/guestfish.pod:1059
20120 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
20125 #: ../fish/guestfish.pod:1061
20126 msgid "Create a blank 200MB disk:"
20130 #: ../fish/guestfish.pod:1063
20133 " guestfish -N disk:200M\n"
20138 #: ../fish/guestfish.pod:1065
20139 msgid "PROGRESS BARS"
20143 #: ../fish/guestfish.pod:1067
20145 "Some (not all) long-running commands send progress notification messages as "
20146 "they are running. Guestfish turns these messages into progress bars."
20150 #: ../fish/guestfish.pod:1071
20152 "When a command that supports progress bars takes longer than two seconds to "
20153 "run, and if progress bars are enabled, then you will see one appearing below "
20158 #: ../fish/guestfish.pod:1075
20161 " ><fs> copy-size /large-file /another-file 2048M\n"
20162 " / 10% [#####-----------------------------------------] 00:30\n"
20167 #: ../fish/guestfish.pod:1078
20169 "The spinner on the left hand side moves round once for every progress "
20170 "notification received from the backend. This is a (reasonably) golden "
20171 "assurance that the command is \"doing something\" even if the progress bar "
20172 "is not moving, because the command is able to send the progress "
20173 "notifications. When the bar reaches 100% and the command finishes, the "
20174 "spinner disappears."
20178 #: ../fish/guestfish.pod:1085
20180 "Progress bars are enabled by default when guestfish is used interactively. "
20181 "You can enable them even for non-interactive modes using I<--progress-bars>, "
20182 "and you can disable them completely using I<--no-progress-bars>."
20186 #: ../fish/guestfish.pod:1090
20187 msgid "GUESTFISH COMMANDS"
20191 #: ../fish/guestfish.pod:1092
20193 "The commands in this section are guestfish convenience commands, in other "
20194 "words, they are not part of the L<guestfs(3)> API."
20198 #: ../fish/guestfish.pod:1095
20203 #: ../fish/guestfish.pod:1097
20212 #: ../fish/guestfish.pod:1100
20213 msgid "Without any parameter, this provides general help."
20217 #: ../fish/guestfish.pod:1102
20218 msgid "With a C<cmd> parameter, this displays detailed help for that command."
20222 #: ../fish/guestfish.pod:1104
20223 msgid "quit | exit"
20227 #: ../fish/guestfish.pod:1106
20228 msgid "This exits guestfish. You can also use C<^D> key."
20232 #: ../fish/guestfish.pod:1108
20233 msgid "@FISH_COMMANDS@"
20237 #: ../fish/guestfish.pod:1110
20242 #: ../fish/guestfish.pod:1112 ../src/guestfs.pod:1505
20247 #: ../fish/guestfish.pod:1116
20249 "guestfish returns 0 if the commands completed without error, or 1 if there "
20254 #: ../fish/guestfish.pod:1123
20259 #: ../fish/guestfish.pod:1125
20261 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
20266 #: ../fish/guestfish.pod:1128 ../src/guestfs.pod:3198
20267 msgid "FEBOOTSTRAP_KERNEL"
20271 #: ../fish/guestfish.pod:1130 ../src/guestfs.pod:3200
20272 msgid "FEBOOTSTRAP_MODULES"
20276 #: ../fish/guestfish.pod:1132 ../src/guestfs.pod:3202
20278 "These two environment variables allow the kernel that libguestfs uses in the "
20279 "appliance to be selected. If C<$FEBOOTSTRAP_KERNEL> is not set, then the "
20280 "most recent host kernel is chosen. For more information about kernel "
20281 "selection, see L<febootstrap-supermin-helper(8)>. This feature is only "
20282 "available in febootstrap E<ge> 3.8."
20286 #: ../fish/guestfish.pod:1138
20287 msgid "GUESTFISH_DISPLAY_IMAGE"
20291 #: ../fish/guestfish.pod:1140
20293 "The C<display> command uses C<$GUESTFISH_DISPLAY_IMAGE> to display images. "
20294 "If not set, it uses L<display(1)>."
20298 #: ../fish/guestfish.pod:1143
20299 msgid "GUESTFISH_PID"
20303 #: ../fish/guestfish.pod:1145
20305 "Used with the I<--remote> option to specify the remote guestfish process to "
20306 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
20310 #: ../fish/guestfish.pod:1149
20315 #: ../fish/guestfish.pod:1151
20317 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
20318 "not specified, the external L<hexedit(1)> program is used."
20322 #: ../fish/guestfish.pod:1155
20327 #: ../fish/guestfish.pod:1157
20329 "If compiled with GNU readline support, various files in the home directory "
20330 "can be used. See L</FILES>."
20334 #: ../fish/guestfish.pod:1160 ../src/guestfs.pod:3208
20335 msgid "LIBGUESTFS_APPEND"
20339 #: ../fish/guestfish.pod:1162 ../src/guestfs.pod:3210
20340 msgid "Pass additional options to the guest kernel."
20344 #: ../fish/guestfish.pod:1164 ../src/guestfs.pod:3212
20345 msgid "LIBGUESTFS_DEBUG"
20349 #: ../fish/guestfish.pod:1166
20351 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
20352 "effect as using the B<-v> option."
20356 #: ../fish/guestfish.pod:1169 ../src/guestfs.pod:3217
20357 msgid "LIBGUESTFS_MEMSIZE"
20361 #: ../fish/guestfish.pod:1171 ../src/guestfs.pod:3219
20363 "Set the memory allocated to the qemu process, in megabytes. For example:"
20367 #: ../fish/guestfish.pod:1174 ../src/guestfs.pod:3222
20370 " LIBGUESTFS_MEMSIZE=700\n"
20375 #: ../fish/guestfish.pod:1176 ../src/guestfs.pod:3224
20376 msgid "LIBGUESTFS_PATH"
20380 #: ../fish/guestfish.pod:1178
20382 "Set the path that guestfish uses to search for kernel and initrd.img. See "
20383 "the discussion of paths in L<guestfs(3)>."
20387 #: ../fish/guestfish.pod:1181 ../src/guestfs.pod:3229
20388 msgid "LIBGUESTFS_QEMU"
20392 #: ../fish/guestfish.pod:1183 ../src/guestfs.pod:3231
20394 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
20395 "which was found at compile time by the configure script is used."
20399 #: ../fish/guestfish.pod:1187 ../src/guestfs.pod:3237
20400 msgid "LIBGUESTFS_TRACE"
20404 #: ../fish/guestfish.pod:1189
20405 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
20409 #: ../fish/guestfish.pod:1191
20414 #: ../fish/guestfish.pod:1193
20416 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
20421 #: ../fish/guestfish.pod:1196 ../sparsify/virt-sparsify.pod:236
20422 #: ../src/guestfs.pod:3242
20427 #: ../fish/guestfish.pod:1198 ../src/guestfs.pod:3244
20429 "Location of temporary directory, defaults to C</tmp> except for the cached "
20430 "supermin appliance which defaults to C</var/tmp>."
20434 #: ../fish/guestfish.pod:1201 ../src/guestfs.pod:3247
20436 "If libguestfs was compiled to use the supermin appliance then the real "
20437 "appliance is cached in this directory, shared between all handles belonging "
20438 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
20439 "use in case C</var/tmp> is not large enough."
20443 #: ../fish/guestfish.pod:1209 ../fuse/guestmount.pod:297
20444 #: ../rescue/virt-rescue.pod:273
20449 #: ../fish/guestfish.pod:1213 ../fuse/guestmount.pod:301
20450 #: ../rescue/virt-rescue.pod:277
20451 msgid "$HOME/.libguestfs-tools.rc"
20455 #: ../fish/guestfish.pod:1215 ../fuse/guestmount.pod:303
20456 #: ../rescue/virt-rescue.pod:279
20457 msgid "/etc/libguestfs-tools.conf"
20461 #: ../fish/guestfish.pod:1217 ../fuse/guestmount.pod:305
20462 #: ../rescue/virt-rescue.pod:281
20464 "This configuration file controls the default read-only or read-write mode "
20465 "(I<--ro> or I<--rw>)."
20469 #: ../fish/guestfish.pod:1220
20470 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
20474 #: ../fish/guestfish.pod:1222
20475 msgid "$HOME/.guestfish"
20479 #: ../fish/guestfish.pod:1224
20481 "If compiled with GNU readline support, then the command history is saved in "
20486 #: ../fish/guestfish.pod:1227
20487 msgid "$HOME/.inputrc"
20491 #: ../fish/guestfish.pod:1229
20492 msgid "/etc/inputrc"
20496 #: ../fish/guestfish.pod:1231
20498 "If compiled with GNU readline support, then these files can be used to "
20499 "configure readline. For further information, please see L<readline(3)/"
20500 "INITIALIZATION FILE>."
20504 #: ../fish/guestfish.pod:1235
20505 msgid "To write rules which only apply to guestfish, use:"
20509 #: ../fish/guestfish.pod:1237
20519 #: ../fish/guestfish.pod:1241
20521 "Variables that you can set in inputrc that change the behaviour of guestfish "
20522 "in useful ways include:"
20526 #: ../fish/guestfish.pod:1246
20527 msgid "completion-ignore-case (default: on)"
20531 #: ../fish/guestfish.pod:1248
20533 "By default, guestfish will ignore case when tab-completing paths on the "
20538 #: ../fish/guestfish.pod:1251
20541 " set completion-ignore-case off\n"
20546 #: ../fish/guestfish.pod:1253
20547 msgid "to make guestfish case sensitive."
20551 #: ../fish/guestfish.pod:1257
20556 #: ../fish/guestfish.pod:1259
20557 msgid "test2.img (etc)"
20561 #: ../fish/guestfish.pod:1261
20563 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
20564 "will be created in the file C<test1.img> in the current directory. The "
20565 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
20566 "the same name will be overwritten."
20570 #: ../fish/guestfish.pod:1270
20572 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-alignment-scan(1)>, L<virt-"
20573 "cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit"
20574 "(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems"
20575 "(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-"
20576 "rescue(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, "
20577 "L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, "
20578 "L<display(1)>, L<hexedit(1)>, L<febootstrap-supermin-helper(8)>."
20582 #: ../fish/guestfish.pod:1302 ../src/guestfs.pod:3339
20583 #: ../test-tool/libguestfs-test-tool.pod:112
20584 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
20588 #: ../fish/virt-copy-in.pod:5
20590 "virt-copy-in - Copy files and directories into a virtual machine disk image."
20594 #: ../fish/virt-copy-in.pod:9
20597 " virt-copy-in -a disk.img file|dir [file|dir ...] /destination\n"
20602 #: ../fish/virt-copy-in.pod:11
20605 " virt-copy-in -d domain file|dir [file|dir ...] /destination\n"
20610 #: ../fish/virt-copy-in.pod:15
20612 "Using C<virt-copy-in> on live virtual machines can be dangerous, potentially "
20613 "causing disk corruption. The virtual machine must be shut down before you "
20614 "use this command."
20618 #: ../fish/virt-copy-in.pod:21
20620 "C<virt-copy-in> copies files and directories from the local disk into a "
20621 "virtual machine disk image or named libvirt domain."
20625 #: ../fish/virt-copy-in.pod:24
20627 "You can give one of more filenames and directories on the command line. "
20628 "Directories are copied in recursively. The final parameter must be the "
20629 "destination directory in the disk image which must be an absolute path "
20630 "starting with a C</> character."
20634 #: ../fish/virt-copy-in.pod:33
20637 " virt-copy-in -d MyGuest resolv.conf /etc\n"
20642 #: ../fish/virt-copy-in.pod:35 ../fish/virt-tar-in.pod:32
20643 msgid "Upload a home directory to a guest:"
20647 #: ../fish/virt-copy-in.pod:37
20650 " virt-copy-in -d MyGuest skel /home\n"
20655 #: ../fish/virt-copy-in.pod:39 ../fish/virt-copy-out.pod:28
20656 #: ../fish/virt-tar-in.pod:36 ../fish/virt-tar-out.pod:30
20657 msgid "JUST A SHELL SCRIPT WRAPPER AROUND GUESTFISH"
20661 #: ../fish/virt-copy-in.pod:41
20663 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20664 "> C<copy-in> command. For anything more complex than a trivial copy, you "
20665 "are probably better off using guestfish directly."
20669 #: ../fish/virt-copy-in.pod:47 ../fish/virt-copy-out.pod:36
20670 #: ../fish/virt-tar-in.pod:44 ../fish/virt-tar-out.pod:38
20672 "Since the shell script just passes options straight to guestfish, read "
20673 "L<guestfish(1)> to see the full list of options."
20677 #: ../fish/virt-copy-in.pod:52
20679 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-out(1)>, L<virt-edit(1)>, "
20680 "L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20684 #: ../fish/virt-copy-in.pod:66 ../fish/virt-copy-out.pod:55
20685 #: ../fish/virt-tar-in.pod:64 ../fish/virt-tar-out.pod:57
20686 msgid "Copyright (C) 2011 Red Hat Inc. L<http://libguestfs.org/>"
20690 #: ../fish/virt-copy-out.pod:5
20692 "virt-copy-out - Copy files and directories out of a virtual machine disk "
20697 #: ../fish/virt-copy-out.pod:9
20700 " virt-copy-out -a disk.img /file|dir [/file|dir ...] localdir\n"
20705 #: ../fish/virt-copy-out.pod:11
20708 " virt-copy-out -d domain /file|dir [/file|dir ...] localdir\n"
20713 #: ../fish/virt-copy-out.pod:15
20715 "C<virt-copy-out> copies files and directories out of a virtual machine disk "
20716 "image or named libvirt domain."
20720 #: ../fish/virt-copy-out.pod:18
20722 "You can give one of more filenames and directories on the command line. "
20723 "Directories are copied out recursively."
20727 #: ../fish/virt-copy-out.pod:23
20728 msgid "Download the home directories from a virtual machine:"
20732 #: ../fish/virt-copy-out.pod:25
20736 " virt-copy-out -d MyGuest /home homes\n"
20741 #: ../fish/virt-copy-out.pod:30
20743 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20744 "> C<copy-out> command. For anything more complex than a trivial copy, you "
20745 "are probably better off using guestfish directly."
20749 #: ../fish/virt-copy-out.pod:41
20751 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-edit(1)>, L<virt-"
20752 "tar-in(1)>, L<virt-tar-out(1)>, L<http://libguestfs.org/>."
20756 #: ../fish/virt-tar-in.pod:5
20757 msgid "virt-tar-in - Unpack a tarball into a virtual machine disk image."
20761 #: ../fish/virt-tar-in.pod:9
20764 " virt-tar-in -a disk.img data.tar /destination\n"
20769 #: ../fish/virt-tar-in.pod:11
20772 " virt-tar-in -d domain data.tar /destination\n"
20777 #: ../fish/virt-tar-in.pod:13
20780 " zcat data.tar.gz | virt-tar-in -d domain - /destination\n"
20785 #: ../fish/virt-tar-in.pod:17
20787 "Using C<virt-tar-in> on live virtual machines can be dangerous, potentially "
20788 "causing disk corruption. The virtual machine must be shut down before you "
20789 "use this command."
20793 #: ../fish/virt-tar-in.pod:23
20795 "C<virt-tar-in> unpacks an uncompressed tarball into a virtual machine disk "
20796 "image or named libvirt domain."
20800 #: ../fish/virt-tar-in.pod:26
20802 "The first parameter is the tar file. Use C<-> to read the tar file from "
20803 "standard input. The second parameter is the absolute target directory to "
20808 #: ../fish/virt-tar-in.pod:34
20811 " virt-tar-in -d MyGuest homes.tar /home\n"
20816 #: ../fish/virt-tar-in.pod:38
20818 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20819 "> C<tar-in> command. For anything more complex than a trivial copy, you are "
20820 "probably better off using guestfish directly."
20824 #: ../fish/virt-tar-in.pod:49
20826 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
20827 "L<virt-edit(1)>, L<virt-make-fs(1)>, L<virt-tar-out(1)>, L<http://libguestfs."
20832 #: ../fish/virt-tar-out.pod:5
20834 "virt-tar-out - Pack a virtual machine disk image directory into a tarball."
20838 #: ../fish/virt-tar-out.pod:9
20841 " virt-tar-out -a disk.img /dir files.tar\n"
20846 #: ../fish/virt-tar-out.pod:11
20849 " virt-tar-out -d domain /dir files.tar\n"
20854 #: ../fish/virt-tar-out.pod:13
20857 " virt-tar-out -d domain /dir - | gzip --best > files.tar.gz\n"
20862 #: ../fish/virt-tar-out.pod:17
20864 "C<virt-tar-out> packs a virtual machine disk image directory into a tarball."
20868 #: ../fish/virt-tar-out.pod:20
20870 "The first parameter is the absolute path of the virtual machine directory. "
20871 "The second parameter is the tar file to write. Use C<-> to write to "
20876 #: ../fish/virt-tar-out.pod:26
20877 msgid "Download the home directories from a guest:"
20881 #: ../fish/virt-tar-out.pod:28
20884 " virt-tar-out -d MyGuest /home - | gzip --best > homes.tar.gz\n"
20889 #: ../fish/virt-tar-out.pod:32
20891 "This command is just a simple shell script wrapper around the L<guestfish(1)"
20892 "> C<tar-out> command. For anything more complex than a trivial copy, you "
20893 "are probably better off using guestfish directly."
20897 #: ../fish/virt-tar-out.pod:43
20899 "L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
20900 "L<virt-edit(1)>, L<virt-tar-in(1)>, L<http://libguestfs.org/>."
20904 #: ../fuse/guestmount.pod:5
20906 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
20910 #: ../fuse/guestmount.pod:9
20913 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
20918 #: ../fuse/guestmount.pod:11
20921 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
20926 #: ../fuse/guestmount.pod:13
20929 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
20934 #: ../fuse/guestmount.pod:17
20936 "You must I<not> use C<guestmount> in read-write mode on live virtual "
20937 "machines. If you do this, you risk disk corruption in the VM."
20941 #: ../fuse/guestmount.pod:22
20943 "The guestmount program can be used to mount virtual machine filesystems and "
20944 "other disk images on the host. It uses libguestfs for access to the guest "
20945 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
20946 "a mountable device."
20950 #: ../fuse/guestmount.pod:27
20952 "Along with other options, you have to give at least one device (I<-a> "
20953 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
20954 "option) or use the I<-i> inspection option. How this works is better "
20955 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
20960 #: ../fuse/guestmount.pod:33
20962 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
20963 "by you, and the filesystem will not be visible to any other users unless you "
20964 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
20965 "the filesystem, use the C<fusermount -u> command."
20969 #: ../fuse/guestmount.pod:41
20971 "For a typical Windows guest which has its main filesystem on the first "
20976 #: ../fuse/guestmount.pod:44
20979 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
20984 #: ../fuse/guestmount.pod:46
20986 "For a typical Linux guest which has a /boot filesystem on the first "
20987 "partition, and the root filesystem on a logical volume:"
20991 #: ../fuse/guestmount.pod:49
20994 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
20999 #: ../fuse/guestmount.pod:51
21000 msgid "To get libguestfs to detect guest mountpoints for you:"
21004 #: ../fuse/guestmount.pod:53
21007 " guestmount -a guest.img -i --ro /mnt\n"
21012 #: ../fuse/guestmount.pod:55
21013 msgid "For a libvirt guest called \"Guest\" you could do:"
21017 #: ../fuse/guestmount.pod:57
21020 " guestmount -d Guest -i --ro /mnt\n"
21025 #: ../fuse/guestmount.pod:59
21027 "If you don't know what filesystems are contained in a guest or disk image, "
21028 "use L<virt-filesystems(1)> first:"
21032 #: ../fuse/guestmount.pod:62
21035 " virt-filesystems MyGuest\n"
21040 #: ../fuse/guestmount.pod:64
21042 "If you want to trace the libguestfs calls but without excessive debugging "
21043 "information, we recommend:"
21047 #: ../fuse/guestmount.pod:67
21050 " guestmount [...] --trace /mnt\n"
21055 #: ../fuse/guestmount.pod:69
21056 msgid "If you want to debug the program, we recommend:"
21060 #: ../fuse/guestmount.pod:71
21063 " guestmount [...] --trace --verbose /mnt\n"
21068 #: ../fuse/guestmount.pod:73 ../rescue/virt-rescue.pod:68
21069 #: ../resize/virt-resize.pod:544
21074 #: ../fuse/guestmount.pod:75
21075 msgid "Other users cannot see the filesystem by default"
21079 #: ../fuse/guestmount.pod:77
21081 "If you mount a filesystem as one user (eg. root), then other users will not "
21082 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
21083 "option when mounting:"
21087 #: ../fuse/guestmount.pod:81
21090 " sudo guestmount [...] -o allow_other /mnt\n"
21095 #: ../fuse/guestmount.pod:83
21096 msgid "Enabling FUSE"
21100 #: ../fuse/guestmount.pod:85
21102 "On some distros, you may need to add yourself to a special group (eg. "
21103 "C<fuse>) before you can use any FUSE filesystem. This is necessary on "
21104 "Debian and derivatives."
21108 #: ../fuse/guestmount.pod:89
21110 "On other distros, no special group is required. It is not necessary on "
21111 "Fedora or Red Hat Enterprise Linux."
21115 #: ../fuse/guestmount.pod:100
21116 msgid "Add a block device or virtual machine image."
21120 #: ../fuse/guestmount.pod:123
21121 msgid "B<--dir-cache-timeout N>"
21125 #: ../fuse/guestmount.pod:125
21127 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21128 "seconds. The readdir cache [actually, there are several semi-independent "
21129 "caches] is populated after a readdir(2) call with the stat and extended "
21130 "attributes of the files in the directory, in anticipation that they will be "
21131 "requested soon after."
21135 #: ../fuse/guestmount.pod:131
21137 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21138 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21139 "requests, only cache existing ones."
21143 #: ../fuse/guestmount.pod:151
21145 "If you have untrusted raw-format guest disk images, you should use this "
21146 "option to specify the disk format. This avoids a possible security problem "
21147 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
21148 "guestfs_add_drive_opts>."
21152 #: ../fuse/guestmount.pod:156
21153 msgid "B<--fuse-help>"
21157 #: ../fuse/guestmount.pod:158
21158 msgid "Display help on special FUSE options (see I<-o> below)."
21162 #: ../fuse/guestmount.pod:162
21163 msgid "Display brief help and exit."
21167 #: ../fuse/guestmount.pod:186
21169 "Mount the named partition or logical volume on the given mountpoint B<in the "
21170 "guest> (this has nothing to do with mountpoints in the host)."
21174 #: ../fuse/guestmount.pod:189
21176 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21177 "something on C</>."
21181 #: ../fuse/guestmount.pod:206
21183 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21184 "unmounted. If you specify this option, then we don't attempt to sync the "
21185 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21189 #: ../fuse/guestmount.pod:211
21190 msgid "B<-o option>"
21194 #: ../fuse/guestmount.pod:213
21195 msgid "B<--option option>"
21199 #: ../fuse/guestmount.pod:215
21200 msgid "Pass extra options to FUSE."
21204 #: ../fuse/guestmount.pod:217
21206 "To get a list of all the extra options supported by FUSE, use the command "
21207 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21208 "of them are a good idea."
21212 #: ../fuse/guestmount.pod:221
21215 " guestmount --fuse-help\n"
21220 #: ../fuse/guestmount.pod:223
21221 msgid "Some potentially useful FUSE options:"
21225 #: ../fuse/guestmount.pod:227
21226 msgid "B<-o allow_other>"
21230 #: ../fuse/guestmount.pod:229
21231 msgid "Allow other users to see the filesystem."
21235 #: ../fuse/guestmount.pod:231
21236 msgid "B<-o attr_timeout=N>"
21240 #: ../fuse/guestmount.pod:233
21241 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21245 #: ../fuse/guestmount.pod:235
21246 msgid "B<-o kernel_cache>"
21250 #: ../fuse/guestmount.pod:237
21252 "Allow the kernel to cache files (reduces the number of reads that have to go "
21253 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21254 "afford the extra memory usage."
21258 #: ../fuse/guestmount.pod:241
21259 msgid "B<-o uid=N> B<-o gid=N>"
21263 #: ../fuse/guestmount.pod:243
21265 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21266 "the chosen values."
21270 #: ../fuse/guestmount.pod:252
21272 "Add devices and mount everything read-only. Also disallow writes and make "
21273 "the disk appear read-only to FUSE."
21277 #: ../fuse/guestmount.pod:255
21279 "This is highly recommended if you are not going to edit the guest disk. If "
21280 "the guest is running and this option is I<not> supplied, then there is a "
21281 "strong risk of disk corruption in the guest. We try to prevent this from "
21282 "happening, but it is not always possible."
21286 #: ../fuse/guestmount.pod:260 ../rescue/virt-rescue.pod:171
21287 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21291 #: ../fuse/guestmount.pod:264
21292 msgid "Enable SELinux support for the guest."
21296 #: ../fuse/guestmount.pod:270
21297 msgid "Enable verbose messages from underlying libguestfs."
21301 #: ../fuse/guestmount.pod:276
21302 msgid "Display the program version and exit."
21306 #: ../fuse/guestmount.pod:285 ../fuse/guestmount.pod:308
21307 #: ../rescue/virt-rescue.pod:201 ../rescue/virt-rescue.pod:284
21308 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
21312 #: ../fuse/guestmount.pod:289
21317 #: ../fuse/guestmount.pod:291
21318 msgid "Trace libguestfs calls and entry into each FUSE function."
21322 #: ../fuse/guestmount.pod:293
21323 msgid "This also stops the daemon from forking into the background."
21327 #: ../fuse/guestmount.pod:319
21329 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
21330 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
21335 #: ../fuse/guestmount.pod:334
21336 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
21340 #: ../inspector/virt-inspector.pod:5
21342 "virt-inspector - Display operating system version and other information "
21343 "about a virtual machine"
21347 #: ../inspector/virt-inspector.pod:9
21350 " virt-inspector [--options] -d domname\n"
21355 #: ../inspector/virt-inspector.pod:11
21358 " virt-inspector [--options] -a disk.img [-a disk.img ...]\n"
21363 #: ../inspector/virt-inspector.pod:15
21366 " virt-inspector domname\n"
21371 #: ../inspector/virt-inspector.pod:17 ../inspector/virt-inspector.pod:141
21374 " virt-inspector disk.img [disk.img ...]\n"
21379 #: ../inspector/virt-inspector.pod:21
21381 "B<virt-inspector> examines a virtual machine or disk image and tries to "
21382 "determine the version of the operating system and other information about "
21383 "the virtual machine."
21387 #: ../inspector/virt-inspector.pod:25
21388 msgid "Virt-inspector produces XML output for feeding into other programs."
21392 #: ../inspector/virt-inspector.pod:27
21394 "In the normal usage, use C<virt-inspector -d domname> where C<domname> is "
21395 "the libvirt domain (see: C<virsh list --all>)."
21399 #: ../inspector/virt-inspector.pod:30
21401 "You can also run virt-inspector directly on disk images from a single "
21402 "virtual machine. Use C<virt-inspector -a disk.img>. In rare cases a domain "
21403 "has several block devices, in which case you should list several I<-a> "
21404 "options one after another, with the first corresponding to the guest's C</"
21405 "dev/sda>, the second to the guest's C</dev/sdb> and so on."
21409 #: ../inspector/virt-inspector.pod:37
21411 "You can also run virt-inspector on install disks, live CDs, bootable USB "
21412 "keys and similar."
21416 #: ../inspector/virt-inspector.pod:40
21418 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
21419 "inspect several virtual machines, you have to run virt-inspector several "
21420 "times (for example, from a shell script for-loop)."
21424 #: ../inspector/virt-inspector.pod:45
21426 "Because virt-inspector needs direct access to guest images, it won't "
21427 "normally work over remote libvirt connections."
21431 #: ../inspector/virt-inspector.pod:48
21433 "All of the information available from virt-inspector is also available "
21434 "through the core libguestfs inspection API (see L<guestfs(3)/INSPECTION>). "
21435 "The same information can also be fetched using guestfish or via libguestfs "
21436 "bindings in many programming languages (see L<guestfs(3)/USING LIBGUESTFS "
21437 "WITH OTHER PROGRAMMING LANGUAGES>)."
21441 #: ../inspector/virt-inspector.pod:81
21443 "Libvirt is only used if you specify a C<domname> on the command line. If "
21444 "you specify guest block devices directly (I<-a>), then libvirt is not used "
21449 #: ../inspector/virt-inspector.pod:94
21451 "When prompting for keys and passphrases, virt-inspector normally turns "
21452 "echoing off so you cannot see what you are typing. If you are not worried "
21453 "about Tempest attacks and there is no one else in the room you can specify "
21454 "this flag to see what you are typing."
21458 #: ../inspector/virt-inspector.pod:103 ../tools/virt-list-filesystems.pl:93
21459 #: ../tools/virt-list-partitions.pl:94 ../tools/virt-tar.pl:143
21460 #: ../tools/virt-win-reg.pl:144
21462 "Specify the format of disk images given on the command line. If this is "
21463 "omitted then the format is autodetected from the content of the disk image."
21467 #: ../inspector/virt-inspector.pod:107 ../tools/virt-list-filesystems.pl:97
21468 #: ../tools/virt-list-partitions.pl:98 ../tools/virt-tar.pl:147
21469 #: ../tools/virt-win-reg.pl:148
21471 "If disk images are requested from libvirt, then this program asks libvirt "
21472 "for this information. In this case, the value of the format parameter is "
21477 #: ../inspector/virt-inspector.pod:111 ../resize/virt-resize.pod:314
21478 #: ../resize/virt-resize.pod:406 ../sparsify/virt-sparsify.pod:132
21479 #: ../tools/virt-list-filesystems.pl:101 ../tools/virt-list-partitions.pl:102
21480 #: ../tools/virt-tar.pl:151 ../tools/virt-win-reg.pl:152
21482 "If working with untrusted raw-format guest disk images, you should ensure "
21483 "the format is always specified."
21487 #: ../inspector/virt-inspector.pod:139
21488 msgid "Previous versions of virt-inspector allowed you to write either:"
21492 #: ../inspector/virt-inspector.pod:145
21495 " virt-inspector guestname\n"
21500 #: ../inspector/virt-inspector.pod:153
21505 #: ../inspector/virt-inspector.pod:155
21507 "The virt-inspector XML is described precisely in a RELAX NG schema file "
21508 "C<virt-inspector.rng> which is supplied with libguestfs. This section is "
21509 "just an overview."
21513 #: ../inspector/virt-inspector.pod:159
21515 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
21516 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
21517 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
21518 "which is vanishingly rare in real world VMs."
21522 #: ../inspector/virt-inspector.pod:164
21523 msgid "E<lt>operatingsystemE<gt>"
21527 #: ../inspector/virt-inspector.pod:166
21529 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
21530 "describe the operating system, its architecture, the descriptive \"product "
21531 "name\" string, the type of OS and so on, as in this example:"
21535 #: ../inspector/virt-inspector.pod:170
21538 " <operatingsystems>\n"
21539 " <operatingsystem>\n"
21540 " <root>/dev/sda2</root>\n"
21541 " <name>windows</name>\n"
21542 " <arch>i386</arch>\n"
21543 " <distro>windows</distro>\n"
21544 " <product_name>Windows 7 Enterprise</product_name>\n"
21545 " <product_variant>Client</product_variant>\n"
21546 " <major_version>6</major_version>\n"
21547 " <minor_version>1</minor_version>\n"
21548 " <windows_systemroot>/Windows</windows_systemroot>\n"
21549 " <format>installed</format>\n"
21554 #: ../inspector/virt-inspector.pod:183
21556 "In brief, E<lt>nameE<gt> is the class of operating system (something like "
21557 "C<linux> or C<windows>), E<lt>distroE<gt> is the distribution (eg. C<fedora> "
21558 "but many other distros are recognized) and E<lt>archE<gt> is the guest "
21559 "architecture. The other fields are fairly self-explanatory, but because "
21560 "these fields are taken directly from the libguestfs inspection API you can "
21561 "find precise information from L<guestfs(3)/INSPECTION>."
21565 #: ../inspector/virt-inspector.pod:191
21567 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
21568 "of view of libguestfs (block devices may have completely different names "
21569 "inside the VM itself)."
21573 #: ../inspector/virt-inspector.pod:195
21574 msgid "E<lt>mountpointsE<gt>"
21578 #: ../inspector/virt-inspector.pod:197
21580 "Un*x-like guests typically have multiple filesystems which are mounted at "
21581 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
21582 "element which looks like this:"
21586 #: ../inspector/virt-inspector.pod:201
21589 " <operatingsystems>\n"
21590 " <operatingsystem>\n"
21593 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
21594 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
21595 " </mountpoints>\n"
21600 #: ../inspector/virt-inspector.pod:209
21602 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
21603 "and may have completely different names inside the guest. Only mountable "
21604 "filesystems appear in this list, not things like swap devices."
21608 #: ../inspector/virt-inspector.pod:214
21609 msgid "E<lt>filesystemsE<gt>"
21613 #: ../inspector/virt-inspector.pod:216
21615 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
21616 "filesystems belonging to the guest, including swap and empty partitions. "
21617 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
21618 "this OS or shared with this OS and other OSes)."
21622 #: ../inspector/virt-inspector.pod:222
21623 msgid "You might see something like this:"
21627 #: ../inspector/virt-inspector.pod:224
21630 " <operatingsystems>\n"
21631 " <operatingsystem>\n"
21634 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21635 " <type>ext4</type>\n"
21636 " <label>Fedora-13-x86_64</label>\n"
21637 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
21643 #: ../inspector/virt-inspector.pod:234
21645 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
21646 "the label, and the UUID."
21650 #: ../inspector/virt-inspector.pod:237
21651 msgid "E<lt>applicationsE<gt>"
21655 #: ../inspector/virt-inspector.pod:239
21657 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
21658 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
21663 #: ../inspector/virt-inspector.pod:243
21665 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
21666 "Typical values would be C<rpm> and C<deb>."
21670 #: ../inspector/virt-inspector.pod:246
21672 "E<lt>package_managementE<gt>, if present, describes the package manager. "
21673 "Typical values include C<yum>, C<up2date> and C<apt>"
21677 #: ../inspector/virt-inspector.pod:249
21678 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
21682 #: ../inspector/virt-inspector.pod:252
21685 " <operatingsystems>\n"
21686 " <operatingsystem>\n"
21688 " <applications>\n"
21690 " <name>coreutils</name>\n"
21691 " <version>8.5</version>\n"
21692 " <release>1</release>\n"
21693 " </application>\n"
21698 #: ../inspector/virt-inspector.pod:262
21700 "The version and release fields may not be available for some types guests. "
21701 "Other fields are possible, see L<guestfs(3)/"
21702 "guestfs_inspect_list_applications>."
21706 #: ../inspector/virt-inspector.pod:266
21707 msgid "E<lt>drive_mappingsE<gt>"
21711 #: ../inspector/virt-inspector.pod:268
21713 "For operating systems like Windows which use drive letters, virt-inspector "
21714 "is able to find out how drive letters map to filesystems."
21718 #: ../inspector/virt-inspector.pod:272
21721 " <operatingsystems>\n"
21722 " <operatingsystem>\n"
21724 " <drive_mappings>\n"
21725 " <drive_mapping name=\"C\">/dev/sda2</drive_mapping>\n"
21726 " <drive_mapping name=\"E\">/dev/sdb1</drive_mapping>\n"
21727 " </drive_mappings>\n"
21732 #: ../inspector/virt-inspector.pod:280
21734 "In the example above, drive C maps to the filesystem on the second partition "
21735 "on the first disk, and drive E maps to the filesystem on the first partition "
21736 "on the second disk."
21740 #: ../inspector/virt-inspector.pod:284
21742 "Note that this only covers permanent local filesystem mappings, not things "
21743 "like network shares. Furthermore NTFS volume mount points may not be listed "
21748 #: ../inspector/virt-inspector.pod:288
21749 msgid "E<lt>iconE<gt>"
21753 #: ../inspector/virt-inspector.pod:290
21755 "Virt-inspector is sometimes able to extract an icon or logo for the guest. "
21756 "The icon is returned as base64-encoded PNG data. Note that the icon can be "
21757 "very large and high quality."
21761 #: ../inspector/virt-inspector.pod:294
21764 " <operatingsystems>\n"
21765 " <operatingsystem>\n"
21768 " iVBORw0KGgoAAAANSUhEUgAAAGAAAABg[.......]\n"
21769 " [... many lines of base64 data ...]\n"
21775 #: ../inspector/virt-inspector.pod:302
21777 "To display the icon, you have to extract it and convert the base64 data back "
21778 "to a binary file. Use an XPath query or simply an editor to extract the "
21779 "data, then use the coreutils L<base64(1)> program to do the conversion back "
21784 #: ../inspector/virt-inspector.pod:307
21787 " base64 -i -d < icon.data > icon.png\n"
21792 #: ../inspector/virt-inspector.pod:309
21793 msgid "INSPECTING INSTALL DISKS, LIVE CDs"
21797 #: ../inspector/virt-inspector.pod:311
21799 "Virt-inspector can detect some operating system installers on install disks, "
21800 "live CDs, bootable USB keys and more."
21804 #: ../inspector/virt-inspector.pod:314
21806 "In this case the E<lt>formatE<gt> tag will contain C<installer> and other "
21807 "fields may be present to indicate a live CD, network installer, or one part "
21808 "of a multipart CD. For example:"
21812 #: ../inspector/virt-inspector.pod:318
21815 " <operatingsystems>\n"
21816 " <operatingsystem>\n"
21817 " <root>/dev/sda</root>\n"
21818 " <name>linux</name>\n"
21819 " <arch>i386</arch>\n"
21820 " <distro>ubuntu</distro>\n"
21821 " <product_name>Ubuntu 10.10 "Maverick Meerkat"</product_name>\n"
21822 " <major_version>10</major_version>\n"
21823 " <minor_version>10</minor_version>\n"
21824 " <format>installer</format>\n"
21830 #: ../inspector/virt-inspector.pod:330
21831 msgid "USING XPATH"
21835 #: ../inspector/virt-inspector.pod:332
21837 "You can use the XPath query language to select parts of the XML. We "
21838 "recommend using C<xmlstarlet> to perform XPath queries from the command line."
21842 #: ../inspector/virt-inspector.pod:338
21845 " $ virt-inspector -d Guest | xmlstarlet sel -t -c '//filesystems'\n"
21847 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
21848 " <type>ext4</type>\n"
21854 #: ../inspector/virt-inspector.pod:344
21857 " $ virt-inspector -d Guest | \\\n"
21858 " xmlstarlet sel -t -c \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
21864 #: ../inspector/virt-inspector.pod:348
21867 " $ virt-inspector -d Guest | \\\n"
21868 " xmlstarlet sel -t -v '//icon' | base64 -i -d | display -\n"
21869 " [displays the guest icon, if there is one]\n"
21874 #: ../inspector/virt-inspector.pod:359
21875 msgid "OLD VERSIONS OF VIRT-INSPECTOR"
21879 #: ../inspector/virt-inspector.pod:361
21881 "Early versions of libguestfs shipped with a different virt-inspector program "
21882 "written in Perl (the current version is written in C). The XML output of "
21883 "the Perl virt-inspector was different and it could also output in other "
21884 "formats like text."
21888 #: ../inspector/virt-inspector.pod:366
21890 "The old virt-inspector is no longer supported or shipped with libguestfs."
21894 #: ../inspector/virt-inspector.pod:369
21896 "To confuse matters further, in Red Hat Enterprise Linux 6 we ship two "
21897 "versions of virt-inspector with different names:"
21901 #: ../inspector/virt-inspector.pod:372
21904 " virt-inspector Old Perl version.\n"
21905 " virt-inspector2 New C version.\n"
21910 #: ../inspector/virt-inspector.pod:382
21912 "L<guestfs(3)>, L<guestfish(1)>, L<http://www.w3.org/TR/xpath/>, L<base64(1)"
21913 ">, L<xmlstarlet(1)>, L<http://libguestfs.org/>."
21917 #: ../inspector/virt-inspector.pod:399
21918 msgid "Matthew Booth L<mbooth@redhat.com>"
21922 #: ../java/examples/guestfs-java.pod:5
21923 msgid "guestfs-java - How to use libguestfs from Java"
21927 #: ../java/examples/guestfs-java.pod:9
21930 " import com.redhat.et.libguestfs.*;\n"
21935 #: ../java/examples/guestfs-java.pod:11
21938 " GuestFS g = new GuestFS ();\n"
21939 " g.add_drive_opts (\"disk.img\", null);\n"
21945 #: ../java/examples/guestfs-java.pod:17
21947 "This manual page documents how to call libguestfs from the Java programming "
21948 "language. This page just documents the differences from the C API and gives "
21949 "some examples. If you are not familiar with using libguestfs, you also need "
21950 "to read L<guestfs(3)>."
21954 #: ../java/examples/guestfs-java.pod:22 ../ocaml/examples/guestfs-ocaml.pod:53
21955 msgid "CLOSING THE HANDLE"
21959 #: ../java/examples/guestfs-java.pod:24
21961 "The handle is closed when it is reaped by the garbage collector. Because "
21962 "libguestfs handles include a lot of state, it is also possible to close (and "
21963 "hence free) them explicitly by calling the C<close> method."
21967 #: ../java/examples/guestfs-java.pod:29 ../ocaml/examples/guestfs-ocaml.pod:60
21968 #: ../python/examples/guestfs-python.pod:21
21969 #: ../ruby/examples/guestfs-ruby.pod:22
21974 #: ../java/examples/guestfs-java.pod:31
21976 "Errors from libguestfs functions are mapped into the C<LibGuestFSException> "
21977 "exception. This has a single parameter which is the error message (a "
21982 #: ../java/examples/guestfs-java.pod:35
21983 msgid "Calling any method on a closed handle raises the same exception."
21987 #: ../java/examples/guestfs-java.pod:47
21989 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-ocaml"
21990 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
21991 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
21995 #: ../ocaml/examples/guestfs-ocaml.pod:5
21996 msgid "guestfs-ocaml - How to use libguestfs from OCaml"
22000 #: ../ocaml/examples/guestfs-ocaml.pod:9
22001 msgid "Module style:"
22005 #: ../ocaml/examples/guestfs-ocaml.pod:11
22008 " let g = Guestfs.create () in\n"
22009 " Guestfs.add_drive_opts g ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22010 " Guestfs.launch g;\n"
22015 #: ../ocaml/examples/guestfs-ocaml.pod:15
22016 msgid "Object-oriented style:"
22020 #: ../ocaml/examples/guestfs-ocaml.pod:17
22023 " let g = new Guestfs.guestfs () in\n"
22024 " g#add_drive_opts ~format:\"raw\" ~readonly:true \"disk.img\";\n"
22030 #: ../ocaml/examples/guestfs-ocaml.pod:21
22033 " ocamlfind opt prog.ml -package guestfs -linkpkg -o prog\n"
22035 " ocamlopt -I +guestfs mlguestfs.cmxa prog.ml -o prog\n"
22040 #: ../ocaml/examples/guestfs-ocaml.pod:27
22042 "This manual page documents how to call libguestfs from the OCaml programming "
22043 "language. This page just documents the differences from the C API and gives "
22044 "some examples. If you are not familiar with using libguestfs, you also need "
22045 "to read L<guestfs(3)>."
22049 #: ../ocaml/examples/guestfs-ocaml.pod:32
22050 msgid "PROGRAMMING STYLES"
22054 #: ../ocaml/examples/guestfs-ocaml.pod:34
22056 "There are two different programming styles supported by the OCaml bindings. "
22057 "You can use a module style, with each C function mapped to an OCaml function:"
22061 #: ../ocaml/examples/guestfs-ocaml.pod:38
22064 " int guestfs_set_verbose (guestfs_h *g, int flag);\n"
22069 #: ../ocaml/examples/guestfs-ocaml.pod:40
22074 #: ../ocaml/examples/guestfs-ocaml.pod:42
22077 " val Guestfs.set_verbose : Guestfs.t -> bool -> unit\n"
22082 #: ../ocaml/examples/guestfs-ocaml.pod:44
22084 "Alternately you can use an object-oriented style, calling methods on the "
22085 "class C<Guestfs.guestfs>:"
22089 #: ../ocaml/examples/guestfs-ocaml.pod:47
22092 " method set_verbose : bool -> unit\n"
22097 #: ../ocaml/examples/guestfs-ocaml.pod:49
22099 "The object-oriented style is usually briefer, and the minor performance "
22100 "penalty isn't noticable in the general overhead of performing libguestfs "
22105 #: ../ocaml/examples/guestfs-ocaml.pod:55
22107 "The handle is closed when it is reaped by the garbage collector. Because "
22108 "libguestfs handles include a lot of state, it is also possible to close (and "
22109 "hence free) them explicitly by calling C<Guestfs.close> or the C<#close> "
22114 #: ../ocaml/examples/guestfs-ocaml.pod:62
22116 "Errors from libguestfs functions are mapped into the C<Guestfs.Error> "
22117 "exception. This has a single parameter which is the error message (a "
22122 #: ../ocaml/examples/guestfs-ocaml.pod:66
22124 "Calling any function/method on a closed handle raises C<Guestfs."
22125 "Handle_closed>. The single parameter is the name of the function that you "
22130 #: ../ocaml/examples/guestfs-ocaml.pod:80
22132 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22133 "(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-recipes(1)>, "
22134 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>, L<http://caml.inria.fr/>."
22138 #: ../perl/examples/guestfs-perl.pod:5
22139 msgid "guestfs-perl - How to use libguestfs from Perl"
22143 #: ../perl/examples/guestfs-perl.pod:9
22146 " use Sys::Guestfs;\n"
22151 #: ../perl/examples/guestfs-perl.pod:11
22154 " my $h = Sys::Guestfs->new ();\n"
22155 " $h->add_drive_opts ('guest.img', format => 'raw');\n"
22156 " $h->launch ();\n"
22157 " $h->mount_options ('', '/dev/sda1', '/');\n"
22158 " $h->touch ('/hello');\n"
22164 #: ../perl/examples/guestfs-perl.pod:20
22166 "This manual page documents how to call libguestfs from the Perl programming "
22167 "language. This page just documents the differences from the C API and gives "
22168 "some examples. If you are not familiar with using libguestfs, you also need "
22169 "to read L<guestfs(3)>. To read the full Perl API, see L<Sys::Guestfs(3)>."
22173 #: ../perl/examples/guestfs-perl.pod:26
22178 #: ../perl/examples/guestfs-perl.pod:28
22180 "Errors from libguestfs functions turn into calls to C<croak> (see L<Carp(3)"
22185 #: ../perl/examples/guestfs-perl.pod:41
22187 "L<Sys::Guestfs(3)>, L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang"
22188 "(3)>, L<guestfs-java(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
22189 "L<guestfs-recipes(1)>, L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22193 #: ../python/examples/guestfs-python.pod:5
22194 msgid "guestfs-python - How to use libguestfs from Python"
22198 #: ../python/examples/guestfs-python.pod:9
22201 " import guestfs\n"
22202 " g = guestfs.GuestFS ()\n"
22203 " g.add_drive_opts (\"disk.img\", format=\"raw\", readonly=1)\n"
22209 #: ../python/examples/guestfs-python.pod:16
22211 "This manual page documents how to call libguestfs from the Python "
22212 "programming language. This page just documents the differences from the C "
22213 "API and gives some examples. If you are not familiar with using libguestfs, "
22214 "you also need to read L<guestfs(3)>."
22218 #: ../python/examples/guestfs-python.pod:23
22220 "Errors from libguestfs functions are mapped into C<RuntimeException> with a "
22221 "single string argument which is the error message."
22225 #: ../python/examples/guestfs-python.pod:26
22226 msgid "MORE DOCUMENTATION"
22230 #: ../python/examples/guestfs-python.pod:28
22235 #: ../python/examples/guestfs-python.pod:30
22239 " >>> import guestfs\n"
22240 " >>> help (guestfs)\n"
22245 #: ../python/examples/guestfs-python.pod:44
22247 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
22248 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-recipes(1)>, "
22249 "L<guestfs-ruby(3)>, L<http://libguestfs.org/>."
22253 #: ../rescue/virt-rescue.pod:5
22254 msgid "virt-rescue - Run a rescue shell on a virtual machine"
22258 #: ../rescue/virt-rescue.pod:9
22261 " virt-rescue [--options] -d domname\n"
22266 #: ../rescue/virt-rescue.pod:11
22269 " virt-rescue [--options] -a disk.img [-a disk.img ...]\n"
22274 #: ../rescue/virt-rescue.pod:15
22277 " virt-rescue [--options] domname\n"
22282 #: ../rescue/virt-rescue.pod:17
22285 " virt-rescue [--options] disk.img [disk.img ...]\n"
22290 #: ../rescue/virt-rescue.pod:21
22292 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
22293 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
22294 "you from doing this, but doesn't catch all cases."
22298 #: ../rescue/virt-rescue.pod:25
22300 "However if you use the I<--ro> (read only) option, then you can attach a "
22301 "shell to a live virtual machine. The results might be strange or "
22302 "inconsistent at times but you won't get disk corruption."
22306 #: ../rescue/virt-rescue.pod:31
22308 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
22309 "need for a CD. virt-rescue gives you a rescue shell and some simple "
22310 "recovery tools which you can use to examine or rescue a virtual machine or "
22315 #: ../rescue/virt-rescue.pod:36
22317 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
22318 "on disk image(s):"
22322 #: ../rescue/virt-rescue.pod:39
22325 " virt-rescue -d GuestName\n"
22330 #: ../rescue/virt-rescue.pod:41
22333 " virt-rescue --ro -a /path/to/disk.img\n"
22338 #: ../rescue/virt-rescue.pod:43
22341 " virt-rescue -a /dev/sdc\n"
22346 #: ../rescue/virt-rescue.pod:45
22347 msgid "For live VMs you I<must> use the --ro option."
22351 #: ../rescue/virt-rescue.pod:47
22353 "When you run virt-rescue on a virtual machine or disk image, you are placed "
22354 "in an interactive bash shell where you can use many ordinary Linux "
22355 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
22356 "appliance. You must mount the virtual machine's filesystems by hand. There "
22357 "is an empty directory called C</sysroot> where you can mount filesystems."
22361 #: ../rescue/virt-rescue.pod:54
22363 "In the example below, we list logical volumes, then choose one to mount "
22364 "under C</sysroot>:"
22368 #: ../rescue/virt-rescue.pod:57
22372 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
22373 " lv_root vg_f11x64 -wi-a- 8.83G\n"
22374 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
22375 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
22376 " ><rescue> ls /sysroot\n"
22381 #: ../rescue/virt-rescue.pod:64
22383 "If you don't know what filesystems are available on the virtual machine then "
22384 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
22388 #: ../rescue/virt-rescue.pod:70
22390 "Virt-rescue can be used on I<any> disk image file or device, not just a "
22391 "virtual machine. For example you can use it on a blank file if you want to "
22392 "partition that file (although we would recommend using L<guestfish(1)> "
22393 "instead as it is more suitable for this purpose). You can even use virt-"
22394 "rescue on things like SD cards."
22398 #: ../rescue/virt-rescue.pod:76
22400 "Virt-rescue does not require root. You only need to run it as root if you "
22401 "need root to open the disk image."
22405 #: ../rescue/virt-rescue.pod:79
22407 "This tool is just designed for quick interactive hacking on a virtual "
22408 "machine. For more structured access to a virtual machine disk image, you "
22409 "should use L<guestfs(3)>. To get a structured shell that you can use to "
22410 "make scripted changes to guests, use L<guestfish(1)>."
22414 #: ../rescue/virt-rescue.pod:103
22415 msgid "B<--append kernelopts>"
22419 #: ../rescue/virt-rescue.pod:105
22420 msgid "Pass additional options to the rescue kernel."
22424 #: ../rescue/virt-rescue.pod:135
22427 " virt-rescue --format=raw -a disk.img\n"
22432 #: ../rescue/virt-rescue.pod:139
22435 " virt-rescue --format=raw -a disk.img --format -a another.img\n"
22440 #: ../rescue/virt-rescue.pod:148
22445 #: ../rescue/virt-rescue.pod:150
22446 msgid "B<--memsize MB>"
22450 #: ../rescue/virt-rescue.pod:152
22452 "Change the amount of memory allocated to the rescue system. The default is "
22453 "set by libguestfs and is small but adequate for running system tools. The "
22454 "occasional program might need more memory. The parameter is specified in "
22459 #: ../rescue/virt-rescue.pod:157
22460 msgid "B<--network>"
22464 #: ../rescue/virt-rescue.pod:159
22465 msgid "Enable QEMU user networking in the guest. See L</NETWORK>."
22469 #: ../rescue/virt-rescue.pod:165
22470 msgid "Open the image read-only."
22474 #: ../rescue/virt-rescue.pod:175
22476 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
22477 "SELINUX> before using this option."
22481 #: ../rescue/virt-rescue.pod:178
22486 #: ../rescue/virt-rescue.pod:180
22487 msgid "Enable N E<ge> 2 virtual CPUs in the rescue appliance."
22491 #: ../rescue/virt-rescue.pod:198
22493 "This changes the I<-a> and I<-d> options so that disks are added and mounts "
22494 "are done read-write."
22498 #: ../rescue/virt-rescue.pod:211
22499 msgid "Previous versions of virt-rescue allowed you to write either:"
22503 #: ../rescue/virt-rescue.pod:213
22506 " virt-rescue disk.img [disk.img ...]\n"
22511 #: ../rescue/virt-rescue.pod:217
22514 " virt-rescue guestname\n"
22519 #: ../rescue/virt-rescue.pod:225
22524 #: ../rescue/virt-rescue.pod:227
22526 "Adding the I<--network> option enables QEMU user networking in the rescue "
22527 "appliance. There are some differences between user networking and ordinary "
22532 #: ../rescue/virt-rescue.pod:233
22533 msgid "ping does not work"
22537 #: ../rescue/virt-rescue.pod:235
22539 "Because the ICMP ECHO_REQUEST protocol generally requires root in order to "
22540 "send the ping packets, and because virt-rescue must be able to run as non-"
22541 "root, QEMU user networking is not able to emulate the L<ping(8)> command. "
22542 "The ping command will appear to resolve addresses but will not be able to "
22543 "send or receive any packets. This does not mean that the network is not "
22548 #: ../rescue/virt-rescue.pod:242
22549 msgid "cannot receive connections"
22553 #: ../rescue/virt-rescue.pod:244
22554 msgid "QEMU user networking cannot receive incoming connections."
22558 #: ../rescue/virt-rescue.pod:246
22559 msgid "making TCP connections"
22563 #: ../rescue/virt-rescue.pod:248
22565 "The virt-rescue appliance needs to be small and so does not include many "
22566 "network tools. In particular there is no L<telnet(1)> command. You can "
22567 "make TCP connections from the shell using the magical C</dev/tcp/"
22568 "E<lt>hostnameE<gt>/E<lt>portE<gt>> syntax:"
22572 #: ../rescue/virt-rescue.pod:253
22575 " exec 3<>/dev/tcp/redhat.com/80\n"
22576 " echo \"GET /\" >&3\n"
22582 #: ../rescue/virt-rescue.pod:257
22583 msgid "See L<bash(1)> for more details."
22587 #: ../rescue/virt-rescue.pod:263
22589 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
22590 "ENVIRONMENT VARIABLES> for the complete list."
22594 #: ../rescue/virt-rescue.pod:290
22596 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<http://"
22597 "libguestfs.org/>."
22601 #: ../resize/virt-resize.pod:5
22602 msgid "virt-resize - Resize a virtual machine disk"
22606 #: ../resize/virt-resize.pod:9
22609 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
22610 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
22611 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
22616 #: ../resize/virt-resize.pod:15
22618 "Virt-resize is a tool which can resize a virtual machine disk, making it "
22619 "larger or smaller overall, and resizing or deleting any partitions contained "
22624 #: ../resize/virt-resize.pod:19
22626 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
22627 "not> be used on live virtual machines - for consistent results, shut the "
22628 "virtual machine down before resizing it."
22632 #: ../resize/virt-resize.pod:23
22634 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
22635 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
22639 #: ../resize/virt-resize.pod:31 ../resize/virt-resize.pod:520
22640 #: ../sparsify/virt-sparsify.pod:203 ../src/guestfs.pod:469
22641 #: ../src/guestfs.pod:1287 ../src/guestfs.pod:1426 ../src/guestfs.pod:2675
22646 #: ../resize/virt-resize.pod:33
22648 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
22649 "fill the extra 5GB of space."
22653 #: ../resize/virt-resize.pod:36
22656 " virt-filesystems --long -h --all -a olddisk\n"
22661 #: ../resize/virt-resize.pod:38
22664 " truncate -r olddisk newdisk\n"
22665 " truncate -s +5G newdisk\n"
22670 #: ../resize/virt-resize.pod:41
22673 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
22674 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
22679 #: ../resize/virt-resize.pod:44 ../resize/virt-resize.pod:527
22680 #: ../sparsify/virt-sparsify.pod:210 ../src/guestfs.pod:475
22681 #: ../src/guestfs.pod:1291 ../src/guestfs.pod:1430 ../src/guestfs.pod:2700
22686 #: ../resize/virt-resize.pod:46
22688 "As above, but make the /boot partition 200MB bigger, while giving the "
22689 "remaining space to /dev/sda2:"
22693 #: ../resize/virt-resize.pod:49
22696 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22697 " olddisk newdisk\n"
22702 #: ../resize/virt-resize.pod:52 ../resize/virt-resize.pod:533
22703 #: ../sparsify/virt-sparsify.pod:216 ../src/guestfs.pod:486
22704 #: ../src/guestfs.pod:1436
22709 #: ../resize/virt-resize.pod:54
22711 "As in the first example, but expand a logical volume as the final step. "
22712 "This is what you would typically use for Linux guests that use LVM:"
22716 #: ../resize/virt-resize.pod:58
22719 " virt-resize --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root \\\n"
22720 " olddisk newdisk\n"
22725 #: ../resize/virt-resize.pod:61
22730 #: ../resize/virt-resize.pod:63
22732 "As in the first example, but the output format will be qcow2 instead of a "
22737 #: ../resize/virt-resize.pod:66
22740 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
22741 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
22746 #: ../resize/virt-resize.pod:71
22747 msgid "DETAILED USAGE"
22751 #: ../resize/virt-resize.pod:73
22752 msgid "EXPANDING A VIRTUAL MACHINE DISK"
22756 #: ../resize/virt-resize.pod:77
22757 msgid "1. Shut down the virtual machine"
22761 #: ../resize/virt-resize.pod:79
22762 msgid "2. Locate input disk image"
22766 #: ../resize/virt-resize.pod:81
22768 "Locate the input disk image (ie. the file or device on the host containing "
22769 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
22770 "dumpxml> like this to find the disk image name:"
22774 #: ../resize/virt-resize.pod:85
22777 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
22778 " Found 1 nodes:\n"
22780 " <source dev=\"/dev/vg/lv_guest\" />\n"
22785 #: ../resize/virt-resize.pod:90
22786 msgid "3. Look at current sizing"
22790 #: ../resize/virt-resize.pod:92
22791 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
22795 #: ../resize/virt-resize.pod:95
22798 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
22799 " Name Type Size Parent\n"
22800 " /dev/sda1 partition 101M /dev/sda\n"
22801 " /dev/sda2 partition 7.9G /dev/sda\n"
22802 " /dev/sda device 8.0G -\n"
22807 #: ../resize/virt-resize.pod:101
22809 "(This example is a virtual machine with an 8 GB disk which we would like to "
22810 "expand up to 10 GB)."
22814 #: ../resize/virt-resize.pod:104
22815 msgid "4. Create output disk"
22819 #: ../resize/virt-resize.pod:106
22821 "Virt-resize cannot do in-place disk modifications. You have to have space "
22822 "to store the resized output disk."
22826 #: ../resize/virt-resize.pod:109
22828 "To store the resized disk image in a file, create a file of a suitable size:"
22832 #: ../resize/virt-resize.pod:112
22835 " # rm -f outdisk\n"
22836 " # truncate -s 10G outdisk\n"
22841 #: ../resize/virt-resize.pod:115
22842 msgid "Or use L<lvcreate(1)> to create a logical volume:"
22846 #: ../resize/virt-resize.pod:117
22849 " # lvcreate -L 10G -n lv_name vg_name\n"
22854 #: ../resize/virt-resize.pod:119
22855 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
22859 #: ../resize/virt-resize.pod:121
22862 " # virsh pool-list\n"
22863 " # virsh vol-create-as poolname newvol 10G\n"
22868 #: ../resize/virt-resize.pod:124
22873 #: ../resize/virt-resize.pod:126
22875 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
22876 "file) and the output disk. The output disk is the one created in the "
22881 #: ../resize/virt-resize.pod:130
22884 " # virt-resize indisk outdisk\n"
22889 #: ../resize/virt-resize.pod:132
22891 "This command just copies disk image C<indisk> to disk image C<outdisk> "
22892 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
22893 "larger, then an extra, empty partition is created at the end of the disk "
22894 "covering the extra space. If C<outdisk> is smaller, then it will give an "
22899 #: ../resize/virt-resize.pod:138
22901 "More realistically you'd want to expand existing partitions in the disk "
22902 "image by passing extra options (for the full list see the L</OPTIONS> "
22907 #: ../resize/virt-resize.pod:142
22909 "L</--expand> is the most useful option. It expands the named partition "
22910 "within the disk to fill any extra space:"
22914 #: ../resize/virt-resize.pod:145
22917 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
22922 #: ../resize/virt-resize.pod:147
22924 "(In this case, an extra partition is I<not> created at the end of the disk, "
22925 "because there will be no unused space)."
22929 #: ../resize/virt-resize.pod:150
22931 "L</--resize> is the other commonly used option. The following would "
22932 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
22933 "rest of the available space:"
22937 #: ../resize/virt-resize.pod:154
22940 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
22941 " indisk outdisk\n"
22946 #: ../resize/virt-resize.pod:157
22948 "If the expanded partition in the image contains a filesystem or LVM PV, then "
22949 "if virt-resize knows how, it will resize the contents, the equivalent of "
22950 "calling a command such as L<pvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)> "
22951 "or L<btrfs(8)>. However virt-resize does not know how to resize some "
22952 "filesystems, so you would have to online resize them after booting the guest."
22956 #: ../resize/virt-resize.pod:164
22957 msgid "Other options are covered below."
22961 #: ../resize/virt-resize.pod:166
22966 #: ../resize/virt-resize.pod:168
22967 msgid "Thoroughly test the new disk image I<before> discarding the old one."
22971 #: ../resize/virt-resize.pod:170
22972 msgid "If you are using libvirt, edit the XML to point at the new disk:"
22976 #: ../resize/virt-resize.pod:172
22979 " # virsh edit guestname\n"
22984 #: ../resize/virt-resize.pod:174
22986 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
22987 "html#elementsDisks>"
22991 #: ../resize/virt-resize.pod:177
22992 msgid "Then start up the domain with the new, resized disk:"
22996 #: ../resize/virt-resize.pod:179
22999 " # virsh start guestname\n"
23004 #: ../resize/virt-resize.pod:181
23006 "and check that it still works. See also the L</NOTES> section below for "
23007 "additional information."
23011 #: ../resize/virt-resize.pod:184
23012 msgid "7. Resize LVs etc inside the guest"
23016 #: ../resize/virt-resize.pod:186
23017 msgid "(This can also be done offline using L<guestfish(1)>)"
23021 #: ../resize/virt-resize.pod:188
23023 "Once the guest has booted you should see the new space available, at least "
23024 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
23025 "may need to resize LVs inside PVs, and also resize filesystem types that "
23026 "virt-resize does not know how to expand."
23030 #: ../resize/virt-resize.pod:195
23031 msgid "SHRINKING A VIRTUAL MACHINE DISK"
23035 #: ../resize/virt-resize.pod:197
23037 "Shrinking is somewhat more complex than expanding, and only an overview is "
23042 #: ../resize/virt-resize.pod:200
23044 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
23045 "filesystems). The user has to shrink content before passing the disk image "
23046 "to virt-resize, and virt-resize will check that the content has been shrunk "
23051 #: ../resize/virt-resize.pod:205
23052 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
23056 #: ../resize/virt-resize.pod:207
23058 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
23059 "steps 3 and 4 above to allocate a new disk image."
23063 #: ../resize/virt-resize.pod:210
23065 "Then run virt-resize with any of the I<--shrink> and/or I<--resize> options."
23069 #: ../resize/virt-resize.pod:213
23070 msgid "IGNORING OR DELETING PARTITIONS"
23074 #: ../resize/virt-resize.pod:215
23076 "virt-resize also gives a convenient way to ignore or delete partitions when "
23077 "copying from the input disk to the output disk. Ignoring a partition speeds "
23078 "up the copy where you don't care about the existing contents of a "
23079 "partition. Deleting a partition removes it completely, but note that it "
23080 "also renumbers any partitions after the one which is deleted, which can "
23081 "leave some guests unbootable."
23085 #: ../resize/virt-resize.pod:222
23086 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
23090 #: ../resize/virt-resize.pod:224
23092 "If the input disk is in qcow2 format, then you may prefer that the output is "
23093 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
23094 "the fly. The output format is simply determined by the format of the empty "
23095 "output container that you provide. Thus to create qcow2 output, use:"
23099 #: ../resize/virt-resize.pod:230
23102 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
23107 #: ../resize/virt-resize.pod:232
23108 msgid "instead of the truncate command (use I<-c> for a compressed disk)."
23112 #: ../resize/virt-resize.pod:234
23113 msgid "Similarly, to get non-sparse raw output use:"
23117 #: ../resize/virt-resize.pod:236
23120 " fallocate -l size outdisk\n"
23125 #: ../resize/virt-resize.pod:238
23127 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
23128 "dev/zero of=outdisk bs=1M count=..>)"
23132 #: ../resize/virt-resize.pod:247 ../sparsify/virt-sparsify.pod:105
23133 msgid "Display help."
23137 #: ../resize/virt-resize.pod:249
23142 #: ../resize/virt-resize.pod:251 ../tools/virt-make-fs.pl:177
23143 #: ../tools/virt-win-reg.pl:120
23148 #: ../resize/virt-resize.pod:253 ../tools/virt-win-reg.pl:122
23149 msgid "Enable debugging messages."
23153 #: ../resize/virt-resize.pod:255
23154 msgid "B<--delete part>"
23158 #: ../resize/virt-resize.pod:257
23160 "Delete the named partition. It would be more accurate to describe this as "
23161 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
23162 "the original disk image is left intact."
23166 #: ../resize/virt-resize.pod:261
23168 "Note that when you delete a partition, then anything contained in the "
23169 "partition is also deleted. Furthermore, this causes any partitions that "
23170 "come after to be I<renumbered>, which can easily make your guest unbootable."
23174 #: ../resize/virt-resize.pod:266 ../resize/virt-resize.pod:327
23175 #: ../resize/virt-resize.pod:454 ../sparsify/virt-sparsify.pod:145
23176 msgid "You can give this option multiple times."
23180 #: ../resize/virt-resize.pod:268
23181 msgid "B<--expand part>"
23185 #: ../resize/virt-resize.pod:270
23187 "Expand the named partition so it uses up all extra space (space left over "
23188 "after any other resize changes that you request have been done)."
23192 #: ../resize/virt-resize.pod:273
23194 "If virt-resize knows how, it will expand the direct content of the "
23195 "partition. For example, if the partition is an LVM PV, it will expand the "
23196 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
23197 "content it doesn't know about alone."
23201 #: ../resize/virt-resize.pod:278
23202 msgid "Currently virt-resize can resize:"
23206 #: ../resize/virt-resize.pod:284
23207 msgid "ext2, ext3 and ext4 filesystems."
23211 #: ../resize/virt-resize.pod:288
23212 msgid "NTFS filesystems, if libguestfs was compiled with support for NTFS."
23216 #: ../resize/virt-resize.pod:290
23218 "The filesystem must have been shut down consistently last time it was used. "
23219 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
23220 "consistency check, so at the first boot after resizing Windows will check "
23225 #: ../resize/virt-resize.pod:297
23227 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
23228 "inside the PV, but see the I<--LV-expand> option. The user could also "
23229 "resize LVs as desired after boot."
23233 #: ../resize/virt-resize.pod:303
23234 msgid "Btrfs filesystems, if libguestfs was compiled with support for btrfs."
23238 #: ../resize/virt-resize.pod:307 ../resize/virt-resize.pod:482
23239 msgid "Note that you cannot use I<--expand> and I<--shrink> together."
23243 #: ../resize/virt-resize.pod:309 ../sparsify/virt-sparsify.pod:125
23244 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-list-partitions.pl:92
23245 #: ../tools/virt-tar.pl:141 ../tools/virt-win-reg.pl:142
23246 msgid "B<--format> raw"
23250 #: ../resize/virt-resize.pod:311 ../sparsify/virt-sparsify.pod:129
23252 "Specify the format of the input disk image. If this flag is not given then "
23253 "it is auto-detected from the image itself."
23257 #: ../resize/virt-resize.pod:317
23259 "Note that this option I<does not> affect the output format. See L</QCOW2 "
23260 "AND NON-SPARSE RAW FORMATS>."
23264 #: ../resize/virt-resize.pod:320
23265 msgid "B<--ignore part>"
23269 #: ../resize/virt-resize.pod:322
23271 "Ignore the named partition. Effectively this means the partition is "
23272 "allocated on the destination disk, but the content is not copied across from "
23273 "the source disk. The content of the partition will be blank (all zero "
23278 #: ../resize/virt-resize.pod:329
23279 msgid "B<--LV-expand logvol>"
23283 #: ../resize/virt-resize.pod:331
23285 "This takes the logical volume and, as a final step, expands it to fill all "
23286 "the space available in its volume group. A typical usage, assuming a Linux "
23287 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
23288 "lv_root> would be:"
23292 #: ../resize/virt-resize.pod:336
23295 " virt-resize indisk outdisk \\\n"
23296 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
23301 #: ../resize/virt-resize.pod:339
23303 "This would first expand the partition (and PV), and then expand the root "
23304 "device to fill the extra space in the PV."
23308 #: ../resize/virt-resize.pod:342
23310 "The contents of the LV are also resized if virt-resize knows how to do "
23311 "that. You can stop virt-resize from trying to expand the content by using "
23312 "the option I<--no-expand-content>."
23316 #: ../resize/virt-resize.pod:346
23317 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
23321 #: ../resize/virt-resize.pod:348
23323 "You can give this option multiple times, I<but> it doesn't make sense to do "
23324 "this unless the logical volumes you specify are all in different volume "
23329 #: ../resize/virt-resize.pod:352 ../sparsify/virt-sparsify.pod:147
23330 msgid "B<--machine-readable>"
23334 #: ../resize/virt-resize.pod:354 ../sparsify/virt-sparsify.pod:149
23336 "This option is used to make the output more machine friendly when being "
23337 "parsed by other programs. See L</MACHINE READABLE OUTPUT> below."
23341 #: ../resize/virt-resize.pod:360
23342 msgid "B<--dryrun>"
23346 #: ../resize/virt-resize.pod:362
23347 msgid "Print a summary of what would be done, but don't do anything."
23351 #: ../resize/virt-resize.pod:364
23352 msgid "B<--no-copy-boot-loader>"
23356 #: ../resize/virt-resize.pod:366
23358 "By default, virt-resize copies over some sectors at the start of the disk "
23359 "(up to the beginning of the first partition). Commonly these sectors "
23360 "contain the Master Boot Record (MBR) and the boot loader, and are required "
23361 "in order for the guest to boot correctly."
23365 #: ../resize/virt-resize.pod:371
23367 "If you specify this flag, then this initial copy is not done. You may need "
23368 "to reinstall the boot loader in this case."
23372 #: ../resize/virt-resize.pod:374
23373 msgid "B<--no-extra-partition>"
23377 #: ../resize/virt-resize.pod:376
23379 "By default, virt-resize creates an extra partition if there is any extra, "
23380 "unused space after all resizing has happened. Use this option to prevent "
23381 "the extra partition from being created. If you do this then the extra space "
23382 "will be inaccessible until you run fdisk, parted, or some other partitioning "
23383 "tool in the guest."
23387 #: ../resize/virt-resize.pod:382
23389 "Note that if the surplus space is smaller than 10 MB, no extra partition "
23394 #: ../resize/virt-resize.pod:385
23395 msgid "B<--no-expand-content>"
23399 #: ../resize/virt-resize.pod:387
23401 "By default, virt-resize will try to expand the direct contents of "
23402 "partitions, if it knows how (see I<--expand> option above)."
23406 #: ../resize/virt-resize.pod:390
23408 "If you give the I<--no-expand-content> option then virt-resize will not "
23413 #: ../resize/virt-resize.pod:393
23414 msgid "B<--ntfsresize-force>"
23418 #: ../resize/virt-resize.pod:395
23420 "Pass the I<--force> option to L<ntfsresize(8)>, allowing resizing even if "
23421 "the NTFS disk is marked as needing a consistency check. You have to use "
23422 "this option if you want to resize a Windows guest multiple times without "
23423 "booting into Windows between each resize."
23427 #: ../resize/virt-resize.pod:401
23428 msgid "B<--output-format> raw"
23432 #: ../resize/virt-resize.pod:403
23434 "Specify the format of the output disk image. If this flag is not given then "
23435 "it is auto-detected from the image itself."
23439 #: ../resize/virt-resize.pod:409
23441 "Note that this option I<does not create> the output format. This option "
23442 "just tells libguestfs what it is so it doesn't try to guess it. You still "
23443 "need to create the output disk with the right format. See L</QCOW2 AND NON-"
23444 "SPARSE RAW FORMATS>."
23448 #: ../resize/virt-resize.pod:418
23449 msgid "Don't print the summary."
23453 #: ../resize/virt-resize.pod:420
23454 msgid "B<--resize part=size>"
23458 #: ../resize/virt-resize.pod:422
23460 "Resize the named partition (expanding or shrinking it) so that it has the "
23465 #: ../resize/virt-resize.pod:425
23467 "C<size> can be expressed as an absolute number followed by b/K/M/G to mean "
23468 "bytes, Kilobytes, Megabytes, or Gigabytes; or as a percentage of the current "
23469 "size; or as a relative number or percentage. For example:"
23473 #: ../resize/virt-resize.pod:431
23476 " --resize /dev/sda2=10G\n"
23481 #: ../resize/virt-resize.pod:433
23484 " --resize /dev/sda4=90%\n"
23489 #: ../resize/virt-resize.pod:435
23492 " --resize /dev/sda2=+1G\n"
23497 #: ../resize/virt-resize.pod:437
23500 " --resize /dev/sda2=-200M\n"
23505 #: ../resize/virt-resize.pod:439
23508 " --resize /dev/sda1=+128K\n"
23513 #: ../resize/virt-resize.pod:441
23516 " --resize /dev/sda1=+10%\n"
23521 #: ../resize/virt-resize.pod:443
23524 " --resize /dev/sda1=-10%\n"
23529 #: ../resize/virt-resize.pod:445
23531 "You can increase the size of any partition. Virt-resize will expand the "
23532 "direct content of the partition if it knows how (see I<--expand> below)."
23536 #: ../resize/virt-resize.pod:449
23538 "You can only I<decrease> the size of partitions that contain filesystems or "
23539 "PVs which have already been shrunk. Virt-resize will check this has been "
23540 "done before proceeding, or else will print an error (see also I<--resize-"
23545 #: ../resize/virt-resize.pod:456
23546 msgid "B<--resize-force part=size>"
23550 #: ../resize/virt-resize.pod:458
23552 "This is the same as I<--resize> except that it will let you decrease the "
23553 "size of any partition. Generally this means you will lose any data which "
23554 "was at the end of the partition you shrink, but you may not care about that "
23555 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
23556 "as a swap partition)."
23560 #: ../resize/virt-resize.pod:464
23561 msgid "See also the I<--ignore> option."
23565 #: ../resize/virt-resize.pod:466
23566 msgid "B<--shrink part>"
23570 #: ../resize/virt-resize.pod:468
23572 "Shrink the named partition until the overall disk image fits in the "
23573 "destination. The named partition B<must> contain a filesystem or PV which "
23574 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
23575 "online tools). Virt-resize will check this and give an error if it has not "
23580 #: ../resize/virt-resize.pod:474
23582 "The amount by which the overall disk must be shrunk (after carrying out all "
23583 "other operations requested by the user) is called the \"deficit\". For "
23584 "example, a straight copy (assume no other operations) from a 5GB disk image "
23585 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
23586 "would give an error unless the user specified a partition to shrink and that "
23587 "partition had more than a gigabyte of free space."
23591 #: ../resize/virt-resize.pod:492 ../sparsify/virt-sparsify.pod:177
23592 msgid "MACHINE READABLE OUTPUT"
23596 #: ../resize/virt-resize.pod:494
23598 "The I<--machine-readable> option can be used to make the output more machine "
23599 "friendly, which is useful when calling virt-resize from other programs, GUIs "
23604 #: ../resize/virt-resize.pod:498 ../sparsify/virt-sparsify.pod:183
23605 msgid "There are two ways to use this option."
23609 #: ../resize/virt-resize.pod:500
23611 "Firstly use the option on its own to query the capabilities of the virt-"
23612 "resize binary. Typical output looks like this:"
23616 #: ../resize/virt-resize.pod:503
23619 " $ virt-resize --machine-readable\n"
23621 " ntfsresize-force\n"
23629 #: ../resize/virt-resize.pod:510 ../sparsify/virt-sparsify.pod:193
23631 "A list of features is printed, one per line, and the program exits with "
23636 #: ../resize/virt-resize.pod:513 ../sparsify/virt-sparsify.pod:196
23638 "Secondly use the option in conjunction with other options to make the "
23639 "regular program output more machine friendly."
23643 #: ../resize/virt-resize.pod:516 ../sparsify/virt-sparsify.pod:199
23644 msgid "At the moment this means:"
23648 #: ../resize/virt-resize.pod:522 ../sparsify/virt-sparsify.pod:205
23650 "Progress bar messages can be parsed from stdout by looking for this regular "
23655 #: ../resize/virt-resize.pod:525 ../sparsify/virt-sparsify.pod:208
23658 " ^[0-9]+/[0-9]+$\n"
23663 #: ../resize/virt-resize.pod:529 ../sparsify/virt-sparsify.pod:212
23665 "The calling program should treat messages sent to stdout (except for "
23666 "progress bar messages) as status messages. They can be logged and/or "
23667 "displayed to the user."
23671 #: ../resize/virt-resize.pod:535
23673 "The calling program should treat messages sent to stderr as error messages. "
23674 "In addition, virt-resize exits with a non-zero status code if there was a "
23679 #: ../resize/virt-resize.pod:541
23681 "Versions of the program prior to 1.13.9 did not support the I<--machine-"
23682 "readable> option and will return an error."
23686 #: ../resize/virt-resize.pod:546
23687 msgid "\"Partition 1 does not end on cylinder boundary.\""
23691 #: ../resize/virt-resize.pod:548
23693 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
23694 "means the partitions will not be aligned to the ancient CHS geometry. "
23695 "However CHS geometry is meaningless for disks manufactured since the early "
23696 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
23697 "cylinders is not required by any modern operating system."
23701 #: ../resize/virt-resize.pod:555
23702 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
23706 #: ../resize/virt-resize.pod:557
23708 "In Windows Vista and later versions, Microsoft switched to using a separate "
23709 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
23710 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
23711 "the boot partition. Doing so seems to break the guest completely. However "
23712 "expanding the second partition (ie. C: drive) should work."
23716 #: ../resize/virt-resize.pod:564
23718 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
23719 "NTFS partitions have been expanded. This is just a safety check and (unless "
23720 "it find errors) is nothing to worry about."
23724 #: ../resize/virt-resize.pod:568
23725 msgid "GUEST BOOT STUCK AT \"GRUB\""
23729 #: ../resize/virt-resize.pod:570
23731 "If a Linux guest does not boot after resizing, and the boot is stuck after "
23732 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
23733 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
23734 "although we think is to do with partition alignment."
23738 #: ../resize/virt-resize.pod:575
23741 " guestfish -i -a newdisk\n"
23742 " ><fs> cat /boot/grub/device.map\n"
23743 " # check the contents of this file are sensible or\n"
23744 " # edit the file if necessary\n"
23745 " ><fs> grub-install / /dev/vda\n"
23751 #: ../resize/virt-resize.pod:582
23753 "For more flexible guest reconfiguration, including if you need to specify "
23754 "other parameters to grub-install, use L<virt-rescue(1)>."
23758 #: ../resize/virt-resize.pod:585
23759 msgid "ALTERNATIVE TOOLS"
23763 #: ../resize/virt-resize.pod:587
23765 "There are several proprietary tools for resizing partitions. We won't "
23766 "mention any here."
23770 #: ../resize/virt-resize.pod:590
23772 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
23773 "operations on disk images. They can resize and move partitions, but I don't "
23774 "think they can do anything with the contents, and they certainly don't "
23779 #: ../resize/virt-resize.pod:595
23781 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
23782 "but at a much lower level. You will probably end up hand-calculating sector "
23783 "offsets, which is something that virt-resize was designed to avoid. If you "
23784 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
23789 #: ../resize/virt-resize.pod:615
23791 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
23792 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
23793 "L<btrfs(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, "
23794 "L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, L<virt-sparsify(1)>, "
23795 "L<http://libguestfs.org/>."
23799 #: ../ruby/examples/guestfs-ruby.pod:5
23800 msgid "guestfs-ruby - How to use libguestfs from Ruby"
23804 #: ../ruby/examples/guestfs-ruby.pod:9
23807 " require 'guestfs'\n"
23808 " g = Guestfs::Guestfs.new()\n"
23809 " g.add_drive_opts(\"disk.img\",\n"
23810 " :readonly => 1, :format => \"raw\")\n"
23816 #: ../ruby/examples/guestfs-ruby.pod:17
23818 "This manual page documents how to call libguestfs from the Ruby programming "
23819 "language. This page just documents the differences from the C API and gives "
23820 "some examples. If you are not familiar with using libguestfs, you also need "
23821 "to read L<guestfs(3)>."
23825 #: ../ruby/examples/guestfs-ruby.pod:24
23827 "Errors from libguestfs functions are mapped into the C<Error> exception. "
23828 "This has a single parameter which is the error message (a string)."
23832 #: ../ruby/examples/guestfs-ruby.pod:38
23834 "L<guestfs(3)>, L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java"
23835 "(3)>, L<guestfs-ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, "
23836 "L<guestfs-recipes(1)>, L<http://libguestfs.org/>."
23840 #: ../sparsify/virt-sparsify.pod:5
23841 msgid "virt-sparsify - Make a virtual machine disk sparse"
23845 #: ../sparsify/virt-sparsify.pod:9
23848 " virt-sparsify [--options] indisk outdisk\n"
23853 #: ../sparsify/virt-sparsify.pod:13
23855 "Virt-sparsify is a tool which can make a virtual machine disk (or any disk "
23856 "image) sparse a.k.a. thin-provisioned. This means that free space within "
23857 "the disk image can be converted back to free space on the host."
23861 #: ../sparsify/virt-sparsify.pod:18
23863 "Virt-sparsify can locate and sparsify free space in most filesystems (eg. "
23864 "ext2/3/4, btrfs, NTFS, etc.), and also in LVM physical volumes."
23868 #: ../sparsify/virt-sparsify.pod:21
23870 "Virt-sparsify can also convert between some disk formats, for example "
23871 "converting a raw disk image to a thin-provisioned qcow2 image."
23875 #: ../sparsify/virt-sparsify.pod:24
23877 "Virt-sparsify can operate on any disk image, not just ones from virtual "
23878 "machines. If a virtual machine has more than one attached disk, you must "
23879 "sparsify each one separately."
23883 #: ../sparsify/virt-sparsify.pod:28
23884 msgid "IMPORTANT LIMITATIONS"
23888 #: ../sparsify/virt-sparsify.pod:34
23890 "Virt-sparsify does not do in-place modifications. It copies from a source "
23891 "image to a destination image, leaving the source unchanged. I<Check that "
23892 "the sparsification was successful before deleting the source image>."
23896 #: ../sparsify/virt-sparsify.pod:41
23897 msgid "The virtual machine I<must be shut down> before using this tool."
23901 #: ../sparsify/virt-sparsify.pod:45
23903 "Virt-sparsify may require up to 2x the virtual size of the source disk image "
23904 "(1 temporary copy + 1 destination image). This is in the worst case and "
23905 "usually much less space is required."
23909 #: ../sparsify/virt-sparsify.pod:51
23911 "Virt-sparsify cannot resize disk images. To do that, use L<virt-resize(1)>."
23915 #: ../sparsify/virt-sparsify.pod:56
23916 msgid "Virt-sparsify cannot handle encrypted disks."
23920 #: ../sparsify/virt-sparsify.pod:60
23922 "Virt-sparsify cannot yet sparsify the space between partitions. Note that "
23923 "this space is often used for critical items like bootloaders so it's not "
23928 #: ../sparsify/virt-sparsify.pod:66
23930 "Virt-sparsify does not yet know how to sparsify swapspace. It is not safe "
23931 "to do this unless we can be sure there is no hibernation data, so at the "
23932 "moment swap partitions are ignored."
23936 #: ../sparsify/virt-sparsify.pod:72
23938 "You may also want to read the manual pages for the associated tools L<virt-"
23939 "filesystems(1)> and L<virt-df(1)> before starting."
23943 #: ../sparsify/virt-sparsify.pod:77
23944 msgid "Typical usage is:"
23948 #: ../sparsify/virt-sparsify.pod:79
23951 " virt-sparsify indisk outdisk\n"
23956 #: ../sparsify/virt-sparsify.pod:81
23958 "which copies C<indisk> to C<outdisk>, making the output sparse. C<outdisk> "
23959 "is created, or overwritten if it already exists. The format of the input "
23960 "disk is detected (eg. qcow2) and the same format is used for the output disk."
23964 #: ../sparsify/virt-sparsify.pod:86
23965 msgid "To convert between formats, use the I<--convert> option:"
23969 #: ../sparsify/virt-sparsify.pod:88
23972 " virt-sparsify disk.raw --convert qcow2 disk.qcow2\n"
23977 #: ../sparsify/virt-sparsify.pod:90
23979 "Virt-sparsify tries to zero and sparsify free space on every filesystem it "
23980 "can find within the source disk image. You can get it to ignore (don't zero "
23981 "free space on) certain filesystems by doing:"
23985 #: ../sparsify/virt-sparsify.pod:94
23988 " virt-sparsify --ignore /dev/sda1 indisk outdisk\n"
23993 #: ../sparsify/virt-sparsify.pod:96
23995 "See L<virt-filesystems(1)> to get a list of filesystems within a disk image."
23999 #: ../sparsify/virt-sparsify.pod:107
24000 msgid "B<--convert> raw"
24004 #: ../sparsify/virt-sparsify.pod:109
24005 msgid "B<--convert> qcow2"
24009 #: ../sparsify/virt-sparsify.pod:111
24010 msgid "B<--convert> [other formats]"
24014 #: ../sparsify/virt-sparsify.pod:113
24016 "Use C<output-format> as the format for the destination image. If this is "
24017 "not specified, then the input format is used."
24021 #: ../sparsify/virt-sparsify.pod:116
24022 msgid "Supported and known-working output formats are: C<raw>, C<qcow2>."
24026 #: ../sparsify/virt-sparsify.pod:118
24028 "You can also use any format supported by the L<qemu-img(1)> program, eg. "
24029 "C<vdi> or C<vmdk>, but support for other formats is reliant on qemu."
24033 #: ../sparsify/virt-sparsify.pod:122
24035 "Specifying the I<--convert> option is usually a good idea, because then virt-"
24036 "sparsify doesn't need to try to guess the input format."
24040 #: ../sparsify/virt-sparsify.pod:127
24041 msgid "B<--format> qcow2"
24045 #: ../sparsify/virt-sparsify.pod:135
24046 msgid "B<--ignore> filesystem"
24050 #: ../sparsify/virt-sparsify.pod:137
24051 msgid "B<--ignore> volgroup"
24055 #: ../sparsify/virt-sparsify.pod:139
24057 "Ignore the named filesystem. Free space on the filesystem will not be "
24058 "zeroed, but existing blocks of zeroes will still be sparsified."
24062 #: ../sparsify/virt-sparsify.pod:142
24064 "In the second form, this ignores the named volume group. Use the volume "
24065 "group name without the C</dev/> prefix, eg. I<--ignore vg_foo>"
24069 #: ../sparsify/virt-sparsify.pod:157
24070 msgid "This disables progress bars and other unnecessary output."
24074 #: ../sparsify/virt-sparsify.pod:179
24076 "The I<--machine-readable> option can be used to make the output more machine "
24077 "friendly, which is useful when calling virt-sparsify from other programs, "
24082 #: ../sparsify/virt-sparsify.pod:185
24084 "Firstly use the option on its own to query the capabilities of the virt-"
24085 "sparsify binary. Typical output looks like this:"
24089 #: ../sparsify/virt-sparsify.pod:188
24092 " $ virt-sparsify --machine-readable\n"
24100 #: ../sparsify/virt-sparsify.pod:218
24102 "The calling program should treat messages sent to stderr as error messages. "
24103 "In addition, virt-sparsify exits with a non-zero status code if there was a "
24108 #: ../sparsify/virt-sparsify.pod:224
24110 "All versions of virt-sparsify have supported the I<--machine-readable> "
24115 #: ../sparsify/virt-sparsify.pod:238
24117 "Location of the temporary directory used for the potentially large temporary "
24122 #: ../sparsify/virt-sparsify.pod:241
24124 "You should ensure there is enough free space in the worst case for a full "
24125 "copy of the source disk (I<virtual> size), or else set C<$TMPDIR> to point "
24126 "to another directory that has enough space."
24130 #: ../sparsify/virt-sparsify.pod:245
24131 msgid "This defaults to C</tmp>."
24135 #: ../sparsify/virt-sparsify.pod:249
24137 "For other environment variables, see L<guestfs(3)/ENVIRONMENT VARIABLES>."
24141 #: ../sparsify/virt-sparsify.pod:253
24143 "L<virt-filesystems(1)>, L<virt-df(1)>, L<virt-resize(1)>, L<virt-rescue(1)>, "
24144 "L<guestfs(3)>, L<guestfish(1)>, L<truncate(1)>, L<fallocate(1)>, L<qemu-img"
24145 "(1)>, L<http://libguestfs.org/>."
24149 #: ../src/guestfs-actions.pod:1
24150 msgid "guestfs_add_cdrom"
24154 #: ../src/guestfs-actions.pod:3
24158 " guestfs_add_cdrom (guestfs_h *g,\n"
24159 " const char *filename);\n"
24164 #: ../src/guestfs-actions.pod:7 ../src/guestfs-actions.pod:249
24165 #: ../src/guestfs-actions.pod:270
24167 "I<This function is deprecated.> In new code, use the L</"
24168 "guestfs_add_drive_opts> call instead."
24172 #: ../src/guestfs-actions.pod:24
24174 "This call checks for the existence of C<filename>. This stops you from "
24175 "specifying other types of drive which are supported by qemu such as C<nbd:> "
24176 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
24181 #: ../src/guestfs-actions.pod:31
24183 "If you just want to add an ISO file (often you use this as an efficient way "
24184 "to transfer large files into the guest), then you should probably use "
24185 "C<guestfs_add_drive_ro> instead."
24189 #: ../src/guestfs-actions.pod:37 ../src/guestfs-actions.pod:140
24190 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
24191 #: ../src/guestfs-actions.pod:259 ../src/guestfs-actions.pod:280
24192 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
24193 #: ../src/guestfs-actions.pod:427 ../src/guestfs-actions.pod:447
24194 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:506
24195 #: ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:552
24196 #: ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:652
24197 #: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:681
24198 #: ../src/guestfs-actions.pod:780 ../src/guestfs-actions.pod:798
24199 #: ../src/guestfs-actions.pod:812 ../src/guestfs-actions.pod:826
24200 #: ../src/guestfs-actions.pod:863 ../src/guestfs-actions.pod:1046
24201 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1084
24202 #: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1233
24203 #: ../src/guestfs-actions.pod:1279 ../src/guestfs-actions.pod:1297
24204 #: ../src/guestfs-actions.pod:1316 ../src/guestfs-actions.pod:1330
24205 #: ../src/guestfs-actions.pod:1350 ../src/guestfs-actions.pod:1420
24206 #: ../src/guestfs-actions.pod:1451 ../src/guestfs-actions.pod:1476
24207 #: ../src/guestfs-actions.pod:1518 ../src/guestfs-actions.pod:1631
24208 #: ../src/guestfs-actions.pod:1658 ../src/guestfs-actions.pod:1873
24209 #: ../src/guestfs-actions.pod:1895 ../src/guestfs-actions.pod:1982
24210 #: ../src/guestfs-actions.pod:2490 ../src/guestfs-actions.pod:2634
24211 #: ../src/guestfs-actions.pod:2695 ../src/guestfs-actions.pod:2730
24212 #: ../src/guestfs-actions.pod:3787 ../src/guestfs-actions.pod:3802
24213 #: ../src/guestfs-actions.pod:3827 ../src/guestfs-actions.pod:4016
24214 #: ../src/guestfs-actions.pod:4030 ../src/guestfs-actions.pod:4043
24215 #: ../src/guestfs-actions.pod:4057 ../src/guestfs-actions.pod:4072
24216 #: ../src/guestfs-actions.pod:4108 ../src/guestfs-actions.pod:4180
24217 #: ../src/guestfs-actions.pod:4200 ../src/guestfs-actions.pod:4217
24218 #: ../src/guestfs-actions.pod:4240 ../src/guestfs-actions.pod:4263
24219 #: ../src/guestfs-actions.pod:4298 ../src/guestfs-actions.pod:4317
24220 #: ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4371
24221 #: ../src/guestfs-actions.pod:4383 ../src/guestfs-actions.pod:4419
24222 #: ../src/guestfs-actions.pod:4435 ../src/guestfs-actions.pod:4448
24223 #: ../src/guestfs-actions.pod:4463 ../src/guestfs-actions.pod:4480
24224 #: ../src/guestfs-actions.pod:4573 ../src/guestfs-actions.pod:4593
24225 #: ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:4657
24226 #: ../src/guestfs-actions.pod:4675 ../src/guestfs-actions.pod:4693
24227 #: ../src/guestfs-actions.pod:4709 ../src/guestfs-actions.pod:4723
24228 #: ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:4754
24229 #: ../src/guestfs-actions.pod:4769 ../src/guestfs-actions.pod:4796
24230 #: ../src/guestfs-actions.pod:4859 ../src/guestfs-actions.pod:4932
24231 #: ../src/guestfs-actions.pod:4963 ../src/guestfs-actions.pod:4982
24232 #: ../src/guestfs-actions.pod:5001 ../src/guestfs-actions.pod:5013
24233 #: ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5043
24234 #: ../src/guestfs-actions.pod:5058 ../src/guestfs-actions.pod:5073
24235 #: ../src/guestfs-actions.pod:5105 ../src/guestfs-actions.pod:5131
24236 #: ../src/guestfs-actions.pod:5170 ../src/guestfs-actions.pod:5190
24237 #: ../src/guestfs-actions.pod:5204 ../src/guestfs-actions.pod:5221
24238 #: ../src/guestfs-actions.pod:5270 ../src/guestfs-actions.pod:5323
24239 #: ../src/guestfs-actions.pod:5370 ../src/guestfs-actions.pod:5413
24240 #: ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5458
24241 #: ../src/guestfs-actions.pod:5476 ../src/guestfs-actions.pod:5616
24242 #: ../src/guestfs-actions.pod:5673 ../src/guestfs-actions.pod:5695
24243 #: ../src/guestfs-actions.pod:5713 ../src/guestfs-actions.pod:5745
24244 #: ../src/guestfs-actions.pod:5811 ../src/guestfs-actions.pod:5828
24245 #: ../src/guestfs-actions.pod:5841 ../src/guestfs-actions.pod:5855
24246 #: ../src/guestfs-actions.pod:6144 ../src/guestfs-actions.pod:6163
24247 #: ../src/guestfs-actions.pod:6182 ../src/guestfs-actions.pod:6196
24248 #: ../src/guestfs-actions.pod:6208 ../src/guestfs-actions.pod:6222
24249 #: ../src/guestfs-actions.pod:6234 ../src/guestfs-actions.pod:6248
24250 #: ../src/guestfs-actions.pod:6264 ../src/guestfs-actions.pod:6285
24251 #: ../src/guestfs-actions.pod:6304 ../src/guestfs-actions.pod:6323
24252 #: ../src/guestfs-actions.pod:6353 ../src/guestfs-actions.pod:6371
24253 #: ../src/guestfs-actions.pod:6394 ../src/guestfs-actions.pod:6412
24254 #: ../src/guestfs-actions.pod:6431 ../src/guestfs-actions.pod:6452
24255 #: ../src/guestfs-actions.pod:6471 ../src/guestfs-actions.pod:6488
24256 #: ../src/guestfs-actions.pod:6507 ../src/guestfs-actions.pod:6535
24257 #: ../src/guestfs-actions.pod:6559 ../src/guestfs-actions.pod:6578
24258 #: ../src/guestfs-actions.pod:6594 ../src/guestfs-actions.pod:6618
24259 #: ../src/guestfs-actions.pod:6637 ../src/guestfs-actions.pod:6652
24260 #: ../src/guestfs-actions.pod:6671 ../src/guestfs-actions.pod:6715
24261 #: ../src/guestfs-actions.pod:6745 ../src/guestfs-actions.pod:6778
24262 #: ../src/guestfs-actions.pod:6893 ../src/guestfs-actions.pod:7014
24263 #: ../src/guestfs-actions.pod:7026 ../src/guestfs-actions.pod:7039
24264 #: ../src/guestfs-actions.pod:7052 ../src/guestfs-actions.pod:7074
24265 #: ../src/guestfs-actions.pod:7087 ../src/guestfs-actions.pod:7100
24266 #: ../src/guestfs-actions.pod:7113 ../src/guestfs-actions.pod:7128
24267 #: ../src/guestfs-actions.pod:7187 ../src/guestfs-actions.pod:7204
24268 #: ../src/guestfs-actions.pod:7220 ../src/guestfs-actions.pod:7236
24269 #: ../src/guestfs-actions.pod:7253 ../src/guestfs-actions.pod:7266
24270 #: ../src/guestfs-actions.pod:7286 ../src/guestfs-actions.pod:7322
24271 #: ../src/guestfs-actions.pod:7336 ../src/guestfs-actions.pod:7377
24272 #: ../src/guestfs-actions.pod:7390 ../src/guestfs-actions.pod:7408
24273 #: ../src/guestfs-actions.pod:7442 ../src/guestfs-actions.pod:7478
24274 #: ../src/guestfs-actions.pod:7594 ../src/guestfs-actions.pod:7609
24275 #: ../src/guestfs-actions.pod:7623 ../src/guestfs-actions.pod:7678
24276 #: ../src/guestfs-actions.pod:7691 ../src/guestfs-actions.pod:7736
24277 #: ../src/guestfs-actions.pod:7776 ../src/guestfs-actions.pod:7832
24278 #: ../src/guestfs-actions.pod:7852 ../src/guestfs-actions.pod:7885
24279 #: ../src/guestfs-actions.pod:7949 ../src/guestfs-actions.pod:7972
24280 #: ../src/guestfs-actions.pod:8001
24281 msgid "This function returns 0 on success or -1 on error."
24285 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
24286 #: ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:2096
24287 #: ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2319
24288 #: ../src/guestfs-actions.pod:3789 ../src/guestfs-actions.pod:3809
24289 #: ../src/guestfs-actions.pod:5107 ../src/guestfs-actions.pod:6373
24290 #: ../src/guestfs-actions.pod:6490 ../src/guestfs-actions.pod:6639
24291 #: ../src/guestfs-actions.pod:7130 ../src/guestfs-actions.pod:7255
24292 #: ../src/guestfs-actions.pod:7778
24293 msgid "(Added in 0.3)"
24297 #: ../src/guestfs-actions.pod:41
24298 msgid "guestfs_add_domain"
24302 #: ../src/guestfs-actions.pod:43
24306 " guestfs_add_domain (guestfs_h *g,\n"
24307 " const char *dom,\n"
24313 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
24314 #: ../src/guestfs-actions.pod:837 ../src/guestfs-actions.pod:1161
24315 #: ../src/guestfs-actions.pod:1213 ../src/guestfs-actions.pod:2987
24316 #: ../src/guestfs-actions.pod:4808 ../src/guestfs-actions.pod:5117
24317 #: ../src/guestfs-actions.pod:5334
24319 "You may supply a list of optional arguments to this call. Use zero or more "
24320 "of the following pairs of parameters, and terminate the list with C<-1> on "
24321 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
24325 #: ../src/guestfs-actions.pod:53
24328 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
24329 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
24330 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
24331 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
24332 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
24337 #: ../src/guestfs-actions.pod:59
24339 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
24340 "It works by connecting to libvirt, requesting the domain and domain XML from "
24341 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
24346 #: ../src/guestfs-actions.pod:94
24348 "The other optional parameters are passed directly through to "
24349 "C<guestfs_add_drive_opts>."
24353 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
24354 #: ../src/guestfs-actions.pod:520 ../src/guestfs-actions.pod:698
24355 #: ../src/guestfs-actions.pod:729 ../src/guestfs-actions.pod:747
24356 #: ../src/guestfs-actions.pod:766 ../src/guestfs-actions.pod:1496
24357 #: ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:2055
24358 #: ../src/guestfs-actions.pod:2166 ../src/guestfs-actions.pod:2217
24359 #: ../src/guestfs-actions.pod:2269 ../src/guestfs-actions.pod:2283
24360 #: ../src/guestfs-actions.pod:2306 ../src/guestfs-actions.pod:2621
24361 #: ../src/guestfs-actions.pod:3105 ../src/guestfs-actions.pod:3123
24362 #: ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5513
24363 #: ../src/guestfs-actions.pod:5925 ../src/guestfs-actions.pod:5951
24364 #: ../src/guestfs-actions.pod:7363 ../src/guestfs-actions.pod:7789
24365 #: ../src/guestfs-actions.pod:7802 ../src/guestfs-actions.pod:7815
24366 msgid "On error this function returns -1."
24370 #: ../src/guestfs-actions.pod:99
24371 msgid "(Added in 1.7.4)"
24375 #: ../src/guestfs-actions.pod:101
24376 msgid "guestfs_add_domain_va"
24380 #: ../src/guestfs-actions.pod:103
24384 " guestfs_add_domain_va (guestfs_h *g,\n"
24385 " const char *dom,\n"
24386 " va_list args);\n"
24391 #: ../src/guestfs-actions.pod:108
24392 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
24396 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
24397 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
24398 #: ../src/guestfs-actions.pod:876 ../src/guestfs-actions.pod:887
24399 #: ../src/guestfs-actions.pod:1189 ../src/guestfs-actions.pod:1202
24400 #: ../src/guestfs-actions.pod:1248 ../src/guestfs-actions.pod:1261
24401 #: ../src/guestfs-actions.pod:3071 ../src/guestfs-actions.pod:3083
24402 #: ../src/guestfs-actions.pod:4873 ../src/guestfs-actions.pod:4885
24403 #: ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5157
24404 #: ../src/guestfs-actions.pod:5383 ../src/guestfs-actions.pod:5394
24405 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
24409 #: ../src/guestfs-actions.pod:112
24410 msgid "guestfs_add_domain_argv"
24414 #: ../src/guestfs-actions.pod:114
24418 " guestfs_add_domain_argv (guestfs_h *g,\n"
24419 " const char *dom,\n"
24420 " const struct guestfs_add_domain_argv *optargs);\n"
24425 #: ../src/guestfs-actions.pod:119
24426 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
24430 #: ../src/guestfs-actions.pod:123
24431 msgid "guestfs_add_drive"
24435 #: ../src/guestfs-actions.pod:125
24439 " guestfs_add_drive (guestfs_h *g,\n"
24440 " const char *filename);\n"
24445 #: ../src/guestfs-actions.pod:129
24447 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
24448 "optional parameters, so the disk is added writable, with the format being "
24449 "detected automatically."
24453 #: ../src/guestfs-actions.pod:133
24455 "Automatic detection of the format opens you up to a potential security hole "
24456 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
24457 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
24458 "you should think about replacing calls to this function with calls to "
24459 "C<guestfs_add_drive_opts>, and specifying the format."
24463 #: ../src/guestfs-actions.pod:144
24464 msgid "guestfs_add_drive_opts"
24468 #: ../src/guestfs-actions.pod:146
24472 " guestfs_add_drive_opts (guestfs_h *g,\n"
24473 " const char *filename,\n"
24479 #: ../src/guestfs-actions.pod:156
24482 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
24483 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
24484 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
24489 #: ../src/guestfs-actions.pod:185
24491 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
24492 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
24493 "Possible formats include C<raw> and C<qcow2>."
24497 #: ../src/guestfs-actions.pod:196
24499 "This rarely-used option lets you emulate the behaviour of the deprecated "
24500 "C<guestfs_add_drive_with_if> call (q.v.)"
24504 #: ../src/guestfs-actions.pod:203
24505 msgid "(Added in 1.5.23)"
24509 #: ../src/guestfs-actions.pod:205
24510 msgid "guestfs_add_drive_opts_va"
24514 #: ../src/guestfs-actions.pod:207
24518 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
24519 " const char *filename,\n"
24520 " va_list args);\n"
24525 #: ../src/guestfs-actions.pod:212
24526 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
24530 #: ../src/guestfs-actions.pod:216
24531 msgid "guestfs_add_drive_opts_argv"
24535 #: ../src/guestfs-actions.pod:218
24539 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
24540 " const char *filename,\n"
24541 " const struct guestfs_add_drive_opts_argv *optargs);\n"
24546 #: ../src/guestfs-actions.pod:223
24547 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
24551 #: ../src/guestfs-actions.pod:227
24552 msgid "guestfs_add_drive_ro"
24556 #: ../src/guestfs-actions.pod:229
24560 " guestfs_add_drive_ro (guestfs_h *g,\n"
24561 " const char *filename);\n"
24566 #: ../src/guestfs-actions.pod:233
24568 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
24569 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
24570 "disk is added read-only, with the format being detected automatically."
24574 #: ../src/guestfs-actions.pod:240
24575 msgid "(Added in 1.0.38)"
24579 #: ../src/guestfs-actions.pod:242
24580 msgid "guestfs_add_drive_ro_with_if"
24584 #: ../src/guestfs-actions.pod:244
24588 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
24589 " const char *filename,\n"
24590 " const char *iface);\n"
24595 #: ../src/guestfs-actions.pod:256
24597 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
24598 "QEMU interface emulation to use at run time."
24602 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
24603 #: ../src/guestfs-actions.pod:2580
24604 msgid "(Added in 1.0.84)"
24608 #: ../src/guestfs-actions.pod:263
24609 msgid "guestfs_add_drive_with_if"
24613 #: ../src/guestfs-actions.pod:265
24617 " guestfs_add_drive_with_if (guestfs_h *g,\n"
24618 " const char *filename,\n"
24619 " const char *iface);\n"
24624 #: ../src/guestfs-actions.pod:277
24626 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
24627 "QEMU interface emulation to use at run time."
24631 #: ../src/guestfs-actions.pod:284
24632 msgid "guestfs_aug_clear"
24636 #: ../src/guestfs-actions.pod:286
24640 " guestfs_aug_clear (guestfs_h *g,\n"
24641 " const char *augpath);\n"
24646 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2308
24647 msgid "(Added in 1.3.4)"
24651 #: ../src/guestfs-actions.pod:297
24652 msgid "guestfs_aug_close"
24656 #: ../src/guestfs-actions.pod:299
24660 " guestfs_aug_close (guestfs_h *g);\n"
24665 #: ../src/guestfs-actions.pod:302
24667 "Close the current Augeas handle and free up any resources used by it. After "
24668 "calling this, you have to call C<guestfs_aug_init> again before you can use "
24669 "any other Augeas functions."
24673 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
24674 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
24675 #: ../src/guestfs-actions.pod:429 ../src/guestfs-actions.pod:449
24676 #: ../src/guestfs-actions.pod:463 ../src/guestfs-actions.pod:494
24677 #: ../src/guestfs-actions.pod:508 ../src/guestfs-actions.pod:522
24678 #: ../src/guestfs-actions.pod:536 ../src/guestfs-actions.pod:554
24679 #: ../src/guestfs-actions.pod:6002
24680 msgid "(Added in 0.7)"
24684 #: ../src/guestfs-actions.pod:311
24685 msgid "guestfs_aug_defnode"
24689 #: ../src/guestfs-actions.pod:313
24692 " struct guestfs_int_bool *\n"
24693 " guestfs_aug_defnode (guestfs_h *g,\n"
24694 " const char *name,\n"
24695 " const char *expr,\n"
24696 " const char *val);\n"
24701 #: ../src/guestfs-actions.pod:322
24703 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
24704 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
24705 "containing that single node."
24709 #: ../src/guestfs-actions.pod:330
24711 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
24712 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
24716 #: ../src/guestfs-actions.pod:336
24717 msgid "guestfs_aug_defvar"
24721 #: ../src/guestfs-actions.pod:338
24725 " guestfs_aug_defvar (guestfs_h *g,\n"
24726 " const char *name,\n"
24727 " const char *expr);\n"
24732 #: ../src/guestfs-actions.pod:354
24733 msgid "guestfs_aug_get"
24737 #: ../src/guestfs-actions.pod:356
24741 " guestfs_aug_get (guestfs_h *g,\n"
24742 " const char *augpath);\n"
24747 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:927
24748 #: ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1005
24749 #: ../src/guestfs-actions.pod:1021 ../src/guestfs-actions.pod:1124
24750 #: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1382
24751 #: ../src/guestfs-actions.pod:1401 ../src/guestfs-actions.pod:1535
24752 #: ../src/guestfs-actions.pod:1723 ../src/guestfs-actions.pod:1835
24753 #: ../src/guestfs-actions.pod:1998 ../src/guestfs-actions.pod:2015
24754 #: ../src/guestfs-actions.pod:2082 ../src/guestfs-actions.pod:2125
24755 #: ../src/guestfs-actions.pod:2146 ../src/guestfs-actions.pod:2331
24756 #: ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:2749
24757 #: ../src/guestfs-actions.pod:2851 ../src/guestfs-actions.pod:2955
24758 #: ../src/guestfs-actions.pod:2974 ../src/guestfs-actions.pod:3189
24759 #: ../src/guestfs-actions.pod:3217 ../src/guestfs-actions.pod:3238
24760 #: ../src/guestfs-actions.pod:3272 ../src/guestfs-actions.pod:3335
24761 #: ../src/guestfs-actions.pod:3355 ../src/guestfs-actions.pod:3375
24762 #: ../src/guestfs-actions.pod:4002 ../src/guestfs-actions.pod:4355
24763 #: ../src/guestfs-actions.pod:4525 ../src/guestfs-actions.pod:4635
24764 #: ../src/guestfs-actions.pod:5531 ../src/guestfs-actions.pod:5730
24765 #: ../src/guestfs-actions.pod:5900 ../src/guestfs-actions.pod:6078
24766 #: ../src/guestfs-actions.pod:6127 ../src/guestfs-actions.pod:6799
24767 #: ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:6839
24768 #: ../src/guestfs-actions.pod:6863 ../src/guestfs-actions.pod:7537
24769 #: ../src/guestfs-actions.pod:7556 ../src/guestfs-actions.pod:7574
24770 #: ../src/guestfs-actions.pod:7748 ../src/guestfs-actions.pod:8065
24772 "This function returns a string, or NULL on error. I<The caller must free "
24773 "the returned string after use>."
24777 #: ../src/guestfs-actions.pod:368
24778 msgid "guestfs_aug_init"
24782 #: ../src/guestfs-actions.pod:370
24786 " guestfs_aug_init (guestfs_h *g,\n"
24787 " const char *root,\n"
24793 #: ../src/guestfs-actions.pod:379
24794 msgid "You must call this before using any other C<guestfs_aug_*> commands."
24798 #: ../src/guestfs-actions.pod:404
24800 "This option is only useful when debugging Augeas lenses. Use of this option "
24801 "may require additional memory for the libguestfs appliance. You may need to "
24802 "set the C<LIBGUESTFS_MEMSIZE> environment variable or call "
24803 "C<guestfs_set_memsize>."
24807 #: ../src/guestfs-actions.pod:419
24808 msgid "Do not load the tree in C<guestfs_aug_init>."
24812 #: ../src/guestfs-actions.pod:423
24813 msgid "To close the handle, you can call C<guestfs_aug_close>."
24817 #: ../src/guestfs-actions.pod:431
24818 msgid "guestfs_aug_insert"
24822 #: ../src/guestfs-actions.pod:433
24826 " guestfs_aug_insert (guestfs_h *g,\n"
24827 " const char *augpath,\n"
24828 " const char *label,\n"
24834 #: ../src/guestfs-actions.pod:451
24835 msgid "guestfs_aug_load"
24839 #: ../src/guestfs-actions.pod:453
24843 " guestfs_aug_load (guestfs_h *g);\n"
24848 #: ../src/guestfs-actions.pod:465
24849 msgid "guestfs_aug_ls"
24853 #: ../src/guestfs-actions.pod:467
24857 " guestfs_aug_ls (guestfs_h *g,\n"
24858 " const char *augpath);\n"
24863 #: ../src/guestfs-actions.pod:471
24865 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
24866 "sorting the resulting nodes into alphabetical order."
24870 #: ../src/guestfs-actions.pod:474 ../src/guestfs-actions.pod:490
24871 #: ../src/guestfs-actions.pod:636 ../src/guestfs-actions.pod:1143
24872 #: ../src/guestfs-actions.pod:1550 ../src/guestfs-actions.pod:1569
24873 #: ../src/guestfs-actions.pod:1672 ../src/guestfs-actions.pod:1691
24874 #: ../src/guestfs-actions.pod:1937 ../src/guestfs-actions.pod:2403
24875 #: ../src/guestfs-actions.pod:2419 ../src/guestfs-actions.pod:2438
24876 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2527
24877 #: ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2647
24878 #: ../src/guestfs-actions.pod:2916 ../src/guestfs-actions.pod:3291
24879 #: ../src/guestfs-actions.pod:3571 ../src/guestfs-actions.pod:3885
24880 #: ../src/guestfs-actions.pod:3902 ../src/guestfs-actions.pod:3922
24881 #: ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:4089
24882 #: ../src/guestfs-actions.pod:4497 ../src/guestfs-actions.pod:5254
24883 #: ../src/guestfs-actions.pod:5872 ../src/guestfs-actions.pod:5998
24884 #: ../src/guestfs-actions.pod:6112 ../src/guestfs-actions.pod:6879
24885 #: ../src/guestfs-actions.pod:6940 ../src/guestfs-actions.pod:6995
24886 #: ../src/guestfs-actions.pod:7141 ../src/guestfs-actions.pod:7165
24887 #: ../src/guestfs-actions.pod:7641 ../src/guestfs-actions.pod:7661
24888 #: ../src/guestfs-actions.pod:7708 ../src/guestfs-actions.pod:7902
24889 #: ../src/guestfs-actions.pod:7921 ../src/guestfs-actions.pod:8015
24890 #: ../src/guestfs-actions.pod:8034 ../src/guestfs-actions.pod:8080
24891 #: ../src/guestfs-actions.pod:8099
24893 "This function returns a NULL-terminated array of strings (like L<environ(3)"
24894 ">), or NULL if there was an error. I<The caller must free the strings and "
24895 "the array after use>."
24899 #: ../src/guestfs-actions.pod:478 ../src/guestfs-actions.pod:1068
24900 #: ../src/guestfs-actions.pod:1086 ../src/guestfs-actions.pod:1607
24901 #: ../src/guestfs-actions.pod:3649 ../src/guestfs-actions.pod:3680
24902 #: ../src/guestfs-actions.pod:4338 ../src/guestfs-actions.pod:4388
24903 #: ../src/guestfs-actions.pod:4575 ../src/guestfs-actions.pod:4608
24904 #: ../src/guestfs-actions.pod:4771 ../src/guestfs-actions.pod:5258
24905 #: ../src/guestfs-actions.pod:5813 ../src/guestfs-actions.pod:6210
24906 #: ../src/guestfs-actions.pod:6224 ../src/guestfs-actions.pod:6236
24907 #: ../src/guestfs-actions.pod:6720 ../src/guestfs-actions.pod:7379
24908 #: ../src/guestfs-actions.pod:7392 ../src/guestfs-actions.pod:7625
24909 #: ../src/guestfs-actions.pod:7890
24910 msgid "(Added in 0.8)"
24914 #: ../src/guestfs-actions.pod:480
24915 msgid "guestfs_aug_match"
24919 #: ../src/guestfs-actions.pod:482
24923 " guestfs_aug_match (guestfs_h *g,\n"
24924 " const char *augpath);\n"
24929 #: ../src/guestfs-actions.pod:496
24930 msgid "guestfs_aug_mv"
24934 #: ../src/guestfs-actions.pod:498
24938 " guestfs_aug_mv (guestfs_h *g,\n"
24939 " const char *src,\n"
24940 " const char *dest);\n"
24945 #: ../src/guestfs-actions.pod:510
24946 msgid "guestfs_aug_rm"
24950 #: ../src/guestfs-actions.pod:512
24954 " guestfs_aug_rm (guestfs_h *g,\n"
24955 " const char *augpath);\n"
24960 #: ../src/guestfs-actions.pod:524
24961 msgid "guestfs_aug_save"
24965 #: ../src/guestfs-actions.pod:526
24969 " guestfs_aug_save (guestfs_h *g);\n"
24974 #: ../src/guestfs-actions.pod:531
24976 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
24981 #: ../src/guestfs-actions.pod:538
24982 msgid "guestfs_aug_set"
24986 #: ../src/guestfs-actions.pod:540
24990 " guestfs_aug_set (guestfs_h *g,\n"
24991 " const char *augpath,\n"
24992 " const char *val);\n"
24997 #: ../src/guestfs-actions.pod:547
24999 "In the Augeas API, it is possible to clear a node by setting the value to "
25000 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
25001 "this call. Instead you must use the C<guestfs_aug_clear> call."
25005 #: ../src/guestfs-actions.pod:556
25006 msgid "guestfs_available"
25010 #: ../src/guestfs-actions.pod:558
25014 " guestfs_available (guestfs_h *g,\n"
25015 " char *const *groups);\n"
25020 #: ../src/guestfs-actions.pod:566
25022 "The libguestfs groups, and the functions that those groups correspond to, "
25023 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
25024 "runtime by calling C<guestfs_available_all_groups>."
25028 #: ../src/guestfs-actions.pod:590
25029 msgid "You must call C<guestfs_launch> before calling this function."
25033 #: ../src/guestfs-actions.pod:612
25035 "This call was added in version C<1.0.80>. In previous versions of "
25036 "libguestfs all you could do would be to speculatively execute a command to "
25037 "find out if the daemon implemented it. See also C<guestfs_version>."
25041 #: ../src/guestfs-actions.pod:621 ../src/guestfs-actions.pod:1352
25042 msgid "(Added in 1.0.80)"
25046 #: ../src/guestfs-actions.pod:623
25047 msgid "guestfs_available_all_groups"
25051 #: ../src/guestfs-actions.pod:625
25055 " guestfs_available_all_groups (guestfs_h *g);\n"
25060 #: ../src/guestfs-actions.pod:628
25062 "This command returns a list of all optional groups that this daemon knows "
25063 "about. Note this returns both supported and unsupported groups. To find "
25064 "out which ones the daemon can actually support you have to call "
25065 "C<guestfs_available> on each member of the returned list."
25069 #: ../src/guestfs-actions.pod:634
25070 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
25074 #: ../src/guestfs-actions.pod:640
25075 msgid "(Added in 1.3.15)"
25079 #: ../src/guestfs-actions.pod:642
25080 msgid "guestfs_base64_in"
25084 #: ../src/guestfs-actions.pod:644
25088 " guestfs_base64_in (guestfs_h *g,\n"
25089 " const char *base64file,\n"
25090 " const char *filename);\n"
25095 #: ../src/guestfs-actions.pod:654 ../src/guestfs-actions.pod:668
25096 msgid "(Added in 1.3.5)"
25100 #: ../src/guestfs-actions.pod:656
25101 msgid "guestfs_base64_out"
25105 #: ../src/guestfs-actions.pod:658
25109 " guestfs_base64_out (guestfs_h *g,\n"
25110 " const char *filename,\n"
25111 " const char *base64file);\n"
25116 #: ../src/guestfs-actions.pod:670
25117 msgid "guestfs_blockdev_flushbufs"
25121 #: ../src/guestfs-actions.pod:672
25125 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
25126 " const char *device);\n"
25131 #: ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:700
25132 #: ../src/guestfs-actions.pod:715 ../src/guestfs-actions.pod:731
25133 #: ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:768
25134 #: ../src/guestfs-actions.pod:782 ../src/guestfs-actions.pod:800
25135 #: ../src/guestfs-actions.pod:814 ../src/guestfs-actions.pod:828
25136 msgid "(Added in 0.9.3)"
25140 #: ../src/guestfs-actions.pod:685
25141 msgid "guestfs_blockdev_getbsz"
25145 #: ../src/guestfs-actions.pod:687
25149 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
25150 " const char *device);\n"
25155 #: ../src/guestfs-actions.pod:702
25156 msgid "guestfs_blockdev_getro"
25160 #: ../src/guestfs-actions.pod:704
25164 " guestfs_blockdev_getro (guestfs_h *g,\n"
25165 " const char *device);\n"
25170 #: ../src/guestfs-actions.pod:713 ../src/guestfs-actions.pod:1590
25171 #: ../src/guestfs-actions.pod:1605 ../src/guestfs-actions.pod:2094
25172 #: ../src/guestfs-actions.pod:2105 ../src/guestfs-actions.pod:2177
25173 #: ../src/guestfs-actions.pod:2203 ../src/guestfs-actions.pod:2243
25174 #: ../src/guestfs-actions.pod:2258 ../src/guestfs-actions.pod:2294
25175 #: ../src/guestfs-actions.pod:2317 ../src/guestfs-actions.pod:3392
25176 #: ../src/guestfs-actions.pod:3408 ../src/guestfs-actions.pod:3426
25177 #: ../src/guestfs-actions.pod:3588 ../src/guestfs-actions.pod:3602
25178 #: ../src/guestfs-actions.pod:3617 ../src/guestfs-actions.pod:3631
25179 #: ../src/guestfs-actions.pod:3647 ../src/guestfs-actions.pod:3662
25180 #: ../src/guestfs-actions.pod:3678 ../src/guestfs-actions.pod:3692
25181 #: ../src/guestfs-actions.pod:3705 ../src/guestfs-actions.pod:3719
25182 #: ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3749
25183 #: ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:3776
25184 #: ../src/guestfs-actions.pod:5495
25185 msgid "This function returns a C truth value on success or -1 on error."
25189 #: ../src/guestfs-actions.pod:717
25190 msgid "guestfs_blockdev_getsize64"
25194 #: ../src/guestfs-actions.pod:719
25198 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
25199 " const char *device);\n"
25204 #: ../src/guestfs-actions.pod:725
25205 msgid "See also C<guestfs_blockdev_getsz>."
25209 #: ../src/guestfs-actions.pod:733
25210 msgid "guestfs_blockdev_getss"
25214 #: ../src/guestfs-actions.pod:735
25218 " guestfs_blockdev_getss (guestfs_h *g,\n"
25219 " const char *device);\n"
25224 #: ../src/guestfs-actions.pod:742
25226 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
25231 #: ../src/guestfs-actions.pod:751
25232 msgid "guestfs_blockdev_getsz"
25236 #: ../src/guestfs-actions.pod:753
25240 " guestfs_blockdev_getsz (guestfs_h *g,\n"
25241 " const char *device);\n"
25246 #: ../src/guestfs-actions.pod:760
25248 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
25249 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
25253 #: ../src/guestfs-actions.pod:770
25254 msgid "guestfs_blockdev_rereadpt"
25258 #: ../src/guestfs-actions.pod:772
25262 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
25263 " const char *device);\n"
25268 #: ../src/guestfs-actions.pod:784
25269 msgid "guestfs_blockdev_setbsz"
25273 #: ../src/guestfs-actions.pod:786
25277 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
25278 " const char *device,\n"
25279 " int blocksize);\n"
25284 #: ../src/guestfs-actions.pod:802
25285 msgid "guestfs_blockdev_setro"
25289 #: ../src/guestfs-actions.pod:804
25293 " guestfs_blockdev_setro (guestfs_h *g,\n"
25294 " const char *device);\n"
25299 #: ../src/guestfs-actions.pod:816
25300 msgid "guestfs_blockdev_setrw"
25304 #: ../src/guestfs-actions.pod:818
25308 " guestfs_blockdev_setrw (guestfs_h *g,\n"
25309 " const char *device);\n"
25314 #: ../src/guestfs-actions.pod:830
25315 msgid "guestfs_btrfs_filesystem_resize"
25319 #: ../src/guestfs-actions.pod:832
25323 " guestfs_btrfs_filesystem_resize (guestfs_h *g,\n"
25324 " const char *mountpoint,\n"
25330 #: ../src/guestfs-actions.pod:842
25333 " GUESTFS_BTRFS_FILESYSTEM_RESIZE_SIZE, int64_t size,\n"
25338 #: ../src/guestfs-actions.pod:865
25339 msgid "(Added in 1.11.17)"
25343 #: ../src/guestfs-actions.pod:867
25344 msgid "guestfs_btrfs_filesystem_resize_va"
25348 #: ../src/guestfs-actions.pod:869
25352 " guestfs_btrfs_filesystem_resize_va (guestfs_h *g,\n"
25353 " const char *mountpoint,\n"
25354 " va_list args);\n"
25359 #: ../src/guestfs-actions.pod:874
25360 msgid "This is the \"va_list variant\" of L</guestfs_btrfs_filesystem_resize>."
25364 #: ../src/guestfs-actions.pod:878
25365 msgid "guestfs_btrfs_filesystem_resize_argv"
25369 #: ../src/guestfs-actions.pod:880
25373 " guestfs_btrfs_filesystem_resize_argv (guestfs_h *g,\n"
25374 " const char *mountpoint,\n"
25375 " const struct guestfs_btrfs_filesystem_resize_argv *optargs);\n"
25380 #: ../src/guestfs-actions.pod:885
25381 msgid "This is the \"argv variant\" of L</guestfs_btrfs_filesystem_resize>."
25385 #: ../src/guestfs-actions.pod:889
25386 msgid "guestfs_case_sensitive_path"
25390 #: ../src/guestfs-actions.pod:891
25394 " guestfs_case_sensitive_path (guestfs_h *g,\n"
25395 " const char *path);\n"
25400 #: ../src/guestfs-actions.pod:917
25402 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
25403 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
25404 "how the directories were originally created under Windows)."
25408 #: ../src/guestfs-actions.pod:925
25409 msgid "See also C<guestfs_realpath>."
25413 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:7559
25414 msgid "(Added in 1.0.75)"
25418 #: ../src/guestfs-actions.pod:932
25419 msgid "guestfs_cat"
25423 #: ../src/guestfs-actions.pod:934
25427 " guestfs_cat (guestfs_h *g,\n"
25428 " const char *path);\n"
25433 #: ../src/guestfs-actions.pod:940
25435 "Note that this function cannot correctly handle binary files (specifically, "
25436 "files containing C<\\0> character which is treated as end of string). For "
25437 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
25438 "functions which have a more complex interface."
25442 #: ../src/guestfs-actions.pod:951 ../src/guestfs-actions.pod:3906
25443 #: ../src/guestfs-actions.pod:3988 ../src/guestfs-actions.pod:4005
25444 #: ../src/guestfs-actions.pod:4093 ../src/guestfs-actions.pod:4501
25445 #: ../src/guestfs-actions.pod:4515 ../src/guestfs-actions.pod:5876
25446 #: ../src/guestfs-actions.pod:5890 ../src/guestfs-actions.pod:7712
25447 #: ../src/guestfs-actions.pod:7726
25448 msgid "(Added in 0.4)"
25452 #: ../src/guestfs-actions.pod:953
25453 msgid "guestfs_checksum"
25457 #: ../src/guestfs-actions.pod:955
25461 " guestfs_checksum (guestfs_h *g,\n"
25462 " const char *csumtype,\n"
25463 " const char *path);\n"
25468 #: ../src/guestfs-actions.pod:1001
25469 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
25473 #: ../src/guestfs-actions.pod:1003
25474 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
25478 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1427
25479 #: ../src/guestfs-actions.pod:2285 ../src/guestfs-actions.pod:3604
25480 #: ../src/guestfs-actions.pod:3633 ../src/guestfs-actions.pod:3694
25481 #: ../src/guestfs-actions.pod:3721 ../src/guestfs-actions.pod:7415
25482 msgid "(Added in 1.0.2)"
25486 #: ../src/guestfs-actions.pod:1010
25487 msgid "guestfs_checksum_device"
25491 #: ../src/guestfs-actions.pod:1012
25495 " guestfs_checksum_device (guestfs_h *g,\n"
25496 " const char *csumtype,\n"
25497 " const char *device);\n"
25502 #: ../src/guestfs-actions.pod:1017
25504 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
25505 "device named C<device>. For the types of checksums supported see the "
25506 "C<guestfs_checksum> command."
25510 #: ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:5325
25511 #: ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5497
25512 #: ../src/guestfs-actions.pod:5515 ../src/guestfs-actions.pod:5697
25513 #: ../src/guestfs-actions.pod:7324 ../src/guestfs-actions.pod:7338
25514 #: ../src/guestfs-actions.pod:7738
25515 msgid "(Added in 1.3.2)"
25519 #: ../src/guestfs-actions.pod:1026
25520 msgid "guestfs_checksums_out"
25524 #: ../src/guestfs-actions.pod:1028
25528 " guestfs_checksums_out (guestfs_h *g,\n"
25529 " const char *csumtype,\n"
25530 " const char *directory,\n"
25531 " const char *sumsfile);\n"
25536 #: ../src/guestfs-actions.pod:1048
25537 msgid "(Added in 1.3.7)"
25541 #: ../src/guestfs-actions.pod:1050
25542 msgid "guestfs_chmod"
25546 #: ../src/guestfs-actions.pod:1052
25550 " guestfs_chmod (guestfs_h *g,\n"
25552 " const char *path);\n"
25557 #: ../src/guestfs-actions.pod:1070
25558 msgid "guestfs_chown"
25562 #: ../src/guestfs-actions.pod:1072
25566 " guestfs_chown (guestfs_h *g,\n"
25569 " const char *path);\n"
25574 #: ../src/guestfs-actions.pod:1088
25575 msgid "guestfs_command"
25579 #: ../src/guestfs-actions.pod:1090
25583 " guestfs_command (guestfs_h *g,\n"
25584 " char *const *arguments);\n"
25589 #: ../src/guestfs-actions.pod:1099
25591 "The single parameter is an argv-style list of arguments. The first element "
25592 "is the name of the program to run. Subsequent elements are parameters. The "
25593 "list must be non-empty (ie. must contain a program name). Note that the "
25594 "command runs directly, and is I<not> invoked via the shell (see "
25599 #: ../src/guestfs-actions.pod:1130 ../src/guestfs-actions.pod:1150
25600 #: ../src/guestfs-actions.pod:1726
25601 msgid "(Added in 0.9.1)"
25605 #: ../src/guestfs-actions.pod:1132
25606 msgid "guestfs_command_lines"
25610 #: ../src/guestfs-actions.pod:1134
25614 " guestfs_command_lines (guestfs_h *g,\n"
25615 " char *const *arguments);\n"
25620 #: ../src/guestfs-actions.pod:1138
25622 "This is the same as C<guestfs_command>, but splits the result into a list of "
25627 #: ../src/guestfs-actions.pod:1141
25628 msgid "See also: C<guestfs_sh_lines>"
25632 #: ../src/guestfs-actions.pod:1152
25633 msgid "guestfs_compress_device_out"
25637 #: ../src/guestfs-actions.pod:1154
25641 " guestfs_compress_device_out (guestfs_h *g,\n"
25642 " const char *ctype,\n"
25643 " const char *device,\n"
25644 " const char *zdevice,\n"
25650 #: ../src/guestfs-actions.pod:1166
25653 " GUESTFS_COMPRESS_DEVICE_OUT_LEVEL, int level,\n"
25658 #: ../src/guestfs-actions.pod:1171
25660 "The C<ctype> and optional C<level> parameters have the same meaning as in "
25661 "C<guestfs_compress_out>."
25665 #: ../src/guestfs-actions.pod:1176 ../src/guestfs-actions.pod:1235
25666 #: ../src/guestfs-actions.pod:2271 ../src/guestfs-actions.pod:6596
25667 msgid "(Added in 1.13.15)"
25671 #: ../src/guestfs-actions.pod:1178
25672 msgid "guestfs_compress_device_out_va"
25676 #: ../src/guestfs-actions.pod:1180
25680 " guestfs_compress_device_out_va (guestfs_h *g,\n"
25681 " const char *ctype,\n"
25682 " const char *device,\n"
25683 " const char *zdevice,\n"
25684 " va_list args);\n"
25689 #: ../src/guestfs-actions.pod:1187
25690 msgid "This is the \"va_list variant\" of L</guestfs_compress_device_out>."
25694 #: ../src/guestfs-actions.pod:1191
25695 msgid "guestfs_compress_device_out_argv"
25699 #: ../src/guestfs-actions.pod:1193
25703 " guestfs_compress_device_out_argv (guestfs_h *g,\n"
25704 " const char *ctype,\n"
25705 " const char *device,\n"
25706 " const char *zdevice,\n"
25707 " const struct guestfs_compress_device_out_argv *optargs);\n"
25712 #: ../src/guestfs-actions.pod:1200
25713 msgid "This is the \"argv variant\" of L</guestfs_compress_device_out>."
25717 #: ../src/guestfs-actions.pod:1204
25718 msgid "guestfs_compress_out"
25722 #: ../src/guestfs-actions.pod:1206
25726 " guestfs_compress_out (guestfs_h *g,\n"
25727 " const char *ctype,\n"
25728 " const char *file,\n"
25729 " const char *zfile,\n"
25735 #: ../src/guestfs-actions.pod:1218
25738 " GUESTFS_COMPRESS_OUT_LEVEL, int level,\n"
25743 #: ../src/guestfs-actions.pod:1237
25744 msgid "guestfs_compress_out_va"
25748 #: ../src/guestfs-actions.pod:1239
25752 " guestfs_compress_out_va (guestfs_h *g,\n"
25753 " const char *ctype,\n"
25754 " const char *file,\n"
25755 " const char *zfile,\n"
25756 " va_list args);\n"
25761 #: ../src/guestfs-actions.pod:1246
25762 msgid "This is the \"va_list variant\" of L</guestfs_compress_out>."
25766 #: ../src/guestfs-actions.pod:1250
25767 msgid "guestfs_compress_out_argv"
25771 #: ../src/guestfs-actions.pod:1252
25775 " guestfs_compress_out_argv (guestfs_h *g,\n"
25776 " const char *ctype,\n"
25777 " const char *file,\n"
25778 " const char *zfile,\n"
25779 " const struct guestfs_compress_out_argv *optargs);\n"
25784 #: ../src/guestfs-actions.pod:1259
25785 msgid "This is the \"argv variant\" of L</guestfs_compress_out>."
25789 #: ../src/guestfs-actions.pod:1263
25790 msgid "guestfs_config"
25794 #: ../src/guestfs-actions.pod:1265
25798 " guestfs_config (guestfs_h *g,\n"
25799 " const char *qemuparam,\n"
25800 " const char *qemuvalue);\n"
25805 #: ../src/guestfs-actions.pod:1283
25806 msgid "guestfs_copy_size"
25810 #: ../src/guestfs-actions.pod:1285
25814 " guestfs_copy_size (guestfs_h *g,\n"
25815 " const char *src,\n"
25816 " const char *dest,\n"
25817 " int64_t size);\n"
25822 #: ../src/guestfs-actions.pod:1299 ../src/guestfs-actions.pod:1422
25823 #: ../src/guestfs-actions.pod:1453 ../src/guestfs-actions.pod:1498
25824 #: ../src/guestfs-actions.pod:1875 ../src/guestfs-actions.pod:1897
25825 #: ../src/guestfs-actions.pod:3804 ../src/guestfs-actions.pod:7410
25826 #: ../src/guestfs-actions.pod:7444 ../src/guestfs-actions.pod:7951
25827 #: ../src/guestfs-actions.pod:7974
25829 "This long-running command can generate progress notification messages so "
25830 "that the caller can display a progress bar or indicator. To receive these "
25831 "messages, the caller must register a progress event callback. See L<guestfs"
25832 "(3)/GUESTFS_EVENT_PROGRESS>."
25836 #: ../src/guestfs-actions.pod:1304 ../src/guestfs-actions.pod:4528
25837 #: ../src/guestfs-actions.pod:5903 ../src/guestfs-actions.pod:7645
25838 #: ../src/guestfs-actions.pod:7665 ../src/guestfs-actions.pod:7751
25839 msgid "(Added in 1.0.87)"
25843 #: ../src/guestfs-actions.pod:1306
25848 #: ../src/guestfs-actions.pod:1308
25852 " guestfs_cp (guestfs_h *g,\n"
25853 " const char *src,\n"
25854 " const char *dest);\n"
25859 #: ../src/guestfs-actions.pod:1318 ../src/guestfs-actions.pod:1332
25860 #: ../src/guestfs-actions.pod:1404 ../src/guestfs-actions.pod:1478
25861 #: ../src/guestfs-actions.pod:1592 ../src/guestfs-actions.pod:5272
25862 #: ../src/guestfs-actions.pod:5747
25863 msgid "(Added in 1.0.18)"
25867 #: ../src/guestfs-actions.pod:1320
25868 msgid "guestfs_cp_a"
25872 #: ../src/guestfs-actions.pod:1322
25876 " guestfs_cp_a (guestfs_h *g,\n"
25877 " const char *src,\n"
25878 " const char *dest);\n"
25883 #: ../src/guestfs-actions.pod:1334
25888 #: ../src/guestfs-actions.pod:1336
25892 " guestfs_dd (guestfs_h *g,\n"
25893 " const char *src,\n"
25894 " const char *dest);\n"
25899 #: ../src/guestfs-actions.pod:1346
25901 "If the destination is a device, it must be as large or larger than the "
25902 "source file or device, otherwise the copy will fail. This command cannot do "
25903 "partial copies (see C<guestfs_copy_size>)."
25907 #: ../src/guestfs-actions.pod:1354
25912 #: ../src/guestfs-actions.pod:1356
25916 " guestfs_df (guestfs_h *g);\n"
25921 #: ../src/guestfs-actions.pod:1361 ../src/guestfs-actions.pod:1378
25923 "This command is mostly useful for interactive sessions. It is I<not> "
25924 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
25929 #: ../src/guestfs-actions.pod:1368 ../src/guestfs-actions.pod:1385
25930 #: ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:2510
25931 #: ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2602
25932 #: ../src/guestfs-actions.pod:4638 ../src/guestfs-actions.pod:5172
25933 #: ../src/guestfs-actions.pod:7148 ../src/guestfs-actions.pod:7172
25934 #: ../src/guestfs-actions.pod:7791 ../src/guestfs-actions.pod:7804
25935 #: ../src/guestfs-actions.pod:7817
25936 msgid "(Added in 1.0.54)"
25940 #: ../src/guestfs-actions.pod:1370
25941 msgid "guestfs_df_h"
25945 #: ../src/guestfs-actions.pod:1372
25949 " guestfs_df_h (guestfs_h *g);\n"
25954 #: ../src/guestfs-actions.pod:1387
25955 msgid "guestfs_dmesg"
25959 #: ../src/guestfs-actions.pod:1389
25963 " guestfs_dmesg (guestfs_h *g);\n"
25968 #: ../src/guestfs-actions.pod:1396
25970 "Another way to get the same information is to enable verbose messages with "
25971 "C<guestfs_set_verbose> or by setting the environment variable "
25972 "C<LIBGUESTFS_DEBUG=1> before running the program."
25976 #: ../src/guestfs-actions.pod:1406
25977 msgid "guestfs_download"
25981 #: ../src/guestfs-actions.pod:1408
25985 " guestfs_download (guestfs_h *g,\n"
25986 " const char *remotefilename,\n"
25987 " const char *filename);\n"
25992 #: ../src/guestfs-actions.pod:1418
25993 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
25997 #: ../src/guestfs-actions.pod:1429
25998 msgid "guestfs_download_offset"
26002 #: ../src/guestfs-actions.pod:1431
26006 " guestfs_download_offset (guestfs_h *g,\n"
26007 " const char *remotefilename,\n"
26008 " const char *filename,\n"
26009 " int64_t offset,\n"
26010 " int64_t size);\n"
26015 #: ../src/guestfs-actions.pod:1444
26017 "Note that there is no limit on the amount of data that can be downloaded "
26018 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
26019 "full amount unless an error occurs."
26023 #: ../src/guestfs-actions.pod:1449
26024 msgid "See also C<guestfs_download>, C<guestfs_pread>."
26028 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:7449
26029 msgid "(Added in 1.5.17)"
26033 #: ../src/guestfs-actions.pod:1460
26034 msgid "guestfs_drop_caches"
26038 #: ../src/guestfs-actions.pod:1462
26042 " guestfs_drop_caches (guestfs_h *g,\n"
26043 " int whattodrop);\n"
26048 #: ../src/guestfs-actions.pod:1480
26053 #: ../src/guestfs-actions.pod:1482
26057 " guestfs_du (guestfs_h *g,\n"
26058 " const char *path);\n"
26063 #: ../src/guestfs-actions.pod:1505
26064 msgid "guestfs_e2fsck_f"
26068 #: ../src/guestfs-actions.pod:1507
26072 " guestfs_e2fsck_f (guestfs_h *g,\n"
26073 " const char *device);\n"
26078 #: ../src/guestfs-actions.pod:1515
26080 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
26081 "Normally you should use C<guestfs_fsck>."
26085 #: ../src/guestfs-actions.pod:1520
26086 msgid "(Added in 1.0.29)"
26090 #: ../src/guestfs-actions.pod:1522
26091 msgid "guestfs_echo_daemon"
26095 #: ../src/guestfs-actions.pod:1524
26099 " guestfs_echo_daemon (guestfs_h *g,\n"
26100 " char *const *words);\n"
26105 #: ../src/guestfs-actions.pod:1533
26106 msgid "See also C<guestfs_ping_daemon>."
26110 #: ../src/guestfs-actions.pod:1538 ../src/guestfs-actions.pod:2296
26111 #: ../src/guestfs-actions.pod:6620
26112 msgid "(Added in 1.0.69)"
26116 #: ../src/guestfs-actions.pod:1540
26117 msgid "guestfs_egrep"
26121 #: ../src/guestfs-actions.pod:1542
26125 " guestfs_egrep (guestfs_h *g,\n"
26126 " const char *regex,\n"
26127 " const char *path);\n"
26132 #: ../src/guestfs-actions.pod:1557 ../src/guestfs-actions.pod:1576
26133 #: ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1679
26134 #: ../src/guestfs-actions.pod:1698 ../src/guestfs-actions.pod:2426
26135 #: ../src/guestfs-actions.pod:2445 ../src/guestfs-actions.pod:2623
26136 #: ../src/guestfs-actions.pod:2636 ../src/guestfs-actions.pod:2651
26137 #: ../src/guestfs-actions.pod:2697 ../src/guestfs-actions.pod:2719
26138 #: ../src/guestfs-actions.pod:2732 ../src/guestfs-actions.pod:4018
26139 #: ../src/guestfs-actions.pod:4032 ../src/guestfs-actions.pod:4045
26140 #: ../src/guestfs-actions.pod:4059 ../src/guestfs-actions.pod:5060
26141 #: ../src/guestfs-actions.pod:6081 ../src/guestfs-actions.pod:6130
26142 #: ../src/guestfs-actions.pod:7016 ../src/guestfs-actions.pod:7028
26143 #: ../src/guestfs-actions.pod:7041 ../src/guestfs-actions.pod:7054
26144 #: ../src/guestfs-actions.pod:7076 ../src/guestfs-actions.pod:7089
26145 #: ../src/guestfs-actions.pod:7102 ../src/guestfs-actions.pod:7115
26146 #: ../src/guestfs-actions.pod:7909 ../src/guestfs-actions.pod:7928
26147 #: ../src/guestfs-actions.pod:8022 ../src/guestfs-actions.pod:8041
26148 #: ../src/guestfs-actions.pod:8087 ../src/guestfs-actions.pod:8106
26149 msgid "(Added in 1.0.66)"
26153 #: ../src/guestfs-actions.pod:1559
26154 msgid "guestfs_egrepi"
26158 #: ../src/guestfs-actions.pod:1561
26162 " guestfs_egrepi (guestfs_h *g,\n"
26163 " const char *regex,\n"
26164 " const char *path);\n"
26169 #: ../src/guestfs-actions.pod:1578
26170 msgid "guestfs_equal"
26174 #: ../src/guestfs-actions.pod:1580
26178 " guestfs_equal (guestfs_h *g,\n"
26179 " const char *file1,\n"
26180 " const char *file2);\n"
26185 #: ../src/guestfs-actions.pod:1594
26186 msgid "guestfs_exists"
26190 #: ../src/guestfs-actions.pod:1596
26194 " guestfs_exists (guestfs_h *g,\n"
26195 " const char *path);\n"
26200 #: ../src/guestfs-actions.pod:1603
26201 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
26205 #: ../src/guestfs-actions.pod:1609
26206 msgid "guestfs_fallocate"
26210 #: ../src/guestfs-actions.pod:1611
26214 " guestfs_fallocate (guestfs_h *g,\n"
26215 " const char *path,\n"
26221 #: ../src/guestfs-actions.pod:1616
26223 "I<This function is deprecated.> In new code, use the L</guestfs_fallocate64> "
26228 #: ../src/guestfs-actions.pod:1635
26229 msgid "guestfs_fallocate64"
26233 #: ../src/guestfs-actions.pod:1637
26237 " guestfs_fallocate64 (guestfs_h *g,\n"
26238 " const char *path,\n"
26244 #: ../src/guestfs-actions.pod:1646
26246 "Note that this call allocates disk blocks for the file. To create a sparse "
26247 "file use C<guestfs_truncate_size> instead."
26251 #: ../src/guestfs-actions.pod:1649
26253 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
26254 "oversight it only allowed 30 bit lengths to be specified, effectively "
26255 "limiting the maximum size of files created through that call to 1GB."
26259 #: ../src/guestfs-actions.pod:1660
26260 msgid "(Added in 1.3.17)"
26264 #: ../src/guestfs-actions.pod:1662
26265 msgid "guestfs_fgrep"
26269 #: ../src/guestfs-actions.pod:1664
26273 " guestfs_fgrep (guestfs_h *g,\n"
26274 " const char *pattern,\n"
26275 " const char *path);\n"
26280 #: ../src/guestfs-actions.pod:1681
26281 msgid "guestfs_fgrepi"
26285 #: ../src/guestfs-actions.pod:1683
26289 " guestfs_fgrepi (guestfs_h *g,\n"
26290 " const char *pattern,\n"
26291 " const char *path);\n"
26296 #: ../src/guestfs-actions.pod:1700
26297 msgid "guestfs_file"
26301 #: ../src/guestfs-actions.pod:1702
26305 " guestfs_file (guestfs_h *g,\n"
26306 " const char *path);\n"
26311 #: ../src/guestfs-actions.pod:1720
26313 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
26314 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
26318 #: ../src/guestfs-actions.pod:1728
26319 msgid "guestfs_file_architecture"
26323 #: ../src/guestfs-actions.pod:1730
26327 " guestfs_file_architecture (guestfs_h *g,\n"
26328 " const char *filename);\n"
26333 #: ../src/guestfs-actions.pod:1838 ../src/guestfs-actions.pod:2001
26334 #: ../src/guestfs-actions.pod:2018 ../src/guestfs-actions.pod:2752
26335 #: ../src/guestfs-actions.pod:2854 ../src/guestfs-actions.pod:2920
26336 #: ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3125
26337 #: ../src/guestfs-actions.pod:3165 ../src/guestfs-actions.pod:3241
26338 #: ../src/guestfs-actions.pod:3338 ../src/guestfs-actions.pod:3575
26339 #: ../src/guestfs-actions.pod:3707
26340 msgid "(Added in 1.5.3)"
26344 #: ../src/guestfs-actions.pod:1840
26345 msgid "guestfs_filesize"
26349 #: ../src/guestfs-actions.pod:1842
26353 " guestfs_filesize (guestfs_h *g,\n"
26354 " const char *file);\n"
26359 #: ../src/guestfs-actions.pod:1848
26361 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
26362 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
26363 "devices, use C<guestfs_blockdev_getsize64>."
26367 #: ../src/guestfs-actions.pod:1854
26368 msgid "(Added in 1.0.82)"
26372 #: ../src/guestfs-actions.pod:1856
26373 msgid "guestfs_fill"
26377 #: ../src/guestfs-actions.pod:1858
26381 " guestfs_fill (guestfs_h *g,\n"
26384 " const char *path);\n"
26389 #: ../src/guestfs-actions.pod:1868
26391 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
26392 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
26393 "bytes use C<guestfs_fill_pattern>."
26397 #: ../src/guestfs-actions.pod:1880
26398 msgid "(Added in 1.0.79)"
26402 #: ../src/guestfs-actions.pod:1882
26403 msgid "guestfs_fill_pattern"
26407 #: ../src/guestfs-actions.pod:1884
26411 " guestfs_fill_pattern (guestfs_h *g,\n"
26412 " const char *pattern,\n"
26414 " const char *path);\n"
26419 #: ../src/guestfs-actions.pod:1890
26421 "This function is like C<guestfs_fill> except that it creates a new file of "
26422 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
26423 "pattern is truncated if necessary to ensure the length of the file is "
26424 "exactly C<len> bytes."
26428 #: ../src/guestfs-actions.pod:1902
26429 msgid "(Added in 1.3.12)"
26433 #: ../src/guestfs-actions.pod:1904
26434 msgid "guestfs_find"
26438 #: ../src/guestfs-actions.pod:1906
26442 " guestfs_find (guestfs_h *g,\n"
26443 " const char *directory);\n"
26448 #: ../src/guestfs-actions.pod:1922
26450 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
26454 #: ../src/guestfs-actions.pod:1935
26455 msgid "See also C<guestfs_find0>."
26459 #: ../src/guestfs-actions.pod:1944 ../src/guestfs-actions.pod:4465
26460 #: ../src/guestfs-actions.pod:6165
26461 msgid "(Added in 1.0.27)"
26465 #: ../src/guestfs-actions.pod:1946
26466 msgid "guestfs_find0"
26470 #: ../src/guestfs-actions.pod:1948
26474 " guestfs_find0 (guestfs_h *g,\n"
26475 " const char *directory,\n"
26476 " const char *files);\n"
26481 #: ../src/guestfs-actions.pod:1957
26483 "This command works the same way as C<guestfs_find> with the following "
26488 #: ../src/guestfs-actions.pod:1984
26489 msgid "(Added in 1.0.74)"
26493 #: ../src/guestfs-actions.pod:1986
26494 msgid "guestfs_findfs_label"
26498 #: ../src/guestfs-actions.pod:1988
26502 " guestfs_findfs_label (guestfs_h *g,\n"
26503 " const char *label);\n"
26508 #: ../src/guestfs-actions.pod:1996
26509 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
26513 #: ../src/guestfs-actions.pod:2003
26514 msgid "guestfs_findfs_uuid"
26518 #: ../src/guestfs-actions.pod:2005
26522 " guestfs_findfs_uuid (guestfs_h *g,\n"
26523 " const char *uuid);\n"
26528 #: ../src/guestfs-actions.pod:2013
26529 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
26533 #: ../src/guestfs-actions.pod:2020
26534 msgid "guestfs_fsck"
26538 #: ../src/guestfs-actions.pod:2022
26542 " guestfs_fsck (guestfs_h *g,\n"
26543 " const char *fstype,\n"
26544 " const char *device);\n"
26549 #: ../src/guestfs-actions.pod:2057 ../src/guestfs-actions.pod:7956
26550 msgid "(Added in 1.0.16)"
26554 #: ../src/guestfs-actions.pod:2059
26555 msgid "guestfs_get_append"
26559 #: ../src/guestfs-actions.pod:2061
26563 " guestfs_get_append (guestfs_h *g);\n"
26568 #: ../src/guestfs-actions.pod:2069
26570 "This function returns a string which may be NULL. There is no way to return "
26571 "an error from this function. The string is owned by the guest handle and "
26572 "must I<not> be freed."
26576 #: ../src/guestfs-actions.pod:2073 ../src/guestfs-actions.pod:5843
26577 #: ../src/guestfs-actions.pod:6325 ../src/guestfs-actions.pod:6783
26578 #: ../src/guestfs-actions.pod:6802 ../src/guestfs-actions.pod:6818
26579 #: ../src/guestfs-actions.pod:6842 ../src/guestfs-actions.pod:7596
26580 #: ../src/guestfs-actions.pod:7611 ../src/guestfs-actions.pod:8003
26581 msgid "(Added in 1.0.26)"
26585 #: ../src/guestfs-actions.pod:2075
26586 msgid "guestfs_get_attach_method"
26590 #: ../src/guestfs-actions.pod:2077
26594 " guestfs_get_attach_method (guestfs_h *g);\n"
26599 #: ../src/guestfs-actions.pod:2080
26600 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
26604 #: ../src/guestfs-actions.pod:2085 ../src/guestfs-actions.pod:6355
26605 msgid "(Added in 1.9.8)"
26609 #: ../src/guestfs-actions.pod:2087
26610 msgid "guestfs_get_autosync"
26614 #: ../src/guestfs-actions.pod:2089
26618 " guestfs_get_autosync (guestfs_h *g);\n"
26623 #: ../src/guestfs-actions.pod:2098
26624 msgid "guestfs_get_direct"
26628 #: ../src/guestfs-actions.pod:2100
26632 " guestfs_get_direct (guestfs_h *g);\n"
26637 #: ../src/guestfs-actions.pod:2107 ../src/guestfs-actions.pod:6396
26638 msgid "(Added in 1.0.72)"
26642 #: ../src/guestfs-actions.pod:2109
26643 msgid "guestfs_get_e2label"
26647 #: ../src/guestfs-actions.pod:2111
26651 " guestfs_get_e2label (guestfs_h *g,\n"
26652 " const char *device);\n"
26657 #: ../src/guestfs-actions.pod:2115
26659 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_label> "
26664 #: ../src/guestfs-actions.pod:2128 ../src/guestfs-actions.pod:2149
26665 #: ../src/guestfs-actions.pod:6414 ../src/guestfs-actions.pod:6433
26666 msgid "(Added in 1.0.15)"
26670 #: ../src/guestfs-actions.pod:2130
26671 msgid "guestfs_get_e2uuid"
26675 #: ../src/guestfs-actions.pod:2132
26679 " guestfs_get_e2uuid (guestfs_h *g,\n"
26680 " const char *device);\n"
26685 #: ../src/guestfs-actions.pod:2136
26687 "I<This function is deprecated.> In new code, use the L</guestfs_vfs_uuid> "
26692 #: ../src/guestfs-actions.pod:2151
26693 msgid "guestfs_get_memsize"
26697 #: ../src/guestfs-actions.pod:2153
26701 " guestfs_get_memsize (guestfs_h *g);\n"
26706 #: ../src/guestfs-actions.pod:2159
26708 "If C<guestfs_set_memsize> was not called on this handle, and if "
26709 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
26710 "value for memsize."
26714 #: ../src/guestfs-actions.pod:2168 ../src/guestfs-actions.pod:4756
26715 #: ../src/guestfs-actions.pod:4965 ../src/guestfs-actions.pod:4984
26716 #: ../src/guestfs-actions.pod:5003 ../src/guestfs-actions.pod:5015
26717 #: ../src/guestfs-actions.pod:5032 ../src/guestfs-actions.pod:5045
26718 #: ../src/guestfs-actions.pod:6068 ../src/guestfs-actions.pod:6454
26719 #: ../src/guestfs-actions.pod:6750 ../src/guestfs-actions.pod:7365
26720 msgid "(Added in 1.0.55)"
26724 #: ../src/guestfs-actions.pod:2170
26725 msgid "guestfs_get_network"
26729 #: ../src/guestfs-actions.pod:2172
26733 " guestfs_get_network (guestfs_h *g);\n"
26738 #: ../src/guestfs-actions.pod:2179 ../src/guestfs-actions.pod:6473
26739 msgid "(Added in 1.5.4)"
26743 #: ../src/guestfs-actions.pod:2181
26744 msgid "guestfs_get_path"
26748 #: ../src/guestfs-actions.pod:2183
26752 " guestfs_get_path (guestfs_h *g);\n"
26757 #: ../src/guestfs-actions.pod:2191 ../src/guestfs-actions.pod:2231
26759 "This function returns a string, or NULL on error. The string is owned by "
26760 "the guest handle and must I<not> be freed."
26764 #: ../src/guestfs-actions.pod:2196
26765 msgid "guestfs_get_pgroup"
26769 #: ../src/guestfs-actions.pod:2198
26773 " guestfs_get_pgroup (guestfs_h *g);\n"
26778 #: ../src/guestfs-actions.pod:2205 ../src/guestfs-actions.pod:6509
26779 #: ../src/guestfs-actions.pod:7857
26780 msgid "(Added in 1.11.18)"
26784 #: ../src/guestfs-actions.pod:2207
26785 msgid "guestfs_get_pid"
26789 #: ../src/guestfs-actions.pod:2209
26793 " guestfs_get_pid (guestfs_h *g);\n"
26798 #: ../src/guestfs-actions.pod:2219
26799 msgid "(Added in 1.0.56)"
26803 #: ../src/guestfs-actions.pod:2221
26804 msgid "guestfs_get_qemu"
26808 #: ../src/guestfs-actions.pod:2223
26812 " guestfs_get_qemu (guestfs_h *g);\n"
26817 #: ../src/guestfs-actions.pod:2234 ../src/guestfs-actions.pod:6537
26818 msgid "(Added in 1.0.6)"
26822 #: ../src/guestfs-actions.pod:2236
26823 msgid "guestfs_get_recovery_proc"
26827 #: ../src/guestfs-actions.pod:2238
26831 " guestfs_get_recovery_proc (guestfs_h *g);\n"
26836 #: ../src/guestfs-actions.pod:2245 ../src/guestfs-actions.pod:3829
26837 #: ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:4563
26838 #: ../src/guestfs-actions.pod:4595 ../src/guestfs-actions.pod:5773
26839 #: ../src/guestfs-actions.pod:6116 ../src/guestfs-actions.pod:6561
26840 #: ../src/guestfs-actions.pod:7268 ../src/guestfs-actions.pod:7288
26841 #: ../src/guestfs-actions.pod:7480
26842 msgid "(Added in 1.0.77)"
26846 #: ../src/guestfs-actions.pod:2247
26847 msgid "guestfs_get_selinux"
26851 #: ../src/guestfs-actions.pod:2249
26855 " guestfs_get_selinux (guestfs_h *g);\n"
26860 #: ../src/guestfs-actions.pod:2252
26862 "This returns the current setting of the selinux flag which is passed to the "
26863 "appliance at boot time. See C<guestfs_set_selinux>."
26867 #: ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2334
26868 #: ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6654
26869 msgid "(Added in 1.0.67)"
26873 #: ../src/guestfs-actions.pod:2262
26874 msgid "guestfs_get_smp"
26878 #: ../src/guestfs-actions.pod:2264
26882 " guestfs_get_smp (guestfs_h *g);\n"
26887 #: ../src/guestfs-actions.pod:2273
26888 msgid "guestfs_get_state"
26892 #: ../src/guestfs-actions.pod:2275
26896 " guestfs_get_state (guestfs_h *g);\n"
26901 #: ../src/guestfs-actions.pod:2287
26902 msgid "guestfs_get_trace"
26906 #: ../src/guestfs-actions.pod:2289
26910 " guestfs_get_trace (guestfs_h *g);\n"
26915 #: ../src/guestfs-actions.pod:2298
26916 msgid "guestfs_get_umask"
26920 #: ../src/guestfs-actions.pod:2300
26924 " guestfs_get_umask (guestfs_h *g);\n"
26929 #: ../src/guestfs-actions.pod:2303
26931 "Return the current umask. By default the umask is C<022> unless it has been "
26932 "set by calling C<guestfs_umask>."
26936 #: ../src/guestfs-actions.pod:2310
26937 msgid "guestfs_get_verbose"
26941 #: ../src/guestfs-actions.pod:2312
26945 " guestfs_get_verbose (guestfs_h *g);\n"
26950 #: ../src/guestfs-actions.pod:2321
26951 msgid "guestfs_getcon"
26955 #: ../src/guestfs-actions.pod:2323
26959 " guestfs_getcon (guestfs_h *g);\n"
26964 #: ../src/guestfs-actions.pod:2328
26966 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
26970 #: ../src/guestfs-actions.pod:2336
26971 msgid "guestfs_getxattr"
26975 #: ../src/guestfs-actions.pod:2338
26979 " guestfs_getxattr (guestfs_h *g,\n"
26980 " const char *path,\n"
26981 " const char *name,\n"
26982 " size_t *size_r);\n"
26987 #: ../src/guestfs-actions.pod:2344
26989 "Get a single extended attribute from file C<path> named C<name>. This call "
26990 "follows symlinks. If you want to lookup an extended attribute for the "
26991 "symlink itself, use C<guestfs_lgetxattr>."
26995 #: ../src/guestfs-actions.pod:2348 ../src/guestfs-actions.pod:3843
26997 "Normally it is better to get all extended attributes from a file in one go "
26998 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
26999 "implementations are buggy and do not provide a way to list out attributes. "
27000 "For these filesystems (notably ntfs-3g) you have to know the names of the "
27001 "extended attributes you want in advance and call this function."
27005 #: ../src/guestfs-actions.pod:2358
27006 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
27010 #: ../src/guestfs-actions.pod:2360 ../src/guestfs-actions.pod:2573
27011 #: ../src/guestfs-actions.pod:3055 ../src/guestfs-actions.pod:3855
27012 #: ../src/guestfs-actions.pod:5766 ../src/guestfs-actions.pod:5792
27013 #: ../src/guestfs-actions.pod:5973
27015 "This function returns a buffer, or NULL on error. The size of the returned "
27016 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
27021 #: ../src/guestfs-actions.pod:2364 ../src/guestfs-actions.pod:3859
27022 msgid "(Added in 1.7.24)"
27026 #: ../src/guestfs-actions.pod:2366
27027 msgid "guestfs_getxattrs"
27031 #: ../src/guestfs-actions.pod:2368
27034 " struct guestfs_xattr_list *\n"
27035 " guestfs_getxattrs (guestfs_h *g,\n"
27036 " const char *path);\n"
27041 #: ../src/guestfs-actions.pod:2378
27042 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
27046 #: ../src/guestfs-actions.pod:2380 ../src/guestfs-actions.pod:3871
27047 #: ../src/guestfs-actions.pod:4559
27049 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
27050 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
27054 #: ../src/guestfs-actions.pod:2384 ../src/guestfs-actions.pod:3875
27055 #: ../src/guestfs-actions.pod:4074 ../src/guestfs-actions.pod:4110
27056 #: ../src/guestfs-actions.pod:6146 ../src/guestfs-actions.pod:6673
27057 #: ../src/guestfs-actions.pod:8068
27058 msgid "(Added in 1.0.59)"
27062 #: ../src/guestfs-actions.pod:2386
27063 msgid "guestfs_glob_expand"
27067 #: ../src/guestfs-actions.pod:2388
27071 " guestfs_glob_expand (guestfs_h *g,\n"
27072 " const char *pattern);\n"
27077 #: ../src/guestfs-actions.pod:2407 ../src/guestfs-actions.pod:6866
27078 #: ../src/guestfs-actions.pod:6883
27079 msgid "(Added in 1.0.50)"
27083 #: ../src/guestfs-actions.pod:2409
27084 msgid "guestfs_grep"
27088 #: ../src/guestfs-actions.pod:2411
27092 " guestfs_grep (guestfs_h *g,\n"
27093 " const char *regex,\n"
27094 " const char *path);\n"
27099 #: ../src/guestfs-actions.pod:2428
27100 msgid "guestfs_grepi"
27104 #: ../src/guestfs-actions.pod:2430
27108 " guestfs_grepi (guestfs_h *g,\n"
27109 " const char *regex,\n"
27110 " const char *path);\n"
27115 #: ../src/guestfs-actions.pod:2447
27116 msgid "guestfs_grub_install"
27120 #: ../src/guestfs-actions.pod:2449
27124 " guestfs_grub_install (guestfs_h *g,\n"
27125 " const char *root,\n"
27126 " const char *device);\n"
27131 #: ../src/guestfs-actions.pod:2492
27132 msgid "(Added in 1.0.17)"
27136 #: ../src/guestfs-actions.pod:2494
27137 msgid "guestfs_head"
27141 #: ../src/guestfs-actions.pod:2496
27145 " guestfs_head (guestfs_h *g,\n"
27146 " const char *path);\n"
27151 #: ../src/guestfs-actions.pod:2512
27152 msgid "guestfs_head_n"
27156 #: ../src/guestfs-actions.pod:2514
27160 " guestfs_head_n (guestfs_h *g,\n"
27162 " const char *path);\n"
27167 #: ../src/guestfs-actions.pod:2536
27168 msgid "guestfs_hexdump"
27172 #: ../src/guestfs-actions.pod:2538
27176 " guestfs_hexdump (guestfs_h *g,\n"
27177 " const char *path);\n"
27182 #: ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:6947
27183 #: ../src/guestfs-actions.pod:7002
27184 msgid "(Added in 1.0.22)"
27188 #: ../src/guestfs-actions.pod:2553
27189 msgid "guestfs_initrd_cat"
27193 #: ../src/guestfs-actions.pod:2555
27197 " guestfs_initrd_cat (guestfs_h *g,\n"
27198 " const char *initrdpath,\n"
27199 " const char *filename,\n"
27200 " size_t *size_r);\n"
27205 #: ../src/guestfs-actions.pod:2571
27206 msgid "See also C<guestfs_initrd_list>."
27210 #: ../src/guestfs-actions.pod:2582
27211 msgid "guestfs_initrd_list"
27215 #: ../src/guestfs-actions.pod:2584
27219 " guestfs_initrd_list (guestfs_h *g,\n"
27220 " const char *path);\n"
27225 #: ../src/guestfs-actions.pod:2604
27226 msgid "guestfs_inotify_add_watch"
27230 #: ../src/guestfs-actions.pod:2606
27234 " guestfs_inotify_add_watch (guestfs_h *g,\n"
27235 " const char *path,\n"
27241 #: ../src/guestfs-actions.pod:2625
27242 msgid "guestfs_inotify_close"
27246 #: ../src/guestfs-actions.pod:2627
27250 " guestfs_inotify_close (guestfs_h *g);\n"
27255 #: ../src/guestfs-actions.pod:2638
27256 msgid "guestfs_inotify_files"
27260 #: ../src/guestfs-actions.pod:2640
27264 " guestfs_inotify_files (guestfs_h *g);\n"
27269 #: ../src/guestfs-actions.pod:2643
27271 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
27272 "returns a list of pathnames of objects that were touched. The returned "
27273 "pathnames are sorted and deduplicated."
27277 #: ../src/guestfs-actions.pod:2653
27278 msgid "guestfs_inotify_init"
27282 #: ../src/guestfs-actions.pod:2655
27286 " guestfs_inotify_init (guestfs_h *g,\n"
27287 " int maxevents);\n"
27292 #: ../src/guestfs-actions.pod:2663
27294 "C<maxevents> is the maximum number of events which will be queued up between "
27295 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
27296 "passed as C<0>, then the kernel (or previously set) default is used. For "
27297 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
27298 "throws away events, but records the fact that it threw them away by setting "
27299 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
27300 "C<guestfs_inotify_read>)."
27304 #: ../src/guestfs-actions.pod:2673
27306 "Before any events are generated, you have to add some watches to the "
27307 "internal watch list. See: C<guestfs_inotify_add_watch>, "
27308 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
27312 #: ../src/guestfs-actions.pod:2679
27314 "Queued up events should be read periodically by calling "
27315 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
27316 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
27317 "often enough then you risk the internal queue overflowing."
27321 #: ../src/guestfs-actions.pod:2686
27323 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
27324 "This also removes any watches automatically."
27328 #: ../src/guestfs-actions.pod:2699
27329 msgid "guestfs_inotify_read"
27333 #: ../src/guestfs-actions.pod:2701
27336 " struct guestfs_inotify_event_list *\n"
27337 " guestfs_inotify_read (guestfs_h *g);\n"
27342 #: ../src/guestfs-actions.pod:2715
27344 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
27345 "there was an error. I<The caller must call "
27346 "C<guestfs_free_inotify_event_list> after use>."
27350 #: ../src/guestfs-actions.pod:2721
27351 msgid "guestfs_inotify_rm_watch"
27355 #: ../src/guestfs-actions.pod:2723
27359 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
27365 #: ../src/guestfs-actions.pod:2727
27367 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
27371 #: ../src/guestfs-actions.pod:2734
27372 msgid "guestfs_inspect_get_arch"
27376 #: ../src/guestfs-actions.pod:2736
27380 " guestfs_inspect_get_arch (guestfs_h *g,\n"
27381 " const char *root);\n"
27386 #: ../src/guestfs-actions.pod:2740
27388 "This returns the architecture of the inspected operating system. The "
27389 "possible return values are listed under C<guestfs_file_architecture>."
27393 #: ../src/guestfs-actions.pod:2754
27394 msgid "guestfs_inspect_get_distro"
27398 #: ../src/guestfs-actions.pod:2756
27402 " guestfs_inspect_get_distro (guestfs_h *g,\n"
27403 " const char *root);\n"
27408 #: ../src/guestfs-actions.pod:2856
27409 msgid "guestfs_inspect_get_drive_mappings"
27413 #: ../src/guestfs-actions.pod:2858
27417 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
27418 " const char *root);\n"
27423 #: ../src/guestfs-actions.pod:2887
27425 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27426 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
27430 #: ../src/guestfs-actions.pod:2891 ../src/guestfs-actions.pod:3159
27431 #: ../src/guestfs-actions.pod:3962 ../src/guestfs-actions.pod:5234
27432 #: ../src/guestfs-actions.pod:7304
27434 "This function returns a NULL-terminated array of strings, or NULL if there "
27435 "was an error. The array of strings will always have length C<2n+1>, where "
27436 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
27437 "caller must free the strings and the array after use>."
27441 #: ../src/guestfs-actions.pod:2897 ../src/guestfs-actions.pod:3358
27442 msgid "(Added in 1.9.17)"
27446 #: ../src/guestfs-actions.pod:2899
27447 msgid "guestfs_inspect_get_filesystems"
27451 #: ../src/guestfs-actions.pod:2901
27455 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
27456 " const char *root);\n"
27461 #: ../src/guestfs-actions.pod:2913
27463 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27464 "C<guestfs_inspect_get_mountpoints>."
27468 #: ../src/guestfs-actions.pod:2922
27469 msgid "guestfs_inspect_get_format"
27473 #: ../src/guestfs-actions.pod:2924
27477 " guestfs_inspect_get_format (guestfs_h *g,\n"
27478 " const char *root);\n"
27483 #: ../src/guestfs-actions.pod:2958 ../src/guestfs-actions.pod:3394
27484 #: ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3428
27485 #: ../src/guestfs-actions.pod:6184
27486 msgid "(Added in 1.9.4)"
27490 #: ../src/guestfs-actions.pod:2960
27491 msgid "guestfs_inspect_get_hostname"
27495 #: ../src/guestfs-actions.pod:2962
27499 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
27500 " const char *root);\n"
27505 #: ../src/guestfs-actions.pod:2977
27506 msgid "(Added in 1.7.9)"
27510 #: ../src/guestfs-actions.pod:2979
27511 msgid "guestfs_inspect_get_icon"
27515 #: ../src/guestfs-actions.pod:2981
27519 " guestfs_inspect_get_icon (guestfs_h *g,\n"
27520 " const char *root,\n"
27521 " size_t *size_r,\n"
27527 #: ../src/guestfs-actions.pod:2992
27530 " GUESTFS_INSPECT_GET_ICON_FAVICON, int favicon,\n"
27531 " GUESTFS_INSPECT_GET_ICON_HIGHQUALITY, int highquality,\n"
27536 #: ../src/guestfs-actions.pod:3059 ../src/guestfs-actions.pod:3889
27537 #: ../src/guestfs-actions.pod:5133
27538 msgid "(Added in 1.11.12)"
27542 #: ../src/guestfs-actions.pod:3061
27543 msgid "guestfs_inspect_get_icon_va"
27547 #: ../src/guestfs-actions.pod:3063
27551 " guestfs_inspect_get_icon_va (guestfs_h *g,\n"
27552 " const char *root,\n"
27553 " size_t *size_r,\n"
27554 " va_list args);\n"
27559 #: ../src/guestfs-actions.pod:3069
27560 msgid "This is the \"va_list variant\" of L</guestfs_inspect_get_icon>."
27564 #: ../src/guestfs-actions.pod:3073
27565 msgid "guestfs_inspect_get_icon_argv"
27569 #: ../src/guestfs-actions.pod:3075
27573 " guestfs_inspect_get_icon_argv (guestfs_h *g,\n"
27574 " const char *root,\n"
27575 " size_t *size_r,\n"
27576 " const struct guestfs_inspect_get_icon_argv *optargs);\n"
27581 #: ../src/guestfs-actions.pod:3081
27582 msgid "This is the \"argv variant\" of L</guestfs_inspect_get_icon>."
27586 #: ../src/guestfs-actions.pod:3085
27587 msgid "guestfs_inspect_get_major_version"
27591 #: ../src/guestfs-actions.pod:3087
27595 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
27596 " const char *root);\n"
27601 #: ../src/guestfs-actions.pod:3109
27602 msgid "guestfs_inspect_get_minor_version"
27606 #: ../src/guestfs-actions.pod:3111
27610 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
27611 " const char *root);\n"
27616 #: ../src/guestfs-actions.pod:3120
27618 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27619 "C<guestfs_inspect_get_major_version>."
27623 #: ../src/guestfs-actions.pod:3127
27624 msgid "guestfs_inspect_get_mountpoints"
27628 #: ../src/guestfs-actions.pod:3129
27632 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
27633 " const char *root);\n"
27638 #: ../src/guestfs-actions.pod:3150
27640 "For operating systems like Windows which still use drive letters, this call "
27641 "will only return an entry for the first drive \"mounted on\" C</>. For "
27642 "information about the mapping of drive letters to partitions, see "
27643 "C<guestfs_inspect_get_drive_mappings>."
27647 #: ../src/guestfs-actions.pod:3156
27649 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27650 "C<guestfs_inspect_get_filesystems>."
27654 #: ../src/guestfs-actions.pod:3167
27655 msgid "guestfs_inspect_get_package_format"
27659 #: ../src/guestfs-actions.pod:3169
27663 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
27664 " const char *root);\n"
27669 #: ../src/guestfs-actions.pod:3173
27671 "This function and C<guestfs_inspect_get_package_management> return the "
27672 "package format and package management tool used by the inspected operating "
27673 "system. For example for Fedora these functions would return C<rpm> (package "
27674 "format) and C<yum> (package management)."
27678 #: ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3220
27679 msgid "(Added in 1.7.5)"
27683 #: ../src/guestfs-actions.pod:3194
27684 msgid "guestfs_inspect_get_package_management"
27688 #: ../src/guestfs-actions.pod:3196
27692 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
27693 " const char *root);\n"
27698 #: ../src/guestfs-actions.pod:3200
27700 "C<guestfs_inspect_get_package_format> and this function return the package "
27701 "format and package management tool used by the inspected operating system. "
27702 "For example for Fedora these functions would return C<rpm> (package format) "
27703 "and C<yum> (package management)."
27707 #: ../src/guestfs-actions.pod:3222
27708 msgid "guestfs_inspect_get_product_name"
27712 #: ../src/guestfs-actions.pod:3224
27716 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
27717 " const char *root);\n"
27722 #: ../src/guestfs-actions.pod:3243
27723 msgid "guestfs_inspect_get_product_variant"
27727 #: ../src/guestfs-actions.pod:3245
27731 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
27732 " const char *root);\n"
27737 #: ../src/guestfs-actions.pod:3268
27739 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
27740 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
27744 #: ../src/guestfs-actions.pod:3275
27745 msgid "(Added in 1.9.13)"
27749 #: ../src/guestfs-actions.pod:3277
27750 msgid "guestfs_inspect_get_roots"
27754 #: ../src/guestfs-actions.pod:3279
27758 " guestfs_inspect_get_roots (guestfs_h *g);\n"
27763 #: ../src/guestfs-actions.pod:3282
27765 "This function is a convenient way to get the list of root devices, as "
27766 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
27767 "the whole inspection process."
27771 #: ../src/guestfs-actions.pod:3286
27773 "This returns an empty list if either no root devices were found or the "
27774 "caller has not called C<guestfs_inspect_os>."
27778 #: ../src/guestfs-actions.pod:3295
27779 msgid "(Added in 1.7.3)"
27783 #: ../src/guestfs-actions.pod:3297
27784 msgid "guestfs_inspect_get_type"
27788 #: ../src/guestfs-actions.pod:3299
27792 " guestfs_inspect_get_type (guestfs_h *g,\n"
27793 " const char *root);\n"
27798 #: ../src/guestfs-actions.pod:3340
27799 msgid "guestfs_inspect_get_windows_current_control_set"
27803 #: ../src/guestfs-actions.pod:3342
27807 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
27808 " const char *root);\n"
27813 #: ../src/guestfs-actions.pod:3360
27814 msgid "guestfs_inspect_get_windows_systemroot"
27818 #: ../src/guestfs-actions.pod:3362
27822 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
27823 " const char *root);\n"
27828 #: ../src/guestfs-actions.pod:3378
27829 msgid "(Added in 1.5.25)"
27833 #: ../src/guestfs-actions.pod:3380
27834 msgid "guestfs_inspect_is_live"
27838 #: ../src/guestfs-actions.pod:3382
27842 " guestfs_inspect_is_live (guestfs_h *g,\n"
27843 " const char *root);\n"
27848 #: ../src/guestfs-actions.pod:3386
27850 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
27851 "disk), then this returns true if a live image was detected on the disk."
27855 #: ../src/guestfs-actions.pod:3396
27856 msgid "guestfs_inspect_is_multipart"
27860 #: ../src/guestfs-actions.pod:3398
27864 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
27865 " const char *root);\n"
27870 #: ../src/guestfs-actions.pod:3402
27872 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
27873 "disk), then this returns true if the disk is part of a set."
27877 #: ../src/guestfs-actions.pod:3412
27878 msgid "guestfs_inspect_is_netinst"
27882 #: ../src/guestfs-actions.pod:3414
27886 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
27887 " const char *root);\n"
27892 #: ../src/guestfs-actions.pod:3418
27894 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
27895 "disk), then this returns true if the disk is a network installer, ie. not a "
27896 "self-contained install CD but one which is likely to require network access "
27897 "to complete the install."
27901 #: ../src/guestfs-actions.pod:3430
27902 msgid "guestfs_inspect_list_applications"
27906 #: ../src/guestfs-actions.pod:3432
27909 " struct guestfs_application_list *\n"
27910 " guestfs_inspect_list_applications (guestfs_h *g,\n"
27911 " const char *root);\n"
27916 #: ../src/guestfs-actions.pod:3438
27918 "I<Note:> This call works differently from other parts of the inspection "
27919 "API. You have to call C<guestfs_inspect_os>, then "
27920 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
27921 "this. Listing applications is a significantly more difficult operation "
27922 "which requires access to the full filesystem. Also note that unlike the "
27923 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
27924 "the libguestfs handle, this call actually reads parts of the mounted "
27925 "filesystems during the call."
27929 #: ../src/guestfs-actions.pod:3528
27931 "This function returns a C<struct guestfs_application_list *>, or NULL if "
27932 "there was an error. I<The caller must call C<guestfs_free_application_list> "
27937 #: ../src/guestfs-actions.pod:3532
27938 msgid "(Added in 1.7.8)"
27942 #: ../src/guestfs-actions.pod:3534
27943 msgid "guestfs_inspect_os"
27947 #: ../src/guestfs-actions.pod:3536
27951 " guestfs_inspect_os (guestfs_h *g);\n"
27956 #: ../src/guestfs-actions.pod:3552
27958 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
27959 "functions in order to query further information about each operating system, "
27960 "such as the name and version."
27964 #: ../src/guestfs-actions.pod:3557
27966 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
27967 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
27968 "the contents. This should be called with no disks currently mounted. The "
27969 "function may also use Augeas, so any existing Augeas handle will be closed."
27973 #: ../src/guestfs-actions.pod:3569 ../src/guestfs-actions.pod:3900
27974 #: ../src/guestfs-actions.pod:3982
27975 msgid "See also C<guestfs_list_filesystems>."
27979 #: ../src/guestfs-actions.pod:3577
27980 msgid "guestfs_is_blockdev"
27984 #: ../src/guestfs-actions.pod:3579
27988 " guestfs_is_blockdev (guestfs_h *g,\n"
27989 " const char *path);\n"
27994 #: ../src/guestfs-actions.pod:3586 ../src/guestfs-actions.pod:3615
27995 #: ../src/guestfs-actions.pod:3645 ../src/guestfs-actions.pod:3660
27996 #: ../src/guestfs-actions.pod:3676 ../src/guestfs-actions.pod:3732
27997 #: ../src/guestfs-actions.pod:3747
27998 msgid "See also C<guestfs_stat>."
28002 #: ../src/guestfs-actions.pod:3590 ../src/guestfs-actions.pod:3619
28003 #: ../src/guestfs-actions.pod:3664 ../src/guestfs-actions.pod:3736
28004 #: ../src/guestfs-actions.pod:3751
28005 msgid "(Added in 1.5.10)"
28009 #: ../src/guestfs-actions.pod:3592
28010 msgid "guestfs_is_busy"
28014 #: ../src/guestfs-actions.pod:3594
28018 " guestfs_is_busy (guestfs_h *g);\n"
28023 #: ../src/guestfs-actions.pod:3606
28024 msgid "guestfs_is_chardev"
28028 #: ../src/guestfs-actions.pod:3608
28032 " guestfs_is_chardev (guestfs_h *g,\n"
28033 " const char *path);\n"
28038 #: ../src/guestfs-actions.pod:3621
28039 msgid "guestfs_is_config"
28043 #: ../src/guestfs-actions.pod:3623
28047 " guestfs_is_config (guestfs_h *g);\n"
28052 #: ../src/guestfs-actions.pod:3635
28053 msgid "guestfs_is_dir"
28057 #: ../src/guestfs-actions.pod:3637
28061 " guestfs_is_dir (guestfs_h *g,\n"
28062 " const char *path);\n"
28067 #: ../src/guestfs-actions.pod:3651
28068 msgid "guestfs_is_fifo"
28072 #: ../src/guestfs-actions.pod:3653
28076 " guestfs_is_fifo (guestfs_h *g,\n"
28077 " const char *path);\n"
28082 #: ../src/guestfs-actions.pod:3666
28083 msgid "guestfs_is_file"
28087 #: ../src/guestfs-actions.pod:3668
28091 " guestfs_is_file (guestfs_h *g,\n"
28092 " const char *path);\n"
28097 #: ../src/guestfs-actions.pod:3682
28098 msgid "guestfs_is_launching"
28102 #: ../src/guestfs-actions.pod:3684
28106 " guestfs_is_launching (guestfs_h *g);\n"
28111 #: ../src/guestfs-actions.pod:3696
28112 msgid "guestfs_is_lv"
28116 #: ../src/guestfs-actions.pod:3698
28120 " guestfs_is_lv (guestfs_h *g,\n"
28121 " const char *device);\n"
28126 #: ../src/guestfs-actions.pod:3709
28127 msgid "guestfs_is_ready"
28131 #: ../src/guestfs-actions.pod:3711
28135 " guestfs_is_ready (guestfs_h *g);\n"
28140 #: ../src/guestfs-actions.pod:3723
28141 msgid "guestfs_is_socket"
28145 #: ../src/guestfs-actions.pod:3725
28149 " guestfs_is_socket (guestfs_h *g,\n"
28150 " const char *path);\n"
28155 #: ../src/guestfs-actions.pod:3738
28156 msgid "guestfs_is_symlink"
28160 #: ../src/guestfs-actions.pod:3740
28164 " guestfs_is_symlink (guestfs_h *g,\n"
28165 " const char *path);\n"
28170 #: ../src/guestfs-actions.pod:3753
28171 msgid "guestfs_is_zero"
28175 #: ../src/guestfs-actions.pod:3755
28179 " guestfs_is_zero (guestfs_h *g,\n"
28180 " const char *path);\n"
28185 #: ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:3778
28186 msgid "(Added in 1.11.8)"
28190 #: ../src/guestfs-actions.pod:3766
28191 msgid "guestfs_is_zero_device"
28195 #: ../src/guestfs-actions.pod:3768
28199 " guestfs_is_zero_device (guestfs_h *g,\n"
28200 " const char *device);\n"
28205 #: ../src/guestfs-actions.pod:3780
28206 msgid "guestfs_kill_subprocess"
28210 #: ../src/guestfs-actions.pod:3782
28214 " guestfs_kill_subprocess (guestfs_h *g);\n"
28219 #: ../src/guestfs-actions.pod:3791
28220 msgid "guestfs_launch"
28224 #: ../src/guestfs-actions.pod:3793
28228 " guestfs_launch (guestfs_h *g);\n"
28233 #: ../src/guestfs-actions.pod:3811
28234 msgid "guestfs_lchown"
28238 #: ../src/guestfs-actions.pod:3813
28242 " guestfs_lchown (guestfs_h *g,\n"
28245 " const char *path);\n"
28250 #: ../src/guestfs-actions.pod:3819
28252 "Change the file owner to C<owner> and group to C<group>. This is like "
28253 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
28254 "changed, not the target."
28258 #: ../src/guestfs-actions.pod:3831
28259 msgid "guestfs_lgetxattr"
28263 #: ../src/guestfs-actions.pod:3833
28267 " guestfs_lgetxattr (guestfs_h *g,\n"
28268 " const char *path,\n"
28269 " const char *name,\n"
28270 " size_t *size_r);\n"
28275 #: ../src/guestfs-actions.pod:3853
28276 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
28280 #: ../src/guestfs-actions.pod:3861
28281 msgid "guestfs_lgetxattrs"
28285 #: ../src/guestfs-actions.pod:3863
28288 " struct guestfs_xattr_list *\n"
28289 " guestfs_lgetxattrs (guestfs_h *g,\n"
28290 " const char *path);\n"
28295 #: ../src/guestfs-actions.pod:3867
28297 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
28298 "then it returns the extended attributes of the link itself."
28302 #: ../src/guestfs-actions.pod:3877
28303 msgid "guestfs_list_9p"
28307 #: ../src/guestfs-actions.pod:3879
28311 " guestfs_list_9p (guestfs_h *g);\n"
28316 #: ../src/guestfs-actions.pod:3891
28317 msgid "guestfs_list_devices"
28321 #: ../src/guestfs-actions.pod:3893
28325 " guestfs_list_devices (guestfs_h *g);\n"
28330 #: ../src/guestfs-actions.pod:3908
28331 msgid "guestfs_list_dm_devices"
28335 #: ../src/guestfs-actions.pod:3910
28339 " guestfs_list_dm_devices (guestfs_h *g);\n"
28344 #: ../src/guestfs-actions.pod:3915
28346 "The returned list contains C</dev/mapper/*> devices, eg. ones created by a "
28347 "previous call to C<guestfs_luks_open>."
28351 #: ../src/guestfs-actions.pod:3918
28353 "Device mapper devices which correspond to logical volumes are I<not> "
28354 "returned in this list. Call C<guestfs_lvs> if you want to list logical "
28359 #: ../src/guestfs-actions.pod:3926 ../src/guestfs-actions.pod:5372
28360 msgid "(Added in 1.11.15)"
28364 #: ../src/guestfs-actions.pod:3928
28365 msgid "guestfs_list_filesystems"
28369 #: ../src/guestfs-actions.pod:3930
28373 " guestfs_list_filesystems (guestfs_h *g);\n"
28378 #: ../src/guestfs-actions.pod:3950
28380 "This command runs other libguestfs commands, which might include "
28381 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
28382 "soon after launch and only when nothing is mounted."
28386 #: ../src/guestfs-actions.pod:3954
28388 "Not all of the filesystems returned will be mountable. In particular, swap "
28389 "partitions are returned in the list. Also this command does not check that "
28390 "each filesystem found is valid and mountable, and some filesystems might be "
28391 "mountable but require special options. Filesystems may not all belong to a "
28392 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
28396 #: ../src/guestfs-actions.pod:3968 ../src/guestfs-actions.pod:5733
28397 msgid "(Added in 1.5.15)"
28401 #: ../src/guestfs-actions.pod:3970
28402 msgid "guestfs_list_partitions"
28406 #: ../src/guestfs-actions.pod:3972
28410 " guestfs_list_partitions (guestfs_h *g);\n"
28415 #: ../src/guestfs-actions.pod:3979
28417 "This does not return logical volumes. For that you will need to call "
28422 #: ../src/guestfs-actions.pod:3990
28427 #: ../src/guestfs-actions.pod:3992
28431 " guestfs_ll (guestfs_h *g,\n"
28432 " const char *directory);\n"
28437 #: ../src/guestfs-actions.pod:4007
28442 #: ../src/guestfs-actions.pod:4009
28446 " guestfs_ln (guestfs_h *g,\n"
28447 " const char *target,\n"
28448 " const char *linkname);\n"
28453 #: ../src/guestfs-actions.pod:4020
28454 msgid "guestfs_ln_f"
28458 #: ../src/guestfs-actions.pod:4022
28462 " guestfs_ln_f (guestfs_h *g,\n"
28463 " const char *target,\n"
28464 " const char *linkname);\n"
28469 #: ../src/guestfs-actions.pod:4034
28470 msgid "guestfs_ln_s"
28474 #: ../src/guestfs-actions.pod:4036
28478 " guestfs_ln_s (guestfs_h *g,\n"
28479 " const char *target,\n"
28480 " const char *linkname);\n"
28485 #: ../src/guestfs-actions.pod:4047
28486 msgid "guestfs_ln_sf"
28490 #: ../src/guestfs-actions.pod:4049
28494 " guestfs_ln_sf (guestfs_h *g,\n"
28495 " const char *target,\n"
28496 " const char *linkname);\n"
28501 #: ../src/guestfs-actions.pod:4061
28502 msgid "guestfs_lremovexattr"
28506 #: ../src/guestfs-actions.pod:4063
28510 " guestfs_lremovexattr (guestfs_h *g,\n"
28511 " const char *xattr,\n"
28512 " const char *path);\n"
28517 #: ../src/guestfs-actions.pod:4068
28519 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
28520 "link, then it removes an extended attribute of the link itself."
28524 #: ../src/guestfs-actions.pod:4076
28529 #: ../src/guestfs-actions.pod:4078
28533 " guestfs_ls (guestfs_h *g,\n"
28534 " const char *directory);\n"
28539 #: ../src/guestfs-actions.pod:4086
28541 "This command is mostly useful for interactive sessions. Programs should "
28542 "probably use C<guestfs_readdir> instead."
28546 #: ../src/guestfs-actions.pod:4095
28547 msgid "guestfs_lsetxattr"
28551 #: ../src/guestfs-actions.pod:4097
28555 " guestfs_lsetxattr (guestfs_h *g,\n"
28556 " const char *xattr,\n"
28557 " const char *val,\n"
28559 " const char *path);\n"
28564 #: ../src/guestfs-actions.pod:4104
28566 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
28567 "then it sets an extended attribute of the link itself."
28571 #: ../src/guestfs-actions.pod:4112
28572 msgid "guestfs_lstat"
28576 #: ../src/guestfs-actions.pod:4114
28579 " struct guestfs_stat *\n"
28580 " guestfs_lstat (guestfs_h *g,\n"
28581 " const char *path);\n"
28586 #: ../src/guestfs-actions.pod:4120
28588 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
28589 "link, then the link is stat-ed, not the file it refers to."
28593 #: ../src/guestfs-actions.pod:4126 ../src/guestfs-actions.pod:6907
28595 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
28596 "error. I<The caller must call C<guestfs_free_stat> after use>."
28600 #: ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:6911
28601 #: ../src/guestfs-actions.pod:6929 ../src/guestfs-actions.pod:7310
28602 msgid "(Added in 0.9.2)"
28606 #: ../src/guestfs-actions.pod:4132
28607 msgid "guestfs_lstatlist"
28611 #: ../src/guestfs-actions.pod:4134
28614 " struct guestfs_stat_list *\n"
28615 " guestfs_lstatlist (guestfs_h *g,\n"
28616 " const char *path,\n"
28617 " char *const *names);\n"
28622 #: ../src/guestfs-actions.pod:4139
28624 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
28625 "files, where all files are in the directory C<path>. C<names> is the list "
28626 "of files from this directory."
28630 #: ../src/guestfs-actions.pod:4148
28632 "This call is intended for programs that want to efficiently list a directory "
28633 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
28634 "for a similarly efficient call for getting extended attributes. Very long "
28635 "directory listings might cause the protocol message size to be exceeded, "
28636 "causing this call to fail. The caller must split up such requests into "
28637 "smaller groups of names."
28641 #: ../src/guestfs-actions.pod:4156
28643 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
28644 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
28648 #: ../src/guestfs-actions.pod:4162
28649 msgid "guestfs_luks_add_key"
28653 #: ../src/guestfs-actions.pod:4164
28657 " guestfs_luks_add_key (guestfs_h *g,\n"
28658 " const char *device,\n"
28659 " const char *key,\n"
28660 " const char *newkey,\n"
28666 #: ../src/guestfs-actions.pod:4176
28668 "Note that if C<keyslot> already contains a key, then this command will "
28669 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
28673 #: ../src/guestfs-actions.pod:4182 ../src/guestfs-actions.pod:4222
28674 #: ../src/guestfs-actions.pod:4245 ../src/guestfs-actions.pod:4265
28675 #: ../src/guestfs-actions.pod:4300 ../src/guestfs-actions.pod:4319
28677 "This function takes a key or passphrase parameter which could contain "
28678 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
28683 #: ../src/guestfs-actions.pod:4186 ../src/guestfs-actions.pod:4226
28684 #: ../src/guestfs-actions.pod:4249 ../src/guestfs-actions.pod:4269
28685 msgid "(Added in 1.5.2)"
28689 #: ../src/guestfs-actions.pod:4188
28690 msgid "guestfs_luks_close"
28694 #: ../src/guestfs-actions.pod:4190
28698 " guestfs_luks_close (guestfs_h *g,\n"
28699 " const char *device);\n"
28704 #: ../src/guestfs-actions.pod:4194
28706 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
28707 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
28708 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
28709 "underlying block device."
28713 #: ../src/guestfs-actions.pod:4202 ../src/guestfs-actions.pod:4304
28714 #: ../src/guestfs-actions.pod:4323 ../src/guestfs-actions.pod:4373
28715 #: ../src/guestfs-actions.pod:4421
28716 msgid "(Added in 1.5.1)"
28720 #: ../src/guestfs-actions.pod:4204
28721 msgid "guestfs_luks_format"
28725 #: ../src/guestfs-actions.pod:4206
28729 " guestfs_luks_format (guestfs_h *g,\n"
28730 " const char *device,\n"
28731 " const char *key,\n"
28737 #: ../src/guestfs-actions.pod:4228
28738 msgid "guestfs_luks_format_cipher"
28742 #: ../src/guestfs-actions.pod:4230
28746 " guestfs_luks_format_cipher (guestfs_h *g,\n"
28747 " const char *device,\n"
28748 " const char *key,\n"
28750 " const char *cipher);\n"
28755 #: ../src/guestfs-actions.pod:4237
28757 "This command is the same as C<guestfs_luks_format> but it also allows you to "
28758 "set the C<cipher> used."
28762 #: ../src/guestfs-actions.pod:4251
28763 msgid "guestfs_luks_kill_slot"
28767 #: ../src/guestfs-actions.pod:4253
28771 " guestfs_luks_kill_slot (guestfs_h *g,\n"
28772 " const char *device,\n"
28773 " const char *key,\n"
28779 #: ../src/guestfs-actions.pod:4271
28780 msgid "guestfs_luks_open"
28784 #: ../src/guestfs-actions.pod:4273
28788 " guestfs_luks_open (guestfs_h *g,\n"
28789 " const char *device,\n"
28790 " const char *key,\n"
28791 " const char *mapname);\n"
28796 #: ../src/guestfs-actions.pod:4291
28798 "If this block device contains LVM volume groups, then calling "
28799 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
28804 #: ../src/guestfs-actions.pod:4295
28805 msgid "Use C<guestfs_list_dm_devices> to list all device mapper devices."
28809 #: ../src/guestfs-actions.pod:4306
28810 msgid "guestfs_luks_open_ro"
28814 #: ../src/guestfs-actions.pod:4308
28818 " guestfs_luks_open_ro (guestfs_h *g,\n"
28819 " const char *device,\n"
28820 " const char *key,\n"
28821 " const char *mapname);\n"
28826 #: ../src/guestfs-actions.pod:4314
28828 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
28833 #: ../src/guestfs-actions.pod:4325
28834 msgid "guestfs_lvcreate"
28838 #: ../src/guestfs-actions.pod:4327
28842 " guestfs_lvcreate (guestfs_h *g,\n"
28843 " const char *logvol,\n"
28844 " const char *volgroup,\n"
28850 #: ../src/guestfs-actions.pod:4340
28851 msgid "guestfs_lvm_canonical_lv_name"
28855 #: ../src/guestfs-actions.pod:4342
28859 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
28860 " const char *lvname);\n"
28865 #: ../src/guestfs-actions.pod:4353
28866 msgid "See also C<guestfs_is_lv>."
28870 #: ../src/guestfs-actions.pod:4358
28871 msgid "(Added in 1.5.24)"
28875 #: ../src/guestfs-actions.pod:4360
28876 msgid "guestfs_lvm_clear_filter"
28880 #: ../src/guestfs-actions.pod:4362
28884 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
28889 #: ../src/guestfs-actions.pod:4365
28891 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
28892 "see every block device."
28896 #: ../src/guestfs-actions.pod:4375
28897 msgid "guestfs_lvm_remove_all"
28901 #: ../src/guestfs-actions.pod:4377
28905 " guestfs_lvm_remove_all (guestfs_h *g);\n"
28910 #: ../src/guestfs-actions.pod:4390
28911 msgid "guestfs_lvm_set_filter"
28915 #: ../src/guestfs-actions.pod:4392
28919 " guestfs_lvm_set_filter (guestfs_h *g,\n"
28920 " char *const *devices);\n"
28925 #: ../src/guestfs-actions.pod:4423
28926 msgid "guestfs_lvremove"
28930 #: ../src/guestfs-actions.pod:4425
28934 " guestfs_lvremove (guestfs_h *g,\n"
28935 " const char *device);\n"
28940 #: ../src/guestfs-actions.pod:4437 ../src/guestfs-actions.pod:5830
28941 #: ../src/guestfs-actions.pod:7680
28942 msgid "(Added in 1.0.13)"
28946 #: ../src/guestfs-actions.pod:4439
28947 msgid "guestfs_lvrename"
28951 #: ../src/guestfs-actions.pod:4441
28955 " guestfs_lvrename (guestfs_h *g,\n"
28956 " const char *logvol,\n"
28957 " const char *newlogvol);\n"
28962 #: ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:7693
28963 msgid "(Added in 1.0.83)"
28967 #: ../src/guestfs-actions.pod:4452
28968 msgid "guestfs_lvresize"
28972 #: ../src/guestfs-actions.pod:4454
28976 " guestfs_lvresize (guestfs_h *g,\n"
28977 " const char *device,\n"
28983 #: ../src/guestfs-actions.pod:4467
28984 msgid "guestfs_lvresize_free"
28988 #: ../src/guestfs-actions.pod:4469
28992 " guestfs_lvresize_free (guestfs_h *g,\n"
28993 " const char *lv,\n"
28999 #: ../src/guestfs-actions.pod:4482
29000 msgid "(Added in 1.3.3)"
29004 #: ../src/guestfs-actions.pod:4484
29005 msgid "guestfs_lvs"
29009 #: ../src/guestfs-actions.pod:4486
29013 " guestfs_lvs (guestfs_h *g);\n"
29018 #: ../src/guestfs-actions.pod:4495
29019 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
29023 #: ../src/guestfs-actions.pod:4503
29024 msgid "guestfs_lvs_full"
29028 #: ../src/guestfs-actions.pod:4505
29031 " struct guestfs_lvm_lv_list *\n"
29032 " guestfs_lvs_full (guestfs_h *g);\n"
29037 #: ../src/guestfs-actions.pod:4511
29039 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
29040 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
29044 #: ../src/guestfs-actions.pod:4517
29045 msgid "guestfs_lvuuid"
29049 #: ../src/guestfs-actions.pod:4519
29053 " guestfs_lvuuid (guestfs_h *g,\n"
29054 " const char *device);\n"
29059 #: ../src/guestfs-actions.pod:4530
29060 msgid "guestfs_lxattrlist"
29064 #: ../src/guestfs-actions.pod:4532
29067 " struct guestfs_xattr_list *\n"
29068 " guestfs_lxattrlist (guestfs_h *g,\n"
29069 " const char *path,\n"
29070 " char *const *names);\n"
29075 #: ../src/guestfs-actions.pod:4551
29077 "This call is intended for programs that want to efficiently list a directory "
29078 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
29079 "a similarly efficient call for getting standard stats. Very long directory "
29080 "listings might cause the protocol message size to be exceeded, causing this "
29081 "call to fail. The caller must split up such requests into smaller groups of "
29086 #: ../src/guestfs-actions.pod:4565
29087 msgid "guestfs_mkdir"
29091 #: ../src/guestfs-actions.pod:4567
29095 " guestfs_mkdir (guestfs_h *g,\n"
29096 " const char *path);\n"
29101 #: ../src/guestfs-actions.pod:4577
29102 msgid "guestfs_mkdir_mode"
29106 #: ../src/guestfs-actions.pod:4579
29110 " guestfs_mkdir_mode (guestfs_h *g,\n"
29111 " const char *path,\n"
29117 #: ../src/guestfs-actions.pod:4591
29118 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
29122 #: ../src/guestfs-actions.pod:4597
29123 msgid "guestfs_mkdir_p"
29127 #: ../src/guestfs-actions.pod:4599
29131 " guestfs_mkdir_p (guestfs_h *g,\n"
29132 " const char *path);\n"
29137 #: ../src/guestfs-actions.pod:4610
29138 msgid "guestfs_mkdtemp"
29142 #: ../src/guestfs-actions.pod:4612
29146 " guestfs_mkdtemp (guestfs_h *g,\n"
29147 " const char *template);\n"
29152 #: ../src/guestfs-actions.pod:4640
29153 msgid "guestfs_mke2fs_J"
29157 #: ../src/guestfs-actions.pod:4642
29161 " guestfs_mke2fs_J (guestfs_h *g,\n"
29162 " const char *fstype,\n"
29163 " int blocksize,\n"
29164 " const char *device,\n"
29165 " const char *journal);\n"
29170 #: ../src/guestfs-actions.pod:4655
29171 msgid "See also C<guestfs_mke2journal>."
29175 #: ../src/guestfs-actions.pod:4659 ../src/guestfs-actions.pod:4677
29176 #: ../src/guestfs-actions.pod:4695 ../src/guestfs-actions.pod:4711
29177 #: ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:4739
29178 #: ../src/guestfs-actions.pod:4798 ../src/guestfs-actions.pod:5075
29179 msgid "(Added in 1.0.68)"
29183 #: ../src/guestfs-actions.pod:4661
29184 msgid "guestfs_mke2fs_JL"
29188 #: ../src/guestfs-actions.pod:4663
29192 " guestfs_mke2fs_JL (guestfs_h *g,\n"
29193 " const char *fstype,\n"
29194 " int blocksize,\n"
29195 " const char *device,\n"
29196 " const char *label);\n"
29201 #: ../src/guestfs-actions.pod:4673
29202 msgid "See also C<guestfs_mke2journal_L>."
29206 #: ../src/guestfs-actions.pod:4679
29207 msgid "guestfs_mke2fs_JU"
29211 #: ../src/guestfs-actions.pod:4681
29215 " guestfs_mke2fs_JU (guestfs_h *g,\n"
29216 " const char *fstype,\n"
29217 " int blocksize,\n"
29218 " const char *device,\n"
29219 " const char *uuid);\n"
29224 #: ../src/guestfs-actions.pod:4691
29225 msgid "See also C<guestfs_mke2journal_U>."
29229 #: ../src/guestfs-actions.pod:4697
29230 msgid "guestfs_mke2journal"
29234 #: ../src/guestfs-actions.pod:4699
29238 " guestfs_mke2journal (guestfs_h *g,\n"
29239 " int blocksize,\n"
29240 " const char *device);\n"
29245 #: ../src/guestfs-actions.pod:4713
29246 msgid "guestfs_mke2journal_L"
29250 #: ../src/guestfs-actions.pod:4715
29254 " guestfs_mke2journal_L (guestfs_h *g,\n"
29255 " int blocksize,\n"
29256 " const char *label,\n"
29257 " const char *device);\n"
29262 #: ../src/guestfs-actions.pod:4727
29263 msgid "guestfs_mke2journal_U"
29267 #: ../src/guestfs-actions.pod:4729
29271 " guestfs_mke2journal_U (guestfs_h *g,\n"
29272 " int blocksize,\n"
29273 " const char *uuid,\n"
29274 " const char *device);\n"
29279 #: ../src/guestfs-actions.pod:4741
29280 msgid "guestfs_mkfifo"
29284 #: ../src/guestfs-actions.pod:4743
29288 " guestfs_mkfifo (guestfs_h *g,\n"
29290 " const char *path);\n"
29295 #: ../src/guestfs-actions.pod:4748
29297 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
29298 "is just a convenient wrapper around C<guestfs_mknod>."
29302 #: ../src/guestfs-actions.pod:4758
29303 msgid "guestfs_mkfs"
29307 #: ../src/guestfs-actions.pod:4760
29311 " guestfs_mkfs (guestfs_h *g,\n"
29312 " const char *fstype,\n"
29313 " const char *device);\n"
29318 #: ../src/guestfs-actions.pod:4773
29319 msgid "guestfs_mkfs_b"
29323 #: ../src/guestfs-actions.pod:4775
29327 " guestfs_mkfs_b (guestfs_h *g,\n"
29328 " const char *fstype,\n"
29329 " int blocksize,\n"
29330 " const char *device);\n"
29335 #: ../src/guestfs-actions.pod:4781
29337 "I<This function is deprecated.> In new code, use the L</guestfs_mkfs_opts> "
29342 #: ../src/guestfs-actions.pod:4788
29344 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
29345 "block size of the resulting filesystem. Supported block sizes depend on the "
29346 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
29350 #: ../src/guestfs-actions.pod:4800
29351 msgid "guestfs_mkfs_opts"
29355 #: ../src/guestfs-actions.pod:4802
29359 " guestfs_mkfs_opts (guestfs_h *g,\n"
29360 " const char *fstype,\n"
29361 " const char *device,\n"
29367 #: ../src/guestfs-actions.pod:4813
29370 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
29371 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
29372 " GUESTFS_MKFS_OPTS_INODE, int inode,\n"
29373 " GUESTFS_MKFS_OPTS_SECTORSIZE, int sectorsize,\n"
29378 #: ../src/guestfs-actions.pod:4861
29379 msgid "(Added in 1.7.19)"
29383 #: ../src/guestfs-actions.pod:4863
29384 msgid "guestfs_mkfs_opts_va"
29388 #: ../src/guestfs-actions.pod:4865
29392 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
29393 " const char *fstype,\n"
29394 " const char *device,\n"
29395 " va_list args);\n"
29400 #: ../src/guestfs-actions.pod:4871
29401 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
29405 #: ../src/guestfs-actions.pod:4875
29406 msgid "guestfs_mkfs_opts_argv"
29410 #: ../src/guestfs-actions.pod:4877
29414 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
29415 " const char *fstype,\n"
29416 " const char *device,\n"
29417 " const struct guestfs_mkfs_opts_argv *optargs);\n"
29422 #: ../src/guestfs-actions.pod:4883
29423 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
29427 #: ../src/guestfs-actions.pod:4887
29428 msgid "guestfs_mkmountpoint"
29432 #: ../src/guestfs-actions.pod:4889
29436 " guestfs_mkmountpoint (guestfs_h *g,\n"
29437 " const char *exemptpath);\n"
29442 #: ../src/guestfs-actions.pod:4893
29444 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
29445 "that can be used to create extra mountpoints before mounting the first "
29450 #: ../src/guestfs-actions.pod:4917
29452 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
29453 "may get unexpected errors if you try to mix these calls. It is safest to "
29454 "manually unmount filesystems and remove mountpoints after use."
29458 #: ../src/guestfs-actions.pod:4921
29460 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
29461 "first, so for this to work for manual mountpoints, you must ensure that the "
29462 "innermost mountpoints have the longest pathnames, as in the example code "
29467 #: ../src/guestfs-actions.pod:4928
29469 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
29470 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
29471 "can also trigger these issues."
29475 #: ../src/guestfs-actions.pod:4934 ../src/guestfs-actions.pod:5240
29476 #: ../src/guestfs-actions.pod:6250
29477 msgid "(Added in 1.0.62)"
29481 #: ../src/guestfs-actions.pod:4936
29482 msgid "guestfs_mknod"
29486 #: ../src/guestfs-actions.pod:4938
29490 " guestfs_mknod (guestfs_h *g,\n"
29494 " const char *path);\n"
29499 #: ../src/guestfs-actions.pod:4953
29501 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
29502 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
29503 "regular file). These constants are available in the standard Linux header "
29504 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
29505 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
29506 "the appropriate constant for you."
29510 #: ../src/guestfs-actions.pod:4967
29511 msgid "guestfs_mknod_b"
29515 #: ../src/guestfs-actions.pod:4969
29519 " guestfs_mknod_b (guestfs_h *g,\n"
29523 " const char *path);\n"
29528 #: ../src/guestfs-actions.pod:4976
29530 "This call creates a block device node called C<path> with mode C<mode> and "
29531 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29532 "wrapper around C<guestfs_mknod>."
29536 #: ../src/guestfs-actions.pod:4986
29537 msgid "guestfs_mknod_c"
29541 #: ../src/guestfs-actions.pod:4988
29545 " guestfs_mknod_c (guestfs_h *g,\n"
29549 " const char *path);\n"
29554 #: ../src/guestfs-actions.pod:4995
29556 "This call creates a char device node called C<path> with mode C<mode> and "
29557 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
29558 "wrapper around C<guestfs_mknod>."
29562 #: ../src/guestfs-actions.pod:5005
29563 msgid "guestfs_mkswap"
29567 #: ../src/guestfs-actions.pod:5007
29571 " guestfs_mkswap (guestfs_h *g,\n"
29572 " const char *device);\n"
29577 #: ../src/guestfs-actions.pod:5017
29578 msgid "guestfs_mkswap_L"
29582 #: ../src/guestfs-actions.pod:5019
29586 " guestfs_mkswap_L (guestfs_h *g,\n"
29587 " const char *label,\n"
29588 " const char *device);\n"
29593 #: ../src/guestfs-actions.pod:5034
29594 msgid "guestfs_mkswap_U"
29598 #: ../src/guestfs-actions.pod:5036
29602 " guestfs_mkswap_U (guestfs_h *g,\n"
29603 " const char *uuid,\n"
29604 " const char *device);\n"
29609 #: ../src/guestfs-actions.pod:5047
29610 msgid "guestfs_mkswap_file"
29614 #: ../src/guestfs-actions.pod:5049
29618 " guestfs_mkswap_file (guestfs_h *g,\n"
29619 " const char *path);\n"
29624 #: ../src/guestfs-actions.pod:5055
29626 "This command just writes a swap file signature to an existing file. To "
29627 "create the file itself, use something like C<guestfs_fallocate>."
29631 #: ../src/guestfs-actions.pod:5062
29632 msgid "guestfs_modprobe"
29636 #: ../src/guestfs-actions.pod:5064
29640 " guestfs_modprobe (guestfs_h *g,\n"
29641 " const char *modulename);\n"
29646 #: ../src/guestfs-actions.pod:5077
29647 msgid "guestfs_mount"
29651 #: ../src/guestfs-actions.pod:5079
29655 " guestfs_mount (guestfs_h *g,\n"
29656 " const char *device,\n"
29657 " const char *mountpoint);\n"
29662 #: ../src/guestfs-actions.pod:5098
29664 "Before libguestfs 1.13.16, this call implicitly added the options C<sync> "
29665 "and C<noatime>. The C<sync> option greatly slowed writes and caused many "
29666 "problems for users. If your program might need to work with older versions "
29667 "of libguestfs, use C<guestfs_mount_options> instead (using an empty string "
29668 "for the first parameter if you don't want any options)."
29672 #: ../src/guestfs-actions.pod:5109
29673 msgid "guestfs_mount_9p"
29677 #: ../src/guestfs-actions.pod:5111
29681 " guestfs_mount_9p (guestfs_h *g,\n"
29682 " const char *mounttag,\n"
29683 " const char *mountpoint,\n"
29689 #: ../src/guestfs-actions.pod:5122
29692 " GUESTFS_MOUNT_9P_OPTIONS, const char *options,\n"
29697 #: ../src/guestfs-actions.pod:5135
29698 msgid "guestfs_mount_9p_va"
29702 #: ../src/guestfs-actions.pod:5137
29706 " guestfs_mount_9p_va (guestfs_h *g,\n"
29707 " const char *mounttag,\n"
29708 " const char *mountpoint,\n"
29709 " va_list args);\n"
29714 #: ../src/guestfs-actions.pod:5143
29715 msgid "This is the \"va_list variant\" of L</guestfs_mount_9p>."
29719 #: ../src/guestfs-actions.pod:5147
29720 msgid "guestfs_mount_9p_argv"
29724 #: ../src/guestfs-actions.pod:5149
29728 " guestfs_mount_9p_argv (guestfs_h *g,\n"
29729 " const char *mounttag,\n"
29730 " const char *mountpoint,\n"
29731 " const struct guestfs_mount_9p_argv *optargs);\n"
29736 #: ../src/guestfs-actions.pod:5155
29737 msgid "This is the \"argv variant\" of L</guestfs_mount_9p>."
29741 #: ../src/guestfs-actions.pod:5159
29742 msgid "guestfs_mount_loop"
29746 #: ../src/guestfs-actions.pod:5161
29750 " guestfs_mount_loop (guestfs_h *g,\n"
29751 " const char *file,\n"
29752 " const char *mountpoint);\n"
29757 #: ../src/guestfs-actions.pod:5174
29758 msgid "guestfs_mount_options"
29762 #: ../src/guestfs-actions.pod:5176
29766 " guestfs_mount_options (guestfs_h *g,\n"
29767 " const char *options,\n"
29768 " const char *device,\n"
29769 " const char *mountpoint);\n"
29774 #: ../src/guestfs-actions.pod:5182
29776 "This is the same as the C<guestfs_mount> command, but it allows you to set "
29777 "the mount options as for the L<mount(8)> I<-o> flag."
29781 #: ../src/guestfs-actions.pod:5192 ../src/guestfs-actions.pod:5206
29782 #: ../src/guestfs-actions.pod:5223
29783 msgid "(Added in 1.0.10)"
29787 #: ../src/guestfs-actions.pod:5194
29788 msgid "guestfs_mount_ro"
29792 #: ../src/guestfs-actions.pod:5196
29796 " guestfs_mount_ro (guestfs_h *g,\n"
29797 " const char *device,\n"
29798 " const char *mountpoint);\n"
29803 #: ../src/guestfs-actions.pod:5201
29805 "This is the same as the C<guestfs_mount> command, but it mounts the "
29806 "filesystem with the read-only (I<-o ro>) flag."
29810 #: ../src/guestfs-actions.pod:5208
29811 msgid "guestfs_mount_vfs"
29815 #: ../src/guestfs-actions.pod:5210
29819 " guestfs_mount_vfs (guestfs_h *g,\n"
29820 " const char *options,\n"
29821 " const char *vfstype,\n"
29822 " const char *device,\n"
29823 " const char *mountpoint);\n"
29828 #: ../src/guestfs-actions.pod:5217
29830 "This is the same as the C<guestfs_mount> command, but it allows you to set "
29831 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
29836 #: ../src/guestfs-actions.pod:5225
29837 msgid "guestfs_mountpoints"
29841 #: ../src/guestfs-actions.pod:5227
29845 " guestfs_mountpoints (guestfs_h *g);\n"
29850 #: ../src/guestfs-actions.pod:5230
29852 "This call is similar to C<guestfs_mounts>. That call returns a list of "
29853 "devices. This one returns a hash table (map) of device name to directory "
29854 "where the device is mounted."
29858 #: ../src/guestfs-actions.pod:5242
29859 msgid "guestfs_mounts"
29863 #: ../src/guestfs-actions.pod:5244
29867 " guestfs_mounts (guestfs_h *g);\n"
29872 #: ../src/guestfs-actions.pod:5252
29873 msgid "See also: C<guestfs_mountpoints>"
29877 #: ../src/guestfs-actions.pod:5260
29882 #: ../src/guestfs-actions.pod:5262
29886 " guestfs_mv (guestfs_h *g,\n"
29887 " const char *src,\n"
29888 " const char *dest);\n"
29893 #: ../src/guestfs-actions.pod:5274
29894 msgid "guestfs_ntfs_3g_probe"
29898 #: ../src/guestfs-actions.pod:5276
29902 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
29904 " const char *device);\n"
29909 #: ../src/guestfs-actions.pod:5295
29910 msgid "(Added in 1.0.43)"
29914 #: ../src/guestfs-actions.pod:5297
29915 msgid "guestfs_ntfsresize"
29919 #: ../src/guestfs-actions.pod:5299
29923 " guestfs_ntfsresize (guestfs_h *g,\n"
29924 " const char *device);\n"
29929 #: ../src/guestfs-actions.pod:5303 ../src/guestfs-actions.pod:5403
29931 "I<This function is deprecated.> In new code, use the L</"
29932 "guestfs_ntfsresize_opts> call instead."
29936 #: ../src/guestfs-actions.pod:5327
29937 msgid "guestfs_ntfsresize_opts"
29941 #: ../src/guestfs-actions.pod:5329
29945 " guestfs_ntfsresize_opts (guestfs_h *g,\n"
29946 " const char *device,\n"
29952 #: ../src/guestfs-actions.pod:5339
29955 " GUESTFS_NTFSRESIZE_OPTS_SIZE, int64_t size,\n"
29956 " GUESTFS_NTFSRESIZE_OPTS_FORCE, int force,\n"
29961 #: ../src/guestfs-actions.pod:5359
29963 "After the resize operation, the filesystem is always marked as requiring a "
29964 "consistency check (for safety). You have to boot into Windows to perform "
29965 "this check and clear this condition. If you I<don't> set the C<force> "
29966 "option then it is not possible to call C<guestfs_ntfsresize_opts> multiple "
29967 "times on a single filesystem without booting into Windows between each "
29972 #: ../src/guestfs-actions.pod:5374
29973 msgid "guestfs_ntfsresize_opts_va"
29977 #: ../src/guestfs-actions.pod:5376
29981 " guestfs_ntfsresize_opts_va (guestfs_h *g,\n"
29982 " const char *device,\n"
29983 " va_list args);\n"
29988 #: ../src/guestfs-actions.pod:5381
29989 msgid "This is the \"va_list variant\" of L</guestfs_ntfsresize_opts>."
29993 #: ../src/guestfs-actions.pod:5385
29994 msgid "guestfs_ntfsresize_opts_argv"
29998 #: ../src/guestfs-actions.pod:5387
30002 " guestfs_ntfsresize_opts_argv (guestfs_h *g,\n"
30003 " const char *device,\n"
30004 " const struct guestfs_ntfsresize_opts_argv *optargs);\n"
30009 #: ../src/guestfs-actions.pod:5392
30010 msgid "This is the \"argv variant\" of L</guestfs_ntfsresize_opts>."
30014 #: ../src/guestfs-actions.pod:5396
30015 msgid "guestfs_ntfsresize_size"
30019 #: ../src/guestfs-actions.pod:5398
30023 " guestfs_ntfsresize_size (guestfs_h *g,\n"
30024 " const char *device,\n"
30025 " int64_t size);\n"
30030 #: ../src/guestfs-actions.pod:5410
30032 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
30033 "to specify the new size (in bytes) explicitly."
30037 #: ../src/guestfs-actions.pod:5415 ../src/guestfs-actions.pod:5857
30038 #: ../src/guestfs-actions.pod:5930 ../src/guestfs-actions.pod:6198
30039 #: ../src/guestfs-actions.pod:7837
30040 msgid "(Added in 1.3.14)"
30044 #: ../src/guestfs-actions.pod:5417
30045 msgid "guestfs_part_add"
30049 #: ../src/guestfs-actions.pod:5419
30053 " guestfs_part_add (guestfs_h *g,\n"
30054 " const char *device,\n"
30055 " const char *prlogex,\n"
30056 " int64_t startsect,\n"
30057 " int64_t endsect);\n"
30062 #: ../src/guestfs-actions.pod:5426
30064 "This command adds a partition to C<device>. If there is no partition table "
30065 "on the device, call C<guestfs_part_init> first."
30069 #: ../src/guestfs-actions.pod:5438
30071 "Creating a partition which covers the whole disk is not so easy. Use "
30072 "C<guestfs_part_disk> to do that."
30076 #: ../src/guestfs-actions.pod:5443 ../src/guestfs-actions.pod:5481
30077 #: ../src/guestfs-actions.pod:5534 ../src/guestfs-actions.pod:5618
30078 #: ../src/guestfs-actions.pod:5656 ../src/guestfs-actions.pod:5675
30079 #: ../src/guestfs-actions.pod:5715
30080 msgid "(Added in 1.0.78)"
30084 #: ../src/guestfs-actions.pod:5445
30085 msgid "guestfs_part_del"
30089 #: ../src/guestfs-actions.pod:5447
30093 " guestfs_part_del (guestfs_h *g,\n"
30094 " const char *device,\n"
30100 #: ../src/guestfs-actions.pod:5462
30101 msgid "guestfs_part_disk"
30105 #: ../src/guestfs-actions.pod:5464
30109 " guestfs_part_disk (guestfs_h *g,\n"
30110 " const char *device,\n"
30111 " const char *parttype);\n"
30116 #: ../src/guestfs-actions.pod:5469
30118 "This command is simply a combination of C<guestfs_part_init> followed by "
30119 "C<guestfs_part_add> to create a single primary partition covering the whole "
30124 #: ../src/guestfs-actions.pod:5473
30126 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
30127 "possible values are described in C<guestfs_part_init>."
30131 #: ../src/guestfs-actions.pod:5483
30132 msgid "guestfs_part_get_bootable"
30136 #: ../src/guestfs-actions.pod:5485
30140 " guestfs_part_get_bootable (guestfs_h *g,\n"
30141 " const char *device,\n"
30147 #: ../src/guestfs-actions.pod:5493
30148 msgid "See also C<guestfs_part_set_bootable>."
30152 #: ../src/guestfs-actions.pod:5499
30153 msgid "guestfs_part_get_mbr_id"
30157 #: ../src/guestfs-actions.pod:5501
30161 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
30162 " const char *device,\n"
30168 #: ../src/guestfs-actions.pod:5509 ../src/guestfs-actions.pod:5691
30170 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
30171 "undefined results for other partition table types (see "
30172 "C<guestfs_part_get_parttype>)."
30176 #: ../src/guestfs-actions.pod:5517
30177 msgid "guestfs_part_get_parttype"
30181 #: ../src/guestfs-actions.pod:5519
30185 " guestfs_part_get_parttype (guestfs_h *g,\n"
30186 " const char *device);\n"
30191 #: ../src/guestfs-actions.pod:5526
30193 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
30194 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
30195 "possible, although unusual. See C<guestfs_part_init> for a full list."
30199 #: ../src/guestfs-actions.pod:5536
30200 msgid "guestfs_part_init"
30204 #: ../src/guestfs-actions.pod:5538
30208 " guestfs_part_init (guestfs_h *g,\n"
30209 " const char *device,\n"
30210 " const char *parttype);\n"
30215 #: ../src/guestfs-actions.pod:5547
30217 "Initially there are no partitions. Following this, you should call "
30218 "C<guestfs_part_add> for each partition required."
30222 #: ../src/guestfs-actions.pod:5620
30223 msgid "guestfs_part_list"
30227 #: ../src/guestfs-actions.pod:5622
30230 " struct guestfs_partition_list *\n"
30231 " guestfs_part_list (guestfs_h *g,\n"
30232 " const char *device);\n"
30237 #: ../src/guestfs-actions.pod:5639
30239 "Start of the partition I<in bytes>. To get sectors you have to divide by "
30240 "the device's sector size, see C<guestfs_blockdev_getss>."
30244 #: ../src/guestfs-actions.pod:5652
30246 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
30247 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
30252 #: ../src/guestfs-actions.pod:5658
30253 msgid "guestfs_part_set_bootable"
30257 #: ../src/guestfs-actions.pod:5660
30261 " guestfs_part_set_bootable (guestfs_h *g,\n"
30262 " const char *device,\n"
30264 " int bootable);\n"
30269 #: ../src/guestfs-actions.pod:5677
30270 msgid "guestfs_part_set_mbr_id"
30274 #: ../src/guestfs-actions.pod:5679
30278 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
30279 " const char *device,\n"
30286 #: ../src/guestfs-actions.pod:5699
30287 msgid "guestfs_part_set_name"
30291 #: ../src/guestfs-actions.pod:5701
30295 " guestfs_part_set_name (guestfs_h *g,\n"
30296 " const char *device,\n"
30298 " const char *name);\n"
30303 #: ../src/guestfs-actions.pod:5717
30304 msgid "guestfs_part_to_dev"
30308 #: ../src/guestfs-actions.pod:5719
30312 " guestfs_part_to_dev (guestfs_h *g,\n"
30313 " const char *partition);\n"
30318 #: ../src/guestfs-actions.pod:5727
30320 "The named partition must exist, for example as a string returned from "
30321 "C<guestfs_list_partitions>."
30325 #: ../src/guestfs-actions.pod:5735
30326 msgid "guestfs_ping_daemon"
30330 #: ../src/guestfs-actions.pod:5737
30334 " guestfs_ping_daemon (guestfs_h *g);\n"
30339 #: ../src/guestfs-actions.pod:5749
30340 msgid "guestfs_pread"
30344 #: ../src/guestfs-actions.pod:5751
30348 " guestfs_pread (guestfs_h *g,\n"
30349 " const char *path,\n"
30351 " int64_t offset,\n"
30352 " size_t *size_r);\n"
30357 #: ../src/guestfs-actions.pod:5764
30358 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
30362 #: ../src/guestfs-actions.pod:5775
30363 msgid "guestfs_pread_device"
30367 #: ../src/guestfs-actions.pod:5777
30371 " guestfs_pread_device (guestfs_h *g,\n"
30372 " const char *device,\n"
30374 " int64_t offset,\n"
30375 " size_t *size_r);\n"
30380 #: ../src/guestfs-actions.pod:5790
30381 msgid "See also C<guestfs_pread>."
30385 #: ../src/guestfs-actions.pod:5799
30386 msgid "(Added in 1.5.21)"
30390 #: ../src/guestfs-actions.pod:5801
30391 msgid "guestfs_pvcreate"
30395 #: ../src/guestfs-actions.pod:5803
30399 " guestfs_pvcreate (guestfs_h *g,\n"
30400 " const char *device);\n"
30405 #: ../src/guestfs-actions.pod:5815
30406 msgid "guestfs_pvremove"
30410 #: ../src/guestfs-actions.pod:5817
30414 " guestfs_pvremove (guestfs_h *g,\n"
30415 " const char *device);\n"
30420 #: ../src/guestfs-actions.pod:5832
30421 msgid "guestfs_pvresize"
30425 #: ../src/guestfs-actions.pod:5834
30429 " guestfs_pvresize (guestfs_h *g,\n"
30430 " const char *device);\n"
30435 #: ../src/guestfs-actions.pod:5845
30436 msgid "guestfs_pvresize_size"
30440 #: ../src/guestfs-actions.pod:5847
30444 " guestfs_pvresize_size (guestfs_h *g,\n"
30445 " const char *device,\n"
30446 " int64_t size);\n"
30451 #: ../src/guestfs-actions.pod:5852
30453 "This command is the same as C<guestfs_pvresize> except that it allows you to "
30454 "specify the new size (in bytes) explicitly."
30458 #: ../src/guestfs-actions.pod:5859
30459 msgid "guestfs_pvs"
30463 #: ../src/guestfs-actions.pod:5861
30467 " guestfs_pvs (guestfs_h *g);\n"
30472 #: ../src/guestfs-actions.pod:5870
30473 msgid "See also C<guestfs_pvs_full>."
30477 #: ../src/guestfs-actions.pod:5878
30478 msgid "guestfs_pvs_full"
30482 #: ../src/guestfs-actions.pod:5880
30485 " struct guestfs_lvm_pv_list *\n"
30486 " guestfs_pvs_full (guestfs_h *g);\n"
30491 #: ../src/guestfs-actions.pod:5886
30493 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
30494 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
30498 #: ../src/guestfs-actions.pod:5892
30499 msgid "guestfs_pvuuid"
30503 #: ../src/guestfs-actions.pod:5894
30507 " guestfs_pvuuid (guestfs_h *g,\n"
30508 " const char *device);\n"
30513 #: ../src/guestfs-actions.pod:5905
30514 msgid "guestfs_pwrite"
30518 #: ../src/guestfs-actions.pod:5907
30522 " guestfs_pwrite (guestfs_h *g,\n"
30523 " const char *path,\n"
30524 " const char *content,\n"
30525 " size_t content_size,\n"
30526 " int64_t offset);\n"
30531 #: ../src/guestfs-actions.pod:5923
30532 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
30536 #: ../src/guestfs-actions.pod:5932
30537 msgid "guestfs_pwrite_device"
30541 #: ../src/guestfs-actions.pod:5934
30545 " guestfs_pwrite_device (guestfs_h *g,\n"
30546 " const char *device,\n"
30547 " const char *content,\n"
30548 " size_t content_size,\n"
30549 " int64_t offset);\n"
30554 #: ../src/guestfs-actions.pod:5949
30555 msgid "See also C<guestfs_pwrite>."
30559 #: ../src/guestfs-actions.pod:5956
30560 msgid "(Added in 1.5.20)"
30564 #: ../src/guestfs-actions.pod:5958
30565 msgid "guestfs_read_file"
30569 #: ../src/guestfs-actions.pod:5960
30573 " guestfs_read_file (guestfs_h *g,\n"
30574 " const char *path,\n"
30575 " size_t *size_r);\n"
30580 #: ../src/guestfs-actions.pod:5968
30582 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
30583 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
30584 "function is limited in the total size of file that can be handled."
30588 #: ../src/guestfs-actions.pod:5980
30589 msgid "(Added in 1.0.63)"
30593 #: ../src/guestfs-actions.pod:5982
30594 msgid "guestfs_read_lines"
30598 #: ../src/guestfs-actions.pod:5984
30602 " guestfs_read_lines (guestfs_h *g,\n"
30603 " const char *path);\n"
30608 #: ../src/guestfs-actions.pod:5993
30610 "Note that this function cannot correctly handle binary files (specifically, "
30611 "files containing C<\\0> character which is treated as end of line). For "
30612 "those you need to use the C<guestfs_read_file> function which has a more "
30613 "complex interface."
30617 #: ../src/guestfs-actions.pod:6004
30618 msgid "guestfs_readdir"
30622 #: ../src/guestfs-actions.pod:6006
30625 " struct guestfs_dirent_list *\n"
30626 " guestfs_readdir (guestfs_h *g,\n"
30627 " const char *dir);\n"
30632 #: ../src/guestfs-actions.pod:6060
30634 "This function is primarily intended for use by programs. To get a simple "
30635 "list of names, use C<guestfs_ls>. To get a printable directory for human "
30636 "consumption, use C<guestfs_ll>."
30640 #: ../src/guestfs-actions.pod:6064
30642 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
30643 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
30647 #: ../src/guestfs-actions.pod:6070
30648 msgid "guestfs_readlink"
30652 #: ../src/guestfs-actions.pod:6072
30656 " guestfs_readlink (guestfs_h *g,\n"
30657 " const char *path);\n"
30662 #: ../src/guestfs-actions.pod:6083
30663 msgid "guestfs_readlinklist"
30667 #: ../src/guestfs-actions.pod:6085
30671 " guestfs_readlinklist (guestfs_h *g,\n"
30672 " const char *path,\n"
30673 " char *const *names);\n"
30678 #: ../src/guestfs-actions.pod:6118
30679 msgid "guestfs_realpath"
30683 #: ../src/guestfs-actions.pod:6120
30687 " guestfs_realpath (guestfs_h *g,\n"
30688 " const char *path);\n"
30693 #: ../src/guestfs-actions.pod:6132
30694 msgid "guestfs_removexattr"
30698 #: ../src/guestfs-actions.pod:6134
30702 " guestfs_removexattr (guestfs_h *g,\n"
30703 " const char *xattr,\n"
30704 " const char *path);\n"
30709 #: ../src/guestfs-actions.pod:6142
30710 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
30714 #: ../src/guestfs-actions.pod:6148
30715 msgid "guestfs_resize2fs"
30719 #: ../src/guestfs-actions.pod:6150
30723 " guestfs_resize2fs (guestfs_h *g,\n"
30724 " const char *device);\n"
30729 #: ../src/guestfs-actions.pod:6157
30731 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
30732 "C<device> before calling this command. For unknown reasons C<resize2fs> "
30733 "sometimes gives an error about this and sometimes not. In any case, it is "
30734 "always safe to call C<guestfs_e2fsck_f> before calling this function."
30738 #: ../src/guestfs-actions.pod:6167
30739 msgid "guestfs_resize2fs_M"
30743 #: ../src/guestfs-actions.pod:6169
30747 " guestfs_resize2fs_M (guestfs_h *g,\n"
30748 " const char *device);\n"
30753 #: ../src/guestfs-actions.pod:6173
30755 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
30756 "resized to its minimum size. This works like the I<-M> option to the "
30757 "C<resize2fs> command."
30761 #: ../src/guestfs-actions.pod:6177
30763 "To get the resulting size of the filesystem you should call "
30764 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
30765 "These two numbers, multiplied together, give the resulting size of the "
30766 "minimal filesystem in bytes."
30770 #: ../src/guestfs-actions.pod:6186
30771 msgid "guestfs_resize2fs_size"
30775 #: ../src/guestfs-actions.pod:6188
30779 " guestfs_resize2fs_size (guestfs_h *g,\n"
30780 " const char *device,\n"
30781 " int64_t size);\n"
30786 #: ../src/guestfs-actions.pod:6193
30788 "This command is the same as C<guestfs_resize2fs> except that it allows you "
30789 "to specify the new size (in bytes) explicitly."
30793 #: ../src/guestfs-actions.pod:6200
30798 #: ../src/guestfs-actions.pod:6202
30802 " guestfs_rm (guestfs_h *g,\n"
30803 " const char *path);\n"
30808 #: ../src/guestfs-actions.pod:6212
30809 msgid "guestfs_rm_rf"
30813 #: ../src/guestfs-actions.pod:6214
30817 " guestfs_rm_rf (guestfs_h *g,\n"
30818 " const char *path);\n"
30823 #: ../src/guestfs-actions.pod:6226
30824 msgid "guestfs_rmdir"
30828 #: ../src/guestfs-actions.pod:6228
30832 " guestfs_rmdir (guestfs_h *g,\n"
30833 " const char *path);\n"
30838 #: ../src/guestfs-actions.pod:6238
30839 msgid "guestfs_rmmountpoint"
30843 #: ../src/guestfs-actions.pod:6240
30847 " guestfs_rmmountpoint (guestfs_h *g,\n"
30848 " const char *exemptpath);\n"
30853 #: ../src/guestfs-actions.pod:6244
30855 "This calls removes a mountpoint that was previously created with "
30856 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
30860 #: ../src/guestfs-actions.pod:6252
30861 msgid "guestfs_scrub_device"
30865 #: ../src/guestfs-actions.pod:6254
30869 " guestfs_scrub_device (guestfs_h *g,\n"
30870 " const char *device);\n"
30875 #: ../src/guestfs-actions.pod:6269 ../src/guestfs-actions.pod:6287
30876 #: ../src/guestfs-actions.pod:6306
30877 msgid "(Added in 1.0.52)"
30881 #: ../src/guestfs-actions.pod:6271
30882 msgid "guestfs_scrub_file"
30886 #: ../src/guestfs-actions.pod:6273
30890 " guestfs_scrub_file (guestfs_h *g,\n"
30891 " const char *file);\n"
30896 #: ../src/guestfs-actions.pod:6289
30897 msgid "guestfs_scrub_freespace"
30901 #: ../src/guestfs-actions.pod:6291
30905 " guestfs_scrub_freespace (guestfs_h *g,\n"
30906 " const char *dir);\n"
30911 #: ../src/guestfs-actions.pod:6295
30913 "This command creates the directory C<dir> and then fills it with files until "
30914 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
30915 "and deletes them. The intention is to scrub any free space on the partition "
30916 "containing C<dir>."
30920 #: ../src/guestfs-actions.pod:6308
30921 msgid "guestfs_set_append"
30925 #: ../src/guestfs-actions.pod:6310
30929 " guestfs_set_append (guestfs_h *g,\n"
30930 " const char *append);\n"
30935 #: ../src/guestfs-actions.pod:6327
30936 msgid "guestfs_set_attach_method"
30940 #: ../src/guestfs-actions.pod:6329
30944 " guestfs_set_attach_method (guestfs_h *g,\n"
30945 " const char *attachmethod);\n"
30950 #: ../src/guestfs-actions.pod:6357
30951 msgid "guestfs_set_autosync"
30955 #: ../src/guestfs-actions.pod:6359
30959 " guestfs_set_autosync (guestfs_h *g,\n"
30960 " int autosync);\n"
30965 #: ../src/guestfs-actions.pod:6375
30966 msgid "guestfs_set_direct"
30970 #: ../src/guestfs-actions.pod:6377
30974 " guestfs_set_direct (guestfs_h *g,\n"
30980 #: ../src/guestfs-actions.pod:6385
30982 "One consequence of this is that log messages aren't caught by the library "
30983 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
30988 #: ../src/guestfs-actions.pod:6398
30989 msgid "guestfs_set_e2label"
30993 #: ../src/guestfs-actions.pod:6400
30997 " guestfs_set_e2label (guestfs_h *g,\n"
30998 " const char *device,\n"
30999 " const char *label);\n"
31004 #: ../src/guestfs-actions.pod:6409
31006 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
31007 "the existing label on a filesystem."
31011 #: ../src/guestfs-actions.pod:6416
31012 msgid "guestfs_set_e2uuid"
31016 #: ../src/guestfs-actions.pod:6418
31020 " guestfs_set_e2uuid (guestfs_h *g,\n"
31021 " const char *device,\n"
31022 " const char *uuid);\n"
31027 #: ../src/guestfs-actions.pod:6428
31029 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
31030 "the existing UUID of a filesystem."
31034 #: ../src/guestfs-actions.pod:6435
31035 msgid "guestfs_set_memsize"
31039 #: ../src/guestfs-actions.pod:6437
31043 " guestfs_set_memsize (guestfs_h *g,\n"
31049 #: ../src/guestfs-actions.pod:6441
31051 "This sets the memory size in megabytes allocated to the qemu subprocess. "
31052 "This only has any effect if called before C<guestfs_launch>."
31056 #: ../src/guestfs-actions.pod:6456
31057 msgid "guestfs_set_network"
31061 #: ../src/guestfs-actions.pod:6458
31065 " guestfs_set_network (guestfs_h *g,\n"
31071 #: ../src/guestfs-actions.pod:6468
31073 "You must call this before calling C<guestfs_launch>, otherwise it has no "
31078 #: ../src/guestfs-actions.pod:6475
31079 msgid "guestfs_set_path"
31083 #: ../src/guestfs-actions.pod:6477
31087 " guestfs_set_path (guestfs_h *g,\n"
31088 " const char *searchpath);\n"
31093 #: ../src/guestfs-actions.pod:6492
31094 msgid "guestfs_set_pgroup"
31098 #: ../src/guestfs-actions.pod:6494
31102 " guestfs_set_pgroup (guestfs_h *g,\n"
31108 #: ../src/guestfs-actions.pod:6511
31109 msgid "guestfs_set_qemu"
31113 #: ../src/guestfs-actions.pod:6513
31117 " guestfs_set_qemu (guestfs_h *g,\n"
31118 " const char *qemu);\n"
31123 #: ../src/guestfs-actions.pod:6539
31124 msgid "guestfs_set_recovery_proc"
31128 #: ../src/guestfs-actions.pod:6541
31132 " guestfs_set_recovery_proc (guestfs_h *g,\n"
31133 " int recoveryproc);\n"
31138 #: ../src/guestfs-actions.pod:6545
31140 "If this is called with the parameter C<false> then C<guestfs_launch> does "
31141 "not create a recovery process. The purpose of the recovery process is to "
31142 "stop runaway qemu processes in the case where the main program aborts "
31147 #: ../src/guestfs-actions.pod:6550
31149 "This only has any effect if called before C<guestfs_launch>, and the default "
31154 #: ../src/guestfs-actions.pod:6563
31155 msgid "guestfs_set_selinux"
31159 #: ../src/guestfs-actions.pod:6565
31163 " guestfs_set_selinux (guestfs_h *g,\n"
31169 #: ../src/guestfs-actions.pod:6582
31170 msgid "guestfs_set_smp"
31174 #: ../src/guestfs-actions.pod:6584
31178 " guestfs_set_smp (guestfs_h *g,\n"
31184 #: ../src/guestfs-actions.pod:6592
31185 msgid "This function must be called before C<guestfs_launch>."
31189 #: ../src/guestfs-actions.pod:6598
31190 msgid "guestfs_set_trace"
31194 #: ../src/guestfs-actions.pod:6600
31198 " guestfs_set_trace (guestfs_h *g,\n"
31204 #: ../src/guestfs-actions.pod:6614
31206 "Trace messages are normally sent to C<stderr>, unless you register a "
31207 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31211 #: ../src/guestfs-actions.pod:6622
31212 msgid "guestfs_set_verbose"
31216 #: ../src/guestfs-actions.pod:6624
31220 " guestfs_set_verbose (guestfs_h *g,\n"
31226 #: ../src/guestfs-actions.pod:6633
31228 "Verbose messages are normally sent to C<stderr>, unless you register a "
31229 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
31233 #: ../src/guestfs-actions.pod:6641
31234 msgid "guestfs_setcon"
31238 #: ../src/guestfs-actions.pod:6643
31242 " guestfs_setcon (guestfs_h *g,\n"
31243 " const char *context);\n"
31248 #: ../src/guestfs-actions.pod:6656
31249 msgid "guestfs_setxattr"
31253 #: ../src/guestfs-actions.pod:6658
31257 " guestfs_setxattr (guestfs_h *g,\n"
31258 " const char *xattr,\n"
31259 " const char *val,\n"
31261 " const char *path);\n"
31266 #: ../src/guestfs-actions.pod:6669
31267 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
31271 #: ../src/guestfs-actions.pod:6675
31272 msgid "guestfs_sfdisk"
31276 #: ../src/guestfs-actions.pod:6677
31280 " guestfs_sfdisk (guestfs_h *g,\n"
31281 " const char *device,\n"
31285 " char *const *lines);\n"
31290 #: ../src/guestfs-actions.pod:6685 ../src/guestfs-actions.pod:6729
31291 #: ../src/guestfs-actions.pod:6763
31293 "I<This function is deprecated.> In new code, use the L</guestfs_part_add> "
31298 #: ../src/guestfs-actions.pod:6712
31300 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
31304 #: ../src/guestfs-actions.pod:6722
31305 msgid "guestfs_sfdiskM"
31309 #: ../src/guestfs-actions.pod:6724
31313 " guestfs_sfdiskM (guestfs_h *g,\n"
31314 " const char *device,\n"
31315 " char *const *lines);\n"
31320 #: ../src/guestfs-actions.pod:6736
31322 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
31323 "partition sizes are specified in megabytes only (rounded to the nearest "
31324 "cylinder) and you don't need to specify the cyls, heads and sectors "
31325 "parameters which were rarely if ever used anyway."
31329 #: ../src/guestfs-actions.pod:6742
31331 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
31332 "C<guestfs_part_disk>"
31336 #: ../src/guestfs-actions.pod:6752
31337 msgid "guestfs_sfdisk_N"
31341 #: ../src/guestfs-actions.pod:6754
31345 " guestfs_sfdisk_N (guestfs_h *g,\n"
31346 " const char *device,\n"
31351 " const char *line);\n"
31356 #: ../src/guestfs-actions.pod:6773
31358 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
31359 "for the cyls/heads/sectors parameters."
31363 #: ../src/guestfs-actions.pod:6776
31364 msgid "See also: C<guestfs_part_add>"
31368 #: ../src/guestfs-actions.pod:6785
31369 msgid "guestfs_sfdisk_disk_geometry"
31373 #: ../src/guestfs-actions.pod:6787
31377 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
31378 " const char *device);\n"
31383 #: ../src/guestfs-actions.pod:6791
31385 "This displays the disk geometry of C<device> read from the partition table. "
31386 "Especially in the case where the underlying block device has been resized, "
31387 "this can be different from the kernel's idea of the geometry (see "
31388 "C<guestfs_sfdisk_kernel_geometry>)."
31392 #: ../src/guestfs-actions.pod:6804
31393 msgid "guestfs_sfdisk_kernel_geometry"
31397 #: ../src/guestfs-actions.pod:6806
31401 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
31402 " const char *device);\n"
31407 #: ../src/guestfs-actions.pod:6820
31408 msgid "guestfs_sfdisk_l"
31412 #: ../src/guestfs-actions.pod:6822
31416 " guestfs_sfdisk_l (guestfs_h *g,\n"
31417 " const char *device);\n"
31422 #: ../src/guestfs-actions.pod:6826
31424 "I<This function is deprecated.> In new code, use the L</guestfs_part_list> "
31429 #: ../src/guestfs-actions.pod:6837
31430 msgid "See also: C<guestfs_part_list>"
31434 #: ../src/guestfs-actions.pod:6844
31439 #: ../src/guestfs-actions.pod:6846
31443 " guestfs_sh (guestfs_h *g,\n"
31444 " const char *command);\n"
31449 #: ../src/guestfs-actions.pod:6853
31450 msgid "This is like C<guestfs_command>, but passes the command to:"
31454 #: ../src/guestfs-actions.pod:6861
31455 msgid "All the provisos about C<guestfs_command> apply to this call."
31459 #: ../src/guestfs-actions.pod:6868
31460 msgid "guestfs_sh_lines"
31464 #: ../src/guestfs-actions.pod:6870
31468 " guestfs_sh_lines (guestfs_h *g,\n"
31469 " const char *command);\n"
31474 #: ../src/guestfs-actions.pod:6874
31476 "This is the same as C<guestfs_sh>, but splits the result into a list of "
31481 #: ../src/guestfs-actions.pod:6877
31482 msgid "See also: C<guestfs_command_lines>"
31486 #: ../src/guestfs-actions.pod:6885
31487 msgid "guestfs_sleep"
31491 #: ../src/guestfs-actions.pod:6887
31495 " guestfs_sleep (guestfs_h *g,\n"
31501 #: ../src/guestfs-actions.pod:6895
31502 msgid "(Added in 1.0.41)"
31506 #: ../src/guestfs-actions.pod:6897 ../src/guestfs-structs.pod:109
31507 msgid "guestfs_stat"
31511 #: ../src/guestfs-actions.pod:6899
31514 " struct guestfs_stat *\n"
31515 " guestfs_stat (guestfs_h *g,\n"
31516 " const char *path);\n"
31521 #: ../src/guestfs-actions.pod:6913 ../src/guestfs-structs.pod:135
31522 msgid "guestfs_statvfs"
31526 #: ../src/guestfs-actions.pod:6915
31529 " struct guestfs_statvfs *\n"
31530 " guestfs_statvfs (guestfs_h *g,\n"
31531 " const char *path);\n"
31536 #: ../src/guestfs-actions.pod:6925
31538 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
31539 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
31543 #: ../src/guestfs-actions.pod:6931
31544 msgid "guestfs_strings"
31548 #: ../src/guestfs-actions.pod:6933
31552 " guestfs_strings (guestfs_h *g,\n"
31553 " const char *path);\n"
31558 #: ../src/guestfs-actions.pod:6949
31559 msgid "guestfs_strings_e"
31563 #: ../src/guestfs-actions.pod:6951
31567 " guestfs_strings_e (guestfs_h *g,\n"
31568 " const char *encoding,\n"
31569 " const char *path);\n"
31574 #: ../src/guestfs-actions.pod:6956
31576 "This is like the C<guestfs_strings> command, but allows you to specify the "
31577 "encoding of strings that are looked for in the source file C<path>."
31581 #: ../src/guestfs-actions.pod:6966
31583 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
31584 "ISO-8859-X (this is what C<guestfs_strings> uses)."
31588 #: ../src/guestfs-actions.pod:7004
31589 msgid "guestfs_swapoff_device"
31593 #: ../src/guestfs-actions.pod:7006
31597 " guestfs_swapoff_device (guestfs_h *g,\n"
31598 " const char *device);\n"
31603 #: ../src/guestfs-actions.pod:7010
31605 "This command disables the libguestfs appliance swap device or partition "
31606 "named C<device>. See C<guestfs_swapon_device>."
31610 #: ../src/guestfs-actions.pod:7018
31611 msgid "guestfs_swapoff_file"
31615 #: ../src/guestfs-actions.pod:7020
31619 " guestfs_swapoff_file (guestfs_h *g,\n"
31620 " const char *file);\n"
31625 #: ../src/guestfs-actions.pod:7030
31626 msgid "guestfs_swapoff_label"
31630 #: ../src/guestfs-actions.pod:7032
31634 " guestfs_swapoff_label (guestfs_h *g,\n"
31635 " const char *label);\n"
31640 #: ../src/guestfs-actions.pod:7043
31641 msgid "guestfs_swapoff_uuid"
31645 #: ../src/guestfs-actions.pod:7045
31649 " guestfs_swapoff_uuid (guestfs_h *g,\n"
31650 " const char *uuid);\n"
31655 #: ../src/guestfs-actions.pod:7056
31656 msgid "guestfs_swapon_device"
31660 #: ../src/guestfs-actions.pod:7058
31664 " guestfs_swapon_device (guestfs_h *g,\n"
31665 " const char *device);\n"
31670 #: ../src/guestfs-actions.pod:7062
31672 "This command enables the libguestfs appliance to use the swap device or "
31673 "partition named C<device>. The increased memory is made available for all "
31674 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
31678 #: ../src/guestfs-actions.pod:7078
31679 msgid "guestfs_swapon_file"
31683 #: ../src/guestfs-actions.pod:7080
31687 " guestfs_swapon_file (guestfs_h *g,\n"
31688 " const char *file);\n"
31693 #: ../src/guestfs-actions.pod:7084
31695 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
31700 #: ../src/guestfs-actions.pod:7091
31701 msgid "guestfs_swapon_label"
31705 #: ../src/guestfs-actions.pod:7093
31709 " guestfs_swapon_label (guestfs_h *g,\n"
31710 " const char *label);\n"
31715 #: ../src/guestfs-actions.pod:7097
31717 "This command enables swap to a labeled swap partition. See "
31718 "C<guestfs_swapon_device> for other notes."
31722 #: ../src/guestfs-actions.pod:7104
31723 msgid "guestfs_swapon_uuid"
31727 #: ../src/guestfs-actions.pod:7106
31731 " guestfs_swapon_uuid (guestfs_h *g,\n"
31732 " const char *uuid);\n"
31737 #: ../src/guestfs-actions.pod:7110
31739 "This command enables swap to a swap partition with the given UUID. See "
31740 "C<guestfs_swapon_device> for other notes."
31744 #: ../src/guestfs-actions.pod:7117
31745 msgid "guestfs_sync"
31749 #: ../src/guestfs-actions.pod:7119
31753 " guestfs_sync (guestfs_h *g);\n"
31758 #: ../src/guestfs-actions.pod:7132
31759 msgid "guestfs_tail"
31763 #: ../src/guestfs-actions.pod:7134
31767 " guestfs_tail (guestfs_h *g,\n"
31768 " const char *path);\n"
31773 #: ../src/guestfs-actions.pod:7150
31774 msgid "guestfs_tail_n"
31778 #: ../src/guestfs-actions.pod:7152
31782 " guestfs_tail_n (guestfs_h *g,\n"
31784 " const char *path);\n"
31789 #: ../src/guestfs-actions.pod:7174
31790 msgid "guestfs_tar_in"
31794 #: ../src/guestfs-actions.pod:7176
31798 " guestfs_tar_in (guestfs_h *g,\n"
31799 " const char *tarfile,\n"
31800 " const char *directory);\n"
31805 #: ../src/guestfs-actions.pod:7184
31807 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
31811 #: ../src/guestfs-actions.pod:7189 ../src/guestfs-actions.pod:7206
31812 #: ../src/guestfs-actions.pod:7222 ../src/guestfs-actions.pod:7238
31813 msgid "(Added in 1.0.3)"
31817 #: ../src/guestfs-actions.pod:7191
31818 msgid "guestfs_tar_out"
31822 #: ../src/guestfs-actions.pod:7193
31826 " guestfs_tar_out (guestfs_h *g,\n"
31827 " const char *directory,\n"
31828 " const char *tarfile);\n"
31833 #: ../src/guestfs-actions.pod:7201
31835 "To download a compressed tarball, use C<guestfs_tgz_out> or "
31836 "C<guestfs_txz_out>."
31840 #: ../src/guestfs-actions.pod:7208
31841 msgid "guestfs_tgz_in"
31845 #: ../src/guestfs-actions.pod:7210
31849 " guestfs_tgz_in (guestfs_h *g,\n"
31850 " const char *tarball,\n"
31851 " const char *directory);\n"
31856 #: ../src/guestfs-actions.pod:7218
31857 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
31861 #: ../src/guestfs-actions.pod:7224
31862 msgid "guestfs_tgz_out"
31866 #: ../src/guestfs-actions.pod:7226
31870 " guestfs_tgz_out (guestfs_h *g,\n"
31871 " const char *directory,\n"
31872 " const char *tarball);\n"
31877 #: ../src/guestfs-actions.pod:7234
31878 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
31882 #: ../src/guestfs-actions.pod:7240
31883 msgid "guestfs_touch"
31887 #: ../src/guestfs-actions.pod:7242
31891 " guestfs_touch (guestfs_h *g,\n"
31892 " const char *path);\n"
31897 #: ../src/guestfs-actions.pod:7257
31898 msgid "guestfs_truncate"
31902 #: ../src/guestfs-actions.pod:7259
31906 " guestfs_truncate (guestfs_h *g,\n"
31907 " const char *path);\n"
31912 #: ../src/guestfs-actions.pod:7270
31913 msgid "guestfs_truncate_size"
31917 #: ../src/guestfs-actions.pod:7272
31921 " guestfs_truncate_size (guestfs_h *g,\n"
31922 " const char *path,\n"
31923 " int64_t size);\n"
31928 #: ../src/guestfs-actions.pod:7280
31930 "If the current file size is less than C<size> then the file is extended to "
31931 "the required size with zero bytes. This creates a sparse file (ie. disk "
31932 "blocks are not allocated for the file until you write to it). To create a "
31933 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
31937 #: ../src/guestfs-actions.pod:7290
31938 msgid "guestfs_tune2fs_l"
31942 #: ../src/guestfs-actions.pod:7292
31946 " guestfs_tune2fs_l (guestfs_h *g,\n"
31947 " const char *device);\n"
31952 #: ../src/guestfs-actions.pod:7312
31953 msgid "guestfs_txz_in"
31957 #: ../src/guestfs-actions.pod:7314
31961 " guestfs_txz_in (guestfs_h *g,\n"
31962 " const char *tarball,\n"
31963 " const char *directory);\n"
31968 #: ../src/guestfs-actions.pod:7326
31969 msgid "guestfs_txz_out"
31973 #: ../src/guestfs-actions.pod:7328
31977 " guestfs_txz_out (guestfs_h *g,\n"
31978 " const char *directory,\n"
31979 " const char *tarball);\n"
31984 #: ../src/guestfs-actions.pod:7340
31985 msgid "guestfs_umask"
31989 #: ../src/guestfs-actions.pod:7342
31993 " guestfs_umask (guestfs_h *g,\n"
31999 #: ../src/guestfs-actions.pod:7358
32001 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
32002 "C<guestfs_mkdir>."
32006 #: ../src/guestfs-actions.pod:7367
32007 msgid "guestfs_umount"
32011 #: ../src/guestfs-actions.pod:7369
32015 " guestfs_umount (guestfs_h *g,\n"
32016 " const char *pathordevice);\n"
32021 #: ../src/guestfs-actions.pod:7381
32022 msgid "guestfs_umount_all"
32026 #: ../src/guestfs-actions.pod:7383
32030 " guestfs_umount_all (guestfs_h *g);\n"
32035 #: ../src/guestfs-actions.pod:7394
32036 msgid "guestfs_upload"
32040 #: ../src/guestfs-actions.pod:7396
32044 " guestfs_upload (guestfs_h *g,\n"
32045 " const char *filename,\n"
32046 " const char *remotefilename);\n"
32051 #: ../src/guestfs-actions.pod:7406
32052 msgid "See also C<guestfs_download>."
32056 #: ../src/guestfs-actions.pod:7417
32057 msgid "guestfs_upload_offset"
32061 #: ../src/guestfs-actions.pod:7419
32065 " guestfs_upload_offset (guestfs_h *g,\n"
32066 " const char *filename,\n"
32067 " const char *remotefilename,\n"
32068 " int64_t offset);\n"
32073 #: ../src/guestfs-actions.pod:7435
32075 "Note that there is no limit on the amount of data that can be uploaded with "
32076 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
32077 "full amount unless an error occurs."
32081 #: ../src/guestfs-actions.pod:7440
32082 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
32086 #: ../src/guestfs-actions.pod:7451
32087 msgid "guestfs_utimens"
32091 #: ../src/guestfs-actions.pod:7453
32095 " guestfs_utimens (guestfs_h *g,\n"
32096 " const char *path,\n"
32097 " int64_t atsecs,\n"
32098 " int64_t atnsecs,\n"
32099 " int64_t mtsecs,\n"
32100 " int64_t mtnsecs);\n"
32105 #: ../src/guestfs-actions.pod:7482 ../src/guestfs-structs.pod:175
32106 msgid "guestfs_version"
32110 #: ../src/guestfs-actions.pod:7484
32113 " struct guestfs_version *\n"
32114 " guestfs_version (guestfs_h *g);\n"
32119 #: ../src/guestfs-actions.pod:7512
32121 "I<Note:> Don't use this call to test for availability of features. In "
32122 "enterprise distributions we backport features from later versions into "
32123 "earlier versions, making this an unreliable way to test for features. Use "
32124 "C<guestfs_available> instead."
32128 #: ../src/guestfs-actions.pod:7518
32130 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
32131 "error. I<The caller must call C<guestfs_free_version> after use>."
32135 #: ../src/guestfs-actions.pod:7522
32136 msgid "(Added in 1.0.58)"
32140 #: ../src/guestfs-actions.pod:7524
32141 msgid "guestfs_vfs_label"
32145 #: ../src/guestfs-actions.pod:7526
32149 " guestfs_vfs_label (guestfs_h *g,\n"
32150 " const char *device);\n"
32155 #: ../src/guestfs-actions.pod:7535
32156 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
32160 #: ../src/guestfs-actions.pod:7540 ../src/guestfs-actions.pod:7577
32161 msgid "(Added in 1.3.18)"
32165 #: ../src/guestfs-actions.pod:7542
32166 msgid "guestfs_vfs_type"
32170 #: ../src/guestfs-actions.pod:7544
32174 " guestfs_vfs_type (guestfs_h *g,\n"
32175 " const char *device);\n"
32180 #: ../src/guestfs-actions.pod:7561
32181 msgid "guestfs_vfs_uuid"
32185 #: ../src/guestfs-actions.pod:7563
32189 " guestfs_vfs_uuid (guestfs_h *g,\n"
32190 " const char *device);\n"
32195 #: ../src/guestfs-actions.pod:7572
32196 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
32200 #: ../src/guestfs-actions.pod:7579
32201 msgid "guestfs_vg_activate"
32205 #: ../src/guestfs-actions.pod:7581
32209 " guestfs_vg_activate (guestfs_h *g,\n"
32211 " char *const *volgroups);\n"
32216 #: ../src/guestfs-actions.pod:7598
32217 msgid "guestfs_vg_activate_all"
32221 #: ../src/guestfs-actions.pod:7600
32225 " guestfs_vg_activate_all (guestfs_h *g,\n"
32226 " int activate);\n"
32231 #: ../src/guestfs-actions.pod:7613
32232 msgid "guestfs_vgcreate"
32236 #: ../src/guestfs-actions.pod:7615
32240 " guestfs_vgcreate (guestfs_h *g,\n"
32241 " const char *volgroup,\n"
32242 " char *const *physvols);\n"
32247 #: ../src/guestfs-actions.pod:7627
32248 msgid "guestfs_vglvuuids"
32252 #: ../src/guestfs-actions.pod:7629
32256 " guestfs_vglvuuids (guestfs_h *g,\n"
32257 " const char *vgname);\n"
32262 #: ../src/guestfs-actions.pod:7636
32264 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
32265 "associate logical volumes and volume groups."
32269 #: ../src/guestfs-actions.pod:7639
32270 msgid "See also C<guestfs_vgpvuuids>."
32274 #: ../src/guestfs-actions.pod:7647
32275 msgid "guestfs_vgpvuuids"
32279 #: ../src/guestfs-actions.pod:7649
32283 " guestfs_vgpvuuids (guestfs_h *g,\n"
32284 " const char *vgname);\n"
32289 #: ../src/guestfs-actions.pod:7656
32291 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
32292 "associate physical volumes and volume groups."
32296 #: ../src/guestfs-actions.pod:7659
32297 msgid "See also C<guestfs_vglvuuids>."
32301 #: ../src/guestfs-actions.pod:7667
32302 msgid "guestfs_vgremove"
32306 #: ../src/guestfs-actions.pod:7669
32310 " guestfs_vgremove (guestfs_h *g,\n"
32311 " const char *vgname);\n"
32316 #: ../src/guestfs-actions.pod:7682
32317 msgid "guestfs_vgrename"
32321 #: ../src/guestfs-actions.pod:7684
32325 " guestfs_vgrename (guestfs_h *g,\n"
32326 " const char *volgroup,\n"
32327 " const char *newvolgroup);\n"
32332 #: ../src/guestfs-actions.pod:7695
32333 msgid "guestfs_vgs"
32337 #: ../src/guestfs-actions.pod:7697
32341 " guestfs_vgs (guestfs_h *g);\n"
32346 #: ../src/guestfs-actions.pod:7706
32347 msgid "See also C<guestfs_vgs_full>."
32351 #: ../src/guestfs-actions.pod:7714
32352 msgid "guestfs_vgs_full"
32356 #: ../src/guestfs-actions.pod:7716
32359 " struct guestfs_lvm_vg_list *\n"
32360 " guestfs_vgs_full (guestfs_h *g);\n"
32365 #: ../src/guestfs-actions.pod:7722
32367 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
32368 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
32372 #: ../src/guestfs-actions.pod:7728
32373 msgid "guestfs_vgscan"
32377 #: ../src/guestfs-actions.pod:7730
32381 " guestfs_vgscan (guestfs_h *g);\n"
32386 #: ../src/guestfs-actions.pod:7740
32387 msgid "guestfs_vguuid"
32391 #: ../src/guestfs-actions.pod:7742
32395 " guestfs_vguuid (guestfs_h *g,\n"
32396 " const char *vgname);\n"
32401 #: ../src/guestfs-actions.pod:7753
32402 msgid "guestfs_wait_ready"
32406 #: ../src/guestfs-actions.pod:7755
32410 " guestfs_wait_ready (guestfs_h *g);\n"
32415 #: ../src/guestfs-actions.pod:7758
32417 "I<This function is deprecated.> In new code, use the L</guestfs_launch> call "
32422 #: ../src/guestfs-actions.pod:7765
32423 msgid "This function is a no op."
32427 #: ../src/guestfs-actions.pod:7767
32429 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
32430 "calling C<guestfs_launch> to wait for the launch to complete. However this "
32431 "is no longer necessary because C<guestfs_launch> now does the waiting."
32435 #: ../src/guestfs-actions.pod:7772
32437 "If you see any calls to this function in code then you can just remove them, "
32438 "unless you want to retain compatibility with older versions of the API."
32442 #: ../src/guestfs-actions.pod:7780
32443 msgid "guestfs_wc_c"
32447 #: ../src/guestfs-actions.pod:7782
32451 " guestfs_wc_c (guestfs_h *g,\n"
32452 " const char *path);\n"
32457 #: ../src/guestfs-actions.pod:7793
32458 msgid "guestfs_wc_l"
32462 #: ../src/guestfs-actions.pod:7795
32466 " guestfs_wc_l (guestfs_h *g,\n"
32467 " const char *path);\n"
32472 #: ../src/guestfs-actions.pod:7806
32473 msgid "guestfs_wc_w"
32477 #: ../src/guestfs-actions.pod:7808
32481 " guestfs_wc_w (guestfs_h *g,\n"
32482 " const char *path);\n"
32487 #: ../src/guestfs-actions.pod:7819
32488 msgid "guestfs_write"
32492 #: ../src/guestfs-actions.pod:7821
32496 " guestfs_write (guestfs_h *g,\n"
32497 " const char *path,\n"
32498 " const char *content,\n"
32499 " size_t content_size);\n"
32504 #: ../src/guestfs-actions.pod:7830
32505 msgid "See also C<guestfs_write_append>."
32509 #: ../src/guestfs-actions.pod:7839
32510 msgid "guestfs_write_append"
32514 #: ../src/guestfs-actions.pod:7841
32518 " guestfs_write_append (guestfs_h *g,\n"
32519 " const char *path,\n"
32520 " const char *content,\n"
32521 " size_t content_size);\n"
32526 #: ../src/guestfs-actions.pod:7850
32527 msgid "See also C<guestfs_write>."
32531 #: ../src/guestfs-actions.pod:7859
32532 msgid "guestfs_write_file"
32536 #: ../src/guestfs-actions.pod:7861
32540 " guestfs_write_file (guestfs_h *g,\n"
32541 " const char *path,\n"
32542 " const char *content,\n"
32548 #: ../src/guestfs-actions.pod:7867
32550 "I<This function is deprecated.> In new code, use the L</guestfs_write> call "
32555 #: ../src/guestfs-actions.pod:7892
32556 msgid "guestfs_zegrep"
32560 #: ../src/guestfs-actions.pod:7894
32564 " guestfs_zegrep (guestfs_h *g,\n"
32565 " const char *regex,\n"
32566 " const char *path);\n"
32571 #: ../src/guestfs-actions.pod:7911
32572 msgid "guestfs_zegrepi"
32576 #: ../src/guestfs-actions.pod:7913
32580 " guestfs_zegrepi (guestfs_h *g,\n"
32581 " const char *regex,\n"
32582 " const char *path);\n"
32587 #: ../src/guestfs-actions.pod:7930
32588 msgid "guestfs_zero"
32592 #: ../src/guestfs-actions.pod:7932
32596 " guestfs_zero (guestfs_h *g,\n"
32597 " const char *device);\n"
32602 #: ../src/guestfs-actions.pod:7946
32604 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
32605 "C<guestfs_is_zero_device>"
32609 #: ../src/guestfs-actions.pod:7958
32610 msgid "guestfs_zero_device"
32614 #: ../src/guestfs-actions.pod:7960
32618 " guestfs_zero_device (guestfs_h *g,\n"
32619 " const char *device);\n"
32624 #: ../src/guestfs-actions.pod:7964
32626 "This command writes zeroes over the entire C<device>. Compare with "
32627 "C<guestfs_zero> which just zeroes the first few blocks of a device."
32631 #: ../src/guestfs-actions.pod:7982
32632 msgid "(Added in 1.3.1)"
32636 #: ../src/guestfs-actions.pod:7984
32637 msgid "guestfs_zerofree"
32641 #: ../src/guestfs-actions.pod:7986
32645 " guestfs_zerofree (guestfs_h *g,\n"
32646 " const char *device);\n"
32651 #: ../src/guestfs-actions.pod:8005
32652 msgid "guestfs_zfgrep"
32656 #: ../src/guestfs-actions.pod:8007
32660 " guestfs_zfgrep (guestfs_h *g,\n"
32661 " const char *pattern,\n"
32662 " const char *path);\n"
32667 #: ../src/guestfs-actions.pod:8024
32668 msgid "guestfs_zfgrepi"
32672 #: ../src/guestfs-actions.pod:8026
32676 " guestfs_zfgrepi (guestfs_h *g,\n"
32677 " const char *pattern,\n"
32678 " const char *path);\n"
32683 #: ../src/guestfs-actions.pod:8043
32684 msgid "guestfs_zfile"
32688 #: ../src/guestfs-actions.pod:8045
32692 " guestfs_zfile (guestfs_h *g,\n"
32693 " const char *meth,\n"
32694 " const char *path);\n"
32699 #: ../src/guestfs-actions.pod:8050
32701 "I<This function is deprecated.> In new code, use the L</guestfs_file> call "
32706 #: ../src/guestfs-actions.pod:8062
32708 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
32713 #: ../src/guestfs-actions.pod:8070
32714 msgid "guestfs_zgrep"
32718 #: ../src/guestfs-actions.pod:8072
32722 " guestfs_zgrep (guestfs_h *g,\n"
32723 " const char *regex,\n"
32724 " const char *path);\n"
32729 #: ../src/guestfs-actions.pod:8089
32730 msgid "guestfs_zgrepi"
32734 #: ../src/guestfs-actions.pod:8091
32738 " guestfs_zgrepi (guestfs_h *g,\n"
32739 " const char *regex,\n"
32740 " const char *path);\n"
32745 #: ../src/guestfs-availability.pod:3
32750 #: ../src/guestfs-availability.pod:5
32752 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
32753 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
32754 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
32755 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
32756 "L</guestfs_aug_save> L</guestfs_aug_set>"
32760 #: ../src/guestfs-availability.pod:21
32765 #: ../src/guestfs-availability.pod:23
32766 msgid "The following functions: L</guestfs_btrfs_filesystem_resize>"
32770 #: ../src/guestfs-availability.pod:26
32775 #: ../src/guestfs-availability.pod:28
32776 msgid "The following functions: L</guestfs_grub_install>"
32780 #: ../src/guestfs-availability.pod:31
32785 #: ../src/guestfs-availability.pod:33
32787 "The following functions: L</guestfs_inotify_add_watch> L</"
32788 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
32789 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
32793 #: ../src/guestfs-availability.pod:41
32794 msgid "B<linuxfsuuid>"
32798 #: ../src/guestfs-availability.pod:43
32800 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
32801 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
32805 #: ../src/guestfs-availability.pod:50
32806 msgid "B<linuxmodules>"
32810 #: ../src/guestfs-availability.pod:52
32811 msgid "The following functions: L</guestfs_modprobe>"
32815 #: ../src/guestfs-availability.pod:55
32816 msgid "B<linuxxattrs>"
32820 #: ../src/guestfs-availability.pod:57
32822 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
32823 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
32824 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
32825 "guestfs_setxattr>"
32829 #: ../src/guestfs-availability.pod:68
32834 #: ../src/guestfs-availability.pod:70
32836 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
32837 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
32838 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
32842 #: ../src/guestfs-availability.pod:79
32847 #: ../src/guestfs-availability.pod:81
32849 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
32850 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
32851 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
32852 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
32853 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
32854 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
32855 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
32859 #: ../src/guestfs-availability.pod:104
32864 #: ../src/guestfs-availability.pod:106
32866 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
32867 "guestfs_mknod_b> L</guestfs_mknod_c>"
32871 #: ../src/guestfs-availability.pod:112
32876 #: ../src/guestfs-availability.pod:114
32877 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
32881 #: ../src/guestfs-availability.pod:117
32882 msgid "B<ntfsprogs>"
32886 #: ../src/guestfs-availability.pod:119
32888 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_opts> "
32889 "L</guestfs_ntfsresize_size>"
32893 #: ../src/guestfs-availability.pod:124
32894 msgid "B<realpath>"
32898 #: ../src/guestfs-availability.pod:126
32899 msgid "The following functions: L</guestfs_realpath>"
32903 #: ../src/guestfs-availability.pod:129
32908 #: ../src/guestfs-availability.pod:131
32910 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
32911 "guestfs_scrub_freespace>"
32915 #: ../src/guestfs-availability.pod:136
32920 #: ../src/guestfs-availability.pod:138
32921 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
32925 #: ../src/guestfs-availability.pod:142
32930 #: ../src/guestfs-availability.pod:144
32931 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
32935 #: ../src/guestfs-availability.pod:148
32936 msgid "B<zerofree>"
32940 #: ../src/guestfs-availability.pod:150
32941 msgid "The following functions: L</guestfs_zerofree>"
32945 #: ../src/guestfs-structs.pod:1
32946 msgid "guestfs_int_bool"
32950 #: ../src/guestfs-structs.pod:3
32953 " struct guestfs_int_bool {\n"
32961 #: ../src/guestfs-structs.pod:8
32964 " struct guestfs_int_bool_list {\n"
32965 " uint32_t len; /* Number of elements in list. */\n"
32966 " struct guestfs_int_bool *val; /* Elements. */\n"
32972 #: ../src/guestfs-structs.pod:13
32975 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
32976 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
32981 #: ../src/guestfs-structs.pod:16
32982 msgid "guestfs_lvm_pv"
32986 #: ../src/guestfs-structs.pod:18
32989 " struct guestfs_lvm_pv {\n"
32990 " char *pv_name;\n"
32991 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
32992 " char pv_uuid[32];\n"
32994 " uint64_t pv_size;\n"
32995 " uint64_t dev_size;\n"
32996 " uint64_t pv_free;\n"
32997 " uint64_t pv_used;\n"
32998 " char *pv_attr;\n"
32999 " int64_t pv_pe_count;\n"
33000 " int64_t pv_pe_alloc_count;\n"
33001 " char *pv_tags;\n"
33002 " uint64_t pe_start;\n"
33003 " int64_t pv_mda_count;\n"
33004 " uint64_t pv_mda_free;\n"
33010 #: ../src/guestfs-structs.pod:36
33013 " struct guestfs_lvm_pv_list {\n"
33014 " uint32_t len; /* Number of elements in list. */\n"
33015 " struct guestfs_lvm_pv *val; /* Elements. */\n"
33021 #: ../src/guestfs-structs.pod:41
33024 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
33025 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
33030 #: ../src/guestfs-structs.pod:44
33031 msgid "guestfs_lvm_vg"
33035 #: ../src/guestfs-structs.pod:46
33038 " struct guestfs_lvm_vg {\n"
33039 " char *vg_name;\n"
33040 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33041 " char vg_uuid[32];\n"
33043 " char *vg_attr;\n"
33044 " uint64_t vg_size;\n"
33045 " uint64_t vg_free;\n"
33046 " char *vg_sysid;\n"
33047 " uint64_t vg_extent_size;\n"
33048 " int64_t vg_extent_count;\n"
33049 " int64_t vg_free_count;\n"
33050 " int64_t max_lv;\n"
33051 " int64_t max_pv;\n"
33052 " int64_t pv_count;\n"
33053 " int64_t lv_count;\n"
33054 " int64_t snap_count;\n"
33055 " int64_t vg_seqno;\n"
33056 " char *vg_tags;\n"
33057 " int64_t vg_mda_count;\n"
33058 " uint64_t vg_mda_free;\n"
33064 #: ../src/guestfs-structs.pod:69
33067 " struct guestfs_lvm_vg_list {\n"
33068 " uint32_t len; /* Number of elements in list. */\n"
33069 " struct guestfs_lvm_vg *val; /* Elements. */\n"
33075 #: ../src/guestfs-structs.pod:74
33078 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
33079 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
33084 #: ../src/guestfs-structs.pod:77
33085 msgid "guestfs_lvm_lv"
33089 #: ../src/guestfs-structs.pod:79
33092 " struct guestfs_lvm_lv {\n"
33093 " char *lv_name;\n"
33094 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
33095 " char lv_uuid[32];\n"
33096 " char *lv_attr;\n"
33097 " int64_t lv_major;\n"
33098 " int64_t lv_minor;\n"
33099 " int64_t lv_kernel_major;\n"
33100 " int64_t lv_kernel_minor;\n"
33101 " uint64_t lv_size;\n"
33102 " int64_t seg_count;\n"
33104 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33105 " float snap_percent;\n"
33106 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
33107 " float copy_percent;\n"
33108 " char *move_pv;\n"
33109 " char *lv_tags;\n"
33110 " char *mirror_log;\n"
33111 " char *modules;\n"
33117 #: ../src/guestfs-structs.pod:101
33120 " struct guestfs_lvm_lv_list {\n"
33121 " uint32_t len; /* Number of elements in list. */\n"
33122 " struct guestfs_lvm_lv *val; /* Elements. */\n"
33128 #: ../src/guestfs-structs.pod:106
33131 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
33132 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
33137 #: ../src/guestfs-structs.pod:111
33140 " struct guestfs_stat {\n"
33144 " int64_t nlink;\n"
33149 " int64_t blksize;\n"
33150 " int64_t blocks;\n"
33151 " int64_t atime;\n"
33152 " int64_t mtime;\n"
33153 " int64_t ctime;\n"
33159 #: ../src/guestfs-structs.pod:127
33162 " struct guestfs_stat_list {\n"
33163 " uint32_t len; /* Number of elements in list. */\n"
33164 " struct guestfs_stat *val; /* Elements. */\n"
33170 #: ../src/guestfs-structs.pod:132
33173 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
33174 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
33179 #: ../src/guestfs-structs.pod:137
33182 " struct guestfs_statvfs {\n"
33183 " int64_t bsize;\n"
33184 " int64_t frsize;\n"
33185 " int64_t blocks;\n"
33186 " int64_t bfree;\n"
33187 " int64_t bavail;\n"
33188 " int64_t files;\n"
33189 " int64_t ffree;\n"
33190 " int64_t favail;\n"
33193 " int64_t namemax;\n"
33199 #: ../src/guestfs-structs.pod:151
33202 " struct guestfs_statvfs_list {\n"
33203 " uint32_t len; /* Number of elements in list. */\n"
33204 " struct guestfs_statvfs *val; /* Elements. */\n"
33210 #: ../src/guestfs-structs.pod:156
33213 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
33214 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
33219 #: ../src/guestfs-structs.pod:159
33220 msgid "guestfs_dirent"
33224 #: ../src/guestfs-structs.pod:161
33227 " struct guestfs_dirent {\n"
33236 #: ../src/guestfs-structs.pod:167
33239 " struct guestfs_dirent_list {\n"
33240 " uint32_t len; /* Number of elements in list. */\n"
33241 " struct guestfs_dirent *val; /* Elements. */\n"
33247 #: ../src/guestfs-structs.pod:172
33250 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
33251 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
33256 #: ../src/guestfs-structs.pod:177
33259 " struct guestfs_version {\n"
33260 " int64_t major;\n"
33261 " int64_t minor;\n"
33262 " int64_t release;\n"
33269 #: ../src/guestfs-structs.pod:184
33272 " struct guestfs_version_list {\n"
33273 " uint32_t len; /* Number of elements in list. */\n"
33274 " struct guestfs_version *val; /* Elements. */\n"
33280 #: ../src/guestfs-structs.pod:189
33283 " void guestfs_free_version (struct guestfs_free_version *);\n"
33284 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
33289 #: ../src/guestfs-structs.pod:192
33290 msgid "guestfs_xattr"
33294 #: ../src/guestfs-structs.pod:194
33297 " struct guestfs_xattr {\n"
33298 " char *attrname;\n"
33299 " /* The next two fields describe a byte array. */\n"
33300 " uint32_t attrval_len;\n"
33301 " char *attrval;\n"
33307 #: ../src/guestfs-structs.pod:201
33310 " struct guestfs_xattr_list {\n"
33311 " uint32_t len; /* Number of elements in list. */\n"
33312 " struct guestfs_xattr *val; /* Elements. */\n"
33318 #: ../src/guestfs-structs.pod:206
33321 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
33322 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
33327 #: ../src/guestfs-structs.pod:209
33328 msgid "guestfs_inotify_event"
33332 #: ../src/guestfs-structs.pod:211
33335 " struct guestfs_inotify_event {\n"
33336 " int64_t in_wd;\n"
33337 " uint32_t in_mask;\n"
33338 " uint32_t in_cookie;\n"
33339 " char *in_name;\n"
33345 #: ../src/guestfs-structs.pod:218
33348 " struct guestfs_inotify_event_list {\n"
33349 " uint32_t len; /* Number of elements in list. */\n"
33350 " struct guestfs_inotify_event *val; /* Elements. */\n"
33356 #: ../src/guestfs-structs.pod:223
33359 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
33360 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
33365 #: ../src/guestfs-structs.pod:226
33366 msgid "guestfs_partition"
33370 #: ../src/guestfs-structs.pod:228
33373 " struct guestfs_partition {\n"
33374 " int32_t part_num;\n"
33375 " uint64_t part_start;\n"
33376 " uint64_t part_end;\n"
33377 " uint64_t part_size;\n"
33383 #: ../src/guestfs-structs.pod:235
33386 " struct guestfs_partition_list {\n"
33387 " uint32_t len; /* Number of elements in list. */\n"
33388 " struct guestfs_partition *val; /* Elements. */\n"
33394 #: ../src/guestfs-structs.pod:240
33397 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
33398 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
33403 #: ../src/guestfs-structs.pod:243
33404 msgid "guestfs_application"
33408 #: ../src/guestfs-structs.pod:245
33411 " struct guestfs_application {\n"
33412 " char *app_name;\n"
33413 " char *app_display_name;\n"
33414 " int32_t app_epoch;\n"
33415 " char *app_version;\n"
33416 " char *app_release;\n"
33417 " char *app_install_path;\n"
33418 " char *app_trans_path;\n"
33419 " char *app_publisher;\n"
33420 " char *app_url;\n"
33421 " char *app_source_package;\n"
33422 " char *app_summary;\n"
33423 " char *app_description;\n"
33429 #: ../src/guestfs-structs.pod:260
33432 " struct guestfs_application_list {\n"
33433 " uint32_t len; /* Number of elements in list. */\n"
33434 " struct guestfs_application *val; /* Elements. */\n"
33440 #: ../src/guestfs-structs.pod:265
33443 " void guestfs_free_application (struct guestfs_free_application *);\n"
33444 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
33449 #: ../src/guestfs.pod:5
33450 msgid "guestfs - Library for accessing and modifying virtual machine images"
33454 #: ../src/guestfs.pod:11
33457 " guestfs_h *g = guestfs_create ();\n"
33458 " guestfs_add_drive (g, \"guest.img\");\n"
33459 " guestfs_launch (g);\n"
33460 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33461 " guestfs_touch (g, \"/hello\");\n"
33462 " guestfs_umount (g, \"/\");\n"
33463 " guestfs_close (g);\n"
33468 #: ../src/guestfs.pod:25
33470 "Libguestfs is a library for accessing and modifying guest disk images. "
33471 "Amongst the things this is good for: making batch configuration changes to "
33472 "guests, getting disk used/free statistics (see also: virt-df), migrating "
33473 "between virtualization systems (see also: virt-p2v), performing partial "
33474 "backups, performing partial guest clones, cloning guests and changing "
33475 "registry/UUID/hostname info, and much else besides."
33479 #: ../src/guestfs.pod:33
33481 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
33482 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
33483 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
33488 #: ../src/guestfs.pod:38
33490 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
33491 "what filesystem is in each LV, etc.). It can also run commands in the "
33492 "context of the guest. Also you can access filesystems over FUSE."
33496 #: ../src/guestfs.pod:43
33498 "Libguestfs is a library that can be linked with C and C++ management "
33499 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
33500 "PHP, Erlang, Haskell or C#). You can also use it from shell scripts or the "
33505 #: ../src/guestfs.pod:48
33507 "You don't need to be root to use libguestfs, although obviously you do need "
33508 "enough permissions to access the disk images."
33512 #: ../src/guestfs.pod:51
33514 "Libguestfs is a large API because it can do many things. For a gentle "
33515 "introduction, please read the L</API OVERVIEW> section next."
33519 #: ../src/guestfs.pod:54
33521 "There are also some example programs in the L<guestfs-examples(3)> manual "
33526 #: ../src/guestfs.pod:57
33527 msgid "API OVERVIEW"
33531 #: ../src/guestfs.pod:59
33533 "This section provides a gentler overview of the libguestfs API. We also try "
33534 "to group API calls together, where that may not be obvious from reading "
33535 "about the individual calls in the main section of this manual."
33539 #: ../src/guestfs.pod:64
33544 #: ../src/guestfs.pod:66
33546 "Before you can use libguestfs calls, you have to create a handle. Then you "
33547 "must add at least one disk image to the handle, followed by launching the "
33548 "handle, then performing whatever operations you want, and finally closing "
33549 "the handle. By convention we use the single letter C<g> for the name of the "
33550 "handle variable, although of course you can use any name you want."
33554 #: ../src/guestfs.pod:73
33555 msgid "The general structure of all libguestfs-using programs looks like this:"
33559 #: ../src/guestfs.pod:76
33562 " guestfs_h *g = guestfs_create ();\n"
33567 #: ../src/guestfs.pod:78
33570 " /* Call guestfs_add_drive additional times if there are\n"
33571 " * multiple disk images.\n"
33573 " guestfs_add_drive (g, \"guest.img\");\n"
33578 #: ../src/guestfs.pod:83
33581 " /* Most manipulation calls won't work until you've launched\n"
33582 " * the handle 'g'. You have to do this _after_ adding drives\n"
33583 " * and _before_ other commands.\n"
33585 " guestfs_launch (g);\n"
33590 #: ../src/guestfs.pod:89
33593 " /* Now you can examine what partitions, LVs etc are available.\n"
33595 " char **partitions = guestfs_list_partitions (g);\n"
33596 " char **logvols = guestfs_lvs (g);\n"
33601 #: ../src/guestfs.pod:94
33604 " /* To access a filesystem in the image, you must mount it.\n"
33606 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
33611 #: ../src/guestfs.pod:98
33614 " /* Now you can perform filesystem actions on the guest\n"
33617 " guestfs_touch (g, \"/hello\");\n"
33622 #: ../src/guestfs.pod:103
33625 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
33626 " * it is done automatically when you close the handle. See\n"
33627 " * discussion of autosync in this page.\n"
33629 " guestfs_sync (g);\n"
33634 #: ../src/guestfs.pod:109
33637 " /* Close the handle 'g'. */\n"
33638 " guestfs_close (g);\n"
33643 #: ../src/guestfs.pod:112
33645 "The code above doesn't include any error checking. In real code you should "
33646 "check return values carefully for errors. In general all functions that "
33647 "return integers return C<-1> on error, and all functions that return "
33648 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
33649 "how to handle errors, and consult the documentation for each function call "
33650 "below to see precisely how they return error indications. See L<guestfs-"
33651 "examples(3)> for fully worked examples."
33655 #: ../src/guestfs.pod:121
33656 msgid "DISK IMAGES"
33660 #: ../src/guestfs.pod:123
33662 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
33663 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
33664 "actual block device, or simply an empty file of zeroes that you have created "
33665 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
33670 #: ../src/guestfs.pod:129
33672 "The call you should use in modern code for adding drives is L</"
33673 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
33674 "specifying that the format is raw, do:"
33678 #: ../src/guestfs.pod:133
33681 " guestfs_add_drive_opts (g, filename,\n"
33682 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
33688 #: ../src/guestfs.pod:137
33689 msgid "You can add a disk read-only using:"
33693 #: ../src/guestfs.pod:139
33696 " guestfs_add_drive_opts (g, filename,\n"
33697 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
33698 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
33704 #: ../src/guestfs.pod:144
33706 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
33707 "libguestfs won't modify the file."
33711 #: ../src/guestfs.pod:147
33713 "Be extremely cautious if the disk image is in use, eg. if it is being used "
33714 "by a virtual machine. Adding it read-write will almost certainly cause disk "
33715 "corruption, but adding it read-only is safe."
33719 #: ../src/guestfs.pod:151
33721 "You must add at least one disk image, and you may add multiple disk images. "
33722 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
33723 "first one you added), C</dev/sdb> (for the second one you added), etc."
33727 #: ../src/guestfs.pod:156
33729 "Once L</guestfs_launch> has been called you cannot add any more images. You "
33730 "can call L</guestfs_list_devices> to get a list of the device names, in the "
33731 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
33735 #: ../src/guestfs.pod:161
33740 #: ../src/guestfs.pod:163
33742 "Before you can read or write files, create directories and so on in a disk "
33743 "image that contains filesystems, you have to mount those filesystems using "
33744 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
33745 "a disk image contains (for example) one partition with a filesystem on that "
33746 "partition, then you can mount it directly:"
33750 #: ../src/guestfs.pod:170
33753 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
33758 #: ../src/guestfs.pod:172
33760 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
33761 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
33762 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
33763 "that these are libguestfs virtual devices, and are nothing to do with host "
33768 #: ../src/guestfs.pod:178
33770 "If you are given a disk image and you don't know what it contains then you "
33771 "have to find out. Libguestfs can do that too: use L</"
33772 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
33773 "LVs, and either try mounting each to see what is mountable, or else examine "
33774 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
33775 "filesystems, use L</guestfs_list_filesystems>."
33779 #: ../src/guestfs.pod:186
33781 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
33782 "L</INSPECTION> below). But you might find it easier to look at higher level "
33783 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
33787 #: ../src/guestfs.pod:191
33789 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
33790 "several other variations of the C<guestfs_mount_*> call."
33794 #: ../src/guestfs.pod:194
33795 msgid "FILESYSTEM ACCESS AND MODIFICATION"
33799 #: ../src/guestfs.pod:196
33801 "The majority of the libguestfs API consists of fairly low-level calls for "
33802 "accessing and modifying the files, directories, symlinks etc on mounted "
33803 "filesystems. There are over a hundred such calls which you can find listed "
33804 "in detail below in this man page, and we don't even pretend to cover them "
33805 "all in this overview."
33809 #: ../src/guestfs.pod:202
33811 "Specify filenames as full paths, starting with C<\"/\"> and including the "
33816 #: ../src/guestfs.pod:205
33818 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
33819 "the file called C<\"etc/passwd\"> then you could do:"
33823 #: ../src/guestfs.pod:208
33826 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
33831 #: ../src/guestfs.pod:210
33833 "This would return C<data> as a newly allocated buffer containing the full "
33834 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
33835 "or C<NULL> if there was an error."
33839 #: ../src/guestfs.pod:214
33841 "As another example, to create a top-level directory on that filesystem "
33842 "called C<\"var\"> you would do:"
33846 #: ../src/guestfs.pod:217
33849 " guestfs_mkdir (g, \"/var\");\n"
33854 #: ../src/guestfs.pod:219
33855 msgid "To create a symlink you could do:"
33859 #: ../src/guestfs.pod:221
33862 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
33863 " \"/etc/rc3.d/S30portmap\");\n"
33868 #: ../src/guestfs.pod:224
33870 "Libguestfs will reject attempts to use relative paths and there is no "
33871 "concept of a current working directory."
33875 #: ../src/guestfs.pod:227
33877 "Libguestfs can return errors in many situations: for example if the "
33878 "filesystem isn't writable, or if a file or directory that you requested "
33879 "doesn't exist. If you are using the C API (documented here) you have to "
33880 "check for those error conditions after each call. (Other language bindings "
33881 "turn these errors into exceptions)."
33885 #: ../src/guestfs.pod:233
33887 "File writes are affected by the per-handle umask, set by calling L</"
33888 "guestfs_umask> and defaulting to 022. See L</UMASK>."
33892 #: ../src/guestfs.pod:236
33893 msgid "PARTITIONING"
33897 #: ../src/guestfs.pod:238
33899 "Libguestfs contains API calls to read, create and modify partition tables on "
33904 #: ../src/guestfs.pod:241
33906 "In the common case where you want to create a single partition covering the "
33907 "whole disk, you should use the L</guestfs_part_disk> call:"
33911 #: ../src/guestfs.pod:245
33914 " const char *parttype = \"mbr\";\n"
33915 " if (disk_is_larger_than_2TB)\n"
33916 " parttype = \"gpt\";\n"
33917 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
33922 #: ../src/guestfs.pod:250
33924 "Obviously this effectively wipes anything that was on that disk image before."
33928 #: ../src/guestfs.pod:253
33933 #: ../src/guestfs.pod:255
33935 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
33936 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
33937 "you familiarize yourself with the concepts of physical volumes, volume "
33938 "groups and logical volumes."
33942 #: ../src/guestfs.pod:260
33944 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
33945 "tldp.org/HOWTO/LVM-HOWTO/>."
33949 #: ../src/guestfs.pod:263
33950 msgid "DOWNLOADING"
33954 #: ../src/guestfs.pod:265
33956 "Use L</guestfs_cat> to download small, text only files. This call is "
33957 "limited to files which are less than 2 MB and which cannot contain any ASCII "
33958 "NUL (C<\\0>) characters. However the API is very simple to use."
33962 #: ../src/guestfs.pod:269
33964 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
33965 "bit data, since it returns a (pointer, size) pair. However it is still "
33966 "limited to \"small\" files, less than 2 MB."
33970 #: ../src/guestfs.pod:273
33972 "L</guestfs_download> can be used to download any file, with no limits on "
33973 "content or size (even files larger than 4 GB)."
33977 #: ../src/guestfs.pod:276
33979 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
33983 #: ../src/guestfs.pod:279
33988 #: ../src/guestfs.pod:281
33990 "It's often the case that you want to write a file or files to the disk image."
33994 #: ../src/guestfs.pod:284
33996 "To write a small file with fixed content, use L</guestfs_write>. To create "
33997 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
33998 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
33999 "of other functions for creating test files, for example L</guestfs_fill> and "
34000 "L</guestfs_fill_pattern>."
34004 #: ../src/guestfs.pod:290
34006 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
34007 "file content or size (even files larger than 4 GB)."
34011 #: ../src/guestfs.pod:293
34013 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
34017 #: ../src/guestfs.pod:295
34019 "However the fastest way to upload I<large numbers of arbitrary files> is to "
34020 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
34021 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
34022 "in a predictable way (eg. adding it last after all other drives) then you "
34023 "can get the device name from L</guestfs_list_devices> and mount it directly "
34024 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
34025 "portable between kernel versions, and they don't support labels or UUIDs. "
34026 "If you want to pre-build an image or you need to mount it using a label or "
34027 "UUID, use an ISO image instead."
34031 #: ../src/guestfs.pod:306
34036 #: ../src/guestfs.pod:308
34038 "There are various different commands for copying between files and devices "
34039 "and in and out of the guest filesystem. These are summarised in the table "
34044 #: ../src/guestfs.pod:314
34045 msgid "B<file> to B<file>"
34049 #: ../src/guestfs.pod:316
34051 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
34052 "directories recursively."
34056 #: ../src/guestfs.pod:319
34057 msgid "B<file or device> to B<file or device>"
34061 #: ../src/guestfs.pod:321
34063 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
34064 "devices in the guest."
34068 #: ../src/guestfs.pod:324
34069 msgid "Example: duplicate the contents of an LV:"
34073 #: ../src/guestfs.pod:326
34076 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
34081 #: ../src/guestfs.pod:328
34083 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
34084 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
34085 "guestfs_copy_size>."
34089 #: ../src/guestfs.pod:332
34090 msgid "B<file on the host> to B<file or device>"
34094 #: ../src/guestfs.pod:334
34095 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
34099 #: ../src/guestfs.pod:336
34100 msgid "B<file or device> to B<file on the host>"
34104 #: ../src/guestfs.pod:338
34105 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
34109 #: ../src/guestfs.pod:342
34110 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
34114 #: ../src/guestfs.pod:344
34116 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
34117 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
34118 "appears you can only upload and download to files. However many Un*x-like "
34119 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
34120 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
34121 "and arbitrary file descriptor N."
34125 #: ../src/guestfs.pod:352
34126 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
34130 #: ../src/guestfs.pod:355
34133 " guestfs_download (g, filename, \"/dev/stdout\");\n"
34138 #: ../src/guestfs.pod:357
34139 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
34143 #: ../src/guestfs.pod:359
34146 " char devfd[64];\n"
34147 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
34148 " guestfs_tar_out (g, \"/\", devfd);\n"
34153 #: ../src/guestfs.pod:363
34154 msgid "LISTING FILES"
34158 #: ../src/guestfs.pod:365
34160 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
34161 "L<guestfish(1)>-equivalent command C<ll>)."
34165 #: ../src/guestfs.pod:368
34167 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
34168 "programs, as a flat list of strings."
34172 #: ../src/guestfs.pod:371
34174 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
34175 "directory, plus additional information about each one. It is more "
34176 "equivalent to using the L<readdir(3)> call on a local filesystem."
34180 #: ../src/guestfs.pod:375
34182 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
34186 #: ../src/guestfs.pod:378
34187 msgid "RUNNING COMMANDS"
34191 #: ../src/guestfs.pod:380
34193 "Although libguestfs is primarily an API for manipulating files inside guest "
34194 "images, we also provide some limited facilities for running commands inside "
34199 #: ../src/guestfs.pod:384
34200 msgid "There are many limitations to this:"
34204 #: ../src/guestfs.pod:390
34206 "The kernel version that the command runs under will be different from what "
34211 #: ../src/guestfs.pod:395
34213 "If the command needs to communicate with daemons, then most likely they "
34214 "won't be running."
34218 #: ../src/guestfs.pod:400
34219 msgid "The command will be running in limited memory."
34223 #: ../src/guestfs.pod:404
34225 "The network may not be available unless you enable it (see L</"
34226 "guestfs_set_network>)."
34230 #: ../src/guestfs.pod:409
34231 msgid "Only supports Linux guests (not Windows, BSD, etc)."
34235 #: ../src/guestfs.pod:413
34237 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
34241 #: ../src/guestfs.pod:418
34243 "For SELinux guests, you may need to enable SELinux and load policy first. "
34244 "See L</SELINUX> in this manpage."
34248 #: ../src/guestfs.pod:423
34250 "I<Security:> It is not safe to run commands from untrusted, possibly "
34251 "malicious guests. These commands may attempt to exploit your program by "
34252 "sending unexpected output. They could also try to exploit the Linux kernel "
34253 "or qemu provided by the libguestfs appliance. They could use the network "
34254 "provided by the libguestfs appliance to bypass ordinary network partitions "
34255 "and firewalls. They could use the elevated privileges or different SELinux "
34256 "context of your program to their advantage."
34260 #: ../src/guestfs.pod:432
34262 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
34263 "(a script which runs when the guest next boots normally), and to have this "
34264 "script run the commands you want in the normal context of the running guest, "
34265 "network security and so on. For information about other security issues, "
34266 "see L</SECURITY>."
34270 #: ../src/guestfs.pod:440
34272 "The two main API calls to run commands are L</guestfs_command> and L</"
34273 "guestfs_sh> (there are also variations)."
34277 #: ../src/guestfs.pod:443
34279 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
34280 "shell globs, redirections, etc will work."
34284 #: ../src/guestfs.pod:446
34285 msgid "CONFIGURATION FILES"
34289 #: ../src/guestfs.pod:448
34291 "To read and write configuration files in Linux guest filesystems, we "
34292 "strongly recommend using Augeas. For example, Augeas understands how to "
34293 "read and write, say, a Linux shadow password file or X.org configuration "
34294 "file, and so avoids you having to write that code."
34298 #: ../src/guestfs.pod:453
34300 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
34301 "document Augeas itself here because there is excellent documentation on the "
34302 "L<http://augeas.net/> website."
34306 #: ../src/guestfs.pod:457
34308 "If you don't want to use Augeas (you fool!) then try calling L</"
34309 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
34314 #: ../src/guestfs.pod:461
34319 #: ../src/guestfs.pod:463
34321 "We support SELinux guests. To ensure that labeling happens correctly in "
34322 "SELinux guests, you need to enable SELinux and load the guest's policy:"
34326 #: ../src/guestfs.pod:471
34327 msgid "Before launching, do:"
34331 #: ../src/guestfs.pod:473
34334 " guestfs_set_selinux (g, 1);\n"
34339 #: ../src/guestfs.pod:477
34341 "After mounting the guest's filesystem(s), load the policy. This is best "
34342 "done by running the L<load_policy(8)> command in the guest itself:"
34346 #: ../src/guestfs.pod:481
34349 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
34354 #: ../src/guestfs.pod:483
34356 "(Older versions of C<load_policy> require you to specify the name of the "
34361 #: ../src/guestfs.pod:488
34363 "Optionally, set the security context for the API. The correct security "
34364 "context to use can only be known by inspecting the guest. As an example:"
34368 #: ../src/guestfs.pod:492
34371 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
34376 #: ../src/guestfs.pod:496
34377 msgid "This will work for running commands and editing existing files."
34381 #: ../src/guestfs.pod:498
34383 "When new files are created, you may need to label them explicitly, for "
34384 "example by running the external command C<restorecon pathname>."
34388 #: ../src/guestfs.pod:502
34393 #: ../src/guestfs.pod:504
34395 "Certain calls are affected by the current file mode creation mask (the "
34396 "\"umask\"). In particular ones which create files or directories, such as "
34397 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
34398 "either the default mode that the file is created with or modifies the mode "
34403 #: ../src/guestfs.pod:510
34405 "The default umask is C<022>, so files are created with modes such as C<0644> "
34406 "and directories with C<0755>."
34410 #: ../src/guestfs.pod:513
34412 "There are two ways to avoid being affected by umask. Either set umask to 0 "
34413 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
34414 "guestfs_chmod> after creating each file or directory."
34418 #: ../src/guestfs.pod:517
34419 msgid "For more information about umask, see L<umask(2)>."
34423 #: ../src/guestfs.pod:521
34425 "Libguestfs allows you to access Linux guests which have been encrypted using "
34426 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
34427 "standard. This includes nearly all whole disk encryption systems used by "
34428 "modern Linux guests."
34432 #: ../src/guestfs.pod:527
34434 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
34435 "returns the string C<crypto_LUKS>)."
34439 #: ../src/guestfs.pod:530
34441 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
34442 "will require the passphrase!"
34446 #: ../src/guestfs.pod:533
34448 "Opening a LUKS device creates a new device mapper device called C</dev/"
34449 "mapper/mapname> (where C<mapname> is the string you supply to L</"
34450 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
34451 "from and encrypted to the underlying block device respectively."
34455 #: ../src/guestfs.pod:539
34457 "LVM volume groups on the device can be made visible by calling L</"
34458 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
34459 "(s) can now be mounted in the usual way."
34463 #: ../src/guestfs.pod:543
34465 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
34466 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
34467 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
34468 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
34469 "underlying encrypted block device)."
34473 #: ../src/guestfs.pod:550
34478 #: ../src/guestfs.pod:552
34480 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
34481 "contains operating systems, an install CD or a live CD. (These APIs used to "
34482 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
34483 "version 1.5.3 the most frequently used part of this library has been "
34484 "rewritten in C and moved into the core code)."
34488 #: ../src/guestfs.pod:559
34490 "Add all disks belonging to the unknown virtual machine and call L</"
34491 "guestfs_launch> in the usual way."
34495 #: ../src/guestfs.pod:562
34497 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
34498 "and certain heuristics, and returns a list of operating systems that were "
34499 "found. An empty list means none were found. A single element is the root "
34500 "filesystem of the operating system. For dual- or multi-boot guests, "
34501 "multiple roots can be returned, each one corresponding to a separate "
34502 "operating system. (Multi-boot virtual machines are extremely rare in the "
34503 "world of virtualization, but since this scenario can happen, we have built "
34504 "libguestfs to deal with it.)"
34508 #: ../src/guestfs.pod:571
34510 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
34511 "to get additional details about that operating system. For example, call L</"
34512 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
34513 "Windows and Linux-based operating systems respectively."
34517 #: ../src/guestfs.pod:577
34519 "Un*x-like and Linux-based operating systems usually consist of several "
34520 "filesystems which are mounted at boot time (for example, a separate boot "
34521 "partition mounted on C</boot>). The inspection rules are able to detect how "
34522 "filesystems correspond to mount points. Call "
34523 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
34524 "hash table like this example:"
34528 #: ../src/guestfs.pod:584
34531 " /boot => /dev/sda1\n"
34532 " / => /dev/vg_guest/lv_root\n"
34533 " /usr => /dev/vg_guest/lv_usr\n"
34538 #: ../src/guestfs.pod:588
34540 "The caller can then make calls to L</guestfs_mount_options> to mount the "
34541 "filesystems as suggested."
34545 #: ../src/guestfs.pod:591
34547 "Be careful to mount filesystems in the right order (eg. C</> before C</"
34548 "usr>). Sorting the keys of the hash by length, shortest first, should work."
34552 #: ../src/guestfs.pod:595
34554 "Inspection currently only works for some common operating systems. "
34555 "Contributors are welcome to send patches for other operating systems that we "
34556 "currently cannot detect."
34560 #: ../src/guestfs.pod:599
34562 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
34563 "for more details. The L</guestfs_inspect_os> function just ignores any "
34564 "encrypted devices."
34568 #: ../src/guestfs.pod:603
34570 "A note on the implementation: The call L</guestfs_inspect_os> performs "
34571 "inspection and caches the results in the guest handle. Subsequent calls to "
34572 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
34573 "read the disks. If you change the content of the guest disks, you can redo "
34574 "inspection by calling L</guestfs_inspect_os> again. (L</"
34575 "guestfs_inspect_list_applications> works a little differently from the other "
34576 "calls and does read the disks. See documentation for that function for "
34581 #: ../src/guestfs.pod:612
34582 msgid "INSPECTING INSTALL DISKS"
34586 #: ../src/guestfs.pod:614
34588 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
34593 #: ../src/guestfs.pod:617
34595 "Call L</guestfs_inspect_get_format> to return the format of the operating "
34596 "system, which currently can be C<installed> (a regular operating system) or "
34597 "C<installer> (some sort of install disk)."
34601 #: ../src/guestfs.pod:621
34603 "Further information is available about the operating system that can be "
34604 "installed using the regular inspection APIs like L</"
34605 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
34609 #: ../src/guestfs.pod:626
34611 "Some additional information specific to installer disks is also available "
34612 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
34613 "guestfs_inspect_is_multipart> calls."
34617 #: ../src/guestfs.pod:631
34618 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
34622 #: ../src/guestfs.pod:633
34624 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
34625 "ntfs-3g.org/> driver."
34629 #: ../src/guestfs.pod:636
34630 msgid "DRIVE LETTERS AND PATHS"
34634 #: ../src/guestfs.pod:638
34636 "DOS and Windows still use drive letters, and the filesystems are always "
34637 "treated as case insensitive by Windows itself, and therefore you might find "
34638 "a Windows configuration file referring to a path like C<c:\\windows"
34639 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
34640 "might be referred to as C</WINDOWS/System32>."
34644 #: ../src/guestfs.pod:644
34646 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
34647 "L</guestfs_inspect_get_drive_mappings>)"
34651 #: ../src/guestfs.pod:647
34653 "Dealing with separator characters (backslash vs forward slash) is outside "
34654 "the scope of libguestfs, but usually a simple character replacement will "
34659 #: ../src/guestfs.pod:651
34661 "To resolve the case insensitivity of paths, call L</"
34662 "guestfs_case_sensitive_path>."
34666 #: ../src/guestfs.pod:654
34667 msgid "ACCESSING THE WINDOWS REGISTRY"
34671 #: ../src/guestfs.pod:656
34673 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
34674 "files, through the library C<hivex> which is part of the libguestfs project "
34675 "although ships as a separate tarball. You have to locate and download the "
34676 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
34677 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
34678 "reg(1)> for more help on this issue."
34682 #: ../src/guestfs.pod:664
34683 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
34687 #: ../src/guestfs.pod:666
34689 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
34690 "provide something which looks like a Linux symlink. The way it tries to do "
34691 "the rewriting is described here:"
34695 #: ../src/guestfs.pod:670
34697 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
34702 #: ../src/guestfs.pod:672
34704 "The essential problem is that ntfs-3g simply does not have enough "
34705 "information to do a correct job. NTFS links can contain drive letters and "
34706 "references to external device GUIDs that ntfs-3g has no way of resolving. "
34707 "It is almost certainly the case that libguestfs callers should ignore what "
34708 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
34712 #: ../src/guestfs.pod:679
34714 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
34715 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
34716 "attribute, and read the raw reparse data from that (you can find the format "
34717 "documented in various places around the web)."
34721 #: ../src/guestfs.pod:684
34722 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
34726 #: ../src/guestfs.pod:686
34728 "There are other useful extended attributes that can be read from ntfs-3g "
34729 "filesystems (using L</guestfs_getxattr>). See:"
34733 #: ../src/guestfs.pod:689
34735 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
34739 #: ../src/guestfs.pod:691
34740 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
34744 #: ../src/guestfs.pod:693
34746 "Although we don't want to discourage you from using the C API, we will "
34747 "mention here that the same API is also available in other languages."
34751 #: ../src/guestfs.pod:696
34753 "The API is broadly identical in all supported languages. This means that "
34754 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
34755 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
34756 "OCaml. In other words, a straightforward, predictable isomorphism between "
34761 #: ../src/guestfs.pod:702
34763 "Error messages are automatically transformed into exceptions if the language "
34768 #: ../src/guestfs.pod:705
34770 "We don't try to \"object orientify\" parts of the API in OO languages, "
34771 "although contributors are welcome to write higher level APIs above what we "
34772 "provide in their favourite languages if they wish."
34776 #: ../src/guestfs.pod:711
34781 #: ../src/guestfs.pod:713
34783 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
34784 "identical to the C API. C++ classes and exceptions are not used."
34788 #: ../src/guestfs.pod:717
34793 #: ../src/guestfs.pod:719
34795 "The C# bindings are highly experimental. Please read the warnings at the "
34796 "top of C<csharp/Libguestfs.cs>."
34800 #: ../src/guestfs.pod:722
34805 #: ../src/guestfs.pod:724
34806 msgid "See L<guestfs-erlang(3)>."
34810 #: ../src/guestfs.pod:726
34815 #: ../src/guestfs.pod:728
34817 "This is the only language binding that is working but incomplete. Only "
34818 "calls which return simple integers have been bound in Haskell, and we are "
34819 "looking for help to complete this binding."
34823 #: ../src/guestfs.pod:732
34828 #: ../src/guestfs.pod:734
34830 "Full documentation is contained in the Javadoc which is distributed with "
34831 "libguestfs. For examples, see L<guestfs-java(3)>."
34835 #: ../src/guestfs.pod:737
34840 #: ../src/guestfs.pod:739
34841 msgid "See L<guestfs-ocaml(3)>."
34845 #: ../src/guestfs.pod:741
34850 #: ../src/guestfs.pod:743
34851 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
34855 #: ../src/guestfs.pod:745
34860 #: ../src/guestfs.pod:747
34862 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
34863 "the php-libguestfs package for your distribution."
34867 #: ../src/guestfs.pod:750
34868 msgid "The PHP binding only works correctly on 64 bit machines."
34872 #: ../src/guestfs.pod:752
34877 #: ../src/guestfs.pod:754
34878 msgid "See L<guestfs-python(3)>."
34882 #: ../src/guestfs.pod:756
34887 #: ../src/guestfs.pod:758
34888 msgid "See L<guestfs-ruby(3)>."
34892 #: ../src/guestfs.pod:760
34893 msgid "B<shell scripts>"
34897 #: ../src/guestfs.pod:762
34898 msgid "See L<guestfish(1)>."
34902 #: ../src/guestfs.pod:766
34903 msgid "LIBGUESTFS GOTCHAS"
34907 #: ../src/guestfs.pod:768
34909 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
34910 "system [...] that works in the way it is documented but is counterintuitive "
34911 "and almost invites mistakes.\""
34915 #: ../src/guestfs.pod:772
34917 "Since we developed libguestfs and the associated tools, there are several "
34918 "things we would have designed differently, but are now stuck with for "
34919 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
34920 "release, you can expect these to change. Beware of them."
34924 #: ../src/guestfs.pod:780
34925 msgid "Autosync / forgetting to sync."
34929 #: ../src/guestfs.pod:782
34931 "I<Update:> Autosync is enabled by default for all API users starting from "
34932 "libguestfs 1.5.24. This section only applies to older versions."
34936 #: ../src/guestfs.pod:785
34938 "When modifying a filesystem from C or another language, you B<must> unmount "
34939 "all filesystems and call L</guestfs_sync> explicitly before you close the "
34940 "libguestfs handle. You can also call:"
34944 #: ../src/guestfs.pod:789
34947 " guestfs_set_autosync (g, 1);\n"
34952 #: ../src/guestfs.pod:791
34954 "to have the unmount/sync done automatically for you when the handle 'g' is "
34955 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
34959 #: ../src/guestfs.pod:795
34961 "If you forget to do this, then it is entirely possible that your changes "
34962 "won't be written out, or will be partially written, or (very rarely) that "
34963 "you'll get disk corruption."
34967 #: ../src/guestfs.pod:799
34969 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
34970 "guestfish scripts that forget to sync will work just fine, which can make "
34971 "this very puzzling if you are trying to debug a problem."
34975 #: ../src/guestfs.pod:803
34976 msgid "Mount option C<-o sync> should not be the default."
34980 #: ../src/guestfs.pod:805
34982 "I<Update:> L</guestfs_mount> no longer adds any options starting from "
34983 "libguestfs 1.13.16. This section only applies to older versions."
34987 #: ../src/guestfs.pod:808
34989 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
34990 "However C<-o sync> does not add any reliability benefit, but does have a "
34991 "very large performance impact."
34995 #: ../src/guestfs.pod:812
34997 "The work around is to use L</guestfs_mount_options> and set the mount "
34998 "options that you actually want to use."
35002 #: ../src/guestfs.pod:815
35003 msgid "Read-only should be the default."
35007 #: ../src/guestfs.pod:817
35009 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
35010 "specify I<--rw> if you want to make changes to the image."
35014 #: ../src/guestfs.pod:820
35015 msgid "This would reduce the potential to corrupt live VM images."
35019 #: ../src/guestfs.pod:822
35021 "Note that many filesystems change the disk when you just mount and unmount, "
35022 "even if you didn't perform any writes. You need to use L</"
35023 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
35027 #: ../src/guestfs.pod:826
35028 msgid "guestfish command line is hard to use."
35032 #: ../src/guestfs.pod:828
35034 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
35035 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
35036 "exist, so it fails. In earlier versions of guestfish the error message was "
35037 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
35038 "we should have used C<guestfish -c command> to run commands."
35042 #: ../src/guestfs.pod:835
35043 msgid "guestfish megabyte modifiers don't work right on all commands"
35047 #: ../src/guestfs.pod:837
35049 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
35050 "other modifiers). What guestfish actually does is to multiply the number "
35051 "part by the modifier part and pass the result to the C API. However this "
35052 "doesn't work for a few APIs which aren't expecting bytes, but are already "
35053 "expecting some other unit (eg. megabytes)."
35057 #: ../src/guestfs.pod:844
35058 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
35062 #: ../src/guestfs.pod:846
35065 " lvcreate LV VG 100M\n"
35070 #: ../src/guestfs.pod:848
35072 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
35073 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
35074 "megabytes * megabytes) logical volume. The error message you get from this "
35075 "is also a little obscure."
35079 #: ../src/guestfs.pod:853
35081 "This could be fixed in the generator by specially marking parameters and "
35082 "return values which take bytes or other units."
35086 #: ../src/guestfs.pod:856
35087 msgid "Ambiguity between devices and paths"
35091 #: ../src/guestfs.pod:858
35093 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
35094 "sdb2>) and a similar pathname. A file might just happen to be called "
35095 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
35099 #: ../src/guestfs.pod:863
35101 "In the current API we usually resolve this ambiguity by having two separate "
35102 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
35103 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
35104 "detecting if the path supplied begins with C</dev/>."
35108 #: ../src/guestfs.pod:869
35110 "To avoid both the ambiguity and the need to duplicate some calls, we could "
35111 "make paths/devices into structured names. One way to do this would be to "
35112 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
35113 "aspect of grub. Another way would be to use a structured type, equivalent "
35114 "to this OCaml type:"
35118 #: ../src/guestfs.pod:875
35121 " type path = Path of string | Device of int | Partition of int * int\n"
35126 #: ../src/guestfs.pod:877
35127 msgid "which would allow you to pass arguments like:"
35131 #: ../src/guestfs.pod:879
35134 " Path \"/foo/bar\"\n"
35135 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
35136 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
35137 " Path \"/dev/sdb2\" (* not a device *)\n"
35142 #: ../src/guestfs.pod:884
35144 "As you can see there are still problems to resolve even with this "
35145 "representation. Also consider how it might work in guestfish."
35149 #: ../src/guestfs.pod:889
35150 msgid "KEYS AND PASSPHRASES"
35154 #: ../src/guestfs.pod:891
35156 "Certain libguestfs calls take a parameter that contains sensitive key "
35157 "material, passed in as a C string."
35161 #: ../src/guestfs.pod:894
35163 "In the future we would hope to change the libguestfs implementation so that "
35164 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
35165 "swap. However this is I<not> done at the moment, because of the complexity "
35166 "of such an implementation."
35170 #: ../src/guestfs.pod:899
35172 "Therefore you should be aware that any key parameter you pass to libguestfs "
35173 "might end up being written out to the swap partition. If this is a concern, "
35174 "scrub the swap partition or don't use libguestfs on encrypted devices."
35178 #: ../src/guestfs.pod:904
35179 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
35183 #: ../src/guestfs.pod:906
35185 "All high-level libguestfs actions are synchronous. If you want to use "
35186 "libguestfs asynchronously then you must create a thread."
35190 #: ../src/guestfs.pod:909
35192 "Only use the handle from a single thread. Either use the handle exclusively "
35193 "from one thread, or provide your own mutex so that two threads cannot issue "
35194 "calls on the same handle at the same time."
35198 #: ../src/guestfs.pod:913
35200 "See the graphical program guestfs-browser for one possible architecture for "
35201 "multithreaded programs using libvirt and libguestfs."
35205 #: ../src/guestfs.pod:916
35210 #: ../src/guestfs.pod:918
35212 "Libguestfs needs a supermin appliance, which it finds by looking along an "
35217 #: ../src/guestfs.pod:921
35219 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
35220 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
35224 #: ../src/guestfs.pod:924
35226 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
35227 "to change the directories that libguestfs will search in. The value is a "
35228 "colon-separated list of paths. The current directory is I<not> searched "
35229 "unless the path contains an empty element or C<.>. For example "
35230 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
35231 "then C</usr/lib/guestfs>."
35235 #: ../src/guestfs.pod:931
35236 msgid "QEMU WRAPPERS"
35240 #: ../src/guestfs.pod:933
35242 "If you want to compile your own qemu, run qemu from a non-standard location, "
35243 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
35248 #: ../src/guestfs.pod:937
35250 "There is one important rule to remember: you I<must C<exec qemu>> as the "
35251 "last command in the shell script (so that qemu replaces the shell and "
35252 "becomes the direct child of the libguestfs-using program). If you don't do "
35253 "this, then the qemu process won't be cleaned up correctly."
35257 #: ../src/guestfs.pod:942
35259 "Here is an example of a wrapper, where I have built my own copy of qemu from "
35264 #: ../src/guestfs.pod:945
35268 " qemudir=/home/rjones/d/qemu\n"
35269 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
35274 #: ../src/guestfs.pod:949
35276 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
35277 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
35282 #: ../src/guestfs.pod:953
35285 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
35290 #: ../src/guestfs.pod:955
35292 "Note that libguestfs also calls qemu with the -help and -version options in "
35293 "order to determine features."
35297 #: ../src/guestfs.pod:958
35299 "Wrappers can also be used to edit the options passed to qemu. In the "
35300 "following example, the C<-machine ...> option (C<-machine> and the following "
35301 "argument) are removed from the command line and replaced with C<-machine pc,"
35302 "accel=tcg>. The while loop iterates over the options until it finds the "
35303 "right one to remove, putting the remaining options into the C<args> array."
35307 #: ../src/guestfs.pod:967
35311 " while [ $# -gt 0 ]; do\n"
35312 " case \"$1\" in\n"
35316 " args[i]=\"$1\"\n"
35325 #: ../src/guestfs.pod:979
35328 " exec qemu-kvm -machine pc,accel=tcg \"${args[@]}\"\n"
35333 #: ../src/guestfs.pod:981
35334 msgid "ATTACHING TO RUNNING DAEMONS"
35338 #: ../src/guestfs.pod:983
35340 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
35341 "babies. Use with caution."
35345 #: ../src/guestfs.pod:986
35347 "I<Note (2):> This section explains how to attach to a running daemon from a "
35348 "low level perspective. For most users, simply using virt tools such as "
35349 "L<guestfish(1)> with the I<--live> option will \"just work\"."
35353 #: ../src/guestfs.pod:990
35354 msgid "Using guestfs_set_attach_method"
35358 #: ../src/guestfs.pod:992
35360 "By calling L</guestfs_set_attach_method> you can change how the library "
35361 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
35362 "ARCHITECTURE> for some background)."
35366 #: ../src/guestfs.pod:996
35368 "The normal attach method is C<appliance>, where a small appliance is created "
35369 "containing the daemon, and then the library connects to this."
35373 #: ../src/guestfs.pod:999
35375 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
35376 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
35377 "daemon over the Unix domain socket."
35381 #: ../src/guestfs.pod:1003
35383 "The normal use for this is to connect to a running virtual machine that "
35384 "contains a C<guestfsd> daemon, and send commands so you can read and write "
35385 "files inside the live virtual machine."
35389 #: ../src/guestfs.pod:1007
35390 msgid "Using guestfs_add_domain with live flag"
35394 #: ../src/guestfs.pod:1009
35396 "L</guestfs_add_domain> provides some help for getting the correct attach "
35397 "method. If you pass the C<live> option to this function, then (if the "
35398 "virtual machine is running) it will examine the libvirt XML looking for a "
35399 "virtio-serial channel to connect to:"
35403 #: ../src/guestfs.pod:1015
35410 " <channel type='unix'>\n"
35411 " <source mode='bind' path='/path/to/socket'/>\n"
35412 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
35421 #: ../src/guestfs.pod:1027
35423 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
35424 "method to C<unix:/path/to/socket>."
35428 #: ../src/guestfs.pod:1030
35430 "Some of the libguestfs tools (including guestfish) support a I<--live> "
35431 "option which is passed through to L</guestfs_add_domain> thus allowing you "
35432 "to attach to and modify live virtual machines."
35436 #: ../src/guestfs.pod:1034
35438 "The virtual machine needs to have been set up beforehand so that it has the "
35439 "virtio-serial channel and so that guestfsd is running inside it."
35443 #: ../src/guestfs.pod:1038
35444 msgid "ABI GUARANTEE"
35448 #: ../src/guestfs.pod:1040
35450 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
35451 "actions as outlined in this section. Although we will deprecate some "
35452 "actions, for example if they get replaced by newer calls, we will keep the "
35453 "old actions forever. This allows you the developer to program in confidence "
35454 "against the libguestfs API."
35458 #: ../src/guestfs.pod:1046
35459 msgid "BLOCK DEVICE NAMING"
35463 #: ../src/guestfs.pod:1048
35465 "In the kernel there is now quite a profusion of schemata for naming block "
35466 "devices (in this context, by I<block device> I mean a physical or virtual "
35467 "hard drive). The original Linux IDE driver used names starting with C</dev/"
35468 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
35469 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
35470 "for the old IDE driver (particularly for SATA devices) those devices also "
35471 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
35472 "paravirtualized drivers. This has created several different naming systems, "
35473 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
35477 #: ../src/guestfs.pod:1060
35479 "As discussed above, libguestfs uses a qemu appliance running an embedded "
35480 "Linux kernel to access block devices. We can run a variety of appliances "
35481 "based on a variety of Linux kernels."
35485 #: ../src/guestfs.pod:1064
35487 "This causes a problem for libguestfs because many API calls use device or "
35488 "partition names. Working scripts and the recipe (example) scripts that we "
35489 "make available over the internet could fail if the naming scheme changes."
35493 #: ../src/guestfs.pod:1069
35495 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
35496 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
35497 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
35498 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
35502 #: ../src/guestfs.pod:1075
35504 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
35505 "L</guestfs_list_partitions> and similar calls return the true names of the "
35506 "devices and partitions as known to the appliance."
35510 #: ../src/guestfs.pod:1080
35511 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
35515 #: ../src/guestfs.pod:1082
35517 "Usually this translation is transparent. However in some (very rare) cases "
35518 "you may need to know the exact algorithm. Such cases include where you use "
35519 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
35520 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
35524 #: ../src/guestfs.pod:1088
35526 "The algorithm is applied only to I<parameters> which are known to be either "
35527 "device or partition names. Return values from functions such as L</"
35528 "guestfs_list_devices> are never changed."
35532 #: ../src/guestfs.pod:1096
35533 msgid "Is the string a parameter which is a device or partition name?"
35537 #: ../src/guestfs.pod:1100
35538 msgid "Does the string begin with C</dev/sd>?"
35542 #: ../src/guestfs.pod:1104
35544 "Does the named device exist? If so, we use that device. However if I<not> "
35545 "then we continue with this algorithm."
35549 #: ../src/guestfs.pod:1109
35550 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
35554 #: ../src/guestfs.pod:1111
35555 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
35559 #: ../src/guestfs.pod:1113
35560 msgid "If that named device exists, use it. If not, continue."
35564 #: ../src/guestfs.pod:1117
35565 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
35569 #: ../src/guestfs.pod:1119
35570 msgid "If that named device exists, use it. If not, return an error."
35574 #: ../src/guestfs.pod:1123
35575 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
35579 #: ../src/guestfs.pod:1125
35581 "Although the standard naming scheme and automatic translation is useful for "
35582 "simple programs and guestfish scripts, for larger programs it is best not to "
35583 "rely on this mechanism."
35587 #: ../src/guestfs.pod:1129
35589 "Where possible for maximum future portability programs using libguestfs "
35590 "should use these future-proof techniques:"
35594 #: ../src/guestfs.pod:1136
35596 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
35597 "device names, and then use those names directly."
35601 #: ../src/guestfs.pod:1139
35603 "Since those device names exist by definition, they will never be translated."
35607 #: ../src/guestfs.pod:1144
35609 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
35610 "filesystem labels."
35614 #: ../src/guestfs.pod:1151
35616 "This section discusses security implications of using libguestfs, "
35617 "particularly with untrusted or malicious guests or disk images."
35621 #: ../src/guestfs.pod:1154
35622 msgid "GENERAL SECURITY CONSIDERATIONS"
35626 #: ../src/guestfs.pod:1156
35628 "Be careful with any files or data that you download from a guest (by "
35629 "\"download\" we mean not just the L</guestfs_download> command but any "
35630 "command that reads files, filenames, directories or anything else from a "
35631 "disk image). An attacker could manipulate the data to fool your program "
35632 "into doing the wrong thing. Consider cases such as:"
35636 #: ../src/guestfs.pod:1166
35637 msgid "the data (file etc) not being present"
35641 #: ../src/guestfs.pod:1170
35642 msgid "being present but empty"
35646 #: ../src/guestfs.pod:1174
35647 msgid "being much larger than normal"
35651 #: ../src/guestfs.pod:1178
35652 msgid "containing arbitrary 8 bit data"
35656 #: ../src/guestfs.pod:1182
35657 msgid "being in an unexpected character encoding"
35661 #: ../src/guestfs.pod:1186
35662 msgid "containing homoglyphs."
35666 #: ../src/guestfs.pod:1190
35667 msgid "SECURITY OF MOUNTING FILESYSTEMS"
35671 #: ../src/guestfs.pod:1192
35673 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
35674 "(VFS) module can sometimes be escalated into exploits by deliberately "
35675 "creating a malicious, malformed filesystem. These exploits are very severe "
35676 "for two reasons. Firstly there are very many filesystem drivers in the "
35677 "kernel, and many of them are infrequently used and not much developer "
35678 "attention has been paid to the code. Linux userspace helps potential "
35679 "crackers by detecting the filesystem type and automatically choosing the "
35680 "right VFS driver, even if that filesystem type is obscure or unexpected for "
35681 "the administrator. Secondly, a kernel-level exploit is like a local root "
35682 "exploit (worse in some ways), giving immediate and total access to the "
35683 "system right down to the hardware level."
35687 #: ../src/guestfs.pod:1205
35689 "That explains why you should never mount a filesystem from an untrusted "
35690 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
35691 "inside a qemu virtual machine, usually running as a non-root user. The "
35692 "attacker would need to write a filesystem which first exploited the kernel, "
35693 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
35694 "the libguestfs protocol, and finally to be as serious as the host kernel "
35695 "exploit it would need to escalate its privileges to root. This multi-step "
35696 "escalation, performed by a static piece of data, is thought to be extremely "
35697 "hard to do, although we never say 'never' about security issues."
35701 #: ../src/guestfs.pod:1216
35703 "In any case callers can reduce the attack surface by forcing the filesystem "
35704 "type when mounting (use L</guestfs_mount_vfs>)."
35708 #: ../src/guestfs.pod:1219
35709 msgid "PROTOCOL SECURITY"
35713 #: ../src/guestfs.pod:1221
35715 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
35716 "defined upper message size. However a program that uses libguestfs must "
35717 "also take care - for example you can write a program that downloads a binary "
35718 "from a disk image and executes it locally, and no amount of protocol "
35719 "security will save you from the consequences."
35723 #: ../src/guestfs.pod:1227
35724 msgid "INSPECTION SECURITY"
35728 #: ../src/guestfs.pod:1229
35730 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
35731 "directly from the guest, and these could contain any 8 bit data. Callers "
35732 "should be careful to escape these before printing them to a structured file "
35733 "(for example, use HTML escaping if creating a web page)."
35737 #: ../src/guestfs.pod:1235
35739 "Guest configuration may be altered in unusual ways by the administrator of "
35740 "the virtual machine, and may not reflect reality (particularly for untrusted "
35741 "or actively malicious guests). For example we parse the hostname from "
35742 "configuration files like C</etc/sysconfig/network> that we find in the "
35743 "guest, but the guest administrator can easily manipulate these files to "
35744 "provide the wrong hostname."
35748 #: ../src/guestfs.pod:1243
35750 "The inspection API parses guest configuration using two external libraries: "
35751 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
35752 "designed to be robust in the face of malicious data, although denial of "
35753 "service attacks are still possible, for example with oversized configuration "
35758 #: ../src/guestfs.pod:1249
35759 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
35763 #: ../src/guestfs.pod:1251
35765 "Be very cautious about running commands from the guest. By running a "
35766 "command in the guest, you are giving CPU time to a binary that you do not "
35767 "control, under the same user account as the library, albeit wrapped in qemu "
35768 "virtualization. More information and alternatives can be found in the "
35769 "section L</RUNNING COMMANDS>."
35773 #: ../src/guestfs.pod:1257
35774 msgid "CVE-2010-3851"
35778 #: ../src/guestfs.pod:1259
35779 msgid "https://bugzilla.redhat.com/642934"
35783 #: ../src/guestfs.pod:1261
35785 "This security bug concerns the automatic disk format detection that qemu "
35786 "does on disk images."
35790 #: ../src/guestfs.pod:1264
35792 "A raw disk image is just the raw bytes, there is no header. Other disk "
35793 "images like qcow2 contain a special header. Qemu deals with this by looking "
35794 "for one of the known headers, and if none is found then assuming the disk "
35795 "image must be raw."
35799 #: ../src/guestfs.pod:1269
35801 "This allows a guest which has been given a raw disk image to write some "
35802 "other header. At next boot (or when the disk image is accessed by "
35803 "libguestfs) qemu would do autodetection and think the disk image format was, "
35804 "say, qcow2 based on the header written by the guest."
35808 #: ../src/guestfs.pod:1274
35810 "This in itself would not be a problem, but qcow2 offers many features, one "
35811 "of which is to allow a disk image to refer to another image (called the "
35812 "\"backing disk\"). It does this by placing the path to the backing disk "
35813 "into the qcow2 header. This path is not validated and could point to any "
35814 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
35815 "\"holes\" in the qcow2 disk image, which of course is completely under the "
35816 "control of the attacker."
35820 #: ../src/guestfs.pod:1282
35822 "In libguestfs this is rather hard to exploit except under two circumstances:"
35826 #: ../src/guestfs.pod:1289
35827 msgid "You have enabled the network or have opened the disk in write mode."
35831 #: ../src/guestfs.pod:1293
35833 "You are also running untrusted code from the guest (see L</RUNNING "
35838 #: ../src/guestfs.pod:1298
35840 "The way to avoid this is to specify the expected disk format when adding "
35841 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
35842 "should always do this if the disk is raw format, and it's a good idea for "
35847 #: ../src/guestfs.pod:1303
35849 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
35850 "format is fetched from libvirt and passed through."
35854 #: ../src/guestfs.pod:1306
35856 "For libguestfs tools, use the I<--format> command line parameter as "
35861 #: ../src/guestfs.pod:1309
35862 msgid "CONNECTION MANAGEMENT"
35866 #: ../src/guestfs.pod:1311
35867 msgid "guestfs_h *"
35871 #: ../src/guestfs.pod:1313
35873 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
35874 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
35875 "handle and release all resources used."
35879 #: ../src/guestfs.pod:1317
35881 "For information on using multiple handles and threads, see the section L</"
35882 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
35886 #: ../src/guestfs.pod:1320
35887 msgid "guestfs_create"
35891 #: ../src/guestfs.pod:1322
35894 " guestfs_h *guestfs_create (void);\n"
35899 #: ../src/guestfs.pod:1324
35900 msgid "Create a connection handle."
35904 #: ../src/guestfs.pod:1326
35906 "On success this returns a non-NULL pointer to a handle. On error it returns "
35911 #: ../src/guestfs.pod:1329
35913 "You have to \"configure\" the handle after creating it. This includes "
35914 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
35915 "handle at least once."
35919 #: ../src/guestfs.pod:1333
35920 msgid "After configuring the handle, you have to call L</guestfs_launch>."
35924 #: ../src/guestfs.pod:1335
35926 "You may also want to configure error handling for the handle. See the L</"
35927 "ERROR HANDLING> section below."
35931 #: ../src/guestfs.pod:1338
35932 msgid "guestfs_close"
35936 #: ../src/guestfs.pod:1340
35939 " void guestfs_close (guestfs_h *g);\n"
35944 #: ../src/guestfs.pod:1342
35945 msgid "This closes the connection handle and frees up all resources used."
35949 #: ../src/guestfs.pod:1344
35951 "If autosync was set on the handle and the handle was launched, then this "
35952 "implicitly calls various functions to unmount filesystems and sync the "
35953 "disk. See L</guestfs_set_autosync> for more details."
35957 #: ../src/guestfs.pod:1348
35958 msgid "If a close callback was set on the handle, then it is called."
35962 #: ../src/guestfs.pod:1350
35963 msgid "ERROR HANDLING"
35967 #: ../src/guestfs.pod:1352
35969 "API functions can return errors. For example, almost all functions that "
35970 "return C<int> will return C<-1> to indicate an error."
35974 #: ../src/guestfs.pod:1355
35976 "Additional information is available for errors: an error message string and "
35977 "optionally an error number (errno) if the thing that failed was a system "
35982 #: ../src/guestfs.pod:1359
35984 "You can get at the additional information about the last error on the handle "
35985 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
35986 "up an error handler with L</guestfs_set_error_handler>."
35990 #: ../src/guestfs.pod:1364
35992 "When the handle is created, a default error handler is installed which "
35993 "prints the error message string to C<stderr>. For small short-running "
35994 "command line programs it is sufficient to do:"
35998 #: ../src/guestfs.pod:1368
36001 " if (guestfs_launch (g) == -1)\n"
36002 " exit (EXIT_FAILURE);\n"
36007 #: ../src/guestfs.pod:1371
36009 "since the default error handler will ensure that an error message has been "
36010 "printed to C<stderr> before the program exits."
36014 #: ../src/guestfs.pod:1374
36016 "For other programs the caller will almost certainly want to install an "
36017 "alternate error handler or do error handling in-line like this:"
36021 #: ../src/guestfs.pod:1377
36024 " /* This disables the default behaviour of printing errors\n"
36026 " guestfs_set_error_handler (g, NULL, NULL);\n"
36031 #: ../src/guestfs.pod:1381
36034 " if (guestfs_launch (g) == -1) {\n"
36035 " /* Examine the error message and print it etc. */\n"
36036 " char *msg = guestfs_last_error (g);\n"
36037 " int errnum = guestfs_last_errno (g);\n"
36038 " fprintf (stderr, \"%s\", msg);\n"
36039 " if (errnum != 0)\n"
36040 " fprintf (stderr, \": %s\", strerror (errnum));\n"
36041 " fprintf (stderr, \"\\n\");\n"
36048 #: ../src/guestfs.pod:1392
36050 "Out of memory errors are handled differently. The default action is to call "
36051 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
36052 "guestfs_set_out_of_memory_handler>."
36056 #: ../src/guestfs.pod:1396
36058 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
36059 "because there is no handle if this happens there is no way to get additional "
36060 "error information. However L</guestfs_create> is supposed to be a "
36061 "lightweight operation which can only fail because of insufficient memory (it "
36062 "returns NULL in this case)."
36066 #: ../src/guestfs.pod:1402
36067 msgid "guestfs_last_error"
36071 #: ../src/guestfs.pod:1404
36074 " const char *guestfs_last_error (guestfs_h *g);\n"
36079 #: ../src/guestfs.pod:1406
36081 "This returns the last error message that happened on C<g>. If there has not "
36082 "been an error since the handle was created, then this returns C<NULL>."
36086 #: ../src/guestfs.pod:1410
36088 "The lifetime of the returned string is until the next error occurs, or L</"
36089 "guestfs_close> is called."
36093 #: ../src/guestfs.pod:1413
36094 msgid "guestfs_last_errno"
36098 #: ../src/guestfs.pod:1415
36101 " int guestfs_last_errno (guestfs_h *g);\n"
36106 #: ../src/guestfs.pod:1417
36107 msgid "This returns the last error number (errno) that happened on C<g>."
36111 #: ../src/guestfs.pod:1419
36112 msgid "If successful, an errno integer not equal to zero is returned."
36116 #: ../src/guestfs.pod:1421
36118 "If no error, this returns 0. This call can return 0 in three situations:"
36122 #: ../src/guestfs.pod:1428
36123 msgid "There has not been any error on the handle."
36127 #: ../src/guestfs.pod:1432
36129 "There has been an error but the errno was meaningless. This corresponds to "
36130 "the case where the error did not come from a failed system call, but for "
36131 "some other reason."
36135 #: ../src/guestfs.pod:1438
36137 "There was an error from a failed system call, but for some reason the errno "
36138 "was not captured and returned. This usually indicates a bug in libguestfs."
36142 #: ../src/guestfs.pod:1444
36144 "Libguestfs tries to convert the errno from inside the applicance into a "
36145 "corresponding errno for the caller (not entirely trivial: the appliance "
36146 "might be running a completely different operating system from the library "
36147 "and error numbers are not standardized across Un*xen). If this could not be "
36148 "done, then the error is translated to C<EINVAL>. In practice this should "
36149 "only happen in very rare circumstances."
36153 #: ../src/guestfs.pod:1452
36154 msgid "guestfs_set_error_handler"
36158 #: ../src/guestfs.pod:1454
36161 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
36163 " const char *msg);\n"
36164 " void guestfs_set_error_handler (guestfs_h *g,\n"
36165 " guestfs_error_handler_cb cb,\n"
36166 " void *opaque);\n"
36171 #: ../src/guestfs.pod:1461
36173 "The callback C<cb> will be called if there is an error. The parameters "
36174 "passed to the callback are an opaque data pointer and the error message "
36179 #: ../src/guestfs.pod:1465
36181 "C<errno> is not passed to the callback. To get that the callback must call "
36182 "L</guestfs_last_errno>."
36186 #: ../src/guestfs.pod:1468
36188 "Note that the message string C<msg> is freed as soon as the callback "
36189 "function returns, so if you want to stash it somewhere you must make your "
36194 #: ../src/guestfs.pod:1472
36195 msgid "The default handler prints messages on C<stderr>."
36199 #: ../src/guestfs.pod:1474
36200 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
36204 #: ../src/guestfs.pod:1476
36205 msgid "guestfs_get_error_handler"
36209 #: ../src/guestfs.pod:1478
36212 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
36213 " void **opaque_rtn);\n"
36218 #: ../src/guestfs.pod:1481
36219 msgid "Returns the current error handler callback."
36223 #: ../src/guestfs.pod:1483
36224 msgid "guestfs_set_out_of_memory_handler"
36228 #: ../src/guestfs.pod:1485
36231 " typedef void (*guestfs_abort_cb) (void);\n"
36232 " void guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
36233 " guestfs_abort_cb);\n"
36238 #: ../src/guestfs.pod:1489
36240 "The callback C<cb> will be called if there is an out of memory situation. "
36241 "I<Note this callback must not return>."
36245 #: ../src/guestfs.pod:1492
36246 msgid "The default is to call L<abort(3)>."
36250 #: ../src/guestfs.pod:1494
36252 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
36256 #: ../src/guestfs.pod:1497
36257 msgid "guestfs_get_out_of_memory_handler"
36261 #: ../src/guestfs.pod:1499
36264 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
36269 #: ../src/guestfs.pod:1501
36270 msgid "This returns the current out of memory handler."
36274 #: ../src/guestfs.pod:1503
36279 #: ../src/guestfs.pod:1507
36284 #: ../src/guestfs.pod:1509
36289 #: ../src/guestfs.pod:1511
36290 msgid "AVAILABILITY"
36294 #: ../src/guestfs.pod:1513
36295 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
36299 #: ../src/guestfs.pod:1515
36301 "Using L</guestfs_available> you can test availability of the following "
36302 "groups of functions. This test queries the appliance to see if the "
36303 "appliance you are currently using supports the functionality."
36307 #: ../src/guestfs.pod:1520
36308 msgid "@AVAILABILITY@"
36312 #: ../src/guestfs.pod:1522
36313 msgid "GUESTFISH supported COMMAND"
36317 #: ../src/guestfs.pod:1524
36319 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
36320 "prints out the available groups and whether they are supported by this build "
36321 "of libguestfs. Note however that you have to do C<run> first."
36325 #: ../src/guestfs.pod:1529
36326 msgid "SINGLE CALLS AT COMPILE TIME"
36330 #: ../src/guestfs.pod:1531
36332 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
36333 "function, such as:"
36337 #: ../src/guestfs.pod:1534
36340 " #define LIBGUESTFS_HAVE_DD 1\n"
36345 #: ../src/guestfs.pod:1536
36346 msgid "if L</guestfs_dd> is available."
36350 #: ../src/guestfs.pod:1538
36352 "Before version 1.5.8, if you needed to test whether a single libguestfs "
36353 "function is available at compile time, we recommended using build tools such "
36354 "as autoconf or cmake. For example in autotools you could use:"
36358 #: ../src/guestfs.pod:1543
36361 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
36362 " AC_CHECK_FUNCS([guestfs_dd])\n"
36367 #: ../src/guestfs.pod:1546
36369 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
36374 #: ../src/guestfs.pod:1549
36375 msgid "SINGLE CALLS AT RUN TIME"
36379 #: ../src/guestfs.pod:1551
36381 "Testing at compile time doesn't guarantee that a function really exists in "
36382 "the library. The reason is that you might be dynamically linked against a "
36383 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
36384 "This situation unfortunately results in a segmentation fault, which is a "
36385 "shortcoming of the C dynamic linking system itself."
36389 #: ../src/guestfs.pod:1558
36391 "You can use L<dlopen(3)> to test if a function is available at run time, as "
36392 "in this example program (note that you still need the compile time check as "
36397 #: ../src/guestfs.pod:1562
36400 " #include <stdio.h>\n"
36401 " #include <stdlib.h>\n"
36402 " #include <unistd.h>\n"
36403 " #include <dlfcn.h>\n"
36404 " #include <guestfs.h>\n"
36409 #: ../src/guestfs.pod:1568
36414 " #ifdef LIBGUESTFS_HAVE_DD\n"
36416 " int has_function;\n"
36421 #: ../src/guestfs.pod:1574
36424 " /* Test if the function guestfs_dd is really available. */\n"
36425 " dl = dlopen (NULL, RTLD_LAZY);\n"
36427 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
36428 " exit (EXIT_FAILURE);\n"
36430 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
36436 #: ../src/guestfs.pod:1583
36439 " if (!has_function)\n"
36440 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
36442 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
36443 " /* Now it's safe to call\n"
36444 " guestfs_dd (g, \"foo\", \"bar\");\n"
36448 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
36455 #: ../src/guestfs.pod:1596
36457 "You may think the above is an awful lot of hassle, and it is. There are "
36458 "other ways outside of the C linking system to ensure that this kind of "
36459 "incompatibility never arises, such as using package versioning:"
36463 #: ../src/guestfs.pod:1601
36466 " Requires: libguestfs >= 1.0.80\n"
36471 #: ../src/guestfs.pod:1603
36472 msgid "CALLS WITH OPTIONAL ARGUMENTS"
36476 #: ../src/guestfs.pod:1605
36478 "A recent feature of the API is the introduction of calls which take optional "
36479 "arguments. In C these are declared 3 ways. The main way is as a call which "
36480 "takes variable arguments (ie. C<...>), as in this example:"
36484 #: ../src/guestfs.pod:1610
36487 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
36492 #: ../src/guestfs.pod:1612
36494 "Call this with a list of optional arguments, terminated by C<-1>. So to "
36495 "call with no optional arguments specified:"
36499 #: ../src/guestfs.pod:1615
36502 " guestfs_add_drive_opts (g, filename, -1);\n"
36507 #: ../src/guestfs.pod:1617
36508 msgid "With a single optional argument:"
36512 #: ../src/guestfs.pod:1619
36515 " guestfs_add_drive_opts (g, filename,\n"
36516 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
36522 #: ../src/guestfs.pod:1623
36527 #: ../src/guestfs.pod:1625
36530 " guestfs_add_drive_opts (g, filename,\n"
36531 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
36532 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
36538 #: ../src/guestfs.pod:1630
36540 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
36545 #: ../src/guestfs.pod:1633
36546 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
36550 #: ../src/guestfs.pod:1635
36552 "The second variant has the same name with the suffix C<_va>, which works the "
36553 "same way but takes a C<va_list>. See the C manual for details. For the "
36554 "example function, this is declared:"
36558 #: ../src/guestfs.pod:1639
36561 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
36562 " va_list args);\n"
36567 #: ../src/guestfs.pod:1642
36568 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
36572 #: ../src/guestfs.pod:1644
36574 "The third variant is useful where you need to construct these calls. You "
36575 "pass in a structure where you fill in the optional fields. The structure "
36576 "has a bitmask as the first element which you must set to indicate which "
36577 "fields you have filled in. For our example function the structure and call "
36582 #: ../src/guestfs.pod:1650
36585 " struct guestfs_add_drive_opts_argv {\n"
36586 " uint64_t bitmask;\n"
36588 " const char *format;\n"
36591 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
36592 " const struct guestfs_add_drive_opts_argv *optargs);\n"
36597 #: ../src/guestfs.pod:1659
36598 msgid "You could call it like this:"
36602 #: ../src/guestfs.pod:1661
36605 " struct guestfs_add_drive_opts_argv optargs = {\n"
36606 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
36607 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
36608 " .readonly = 1,\n"
36609 " .format = \"qcow2\"\n"
36615 #: ../src/guestfs.pod:1668
36618 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
36623 #: ../src/guestfs.pod:1676
36624 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
36628 #: ../src/guestfs.pod:1681
36629 msgid "You do not need to fill in all fields of the structure."
36633 #: ../src/guestfs.pod:1685
36635 "There must be a one-to-one correspondence between fields of the structure "
36636 "that are filled in, and bits set in the bitmask."
36640 #: ../src/guestfs.pod:1690
36641 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
36645 #: ../src/guestfs.pod:1692
36647 "In other languages, optional arguments are expressed in the way that is "
36648 "natural for that language. We refer you to the language-specific "
36649 "documentation for more details on that."
36653 #: ../src/guestfs.pod:1696
36654 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
36658 #: ../src/guestfs.pod:1698
36659 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
36663 #: ../src/guestfs.pod:1700
36665 "B<Note:> This section documents the generic event mechanism introduced in "
36666 "libguestfs 1.10, which you should use in new code if possible. The old "
36667 "functions C<guestfs_set_log_message_callback>, "
36668 "C<guestfs_set_subprocess_quit_callback>, "
36669 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
36670 "C<guestfs_set_progress_callback> are no longer documented in this manual "
36671 "page. Because of the ABI guarantee, the old functions continue to work."
36675 #: ../src/guestfs.pod:1709
36677 "Handles generate events when certain things happen, such as log messages "
36678 "being generated, progress messages during long-running operations, or the "
36679 "handle being closed. The API calls described below let you register a "
36680 "callback to be called when events happen. You can register multiple "
36681 "callbacks (for the same, different or overlapping sets of events), and "
36682 "individually remove callbacks. If callbacks are not removed, then they "
36683 "remain in force until the handle is closed."
36687 #: ../src/guestfs.pod:1717
36689 "In the current implementation, events are only generated synchronously: that "
36690 "means that events (and hence callbacks) can only happen while you are in the "
36691 "middle of making another libguestfs call. The callback is called in the "
36696 #: ../src/guestfs.pod:1722
36698 "Events may contain a payload, usually nothing (void), an array of 64 bit "
36699 "unsigned integers, or a message buffer. Payloads are discussed later on."
36703 #: ../src/guestfs.pod:1726
36704 msgid "CLASSES OF EVENTS"
36708 #: ../src/guestfs.pod:1730
36709 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
36713 #: ../src/guestfs.pod:1733
36715 "The callback function will be called while the handle is being closed "
36716 "(synchronously from L</guestfs_close>)."
36720 #: ../src/guestfs.pod:1736
36722 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
36723 "handles that are open when the program exits. This means that this callback "
36724 "might be called indirectly from L<exit(3)>, which can cause unexpected "
36725 "problems in higher-level languages (eg. if your HLL interpreter has already "
36726 "been cleaned up by the time this is called, and if your callback then jumps "
36727 "into some HLL function)."
36731 #: ../src/guestfs.pod:1743
36733 "If no callback is registered: the handle is closed without any callback "
36738 #: ../src/guestfs.pod:1746
36739 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
36743 #: ../src/guestfs.pod:1749
36745 "The callback function will be called when the child process quits, either "
36746 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
36747 "corresponds to a transition from any state to the CONFIG state)."
36751 #: ../src/guestfs.pod:1753 ../src/guestfs.pod:1762 ../src/guestfs.pod:1879
36752 msgid "If no callback is registered: the event is ignored."
36756 #: ../src/guestfs.pod:1755
36757 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
36761 #: ../src/guestfs.pod:1758
36763 "The callback function will be called when the child process becomes ready "
36764 "first time after it has been launched. (This corresponds to a transition "
36765 "from LAUNCHING to the READY state)."
36769 #: ../src/guestfs.pod:1764
36770 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
36774 #: ../src/guestfs.pod:1767
36776 "Some long-running operations can generate progress messages. If this "
36777 "callback is registered, then it will be called each time a progress message "
36778 "is generated (usually two seconds after the operation started, and three "
36779 "times per second thereafter until it completes, although the frequency may "
36780 "change in future versions)."
36784 #: ../src/guestfs.pod:1773
36786 "The callback receives in the payload four unsigned 64 bit numbers which are "
36787 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
36791 #: ../src/guestfs.pod:1776
36793 "The units of C<total> are not defined, although for some operations C<total> "
36794 "may relate in some way to the amount of data to be transferred (eg. in bytes "
36795 "or megabytes), and C<position> may be the portion which has been transferred."
36799 #: ../src/guestfs.pod:1781
36800 msgid "The only defined and stable parts of the API are:"
36804 #: ../src/guestfs.pod:1787
36806 "The callback can display to the user some type of progress bar or indicator "
36807 "which shows the ratio of C<position>:C<total>."
36811 #: ../src/guestfs.pod:1792
36812 msgid "0 E<lt>= C<position> E<lt>= C<total>"
36816 #: ../src/guestfs.pod:1796
36818 "If any progress notification is sent during a call, then a final progress "
36819 "notification is always sent when C<position> = C<total> (I<unless> the call "
36820 "fails with an error)."
36824 #: ../src/guestfs.pod:1800
36826 "This is to simplify caller code, so callers can easily set the progress "
36827 "indicator to \"100%\" at the end of the operation, without requiring special "
36828 "code to detect this case."
36832 #: ../src/guestfs.pod:1806
36834 "For some calls we are unable to estimate the progress of the call, but we "
36835 "can still generate progress messages to indicate activity. This is known as "
36836 "\"pulse mode\", and is directly supported by certain progress bar "
36837 "implementations (eg. GtkProgressBar)."
36841 #: ../src/guestfs.pod:1811
36843 "For these calls, zero or more progress messages are generated with "
36844 "C<position = 0> and C<total = 1>, followed by a final message with "
36845 "C<position = total = 1>."
36849 #: ../src/guestfs.pod:1815
36851 "As noted above, if the call fails with an error then the final message may "
36852 "not be generated."
36856 #: ../src/guestfs.pod:1820
36858 "The callback also receives the procedure number (C<proc_nr>) and serial "
36859 "number (C<serial>) of the call. These are only useful for debugging "
36860 "protocol issues, and the callback can normally ignore them. The callback "
36861 "may want to print these numbers in error messages or debugging messages."
36865 #: ../src/guestfs.pod:1826
36866 msgid "If no callback is registered: progress messages are discarded."
36870 #: ../src/guestfs.pod:1828
36871 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
36875 #: ../src/guestfs.pod:1831
36877 "The callback function is called whenever a log message is generated by qemu, "
36878 "the appliance kernel, guestfsd (daemon), or utility programs."
36882 #: ../src/guestfs.pod:1834
36884 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
36885 "guestfs_launch>) then additional debug messages are generated."
36889 #: ../src/guestfs.pod:1837 ../src/guestfs.pod:1851
36891 "If no callback is registered: the messages are discarded unless the verbose "
36892 "flag is set in which case they are sent to stderr. You can override the "
36893 "printing of verbose messages to stderr by setting up a callback."
36897 #: ../src/guestfs.pod:1842
36898 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
36902 #: ../src/guestfs.pod:1845
36904 "The callback function is called whenever a log message is generated by the "
36905 "library part of libguestfs."
36909 #: ../src/guestfs.pod:1848
36911 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
36912 "messages are generated."
36916 #: ../src/guestfs.pod:1856
36917 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
36921 #: ../src/guestfs.pod:1859
36923 "The callback function is called whenever a trace message is generated. This "
36924 "only applies if the trace flag (L</guestfs_set_trace>) is set."
36928 #: ../src/guestfs.pod:1862
36930 "If no callback is registered: the messages are sent to stderr. You can "
36931 "override the printing of trace messages to stderr by setting up a callback."
36935 #: ../src/guestfs.pod:1866
36936 msgid "GUESTFS_EVENT_ENTER (payload type: function name)"
36940 #: ../src/guestfs.pod:1869
36942 "The callback function is called whenever a libguestfs function is entered."
36946 #: ../src/guestfs.pod:1872
36948 "The payload is a string which contains the name of the function that we are "
36949 "entering (not including C<guestfs_> prefix)."
36953 #: ../src/guestfs.pod:1875
36955 "Note that libguestfs functions can call themselves, so you may see many "
36956 "events from a single call. A few libguestfs functions do not generate this "
36961 #: ../src/guestfs.pod:1883
36962 msgid "guestfs_set_event_callback"
36966 #: ../src/guestfs.pod:1885
36969 " int guestfs_set_event_callback (guestfs_h *g,\n"
36970 " guestfs_event_callback cb,\n"
36971 " uint64_t event_bitmask,\n"
36973 " void *opaque);\n"
36978 #: ../src/guestfs.pod:1891
36980 "This function registers a callback (C<cb>) for all event classes in the "
36981 "C<event_bitmask>."
36985 #: ../src/guestfs.pod:1894
36987 "For example, to register for all log message events, you could call this "
36988 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
36989 "To register a single callback for all possible classes of events, use "
36990 "C<GUESTFS_EVENT_ALL>."
36994 #: ../src/guestfs.pod:1900
36995 msgid "C<flags> should always be passed as 0."
36999 #: ../src/guestfs.pod:1902
37001 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
37002 "it for any purpose."
37006 #: ../src/guestfs.pod:1905
37008 "The return value is the event handle (an integer) which you can use to "
37009 "delete the callback (see below)."
37013 #: ../src/guestfs.pod:1908
37015 "If there is an error, this function returns C<-1>, and sets the error in the "
37016 "handle in the usual way (see L</guestfs_last_error> etc.)"
37020 #: ../src/guestfs.pod:1911
37022 "Callbacks remain in effect until they are deleted, or until the handle is "
37027 #: ../src/guestfs.pod:1914
37029 "In the case where multiple callbacks are registered for a particular event "
37030 "class, all of the callbacks are called. The order in which multiple "
37031 "callbacks are called is not defined."
37035 #: ../src/guestfs.pod:1918
37036 msgid "guestfs_delete_event_callback"
37040 #: ../src/guestfs.pod:1920
37043 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
37048 #: ../src/guestfs.pod:1922
37050 "Delete a callback that was previously registered. C<event_handle> should be "
37051 "the integer that was returned by a previous call to "
37052 "C<guestfs_set_event_callback> on the same handle."
37056 #: ../src/guestfs.pod:1926
37057 msgid "guestfs_event_callback"
37061 #: ../src/guestfs.pod:1928
37064 " typedef void (*guestfs_event_callback) (\n"
37067 " uint64_t event,\n"
37068 " int event_handle,\n"
37070 " const char *buf, size_t buf_len,\n"
37071 " const uint64_t *array, size_t array_len);\n"
37076 #: ../src/guestfs.pod:1937
37078 "This is the type of the event callback function that you have to provide."
37082 #: ../src/guestfs.pod:1940
37084 "The basic parameters are: the handle (C<g>), the opaque user pointer "
37085 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
37086 "handle, and C<flags> which in the current API you should ignore."
37090 #: ../src/guestfs.pod:1944
37092 "The remaining parameters contain the event payload (if any). Each event may "
37093 "contain a payload, which usually relates to the event class, but for future "
37094 "proofing your code should be written to handle any payload for any event "
37099 #: ../src/guestfs.pod:1949
37101 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
37102 "there is no message buffer). Note that this message buffer can contain "
37103 "arbitrary 8 bit data, including NUL bytes."
37107 #: ../src/guestfs.pod:1953
37109 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
37110 "moment this is only used for progress messages."
37114 #: ../src/guestfs.pod:1956
37115 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
37119 #: ../src/guestfs.pod:1958
37121 "One motivation for the generic event API was to allow GUI programs to "
37122 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
37123 "unconditionally to C<stderr>."
37127 #: ../src/guestfs.pod:1962
37129 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
37130 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
37131 "messages are not events; you must capture error messages separately)."
37135 #: ../src/guestfs.pod:1967
37137 "Programs have to set up a callback to capture the classes of events of "
37142 #: ../src/guestfs.pod:1970
37146 " guestfs_set_event_callback\n"
37147 " (g, message_callback,\n"
37148 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
37149 " GUESTFS_EVENT_TRACE,\n"
37150 " 0, NULL) == -1)\n"
37151 " if (eh == -1) {\n"
37152 " // handle error in the usual way\n"
37158 #: ../src/guestfs.pod:1980
37160 "The callback can then direct messages to the appropriate place. In this "
37161 "example, messages are directed to syslog:"
37165 #: ../src/guestfs.pod:1983
37169 " message_callback (\n"
37172 " uint64_t event,\n"
37173 " int event_handle,\n"
37175 " const char *buf, size_t buf_len,\n"
37176 " const uint64_t *array, size_t array_len)\n"
37178 " const int priority = LOG_USER|LOG_INFO;\n"
37179 " if (buf_len > 0)\n"
37180 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
37186 #: ../src/guestfs.pod:1998
37187 msgid "CANCELLING LONG TRANSFERS"
37191 #: ../src/guestfs.pod:2000
37193 "Some operations can be cancelled by the caller while they are in progress. "
37194 "Currently only operations that involve uploading or downloading data can be "
37195 "cancelled (technically: operations that have C<FileIn> or C<FileOut> "
37196 "parameters in the generator)."
37200 #: ../src/guestfs.pod:2005
37201 msgid "guestfs_user_cancel"
37205 #: ../src/guestfs.pod:2007
37208 " void guestfs_user_cancel (guestfs_h *g);\n"
37213 #: ../src/guestfs.pod:2009
37215 "C<guestfs_user_cancel> cancels the current upload or download operation."
37219 #: ../src/guestfs.pod:2012
37221 "Unlike most other libguestfs calls, this function is signal safe and thread "
37222 "safe. You can call it from a signal handler or from another thread, without "
37223 "needing to do any locking."
37227 #: ../src/guestfs.pod:2016
37229 "The transfer that was in progress (if there is one) will stop shortly "
37230 "afterwards, and will return an error. The errno (see L</"
37231 "guestfs_last_errno>) is set to C<EINTR>, so you can test for this to find "
37232 "out if the operation was cancelled or failed because of another error."
37236 #: ../src/guestfs.pod:2022
37238 "No cleanup is performed: for example, if a file was being uploaded then "
37239 "after cancellation there may be a partially uploaded file. It is the "
37240 "caller's responsibility to clean up if necessary."
37244 #: ../src/guestfs.pod:2026
37245 msgid "There are two common places that you might call C<guestfs_user_cancel>."
37249 #: ../src/guestfs.pod:2028
37251 "In an interactive text-based program, you might call it from a C<SIGINT> "
37252 "signal handler so that pressing C<^C> cancels the current operation. (You "
37253 "also need to call L</guestfs_set_pgroup> so that child processes don't "
37254 "receive the C<^C> signal)."
37258 #: ../src/guestfs.pod:2033
37260 "In a graphical program, when the main thread is displaying a progress bar "
37261 "with a cancel button, wire up the cancel button to call this function."
37265 #: ../src/guestfs.pod:2037
37266 msgid "PRIVATE DATA AREA"
37270 #: ../src/guestfs.pod:2039
37272 "You can attach named pieces of private data to the libguestfs handle, fetch "
37273 "them by name, and walk over them, for the lifetime of the handle. This is "
37274 "called the private data area and is only available from the C API."
37278 #: ../src/guestfs.pod:2044
37279 msgid "To attach a named piece of data, use the following call:"
37283 #: ../src/guestfs.pod:2046
37286 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
37291 #: ../src/guestfs.pod:2048
37293 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
37294 "pointer (which can be C<NULL>). Any previous item with the same key is "
37299 #: ../src/guestfs.pod:2052
37301 "You can use any C<key> you want, but your key should I<not> start with an "
37302 "underscore character. Keys beginning with an underscore character are "
37303 "reserved for internal libguestfs purposes (eg. for implementing language "
37304 "bindings). It is recommended that you prefix the key with some unique "
37305 "string to avoid collisions with other users."
37309 #: ../src/guestfs.pod:2058
37310 msgid "To retrieve the pointer, use:"
37314 #: ../src/guestfs.pod:2060
37317 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
37322 #: ../src/guestfs.pod:2062
37324 "This function returns C<NULL> if either no data is found associated with "
37325 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
37330 #: ../src/guestfs.pod:2066
37332 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
37333 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
37334 "all. In particular, libguestfs does I<not> try to free the data when the "
37335 "handle is closed. If the data must be freed, then the caller must either "
37336 "free it before calling L</guestfs_close> or must set up a close callback to "
37337 "do it (see L</GUESTFS_EVENT_CLOSE>)."
37341 #: ../src/guestfs.pod:2073
37342 msgid "To walk over all entries, use these two functions:"
37346 #: ../src/guestfs.pod:2075
37349 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
37354 #: ../src/guestfs.pod:2077
37357 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
37362 #: ../src/guestfs.pod:2079
37364 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
37365 "not have any particular meaning -- keys are not returned in any defined "
37366 "order). A pointer to the key is returned in C<*key_rtn> and the "
37367 "corresponding data pointer is returned from the function. C<NULL> is "
37368 "returned if there are no keys stored in the handle."
37372 #: ../src/guestfs.pod:2085
37374 "C<guestfs_next_private> returns the next key, pointer pair. The return "
37375 "value of this function is also C<NULL> is there are no further entries to "
37380 #: ../src/guestfs.pod:2089
37381 msgid "Notes about walking over entries:"
37385 #: ../src/guestfs.pod:2095
37387 "You must not call C<guestfs_set_private> while walking over the entries."
37391 #: ../src/guestfs.pod:2100
37393 "The handle maintains an internal iterator which is reset when you call "
37394 "C<guestfs_first_private>. This internal iterator is invalidated when you "
37395 "call C<guestfs_set_private>."
37399 #: ../src/guestfs.pod:2106
37400 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
37404 #: ../src/guestfs.pod:2108
37407 " guestfs_set_private (g, key, NULL);\n"
37412 #: ../src/guestfs.pod:2110
37413 msgid "then that C<key> is not returned when walking."
37417 #: ../src/guestfs.pod:2114
37419 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
37420 "C<guestfs_next_private> or C<guestfs_set_private>."
37424 #: ../src/guestfs.pod:2120
37426 "The following example code shows how to print all keys and data pointers "
37427 "that are associated with the handle C<g>:"
37431 #: ../src/guestfs.pod:2123
37434 " const char *key;\n"
37435 " void *data = guestfs_first_private (g, &key);\n"
37436 " while (data != NULL)\n"
37438 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37439 " data = guestfs_next_private (g, &key);\n"
37445 #: ../src/guestfs.pod:2131
37447 "More commonly you are only interested in keys that begin with an application-"
37448 "specific prefix C<foo_>. Modify the loop like so:"
37452 #: ../src/guestfs.pod:2134
37455 " const char *key;\n"
37456 " void *data = guestfs_first_private (g, &key);\n"
37457 " while (data != NULL)\n"
37459 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
37460 " printf (\"key = %s, data = %p\\n\", key, data);\n"
37461 " data = guestfs_next_private (g, &key);\n"
37467 #: ../src/guestfs.pod:2143
37469 "If you need to modify keys while walking, then you have to jump back to the "
37470 "beginning of the loop. For example, to delete all keys prefixed with "
37475 #: ../src/guestfs.pod:2147
37478 " const char *key;\n"
37481 " data = guestfs_first_private (g, &key);\n"
37482 " while (data != NULL)\n"
37484 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
37486 " guestfs_set_private (g, key, NULL);\n"
37487 " /* note that 'key' pointer is now invalid, and so is\n"
37488 " the internal iterator */\n"
37491 " data = guestfs_next_private (g, &key);\n"
37497 #: ../src/guestfs.pod:2163
37499 "Note that the above loop is guaranteed to terminate because the keys are "
37500 "being deleted, but other manipulations of keys within the loop might not "
37501 "terminate unless you also maintain an indication of which keys have been "
37506 #: ../src/guestfs.pod:2168
37511 #: ../src/guestfs.pod:2170
37513 "The libguestfs C library can be probed using systemtap or DTrace. This is "
37514 "true of any library, not just libguestfs. However libguestfs also contains "
37515 "static markers to help in probing internal operations."
37519 #: ../src/guestfs.pod:2174
37520 msgid "You can list all the static markers by doing:"
37524 #: ../src/guestfs.pod:2176
37527 " stap -l 'process(\"/usr/lib*/libguestfs.so.0\")\n"
37528 " .provider(\"guestfs\").mark(\"*\")'\n"
37533 #: ../src/guestfs.pod:2179
37535 "B<Note:> These static markers are I<not> part of the stable API and may "
37536 "change in future versions."
37540 #: ../src/guestfs.pod:2182
37541 msgid "SYSTEMTAP SCRIPT EXAMPLE"
37545 #: ../src/guestfs.pod:2184
37547 "This script contains examples of displaying both the static markers and some "
37548 "ordinary C entry points:"
37552 #: ../src/guestfs.pod:2187
37560 #: ../src/guestfs.pod:2189
37563 " function display_time () {\n"
37564 " now = gettimeofday_us ();\n"
37567 " delta = now - last;\n"
37573 #: ../src/guestfs.pod:2196
37576 " printf (\"%d (+%d):\", now, delta);\n"
37582 #: ../src/guestfs.pod:2199
37587 " printf (\"ready\\n\");\n"
37593 #: ../src/guestfs.pod:2204
37596 " /* Display all calls to static markers. */\n"
37597 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
37598 " .provider(\"guestfs\").mark(\"*\") ? {\n"
37599 " display_time();\n"
37600 " printf (\"\\t%s %s\\n\", $$name, $$parms);\n"
37606 #: ../src/guestfs.pod:2211
37609 " /* Display all calls to guestfs_mkfs* functions. */\n"
37610 " probe process(\"/usr/lib*/libguestfs.so.0\")\n"
37611 " .function(\"guestfs_mkfs*\") ? {\n"
37612 " display_time();\n"
37613 " printf (\"\\t%s %s\\n\", probefunc(), $$parms);\n"
37619 #: ../src/guestfs.pod:2218
37621 "The script above can be saved to C<test.stap> and run using the L<stap(1)> "
37622 "program. Note that you either have to be root, or you have to add yourself "
37623 "to several special stap groups. Consult the systemtap documentation for "
37624 "more information."
37628 #: ../src/guestfs.pod:2223
37631 " # stap /tmp/test.stap\n"
37637 #: ../src/guestfs.pod:2226
37638 msgid "In another terminal, run a guestfish command such as this:"
37642 #: ../src/guestfs.pod:2230
37643 msgid "In the first terminal, stap trace output similar to this is shown:"
37647 #: ../src/guestfs.pod:2232
37650 " 1318248056692655 (+0):\tlaunch_start\n"
37651 " 1318248056692850 (+195): launch_build_appliance_start\n"
37652 " 1318248056818285 (+125435): launch_build_appliance_end\n"
37653 " 1318248056838059 (+19774): launch_run_qemu\n"
37654 " 1318248061071167 (+4233108): launch_end\n"
37655 " 1318248061280324 (+209157): guestfs_mkfs g=0x1024ab0 fstype=0x46116f device=0x1024e60\n"
37660 #: ../src/guestfs.pod:2239 ../src/guestfs.pod:2244
37665 #: ../src/guestfs.pod:2241
37667 "<!-- old anchor for the next section --> <a name="
37668 "\"state_machine_and_low_level_event_api\"/>"
37672 #: ../src/guestfs.pod:2246
37673 msgid "ARCHITECTURE"
37677 #: ../src/guestfs.pod:2248
37679 "Internally, libguestfs is implemented by running an appliance (a special "
37680 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
37681 "process of the main program."
37685 #: ../src/guestfs.pod:2252
37688 " ___________________\n"
37690 " | main program |\n"
37692 " | | child process / appliance\n"
37693 " | | __________________________\n"
37695 " +-------------------+ RPC | +-----------------+ |\n"
37696 " | libguestfs <--------------------> guestfsd | |\n"
37697 " | | | +-----------------+ |\n"
37698 " \\___________________/ | | Linux kernel | |\n"
37699 " | +--^--------------+ |\n"
37700 " \\_________|________________/\n"
37702 " _______v______\n"
37705 " | disk image |\n"
37706 " \\______________/\n"
37711 #: ../src/guestfs.pod:2272
37713 "The library, linked to the main program, creates the child process and hence "
37714 "the appliance in the L</guestfs_launch> function."
37718 #: ../src/guestfs.pod:2275
37720 "Inside the appliance is a Linux kernel and a complete stack of userspace "
37721 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
37722 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
37723 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
37724 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
37725 "attached to the qemu process which translates device access by the "
37726 "appliance's Linux kernel into accesses to the image."
37730 #: ../src/guestfs.pod:2284
37732 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
37733 "Although the disk image you are attached to might also be used by some "
37734 "virtual machine, libguestfs doesn't know or care about this. (But you will "
37735 "care if both libguestfs's qemu process and your virtual machine are trying "
37736 "to update the disk image at the same time, since these usually results in "
37737 "massive disk corruption)."
37741 #: ../src/guestfs.pod:2291
37742 msgid "STATE MACHINE"
37746 #: ../src/guestfs.pod:2293
37747 msgid "libguestfs uses a state machine to model the child process:"
37751 #: ../src/guestfs.pod:2295
37755 " guestfs_create\n"
37763 " / | \\ \\ guestfs_launch\n"
37764 " / | _\\__V______\n"
37766 " / | | LAUNCHING |\n"
37767 " / | \\___________/\n"
37769 " / | guestfs_launch\n"
37771 " ______ / __|____V\n"
37772 " / \\ ------> / \\\n"
37773 " | BUSY | | READY |\n"
37774 " \\______/ <------ \\________/\n"
37779 #: ../src/guestfs.pod:2317
37781 "The normal transitions are (1) CONFIG (when the handle is created, but there "
37782 "is no child process), (2) LAUNCHING (when the child process is booting up), "
37783 "(3) alternating between READY and BUSY as commands are issued to, and "
37784 "carried out by, the child process."
37788 #: ../src/guestfs.pod:2322
37790 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
37791 "asynchronously at any time (eg. due to some internal error), and that causes "
37792 "the state to transition back to CONFIG."
37796 #: ../src/guestfs.pod:2326
37798 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
37799 "issued when in the CONFIG state."
37803 #: ../src/guestfs.pod:2329
37805 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
37806 "L</guestfs_launch> blocks until the child process is READY to accept "
37807 "commands (or until some failure or timeout). L</guestfs_launch> internally "
37808 "moves the state from CONFIG to LAUNCHING while it is running."
37812 #: ../src/guestfs.pod:2335
37814 "API actions such as L</guestfs_mount> can only be issued when in the READY "
37815 "state. These API calls block waiting for the command to be carried out (ie. "
37816 "the state to transition to BUSY and then back to READY). There are no non-"
37817 "blocking versions, and no way to issue more than one command per handle at "
37822 #: ../src/guestfs.pod:2341
37824 "Finally, the child process sends asynchronous messages back to the main "
37825 "program, such as kernel log messages. You can register a callback to "
37826 "receive these messages."
37830 #: ../src/guestfs.pod:2345
37835 #: ../src/guestfs.pod:2347
37836 msgid "APPLIANCE BOOT PROCESS"
37840 #: ../src/guestfs.pod:2349
37842 "This process has evolved and continues to evolve. The description here "
37843 "corresponds only to the current version of libguestfs and is provided for "
37844 "information only."
37848 #: ../src/guestfs.pod:2353
37850 "In order to follow the stages involved below, enable libguestfs debugging "
37851 "(set the environment variable C<LIBGUESTFS_DEBUG=1>)."
37855 #: ../src/guestfs.pod:2358
37856 msgid "Create the appliance"
37860 #: ../src/guestfs.pod:2360
37862 "C<febootstrap-supermin-helper> is invoked to create the kernel, a small "
37863 "initrd and the appliance."
37867 #: ../src/guestfs.pod:2363
37869 "The appliance is cached in C</var/tmp/.guestfs-E<lt>UIDE<gt>> (or in another "
37870 "directory if C<TMPDIR> is set)."
37874 #: ../src/guestfs.pod:2366
37876 "For a complete description of how the appliance is created and cached, read "
37877 "the L<febootstrap(8)> and L<febootstrap-supermin-helper(8)> man pages."
37881 #: ../src/guestfs.pod:2370
37882 msgid "Start qemu and boot the kernel"
37886 #: ../src/guestfs.pod:2372
37887 msgid "qemu is invoked to boot the kernel."
37891 #: ../src/guestfs.pod:2374
37892 msgid "Run the initrd"
37896 #: ../src/guestfs.pod:2376
37898 "C<febootstrap-supermin-helper> builds a small initrd. The initrd is not the "
37899 "appliance. The purpose of the initrd is to load enough kernel modules in "
37900 "order that the appliance itself can be mounted and started."
37904 #: ../src/guestfs.pod:2380
37906 "The initrd is a cpio archive called C</var/tmp/.guestfs-E<lt>UIDE<gt>/"
37911 #: ../src/guestfs.pod:2383
37913 "When the initrd has started you will see messages showing that kernel "
37914 "modules are being loaded, similar to this:"
37918 #: ../src/guestfs.pod:2386
37921 " febootstrap: ext2 mini initrd starting up\n"
37922 " febootstrap: mounting /sys\n"
37923 " febootstrap: internal insmod libcrc32c.ko\n"
37924 " febootstrap: internal insmod crc32c-intel.ko\n"
37929 #: ../src/guestfs.pod:2391
37930 msgid "Find and mount the appliance device"
37934 #: ../src/guestfs.pod:2393
37936 "The appliance is a sparse file containing an ext2 filesystem which contains "
37937 "a familiar (although reduced in size) Linux operating system. It would "
37938 "normally be called C</var/tmp/.guestfs-E<lt>UIDE<gt>/root>."
37942 #: ../src/guestfs.pod:2397
37944 "The regular disks being inspected by libguestfs are the first devices "
37945 "exposed by qemu (eg. as C</dev/vda>)."
37949 #: ../src/guestfs.pod:2400
37951 "The last disk added to qemu is the appliance itself (eg. C</dev/vdb> if "
37952 "there was only one regular disk)."
37956 #: ../src/guestfs.pod:2403
37958 "Thus the final job of the initrd is to locate the appliance disk, mount it, "
37959 "and switch root into the appliance, and run C</init> from the appliance."
37963 #: ../src/guestfs.pod:2407
37964 msgid "If this works successfully you will see messages such as:"
37968 #: ../src/guestfs.pod:2409
37971 " febootstrap: picked /sys/block/vdb/dev as root device\n"
37972 " febootstrap: creating /dev/root as block special 252:16\n"
37973 " febootstrap: mounting new root on /root\n"
37974 " febootstrap: chroot\n"
37975 " Starting /init script ...\n"
37980 #: ../src/guestfs.pod:2415
37982 "Note that C<Starting /init script ...> indicates that the appliance's init "
37983 "script is now running."
37987 #: ../src/guestfs.pod:2418
37988 msgid "Initialize the appliance"
37992 #: ../src/guestfs.pod:2420
37994 "The appliance itself now initializes itself. This involves starting certain "
37995 "processes like C<udev>, possibly printing some debug information, and "
37996 "finally running the daemon (C<guestfsd>)."
38000 #: ../src/guestfs.pod:2424
38005 #: ../src/guestfs.pod:2426
38007 "Finally the daemon (C<guestfsd>) runs inside the appliance. If it runs you "
38012 #: ../src/guestfs.pod:2429
38015 " verbose daemon enabled\n"
38020 #: ../src/guestfs.pod:2431
38022 "The daemon expects to see a named virtio-serial port exposed by qemu and "
38023 "connected on the other end to the library."
38027 #: ../src/guestfs.pod:2434
38029 "The daemon connects to this port (and hence to the library) and sends a four "
38030 "byte message C<GUESTFS_LAUNCH_FLAG>, which initiates the communication "
38031 "protocol (see below)."
38035 #: ../src/guestfs.pod:2440
38036 msgid "COMMUNICATION PROTOCOL"
38040 #: ../src/guestfs.pod:2442
38042 "Don't rely on using this protocol directly. This section documents how it "
38043 "currently works, but it may change at any time."
38047 #: ../src/guestfs.pod:2445
38049 "The protocol used to talk between the library and the daemon running inside "
38050 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
38051 "1014, RFC 1832, RFC 4506)."
38055 #: ../src/guestfs.pod:2449
38057 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
38058 "this file is automatically generated)."
38062 #: ../src/guestfs.pod:2452
38064 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
38065 "and C<FileOut> parameters, which are handled with very simple request/reply "
38066 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
38067 "parameters, which use the same request and reply messages, but they may also "
38068 "be followed by files sent using a chunked encoding."
38072 #: ../src/guestfs.pod:2459
38073 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
38077 #: ../src/guestfs.pod:2461
38078 msgid "For ordinary functions, the request message is:"
38082 #: ../src/guestfs.pod:2463
38085 " total length (header + arguments,\n"
38086 " but not including the length word itself)\n"
38087 " struct guestfs_message_header (encoded as XDR)\n"
38088 " struct guestfs_<foo>_args (encoded as XDR)\n"
38093 #: ../src/guestfs.pod:2468
38095 "The total length field allows the daemon to allocate a fixed size buffer "
38096 "into which it slurps the rest of the message. As a result, the total length "
38097 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
38098 "effective size of any request is limited to somewhere under this size."
38102 #: ../src/guestfs.pod:2474
38104 "Note also that many functions don't take any arguments, in which case the "
38105 "C<guestfs_I<foo>_args> is completely omitted."
38109 #: ../src/guestfs.pod:2477
38111 "The header contains the procedure number (C<guestfs_proc>) which is how the "
38112 "receiver knows what type of args structure to expect, or none at all."
38116 #: ../src/guestfs.pod:2481
38118 "For functions that take optional arguments, the optional arguments are "
38119 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
38120 "arguments. A bitmask in the header indicates which optional arguments are "
38121 "meaningful. The bitmask is also checked to see if it contains bits set "
38122 "which the daemon does not know about (eg. if more optional arguments were "
38123 "added in a later version of the library), and this causes the call to be "
38128 #: ../src/guestfs.pod:2489
38129 msgid "The reply message for ordinary functions is:"
38133 #: ../src/guestfs.pod:2491
38136 " total length (header + ret,\n"
38137 " but not including the length word itself)\n"
38138 " struct guestfs_message_header (encoded as XDR)\n"
38139 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38144 #: ../src/guestfs.pod:2496
38146 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
38147 "functions that return no formal return values."
38151 #: ../src/guestfs.pod:2499
38153 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
38157 #: ../src/guestfs.pod:2502
38159 "In the case of an error, a flag is set in the header, and the reply message "
38160 "is slightly changed:"
38164 #: ../src/guestfs.pod:2505
38167 " total length (header + error,\n"
38168 " but not including the length word itself)\n"
38169 " struct guestfs_message_header (encoded as XDR)\n"
38170 " struct guestfs_message_error (encoded as XDR)\n"
38175 #: ../src/guestfs.pod:2510
38177 "The C<guestfs_message_error> structure contains the error message as a "
38182 #: ../src/guestfs.pod:2513
38183 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
38187 #: ../src/guestfs.pod:2515
38189 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
38190 "The normal request message is sent (see above). However this is followed by "
38191 "a sequence of file chunks."
38195 #: ../src/guestfs.pod:2519
38198 " total length (header + arguments,\n"
38199 " but not including the length word itself,\n"
38200 " and not including the chunks)\n"
38201 " struct guestfs_message_header (encoded as XDR)\n"
38202 " struct guestfs_<foo>_args (encoded as XDR)\n"
38203 " sequence of chunks for FileIn param #0\n"
38204 " sequence of chunks for FileIn param #1 etc.\n"
38209 #: ../src/guestfs.pod:2527
38210 msgid "The \"sequence of chunks\" is:"
38214 #: ../src/guestfs.pod:2529
38217 " length of chunk (not including length word itself)\n"
38218 " struct guestfs_chunk (encoded as XDR)\n"
38219 " length of chunk\n"
38220 " struct guestfs_chunk (encoded as XDR)\n"
38222 " length of chunk\n"
38223 " struct guestfs_chunk (with data.data_len == 0)\n"
38228 #: ../src/guestfs.pod:2537
38230 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
38231 "is set in the final chunk to indicate either successful completion or early "
38236 #: ../src/guestfs.pod:2541
38238 "At time of writing there are no functions that have more than one FileIn "
38239 "parameter. However this is (theoretically) supported, by sending the "
38240 "sequence of chunks for each FileIn parameter one after another (from left to "
38245 #: ../src/guestfs.pod:2546
38247 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
38248 "transfer. The library does this by sending a chunk with a special flag set "
38249 "to indicate cancellation. When the daemon sees this, it cancels the whole "
38250 "RPC, does I<not> send any reply, and goes back to reading the next request."
38254 #: ../src/guestfs.pod:2552
38256 "The daemon may also cancel. It does this by writing a special word "
38257 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
38258 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
38259 "cancel chunk). The special word is chosen so that even if cancellation "
38260 "happens right at the end of the transfer (after the library has finished "
38261 "writing and has started listening for the reply), the \"spurious\" cancel "
38262 "flag will not be confused with the reply message."
38266 #: ../src/guestfs.pod:2561
38268 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
38269 "limit), and also files where the size is not known in advance (eg. from "
38270 "pipes or sockets). However the chunks are rather small "
38271 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
38272 "to keep much in memory."
38276 #: ../src/guestfs.pod:2567
38277 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
38281 #: ../src/guestfs.pod:2569
38283 "The protocol for FileOut parameters is exactly the same as for FileIn "
38284 "parameters, but with the roles of daemon and library reversed."
38288 #: ../src/guestfs.pod:2572
38291 " total length (header + ret,\n"
38292 " but not including the length word itself,\n"
38293 " and not including the chunks)\n"
38294 " struct guestfs_message_header (encoded as XDR)\n"
38295 " struct guestfs_<foo>_ret (encoded as XDR)\n"
38296 " sequence of chunks for FileOut param #0\n"
38297 " sequence of chunks for FileOut param #1 etc.\n"
38302 #: ../src/guestfs.pod:2580
38303 msgid "INITIAL MESSAGE"
38307 #: ../src/guestfs.pod:2582
38309 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
38310 "which indicates that the guest and daemon is alive. This is what L</"
38311 "guestfs_launch> waits for."
38315 #: ../src/guestfs.pod:2586
38316 msgid "PROGRESS NOTIFICATION MESSAGES"
38320 #: ../src/guestfs.pod:2588
38322 "The daemon may send progress notification messages at any time. These are "
38323 "distinguished by the normal length word being replaced by "
38324 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
38328 #: ../src/guestfs.pod:2592
38330 "The library turns them into progress callbacks (see L</"
38331 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
38336 #: ../src/guestfs.pod:2596
38338 "The daemon self-limits the frequency of progress messages it sends (see "
38339 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
38344 #: ../src/guestfs.pod:2600
38345 msgid "LIBGUESTFS VERSION NUMBERS"
38349 #: ../src/guestfs.pod:2602
38351 "Since April 2010, libguestfs has started to make separate development and "
38352 "stable releases, along with corresponding branches in our git repository. "
38353 "These separate releases can be identified by version number:"
38357 #: ../src/guestfs.pod:2607
38360 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
38361 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
38367 " | `-------- sub-version\n"
38369 " `------ always '1' because we don't change the ABI\n"
38374 #: ../src/guestfs.pod:2618
38375 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
38379 #: ../src/guestfs.pod:2620
38381 "As time passes we cherry pick fixes from the development branch and backport "
38382 "those into the stable branch, the effect being that the stable branch should "
38383 "get more stable and less buggy over time. So the stable releases are ideal "
38384 "for people who don't need new features but would just like the software to "
38389 #: ../src/guestfs.pod:2626
38390 msgid "Our criteria for backporting changes are:"
38394 #: ../src/guestfs.pod:2632
38396 "Documentation changes which don't affect any code are backported unless the "
38397 "documentation refers to a future feature which is not in stable."
38401 #: ../src/guestfs.pod:2638
38403 "Bug fixes which are not controversial, fix obvious problems, and have been "
38404 "well tested are backported."
38408 #: ../src/guestfs.pod:2643
38410 "Simple rearrangements of code which shouldn't affect how it works get "
38411 "backported. This is so that the code in the two branches doesn't get too "
38412 "far out of step, allowing us to backport future fixes more easily."
38416 #: ../src/guestfs.pod:2649
38418 "We I<don't> backport new features, new APIs, new tools etc, except in one "
38419 "exceptional case: the new feature is required in order to implement an "
38420 "important bug fix."
38424 #: ../src/guestfs.pod:2655
38426 "A new stable branch starts when we think the new features in development are "
38427 "substantial and compelling enough over the current stable branch to warrant "
38428 "it. When that happens we create new stable and development versions 1.N.0 "
38429 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
38430 "stable at this point, but by backporting fixes from development, that branch "
38431 "will stabilize over time."
38435 #: ../src/guestfs.pod:2663
38436 msgid "EXTENDING LIBGUESTFS"
38440 #: ../src/guestfs.pod:2665
38441 msgid "ADDING A NEW API ACTION"
38445 #: ../src/guestfs.pod:2667
38447 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
38448 "documentation) are generated, and this makes it easy to extend the "
38453 #: ../src/guestfs.pod:2671
38454 msgid "To add a new API action there are two changes:"
38458 #: ../src/guestfs.pod:2677
38460 "You need to add a description of the call (name, parameters, return type, "
38461 "tests, documentation) to C<generator/generator_actions.ml>."
38465 #: ../src/guestfs.pod:2680
38467 "There are two sorts of API action, depending on whether the call goes "
38468 "through to the daemon in the appliance, or is serviced entirely by the "
38469 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
38470 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
38471 "an example of the latter, since a trace flag is maintained in the handle and "
38472 "all tracing is done on the library side."
38476 #: ../src/guestfs.pod:2688
38478 "Most new actions are of the first type, and get added to the "
38479 "C<daemon_functions> list. Each function has a unique procedure number used "
38480 "in the RPC protocol which is assigned to that action when we publish "
38481 "libguestfs and cannot be reused. Take the latest procedure number and "
38486 #: ../src/guestfs.pod:2694
38488 "For library-only actions of the second type, add to the "
38489 "C<non_daemon_functions> list. Since these functions are serviced by the "
38490 "library and do not travel over the RPC mechanism to the daemon, these "
38491 "functions do not need a procedure number, and so the procedure number is set "
38496 #: ../src/guestfs.pod:2702
38497 msgid "Implement the action (in C):"
38501 #: ../src/guestfs.pod:2704
38503 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
38504 "C<daemon/> directory."
38508 #: ../src/guestfs.pod:2707
38510 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
38511 "(note: double underscore) in the C<src/> directory."
38515 #: ../src/guestfs.pod:2710
38516 msgid "In either case, use another function as an example of what to do."
38520 #: ../src/guestfs.pod:2714
38521 msgid "After making these changes, use C<make> to compile."
38525 #: ../src/guestfs.pod:2716
38527 "Note that you don't need to implement the RPC, language bindings, manual "
38528 "pages or anything else. It's all automatically generated from the OCaml "
38533 #: ../src/guestfs.pod:2720
38534 msgid "ADDING TESTS FOR AN API ACTION"
38538 #: ../src/guestfs.pod:2722
38540 "You can supply zero or as many tests as you want per API call. The tests "
38541 "can either be added as part of the API description (C<generator/"
38542 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
38543 "into C<regressions/>. Note that adding a script to C<regressions/> is "
38544 "slower, so if possible use the first method."
38548 #: ../src/guestfs.pod:2728
38550 "The following describes the test environment used when you add an API test "
38551 "in C<generator_actions.ml>."
38555 #: ../src/guestfs.pod:2731
38556 msgid "The test environment has 4 block devices:"
38560 #: ../src/guestfs.pod:2735
38561 msgid "C</dev/sda> 500MB"
38565 #: ../src/guestfs.pod:2737
38566 msgid "General block device for testing."
38570 #: ../src/guestfs.pod:2739
38571 msgid "C</dev/sdb> 50MB"
38575 #: ../src/guestfs.pod:2741
38577 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
38582 #: ../src/guestfs.pod:2744
38583 msgid "C</dev/sdc> 10MB"
38587 #: ../src/guestfs.pod:2746
38588 msgid "Used in a few tests where two block devices are needed."
38592 #: ../src/guestfs.pod:2748
38593 msgid "C</dev/sdd>"
38597 #: ../src/guestfs.pod:2750
38598 msgid "ISO with fixed content (see C<images/test.iso>)."
38602 #: ../src/guestfs.pod:2754
38604 "To be able to run the tests in a reasonable amount of time, the libguestfs "
38605 "appliance and block devices are reused between tests. So don't try testing "
38606 "L</guestfs_kill_subprocess> :-x"
38610 #: ../src/guestfs.pod:2758
38612 "Each test starts with an initial scenario, selected using one of the "
38613 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
38614 "initialize the disks mentioned above in a particular way as documented in "
38615 "C<generator_types.ml>. You should not assume anything about the previous "
38616 "contents of other disks that are not initialized."
38620 #: ../src/guestfs.pod:2764
38622 "You can add a prerequisite clause to any individual test. This is a run-"
38623 "time check, which, if it fails, causes the test to be skipped. Useful if "
38624 "testing a command which might not work on all variations of libguestfs "
38625 "builds. A test that has prerequisite of C<Always> means to run "
38630 #: ../src/guestfs.pod:2770
38632 "In addition, packagers can skip individual tests by setting environment "
38633 "variables before running C<make check>."
38637 #: ../src/guestfs.pod:2773
38640 " SKIP_TEST_<CMD>_<NUM>=1\n"
38645 #: ../src/guestfs.pod:2775
38646 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
38650 #: ../src/guestfs.pod:2777
38655 #: ../src/guestfs.pod:2779
38658 " SKIP_TEST_<CMD>=1\n"
38663 #: ../src/guestfs.pod:2781
38664 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
38668 #: ../src/guestfs.pod:2783
38669 msgid "Packagers can run only certain tests by setting for example:"
38673 #: ../src/guestfs.pod:2785
38676 " TEST_ONLY=\"vfs_type zerofree\"\n"
38681 #: ../src/guestfs.pod:2787
38683 "See C<capitests/tests.c> for more details of how these environment variables "
38688 #: ../src/guestfs.pod:2790
38689 msgid "DEBUGGING NEW API ACTIONS"
38693 #: ../src/guestfs.pod:2792
38694 msgid "Test new actions work before submitting them."
38698 #: ../src/guestfs.pod:2794
38699 msgid "You can use guestfish to try out new commands."
38703 #: ../src/guestfs.pod:2796
38705 "Debugging the daemon is a problem because it runs inside a minimal "
38706 "environment. However you can fprintf messages in the daemon to stderr, and "
38707 "they will show up if you use C<guestfish -v>."
38711 #: ../src/guestfs.pod:2800
38712 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
38716 #: ../src/guestfs.pod:2802
38718 "Our C source code generally adheres to some basic code-formatting "
38719 "conventions. The existing code base is not totally consistent on this "
38720 "front, but we do prefer that contributed code be formatted similarly. In "
38721 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
38722 "indentation level, and other than that, follow the K&R style."
38726 #: ../src/guestfs.pod:2808
38728 "If you use Emacs, add the following to one of one of your start-up files (e."
38729 "g., ~/.emacs), to help ensure that you get indentation right:"
38733 #: ../src/guestfs.pod:2811
38736 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
38737 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
38738 " (add-hook 'find-file-hook\n"
38739 " '(lambda () (if (and buffer-file-name\n"
38740 " (string-match \"/libguestfs\\\\>\"\n"
38741 " (buffer-file-name))\n"
38742 " (not (string-equal mode-name \"Change Log\"))\n"
38743 " (not (string-equal mode-name \"Makefile\")))\n"
38744 " (setq indent-tabs-mode nil))))\n"
38749 #: ../src/guestfs.pod:2821
38752 " ;;; When editing C sources in libguestfs, use this style.\n"
38753 " (defun libguestfs-c-mode ()\n"
38754 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
38756 " (c-set-style \"K&R\")\n"
38757 " (setq c-indent-level 2)\n"
38758 " (setq c-basic-offset 2))\n"
38759 " (add-hook 'c-mode-hook\n"
38760 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
38761 " (buffer-file-name))\n"
38762 " (libguestfs-c-mode))))\n"
38767 #: ../src/guestfs.pod:2833
38768 msgid "Enable warnings when compiling (and fix any problems this finds):"
38772 #: ../src/guestfs.pod:2836
38775 " ./configure --enable-gcc-warnings\n"
38780 #: ../src/guestfs.pod:2838
38781 msgid "Useful targets are:"
38785 #: ../src/guestfs.pod:2840
38788 " make syntax-check # checks the syntax of the C code\n"
38789 " make check # runs the test suite\n"
38794 #: ../src/guestfs.pod:2843
38795 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
38799 #: ../src/guestfs.pod:2845
38801 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
38802 "which are used to do shell quoting."
38806 #: ../src/guestfs.pod:2850
38811 #: ../src/guestfs.pod:2852
38813 "Simple shell quoted string. Any spaces or other shell characters are "
38818 #: ../src/guestfs.pod:2855
38823 #: ../src/guestfs.pod:2857
38825 "Same as C<%Q> except the string is treated as a path which is prefixed by "
38830 #: ../src/guestfs.pod:2864
38833 " asprintf (&cmd, \"cat %R\", path);\n"
38838 #: ../src/guestfs.pod:2866
38839 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
38843 #: ../src/guestfs.pod:2868
38845 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
38846 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
38847 "they are not passed via the shell (instead, straight to exec). You probably "
38848 "want to use the C<sysroot_path()> function however."
38852 #: ../src/guestfs.pod:2874
38853 msgid "SUBMITTING YOUR NEW API ACTIONS"
38857 #: ../src/guestfs.pod:2876
38859 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
38860 "libguestfs> and CC to L<rjones@redhat.com>."
38864 #: ../src/guestfs.pod:2880
38865 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
38869 #: ../src/guestfs.pod:2882
38870 msgid "We support i18n (gettext anyhow) in the library."
38874 #: ../src/guestfs.pod:2884
38876 "However many messages come from the daemon, and we don't translate those at "
38877 "the moment. One reason is that the appliance generally has all locale files "
38878 "removed from it, because they take up a lot of space. So we'd have to readd "
38879 "some of those, as well as copying our PO files into the appliance."
38883 #: ../src/guestfs.pod:2890
38885 "Debugging messages are never translated, since they are intended for the "
38890 #: ../src/guestfs.pod:2893
38891 msgid "SOURCE CODE SUBDIRECTORIES"
38895 #: ../src/guestfs.pod:2897
38900 #: ../src/guestfs.pod:2899
38901 msgid "L<virt-alignment-scan(1)> command and documentation."
38905 #: ../src/guestfs.pod:2903
38906 msgid "The libguestfs appliance, build scripts and so on."
38910 #: ../src/guestfs.pod:2905
38911 msgid "C<capitests>"
38915 #: ../src/guestfs.pod:2907
38916 msgid "Automated tests of the C API."
38920 #: ../src/guestfs.pod:2909
38925 #: ../src/guestfs.pod:2911
38927 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
38932 #: ../src/guestfs.pod:2914
38937 #: ../src/guestfs.pod:2916
38939 "Safety and liveness tests of components that libguestfs depends upon (not of "
38940 "libguestfs itself). Mainly this is for qemu and the kernel."
38944 #: ../src/guestfs.pod:2919
38949 #: ../src/guestfs.pod:2921
38951 "Tools for cloning virtual machines. Currently contains L<virt-sysprep(1)> "
38952 "command and documentation."
38956 #: ../src/guestfs.pod:2924
38961 #: ../src/guestfs.pod:2926
38962 msgid "Outside contributions, experimental parts."
38966 #: ../src/guestfs.pod:2928
38971 #: ../src/guestfs.pod:2930
38973 "The daemon that runs inside the libguestfs appliance and carries out actions."
38977 #: ../src/guestfs.pod:2933
38982 #: ../src/guestfs.pod:2935
38983 msgid "L<virt-df(1)> command and documentation."
38987 #: ../src/guestfs.pod:2937
38992 #: ../src/guestfs.pod:2939
38993 msgid "L<virt-edit(1)> command and documentation."
38997 #: ../src/guestfs.pod:2941
38998 msgid "C<examples>"
39002 #: ../src/guestfs.pod:2943
39003 msgid "C API example code."
39007 #: ../src/guestfs.pod:2945
39012 #: ../src/guestfs.pod:2947
39014 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
39015 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
39016 "L<virt-tar-out(1)>."
39020 #: ../src/guestfs.pod:2951
39025 #: ../src/guestfs.pod:2953
39027 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
39031 #: ../src/guestfs.pod:2955
39032 msgid "C<generator>"
39036 #: ../src/guestfs.pod:2957
39038 "The crucially important generator, used to automatically generate large "
39039 "amounts of boilerplate C code for things like RPC and bindings."
39043 #: ../src/guestfs.pod:2960
39048 #: ../src/guestfs.pod:2962
39049 msgid "Files used by the test suite."
39053 #: ../src/guestfs.pod:2964
39054 msgid "Some \"phony\" guest images which we test against."
39058 #: ../src/guestfs.pod:2966
39059 msgid "C<inspector>"
39063 #: ../src/guestfs.pod:2968
39064 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
39068 #: ../src/guestfs.pod:2970
39073 #: ../src/guestfs.pod:2972
39074 msgid "Logo used on the website. The fish is called Arthur by the way."
39078 #: ../src/guestfs.pod:2974
39083 #: ../src/guestfs.pod:2976
39084 msgid "M4 macros used by autoconf."
39088 #: ../src/guestfs.pod:2978
39093 #: ../src/guestfs.pod:2980
39094 msgid "Translations of simple gettext strings."
39098 #: ../src/guestfs.pod:2982
39103 #: ../src/guestfs.pod:2984
39105 "The build infrastructure and PO files for translations of manpages and POD "
39106 "files. Eventually this will be combined with the C<po> directory, but that "
39107 "is rather complicated."
39111 #: ../src/guestfs.pod:2988
39112 msgid "C<regressions>"
39116 #: ../src/guestfs.pod:2990
39117 msgid "Regression tests."
39121 #: ../src/guestfs.pod:2992
39126 #: ../src/guestfs.pod:2994
39127 msgid "L<virt-rescue(1)> command and documentation."
39131 #: ../src/guestfs.pod:2996
39136 #: ../src/guestfs.pod:2998
39137 msgid "L<virt-resize(1)> command and documentation."
39141 #: ../src/guestfs.pod:3000
39142 msgid "C<sparsify>"
39146 #: ../src/guestfs.pod:3002
39147 msgid "L<virt-sparsify(1)> command and documentation."
39151 #: ../src/guestfs.pod:3004
39156 #: ../src/guestfs.pod:3006
39157 msgid "Source code to the C library."
39161 #: ../src/guestfs.pod:3008
39166 #: ../src/guestfs.pod:3010
39168 "Command line tools written in Perl (L<virt-win-reg(1)> and many others)."
39172 #: ../src/guestfs.pod:3012
39173 msgid "C<test-tool>"
39177 #: ../src/guestfs.pod:3014
39179 "Test tool for end users to test if their qemu/kernel combination will work "
39184 #: ../src/guestfs.pod:3017
39189 #: ../src/guestfs.pod:3019
39194 #: ../src/guestfs.pod:3021
39199 #: ../src/guestfs.pod:3023
39204 #: ../src/guestfs.pod:3025
39209 #: ../src/guestfs.pod:3027
39214 #: ../src/guestfs.pod:3029
39219 #: ../src/guestfs.pod:3031
39224 #: ../src/guestfs.pod:3033
39229 #: ../src/guestfs.pod:3035
39230 msgid "Language bindings."
39234 #: ../src/guestfs.pod:3039
39235 msgid "MAKING A STABLE RELEASE"
39239 #: ../src/guestfs.pod:3041
39241 "When we make a stable release, there are several steps documented here. See "
39242 "L</LIBGUESTFS VERSION NUMBERS> for general information about the stable "
39247 #: ../src/guestfs.pod:3049
39249 "Check C<make && make check> works on at least Fedora, Debian and Ubuntu."
39253 #: ../src/guestfs.pod:3054
39254 msgid "Finalize RELEASE-NOTES."
39258 #: ../src/guestfs.pod:3058
39259 msgid "Update ROADMAP."
39263 #: ../src/guestfs.pod:3062
39264 msgid "Run C<src/api-support/update-from-tarballs.sh>."
39268 #: ../src/guestfs.pod:3066
39269 msgid "Push and pull from Transifex."
39273 #: ../src/guestfs.pod:3068
39278 #: ../src/guestfs.pod:3070
39286 #: ../src/guestfs.pod:3072
39287 msgid "to push the latest POT files to Transifex. Then run:"
39291 #: ../src/guestfs.pod:3074
39299 #: ../src/guestfs.pod:3076
39300 msgid "which is a wrapper to pull the latest translated C<*.po> files."
39304 #: ../src/guestfs.pod:3080
39306 "Create new stable and development directories under L<http://libguestfs.org/"
39311 #: ../src/guestfs.pod:3085
39312 msgid "Create the branch in git:"
39316 #: ../src/guestfs.pod:3087
39319 " git tag -a 1.XX.0 -m \"Version 1.XX.0 (stable)\"\n"
39320 " git tag -a 1.YY.0 -m \"Version 1.YY.0 (development)\"\n"
39321 " git branch stable-1.XX\n"
39322 " git push origin tag 1.XX.0 1.YY.0 stable-1.XX\n"
39327 #: ../src/guestfs.pod:3094
39332 #: ../src/guestfs.pod:3096
39333 msgid "PROTOCOL LIMITS"
39337 #: ../src/guestfs.pod:3098
39339 "Internally libguestfs uses a message-based protocol to pass API calls and "
39340 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
39341 "plenty more detail about this). The maximum message size used by the "
39342 "protocol is slightly less than 4 MB. For some API calls you may need to be "
39343 "aware of this limit. The API calls which may be affected are individually "
39344 "documented, with a link back to this section of the documentation."
39348 #: ../src/guestfs.pod:3106
39350 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
39351 "a simple string. Because this string is at some point internally encoded as "
39352 "a message, the maximum size that it can return is slightly under 4 MB. If "
39353 "the requested file is larger than this then you will get an error."
39357 #: ../src/guestfs.pod:3112
39359 "In order to transfer large files into and out of the guest filesystem, you "
39360 "need to use particular calls that support this. The sections L</UPLOADING> "
39361 "and L</DOWNLOADING> document how to do this."
39365 #: ../src/guestfs.pod:3116
39367 "You might also consider mounting the disk image using our FUSE filesystem "
39368 "support (L<guestmount(1)>)."
39372 #: ../src/guestfs.pod:3119
39373 msgid "MAXIMUM NUMBER OF DISKS"
39377 #: ../src/guestfs.pod:3121
39378 msgid "When using virtio disks (the default) the current limit is B<25> disks."
39382 #: ../src/guestfs.pod:3124
39384 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
39385 "slots. However febootstrap only understands disks with names C</dev/vda> "
39386 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
39391 #: ../src/guestfs.pod:3129
39393 "We are working to substantially raise this limit in future versions but it "
39394 "requires complex changes to qemu."
39398 #: ../src/guestfs.pod:3132
39400 "In future versions of libguestfs it should also be possible to \"hot plug\" "
39401 "disks (add and remove disks after calling L</guestfs_launch>). This also "
39402 "requires changes to qemu."
39406 #: ../src/guestfs.pod:3136
39407 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
39411 #: ../src/guestfs.pod:3138
39412 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
39416 #: ../src/guestfs.pod:3140
39418 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
39419 "vda>, and C</dev/vda1> through C</dev/vda15>)."
39423 #: ../src/guestfs.pod:3143
39425 "If you attach a disk with more than 15 partitions, the extra partitions are "
39426 "ignored by libguestfs."
39430 #: ../src/guestfs.pod:3146
39431 msgid "MAXIMUM SIZE OF A DISK"
39435 #: ../src/guestfs.pod:3148
39436 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
39440 #: ../src/guestfs.pod:3150
39442 "We have tested block devices up to 1 exabyte (2**60 or "
39443 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
39448 #: ../src/guestfs.pod:3154
39450 "Although libguestfs probably does not impose any limit, the underlying host "
39451 "storage will. If you store disk images on a host ext4 filesystem, then the "
39452 "maximum size will be limited by the maximum ext4 file size (currently 16 "
39453 "TB). If you store disk images as host logical volumes then you are limited "
39454 "by the maximum size of an LV."
39458 #: ../src/guestfs.pod:3160
39460 "For the hugest disk image files, we recommend using XFS on the host for "
39465 #: ../src/guestfs.pod:3163
39466 msgid "MAXIMUM SIZE OF A PARTITION"
39470 #: ../src/guestfs.pod:3165
39472 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
39473 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
39474 "address a partition located beyond 2 TB on the disk."
39478 #: ../src/guestfs.pod:3169
39480 "It is recommended that you use GPT partitions on disks which are larger than "
39481 "this size. GPT uses 64 bit sector numbers and so can address partitions "
39482 "which are theoretically larger than the largest disk we could support."
39486 #: ../src/guestfs.pod:3174
39487 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
39491 #: ../src/guestfs.pod:3176
39493 "This depends on the filesystem type. libguestfs itself does not impose any "
39494 "known limit. Consult Wikipedia or the filesystem documentation to find out "
39495 "what these limits are."
39499 #: ../src/guestfs.pod:3180
39500 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
39504 #: ../src/guestfs.pod:3182
39506 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
39507 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
39508 "uploads and downloads."
39512 #: ../src/guestfs.pod:3186
39513 msgid "INSPECTION LIMITS"
39517 #: ../src/guestfs.pod:3188
39519 "The inspection code has several arbitrary limits on things like the size of "
39520 "Windows Registry hive it will read, and the length of product name. These "
39521 "are intended to stop a malicious guest from consuming arbitrary amounts of "
39522 "memory and disk space on the host, and should not be reached in practice. "
39523 "See the source code for more information."
39527 #: ../src/guestfs.pod:3214
39529 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
39530 "effect as calling C<guestfs_set_verbose (g, 1)>."
39534 #: ../src/guestfs.pod:3226
39536 "Set the path that libguestfs uses to search for a supermin appliance. See "
39537 "the discussion of paths in section L</PATH> above."
39541 #: ../src/guestfs.pod:3235
39542 msgid "See also L</QEMU WRAPPERS> above."
39546 #: ../src/guestfs.pod:3239
39548 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
39549 "effect as calling C<guestfs_set_trace (g, 1)>."
39553 #: ../src/guestfs.pod:3257
39555 "L<guestfs-examples(3)>, L<guestfs-erlang(3)>, L<guestfs-java(3)>, L<guestfs-"
39556 "ocaml(3)>, L<guestfs-perl(3)>, L<guestfs-python(3)>, L<guestfs-ruby(3)>, "
39557 "L<guestfish(1)>, L<guestmount(1)>, L<virt-alignment-scan(1)>, L<virt-cat(1)"
39558 ">, L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
39559 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
39560 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue"
39561 "(1)>, L<virt-resize(1)>, L<virt-sparsify(1)>, L<virt-sysprep(1)>, L<virt-tar"
39562 "(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
39563 "L<febootstrap(1)>, L<febootstrap-supermin-helper(8)>, L<hivex(3)>, L<stap(1)"
39564 ">, L<http://libguestfs.org/>."
39568 #: ../src/guestfs.pod:3293
39570 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
39571 "(8)>, L<disktype(1)>."
39575 #: ../src/guestfs.pod:3300 ../tools/virt-make-fs.pl:553
39576 #: ../tools/virt-win-reg.pl:761
39581 #: ../src/guestfs.pod:3302
39582 msgid "To get a list of bugs against libguestfs use this link:"
39586 #: ../src/guestfs.pod:3304
39588 "L<https://bugzilla.redhat.com/buglist.cgi?"
39589 "component=libguestfs&product=Virtualization+Tools>"
39593 #: ../src/guestfs.pod:3306
39594 msgid "To report a new bug against libguestfs use this link:"
39598 #: ../src/guestfs.pod:3308
39600 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
39601 "component=libguestfs&product=Virtualization+Tools>"
39605 #: ../src/guestfs.pod:3310
39606 msgid "When reporting a bug, please check:"
39610 #: ../src/guestfs.pod:3316
39611 msgid "That the bug hasn't been reported already."
39615 #: ../src/guestfs.pod:3320
39616 msgid "That you are testing a recent version."
39620 #: ../src/guestfs.pod:3324
39621 msgid "Describe the bug accurately, and give a way to reproduce it."
39625 #: ../src/guestfs.pod:3328
39627 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
39632 #: ../test-tool/libguestfs-test-tool.pod:5
39633 msgid "libguestfs-test-tool - Diagnostics for libguestfs"
39637 #: ../test-tool/libguestfs-test-tool.pod:9
39640 " libguestfs-test-tool [--options]\n"
39645 #: ../test-tool/libguestfs-test-tool.pod:13
39647 "libguestfs-test-tool is a test program shipped with libguestfs to allow you "
39648 "to check basic libguestfs functionality is working. This is needed because "
39649 "libguestfs occasionally breaks for reasons beyond our control: usually "
39650 "because of changes in the underlying qemu or kernel packages, or the host "
39655 #: ../test-tool/libguestfs-test-tool.pod:19
39656 msgid "If you suspect a problem in libguestfs, then just run:"
39660 #: ../test-tool/libguestfs-test-tool.pod:21
39663 " libguestfs-test-tool\n"
39668 #: ../test-tool/libguestfs-test-tool.pod:23
39669 msgid "It will print lots of diagnostic messages."
39673 #: ../test-tool/libguestfs-test-tool.pod:25
39674 msgid "If it runs to completion successfully, you will see this near the end:"
39678 #: ../test-tool/libguestfs-test-tool.pod:27
39681 " ===== TEST FINISHED OK =====\n"
39686 #: ../test-tool/libguestfs-test-tool.pod:29
39687 msgid "and the test tool will exit with code 0."
39691 #: ../test-tool/libguestfs-test-tool.pod:31
39693 "If it fails (and/or exits with non-zero error code), please paste the "
39694 "I<complete, unedited> output of the test tool into a bug report. More "
39695 "information about reporting bugs can be found on the L<http://libguestfs.org/"
39700 #: ../test-tool/libguestfs-test-tool.pod:42
39701 msgid "Display short usage information and exit."
39705 #: ../test-tool/libguestfs-test-tool.pod:44
39706 msgid "B<--qemu qemu_binary>"
39710 #: ../test-tool/libguestfs-test-tool.pod:46
39712 "If you have downloaded another qemu binary, point this option at the full "
39713 "path of the binary to try it."
39717 #: ../test-tool/libguestfs-test-tool.pod:49
39718 msgid "B<--qemudir qemu_source_dir>"
39722 #: ../test-tool/libguestfs-test-tool.pod:51
39724 "If you have compiled qemu from source, point this option at the source "
39725 "directory to try it."
39729 #: ../test-tool/libguestfs-test-tool.pod:54
39734 #: ../test-tool/libguestfs-test-tool.pod:56
39735 msgid "B<--timeout N>"
39739 #: ../test-tool/libguestfs-test-tool.pod:58
39741 "Set the launch timeout to C<N> seconds. The default is 600 seconds (10 "
39742 "minutes) which does not usually need to be adjusted."
39746 #: ../test-tool/libguestfs-test-tool.pod:63
39747 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
39751 #: ../test-tool/libguestfs-test-tool.pod:65
39753 "If you have compiled another version of qemu from source and would like to "
39754 "try that, then you can use the I<--qemudir> option to point to the qemu "
39755 "source directory."
39759 #: ../test-tool/libguestfs-test-tool.pod:69
39761 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
39762 "option to point to the binary."
39766 #: ../test-tool/libguestfs-test-tool.pod:72
39768 "Note when using these options, you can ignore the business of qemu wrapper "
39769 "scripts (L<guestfs(3)/QEMU WRAPPERS>), since libguestfs-test-tool writes a "
39770 "wrapper script for you if one is needed."
39774 #: ../test-tool/libguestfs-test-tool.pod:76
39775 msgid "TRYING OUT A DIFFERENT KERNEL"
39779 #: ../test-tool/libguestfs-test-tool.pod:78
39781 "If you are using febootstrap E<ge> 3.8 then you can select which kernel "
39782 "libguestfs tries. You do this by setting the environment variables "
39783 "C<FEBOOTSTRAP_KERNEL> and/or C<FEBOOTSTRAP_MODULES>."
39787 #: ../test-tool/libguestfs-test-tool.pod:82
39789 "Refer to L<febootstrap-supermin-helper(8)/ENVIRONMENT VARIABLES> for further "
39794 #: ../test-tool/libguestfs-test-tool.pod:85
39795 msgid "SELF-DIAGNOSIS"
39799 #: ../test-tool/libguestfs-test-tool.pod:87
39801 "Refer to L<guestfs(3)/APPLIANCE BOOT PROCESS> to understand the messages "
39802 "produced by libguestfs-test-tool and/or possible errors."
39806 #: ../test-tool/libguestfs-test-tool.pod:92
39808 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
39809 "I<1> if there was an error."
39813 #: ../test-tool/libguestfs-test-tool.pod:97
39815 "For the full list of environment variables which may affect libguestfs, "
39816 "please see the L<guestfs(3)> manual page."
39820 #: ../test-tool/libguestfs-test-tool.pod:102
39821 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
39825 #: ../tools/virt-list-filesystems.pl:32
39827 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
39831 #: ../tools/virt-list-filesystems.pl:36
39834 " virt-list-filesystems [--options] domname\n"
39839 #: ../tools/virt-list-filesystems.pl:38
39842 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
39847 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
39849 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
39854 #: ../tools/virt-list-filesystems.pl:45
39856 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
39857 "are contained in a virtual machine or disk image."
39861 #: ../tools/virt-list-filesystems.pl:49
39863 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
39864 "functionality. For more complex cases you should look at the L<guestfish(1)"
39869 #: ../tools/virt-list-filesystems.pl:112
39871 "With this option, C<virt-list-filesystems> displays the type of each "
39872 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
39876 #: ../tools/virt-list-filesystems.pl:119
39881 #: ../tools/virt-list-filesystems.pl:123
39883 "Normally we only show mountable filesystems. If this option is given then "
39884 "swap devices are shown too."
39888 #: ../tools/virt-list-filesystems.pl:197
39890 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
39891 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
39892 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
39896 #: ../tools/virt-list-filesystems.pl:214 ../tools/virt-tar.pl:317
39897 msgid "Copyright (C) 2009 Red Hat Inc."
39901 #: ../tools/virt-list-partitions.pl:32
39903 "virt-list-partitions - List partitions in a virtual machine or disk image"
39907 #: ../tools/virt-list-partitions.pl:36
39910 " virt-list-partitions [--options] domname\n"
39915 #: ../tools/virt-list-partitions.pl:38
39918 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
39923 #: ../tools/virt-list-partitions.pl:45
39925 "C<virt-list-partitions> is a command line tool to list the partitions that "
39926 "are contained in a virtual machine or disk image. It is mainly useful as a "
39927 "first step to using L<virt-resize(1)>."
39931 #: ../tools/virt-list-partitions.pl:50
39933 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
39934 "functionality. For more complex cases you should look at the L<guestfish(1)"
39939 #: ../tools/virt-list-partitions.pl:113
39940 msgid "Show sizes in human-readable form (eg. \"1G\")."
39944 #: ../tools/virt-list-partitions.pl:123
39946 "With this option, C<virt-list-partitions> displays the type and size of each "
39947 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
39951 #: ../tools/virt-list-partitions.pl:130
39956 #: ../tools/virt-list-partitions.pl:132
39961 #: ../tools/virt-list-partitions.pl:134
39963 "Display the total size of each block device (as a separate row or rows)."
39967 #: ../tools/virt-list-partitions.pl:267
39969 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
39970 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
39971 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
39975 #: ../tools/virt-list-partitions.pl:283
39976 msgid "Copyright (C) 2009-2010 Red Hat Inc."
39980 #: ../tools/virt-make-fs.pl:37
39981 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
39985 #: ../tools/virt-make-fs.pl:41
39988 " virt-make-fs [--options] input.tar output.img\n"
39993 #: ../tools/virt-make-fs.pl:43
39996 " virt-make-fs [--options] input.tar.gz output.img\n"
40001 #: ../tools/virt-make-fs.pl:45
40004 " virt-make-fs [--options] directory output.img\n"
40009 #: ../tools/virt-make-fs.pl:49
40011 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
40012 "archive or some files in a directory. It is similar to tools like L<mkisofs"
40013 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
40014 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
40015 "you want to attach these filesystems to existing virtual machines (eg. to "
40016 "import large amounts of read-only data to a VM)."
40020 #: ../tools/virt-make-fs.pl:57
40021 msgid "Basic usage is:"
40025 #: ../tools/virt-make-fs.pl:59
40028 " virt-make-fs input output\n"
40033 #: ../tools/virt-make-fs.pl:61
40035 "where C<input> is either a directory containing files that you want to add, "
40036 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
40037 "C<output> is a disk image. The input type is detected automatically. The "
40038 "output disk image defaults to a raw ext2 image unless you specify extra "
40039 "flags (see L</OPTIONS> below)."
40043 #: ../tools/virt-make-fs.pl:67
40044 msgid "EXTRA SPACE"
40048 #: ../tools/virt-make-fs.pl:69
40050 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
40051 "the files that it contains, but might have extra space. Depending on how "
40052 "you are going to use the output, you might think this extra space is wasted "
40053 "and want to minimize it, or you might want to leave space so that more files "
40054 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
40055 "but you can use the I<--size> flag to leave space in the filesystem if you "
40060 #: ../tools/virt-make-fs.pl:77
40062 "An alternative way to leave extra space but not make the output image any "
40063 "bigger is to use an alternative disk image format (instead of the default "
40064 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
40065 "image format (check your hypervisor supports this before using it). This "
40066 "allows you to choose a large I<--size> but the extra space won't actually be "
40067 "allocated in the image until you try to store something in it."
40071 #: ../tools/virt-make-fs.pl:85
40073 "Don't forget that you can also use local commands including L<resize2fs(8)> "
40074 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
40075 "to build another image from scratch."
40079 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
40080 #: ../tools/virt-make-fs.pl:142
40085 #: ../tools/virt-make-fs.pl:91
40088 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
40093 #: ../tools/virt-make-fs.pl:93
40094 msgid "FILESYSTEM TYPE"
40098 #: ../tools/virt-make-fs.pl:95
40100 "The default filesystem type is C<ext2>. Just about any filesystem type that "
40101 "libguestfs supports can be used (but I<not> read-only formats like "
40102 "ISO9660). Here are some of the more common choices:"
40106 #: ../tools/virt-make-fs.pl:101
40111 #: ../tools/virt-make-fs.pl:103
40113 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
40114 "you are not going to use the filesystem in a way that requires the journal, "
40115 "then this is just wasted overhead."
40119 #: ../tools/virt-make-fs.pl:107
40120 msgid "I<ntfs> or I<vfat>"
40124 #: ../tools/virt-make-fs.pl:109
40125 msgid "Useful if exporting data to a Windows guest."
40129 #: ../tools/virt-make-fs.pl:111
40131 "I<Note for vfat>: The tar archive or local directory must only contain files "
40132 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
40133 "program running within libguestfs is unable to change the ownership of non-"
40134 "root files, since vfat itself does not support this."
40138 #: ../tools/virt-make-fs.pl:116
40143 #: ../tools/virt-make-fs.pl:118
40145 "Lower overhead than C<ext2>, but certain limitations on filename length and "
40146 "total filesystem size."
40150 #: ../tools/virt-make-fs.pl:125
40153 " virt-make-fs --type=minix input minixfs.img\n"
40158 #: ../tools/virt-make-fs.pl:127
40159 msgid "TO PARTITION OR NOT TO PARTITION"
40163 #: ../tools/virt-make-fs.pl:129
40164 msgid "Optionally virt-make-fs can add a partition table to the output disk."
40168 #: ../tools/virt-make-fs.pl:131
40170 "Adding a partition can make the disk image more compatible with certain "
40171 "virtualized operating systems which don't expect to see a filesystem "
40172 "directly located on a block device (Linux doesn't care and will happily "
40173 "handle both types)."
40177 #: ../tools/virt-make-fs.pl:136
40179 "On the other hand, if you have a partition table then the output image is no "
40180 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
40181 "directly on a partitioned disk image. (However libguestfs tools such as "
40182 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
40186 #: ../tools/virt-make-fs.pl:144
40187 msgid "Add an MBR partition:"
40191 #: ../tools/virt-make-fs.pl:146
40194 " virt-make-fs --partition -- input disk.img\n"
40199 #: ../tools/virt-make-fs.pl:148
40201 "If the output disk image could be terabyte-sized or larger, it's better to "
40202 "use an EFI/GPT-compatible partition table:"
40206 #: ../tools/virt-make-fs.pl:151
40209 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
40214 #: ../tools/virt-make-fs.pl:179
40215 msgid "Enable debugging information."
40219 #: ../tools/virt-make-fs.pl:185
40220 msgid "B<--size=E<lt>NE<gt>>"
40224 #: ../tools/virt-make-fs.pl:187
40225 msgid "B<--size=+E<lt>NE<gt>>"
40229 #: ../tools/virt-make-fs.pl:189
40230 msgid "B<-s E<lt>NE<gt>>"
40234 #: ../tools/virt-make-fs.pl:191
40235 msgid "B<-s +E<lt>NE<gt>>"
40239 #: ../tools/virt-make-fs.pl:193
40241 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
40245 #: ../tools/virt-make-fs.pl:196
40247 "If this option is I<not> given, then the output image will be just large "
40248 "enough to contain all the files, with not much wasted space."
40252 #: ../tools/virt-make-fs.pl:199
40254 "To choose a fixed size output disk, specify an absolute number followed by b/"
40255 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40256 "Petabytes or Exabytes. This must be large enough to contain all the input "
40257 "files, else you will get an error."
40261 #: ../tools/virt-make-fs.pl:204
40263 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
40264 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
40265 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
40266 "the input files, and (approximately) an extra 200 MB free space."
40270 #: ../tools/virt-make-fs.pl:210
40272 "Note that virt-make-fs estimates free space, and therefore will not produce "
40273 "filesystems containing precisely the free space requested. (It is much more "
40274 "expensive and time-consuming to produce a filesystem which has precisely the "
40275 "desired free space)."
40279 #: ../tools/virt-make-fs.pl:219
40280 msgid "B<--format=E<lt>fmtE<gt>>"
40284 #: ../tools/virt-make-fs.pl:221
40285 msgid "B<-F E<lt>fmtE<gt>>"
40289 #: ../tools/virt-make-fs.pl:223
40290 msgid "Choose the output disk image format."
40294 #: ../tools/virt-make-fs.pl:225
40295 msgid "The default is C<raw> (raw disk image)."
40299 #: ../tools/virt-make-fs.pl:227
40301 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
40302 "that would really make sense here is C<qcow2>."
40306 #: ../tools/virt-make-fs.pl:234
40307 msgid "B<--type=E<lt>fsE<gt>>"
40311 #: ../tools/virt-make-fs.pl:236
40312 msgid "B<-t E<lt>fsE<gt>>"
40316 #: ../tools/virt-make-fs.pl:238
40317 msgid "Choose the output filesystem type."
40321 #: ../tools/virt-make-fs.pl:240
40322 msgid "The default is C<ext2>."
40326 #: ../tools/virt-make-fs.pl:242
40328 "Any filesystem which is supported read-write by libguestfs can be used here."
40332 #: ../tools/virt-make-fs.pl:249
40333 msgid "B<--partition>"
40337 #: ../tools/virt-make-fs.pl:251
40338 msgid "B<--partition=E<lt>parttypeE<gt>>"
40342 #: ../tools/virt-make-fs.pl:253
40344 "If specified, this flag adds an MBR partition table to the output disk image."
40348 #: ../tools/virt-make-fs.pl:256
40350 "You can change the partition table type, eg. I<--partition=gpt> for large "
40355 #: ../tools/virt-make-fs.pl:259
40357 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
40358 "might consider the next parameter to be the partition type. For example:"
40362 #: ../tools/virt-make-fs.pl:263
40365 " virt-make-fs --partition input.tar ...\n"
40370 #: ../tools/virt-make-fs.pl:265
40372 "would cause virt-make-fs to think you wanted to use a partition type of "
40373 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
40374 "dash) between options and the input file argument:"
40378 #: ../tools/virt-make-fs.pl:269
40381 " virt-make-fs --partition -- input.tar ...\n"
40386 #: ../tools/virt-make-fs.pl:541
40388 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
40389 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
40390 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
40394 #: ../tools/virt-make-fs.pl:555 ../tools/virt-win-reg.pl:763
40396 "When reporting bugs, please enable debugging and capture the I<complete> "
40401 #: ../tools/virt-make-fs.pl:558
40404 " export LIBGUESTFS_DEBUG=1\n"
40405 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
40410 #: ../tools/virt-make-fs.pl:561
40412 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
40417 #: ../tools/virt-tar.pl:33
40418 msgid "virt-tar - Extract or upload files to a virtual machine"
40422 #: ../tools/virt-tar.pl:37
40425 " virt-tar [--options] -x domname directory tarball\n"
40430 #: ../tools/virt-tar.pl:39
40433 " virt-tar [--options] -u domname tarball directory\n"
40438 #: ../tools/virt-tar.pl:41
40441 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
40446 #: ../tools/virt-tar.pl:43
40449 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
40454 #: ../tools/virt-tar.pl:45 ../tools/virt-win-reg.pl:88
40459 #: ../tools/virt-tar.pl:47
40461 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
40462 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
40466 #: ../tools/virt-tar.pl:52
40467 msgid "Download C</home> from the VM into a local tarball:"
40471 #: ../tools/virt-tar.pl:54
40474 " virt-tar -x domname /home home.tar\n"
40479 #: ../tools/virt-tar.pl:56
40482 " virt-tar -zx domname /home home.tar.gz\n"
40487 #: ../tools/virt-tar.pl:58
40488 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
40492 #: ../tools/virt-tar.pl:60
40495 " virt-tar -u domname uploadstuff.tar /tmp\n"
40500 #: ../tools/virt-tar.pl:62
40503 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
40508 #: ../tools/virt-tar.pl:66
40510 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
40511 "virtual machines. If you do this, you risk disk corruption in the VM. "
40512 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
40516 #: ../tools/virt-tar.pl:71
40518 "You can use I<-x> (extract) on live virtual machines, but you might get "
40519 "inconsistent results or errors if there is filesystem activity inside the "
40520 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
40521 "work, but the only way to guarantee consistent results is if the virtual "
40522 "machine is shut down."
40526 #: ../tools/virt-tar.pl:79
40528 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
40529 "parts of a guest filesystem. There are many possibilities: making backups, "
40530 "uploading data files, snooping on guest activity, fixing or customizing "
40535 #: ../tools/virt-tar.pl:84
40537 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
40538 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
40539 "should look at the L<guestfish(1)> tool."
40543 #: ../tools/virt-tar.pl:88
40545 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
40546 "its contents (recursively) from the virtual machine into a local tarball. "
40547 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
40548 "virtual machine. You cannot use these two options together."
40552 #: ../tools/virt-tar.pl:94
40554 "In addition, you may need to use the I<-z> (gZip) option to enable "
40555 "compression. When uploading, you have to specify I<-z> if the upload file "
40556 "is compressed because virt-tar won't detect this on its own."
40560 #: ../tools/virt-tar.pl:98
40562 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
40563 "example it cannot do PKZip files or bzip2 compression. If you want that "
40564 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
40565 "the L<libguestfs(3)> API)."
40569 #: ../tools/virt-tar.pl:160
40570 msgid "B<--extract>"
40574 #: ../tools/virt-tar.pl:162
40575 msgid "B<--download>"
40579 #: ../tools/virt-tar.pl:164
40584 #: ../tools/virt-tar.pl:166
40585 msgid "B<--upload>"
40589 #: ../tools/virt-tar.pl:168
40591 "Use I<-x> to extract (download) a directory from a virtual machine to a "
40596 #: ../tools/virt-tar.pl:171
40598 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
40599 "Please read the L</WARNING> section above before using this option."
40603 #: ../tools/virt-tar.pl:175
40604 msgid "You must specify exactly one of these options."
40608 #: ../tools/virt-tar.pl:181
40613 #: ../tools/virt-tar.pl:183
40618 #: ../tools/virt-tar.pl:185
40619 msgid "Specify that the input or output tarball is gzip-compressed."
40623 #: ../tools/virt-tar.pl:298
40625 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
40626 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
40627 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
40632 #: ../tools/virt-win-reg.pl:37
40634 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
40638 #: ../tools/virt-win-reg.pl:41
40641 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
40646 #: ../tools/virt-win-reg.pl:43
40649 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
40654 #: ../tools/virt-win-reg.pl:45
40657 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
40662 #: ../tools/virt-win-reg.pl:47
40665 " virt-win-reg --merge domname [input.reg ...]\n"
40670 #: ../tools/virt-win-reg.pl:49
40673 " virt-win-reg [--options] disk.img ... # instead of domname\n"
40678 #: ../tools/virt-win-reg.pl:53
40680 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
40681 "virtual machines. If you do this, you I<will> get irreversible disk "
40682 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
40683 "but doesn't catch all cases."
40687 #: ../tools/virt-win-reg.pl:58
40689 "Modifying the Windows Registry is an inherently risky operation. The format "
40690 "is deliberately obscure and undocumented, and Registry changes can leave the "
40691 "system unbootable. Therefore when using the I<--merge> option, make sure "
40692 "you have a reliable backup first."
40696 #: ../tools/virt-win-reg.pl:65
40698 "This program can export and merge Windows Registry entries from a Windows "
40703 #: ../tools/virt-win-reg.pl:68
40705 "The first parameter is the libvirt guest name or the raw disk image of a "
40710 #: ../tools/virt-win-reg.pl:71
40712 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
40713 "exported (recursively). For example:"
40717 #: ../tools/virt-win-reg.pl:74
40720 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
40725 #: ../tools/virt-win-reg.pl:76
40727 "You can also display single values from within registry keys, for example:"
40731 #: ../tools/virt-win-reg.pl:79
40734 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
40735 " $ virt-win-reg Windows7 $cvkey ProductName\n"
40736 " Windows 7 Enterprise\n"
40741 #: ../tools/virt-win-reg.pl:83
40743 "With I<--merge>, you can merge a textual regedit file into the Windows "
40748 #: ../tools/virt-win-reg.pl:86
40751 " $ virt-win-reg --merge Windows7 changes.reg\n"
40756 #: ../tools/virt-win-reg.pl:90
40758 "This program is only meant for simple access to the registry. If you want "
40759 "to do complicated things with the registry, we suggest you download the "
40760 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
40761 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
40762 "L<hivexregedit(1)>."
40766 #: ../tools/virt-win-reg.pl:159
40771 #: ../tools/virt-win-reg.pl:161
40773 "In merge mode, this merges a textual regedit file into the Windows Registry "
40774 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
40775 "displays or exports Registry entries instead."
40779 #: ../tools/virt-win-reg.pl:165
40781 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
40782 "result in disk corruption. However exporting (without this flag) is always "
40787 #: ../tools/virt-win-reg.pl:173
40788 msgid "B<--encoding> UTF-16LE|ASCII"
40792 #: ../tools/virt-win-reg.pl:175
40794 "When merging (only), you may need to specify the encoding for strings to be "
40795 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
40796 "(3)/ENCODING STRINGS>."
40800 #: ../tools/virt-win-reg.pl:179
40802 "The default is to use UTF-16LE, which should work with recent versions of "
40807 #: ../tools/virt-win-reg.pl:186
40808 msgid "B<--unsafe-printable-strings>"
40812 #: ../tools/virt-win-reg.pl:188
40814 "When exporting (only), assume strings are UTF-16LE and print them as strings "
40815 "instead of hex sequences. Remove the final zero codepoint from strings if "
40820 #: ../tools/virt-win-reg.pl:192
40822 "This is unsafe and does not preserve the fidelity of strings in the original "
40823 "Registry for various reasons:"
40827 #: ../tools/virt-win-reg.pl:199
40829 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
40830 "other encodings will be corrupted by this transformation."
40834 #: ../tools/virt-win-reg.pl:204
40836 "Assumes that everything which has type 1 or 2 is really a string and that "
40837 "everything else is not a string, but the type field in real Registries is "
40842 #: ../tools/virt-win-reg.pl:210
40844 "Loses information about whether a zero codepoint followed the string in the "
40849 #: ../tools/virt-win-reg.pl:215
40851 "This all happens because the Registry itself contains no information about "
40852 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
40856 #: ../tools/virt-win-reg.pl:219
40858 "You should only use this option for quick hacking and debugging of the "
40859 "Registry contents, and I<never> use it if the output is going to be passed "
40860 "into another program or stored in another Registry."
40864 #: ../tools/virt-win-reg.pl:556
40865 msgid "SUPPORTED SYSTEMS"
40869 #: ../tools/virt-win-reg.pl:558
40871 "The program currently supports Windows NT-derived guests starting with "
40872 "Windows XP through to at least Windows 7."
40876 #: ../tools/virt-win-reg.pl:561
40877 msgid "The following Registry keys are supported:"
40881 #: ../tools/virt-win-reg.pl:565
40882 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
40886 #: ../tools/virt-win-reg.pl:567
40887 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
40891 #: ../tools/virt-win-reg.pl:569
40892 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
40896 #: ../tools/virt-win-reg.pl:571
40897 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
40901 #: ../tools/virt-win-reg.pl:573
40902 msgid "C<HKEY_USERS\\.DEFAULT>"
40906 #: ../tools/virt-win-reg.pl:575
40907 msgid "C<HKEY_USERS\\I<SID>>"
40911 #: ../tools/virt-win-reg.pl:577
40912 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
40916 #: ../tools/virt-win-reg.pl:579
40917 msgid "C<HKEY_USERS\\I<username>>"
40921 #: ../tools/virt-win-reg.pl:581
40923 "where I<username> is a local user name (this is a libguestfs extension)."
40927 #: ../tools/virt-win-reg.pl:585
40929 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
40934 #: ../tools/virt-win-reg.pl:588
40936 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
40937 "supported (there is no \"current user\")."
40941 #: ../tools/virt-win-reg.pl:591
40946 #: ../tools/virt-win-reg.pl:593
40948 "C<virt-win-reg> expects that regedit files have already been reencoded in "
40949 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
40950 "style line endings. Since Windows regedit files are often in UTF-16LE with "
40951 "Windows-style line endings, you may need to reencode the whole file before "
40952 "or after processing."
40956 #: ../tools/virt-win-reg.pl:599
40958 "To reencode a file from Windows format to Linux (before processing it with "
40959 "the I<--merge> option), you would do something like this:"
40963 #: ../tools/virt-win-reg.pl:602
40966 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
40971 #: ../tools/virt-win-reg.pl:604
40973 "To go in the opposite direction, after exporting and before sending the file "
40974 "to a Windows user, do something like this:"
40978 #: ../tools/virt-win-reg.pl:607
40981 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
40986 #: ../tools/virt-win-reg.pl:609
40987 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
40991 #: ../tools/virt-win-reg.pl:611
40993 "If you are unsure about the current encoding, use the L<file(1)> command. "
40994 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
40995 "style (CRLF) line endings, like this:"
40999 #: ../tools/virt-win-reg.pl:615
41002 " $ file software.reg\n"
41003 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
41004 " with CRLF line terminators\n"
41009 #: ../tools/virt-win-reg.pl:619
41010 msgid "This file would need conversion before you could I<--merge> it."
41014 #: ../tools/virt-win-reg.pl:621
41015 msgid "CurrentControlSet etc."
41019 #: ../tools/virt-win-reg.pl:623
41021 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
41022 "Registry at the level of the hive file, and therefore you cannot modify "
41027 #: ../tools/virt-win-reg.pl:627
41029 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
41030 "circumstances it might refer to another control set. The way to find out is "
41031 "to look at the C<HKLM\\SYSTEM\\Select> key:"
41035 #: ../tools/virt-win-reg.pl:631
41038 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
41039 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
41040 " \"Current\"=dword:00000001\n"
41041 " \"Default\"=dword:00000001\n"
41042 " \"Failed\"=dword:00000000\n"
41043 " \"LastKnownGood\"=dword:00000002\n"
41048 #: ../tools/virt-win-reg.pl:638
41049 msgid "\"Current\" is the one which Windows will choose when it boots."
41053 #: ../tools/virt-win-reg.pl:640
41055 "Similarly, other C<Current...> keys in the path may need to be replaced."
41059 #: ../tools/virt-win-reg.pl:643
41060 msgid "WINDOWS TIPS"
41064 #: ../tools/virt-win-reg.pl:645
41066 "Note that some of these tips modify the guest disk image. The guest I<must> "
41067 "be shut off, else you will get disk corruption."
41071 #: ../tools/virt-win-reg.pl:648
41072 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
41076 #: ../tools/virt-win-reg.pl:650
41078 "Prepare a DOS batch script, VBScript or executable. Upload this using "
41079 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
41080 "is uploaded into C<C:\\>:"
41084 #: ../tools/virt-win-reg.pl:654
41087 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
41092 #: ../tools/virt-win-reg.pl:656
41093 msgid "Prepare a regedit file containing the registry change:"
41097 #: ../tools/virt-win-reg.pl:658
41100 " cat > test.reg <<'EOF'\n"
41101 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
41102 " \"Test\"=\"c:\\\\test.bat\"\n"
41108 #: ../tools/virt-win-reg.pl:663
41110 "In this example we use the key C<RunOnce> which means that the script will "
41111 "run precisely once when the first user logs in. If you want it to run every "
41112 "time a user logs in, replace C<RunOnce> with C<Run>."
41116 #: ../tools/virt-win-reg.pl:667
41117 msgid "Now update the registry:"
41121 #: ../tools/virt-win-reg.pl:669
41124 " virt-win-reg --merge WindowsGuest test.reg\n"
41129 #: ../tools/virt-win-reg.pl:671
41130 msgid "INSTALLING A SERVICE"
41134 #: ../tools/virt-win-reg.pl:673
41136 "This section assumes you are familiar with Windows services, and you either "
41137 "have a program which handles the Windows Service Control Protocol directly "
41138 "or you want to run any program using a service wrapper like SrvAny or the "
41143 #: ../tools/virt-win-reg.pl:678
41145 "First upload the program and optionally the service wrapper. In this case "
41146 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
41150 #: ../tools/virt-win-reg.pl:682
41153 " guestfish -i -d WindowsGuest <<EOF\n"
41154 " upload rhsrvany.exe /rhsrvany.exe\n"
41155 " upload test.exe /test.exe\n"
41161 #: ../tools/virt-win-reg.pl:687
41163 "Prepare a regedit file containing the registry changes. In this example, "
41164 "the first registry change is needed for the service itself or the service "
41165 "wrapper (if used). The second registry change is only needed because I am "
41166 "using the RHSrvAny service wrapper."
41170 #: ../tools/virt-win-reg.pl:692
41173 " cat > service.reg <<'EOF'\n"
41174 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
41175 " \"Type\"=dword:00000010\n"
41176 " \"Start\"=dword:00000002\n"
41177 " \"ErrorControl\"=dword:00000001\n"
41178 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
41179 " \"DisplayName\"=\"RHSrvAny\"\n"
41180 " \"ObjectName\"=\"NetworkService\"\n"
41185 #: ../tools/virt-win-reg.pl:701
41188 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
41189 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
41190 " \"PWD\"=\"c:\\\\Temp\"\n"
41196 #: ../tools/virt-win-reg.pl:712
41198 "For use of C<ControlSet001> see the section above in this manual page. You "
41199 "may need to adjust this according to the control set that is in use by the "
41204 #: ../tools/virt-win-reg.pl:718
41206 "C<\"ObjectName\"> controls the privileges that the service will have. An "
41207 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
41208 "privileged account."
41212 #: ../tools/virt-win-reg.pl:724
41214 "For the meaning of the magic numbers, see this Microsoft KB article: "
41215 "L<http://support.microsoft.com/kb/103000>."
41219 #: ../tools/virt-win-reg.pl:729
41220 msgid "Update the registry:"
41224 #: ../tools/virt-win-reg.pl:731
41227 " virt-win-reg --merge WindowsGuest service.reg\n"
41232 #: ../tools/virt-win-reg.pl:735
41234 "Be careful when passing parameters containing C<\\> (backslash) in the "
41235 "shell. Usually you will have to use 'single quotes' or double backslashes "
41236 "(but not both) to protect them from the shell."
41240 #: ../tools/virt-win-reg.pl:739
41241 msgid "Paths and value names are case-insensitive."
41245 #: ../tools/virt-win-reg.pl:748
41247 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
41248 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
41249 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
41253 #: ../tools/virt-win-reg.pl:766
41256 " export LIBGUESTFS_DEBUG=1\n"
41257 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
41262 #: ../tools/virt-win-reg.pl:769
41264 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."